diff --git a/administrator/components/com_content/tmpl/articles/default.php b/administrator/components/com_content/tmpl/articles/default.php index 3b914eadc23f8..fb94149456042 100644 --- a/administrator/components/com_content/tmpl/articles/default.php +++ b/administrator/components/com_content/tmpl/articles/default.php @@ -249,10 +249,10 @@ ->removeState(1) ->removeState(2) ->removeState(-2) - ->addState(ContentComponent::CONDITION_PUBLISHED, '', 'publish', 'COM_CONTENT_CHANGE_STAGE', ['tip_title' => 'JPUBLISHED']) - ->addState(ContentComponent::CONDITION_UNPUBLISHED, '', 'unpublish', 'COM_CONTENT_CHANGE_STAGE', ['tip_title' => 'JUNPUBLISHED']) - ->addState(ContentComponent::CONDITION_ARCHIVED, '', 'archive', 'COM_CONTENT_CHANGE_STAGE', ['tip_title' => 'JARCHIVED']) - ->addState(ContentComponent::CONDITION_TRASHED, '', 'trash', 'COM_CONTENT_CHANGE_STAGE', ['tip_title' => 'JTRASHED']) + ->addState(ContentComponent::CONDITION_PUBLISHED, '', 'publish', Text::_('COM_CONTENT_CHANGE_STAGE'), ['tip_title' => Text::_('JPUBLISHED')]) + ->addState(ContentComponent::CONDITION_UNPUBLISHED, '', 'unpublish', Text::_('COM_CONTENT_CHANGE_STAGE'), ['tip_title' => Text::_('JUNPUBLISHED')]) + ->addState(ContentComponent::CONDITION_ARCHIVED, '', 'archive', Text::_('COM_CONTENT_CHANGE_STAGE'), ['tip_title' => Text::_('JARCHIVED')]) + ->addState(ContentComponent::CONDITION_TRASHED, '', 'trash', Text::_('COM_CONTENT_CHANGE_STAGE'), ['tip_title' => Text::_('JTRASHED')]) ->setLayout('joomla.button.transition-button') ->render($item->stage_condition, $i, $options, $item->publish_up, $item->publish_down); ?> diff --git a/administrator/components/com_content/tmpl/featured/default.php b/administrator/components/com_content/tmpl/featured/default.php index 4b443b3f7d633..20c4cbb834bdd 100644 --- a/administrator/components/com_content/tmpl/featured/default.php +++ b/administrator/components/com_content/tmpl/featured/default.php @@ -233,10 +233,10 @@ ->removeState(1) ->removeState(2) ->removeState(-2) - ->addState(ContentComponent::CONDITION_PUBLISHED, '', 'publish', 'COM_CONTENT_CHANGE_STAGE', ['tip_title' => 'JPUBLISHED']) - ->addState(ContentComponent::CONDITION_UNPUBLISHED, '', 'unpublish', 'COM_CONTENT_CHANGE_STAGE', ['tip_title' => 'JUNPUBLISHED']) - ->addState(ContentComponent::CONDITION_ARCHIVED, '', 'archive', 'COM_CONTENT_CHANGE_STAGE', ['tip_title' => 'JARCHIVED']) - ->addState(ContentComponent::CONDITION_TRASHED, '', 'trash', 'COM_CONTENT_CHANGE_STAGE', ['tip_title' => 'JTRASHED']) + ->addState(ContentComponent::CONDITION_PUBLISHED, '', 'publish', Text::_('COM_CONTENT_CHANGE_STAGE'), ['tip_title' => Text::_('JPUBLISHED')]) + ->addState(ContentComponent::CONDITION_UNPUBLISHED, '', 'unpublish', Text::_('COM_CONTENT_CHANGE_STAGE'), ['tip_title' => Text::_('JUNPUBLISHED')]) + ->addState(ContentComponent::CONDITION_ARCHIVED, '', 'archive', Text::_('COM_CONTENT_CHANGE_STAGE'), ['tip_title' => Text::_('JARCHIVED')]) + ->addState(ContentComponent::CONDITION_TRASHED, '', 'trash', Text::_('COM_CONTENT_CHANGE_STAGE'), ['tip_title' => Text::_('JTRASHED')]) ->setLayout('joomla.button.transition-button') ->render($item->stage_condition, $i, $options, $item->publish_up, $item->publish_down); ?> diff --git a/administrator/components/com_menus/Controller/ItemController.php b/administrator/components/com_menus/Controller/ItemController.php index 99a1883b73b59..6851616ddfcff 100644 --- a/administrator/components/com_menus/Controller/ItemController.php +++ b/administrator/components/com_menus/Controller/ItemController.php @@ -401,7 +401,6 @@ public function save($key = null, $urlVar = null) } $data['link'] = 'index.php?' . urldecode(http_build_query($args, '', '&')); - unset($data['request']); } // Check for validation errors. diff --git a/administrator/components/com_menus/Controller/MenuController.php b/administrator/components/com_menus/Controller/MenuController.php index 984bcc1b4ee28..2004a2f8690c5 100644 --- a/administrator/components/com_menus/Controller/MenuController.php +++ b/administrator/components/com_menus/Controller/MenuController.php @@ -11,6 +11,7 @@ defined('_JEXEC') or die; +use Joomla\CMS\Filter\InputFilter; use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\Controller\FormController; use Joomla\CMS\Router\Route; @@ -70,6 +71,8 @@ public function save($key = null, $urlVar = null) return false; } + $data['menutype'] = InputFilter::getInstance()->clean($data['menutype'], 'TRIM'); + // Populate the row id from the session. $data['id'] = $recordId; diff --git a/administrator/components/com_menus/Controller/MenusController.php b/administrator/components/com_menus/Controller/MenusController.php index bfcbbb7229b3a..a773508c5380b 100644 --- a/administrator/components/com_menus/Controller/MenusController.php +++ b/administrator/components/com_menus/Controller/MenusController.php @@ -198,10 +198,6 @@ public function resync() return; } - // Declare variables before binding. - $componentId = 0; - $itemId = 0; - $query = $db->getQuery(true) ->update($db->quoteName('#__menu')) ->set($db->quoteName('component_id') . ' = :componentId') diff --git a/administrator/components/com_menus/Model/ItemModel.php b/administrator/components/com_menus/Model/ItemModel.php index 56a02403f1980..46245e0077cdf 100644 --- a/administrator/components/com_menus/Model/ItemModel.php +++ b/administrator/components/com_menus/Model/ItemModel.php @@ -1381,10 +1381,6 @@ public function rebuild() return false; } - // Declare paramaters before binding. - $id = 0; - $params = ''; - $query = $db->getQuery(true) ->update($db->quoteName('#__menu')) ->set($db->quoteName('params') . ' = :params') diff --git a/administrator/components/com_menus/Model/MenusModel.php b/administrator/components/com_menus/Model/MenusModel.php index d056e6dfb4b05..b52d5e2043a88 100644 --- a/administrator/components/com_menus/Model/MenusModel.php +++ b/administrator/components/com_menus/Model/MenusModel.php @@ -80,7 +80,6 @@ public function getItems() $db = $this->getDbo(); $menuTypes = array_column((array) $items, 'menutype'); - // Get the published menu counts. $query = $db->getQuery(true) ->select( [ @@ -89,14 +88,17 @@ public function getItems() ] ) ->from($db->quoteName('#__menu', 'm')) - ->where($db->quoteName('m.published') . ' = 1') + ->where($db->quoteName('m.published') . ' = :published') ->whereIn($db->quoteName('m.menutype'), $menuTypes, ParameterType::STRING) - ->group($db->quoteName('m.menutype')); + ->group($db->quoteName('m.menutype')) + ->bind(':published', $published, ParameterType::INTEGER); $db->setQuery($query); + // Get the published menu counts. try { + $published = 1; $countPublished = $db->loadAssocList('menutype', 'count_published'); } catch (\RuntimeException $e) @@ -107,14 +109,9 @@ public function getItems() } // Get the unpublished menu counts. - $query->clear('where') - ->bind() - ->where($db->quoteName('m.published') . ' = 0') - ->whereIn($db->quoteName('m.menutype'), $menuTypes, ParameterType::STRING); - $db->setQuery($query); - try { + $published = 0; $countUnpublished = $db->loadAssocList('menutype', 'count_published'); } catch (\RuntimeException $e) @@ -125,14 +122,9 @@ public function getItems() } // Get the trashed menu counts. - $query->clear('where') - ->bind() - ->where($db->quoteName('m.published') . ' = -2') - ->whereIn($db->quoteName('m.menutype'), $menuTypes, ParameterType::STRING); - $db->setQuery($query); - try { + $published = -2; $countTrashed = $db->loadAssocList('menutype', 'count_published'); } catch (\RuntimeException $e) diff --git a/composer.lock b/composer.lock index 5f36155552b34..3a1405826423c 100644 --- a/composer.lock +++ b/composer.lock @@ -758,18 +758,17 @@ "source": { "type": "git", "url": "https://github.com/joomla-framework/database.git", - "reference": "c5cd726fb6137dede3a0f141df4271df310a9568" + "reference": "9013e0e238459fac2456279c7ff48aabf5233aaa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/database/zipball/c5cd726fb6137dede3a0f141df4271df310a9568", - "reference": "c5cd726fb6137dede3a0f141df4271df310a9568", + "url": "https://api.github.com/repos/joomla-framework/database/zipball/9013e0e238459fac2456279c7ff48aabf5233aaa", + "reference": "9013e0e238459fac2456279c7ff48aabf5233aaa", "shasum": "" }, "require": { "joomla/event": "~2.0", - "php": "~7.2", - "psr/log": "~1.0" + "php": "~7.2" }, "require-dev": { "joomla/archive": "~2.0", @@ -778,9 +777,10 @@ "joomla/di": "~1.0|~2.0", "joomla/filesystem": "~1.3|~2.0", "joomla/registry": "^1.4.5|~2.0", - "joomla/test": "~1.2", - "phpunit/dbunit": "~3.0", - "phpunit/phpunit": "~6.3" + "joomla/test": "~2.0", + "phpunit/phpunit": "~8.2", + "psr/log": "~1.1", + "symfony/phpunit-bridge": "~4.3" }, "suggest": { "ext-mysqli": "To connect to a MySQL database via MySQLi", @@ -791,7 +791,8 @@ "joomla/console": "To use the ExportCommand and ImportCommand classes, install joomla/console", "joomla/di": "To use the Database ServiceProviderInterface objects, install joomla/di.", "joomla/filesystem": "To use the ExportCommand and ImportCommand classes, install joomla/filesystem", - "joomla/registry": "To use the Database ServiceProviderInterface objects, install joomla/registry." + "joomla/registry": "To use the Database ServiceProviderInterface objects, install joomla/registry.", + "psr/log": "To use the LoggingMonitor, install psr/log." }, "type": "joomla-package", "extra": { @@ -815,7 +816,7 @@ "framework", "joomla" ], - "time": "2019-09-10T10:17:45+00:00" + "time": "2019-11-11T04:05:51+00:00" }, { "name": "joomla/di", @@ -3625,9 +3626,9 @@ "authors": [ { "name": "Franck Nijhof", - "role": "Developer / IT Manager", "email": "franck.nijhof@dealerdirect.com", - "homepage": "http://www.frenck.nl" + "homepage": "http://www.frenck.nl", + "role": "Developer / IT Manager" } ], "description": "PHP_CodeSniffer Standards Composer Installer Plugin", @@ -4728,12 +4729,12 @@ "source": { "type": "git", "url": "https://github.com/joomla-projects/joomla-browser.git", - "reference": "cba1beaf31316bc39fe826df202d5dcc5f59868c" + "reference": "08dc4fb70c005db326122bb525aecc0d002f6fac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-projects/joomla-browser/zipball/cba1beaf31316bc39fe826df202d5dcc5f59868c", - "reference": "cba1beaf31316bc39fe826df202d5dcc5f59868c", + "url": "https://api.github.com/repos/joomla-projects/joomla-browser/zipball/08dc4fb70c005db326122bb525aecc0d002f6fac", + "reference": "08dc4fb70c005db326122bb525aecc0d002f6fac", "shasum": "" }, "require": { @@ -4771,7 +4772,7 @@ "acceptance testing", "joomla" ], - "time": "2019-10-13T08:59:39+00:00" + "time": "2019-11-18T17:28:42+00:00" }, { "name": "joomla/cms-coding-standards", @@ -5010,18 +5011,18 @@ "authors": [ { "name": "Arne Blankerts", - "role": "Developer", - "email": "arne@blankerts.de" + "email": "arne@blankerts.de", + "role": "Developer" }, { "name": "Sebastian Heuer", - "role": "Developer", - "email": "sebastian@phpeople.de" + "email": "sebastian@phpeople.de", + "role": "Developer" }, { "name": "Sebastian Bergmann", - "role": "Developer", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "Developer" } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", @@ -5441,8 +5442,8 @@ "authors": [ { "name": "Sebastian Bergmann", - "role": "lead", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], "description": "FilterIterator implementation that filters files based on a list of suffixes.", @@ -5483,8 +5484,8 @@ "authors": [ { "name": "Sebastian Bergmann", - "role": "lead", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], "description": "Simple template engine.", @@ -5532,8 +5533,8 @@ "authors": [ { "name": "Sebastian Bergmann", - "role": "lead", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], "description": "Utility class for timing", @@ -6279,8 +6280,8 @@ "authors": [ { "name": "Sebastian Bergmann", - "role": "lead", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], "description": "Collection of value objects that represent the types of the PHP type system", @@ -6322,8 +6323,8 @@ "authors": [ { "name": "Sebastian Bergmann", - "role": "lead", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", @@ -6972,8 +6973,8 @@ "authors": [ { "name": "Arne Blankerts", - "role": "Developer", - "email": "arne@blankerts.de" + "email": "arne@blankerts.de", + "role": "Developer" } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", diff --git a/installation/tmpl/remove/default.php b/installation/tmpl/remove/default.php index c31d51f9db8b1..19fd860b8ba79 100644 --- a/installation/tmpl/remove/default.php +++ b/installation/tmpl/remove/default.php @@ -187,10 +187,6 @@ class="btn btn-primary"

-
- - -
diff --git a/layouts/joomla/button/action-button.php b/layouts/joomla/button/action-button.php index 9bc755b0cbbe8..db541d5c08076 100644 --- a/layouts/joomla/button/action-button.php +++ b/layouts/joomla/button/action-button.php @@ -8,7 +8,6 @@ */ use Joomla\CMS\HTML\HTMLHelper; -use Joomla\CMS\Language\Text; HTMLHelper::_('bootstrap.popover'); @@ -28,8 +27,8 @@ $tipTitle = $options['tip_title']; ?> diff --git a/layouts/joomla/button/transition-button.php b/layouts/joomla/button/transition-button.php index db038fa132601..e1df159f2fd53 100644 --- a/layouts/joomla/button/transition-button.php +++ b/layouts/joomla/button/transition-button.php @@ -8,7 +8,6 @@ */ use Joomla\CMS\HTML\HTMLHelper; -use Joomla\CMS\Language\Text; HTMLHelper::_('bootstrap.popover'); @@ -31,8 +30,8 @@ @@ -43,7 +42,7 @@ href="javascript://" - title="" + title="" data-content="" data-placement="top" onclick="Joomla.toggleAllNextElements(this, 'd-none')" diff --git a/libraries/src/Button/FeaturedButton.php b/libraries/src/Button/FeaturedButton.php index 7dca7eda42fac..79abdc025c50b 100644 --- a/libraries/src/Button/FeaturedButton.php +++ b/libraries/src/Button/FeaturedButton.php @@ -29,8 +29,8 @@ class FeaturedButton extends ActionButton */ protected function preprocess() { - $this->addState(0, 'articles.featured', 'unfeatured', 'COM_CONTENT_UNFEATURED', ['tip_title' => 'JGLOBAL_TOGGLE_FEATURED']); - $this->addState(1, 'articles.unfeatured', 'featured', 'COM_CONTENT_FEATURED', ['tip_title' => 'JGLOBAL_TOGGLE_FEATURED']); + $this->addState(0, 'articles.featured', 'unfeatured', Text::_('COM_CONTENT_UNFEATURED'), ['tip_title' => Text::_('JGLOBAL_TOGGLE_FEATURED')]); + $this->addState(1, 'articles.unfeatured', 'featured', Text::_('COM_CONTENT_FEATURED'), ['tip_title' => Text::_('JGLOBAL_TOGGLE_FEATURED')]); } /** @@ -88,17 +88,17 @@ public function render(string $value = null, string $row = null, array $options $default['title'] = $tip; - $options['tip_title'] = 'JLIB_HTML_FEATURED_ITEM'; + $options['tip_title'] = Text::_('JLIB_HTML_FEATURED_ITEM'); if ($featuredUp && $nowDate < $featuredUp->toUnix()) { - $options['tip_title'] = 'JLIB_HTML_FEATURED_PENDING_ITEM'; + $options['tip_title'] = Text::_('JLIB_HTML_FEATURED_PENDING_ITEM'); $default['icon'] = 'pending'; } if ($featuredDown && $nowDate > $featuredDown->toUnix()) { - $options['tip_title'] = 'JLIB_HTML_FEATURED_EXPIRED_ITEM'; + $options['tip_title'] = Text::_('JLIB_HTML_FEATURED_EXPIRED_ITEM'); $default['icon'] = 'expired'; } } diff --git a/libraries/src/Button/PublishedButton.php b/libraries/src/Button/PublishedButton.php index 849e70ace9c3a..3fce7670ad097 100644 --- a/libraries/src/Button/PublishedButton.php +++ b/libraries/src/Button/PublishedButton.php @@ -29,10 +29,10 @@ class PublishedButton extends ActionButton */ protected function preprocess() { - $this->addState(1, 'unpublish', 'publish', 'JLIB_HTML_UNPUBLISH_ITEM', ['tip_title' => 'JPUBLISHED']); - $this->addState(0, 'publish', 'unpublish', 'JLIB_HTML_PUBLISH_ITEM', ['tip_title' => 'JUNPUBLISHED']); - $this->addState(2, 'unpublish', 'archive', 'JLIB_HTML_UNPUBLISH_ITEM', ['tip_title' => 'JARCHIVED']); - $this->addState(-2, 'publish', 'trash', 'JLIB_HTML_PUBLISH_ITEM', ['tip_title' => 'JTRASHED']); + $this->addState(1, 'unpublish', 'publish', Text::_('JLIB_HTML_UNPUBLISH_ITEM'), ['tip_title' => Text::_('JPUBLISHED')]); + $this->addState(0, 'publish', 'unpublish', Text::_('JLIB_HTML_PUBLISH_ITEM'), ['tip_title' => Text::_('JUNPUBLISHED')]); + $this->addState(2, 'unpublish', 'archive', Text::_('JLIB_HTML_UNPUBLISH_ITEM'), ['tip_title' => Text::_('JARCHIVED')]); + $this->addState(-2, 'publish', 'trash', Text::_('JLIB_HTML_PUBLISH_ITEM'), ['tip_title' => Text::_('JTRASHED')]); } /** @@ -84,17 +84,17 @@ public function render(string $value = null, string $row = null, array $options $default['title'] = $tip; - $options['tip_title'] = 'JLIB_HTML_PUBLISHED_ITEM'; + $options['tip_title'] = Text::_('JLIB_HTML_PUBLISHED_ITEM'); if ($publishUp && $nowDate < $publishUp->toUnix()) { - $options['tip_title'] = 'JLIB_HTML_PUBLISHED_PENDING_ITEM'; + $options['tip_title'] = Text::_('JLIB_HTML_PUBLISHED_PENDING_ITEM'); $default['icon'] = 'pending'; } if ($publishDown && $nowDate > $publishDown->toUnix()) { - $options['tip_title'] = 'JLIB_HTML_PUBLISHED_EXPIRED_ITEM'; + $options['tip_title'] = Text::_('JLIB_HTML_PUBLISHED_EXPIRED_ITEM'); $default['icon'] = 'expired'; } } diff --git a/libraries/src/Installer/Adapter/LanguageAdapter.php b/libraries/src/Installer/Adapter/LanguageAdapter.php index 8b2263b17226a..f298dd91a785a 100644 --- a/libraries/src/Installer/Adapter/LanguageAdapter.php +++ b/libraries/src/Installer/Adapter/LanguageAdapter.php @@ -124,10 +124,6 @@ protected function finaliseUninstall(): bool $count = 0; - // Declare parameters before binding. - $userId = 0; - $registry = ''; - // Prepare the query. $query = $db->getQuery(true) ->update($db->quoteName('#__users'))