From 989c71976e97975a11387715bc147beb54e86b65 Mon Sep 17 00:00:00 2001 From: Benjamin Trenkle Date: Sat, 15 Jan 2022 02:02:19 +0100 Subject: [PATCH] Update 4.1 from 4.0 (#36690) * [4.0] Backup message (#36487) Many users who use their hosts backup facility and this is typically __only__ for files This update reminds them to backup the database as well * Remove reference & in usort callback function (#36503) * Update paragonie sodium_compat to 1.17.0 (#36491) Co-authored-by: Benjamin Trenkle * [3.10] Finder plugins modify component params registry / Backport #35855 (#36141) * Backport #35855 to 3.10 * one space to much * [4.0] xml code style (#36532) Fixes a few spaces to tabs issues * [4.0] media manager breadcrumbs (#36154) * [4.0] media manager breadcrumbs The RTL specific css was wrong as can be seen in the before screenshot This PR removes the RTL specific css (should have been scss) and updates the scss to use logical properties instead. This PR also removes an unused class `breadcrumb-item`. To test RTL you will need to install arabic or persian. and dont forget to npm ci There is no visible change in LTR and the RTL changes are as shown below ## Before LTR ## Before RTL ## After LTR ## After RTL * revert * [4.0] RTL: Correcting Admin login 2factor and feedback hints (#36024) This is a replacement to the merged PR #32104 It does exactly the same thing but by using css logical properties we avoid the need to maintain both an LTR and an RTL version[4.0] There is no visual change * [4.0] Category list (#36536) Remove extra div that is not needed * [4.0] Make routing work in console applications (#36332) * Update list-fancy-select.php (#36543) replace tab with space code review * [4.0] archive icon (#36263) All the state icons are grey so that the published icon, which is green, stands out visually. The archived icon however was black. This PR changes that icon to grey. ### Before ### After * [4.0] Banner Client tips (#36262) * [4.0] Banner Client tips Adds a tooltip to the banner client numbers so that they appear the same as category numbers. Also corrects the class on the trashed number so that it has the correct colour To test Create one banner client Create a banner for the client in each of the published states * Update administrator/components/com_banners/tmpl/clients/default.php oops Co-authored-by: Quy Co-authored-by: Quy * Fix article creation from frontend (#36542) * [4.0] Handle when toggle icon is not available (#36329) * Handle when toggle icon is not available * cs * Take workflow extension into account when setting a default (#36527) * Fix uploadlimits checks (#36023) * Make edit_lock layout reusable for other extensions (#35112) * Allow to set a value for SubformField (#35921) * [4.0] Fix example in cleanImageURL docblock (#36554) * Fix Codemirror behind tabs (#36140) * Fix Codemirror behind tabs * jscs * Remove dependency on Factory in AdminController * [4.0] Ensure path contains api in the router (#36315) * [4.0] Check model is set before calling its methods (#36378) * Check model is set before calling its methods * Update OverridesController.php * Category edit form should use return url (#36560) Currently the article edit form respects return URLs; the category edit form does not. Adding it here makes for a more consistent editing experience. * [4.0] Sample Data plugin images (#36237) Updates the plugin to use the new image data used in lazy loading etc. This avoids confusion for users who see different source code for their created articles when compared to the same data plugins To test. Just make sure the sample data still installs and works as expected * [4.0] If the Mail Template was not found in the db, return false (#36489) * [4.0] Code Style (#36564) * Use an absolute path in image list field (#36063) * Correct Cache setWorkarounds to take account of multiple script or style declarations being used that mean that we have an array of scripts or stylesheets to be cached and not just a string (#36068) Cache setWorkarounds returns an array not a string * [3] privacy request by logged in user only (#35470) * privacy request logged in only * privacy request logged in only * privacy request logged in only * privacy request logged in only * privacy request logged in only * Update components/com_privacy/controller.php Co-authored-by: Quy Co-authored-by: Quy * Feature - Add always count option to 404 redirects (#34640) * Feature - Add always count option to 404 redirects * Add missiing space for code sniffer * Return line for if statement * Update plugins/system/redirect/redirect.php Co-authored-by: Quy * Alpha Ordering - Change Constant too. * update constant * Update en-GB.plg_system_redirect.ini * remove trailing whtiespace * Remove Added Language Strings * Update plugins/system/redirect/redirect.php Co-authored-by: Phil E. Taylor * Update redirect.xml * Update redirect.php * Update plugins/system/redirect/redirect.php Co-authored-by: Quy * Update plugins/system/redirect/redirect.php Co-authored-by: Benjamin Trenkle * Update plugins/system/redirect/redirect.php Co-authored-by: Quy Co-authored-by: Phil E. Taylor Co-authored-by: Tobias Zulauf Co-authored-by: Benjamin Trenkle * php8 deprecation str_replace Passing null to param (#36400) * add php 8.1 to the version array (#36577) * Add function parameters for callbacks. Fixes #36010 * PHP 8.1 deprecation fixes (#36306) * Backport some deprecation fixes from the J4 branch * Ensure htmlspecialchars is passed a string * Ignore PHPCS errors Co-authored-by: Tobias Zulauf * Update simplepie to 1.3.3 (#36358) * Update simplepie to 1.3.2 & phar-stream-wrapper to 2.2.2 * update to simplepie 1.3.3 to fix the version * [3.10] Dont show the pre upgrade checker when the upgrade is not supported (#36312) * [3.10] Fix Progressive caching to cache modules per custom menu assignment (#36324) * Fix progressive caching * Update libraries/src/Document/HtmlDocument.php Co-authored-by: Phil E. Taylor * cast int * Update libraries/src/Document/HtmlDocument.php * Update libraries/src/Document/HtmlDocument.php * Update libraries/src/Document/HtmlDocument.php * Update libraries/src/Document/HtmlDocument.php * Update libraries/src/Document/HtmlDocument.php * Update libraries/src/Document/HtmlDocument.php Co-authored-by: Phil E. Taylor Co-authored-by: Tobias Zulauf * Bump registry to 1.6.4 (#36611) * [4.0] Load the subform data correctly (#36598) * Load the subform data correctly * correct order * don't remove (#36602) * [4.0] Function to unregister a provider in media manager (#36594) * [4.0] Latests/Popular Admin modules permissions (#36559) * Allow our phpcode sniffer composer plugin to run * PHP 8.1 fixes ported from #36355 * Fix codestyle. Thanks @brianteeman * Improve security and type checking of the installer task * Ensure the rule modifier is a string by default * Ensure cpanel dashboard name is type safe (PHP 8.1) * Fix mistake in param ordering * Fix PHP 8.1 notice when creating an article * Fix URL Field giving deprecated notices in PHP 8.1 * [4.0] Fix template preview (#36268) * Fix template preview * Fix template preview * Fix Progressive caching to cache modules per custom menu assignment (#36193) * Cross Origin for Google Fonts (#36592) * Update Tobscure library to be PHP 8.1 compat * Tag 4.0.6 RC1 * Reset to dev * Translation Update (#36356) * [4.0] Fix images (#35780) * [4.0] Joomla Update Silent fails (#36492) * [4.0] Joomla Update Silent fails I am not 100% certain that this is the best approach to this. @nikosdion @wilsonge please advise ## The Problem As reported in # if during an update a sql query fails then the updater quits the sql part of the update process and moves on. The joomla_update log gives no indication that there has been a problem etc. ## Proposed Partial Solution Adds a Start SQL and End SQL to the logs If there is an error in the sql then that is written to the logs as well AND it now says End SQL incomplete ### Testing For the testing we will be using the "Update your site by manually uploading the update package." and to make things quick I have prepared an empty update that you should download and use. ### Before Test 1 Update your install and then check the `administrator\logs\joomla_update.php` It should look like ### Before Test 2 Update your database to change the value in the #__schemas table so that the version_id is 4.0.0-2018-5-15 Update your install and then check the `administrator\logs\joomla_update.php` It should look like ### Before Test 3 Update your database to change the value in the #__schemas table so that the version_id is 4.0.3 Update your install and then check the `administrator\logs\joomla_update.php` It should look like ### After - Test 1 Update your database to change the value in the #__schemas table so that the version_id is 4.0.4 Update your install and then check the `administrator\logs\joomla_update.php` It should look like ### After - Test 2 Update your database to change the value in the #__schemas table so that the version_id is 4.0.0-2018-5-15 Update your install and then check the `administrator\logs\joomla_update.php` It should look like ### Before Test 3 Update your database to change the value in the #__schemas table so that the version_id is 4.0.3 Update your install and then check the `administrator\logs\joomla_update.php` It should look like * Fix null being passed to DateTime::__construct causing PHP 8.1 deprecation error * Missing param default to fix uploads in PHP 8.1 * Tag 4.0.6 RC2 * Reset to dev * Missing param default to fix renaming media in PHP 8.1 * Stub generator now handles deprecated namespaced classes (#35144) * Fix error in article model (#36617) * Fix code comment * Temporary remove phpnext tests (#36624) * Sign drone.yml * Translation Update (#36645) * Update extract.php (#36635) * Update composer.lock Co-authored-by: Brian Teeman Co-authored-by: Harald Leithner Co-authored-by: Tobias Zulauf Co-authored-by: Allon Moritz Co-authored-by: Quy Co-authored-by: Nicola Galgano Co-authored-by: Roland Dalmulder Co-authored-by: Tuan Pham Ngoc Co-authored-by: Fedir Zinchuk Co-authored-by: wilsonge Co-authored-by: Phil E. Taylor Co-authored-by: Crystal Dionysopoulos <9141288+crystalenka@users.noreply.github.com> Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com> Co-authored-by: Geraint Edwards Co-authored-by: Tony Partridge Co-authored-by: frostmakk Co-authored-by: Dimitris Grammatikogiannis Co-authored-by: joomla-translation-bot <87496051+joomla-translation-bot@users.noreply.github.com> Co-authored-by: Richard Fath Co-authored-by: Sveinung Larsen --- .drone.yml | 117 ++++++++++-------- .../com_content/src/Model/ArticleModel.php | 2 +- .../com_cpanel/src/View/Cpanel/HtmlView.php | 2 +- .../components/com_joomlaupdate/extract.php | 2 +- .../src/View/Joomlaupdate/HtmlView.php | 6 + .../src/Provider/ProviderManager.php | 26 ++++ .../language/en-GB/com_joomlaupdate.ini | 2 +- administrator/language/en-GB/lib_joomla.ini | 4 + .../mod_latest/src/Helper/LatestHelper.php | 3 +- .../mod_popular/src/Helper/PopularHelper.php | 3 +- .../src/Controller/CategoriesController.php | 4 +- build/stubGenerator.php | 29 ++++- .../tmpl/category/default_items.php | 10 +- .../com_contact/tmpl/contact/default.php | 13 +- components/com_content/tmpl/category/blog.php | 21 ++-- .../com_newsfeeds/tmpl/category/default.php | 12 +- .../com_newsfeeds/tmpl/newsfeed/default.php | 56 +++++---- components/com_privacy/forms/confirm.xml | 10 -- components/com_privacy/forms/request.xml | 10 -- .../src/Controller/DisplayController.php | 9 +- .../com_privacy/src/Model/ConfirmModel.php | 6 +- .../com_privacy/src/Model/RequestModel.php | 11 +- composer.json | 16 ++- composer.lock | 42 ++++--- installation/language/ar-AA/langmetadata.xml | 4 +- installation/language/cs-CZ/langmetadata.xml | 4 +- installation/language/cy-GB/langmetadata.xml | 4 +- installation/language/da-DK/langmetadata.xml | 4 +- installation/language/el-GR/langmetadata.xml | 4 +- installation/language/en-AU/langmetadata.xml | 4 +- installation/language/en-US/langmetadata.xml | 4 +- installation/language/es-ES/langmetadata.xml | 4 +- installation/language/et-EE/langmetadata.xml | 4 +- installation/language/eu-ES/langmetadata.xml | 4 +- installation/language/fa-IR/langmetadata.xml | 4 +- installation/language/fr-FR/langmetadata.xml | 4 +- installation/language/hu-HU/langmetadata.xml | 4 +- installation/language/it-IT/langmetadata.xml | 4 +- installation/language/ja-JP/langmetadata.xml | 4 +- installation/language/ka-GE/langmetadata.xml | 4 +- installation/language/lv-LV/langmetadata.xml | 4 +- installation/language/nl-BE/langmetadata.xml | 4 +- installation/language/nl-NL/langmetadata.xml | 4 +- installation/language/pl-PL/langmetadata.xml | 4 +- installation/language/pt-BR/langmetadata.xml | 4 +- installation/language/pt-PT/langmetadata.xml | 4 +- installation/language/ro-RO/langmetadata.xml | 4 +- installation/language/ru-RU/langmetadata.xml | 4 +- installation/language/sk-SK/langmetadata.xml | 4 +- installation/language/sl-SI/langmetadata.xml | 4 +- installation/language/sv-SE/langmetadata.xml | 4 +- installation/language/ta-IN/joomla.ini | 2 +- installation/language/ta-IN/langmetadata.xml | 4 +- installation/language/th-TH/langmetadata.xml | 4 +- installation/language/tr-TR/langmetadata.xml | 4 +- installation/language/uk-UA/langmetadata.xml | 4 +- installation/language/zh-CN/langmetadata.xml | 4 +- installation/language/zh-TW/langmetadata.xml | 4 +- .../Application/InstallationApplication.php | 4 +- language/en-GB/lib_joomla.ini | 4 + layouts/joomla/content/category_default.php | 9 +- layouts/joomla/content/full_image.php | 30 ++--- layouts/joomla/content/intro_image.php | 38 ++---- layouts/joomla/form/field/url.php | 8 +- layouts/joomla/html/image.php | 49 ++++++++ .../Application/AdministratorApplication.php | 2 +- libraries/src/Application/CMSApplication.php | 2 +- .../src/Application/ConsoleApplication.php | 2 +- libraries/src/Document/HtmlDocument.php | 18 ++- .../src/Form/Field/ComponentlayoutField.php | 2 +- libraries/src/Form/Field/MediaField.php | 2 +- .../src/Form/Field/ModulelayoutField.php | 2 +- libraries/src/Form/Field/SubformField.php | 2 +- libraries/src/Form/FormRule.php | 2 +- libraries/src/HTML/HTMLHelper.php | 14 +-- libraries/src/Helper/MediaHelper.php | 4 +- libraries/src/Helper/ModuleHelper.php | 26 ++-- libraries/src/Installer/Installer.php | 23 +++- .../src/MVC/Controller/BaseController.php | 2 +- libraries/src/Service/Provider/Database.php | 6 +- libraries/src/String/PunycodeHelper.php | 2 +- libraries/src/Table/User.php | 5 + libraries/src/User/UserHelper.php | 10 +- .../src/Helper/ArticlesCategoryHelper.php | 2 +- modules/mod_articles_news/tmpl/_item.php | 8 +- .../phpversioncheck/phpversioncheck.php | 4 + plugins/system/httpheaders/httpheaders.php | 10 +- plugins/system/redirect/redirect.php | 12 ++ templates/cassiopeia/component.php | 8 +- templates/cassiopeia/error.php | 8 +- templates/cassiopeia/index.php | 8 +- templates/cassiopeia/offline.php | 8 +- .../components/com_media/MediaListCest.php | 10 +- .../api/com_banners/BannerCest.php | 2 +- 94 files changed, 551 insertions(+), 347 deletions(-) create mode 100644 layouts/joomla/html/image.php diff --git a/.drone.yml b/.drone.yml index 8b15c95c4d2f0..076b5064f8977 100644 --- a/.drone.yml +++ b/.drone.yml @@ -182,19 +182,20 @@ steps: commands: - bash tests/Codeception/drone-api-run.sh "$(pwd)" mysql - - name: phpnext-api-mysql - depends_on: - - phpmin-api-mysql - image: joomlaprojects/docker-images:systemtests8.2 - failure: ignore - environment: - JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 - commands: - - bash tests/Codeception/drone-api-run.sh "$(pwd)" mysqlphpnext +# - name: phpnext-api-mysql +# depends_on: +# - phpmin-api-mysql +# image: joomlaprojects/docker-images:systemtests8.2 +# failure: ignore +# environment: +# JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 +# commands: +# - bash tests/Codeception/drone-api-run.sh "$(pwd)" mysqlphpnext - name: phpmin-api-postgres depends_on: - - phpnext-api-mysql + # - phpnext-api-mysql + - phpmin-api-mysql image: joomlaprojects/docker-images:systemtests failure: ignore environment: @@ -202,19 +203,20 @@ steps: commands: - bash tests/Codeception/drone-api-run.sh "$(pwd)" postgres - - name: phpnext-api-postgres - depends_on: - - phpmin-api-postgres - image: joomlaprojects/docker-images:systemtests8.2 - failure: ignore - environment: - JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 - commands: - - bash tests/Codeception/drone-api-run.sh "$(pwd)" postgresphpnext +# - name: phpnext-api-postgres +# depends_on: +# - phpmin-api-postgres +# image: joomlaprojects/docker-images:systemtests8.2 +# failure: ignore +# environment: +# JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 +# commands: +# - bash tests/Codeception/drone-api-run.sh "$(pwd)" postgresphpnext - name: phpmax-api-postgres depends_on: - - phpnext-api-postgres +# - phpnext-api-postgres + - phpmin-api-postgres image: joomlaprojects/docker-images:systemtests8.1 failure: ignore environment: @@ -233,17 +235,20 @@ steps: commands: - bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql - - name: phpnext-system-mysql - depends_on: [ phpmin-system-mysql ] - image: joomlaprojects/docker-images:systemtests8.2 - failure: ignore - environment: - JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 - commands: - - bash tests/Codeception/drone-system-run.sh "$(pwd)" mysqlphpnext +# - name: phpnext-system-mysql +# depends_on: +# - phpmin-system-mysql +# image: joomlaprojects/docker-images:systemtests8.2 +# failure: ignore +# environment: +# JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 +# commands: +# - bash tests/Codeception/drone-system-run.sh "$(pwd)" mysqlphpnext - name: phpmax-system-mysql - depends_on: [ phpnext-system-mysql ] + depends_on: +# - phpnext-system-mysql + - phpmin-system-mysql image: joomlaprojects/docker-images:systemtests8.1 failure: ignore environment: @@ -251,17 +256,20 @@ steps: commands: - bash tests/Codeception/drone-system-run.sh "$(pwd)" mysqlphpmax - - name: phpnext-system-mysql8 - depends_on: [ phpmax-system-mysql ] - image: joomlaprojects/docker-images:systemtests8.2 - failure: ignore - environment: - JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 - commands: - - bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql8phpnext +# - name: phpnext-system-mysql8 +# depends_on: +# - phpmax-system-mysql +# image: joomlaprojects/docker-images:systemtests8.2 +# failure: ignore +# environment: +# JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 +# commands: +# - bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql8phpnext - name: phpmax-system-mysql8 - depends_on: [ phpnext-system-mysql ] + depends_on: +# - phpnext-system-mysql + - phpmax-system-mysql image: joomlaprojects/docker-images:systemtests8.1 failure: ignore environment: @@ -269,17 +277,20 @@ steps: commands: - bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql8phpmax - - name: phpnext-system-postgres - depends_on: [ phpmax-system-mysql8 ] - image: joomlaprojects/docker-images:systemtests8.2 - failure: ignore - environment: - JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 - commands: - - bash tests/Codeception/drone-system-run.sh "$(pwd)" postgresphpnext +# - name: phpnext-system-postgres +# depends_on: +# - phpmax-system-mysql8 +# image: joomlaprojects/docker-images:systemtests8.2 +# failure: ignore +# environment: +# JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 +# commands: +# - bash tests/Codeception/drone-system-run.sh "$(pwd)" postgresphpnext - name: phpmax-system-postgres - depends_on: [ phpnext-system-mysql8 ] + depends_on: +# - phpnext-system-mysql8 + - phpmax-system-mysql8 image: joomlaprojects/docker-images:systemtests8.1 failure: ignore environment: @@ -306,17 +317,17 @@ steps: - name: artifacts-system-tests image: cschlosser/drone-ftps depends_on: - - phpnext-system-mysql - - phpnext-system-mysql8 - - phpnext-system-postgres +# - phpnext-system-mysql +# - phpnext-system-mysql8 +# - phpnext-system-postgres - phpmax-system-mysql - phpmax-system-mysql8 - phpmax-system-postgres - phpmin-system-mysql - phpmin-system-mysql8 - phpmin-system-postgres - - phpnext-api-mysql - - phpnext-api-postgres +# - phpnext-api-mysql +# - phpnext-api-postgres - phpmax-api-mysql - phpmax-api-postgres - phpmin-api-mysql @@ -409,6 +420,6 @@ steps: --- kind: signature -hmac: e93522732dd8607448fa7705982c42c06f9ebf9762023ed1bb2207ee975fee42 +hmac: daa8e5588cc88058bc57aadf35e3d9dd55eefaa9419c457ce374a0dd19eb7cda ... diff --git a/administrator/components/com_content/src/Model/ArticleModel.php b/administrator/components/com_content/src/Model/ArticleModel.php index 9ced66d6e8f80..9f8bf37655e08 100644 --- a/administrator/components/com_content/src/Model/ArticleModel.php +++ b/administrator/components/com_content/src/Model/ArticleModel.php @@ -416,7 +416,7 @@ public function getItem($pk = null) $registry = new Registry($item->urls); $item->urls = $registry->toArray(); - $item->articletext = trim($item->fulltext) != '' ? $item->introtext . "
" . $item->fulltext : $item->introtext; + $item->articletext = ($item->fulltext !== null && trim($item->fulltext) != '') ? $item->introtext . "
" . $item->fulltext : $item->introtext; if (!empty($item->id)) { diff --git a/administrator/components/com_cpanel/src/View/Cpanel/HtmlView.php b/administrator/components/com_cpanel/src/View/Cpanel/HtmlView.php index 0ab57cfb8e8c5..6ad10b9842ce1 100644 --- a/administrator/components/com_cpanel/src/View/Cpanel/HtmlView.php +++ b/administrator/components/com_cpanel/src/View/Cpanel/HtmlView.php @@ -56,7 +56,7 @@ class HtmlView extends BaseHtmlView public function display($tpl = null) { $app = Factory::getApplication(); - $dashboard = $app->input->getCmd('dashboard'); + $dashboard = $app->input->getCmd('dashboard', ''); $position = ApplicationHelper::stringURLSafe($dashboard); diff --git a/administrator/components/com_joomlaupdate/extract.php b/administrator/components/com_joomlaupdate/extract.php index 549206777f89d..c59dc7b01625f 100644 --- a/administrator/components/com_joomlaupdate/extract.php +++ b/administrator/components/com_joomlaupdate/extract.php @@ -525,7 +525,7 @@ public function enforceMinimumExecutionTime() return; } - $sleepMillisec = $minExecTime - $elapsed; + $sleepMillisec = intval($minExecTime - $elapsed); /** * If we need to sleep for more than 1 second we should be using sleep() or time_sleep_until() to prevent high diff --git a/administrator/components/com_joomlaupdate/src/View/Joomlaupdate/HtmlView.php b/administrator/components/com_joomlaupdate/src/View/Joomlaupdate/HtmlView.php index 4d171af9c3512..f116aa9e65063 100644 --- a/administrator/components/com_joomlaupdate/src/View/Joomlaupdate/HtmlView.php +++ b/administrator/components/com_joomlaupdate/src/View/Joomlaupdate/HtmlView.php @@ -296,6 +296,12 @@ protected function addToolbar() */ public function shouldDisplayPreUpdateCheck() { + // When the download URL is not found there is no core upgrade path + if (!isset($this->updateInfo['object']->downloadurl->_data)) + { + return false; + } + $nextMinor = Version::MAJOR_VERSION . '.' . (Version::MINOR_VERSION + 1); // Show only when we found a download URL, we have an update and when we update to the next minor or greater. diff --git a/administrator/components/com_media/src/Provider/ProviderManager.php b/administrator/components/com_media/src/Provider/ProviderManager.php index 2f7563e5ee92b..8f2c38d228ba4 100644 --- a/administrator/components/com_media/src/Provider/ProviderManager.php +++ b/administrator/components/com_media/src/Provider/ProviderManager.php @@ -55,6 +55,32 @@ public function registerProvider(ProviderInterface $provider) $this->providers[$provider->getID()] = $provider; } + /** + * Unregister a provider from the ProviderManager. + * When no provider, or null is passed in, then all providers are cleared. + * + * @param ProviderInterface|null $provider The provider to be unregistered + * + * @return void + * + * @since 4.0.6 + */ + public function unregisterProvider(ProviderInterface $provider = null): void + { + if ($provider === null) + { + $this->providers = []; + return; + } + + if (!array_key_exists($provider->getID(), $this->providers)) + { + return; + } + + unset($this->providers[$provider->getID()]); + } + /** * Returns the provider for a particular ID * diff --git a/administrator/language/en-GB/com_joomlaupdate.ini b/administrator/language/en-GB/com_joomlaupdate.ini index b2dd8d7fabb0a..b4502450d0ce1 100644 --- a/administrator/language/en-GB/com_joomlaupdate.ini +++ b/administrator/language/en-GB/com_joomlaupdate.ini @@ -121,7 +121,7 @@ COM_JOOMLAUPDATE_VIEW_DEFAULT_INSTALLAGAIN="Reinstall Joomla core files" COM_JOOMLAUPDATE_VIEW_DEFAULT_INSTALLED="Installed Joomla version" COM_JOOMLAUPDATE_VIEW_DEFAULT_INSTALLUPDATE="Update" COM_JOOMLAUPDATE_VIEW_DEFAULT_LATEST="Latest Joomla version" -COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_DOWNLOAD_URL="We can't find a download URL" +COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_DOWNLOAD_URL="Update unavailable" COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_DOWNLOAD_URL_DESC="An update to Joomla %1$s was found, but it wasn't possible to fetch the download URL for that update. Either the update to Joomla %1$s is not available for your stability level or there is a problem with the Joomla Update Server.
Please try to download the update package from the official Joomla download page and use the Upload and Update tab." COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_LIVE_UPDATE="A new version of the Joomla Update Component is available." COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_LIVE_UPDATE_DESC="You must update this component first before you can update Joomla! Click here to update the component." diff --git a/administrator/language/en-GB/lib_joomla.ini b/administrator/language/en-GB/lib_joomla.ini index 4cebf64ed4ef4..2fe27310d9012 100644 --- a/administrator/language/en-GB/lib_joomla.ini +++ b/administrator/language/en-GB/lib_joomla.ini @@ -649,6 +649,10 @@ JLIB_INSTALLER_NOT_ERROR="If the error is related to the installation of TinyMCE JLIB_INSTALLER_NOTICE_LANG_RESET_USERS="Language set to Default for %d users." JLIB_INSTALLER_NOTICE_LANG_RESET_USERS_1="Language set to Default for the user." JLIB_INSTALLER_PURGED_UPDATES="Cleared updates." +JLIB_INSTALLER_SQL_BEGIN="Start of SQL updates." +JLIB_INSTALLER_SQL_BEGIN_SCHEMA="The current database version (schema) is %s." +JLIB_INSTALLER_SQL_END="End of SQL updates." +JLIB_INSTALLER_SQL_END_NOT_COMPLETE="End of SQL updates - INCOMPLETE." JLIB_INSTALLER_UNINSTALL="Uninstall" JLIB_INSTALLER_UPDATE="Update" JLIB_INSTALLER_UPDATE_LOG_QUERY="Ran query from file %1$s. Query text: %2$s." diff --git a/administrator/modules/mod_latest/src/Helper/LatestHelper.php b/administrator/modules/mod_latest/src/Helper/LatestHelper.php index 4063ed752c04f..5353913a538db 100644 --- a/administrator/modules/mod_latest/src/Helper/LatestHelper.php +++ b/administrator/modules/mod_latest/src/Helper/LatestHelper.php @@ -96,7 +96,8 @@ public static function getList(Registry &$params, ArticlesModel $model) { $item->link = ''; - if ($user->authorise('core.edit', 'com_content.article.' . $item->id)) + if ($user->authorise('core.edit', 'com_content.article.' . $item->id) + || ($user->authorise('core.edit.own', 'com_content.article.' . $item->id) && ($userId === $item->created_by))) { $item->link = Route::_('index.php?option=com_content&task=article.edit&id=' . $item->id); } diff --git a/administrator/modules/mod_popular/src/Helper/PopularHelper.php b/administrator/modules/mod_popular/src/Helper/PopularHelper.php index 83d9fd226c424..1572b9b821013 100644 --- a/administrator/modules/mod_popular/src/Helper/PopularHelper.php +++ b/administrator/modules/mod_popular/src/Helper/PopularHelper.php @@ -87,7 +87,8 @@ public static function getList(Registry &$params, ArticlesModel $model) { $item->link = ''; - if ($user->authorise('core.edit', 'com_content.article.' . $item->id)) + if ($user->authorise('core.edit', 'com_content.article.' . $item->id) + || ($user->authorise('core.edit.own', 'com_content.article.' . $item->id) && ($userId === $item->created_by))) { $item->link = Route::_('index.php?option=com_content&task=article.edit&id=' . $item->id); } diff --git a/api/components/com_categories/src/Controller/CategoriesController.php b/api/components/com_categories/src/Controller/CategoriesController.php index 7dfb0cdafabe3..e0c7b8d29ded1 100644 --- a/api/components/com_categories/src/Controller/CategoriesController.php +++ b/api/components/com_categories/src/Controller/CategoriesController.php @@ -51,7 +51,7 @@ protected function preprocessSaveData(array $data): array $extension = $this->getExtensionFromInput(); $data['extension'] = $extension; - // @todo: This is a hack to drop the extension into the global input object - to satisfy how state is built + // TODO: This is a hack to drop the extension into the global input object - to satisfy how state is built // we should be able to improve this in the future $this->input->set('extension', $extension); @@ -65,7 +65,7 @@ protected function preprocessSaveData(array $data): array * * @return integer The record ID on success, false on failure * - * @since 4.1.0 + * @since 4.0.6 */ protected function save($recordKey = null) { diff --git a/build/stubGenerator.php b/build/stubGenerator.php index d93b8d2f2d6de..f4b899cdece1a 100644 --- a/build/stubGenerator.php +++ b/build/stubGenerator.php @@ -61,6 +61,7 @@ class StubGenerator extends CliApplication public function doExecute() { $this->createExtensionNamespaceMap(); + $contentsByNamespace = []; $file = "isInterface() && $reflection->isFinal()) ? 'final ' : ''; $modifier = ($reflection->isAbstract() && !$reflection->isInterface()) ? $modifier . 'abstract ' : $modifier; + $namespaceSegments = explode('\\', $oldName); + $className = array_pop($namespaceSegments); + $targetNamespace = ltrim(implode('\\', $namespaceSegments), '\\'); + // If a deprecated version is available, write a stub class doc block with a deprecated tag if ($deprecatedVersion !== false) { - $file .= << $contents) + { + $file .= "namespace $namespace {\n"; + $file .= $contents; + $file .= "}\n\n"; } // And save the file locally diff --git a/components/com_contact/tmpl/category/default_items.php b/components/com_contact/tmpl/category/default_items.php index 02bbbd0d48aa8..b8936a325f095 100644 --- a/components/com_contact/tmpl/category/default_items.php +++ b/components/com_contact/tmpl/category/default_items.php @@ -12,6 +12,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; +use Joomla\CMS\Layout\LayoutHelper; use Joomla\CMS\Router\Route; use Joomla\CMS\Uri\Uri; use Joomla\Component\Contact\Administrator\Helper\ContactHelper; @@ -99,7 +100,14 @@ class="inputbox" onchange="document.adminForm.submit();" params->get('show_image_heading')) : ?> image) : ?> - image, '', array('class' => 'contact-thumbnail img-thumbnail')); ?> + $item->image, + 'alt' => '', + 'class' => 'contact-thumbnail img-thumbnail', + ] + ); ?> escape($item->name); ?> diff --git a/components/com_contact/tmpl/contact/default.php b/components/com_contact/tmpl/contact/default.php index 0299548b3421e..24d326583bdbe 100644 --- a/components/com_contact/tmpl/contact/default.php +++ b/components/com_contact/tmpl/contact/default.php @@ -14,6 +14,7 @@ use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\FileLayout; +use Joomla\CMS\Layout\LayoutHelper; use Joomla\CMS\Plugin\PluginHelper; use Joomla\CMS\Router\Route; use Joomla\Component\Contact\Site\Helper\RouteHelper; @@ -97,11 +98,13 @@ item->image && $tparams->get('show_image')) : ?>
- item->image, - htmlspecialchars($this->item->name, ENT_QUOTES, 'UTF-8'), - array('itemprop' => 'image') + $this->item->image, + 'alt' => $this->item->name, + 'itemprop' => 'image', + ] ); ?>
diff --git a/components/com_content/tmpl/category/blog.php b/components/com_content/tmpl/category/blog.php index 5456cf33e9d61..cd6d656572c82 100644 --- a/components/com_content/tmpl/category/blog.php +++ b/components/com_content/tmpl/category/blog.php @@ -13,6 +13,7 @@ use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\FileLayout; +use Joomla\CMS\Layout\LayoutHelper; $app = Factory::getApplication(); @@ -54,8 +55,13 @@ params->get('show_description', 1) || $this->params->def('show_description_image', 1)) : ?>
params->get('show_description_image') && $this->category->getParams()->get('image')) : ?> - category->getParams()->get('image_alt')) && empty($this->category->getParams()->get('image_alt_empty')) ? '' : 'alt="' . htmlspecialchars($this->category->getParams()->get('image_alt'), ENT_COMPAT, 'UTF-8') . '"'; ?> - > + $this->category->getParams()->get('image'), + 'alt' => empty($this->category->getParams()->get('image_alt')) && empty($this->category->getParams()->get('image_alt_empty')) ? false : $this->category->getParams()->get('image_alt'), + ] + ); ?> params->get('show_description') && $this->category->description) : ?> @@ -78,12 +84,11 @@ lead_items)) : ?>