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)) : ?>