diff --git a/administrator/components/com_associations/helpers/associations.php b/administrator/components/com_associations/helpers/associations.php index f9d957c8347b3..ce40831962afd 100644 --- a/administrator/components/com_associations/helpers/associations.php +++ b/administrator/components/com_associations/helpers/associations.php @@ -285,6 +285,7 @@ public static function getAssociationHtmlList($extensionName, $typeName, $itemId } JHtml::_('bootstrap.popover'); + return JLayoutHelper::render('joomla.content.associations', $items); } @@ -467,7 +468,7 @@ public static function allowEdit($extensionName, $typeName, $itemId) } // Get the extension specific helper method - $helper= self::getExtensionHelper($extensionName); + $helper = self::getExtensionHelper($extensionName); if (method_exists($helper, 'allowEdit')) { @@ -495,7 +496,7 @@ public static function allowAdd($extensionName, $typeName) } // Get the extension specific helper method - $helper= self::getExtensionHelper($extensionName); + $helper = self::getExtensionHelper($extensionName); if (method_exists($helper, 'allowAdd')) { diff --git a/administrator/components/com_associations/views/associations/view.html.php b/administrator/components/com_associations/views/associations/view.html.php index ce481471ab11a..30878a4a6e371 100644 --- a/administrator/components/com_associations/views/associations/view.html.php +++ b/administrator/components/com_associations/views/associations/view.html.php @@ -129,21 +129,25 @@ public function display($tpl = null) unset($this->activeFilters['state']); $this->filterForm->removeField('state', 'filter'); } + if (empty($support['category'])) { unset($this->activeFilters['category_id']); $this->filterForm->removeField('category_id', 'filter'); } + if ($extensionName !== 'com_menus') { unset($this->activeFilters['menutype']); $this->filterForm->removeField('menutype', 'filter'); } + if (empty($support['level'])) { unset($this->activeFilters['level']); $this->filterForm->removeField('level', 'filter'); } + if (empty($support['acl'])) { unset($this->activeFilters['access']); @@ -222,6 +226,7 @@ protected function addToolbar() JToolbarHelper::custom('associations.purge', 'purge', 'purge', 'COM_ASSOCIATIONS_PURGE', false, false); JToolbarHelper::custom('associations.clean', 'refresh', 'refresh', 'COM_ASSOCIATIONS_DELETE_ORPHANS', false, false); } + JToolbarHelper::preferences('com_associations'); } diff --git a/administrator/components/com_categories/models/fields/categoryedit.php b/administrator/components/com_categories/models/fields/categoryedit.php index b4fe50aedbccb..1bead2d566740 100644 --- a/administrator/components/com_categories/models/fields/categoryedit.php +++ b/administrator/components/com_categories/models/fields/categoryedit.php @@ -174,6 +174,7 @@ protected function getOptions() { $language = $db->quote($this->element['language']); } + $query->where($db->quoteName('a.language') . ' IN (' . $language . ')'); } diff --git a/administrator/components/com_contact/helpers/contact.php b/administrator/components/com_contact/helpers/contact.php index 79bc14e1e0a5e..07d3a344ad3c7 100644 --- a/administrator/components/com_contact/helpers/contact.php +++ b/administrator/components/com_contact/helpers/contact.php @@ -123,15 +123,19 @@ public static function countTagItems(&$items, $extension) $db = JFactory::getDbo(); $parts = explode('.', $extension); $section = null; + if (count($parts) > 1) { $section = $parts[1]; } + $join = $db->qn('#__contact_details') . ' AS c ON ct.content_item_id=c.id'; + if ($section === 'category') { $join = $db->qn('#__categories') . ' AS c ON ct.content_item_id=c.id'; } + foreach ($items as $item) { $item->count_trashed = 0; diff --git a/administrator/components/com_content/helpers/associations.php b/administrator/components/com_content/helpers/associations.php index d309c7060d345..7829dd6f6ae69 100644 --- a/administrator/components/com_content/helpers/associations.php +++ b/administrator/components/com_content/helpers/associations.php @@ -141,7 +141,6 @@ public function getType($typeName = '') if (in_array($typeName, $this->itemTypes)) { - switch ($typeName) { case 'article': diff --git a/administrator/components/com_content/models/articles.php b/administrator/components/com_content/models/articles.php index 6a5aa3c4bc62e..6ec9b91febb3c 100644 --- a/administrator/components/com_content/models/articles.php +++ b/administrator/components/com_content/models/articles.php @@ -235,6 +235,7 @@ protected function getListQuery() // Filter by access level. $access = $this->getState('filter.access'); + if (is_numeric($access)) { $query->where('a.access = ' . (int) $access); @@ -356,6 +357,7 @@ protected function getListQuery() { $tagId = ArrayHelper::toInteger($tagId); $tagId = implode(',', $tagId); + if (!empty($tagId)) { $hasTag = true; diff --git a/administrator/components/com_content/views/article/view.html.php b/administrator/components/com_content/views/article/view.html.php index 299957ef8902a..6942e8249d006 100644 --- a/administrator/components/com_content/views/article/view.html.php +++ b/administrator/components/com_content/views/article/view.html.php @@ -57,7 +57,6 @@ public function display($tpl = null) { if ($this->getLayout() == 'pagebreak') { - return parent::display($tpl); } diff --git a/administrator/components/com_fields/libraries/fieldsplugin.php b/administrator/components/com_fields/libraries/fieldsplugin.php index 9291dc8604af1..ff7e826c9f656 100644 --- a/administrator/components/com_fields/libraries/fieldsplugin.php +++ b/administrator/components/com_fields/libraries/fieldsplugin.php @@ -94,6 +94,7 @@ public function onCustomFieldsGetTypes() // Add to cache and return the data $types_cache[$this->_type . $this->_name] = $types; + return $types; } diff --git a/administrator/components/com_fields/views/fields/tmpl/default_batch_body.php b/administrator/components/com_fields/views/fields/tmpl/default_batch_body.php index d60370b64926f..c94034c2231da 100644 --- a/administrator/components/com_fields/views/fields/tmpl/default_batch_body.php +++ b/administrator/components/com_fields/views/fields/tmpl/default_batch_body.php @@ -2,7 +2,7 @@ /** * @package Joomla.Administrator * @subpackage com_fields - * + * * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_fields/views/fields/tmpl/default_batch_footer.php b/administrator/components/com_fields/views/fields/tmpl/default_batch_footer.php index 9192d5745880c..d57e3cb48a783 100644 --- a/administrator/components/com_fields/views/fields/tmpl/default_batch_footer.php +++ b/administrator/components/com_fields/views/fields/tmpl/default_batch_footer.php @@ -2,7 +2,7 @@ /** * @package Joomla.Administrator * @subpackage com_fields - * + * * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_fields/views/groups/tmpl/default_batch_footer.php b/administrator/components/com_fields/views/groups/tmpl/default_batch_footer.php index 4a313168175e2..d623161e022fd 100644 --- a/administrator/components/com_fields/views/groups/tmpl/default_batch_footer.php +++ b/administrator/components/com_fields/views/groups/tmpl/default_batch_footer.php @@ -2,7 +2,7 @@ /** * @package Joomla.Administrator * @subpackage com_fields - * + * * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_installer/models/languages.php b/administrator/components/com_installer/models/languages.php index 5c742dd97b3e0..8d4c081e1958c 100644 --- a/administrator/components/com_installer/models/languages.php +++ b/administrator/components/com_installer/models/languages.php @@ -141,7 +141,7 @@ protected function getLanguages() foreach ($extension->attributes() as $key => $value) { - $language->$key = (string) $value; + $language->$key = (string) $value; } if ($search) diff --git a/administrator/modules/mod_stats_admin/helper.php b/administrator/modules/mod_stats_admin/helper.php index 37b310bf96dc7..16fbd35566e80 100644 --- a/administrator/modules/mod_stats_admin/helper.php +++ b/administrator/modules/mod_stats_admin/helper.php @@ -83,6 +83,7 @@ public static function getStats(&$params) $query->select('COUNT(id) AS count_users') ->from('#__users'); $db->setQuery($query); + try { $users = $db->loadResult(); @@ -97,6 +98,7 @@ public static function getStats(&$params) ->from('#__content') ->where('state = 1'); $db->setQuery($query); + try { $items = $db->loadResult(); diff --git a/administrator/templates/hathor/html/layouts/joomla/edit/fieldset.php b/administrator/templates/hathor/html/layouts/joomla/edit/fieldset.php index 3a1a6a52479a3..21d73948f8382 100644 --- a/administrator/templates/hathor/html/layouts/joomla/edit/fieldset.php +++ b/administrator/templates/hathor/html/layouts/joomla/edit/fieldset.php @@ -50,7 +50,7 @@ } $html[] = ''; $html[] = ''; - + echo implode('', $html); } else diff --git a/administrator/templates/isis/html/layouts/joomla/pagination/link.php b/administrator/templates/isis/html/layouts/joomla/pagination/link.php index 1a060ea03c5e2..efece2598c3fa 100644 --- a/administrator/templates/isis/html/layouts/joomla/pagination/link.php +++ b/administrator/templates/isis/html/layouts/joomla/pagination/link.php @@ -54,7 +54,7 @@ default: $icon = null; - $aria = JText::sprintf('JLIB_HTML_GOTO_PAGE', $item->text); + $aria = JText::sprintf('JLIB_HTML_GOTO_PAGE', $item->text); break; }