diff --git a/src/administrator/components/com_weblinks/script.php b/src/administrator/components/com_weblinks/script.php index c0343f9..1e0d76a 100644 --- a/src/administrator/components/com_weblinks/script.php +++ b/src/administrator/components/com_weblinks/script.php @@ -348,4 +348,4 @@ class Com_WeblinksInstallerScript $db->execute(); } } -} \ No newline at end of file +} diff --git a/src/components/com_weblinks/src/Model/CategoryModel.php b/src/components/com_weblinks/src/Model/CategoryModel.php index 86239e8..db4035f 100644 --- a/src/components/com_weblinks/src/Model/CategoryModel.php +++ b/src/components/com_weblinks/src/Model/CategoryModel.php @@ -186,9 +186,11 @@ class CategoryModel extends ListModel { $nowDate = Factory::getDate()->toSql(); $query->where('(' . $db->quoteName('a.publish_up') - . ' IS NULL OR ' . $db->quoteName('a.publish_up') . ' <= :publish_up)') + . ' IS NULL OR ' . $db->quoteName('a.publish_up') . ' <= :publish_up)' + ) ->where('(' . $db->quoteName('a.publish_down') - . ' IS NULL OR ' . $db->quoteName('a.publish_down') . ' >= :publish_down)') + . ' IS NULL OR ' . $db->quoteName('a.publish_down') . ' >= :publish_down)' + ) ->bind(':publish_up', $nowDate) ->bind(':publish_down', $nowDate); } diff --git a/src/components/com_weblinks/src/Model/WeblinkModel.php b/src/components/com_weblinks/src/Model/WeblinkModel.php index 32308b6..9c05ada 100644 --- a/src/components/com_weblinks/src/Model/WeblinkModel.php +++ b/src/components/com_weblinks/src/Model/WeblinkModel.php @@ -126,9 +126,11 @@ class WeblinkModel extends ItemModel // Filter by start and end dates. $nowDate = Factory::getDate()->toSql(); $query->where('(' . $db->quoteName('a.publish_up') - . ' IS NULL OR ' . $db->quoteName('a.publish_up') . ' <= :publish_up)') + . ' IS NULL OR ' . $db->quoteName('a.publish_up') . ' <= :publish_up)' + ) ->where('(' . $db->quoteName('a.publish_down') - . ' IS NULL OR ' . $db->quoteName('a.publish_down') . ' >= :publish_down)') + . ' IS NULL OR ' . $db->quoteName('a.publish_down') . ' >= :publish_down)' + ) ->bind(':publish_up', $nowDate) ->bind(':publish_down', $nowDate); } diff --git a/src/components/com_weblinks/tmpl/form/edit.php b/src/components/com_weblinks/tmpl/form/edit.php index 301201f..5170723 100644 --- a/src/components/com_weblinks/tmpl/form/edit.php +++ b/src/components/com_weblinks/tmpl/form/edit.php @@ -37,7 +37,7 @@ $params = $this->state->get('params'); params->get('show_page_heading')) : ?> diff --git a/src/components/com_weblinks/tmpl/weblink/default.php b/src/components/com_weblinks/tmpl/weblink/default.php index 4152b9c..c8da427 100644 --- a/src/components/com_weblinks/tmpl/weblink/default.php +++ b/src/components/com_weblinks/tmpl/weblink/default.php @@ -32,13 +32,13 @@ if (!$canEdit) -
-
-
- item, $this->item->params); ?> -
-
-
+
+
+
+ item, $this->item->params); ?> +
+
+
item->event->afterDisplayTitle; ?> diff --git a/src/modules/mod_weblinks/src/Helper/WeblinksHelper.php b/src/modules/mod_weblinks/src/Helper/WeblinksHelper.php index dc1768a..d71b90b 100644 --- a/src/modules/mod_weblinks/src/Helper/WeblinksHelper.php +++ b/src/modules/mod_weblinks/src/Helper/WeblinksHelper.php @@ -35,7 +35,8 @@ class WeblinksHelper **/ public static function getList($params, $app) { - /* @var \Joomla\Component\Weblinks\Site\Model\CategoryModel $model */ + // @var \Joomla\Component\Weblinks\Site\Model\CategoryModel $model + $model = $app->bootComponent('com_weblinks')->getMVCFactory() ->createModel('Category', 'Site', ['ignore_request' => true]);