diff --git a/administrator/components/com_admin/script.php b/administrator/components/com_admin/script.php index 9f0f6f24d3cb3..aa34bc08663a4 100644 --- a/administrator/components/com_admin/script.php +++ b/administrator/components/com_admin/script.php @@ -2116,20 +2116,84 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false) '/language/en-GB/lib_simplepie.sys.ini', '/libraries/src/Cache/Storage/WincacheStorage.php', // From 5.0.0-beta2 to 5.0.0-beta3 + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/AbstractString.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/AbstractTime.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/ASNObject.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Base128.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Composite/AttributeTypeAndValue.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Composite/RDNString.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Composite/RelativeDistinguishedName.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Construct.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Exception/NotImplementedException.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Exception/ParserException.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/ExplicitlyTaggedObject.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Identifier.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/OID.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Parsable.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/TemplateParser.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/BitString.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/BMPString.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/Boolean.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/CharacterString.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/Enumerated.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/GeneralizedTime.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/GeneralString.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/GraphicString.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/IA5String.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/Integer.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/NullObject.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/NumericString.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/ObjectDescriptor.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/ObjectIdentifier.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/OctetString.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/PrintableString.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/RelativeObjectIdentifier.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/Sequence.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/Set.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/T61String.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/UniversalString.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/UTCTime.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/UTF8String.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/VisibleString.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/UnknownConstructedObject.php', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/UnknownObject.php', + '/libraries/vendor/fgrosse/phpasn1/lib/Utility/BigInteger.php', + '/libraries/vendor/fgrosse/phpasn1/lib/Utility/BigIntegerBcmath.php', + '/libraries/vendor/fgrosse/phpasn1/lib/Utility/BigIntegerGmp.php', + '/libraries/vendor/fgrosse/phpasn1/lib/X509/AlgorithmIdentifier.php', + '/libraries/vendor/fgrosse/phpasn1/lib/X509/CertificateExtensions.php', + '/libraries/vendor/fgrosse/phpasn1/lib/X509/CertificateSubject.php', + '/libraries/vendor/fgrosse/phpasn1/lib/X509/CSR/Attributes.php', + '/libraries/vendor/fgrosse/phpasn1/lib/X509/CSR/CSR.php', + '/libraries/vendor/fgrosse/phpasn1/lib/X509/PrivateKey.php', + '/libraries/vendor/fgrosse/phpasn1/lib/X509/PublicKey.php', + '/libraries/vendor/fgrosse/phpasn1/lib/X509/SAN/DNSName.php', + '/libraries/vendor/fgrosse/phpasn1/lib/X509/SAN/IPAddress.php', + '/libraries/vendor/fgrosse/phpasn1/lib/X509/SAN/SubjectAlternativeNames.php', + '/libraries/vendor/fgrosse/phpasn1/LICENSE', + '/libraries/vendor/stella-maris/clock/LICENSE.md', + '/libraries/vendor/stella-maris/clock/src/ClockInterface.php', '/media/com_scheduler/css/admin-view-select-task.css', '/media/com_scheduler/css/admin-view-select-task.min.css', + '/media/com_scheduler/css/admin-view-select-task.min.css.gz', '/media/system/css/calendar-jos.css', '/media/system/css/calendar-jos.min.css', + '/media/system/css/calendar-jos.min.css.gz', '/media/system/css/debug.css', '/media/system/css/debug.min.css', + '/media/system/css/debug.min.css.gz', '/media/system/css/frontediting.css', '/media/system/css/frontediting.min.css', + '/media/system/css/frontediting.min.css.gz', '/media/system/css/mootree.css', '/media/system/css/mootree.min.css', + '/media/system/css/mootree.min.css.gz', '/media/system/css/mootree_rtl.css', - '/media/system/css/mootree_rtl,min.css', + '/media/system/css/mootree_rtl.min.css', + '/media/system/css/mootree_rtl.min.css.gz', '/media/system/css/sortablelist.css', '/media/system/css/sortablelist.min.css', + '/media/system/css/sortablelist.min.css.gz', ]; $folders = [ @@ -2349,6 +2413,21 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false) '/templates/system/incompatible.html,', '/media/plg_system_compat', '/media/plg_editors_tinymce/js/plugins/highlighter', + // From 5.0.0-beta2 to 5.0.0-beta3 + '/libraries/vendor/stella-maris/clock/src', + '/libraries/vendor/stella-maris/clock', + '/libraries/vendor/stella-maris', + '/libraries/vendor/fgrosse/phpasn1/lib/X509/SAN', + '/libraries/vendor/fgrosse/phpasn1/lib/X509/CSR', + '/libraries/vendor/fgrosse/phpasn1/lib/X509', + '/libraries/vendor/fgrosse/phpasn1/lib/Utility', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Exception', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Composite', + '/libraries/vendor/fgrosse/phpasn1/lib/ASN1', + '/libraries/vendor/fgrosse/phpasn1/lib', + '/libraries/vendor/fgrosse/phpasn1', + '/libraries/vendor/fgrosse', ]; $status['files_checked'] = $files; diff --git a/administrator/components/com_banners/src/Model/ClientsModel.php b/administrator/components/com_banners/src/Model/ClientsModel.php index 52c9281a180d3..b21ed9840cf55 100644 --- a/administrator/components/com_banners/src/Model/ClientsModel.php +++ b/administrator/components/com_banners/src/Model/ClientsModel.php @@ -281,10 +281,10 @@ public function getItems() // Inject the values back into the array. foreach ($items as $item) { - $item->count_published = isset($countPublished[$item->id]) ? $countPublished[$item->id] : 0; - $item->count_unpublished = isset($countUnpublished[$item->id]) ? $countUnpublished[$item->id] : 0; - $item->count_trashed = isset($countTrashed[$item->id]) ? $countTrashed[$item->id] : 0; - $item->count_archived = isset($countArchived[$item->id]) ? $countArchived[$item->id] : 0; + $item->count_published = $countPublished[$item->id] ?? 0; + $item->count_unpublished = $countUnpublished[$item->id] ?? 0; + $item->count_trashed = $countTrashed[$item->id] ?? 0; + $item->count_archived = $countArchived[$item->id] ?? 0; } // Add the items to the internal cache. diff --git a/administrator/components/com_content/src/Model/ArticleModel.php b/administrator/components/com_content/src/Model/ArticleModel.php index 1ca5cfdaa2864..29ef673fcd083 100644 --- a/administrator/components/com_content/src/Model/ArticleModel.php +++ b/administrator/components/com_content/src/Model/ArticleModel.php @@ -32,6 +32,7 @@ use Joomla\CMS\Versioning\VersionableModelTrait; use Joomla\CMS\Workflow\Workflow; use Joomla\Component\Categories\Administrator\Helper\CategoriesHelper; +use Joomla\Component\Content\Administrator\Event\Model\FeatureEvent; use Joomla\Component\Fields\Administrator\Helper\FieldsHelper; use Joomla\Database\ParameterType; use Joomla\Filter\OutputFilter; @@ -845,7 +846,7 @@ public function featured($pks, $value = 0, $featuredUp = null, $featuredDown = n AbstractEvent::create( $this->event_before_change_featured, [ - 'eventClass' => 'Joomla\Component\Content\Administrator\Event\Model\FeatureEvent', + 'eventClass' => FeatureEvent::class, 'subject' => $this, 'extension' => $context, 'pks' => $pks, @@ -950,7 +951,7 @@ public function featured($pks, $value = 0, $featuredUp = null, $featuredDown = n AbstractEvent::create( $this->event_after_change_featured, [ - 'eventClass' => 'Joomla\Component\Content\Administrator\Event\Model\FeatureEvent', + 'eventClass' => FeatureEvent::class, 'subject' => $this, 'extension' => $context, 'pks' => $pks, diff --git a/administrator/components/com_content/tmpl/articles/modal.php b/administrator/components/com_content/tmpl/articles/modal.php index 86c704918c23c..cf4d5cc61fbda 100644 --- a/administrator/components/com_content/tmpl/articles/modal.php +++ b/administrator/components/com_content/tmpl/articles/modal.php @@ -32,7 +32,7 @@ ->useScript('modal-content-select') ->useScript('com_content.admin-articles-modal'); -// TODO: Use of Function and Editor is deprecated and should be removed in 6.0. It stays only for backward compatibility. +// @todo: Use of Function and Editor is deprecated and should be removed in 6.0. It stays only for backward compatibility. $function = $app->getInput()->getCmd('function', 'jSelectArticle'); $editor = $app->getInput()->getCmd('editor', ''); $listOrder = $this->escape($this->state->get('list.ordering')); diff --git a/administrator/components/com_fields/src/Helper/FieldsHelper.php b/administrator/components/com_fields/src/Helper/FieldsHelper.php index 4978de4ffe69e..283b9654136ec 100644 --- a/administrator/components/com_fields/src/Helper/FieldsHelper.php +++ b/administrator/components/com_fields/src/Helper/FieldsHelper.php @@ -238,7 +238,7 @@ function ($f) { 'context' => $context, 'item' => $item, 'subject' => $field, - 'value' => &$value, // TODO: Remove reference in Joomla 6, see AfterPrepareFieldEvent::__constructor() + 'value' => &$value, // @todo: Remove reference in Joomla 6, see AfterPrepareFieldEvent::__constructor() ]); $dispatcher->dispatch('onCustomFieldsAfterPrepareField', $eventAfter); $value = $eventAfter->getValue(); diff --git a/administrator/components/com_guidedtours/src/Model/StepModel.php b/administrator/components/com_guidedtours/src/Model/StepModel.php index 515d934666f63..6129b2fbbd3eb 100644 --- a/administrator/components/com_guidedtours/src/Model/StepModel.php +++ b/administrator/components/com_guidedtours/src/Model/StepModel.php @@ -88,7 +88,7 @@ public function save($data) // Make sure we use the correct extension when editing an existing tour $key = $table->getKeyName(); - $pk = isset($data[$key]) ? $data[$key] : (int) $this->getState($this->getName() . '.id'); + $pk = $data[$key] ?? (int) $this->getState($this->getName() . '.id'); if ($pk > 0) { $table->load($pk); diff --git a/administrator/components/com_installer/src/Model/DatabaseModel.php b/administrator/components/com_installer/src/Model/DatabaseModel.php index f483e66820ac8..4d5700884bda3 100644 --- a/administrator/components/com_installer/src/Model/DatabaseModel.php +++ b/administrator/components/com_installer/src/Model/DatabaseModel.php @@ -559,9 +559,9 @@ private function getErrorsMessage($errors) $key = 'COM_INSTALLER_MSG_DATABASE_' . $error->queryType; $messages = $error->msgElements; $file = basename($error->file); - $message0 = isset($messages[0]) ? $messages[0] : ' '; - $message1 = isset($messages[1]) ? $messages[1] : ' '; - $message2 = isset($messages[2]) ? $messages[2] : ' '; + $message0 = $messages[0] ?? ' '; + $message1 = $messages[1] ?? ' '; + $message2 = $messages[2] ?? ' '; $errorMessages[] = Text::sprintf($key, $file, $message0, $message1, $message2); } diff --git a/administrator/components/com_installer/src/Model/InstallModel.php b/administrator/components/com_installer/src/Model/InstallModel.php index 73a17c58959a1..b1db9fed17720 100644 --- a/administrator/components/com_installer/src/Model/InstallModel.php +++ b/administrator/components/com_installer/src/Model/InstallModel.php @@ -97,7 +97,7 @@ public function install() // (e.g. from a \JSON description). $eventBefore = new BeforeInstallationEvent('onInstallerBeforeInstallation', [ 'subject' => $this, - 'package' => &$package, // TODO: Remove reference in Joomla 6, see InstallerEvent::__constructor() + 'package' => &$package, // @todo: Remove reference in Joomla 6, see InstallerEvent::__constructor() ]); $results = $dispatcher->dispatch('onInstallerBeforeInstallation', $eventBefore)->getArgument('result', []); $package = $eventBefore->getPackage(); @@ -136,10 +136,15 @@ public function install() } } + // No one of installType was able to resolve $package. Nothing to Install. + if (!$package) { + return false; + } + // This event allows a custom installation of the package or a customization of the package: $eventBeforeInst = new BeforeInstallerEvent('onInstallerBeforeInstaller', [ 'subject' => $this, - 'package' => &$package, // TODO: Remove reference in Joomla 6, see InstallerEvent::__constructor() + 'package' => &$package, // @todo: Remove reference in Joomla 6, see InstallerEvent::__constructor() ]); $results = $dispatcher->dispatch('onInstallerBeforeInstaller', $eventBeforeInst)->getArgument('result', []); $package = $eventBeforeInst->getPackage(); @@ -221,10 +226,10 @@ public function install() // This event allows a custom a post-flight: $eventAfterInst = new AfterInstallerEvent('onInstallerAfterInstaller', [ 'subject' => $this, - 'package' => &$package, // TODO: Remove reference in Joomla 6, see InstallerEvent::__constructor() + 'package' => &$package, // @todo: Remove reference in Joomla 6, see InstallerEvent::__constructor() 'installer' => $installer, - 'installerResult' => &$result, // TODO: Remove reference in Joomla 6, see AfterInstallerEvent::__constructor() - 'message' => &$msg, // TODO: Remove reference in Joomla 6, see AfterInstallerEvent::__constructor() + 'installerResult' => &$result, // @todo: Remove reference in Joomla 6, see AfterInstallerEvent::__constructor() + 'message' => &$msg, // @todo: Remove reference in Joomla 6, see AfterInstallerEvent::__constructor() ]); $dispatcher->dispatch('onInstallerAfterInstaller', $eventAfterInst); $package = $eventAfterInst->getPackage(); diff --git a/administrator/components/com_joomlaupdate/src/Model/UpdateModel.php b/administrator/components/com_joomlaupdate/src/Model/UpdateModel.php index a5e8c0d97d4e3..51185e9d0854e 100644 --- a/administrator/components/com_joomlaupdate/src/Model/UpdateModel.php +++ b/administrator/components/com_joomlaupdate/src/Model/UpdateModel.php @@ -966,6 +966,13 @@ public function upload() throw new \RuntimeException(Text::_('COM_INSTALLER_MSG_INSTALL_WARNINSTALLUPLOADERROR'), 500); } + // Check the uploaded file (throws RuntimeException when a check failed) + if (\extension_loaded('zip')) { + $this->checkPackageFileZip($userfile['tmp_name']); + } else { + $this->checkPackageFileNoZip($userfile['tmp_name']); + } + // Build the appropriate paths. $tmp_dest = tempnam(Factory::getApplication()->get('tmp_path'), 'ju'); $tmp_src = $userfile['tmp_name']; @@ -1395,7 +1402,7 @@ public function getNonCoreExtensions() $this->translateExtensionName($extension); $extension->version - = isset($decode->version) ? $decode->version : Text::_('COM_JOOMLAUPDATE_PREUPDATE_UNKNOWN_EXTENSION_MANIFESTCACHE_VERSION'); + = $decode->version ?? Text::_('COM_JOOMLAUPDATE_PREUPDATE_UNKNOWN_EXTENSION_MANIFESTCACHE_VERSION'); unset($extension->manifest_cache); $extension->manifest_cache = $decode; } @@ -1779,4 +1786,237 @@ public function collectError(string $context, \Throwable $error) Log::add(sprintf('An error trace: %s.', $trace), Log::DEBUG, 'Update'); } } + + /** + * Check the update package with ZipArchive classs from zip PHP extension + * + * @param string $filePath Full path to the update package to test + * + * @return void + * + * @since __DEPLOY_VERSION__ + * @throws \RuntimeException + */ + private function checkPackageFileZip(string $filePath) + { + $zipArchive = new \ZipArchive(); + + if ($zipArchive->open($filePath) !== true) { + throw new \RuntimeException(Text::_('COM_JOOMLAUPDATE_VIEW_UPLOAD_ERROR_PACKAGE_OPEN'), 500); + } + + if ($zipArchive->locateName('installation/index.php') !== false) { + throw new \RuntimeException(Text::_('COM_JOOMLAUPDATE_VIEW_UPLOAD_ERROR_INSTALL_PACKAGE'), 500); + } + + $manifestFile = $zipArchive->getFromName('administrator/manifests/files/joomla.xml'); + + if ($manifestFile === false) { + throw new \RuntimeException(Text::_('COM_JOOMLAUPDATE_VIEW_UPLOAD_ERROR_NO_MANIFEST_FILE'), 500); + } + + $this->checkManifestXML($manifestFile); + } + + /** + * Check the update package without using the ZipArchive classs from zip PHP extension + * + * @param string $filePath Full path to the update package to test + * + * @return void + * + * @see https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT + * @since __DEPLOY_VERSION__ + * @throws \RuntimeException + */ + private function checkPackageFileNoZip(string $filePath) + { + // The file must exist and be readable + if (!file_exists($filePath) || !is_readable($filePath)) { + throw new \RuntimeException(Text::_('COM_JOOMLAUPDATE_VIEW_UPLOAD_ERROR_PACKAGE_OPEN'), 500); + } + + // The file must be at least 1KiB (anything less is not even a real file!) + $filesize = filesize($filePath); + + if ($filesize < 1024) { + throw new \RuntimeException(Text::_('COM_JOOMLAUPDATE_VIEW_UPLOAD_ERROR_PACKAGE_OPEN'), 500); + } + + // Open the file + $fp = @fopen($filePath, 'rb'); + + if ($fp === false) { + throw new \RuntimeException(Text::_('COM_JOOMLAUPDATE_VIEW_UPLOAD_ERROR_PACKAGE_OPEN'), 500); + } + + // Read chunks of max. 1MiB size + $readsize = min($filesize, 1048576); + + // Signature of a file header inside a ZIP central directory header + $headerSignature = pack('V', 0x02014b50); + + // File name size signature of the 'installation/index.php' file + $sizeSignatureIndexPhp = pack('v', 0x0016); + + // File name size signature of the 'administrator/manifests/files/joomla.xml' file + $sizeSignatureJoomlaXml = pack('v', 0x0028); + + $headerFound = false; + $headerInfo = false; + + // Read chunks from the end to the start of the file + $readStart = $filesize - $readsize; + + while ($readsize > 0 && fseek($fp, $readStart) === 0) { + $fileChunk = fread($fp, $readsize); + + if ($fileChunk === false || strlen($fileChunk) !== $readsize) { + @fclose($fp); + + throw new \RuntimeException(Text::_('COM_JOOMLAUPDATE_VIEW_UPLOAD_ERROR_PACKAGE_OPEN'), 500); + } + + $posFirstHeader = strpos($fileChunk, $headerSignature); + + if ($posFirstHeader === false) { + break; + } + + $headerFound = true; + + $offset = 0; + + // Look for installation/index.php + while (($pos = strpos($fileChunk, 'installation/index.php', $offset)) !== false) { + // Check if entry is a central directory file header and the file name is exactly 22 bytes long + if (substr($fileChunk, $pos - 46, 4) == $headerSignature && substr($fileChunk, $pos - 18, 2) == $sizeSignatureIndexPhp) { + @fclose($fp); + + throw new \RuntimeException(Text::_('COM_JOOMLAUPDATE_VIEW_UPLOAD_ERROR_INSTALL_PACKAGE'), 500); + } + + $offset = $pos + 22; + } + + $offset = 0; + + // Look for administrator/manifests/files/joomla.xml if not found yet + while ($headerInfo === false && ($pos = strpos($fileChunk, 'administrator/manifests/files/joomla.xml', $offset)) !== false) { + // Check if entry is inside a ZIP central directory header and the file name is exactly 40 bytes long + if (substr($fileChunk, $pos - 46, 4) == $headerSignature && substr($fileChunk, $pos - 18, 2) == $sizeSignatureJoomlaXml) { + $headerInfo = unpack('VOffset', substr($fileChunk, $pos - 4, 4)); + + break; + } + + $offset = $pos + 40; + } + + // Done as all file content has been read + if ($readStart === 0) { + break; + } + + // Calculate read start and read size for previous chunk in the file + $readEnd = $readStart + $posFirstHeader; + $readStart = max($readEnd - $readsize, 0); + $readsize = $readEnd - $readStart; + } + + // If no central directory file header found at all it's not a valid ZIP file + if (!$headerFound) { + @fclose($fp); + + throw new \RuntimeException(Text::_('COM_JOOMLAUPDATE_VIEW_UPLOAD_ERROR_PACKAGE_OPEN'), 500); + } + + // If no central directory file header found for the manifest XML file it's not a valid Joomla package + if (!$headerInfo) { + @fclose($fp); + + throw new \RuntimeException(Text::_('COM_JOOMLAUPDATE_VIEW_UPLOAD_ERROR_NO_MANIFEST_FILE'), 500); + } + + // Read the local file header of the manifest XML file + fseek($fp, $headerInfo['Offset']); + $localHeader = fread($fp, 30); + + $localHeaderInfo = unpack('VSig/vVersion/vBitFlag/vMethod/VTime/VCRC32/VCompressed/VUncompressed/vNameLength/vExtraLength', $localHeader); + + // Check for empty manifest file + if (!$localHeaderInfo['Compressed']) { + @fclose($fp); + + throw new \RuntimeException(Text::_('COM_JOOMLAUPDATE_VIEW_UPLOAD_ERROR_NO_MANIFEST_FILE'), 500); + } + + // Read the compressed manifest XML file content + fseek($fp, $localHeaderInfo['NameLength'] + $localHeaderInfo['ExtraLength'], SEEK_CUR); + $manifestFileCompressed = fread($fp, $localHeaderInfo['Compressed']); + + // Close package file + @fclose($fp); + + // Uncompress the manifest XML file content + $manifestFile = ''; + + switch ($localHeaderInfo['Method']) { + case 0: + // Uncompressed + $manifestFile = $manifestFileCompressed; + break; + + case 8: + // Deflated + $manifestFile = gzinflate($manifestFileCompressed); + break; + + default: + // Unsupported + break; + } + + if (!$manifestFile) { + throw new \RuntimeException(Text::_('COM_JOOMLAUPDATE_VIEW_UPLOAD_ERROR_NO_MANIFEST_FILE'), 500); + } + + $this->checkManifestXML($manifestFile); + } + + /** + * Check content of manifest XML file in update package + * + * @param string $manifest Content of the manifest XML file + * + * @return void + * + * @since __DEPLOY_VERSION__ + * @throws \RuntimeException + */ + private function checkManifestXML(string $manifest) + { + $manifestXml = simplexml_load_string($manifest); + + if (!$manifestXml) { + throw new \RuntimeException(Text::_('COM_JOOMLAUPDATE_VIEW_UPLOAD_ERROR_NO_VERSION_FOUND'), 500); + } + + $versionPackage = (string) $manifestXml->version ?: ''; + + if (!$versionPackage) { + throw new \RuntimeException(Text::_('COM_JOOMLAUPDATE_VIEW_UPLOAD_ERROR_NO_VERSION_FOUND'), 500); + } + + $currentVersion = JVERSION; + + // Remove special version suffix for pull request patched packages + if (($pos = strpos($currentVersion, '+pr.')) !== false) { + $currentVersion = substr($currentVersion, 0, $pos); + } + + if (version_compare($versionPackage, $currentVersion, 'lt')) { + throw new \RuntimeException(Text::_('COM_JOOMLAUPDATE_VIEW_UPLOAD_ERROR_DOWNGRADE'), 500); + } + } } diff --git a/administrator/components/com_joomlaupdate/tmpl/joomlaupdate/preupdatecheck.php b/administrator/components/com_joomlaupdate/tmpl/joomlaupdate/preupdatecheck.php index 329d555b7e01c..769bd50bdc9a8 100644 --- a/administrator/components/com_joomlaupdate/tmpl/joomlaupdate/preupdatecheck.php +++ b/administrator/components/com_joomlaupdate/tmpl/joomlaupdate/preupdatecheck.php @@ -84,7 +84,7 @@ ]; $latestJoomlaVersion = $this->updateInfo['latest']; -$currentJoomlaVersion = isset($this->updateInfo['installed']) ? $this->updateInfo['installed'] : JVERSION; +$currentJoomlaVersion = $this->updateInfo['installed'] ?? JVERSION; $updatePossible = true; diff --git a/administrator/components/com_joomlaupdate/tmpl/upload/default.php b/administrator/components/com_joomlaupdate/tmpl/upload/default.php index 319c22d2a7c6e..a329b73a13acc 100644 --- a/administrator/components/com_joomlaupdate/tmpl/upload/default.php +++ b/administrator/components/com_joomlaupdate/tmpl/upload/default.php @@ -29,7 +29,7 @@ Text::script('JGLOBAL_SELECTED_UPLOAD_FILE_SIZE', true); $latestJoomlaVersion = $this->updateInfo['latest']; -$currentJoomlaVersion = isset($this->updateInfo['installed']) ? $this->updateInfo['installed'] : JVERSION; +$currentJoomlaVersion = $this->updateInfo['installed'] ?? JVERSION; ?>
diff --git a/administrator/components/com_menus/src/Helper/MenusHelper.php b/administrator/components/com_menus/src/Helper/MenusHelper.php index 66e53c08ef115..4f86efc9b9fe5 100644 --- a/administrator/components/com_menus/src/Helper/MenusHelper.php +++ b/administrator/components/com_menus/src/Helper/MenusHelper.php @@ -449,7 +449,7 @@ protected static function installPresetItems($node, $menutype) $dispatcher = Factory::getApplication()->getDispatcher(); $items = $dispatcher->dispatch('onPreprocessMenuItems', new PreprocessMenuItemsEvent('onPreprocessMenuItems', [ 'context' => 'com_menus.administrator.import', - 'subject' => &$items, // TODO: Remove reference in Joomla 6, see PreprocessMenuItemsEvent::__constructor() + 'subject' => &$items, // @todo: Remove reference in Joomla 6, see PreprocessMenuItemsEvent::__constructor() 'params' => null, 'enabled' => true, ]))->getArgument('subject', $items); diff --git a/administrator/components/com_menus/src/Model/ItemModel.php b/administrator/components/com_menus/src/Model/ItemModel.php index ff1728dc25b70..39d4a8316f181 100644 --- a/administrator/components/com_menus/src/Model/ItemModel.php +++ b/administrator/components/com_menus/src/Model/ItemModel.php @@ -264,7 +264,7 @@ protected function batchCopy($value, $pks, $contexts) // If we a copying children, the Old ID will turn up in the parents list // otherwise it's a new top level item - $table->parent_id = isset($parents[$oldParentId]) ? $parents[$oldParentId] : $parentId; + $table->parent_id = $parents[$oldParentId] ?? $parentId; $table->menutype = $menuType; // Set the new location in the tree for the node. @@ -1092,11 +1092,7 @@ protected function preprocessForm(Form $form, $data, $group = 'content') $view = $args['view']; // Determine the layout to search for. - if (isset($args['layout'])) { - $layout = $args['layout']; - } else { - $layout = 'default'; - } + $layout = $args['layout'] ?? 'default'; // Check for the layout XML file. Use standard xml file if it exists. $tplFolders = [ @@ -1315,7 +1311,7 @@ public function rebuild() */ public function save($data) { - $pk = isset($data['id']) ? $data['id'] : (int) $this->getState('item.id'); + $pk = $data['id'] ?? (int) $this->getState('item.id'); $isNew = true; $db = $this->getDatabase(); $query = $db->getQuery(true); @@ -1460,7 +1456,7 @@ public function save($data) // Load associated menu items, for now not supported for admin menu… may be later if ($table->get('client_id') == 0 && Associations::isEnabled()) { // Adding self to the association - $associations = isset($data['associations']) ? $data['associations'] : []; + $associations = $data['associations'] ?? []; // Unset any invalid associations $associations = ArrayHelper::toInteger($associations); diff --git a/administrator/components/com_menus/src/Model/MenusModel.php b/administrator/components/com_menus/src/Model/MenusModel.php index b8fa0e8c8e608..7b962701026a0 100644 --- a/administrator/components/com_menus/src/Model/MenusModel.php +++ b/administrator/components/com_menus/src/Model/MenusModel.php @@ -284,11 +284,7 @@ public function getMissingModuleLanguages(): array $langCodes = []; foreach ($languages as $language) { - if (isset($language->metadata['nativeName'])) { - $languageName = $language->metadata['nativeName']; - } else { - $languageName = $language->metadata['name']; - } + $languageName = $language->metadata['nativeName'] ?? $language->metadata['name']; $langCodes[$language->metadata['tag']] = $languageName; } diff --git a/administrator/components/com_menus/src/Model/MenutypesModel.php b/administrator/components/com_menus/src/Model/MenutypesModel.php index b0b934762298d..b23a3ba5c7081 100644 --- a/administrator/components/com_menus/src/Model/MenutypesModel.php +++ b/administrator/components/com_menus/src/Model/MenutypesModel.php @@ -128,7 +128,7 @@ public function getTypeOptions() // Allow a system plugin to insert dynamic menu types to the list shown in menus: return $this->getDispatcher()->dispatch('onAfterGetMenuTypeOptions', new AfterGetMenuTypeOptionsEvent('onAfterGetMenuTypeOptions', [ - 'items' => &$list, // TODO: Remove reference in Joomla 6, see AfterGetMenuTypeOptionsEvent::__constructor() + 'items' => &$list, // @todo: Remove reference in Joomla 6, see AfterGetMenuTypeOptionsEvent::__constructor() 'subject' => $this, ]))->getArgument('items', $list); } diff --git a/administrator/components/com_menus/tmpl/items/modal.php b/administrator/components/com_menus/tmpl/items/modal.php index 616f4376a793e..0943ac02a5fc2 100644 --- a/administrator/components/com_menus/tmpl/items/modal.php +++ b/administrator/components/com_menus/tmpl/items/modal.php @@ -28,7 +28,7 @@ $wa = $this->document->getWebAssetManager(); $wa->useScript('com_menus.admin-items-modal')->useScript('modal-content-select'); -// TODO: Use of Function and Editor is deprecated and should be removed in 6.0. It stays only for backward compatibility. +// @todo: Use of Function and Editor is deprecated and should be removed in 6.0. It stays only for backward compatibility. $function = $app->getInput()->get('function', 'jSelectMenuItem', 'cmd'); $editor = $app->getInput()->getCmd('editor', ''); $listOrder = $this->escape($this->state->get('list.ordering')); diff --git a/administrator/components/com_modules/tmpl/select/default.php b/administrator/components/com_modules/tmpl/select/default.php index bbac93991a6dc..6ffa776f5593b 100644 --- a/administrator/components/com_modules/tmpl/select/default.php +++ b/administrator/components/com_modules/tmpl/select/default.php @@ -68,7 +68,7 @@ class="form-control" id="comModulesSelectSearch" aria-label="">

-

+

diff --git a/administrator/components/com_templates/tmpl/template/default_updated_files.php b/administrator/components/com_templates/tmpl/template/default_updated_files.php index 86630b168a9bd..2e5d09c413642 100644 --- a/administrator/components/com_templates/tmpl/template/default_updated_files.php +++ b/administrator/components/com_templates/tmpl/template/default_updated_files.php @@ -38,6 +38,9 @@
+ containing navigation buttons */ - background: #fff; color: #000; + background: #fff; } .calendar-container table thead td.name { /* Cells containing navigation buttons */ - background: #fff; color: #000; + background: #fff; } .calendar-container table thead td.name { /* Cells
+ +
diff --git a/administrator/components/com_users/src/Model/GroupModel.php b/administrator/components/com_users/src/Model/GroupModel.php index 57b5069908855..3dd46e855fa11 100644 --- a/administrator/components/com_users/src/Model/GroupModel.php +++ b/administrator/components/com_users/src/Model/GroupModel.php @@ -11,6 +11,8 @@ namespace Joomla\Component\Users\Administrator\Model; use Joomla\CMS\Access\Access; +use Joomla\CMS\Event\User\UserGroupAfterDeleteEvent; +use Joomla\CMS\Event\User\UserGroupBeforeDeleteEvent; use Joomla\CMS\Factory; use Joomla\CMS\Form\Form; use Joomla\CMS\Language\Text; @@ -239,15 +241,17 @@ public function save($data) public function delete(&$pks) { // Typecast variable. - $pks = (array) $pks; - $user = $this->getCurrentUser(); - $groups = Access::getGroupsByUser($user->get('id')); + $pks = (array) $pks; + $user = $this->getCurrentUser(); + $groups = Access::getGroupsByUser($user->get('id')); + $context = $this->option . '.' . $this->name; + $dispatcher = $this->getDispatcher(); // Get a row instance. $table = $this->getTable(); // Load plugins. - PluginHelper::importPlugin($this->events_map['delete']); + PluginHelper::importPlugin($this->events_map['delete'], null, true, $dispatcher); // Check if I am a Super Admin $iAmSuperAdmin = $user->authorise('core.admin'); @@ -279,7 +283,18 @@ public function delete(&$pks) if ($allow) { // Fire the before delete event. - Factory::getApplication()->triggerEvent($this->event_before_delete, [$table->getProperties()]); + $beforeDeleteEvent = new UserGroupBeforeDeleteEvent($this->event_before_delete, [ + 'data' => $table->getProperties(), // @TODO: Remove data argument in Joomla 6, see UserGroupBeforeDeleteEvent + 'context' => $context, + 'subject' => $table, + ]); + $result = $dispatcher->dispatch($this->event_before_delete, $beforeDeleteEvent)->getArgument('result', []); + + if (\in_array(false, $result, true)) { + $this->setError($table->getError()); + + return false; + } if (!$table->delete($pk)) { $this->setError($table->getError()); @@ -288,7 +303,13 @@ public function delete(&$pks) } // Trigger the after delete event. - Factory::getApplication()->triggerEvent($this->event_after_delete, [$table->getProperties(), true, $this->getError()]); + $dispatcher->dispatch($this->event_after_delete, new UserGroupAfterDeleteEvent($this->event_after_delete, [ + 'data' => $table->getProperties(), // @TODO: Remove data argument in Joomla 6, see UserGroupAfterDeleteEvent + 'deletingResult' => true, // @TODO: Remove deletingResult argument in Joomla 6, see UserGroupAfterDeleteEvent + 'errorMessage' => $this->getError(), // @TODO: Remove errorMessage argument in Joomla 6, see UserGroupAfterDeleteEvent + 'context' => $context, + 'subject' => $table, + ])); } else { // Prune items that you can't change. unset($pks[$i]); diff --git a/administrator/language/en-GB/com_joomlaupdate.ini b/administrator/language/en-GB/com_joomlaupdate.ini index fee35ae70dbca..9a0101aa11e81 100644 --- a/administrator/language/en-GB/com_joomlaupdate.ini +++ b/administrator/language/en-GB/com_joomlaupdate.ini @@ -179,6 +179,11 @@ COM_JOOMLAUPDATE_VIEW_UPDATE_FINALISE_HEAD_DESC="To complete the update Process COM_JOOMLAUPDATE_VIEW_UPDATE_PERCENT="Percent complete" COM_JOOMLAUPDATE_VIEW_UPLOAD_CAPTIVE_INTRO_BODY="Make sure that the update file you have uploaded comes from the official Joomla download page. Afterwards, please confirm that you want to install it by re-entering the login information for your site "%s" below." COM_JOOMLAUPDATE_VIEW_UPLOAD_CAPTIVE_INTRO_HEAD="Are you sure you want to install the file you uploaded?" +COM_JOOMLAUPDATE_VIEW_UPLOAD_ERROR_DOWNGRADE="The update package file has a lower version than the current Joomla version. You cannot downgrade a Joomla site." +COM_JOOMLAUPDATE_VIEW_UPLOAD_ERROR_INSTALL_PACKAGE="The uploaded package file looks like it is a full installation package of Joomla which can only be used for creating new sites. You can only use the \"Upgrade Package (.zip)\" to update your site." +COM_JOOMLAUPDATE_VIEW_UPLOAD_ERROR_NO_MANIFEST_FILE="The uploaded package file is not a Joomla update package. It does not contain the \"administrator/manifests/files/joomla.xml\" file." +COM_JOOMLAUPDATE_VIEW_UPLOAD_ERROR_NO_VERSION_FOUND="The uploaded package file is not a Joomla update package. It does not contain valid version information." +COM_JOOMLAUPDATE_VIEW_UPLOAD_ERROR_PACKAGE_OPEN="The uploaded package file is either not a ZIP file or is corrupted." COM_JOOMLAUPDATE_VIEW_UPLOAD_PACKAGE_FILE="Joomla package file" COM_JOOMLAUPDATE_XML_DESCRIPTION="Updates Joomla to the latest version with one click." diff --git a/administrator/language/en-GB/com_templates.ini b/administrator/language/en-GB/com_templates.ini index b92b6b5d4d77d..8113e34f3106c 100644 --- a/administrator/language/en-GB/com_templates.ini +++ b/administrator/language/en-GB/com_templates.ini @@ -209,6 +209,7 @@ COM_TEMPLATES_OVERRIDE_NOT_UPTODATE="The original of the template override files COM_TEMPLATES_OVERRIDE_SOURCE="Update Source" COM_TEMPLATES_OVERRIDE_TEMPLATE_FILE="Template File" COM_TEMPLATES_OVERRIDE_UPTODATE="Override files are up to date. Nothing has been changed in the last extension or Joomla update." +COM_TEMPLATES_OVERRIDE_UPDATED_FILES_CAPTION="Updated files to check." COM_TEMPLATES_PREVIEW="Preview" COM_TEMPLATES_RENAME_FILE="Rename file %s" COM_TEMPLATES_RESIZE_IMAGE="Resize Image" diff --git a/administrator/modules/mod_menu/src/Menu/CssMenu.php b/administrator/modules/mod_menu/src/Menu/CssMenu.php index fa3da63d4fd1c..cbf908967090c 100644 --- a/administrator/modules/mod_menu/src/Menu/CssMenu.php +++ b/administrator/modules/mod_menu/src/Menu/CssMenu.php @@ -270,7 +270,7 @@ protected function preprocess($parent) */ $children = $dispatcher->dispatch('onPreprocessMenuItems', new PreprocessMenuItemsEvent('onPreprocessMenuItems', [ 'context' => 'com_menus.administrator.module', - 'subject' => &$children, // TODO: Remove reference in Joomla 6, see PreprocessMenuItemsEvent::__constructor() + 'subject' => &$children, // @todo: Remove reference in Joomla 6, see PreprocessMenuItemsEvent::__constructor() 'params' => $this->params, 'enabled' => $this->enabled, ]))->getArgument('subject', $children); diff --git a/administrator/modules/mod_privacy_status/src/Helper/PrivacyStatusHelper.php b/administrator/modules/mod_privacy_status/src/Helper/PrivacyStatusHelper.php index d39a685f5c344..f290d7a2146e7 100644 --- a/administrator/modules/mod_privacy_status/src/Helper/PrivacyStatusHelper.php +++ b/administrator/modules/mod_privacy_status/src/Helper/PrivacyStatusHelper.php @@ -54,7 +54,7 @@ public static function getPrivacyPolicyInfo() return $dispatcher->dispatch( 'onPrivacyCheckPrivacyPolicyPublished', new CheckPrivacyPolicyPublishedEvent('onPrivacyCheckPrivacyPolicyPublished', [ - 'subject' => &$policy, // TODO: Remove reference in Joomla 6, see CheckPrivacyPolicyPublishedEvent::__constructor() + 'subject' => &$policy, // @todo: Remove reference in Joomla 6, see CheckPrivacyPolicyPublishedEvent::__constructor() ]) )->getArgument('subject', $policy); } diff --git a/administrator/modules/mod_stats_admin/src/Helper/StatsAdminHelper.php b/administrator/modules/mod_stats_admin/src/Helper/StatsAdminHelper.php index 7e34b4a8275d5..20399e03d4c18 100644 --- a/administrator/modules/mod_stats_admin/src/Helper/StatsAdminHelper.php +++ b/administrator/modules/mod_stats_admin/src/Helper/StatsAdminHelper.php @@ -136,7 +136,7 @@ public static function getStats(Registry $params, CMSApplication $app, DatabaseI $rows[$i]->title = $row['title']; $rows[$i]->icon = $row['icon'] ?? 'info'; $rows[$i]->data = $row['data']; - $rows[$i]->link = isset($row['link']) ? $row['link'] : null; + $rows[$i]->link = $row['link'] ?? null; $i++; } } diff --git a/administrator/modules/mod_submenu/src/Menu/Menu.php b/administrator/modules/mod_submenu/src/Menu/Menu.php index 3e2d5cd4a9a68..d00d87a993162 100644 --- a/administrator/modules/mod_submenu/src/Menu/Menu.php +++ b/administrator/modules/mod_submenu/src/Menu/Menu.php @@ -55,7 +55,7 @@ public static function preprocess($parent) */ $children = $dispatcher->dispatch('onPreprocessMenuItems', new PreprocessMenuItemsEvent('onPreprocessMenuItems', [ 'context' => 'administrator.module.mod_submenu', - 'subject' => &$children, // TODO: Remove reference in Joomla 6, see PreprocessMenuItemsEvent::__constructor() + 'subject' => &$children, // @todo: Remove reference in Joomla 6, see PreprocessMenuItemsEvent::__constructor() 'params' => null, 'enabled' => true, ]))->getArgument('subject', $children); diff --git a/api/components/com_categories/src/Controller/CategoriesController.php b/api/components/com_categories/src/Controller/CategoriesController.php index 2b1da3832009b..9daa21a1e27df 100644 --- a/api/components/com_categories/src/Controller/CategoriesController.php +++ b/api/components/com_categories/src/Controller/CategoriesController.php @@ -54,7 +54,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); diff --git a/api/components/com_contact/src/Controller/ContactController.php b/api/components/com_contact/src/Controller/ContactController.php index 93bae10c1e30a..aff36e39b6d6a 100644 --- a/api/components/com_contact/src/Controller/ContactController.php +++ b/api/components/com_contact/src/Controller/ContactController.php @@ -153,7 +153,7 @@ public function submitForm($id = null) // Validation succeeded, continue with custom handlers $results = $this->getDispatcher()->dispatch('onValidateContact', new ValidateContactEvent('onValidateContact', [ 'subject' => $contact, - 'data' => &$data, // TODO: Remove reference in Joomla 6, @deprecated: Data modification onValidateContact is not allowed, use onSubmitContact instead + 'data' => &$data, // @todo: Remove reference in Joomla 6, @deprecated: Data modification onValidateContact is not allowed, use onSubmitContact instead ]))->getArgument('result', []); foreach ($results as $result) { @@ -165,7 +165,7 @@ public function submitForm($id = null) // Passed Validation: Process the contact plugins to integrate with other applications $event = $this->getDispatcher()->dispatch('onSubmitContact', new SubmitContactEvent('onSubmitContact', [ 'subject' => $contact, - 'data' => &$data, // TODO: Remove reference in Joomla 6, see SubmitContactEvent::__constructor() + 'data' => &$data, // @todo: Remove reference in Joomla 6, see SubmitContactEvent::__constructor() ])); // Get the final data $data = $event->getArgument('data', $data); diff --git a/api/components/com_content/src/View/Articles/JsonapiView.php b/api/components/com_content/src/View/Articles/JsonapiView.php index f04648193777e..9e8e2e06cdc34 100644 --- a/api/components/com_content/src/View/Articles/JsonapiView.php +++ b/api/components/com_content/src/View/Articles/JsonapiView.php @@ -219,10 +219,8 @@ protected function prepareItem($item) } if (!empty($item->tags->tags)) { - $tagsIds = explode(',', $item->tags->tags); - $tagsNames = $item->tagsHelper->getTagNames($tagsIds); - - $item->tags = array_combine($tagsIds, $tagsNames); + $tagsIds = explode(',', $item->tags->tags); + $item->tags = $item->tagsHelper->getTags($tagsIds); } else { $item->tags = []; $tags = new TagsHelper(); @@ -230,8 +228,7 @@ protected function prepareItem($item) if (!empty($tagsIds)) { $tagsIds = explode(',', $tagsIds); - $tagsNames = $tags->getTagNames($tagsIds); - $item->tags = array_combine($tagsIds, $tagsNames); + $item->tags = $tags->getTags($tagsIds); } } diff --git a/api/components/com_users/src/Controller/UsersController.php b/api/components/com_users/src/Controller/UsersController.php index ca3989abd8d53..21b75eb2e0ac2 100644 --- a/api/components/com_users/src/Controller/UsersController.php +++ b/api/components/com_users/src/Controller/UsersController.php @@ -64,8 +64,18 @@ protected function preprocessSaveData(array $data): array } } - if (isset($data['password']) && $this->task !== 'add') { - $data['password2'] = $data['password']; + if ($this->input->getMethod() === 'PATCH') { + $body = $this->input->get('data', json_decode($this->input->json->getRaw(), true), 'array'); + + if (!\array_key_exists('password', $body)) { + unset($data['password']); + } + } + + if ($this->input->getMethod() === 'POST') { + if (isset($data['password'])) { + $data['password2'] = $data['password']; + } } return $data; diff --git a/build/check_ruleset_xml.php b/build/check_ruleset_xml.php new file mode 100644 index 0000000000000..503d875fea3b7 --- /dev/null +++ b/build/check_ruleset_xml.php @@ -0,0 +1,106 @@ + - Path to the PHPCS ruleset XML file to be checked, defaults to 'ruleset.xml' in the parent folder. + * --fix - Fix the XML file if any obsolete exclude patterns were found.. + * --help - Show the help and exit. + * + * @package Joomla.Build + * + * @copyright (C) 2023 Open Source Matters, Inc. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +function usage($command) +{ + echo PHP_EOL; + echo 'Usage: php ' . $command . ' [options]' . PHP_EOL; + echo PHP_EOL; + echo "[options]:" . PHP_EOL; + echo "--file :\tPath to the PHPCS ruleset XML file to be checked, defaults to '" . dirname(__DIR__) . "/ruleset.xml'." . PHP_EOL; + echo "--fix:\t\tFix the XML file if any obsolete exclude patterns were found." . PHP_EOL; + echo "--help:\t\tShow this help output." . PHP_EOL; + echo PHP_EOL; +} + +$options = getopt('', ['file:', 'fix', 'help']); + +if (isset($options['help'])) { + usage($argv[0]); + + exit(0); +} + +$rulesetFile = $options['file'] ?? dirname(__DIR__) . '/ruleset.xml'; + +// Exclude patterns to be skipped from the check because the file or folder might not exist +$ignoreList = [ + '^configuration.php', + '^libraries/vendor/*', + '^media/*', + '^node_modules/*', +]; + +echo "Checking file '" . $rulesetFile . "' ..." . PHP_EOL; + +$rulesetLines = file($rulesetFile, FILE_IGNORE_NEW_LINES); +$obsoleteLineIdxs = []; + +foreach ($rulesetLines as $line => $text) { + if (!preg_match('/^(?:\s*)(.*)(?:<\/exclude-pattern>\s*)$/', $text, $matches)) { + continue; + } + + if (in_array($matches[1], $ignoreList)) { + continue; + } + + // Unescape dots + $path = str_replace('\.', '.', $matches[1]); + + // Remove start of string anchor if used + if (substr($path, 0, 1) === '^') { + $path = substr($path, 1); + } + + // Remove asterisk from the end of paths of folders + if (substr($path, -2) === '/*') { + $path = substr($path, 0, -1); + } + + if (substr($path, -1) === '/') { + if (!is_dir(dirname(__DIR__) . '/' . $path)) { + echo 'Line no. ' . $line + 1 . ': Folder "' . $path . '" doesn\'t exist.' . PHP_EOL; + $obsoleteLineIdxs[] = $line; + } + } elseif (!is_file(dirname(__DIR__) . '/' . $path)) { + echo 'Line no. ' . $line + 1 . ': File "' . $path . '" doesn\'t exist.' . PHP_EOL; + $obsoleteLineIdxs[] = $line; + } +} + +echo "... done." . PHP_EOL; + +if (!count($obsoleteLineIdxs)) { + echo "No obsolete lines found." . PHP_EOL; + + exit(0); +} + +if (!isset($options['fix'])) { + exit(0); +} + +foreach ($obsoleteLineIdxs as $line) { + unset($rulesetLines[$line]); +} + +echo "Updating file '" . $rulesetFile . "' ..." . PHP_EOL; + +file_put_contents($rulesetFile, implode(PHP_EOL, $rulesetLines)); + +echo "... done." . PHP_EOL; diff --git a/build/media_source/com_finder/css/dates.css b/build/media_source/com_finder/css/dates.css index f457892c5ff5c..8913a2582a125 100644 --- a/build/media_source/com_finder/css/dates.css +++ b/build/media_source/com_finder/css/dates.css @@ -1,22 +1,22 @@ #finder-filter-window { - margin: 10px 0 10px; - overflow: auto; - padding: 0; width: 100%; + padding: 0; + margin: 10px 0; + overflow: auto; } ul#finder-filter-select-dates { - list-style: none; - margin: 0; padding: 0; + margin: 0; + list-style: none; } ul#finder-filter-select-dates li.filter-date { - background: none; - list-style: none; - margin: 0; - padding: 5px 0; width: 49%; + padding: 5px 0; + margin: 0; + list-style: none; + background: none; } ul#finder-filter-select-dates li.filter-date select.filter-date-operator { diff --git a/build/media_source/com_finder/css/finder.css b/build/media_source/com_finder/css/finder.css index 683f662b06b8b..ffef50a539fd3 100644 --- a/build/media_source/com_finder/css/finder.css +++ b/build/media_source/com_finder/css/finder.css @@ -30,16 +30,16 @@ * Styling search result items list */ .com-finder__results-list { - list-style: none; padding: 0; + list-style: none; } /** * Styling search result item */ .result__item + .result__item { - margin-top: 1.5em; padding-top: 1.5em; + margin-top: 1.5em; border-top: 1px solid currentColor; } @@ -63,8 +63,8 @@ .result__title-url { order: -1; margin-bottom: .25em; - color: hsl(0, 0%, 34%); font-style: normal; + color: hsl(0, 0%, 34%); } .result__title-link:focus, @@ -111,19 +111,20 @@ } .result__item .highlight:before { - content: ''; position: absolute; - z-index: -1; top: 50%; left: 50%; - -webkit-transform: translate(-50%, -50%); - -ms-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); + z-index: -1; width: calc(100% + 6px); height: calc(100% + 2px); - background: hsla(60, 100%, 50%, .5); pointer-events: none; + content: ""; + background: hsla(60, 100%, 50%, .5); border-radius: 3px; + /* stylelint-disable */ + -webkit-transform: translate(-50%, -50%); + /* stylelint-enable */ + transform: translate(-50%, -50%); } /** diff --git a/build/media_source/com_finder/css/indexer.css b/build/media_source/com_finder/css/indexer.css index a3634b3deb3c9..3098ede7dd02c 100644 --- a/build/media_source/com_finder/css/indexer.css +++ b/build/media_source/com_finder/css/indexer.css @@ -4,10 +4,10 @@ } h1.finder-error { - color: #FF0000; + color: #f00; } p.finder-error { - color: #FF0000; font-weight: bold; + color: #f00; } diff --git a/build/media_source/com_installer/css/installer.css b/build/media_source/com_installer/css/installer.css index 0b2132474d43a..39b85e610897d 100644 --- a/build/media_source/com_installer/css/installer.css +++ b/build/media_source/com_installer/css/installer.css @@ -5,21 +5,21 @@ #loading { position: fixed; - background-image: url(../../system/images/ajax-loader.gif); - background-color: rgba(255,255,255,.8); + overflow: hidden; + background-color: rgba(255, 255, 255, .8); + background-image: url("../../system/images/ajax-loader.gif"); background-repeat: no-repeat; background-position: center center; opacity: .8; - overflow: hidden; } #dragarea { - background-color: var(--body-bg); - border: 1px dashed #999; box-sizing: border-box; - padding: 5% 0; - transition: all 0.2s ease 0s; width: 100%; + padding: 5% 0; + background-color: var(--body-bg); + border: 1px dashed #999; + transition: all .2s ease 0s; } #dragarea p.lead { @@ -27,18 +27,18 @@ } #upload-icon { - font-size: 48px; width: auto; height: auto; margin: 0; + font-size: 48px; line-height: 175%; color: #999; transition: all .2s; } #dragarea.hover { - border-color: #666; background-color: #eee; + border-color: #666; } #dragarea.hover #upload-icon, @@ -53,9 +53,11 @@ /* Default transition (.3s) is too slow, progress will not run to 100% */ .upload-progress .progress .bar { + /* stylelint-disable */ -webkit-transition: width .1s; -moz-transition: width .1s; -o-transition: width .1s; + /* stylelint-enable */ transition: width .1s; } diff --git a/build/media_source/com_languages/css/overrider.css b/build/media_source/com_languages/css/overrider.css index 47c0b8d35b257..218fa0b6a4946 100644 --- a/build/media_source/com_languages/css/overrider.css +++ b/build/media_source/com_languages/css/overrider.css @@ -33,8 +33,9 @@ } .result-key { - color:#666; + color: #666; } + .result-string { padding-inline-start: 20px; } diff --git a/build/media_source/com_media/scss/_variables.scss b/build/media_source/com_media/scss/_variables.scss index a3b6d1fd3a37e..c8f64e04e37f5 100644 --- a/build/media_source/com_media/scss/_variables.scss +++ b/build/media_source/com_media/scss/_variables.scss @@ -4,6 +4,7 @@ $highlight-color: #2a69b8; $border-color: var(--template-bg-dark-7); $border-radius: .25rem; $box-shadow-color: var(--template-bg-dark-50); +$container-bg: var(--com-media-manager-content-bg, #fff); // Layout $col-main-panel-width: 83.3333%; @@ -12,18 +13,18 @@ $col-gutter-width: $gutter-width; $col-box-shadow: 0 2px 10px -8px $box-shadow-color; // Sidebar -$sidebar-drive-bg: var(--media-manager-content-bg, #fff); +$sidebar-drive-bg: var(--com-media-manager-content-bg, #fff); $sidebar-tree-line-color: $border-color; $sidebar-tree-icon-color: var(--template-bg-dark-60); $sidebar-tree-line-height: 26px; $sidebar-tree-folder-icon: "\f07b"; $sidebar-tree-item-hover-bg: #e1e1e1; $sidebar-active-icon-color: $highlight-color; -$sidebar-disk-name-color: var(--media-manager-disk-name-color, var(--template-bg-dark)); +$sidebar-disk-name-color: var(--com-media-manager-disk-name-color, var(--template-bg-dark)); // Toolbar $toolbar-height: 46px; -$toolbar-bg: var(--media-manager-content-bg, #fff); +$toolbar-bg: var(--com-media-manager-content-bg, #fff); $toolbar-icon-width: 50px; $toolbar-icon-color: var(--template-bg-dark-60); $toolbar-icon-bg-hover: #f0f0f0; @@ -33,11 +34,11 @@ $toolbar-icon-active-bg-color: var(--template-bg-dark-60); $toolbar-icon-active-bg-color-hover: var(--template-bg-dark-80); // Breadcrumbs -$breadcrumbs-bg: var(--media-manager-overlay-bg, var(--template-bg-dark-3)); -$breadcrumbs-current-bg: var(--media-manager-content-bg, #fff); +$breadcrumbs-bg: var(--com-media-manager-overlay-bg, var(--template-bg-dark-3)); +$breadcrumbs-current-bg: var(--com-media-manager-content-bg, #fff); // Media Browser -$browser-background-color: var(--media-manager-overlay-bg, var(--template-bg-dark-3)); +$browser-background-color: var(--com-media-manager-overlay-bg, var(--template-bg-dark-3)); // Media Browser Grid $grid-gutter-width: $col-gutter-width; @@ -66,10 +67,10 @@ $table-item-icon-bg-selected: #006898; $table-item-bg-hover: rgba(0, 0, 0, .03); // Media Info bar -$info-bg: var(--media-manager-overlay-bg, var(--template-bg-dark-3)); -$info-title-bg: var(--media-manager-overlay-header-bg, var(--template-bg-dark-5)); +$info-bg: var(--com-media-manager-overlay-bg, var(--template-bg-dark-3)); +$info-title-bg: var(--com-media-manager-overlay-header-bg, var(--template-bg-dark-5)); $info-dt-width: 33.33333%; -$info-dt-color: var(--media-manager-infobar-dt-color, rgba(0, 0, 0, .54)); +$info-dt-color: var(--com-media-manager-infobar-dt-color, rgba(0, 0, 0, .54)); $info-dd-width: 66.66667%; $info-close-color: var(--template-bg-dark-60); $info-close-color-hover: var(--template-bg-dark-40); diff --git a/build/media_source/com_media/scss/components/_layout.scss b/build/media_source/com_media/scss/components/_layout.scss index af86c18aa9a2c..ff24b66421435 100644 --- a/build/media_source/com_media/scss/components/_layout.scss +++ b/build/media_source/com_media/scss/components/_layout.scss @@ -3,7 +3,7 @@ display: flex; flex-wrap: wrap; margin-top: 1rem; - background-color: var(--media-manager-content-bg, #fff); + background-color: $container-bg; border-radius: $border-radius; box-shadow: $col-box-shadow; diff --git a/build/media_source/com_media/scss/components/_media-toolbar.scss b/build/media_source/com_media/scss/components/_media-toolbar.scss index ed03c2bac4b6a..14e070f8dbedb 100644 --- a/build/media_source/com_media/scss/components/_media-toolbar.scss +++ b/build/media_source/com_media/scss/components/_media-toolbar.scss @@ -23,7 +23,6 @@ background-color: transparent; border: 0; border-inline-start: 1px solid $border-color; - box-shadow: 1px 0 #fefefe inset; &.active { color: #fff; background-color: $toolbar-icon-active-bg-color; diff --git a/build/media_source/com_menus/css/admin-item-edit_container.css b/build/media_source/com_menus/css/admin-item-edit_container.css index ac91fccb18d13..a9a49530300a6 100644 --- a/build/media_source/com_menus/css/admin-item-edit_container.css +++ b/build/media_source/com_menus/css/admin-item-edit_container.css @@ -7,7 +7,7 @@ display: none !important; } .checkbox-toggle[disabled] ~ .btn-hide { - opacity: 0.5; + opacity: .5; } .checkbox-toggle ~ .btn-show { display: inline; diff --git a/build/media_source/com_scheduler/css/admin-view-task.css b/build/media_source/com_scheduler/css/admin-view-task.css index fa9fea928e813..6ab0465f87296 100644 --- a/build/media_source/com_scheduler/css/admin-view-task.css +++ b/build/media_source/com_scheduler/css/admin-view-task.css @@ -1,6 +1,6 @@ .match-custom .control-group .control-label { width: auto; - padding: 0 0 0 0; + padding: 0; } .match-custom .control-group .controls { diff --git a/build/media_source/com_scheduler/css/admin-view-tasks.css b/build/media_source/com_scheduler/css/admin-view-tasks.css index 73cc393909181..6c56b3436ae5d 100644 --- a/build/media_source/com_scheduler/css/admin-view-tasks.css +++ b/build/media_source/com_scheduler/css/admin-view-tasks.css @@ -1,5 +1,5 @@ .task-title span.failure-indicator { position: relative; - bottom: 0.5em; + bottom: .5em; color: #ffb514; } diff --git a/build/media_source/com_templates/css/admin-templates-default.css b/build/media_source/com_templates/css/admin-templates-default.css index fc199a722b84b..ad23632aee633 100644 --- a/build/media_source/com_templates/css/admin-templates-default.css +++ b/build/media_source/com_templates/css/admin-templates-default.css @@ -4,14 +4,14 @@ */ .selected { - background: #08c; color: #fff; + background: #08c; } .selected:hover, .selected:focus { - background: #08c !important; color: #fff; + background: #08c !important; } #deleteFolder { @@ -19,8 +19,8 @@ } #image-crop { - max-width: 100% !important; width: auto; + max-width: 100% !important; height: auto; } @@ -44,8 +44,8 @@ } .modal-body .col-md-4, .modal-body .col-md-8 { - padding-left: 0; padding-right: 0; + padding-left: 0; } .card-body .mt-2 { font-size: 12px; @@ -65,7 +65,7 @@ } #core-pane .CodeMirror-code { - background-color: #F0F0EE; + background-color: #f0f0ee; } .switcher-label-0, .switcher-label-1 { @@ -102,20 +102,22 @@ } .diff-wrapper.diff { - --tab-size: 4; - background: repeating-linear-gradient(-45deg, whitesmoke, whitesmoke 0.5em, #e8e8e8 0.5em, #e8e8e8 1em); - border-collapse: collapse; - border-spacing: 0; - color: black; - empty-cells: show; + width: 100%; font-family: monospace; font-size: 13px; - width: 100%; + --tab-size: 4; + color: #000; + empty-cells: show; + border-spacing: 0; + border-collapse: collapse; + background: repeating-linear-gradient(-45deg, #f5f5f5, #f5f5f5 .5em, #e8e8e8 .5em, #e8e8e8 1em); } .diff-wrapper.diff th { font-weight: 700; cursor: default; + /* stylelint-disable */ -webkit-user-select: none; + /* stylelint-enable */ user-select: none; } .diff-wrapper.diff td { @@ -123,29 +125,29 @@ } .diff-wrapper.diff td, .diff-wrapper.diff th { - border-collapse: separate; - border: none; padding: 1px 2px; + border-collapse: separate; background: #fff; + border: none; } .diff-wrapper.diff td:empty:after, .diff-wrapper.diff th:empty:after { - content: " "; visibility: hidden; + content: " "; } .diff-wrapper.diff td a, .diff-wrapper.diff th a { color: #000; - cursor: inherit; pointer-events: none; + cursor: inherit; } .diff-wrapper.diff thead th { - background: #f7f7f7; - border-bottom: 1px solid #ddd; - padding: 4px; - text-align: left; position: sticky; top: 0; + padding: 4px; + text-align: left; + background: #f7f7f7; + border-bottom: 1px solid #ddd; } .diff-wrapper.diff tbody.skipped { border-top: 1px solid #ddd; @@ -155,24 +157,24 @@ display: none; } .diff-wrapper.diff tbody th { - color: #999; - background: #f7f7f7; - border-right: 1px solid #ddd; - text-align: right; - vertical-align: top; width: 4em; padding-right: 2em; font-weight: 400; + color: #999; + text-align: right; + vertical-align: top; + background: #f7f7f7; + border-right: 1px solid #ddd; } .diff-wrapper.diff th.n-new { border-left: 1px solid #ddd; } .diff-wrapper.diff tbody th.sign { - background: #fff; - border-left: 1px solid #ddd; + width: 1em; padding: 1px 0; text-align: center; - width: 1em; + background: #fff; + border-left: 1px solid #ddd; } .diff-wrapper.diff tbody th.sign.del { background: #fbe1e1; @@ -181,14 +183,14 @@ background: #e1fbe1; } .diff-wrapper.diff.diff-html { - white-space: pre-wrap; tab-size: var(--tab-size); + white-space: pre-wrap; } .diff-wrapper.diff.diff-html .ch { line-height: 1em; - background-clip: border-box; background-repeat: repeat-x; background-position: left center; + background-clip: border-box; } .diff-wrapper.diff.diff-html .ch.sp { background-image: url('data:image/svg+xml,%3Csvg preserveAspectRatio="xMinYMid meet" viewBox="0 0 12 24" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M4.5 11C4.5 10.1716 5.17157 9.5 6 9.5C6.82843 9.5 7.5 10.1716 7.5 11C7.5 11.8284 6.82843 12.5 6 12.5C5.17157 12.5 4.5 11.8284 4.5 11Z" fill="rgba%2860, 60, 60, 50%25%29"/%3E%3C/svg%3E'); @@ -196,8 +198,8 @@ } .diff-wrapper.diff.diff-html .ch.tab { background-image: url('data:image/svg+xml,%3Csvg preserveAspectRatio="xMinYMid meet" viewBox="0 0 12 24" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M9.5 10.44L6.62 8.12L7.32 7.26L12.04 11V11.44L7.28 14.9L6.62 13.9L9.48 11.78H0V10.44H9.5Z" fill="rgba%2860, 60, 60, 50%25%29"/%3E%3C/svg%3E'); - background-size: calc(var(--tab-size) * 1ch) 1.25em; background-position: 2px center; + background-size: calc(var(--tab-size) * 1ch) 1.25em; } .diff-wrapper.diff.diff-html.diff-combined .change.change-rep .rep { white-space: normal; @@ -218,8 +220,8 @@ .diff-wrapper.diff.diff-html .change .old.none, .diff-wrapper.diff.diff-html .change .new.none, .diff-wrapper.diff.diff-html .change .rep.none { - background: transparent; cursor: not-allowed; + background: transparent; } .diff-wrapper.diff.diff-html .change ins, .diff-wrapper.diff.diff-html .change del { diff --git a/build/media_source/layouts/css/chromes/outline.css b/build/media_source/layouts/css/chromes/outline.css index fa78e6bd85568..14d7f0863c69b 100644 --- a/build/media_source/layouts/css/chromes/outline.css +++ b/build/media_source/layouts/css/chromes/outline.css @@ -1,8 +1,8 @@ .mod-preview { + margin: 8px 0; background: rgba(100,100,100,.08); - box-shadow: 0 0 0 4px #f4f4f4, 0 0 0 5px rgba(100,100,100,.2); border-radius: 1px; - margin: 8px 0; + box-shadow: 0 0 0 4px #f4f4f4, 0 0 0 5px rgba(100,100,100,.2); } .mod-preview-info { @@ -11,7 +11,7 @@ font-family: Arial, sans-serif; font-size: .75rem; line-height: 1rem; - color: white; + color: #fff; background-color: #33373f; border-radius: 3px; box-shadow: 0 -10px 20px rgba(0,0,0,.2) inset; diff --git a/build/media_source/plg_content_vote/css/rating.css b/build/media_source/plg_content_vote/css/rating.css index 671818a6e5ee7..092809c372a65 100644 --- a/build/media_source/plg_content_vote/css/rating.css +++ b/build/media_source/plg_content_vote/css/rating.css @@ -1,7 +1,7 @@ .content_rating ul { - list-style: none; + margin-bottom: .5em; padding-inline-start: 0; - margin-bottom: 0.5em; + list-style: none; } .content_rating .vote-star, diff --git a/build/media_source/plg_system_debug/css/debug.css b/build/media_source/plg_system_debug/css/debug.css index 630330f1e9f6e..33ad977a84f03 100644 --- a/build/media_source/plg_system_debug/css/debug.css +++ b/build/media_source/plg_system_debug/css/debug.css @@ -5,7 +5,7 @@ /* Debug Bar */ .phpdebugbar-badge { - color: white !important; + color: #fff !important; background-color: rgb(40,70,106) !important; } diff --git a/build/media_source/plg_system_debug/widgets/info/widget.css b/build/media_source/plg_system_debug/widgets/info/widget.css index dde61d6a012e2..1be479828d80b 100644 --- a/build/media_source/plg_system_debug/widgets/info/widget.css +++ b/build/media_source/plg_system_debug/widgets/info/widget.css @@ -1,32 +1,32 @@ table.phpdebugbar-widgets-info { - margin-left: 5px; - margin-top: 5px; - width: 75%; - font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; - line-height: 1.3em; + width: 75%; + margin-top: 5px; + margin-left: 5px; + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; + line-height: 1.3em; } table.phpdebugbar-widgets-info td { - border-bottom: 1px solid silver; - padding-right: 10px; + padding-right: 10px; + border-bottom: 1px solid #c0c0c0; } table.phpdebugbar-widgets-info dt { - float: left; - width: 30%; - text-align: left; - padding: .25em; - clear: left; + float: left; + width: 30%; + padding: .25em; + clear: left; + text-align: left; } table.phpdebugbar-widgets-info dd { - float: left; - width: 60%; - padding: .25em 0; + float: left; + width: 60%; + padding: .25em 0; } table.phpdebugbar-widgets-info dl:after { - content: ""; - display: table; - clear: both; + display: table; + clear: both; + content: ""; } diff --git a/build/media_source/plg_system_debug/widgets/languageErrors/widget.css b/build/media_source/plg_system_debug/widgets/languageErrors/widget.css index 2be07985cad15..7930492354e74 100644 --- a/build/media_source/plg_system_debug/widgets/languageErrors/widget.css +++ b/build/media_source/plg_system_debug/widgets/languageErrors/widget.css @@ -1,6 +1,6 @@ ul.phpdebugbar-widgets-languageErrors { - margin-left: 5px; - margin-top: 5px; - font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; - line-height: 1.3em; + margin-top: 5px; + margin-left: 5px; + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; + line-height: 1.3em; } diff --git a/build/media_source/plg_system_debug/widgets/languageFiles/widget.css b/build/media_source/plg_system_debug/widgets/languageFiles/widget.css index e1920b78c7053..0153ef695f843 100644 --- a/build/media_source/plg_system_debug/widgets/languageFiles/widget.css +++ b/build/media_source/plg_system_debug/widgets/languageFiles/widget.css @@ -1,17 +1,17 @@ table.phpdebugbar-widgets-languageFiles { - margin-left: 5px; - margin-top: 5px; - font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; - line-height: 1.3em; + margin-top: 5px; + margin-left: 5px; + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; + line-height: 1.3em; } table.phpdebugbar-widgets-languageFiles tr { - border-bottom: 1px solid silver; + border-bottom: 1px solid #c0c0c0; } table.phpdebugbar-widgets-languageFiles th { - font-weight: bold; - padding: 5px; + padding: 5px; + font-weight: bold; } .phpdebugbar-widgets-languageFiles .alert-success, diff --git a/build/media_source/plg_system_debug/widgets/languageStrings/widget.css b/build/media_source/plg_system_debug/widgets/languageStrings/widget.css index dd7c8595c1679..143c190fe8569 100644 --- a/build/media_source/plg_system_debug/widgets/languageStrings/widget.css +++ b/build/media_source/plg_system_debug/widgets/languageStrings/widget.css @@ -1,58 +1,58 @@ table.phpdebugbar-widgets-languageStrings { - margin-left: 5px; - margin-top: 5px; - width: 100%; - font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; - line-height: 1.3em; + width: 100%; + margin-top: 5px; + margin-left: 5px; + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; + line-height: 1.3em; } table.phpdebugbar-widgets-languageStrings th { - border-bottom: 1px solid black; + border-bottom: 1px solid #000; } table.phpdebugbar-widgets-languageStrings table.phpdebugbar-widgets-callstack { - display: none; - width: 100%; - margin: 10px; - border: 1px solid #ddd; - font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; - border-collapse: collapse; + display: none; + width: 100%; + margin: 10px; + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; + border-collapse: collapse; + border: 1px solid #ddd; } table.phpdebugbar-widgets-languageStrings table.phpdebugbar-widgets-callstack tr.caller { - background-color: #fff9b6; + background-color: #fff9b6; } table.phpdebugbar-widgets-languageStrings table.phpdebugbar-widgets-callstack tbody tr:hover { - background-color: #eee; + background-color: #eee; } table.phpdebugbar-widgets-languageStrings table.phpdebugbar-widgets-callstack th { - font-weight: bold; + font-weight: bold; } table.phpdebugbar-widgets-languageStrings span.phpdebugbar-widgets-eye, table.phpdebugbar-widgets-languageStrings span.phpdebugbar-widgets-eye-dash { - margin-left: 8px; - color: #888; + margin-left: 8px; + color: #888; } table.phpdebugbar-widgets-languageStrings span.phpdebugbar-widgets-eye-dash { - color: #000; - background-color: #eee; + color: #000; + background-color: #eee; } table.phpdebugbar-widgets-languageStrings span.phpdebugbar-widgets-eye:before, table.phpdebugbar-widgets-languageStrings span.phpdebugbar-widgets-eye-dash:before { - font-family:"Font Awesome 6 Free"; - margin-right: 4px; - /*font-size: 12px;*/ + margin-right: 4px; + font-family: "Font Awesome 6 Free"; + /*font-size: 12px;*/ } table.phpdebugbar-widgets-languageStrings span.phpdebugbar-widgets-eye:before { - content: "\f06e" + content: "\f06e"; } table.phpdebugbar-widgets-languageStrings span.phpdebugbar-widgets-eye-dash:before { - content: "\f070" + content: "\f070"; } diff --git a/build/media_source/plg_system_debug/widgets/sqlqueries/widget.css b/build/media_source/plg_system_debug/widgets/sqlqueries/widget.css index ed503b2e10839..58c43aa26ddee 100644 --- a/build/media_source/plg_system_debug/widgets/sqlqueries/widget.css +++ b/build/media_source/plg_system_debug/widgets/sqlqueries/widget.css @@ -1,14 +1,14 @@ div.phpdebugbar-widgets-sqlqueries .phpdebugbar-widgets-status { - font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; - padding: 6px 6px; - border-bottom: 1px solid #ddd; - font-weight: bold; - color: #555; - background: #fafafa; + padding: 6px; + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; + font-weight: bold; + color: #555; + background: #fafafa; + border-bottom: 1px solid #ddd; } div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item.phpdebugbar-widgets-error { - color: red; + color: #f00; } div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-database, @@ -19,14 +19,14 @@ div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-copy-clipboard, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-eye, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-eye-dash, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-stmt-id { - float: right; - margin-left: 8px; - color: #888; + float: right; + margin-left: 8px; + color: #888; } div.phpdebugbar-widgets-sqlqueries a.phpdebugbar-widgets-editor-link { - float: right; - margin-left: 8px; + float: right; + margin-left: 8px; } div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-status span.phpdebugbar-widgets-database, @@ -37,7 +37,7 @@ div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-status span.phpdebugb div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-status span.phpdebugbar-widgets-eye, div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-status span.phpdebugbar-widgets-eye-dash, div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-status span.phpdebugbar-widgets-stmt-id { - color: #555; + color: #555; } div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-database:before, @@ -49,145 +49,144 @@ div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-eye:before, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-eye-dash:before, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-stmt-id:before, div.phpdebugbar-widgets-sqlqueries a.phpdebugbar-widgets-editor-link:before { - font-family: "Font Awesome 6 Free"; - margin-right: 4px; - font-size: 12px; - font-weight: 900; + margin-right: 4px; + font-family: "Font Awesome 6 Free"; + font-size: 12px; + font-weight: 900; } div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-database:before { - content: "\f1c0"; + content: "\f1c0"; } div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-duration:before { - content: "\f017"; + content: "\f017"; } div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-memory:before { - content: "\f085"; + content: "\f085"; } div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-row-count:before { - content: "\f0ce"; + content: "\f0ce"; } div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-stmt-id:before { - content: "\f08d"; + content: "\f08d"; } div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-copy-clipboard:before { - content: "\f0c5"; + content: "\f0c5"; } div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-eye:before { - content: "\f06e" + content: "\f06e"; } div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-eye-dash:before { - content: "\f070" + content: "\f070"; } div.phpdebugbar-widgets-sqlqueries a.phpdebugbar-widgets-editor-link:before { - content: "\f08e"; - margin-left: 4px; + margin-left: 4px; + content: "\f08e"; } div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-eye-dash { - background-color: #eee; - padding: 2px; - + padding: 2px; + background-color: #eee; } div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-params { - display: none; - width: 70%; - margin: 10px 0; - border: 1px solid #ddd; - font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; - border-collapse: collapse; + display: none; + width: 70%; + margin: 10px 0; + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; + border-collapse: collapse; + border: 1px solid #ddd; } div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-params td, div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-explain td { - border: 1px solid #ddd; - padding: 3px; + padding: 3px; + border: 1px solid #ddd; } div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-params .phpdebugbar-widgets-name { - width: 20%; - font-weight: bold; + width: 20%; + font-weight: bold; } div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-callstack, -div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-explain{ - display: none; - width: 100%; - margin: 10px 0; - border: 1px solid #ddd; - font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; - border-collapse: collapse; +div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-explain { + display: none; + width: 100%; + margin: 10px 0; + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; + border-collapse: collapse; + border: 1px solid #ddd; } div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-callstack tr.caller { - background-color: #fff9b6; + background-color: #fff9b6; } div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-callstack tbody tr:hover { - background-color: #eee; + background-color: #eee; } div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-callstack th, div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-explain th, -div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-params th{ - font-weight: bold; - padding: 3px; +div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-params th { + padding: 3px; + font-weight: bold; } div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item { - border-bottom: 1px solid blue; - padding: 10px 6px; + padding: 10px 6px; + border-bottom: 1px solid #00f; } div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-error { - display: block; - font-weight: bold; + display: block; + font-weight: bold; } code.phpdebugbar-widgets-sql { - white-space: pre-wrap; - overflow-wrap: break-word; - word-wrap: break-word; + word-wrap: break-word; + overflow-wrap: break-word; + white-space: pre-wrap; } div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item.phpdebugbar-widgets-sql-duplicate { - background-color: #edeff0; + background-color: #edeff0; } div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item.phpdebugbar-widgets-sql-duplicate:hover { - background-color: #ffc; + background-color: #ffc; } div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-toolbar { - display: none; - position: fixed; - bottom: 0; - width: 100%; - background: #fff; - z-index: 1; + position: fixed; + bottom: 0; + z-index: 1; + display: none; + width: 100%; + background: #fff; } div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-toolbar a.phpdebugbar-widgets-filter { - float: right; - font-size: 12px; - padding: 2px 4px; - background: #7cacd5; - margin: 0 2px; - border-radius: 4px; - color: #fff; - text-decoration: none; + float: right; + padding: 2px 4px; + margin: 0 2px; + font-size: 12px; + color: #fff; + text-decoration: none; + background: #7cacd5; + border-radius: 4px; } div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-toolbar a.phpdebugbar-widgets-filter.phpdebugbar-widgets-excluded { - background: #eee; - color: #888; + color: #888; + background: #eee; } diff --git a/build/media_source/system/css/fields/calendar-rtl.css b/build/media_source/system/css/fields/calendar-rtl.css index 99a220e9c50ec..83e13e973e893 100644 --- a/build/media_source/system/css/fields/calendar-rtl.css +++ b/build/media_source/system/css/fields/calendar-rtl.css @@ -8,13 +8,13 @@ } .calendar-container { + z-index: 1100 !important; float: left; min-width: 160px; padding: 0; list-style: none; - border-radius: 5px; background-color: var(--calendar-bg, #fff); - z-index: 1100 !important; + border-radius: 5px; } .calendar-container .nav { @@ -22,24 +22,24 @@ } .calendar-container table { - table-layout: fixed; - max-width: 268px; - border-radius: 5px; - background-color: var(--calendar-bg, #fff); z-index: 1100 !important; + max-width: 268px; + padding: 3px; margin-top: 2px; - margin-left: auto; margin-right: auto; - padding: 3px; + margin-left: auto; + table-layout: fixed; border-collapse: separate; + background-color: var(--calendar-bg, #fff); + border-radius: 5px; } /* The main calendar widget. DIV containing a table. */ div.calendar-container table th, .calendar-container table td { - box-shadow: none; padding: 8px 0; line-height: 1.1em; text-align: center; + box-shadow: none; } div.calendar-container table body td { @@ -47,19 +47,19 @@ div.calendar-container table body td { } div.calendar-container table td.title { /* This holds the current "month, year" */ - vertical-align: middle; text-align: center; + vertical-align: middle; } .calendar-container table thead td.headrow { /* Row
containing the day names */ - border-bottom: 1px solid #fff; - text-align: center; color: #000; + text-align: center; + border-bottom: 1px solid #fff; } .calendar-container table thead td.weekend { /* How a weekend day name shows in header */ @@ -81,15 +81,15 @@ div.calendar-container table td.title { /* This holds the current "month, year" } .calendar-container table tbody td.hilite { /* Hovered cells */ - background: #999999; - color: #ffffff; + color: #fff; + background: #999; } .calendar-container table tbody td.day { - border: 0; - cursor : pointer; - font-size: 12px; min-width: 38px; + font-size: 12px; + cursor: pointer; + border: 0; } .calendar-container table tbody td.day.wn { @@ -98,27 +98,27 @@ div.calendar-container table td.title { /* This holds the current "month, year" } .calendar-container table tbody td.day.selected { /* Cell showing today date */ - background: #3071a9; color: #fff; + background: #3071a9; border: 0; } .calendar-container table tbody td.today { position: relative; - height: 100%; width: auto; + height: 100%; font-weight: bold; } .calendar-container table tbody td.today:after { position: absolute; + right: 3px; bottom: 3px; left: 3px; - right: 3px; - content: ""; height: 3px; - border-radius: 1.5px; + content: ""; background-color: #46a546; + border-radius: 1.5px; } .calendar-container table tbody td.today.selected:after { @@ -126,9 +126,9 @@ div.calendar-container table td.title { /* This holds the current "month, year" } .calendar-container table tbody td.day:hover { + color: #fff; cursor: pointer; background: #3d8fd7; - color: #fff; } .calendar-container table tbody td.day:hover:after { @@ -154,8 +154,8 @@ div.calendar-container table td.title { /* This holds the current "month, year" } .calendar-container .day-name { - padding-top: 0.5rem; - font-size: 0.7rem; + padding-top: .5rem; + font-size: .7rem; font-weight: bold; border-bottom: none; } @@ -184,23 +184,23 @@ div.calendar-container table td.title { /* This holds the current "month, year" background-position: left center; background-size: max(100%, 58rem); border: 1px solid #cdcdcd; - border-radius: 0.25rem; + border-radius: .25rem; appearance: none; } .buttons-wrapper { - margin-bottom: 0 !important; - padding: 5px; width: 100%; + padding: 5px; + margin-bottom: 0 !important; } .buttons-wrapper .btn { min-width: 60px; - color: var(--calendar-buttons-color, #495057); - border: 1px solid var(--calendar-buttons-color, #495057); - margin-left: 0; padding: 0 16px; + margin-left: 0; line-height: 2.375rem; + color: var(--calendar-buttons-color, #495057); + border: 1px solid var(--calendar-buttons-color, #495057); box-shadow: 1px 0 1px 1px rgba(0,0,0,.25); } diff --git a/build/media_source/system/css/fields/calendar.css b/build/media_source/system/css/fields/calendar.css index c7f56d5f4df1b..8f13334a05658 100644 --- a/build/media_source/system/css/fields/calendar.css +++ b/build/media_source/system/css/fields/calendar.css @@ -8,13 +8,13 @@ } .calendar-container { + z-index: 1100 !important; float: left; min-width: 160px; padding: 0; list-style: none; - border-radius: 5px; background-color: var(--calendar-bg, #fff); - z-index: 1100 !important; + border-radius: 5px; } .calendar-container .nav { @@ -22,24 +22,24 @@ } .calendar-container table { - table-layout: fixed; - max-width: 268px; - border-radius: 5px; - background-color: var(--calendar-bg, #fff); z-index: 1100 !important; + max-width: 268px; + padding: 3px; margin-top: 2px; - margin-left: auto; margin-right: auto; - padding: 3px; + margin-left: auto; + table-layout: fixed; border-collapse: separate; + background-color: var(--calendar-bg, #fff); + border-radius: 5px; } /* The main calendar widget. DIV containing a table. */ div.calendar-container table th, .calendar-container table td { - box-shadow: none; padding: 8px 0; line-height: 1.1em; text-align: center; + box-shadow: none; } div.calendar-container table body td { @@ -47,19 +47,19 @@ div.calendar-container table body td { } div.calendar-container table td.title { /* This holds the current "month, year" */ - vertical-align: middle; text-align: center; + vertical-align: middle; } .calendar-container table thead td.headrow { /* Row
containing the day names */ - border-bottom: 1px solid #fff; - text-align: center; color: #000; + text-align: center; + border-bottom: 1px solid #fff; } .calendar-container table thead td.weekend { /* How a weekend day name shows in header */ @@ -81,15 +81,15 @@ div.calendar-container table td.title { /* This holds the current "month, year" } .calendar-container table tbody td.hilite { /* Hovered cells */ - background: #999999; - color: #ffffff; + color: #fff; + background: #999; } .calendar-container table tbody td.day { - border: 0; - cursor : pointer; - font-size: 12px; min-width: 38px; + font-size: 12px; + cursor: pointer; + border: 0; } .calendar-container table tbody td.day.wn { @@ -98,27 +98,27 @@ div.calendar-container table td.title { /* This holds the current "month, year" } .calendar-container table tbody td.day.selected { /* Cell showing today date */ - background: #3071a9; color: #fff; + background: #3071a9; border: 0; } .calendar-container table tbody td.today { position: relative; - height: 100%; width: auto; + height: 100%; font-weight: bold; } .calendar-container table tbody td.today:after { position: absolute; + right: 3px; bottom: 3px; left: 3px; - right: 3px; - content: ""; height: 3px; - border-radius: 1.5px; + content: ""; background-color: #46a546; + border-radius: 1.5px; } .calendar-container table tbody td.today.selected:after { @@ -126,9 +126,9 @@ div.calendar-container table td.title { /* This holds the current "month, year" } .calendar-container table tbody td.day:hover { + color: #fff; cursor: pointer; background: #3d8fd7; - color: #fff; } .calendar-container table tbody td.day:hover:after { @@ -154,8 +154,8 @@ div.calendar-container table td.title { /* This holds the current "month, year" } .calendar-container .day-name { - padding-top: 0.5rem; - font-size: 0.7rem; + padding-top: .5rem; + font-size: .7rem; font-weight: bold; border-bottom: none; } @@ -184,23 +184,23 @@ div.calendar-container table td.title { /* This holds the current "month, year" background-position: right center; background-size: max(100%, 58rem); border: 1px solid #cdcdcd; - border-radius: 0.25rem; + border-radius: .25rem; appearance: none; } .buttons-wrapper { - margin-bottom: 0 !important; - padding: 5px; width: 100%; + padding: 5px; + margin-bottom: 0 !important; } .buttons-wrapper .btn { min-width: 60px; - color: var(--calendar-buttons-color, #495057); - border: 1px solid var(--calendar-buttons-color, #495057); - margin-right: 0; padding: 0 16px; + margin-right: 0; line-height: 2.375rem; + color: var(--calendar-buttons-color, #495057); + border: 1px solid var(--calendar-buttons-color, #495057); box-shadow: 1px 1px 1px 0 rgba(0,0,0,.25); } diff --git a/build/media_source/system/css/fields/joomla-media-select.css b/build/media_source/system/css/fields/joomla-media-select.css index 43bfb6db9023f..78332b893dc63 100644 --- a/build/media_source/system/css/fields/joomla-media-select.css +++ b/build/media_source/system/css/fields/joomla-media-select.css @@ -1,10 +1,10 @@ joomla-field-mediamore details { position: absolute; bottom: 0; + margin: 0 0 0 .5rem; background: #f5f5f5; - border-radius: 0.25rem; border: 1px solid #c9c9c9; - margin: 0 0 0 .5rem; + border-radius: .25rem; } joomla-field-mediamore label.input-group-text { @@ -13,9 +13,9 @@ joomla-field-mediamore label.input-group-text { joomla-field-mediamore summary { padding: 1rem; - background-color: #e3e3e3; - border-radius: 0.25rem; font-weight: 500; + background-color: #e3e3e3; + border-radius: .25rem; } joomla-field-mediamore details .form-group { diff --git a/build/media_source/templates/administrator/atum/js/template.es6.js b/build/media_source/templates/administrator/atum/js/template.es6.js index 276706be02341..23a4cb1b6086c 100644 --- a/build/media_source/templates/administrator/atum/js/template.es6.js +++ b/build/media_source/templates/administrator/atum/js/template.es6.js @@ -10,7 +10,7 @@ if (!Joomla) { const getCookie = () => document.cookie.length && document.cookie .split('; ') .find((row) => row.startsWith('atumSidebarState=')) - .split('=')[1]; + ?.split('=')[1]; const mobile = window.matchMedia('(max-width: 992px)'); const small = window.matchMedia('(max-width: 575.98px)'); diff --git a/build/media_source/templates/administrator/atum/scss/_variables-dark.scss b/build/media_source/templates/administrator/atum/scss/_variables-dark.scss index a5762f5186f33..4eeab79435e01 100644 --- a/build/media_source/templates/administrator/atum/scss/_variables-dark.scss +++ b/build/media_source/templates/administrator/atum/scss/_variables-dark.scss @@ -1,10 +1,6 @@ $atum-colors-dark: ( template-quickicon-color: var(--template-bg-dark-5), focus-shadow: var(--gray-800), - media-manager-overlay-bg: var(--template-bg-dark-90), - media-manager-infobar-dt-color: rgba(255, 255, 255, .54), - media-manager-overlay-header-bg: var(--template-bg-dark-80), - media-manager-disk-name-color: var(--template-text-light), ) !default; $link-hover-color-dark: lighten($light-blue, 20%); diff --git a/build/media_source/templates/administrator/atum/scss/_variables.scss b/build/media_source/templates/administrator/atum/scss/_variables.scss index 5c45ecbc0dead..6f0cce607c718 100644 --- a/build/media_source/templates/administrator/atum/scss/_variables.scss +++ b/build/media_source/templates/administrator/atum/scss/_variables.scss @@ -84,11 +84,6 @@ $atum-colors: ( template-bg-dark-75: hsl(var(--hue), 40%, 25%), template-bg-dark-80: hsl(var(--hue), 40%, 20%), template-bg-dark-90: hsl(var(--hue), 40%, 10%), - media-manager-overlay-header-bg: var(--template-bg-dark-5), - media-manager-infobar-dt-color: rgba(0, 0, 0, .54), - media-manager-content-bg: var(--body-bg), - media-manager-overlay-bg: var(--template-bg-dark-3), - media-manager-disk-name-color: var(--template-text-dark), ); $colors: ( diff --git a/build/media_source/templates/administrator/atum/scss/blocks/_global.scss b/build/media_source/templates/administrator/atum/scss/blocks/_global.scss index 0163fb75ec2e2..9a745c820ce1a 100644 --- a/build/media_source/templates/administrator/atum/scss/blocks/_global.scss +++ b/build/media_source/templates/administrator/atum/scss/blocks/_global.scss @@ -155,7 +155,7 @@ body .container-main { body:not(.contentpane) .main-card { background: var(--body-bg); border-radius: $border-radius; - box-shadow: 0 2px 10px -8px var(--template-bg-dark-50); + box-shadow: $atum-box-shadow; } .row-selected { diff --git a/build/media_source/templates/administrator/atum/scss/blocks/_shepard-modals.scss b/build/media_source/templates/administrator/atum/scss/blocks/_shepard-modals.scss new file mode 100644 index 0000000000000..f378adfb65a72 --- /dev/null +++ b/build/media_source/templates/administrator/atum/scss/blocks/_shepard-modals.scss @@ -0,0 +1,20 @@ +.shepherd-element, .shepherd-arrow:before { + background-color: var(--body-bg) !important; +} + +.shepherd-text, .shepherd-title { + color: var(--body-color) !important; +} + +@if $enable-dark-mode { + @include color-mode(dark) { + .shepherd-has-title .shepherd-content .shepherd-header, .shepherd-element.shepherd-has-title[data-popper-placement^=bottom]>.shepherd-arrow:before { + background-color: var(--dark-bg-subtle) !important; + } + + // Matches the bootstrap color on hover for btn-close + .shepherd-has-title .shepherd-content .shepherd-cancel-icon:hover { + filter: $btn-close-white-filter !important; + } + } +} diff --git a/build/media_source/templates/administrator/atum/scss/blocks/_toolbar.scss b/build/media_source/templates/administrator/atum/scss/blocks/_toolbar.scss index 29e7ac0738154..7d8f2574d99cd 100644 --- a/build/media_source/templates/administrator/atum/scss/blocks/_toolbar.scss +++ b/build/media_source/templates/administrator/atum/scss/blocks/_toolbar.scss @@ -10,7 +10,7 @@ color: var(--template-text-dark); //#0c192e; background: $white; background-image: linear-gradient(var(--toolbar-bg), var(--template-bg-dark-3)); - box-shadow: 0 2px 10px -8px var(--template-bg-dark-50); + box-shadow: $atum-box-shadow; .row { margin-right: 0; diff --git a/build/media_source/templates/administrator/atum/scss/pages/_com_cpanel.scss b/build/media_source/templates/administrator/atum/scss/pages/_com_cpanel.scss index 9acb0d35c17d9..5587a5c9e716b 100644 --- a/build/media_source/templates/administrator/atum/scss/pages/_com_cpanel.scss +++ b/build/media_source/templates/administrator/atum/scss/pages/_com_cpanel.scss @@ -200,8 +200,7 @@ padding: 0; margin: 0 .85rem; font-size: .9rem; - color: rgba(1, 1, 1, 1); - background: var(--white-offset); + color: var(--body-color); box-shadow: none; transform: scale(1.2); } diff --git a/build/media_source/templates/administrator/atum/scss/pages/_com_media.scss b/build/media_source/templates/administrator/atum/scss/pages/_com_media.scss new file mode 100644 index 0000000000000..b381fb2738875 --- /dev/null +++ b/build/media_source/templates/administrator/atum/scss/pages/_com_media.scss @@ -0,0 +1,16 @@ +:root { + --com-media-manager-overlay-header-bg: var(--template-bg-dark-5); + --com-media-manager-infobar-dt-color: rgba(0, 0, 0, .54); + --com-media-manager-content-bg: var(--body-bg); + --com-media-manager-overlay-bg: var(--template-bg-dark-3); + --com-media-manager-disk-name-color: var(--template-text-dark); +} + +@if $enable-dark-mode { + @include color-mode(dark, true) { + --com-media-manager-overlay-bg: var(--template-bg-dark-90); + --com-media-manager-infobar-dt-color: rgba(255, 255, 255, .54); + --com-media-manager-overlay-header-bg: var(--template-bg-dark-80); + --com-media-manager-disk-name-color: var(--template-text-light); + } +} diff --git a/build/media_source/templates/administrator/atum/scss/pages/_com_modules.scss b/build/media_source/templates/administrator/atum/scss/pages/_com_modules.scss index b64ad02d3b588..7f5ed97b52283 100644 --- a/build/media_source/templates/administrator/atum/scss/pages/_com_modules.scss +++ b/build/media_source/templates/administrator/atum/scss/pages/_com_modules.scss @@ -1,14 +1,32 @@ .new-modules { + // We use the same colors for the new module section as we do for the quickicons. + --text-color: var(--template-quickicon-color); + --bg-color: hsl(var(--hue), 60%, 97%); + --bg-color-hvr: var(--template-bg-dark); + --icon-color: var(--template-quickicon-color); + --icon-color-hvr: hsl(var(--hue), 50%, 93%); + .card-columns { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); } } +@if $enable-dark-mode { + @include color-mode(dark) { + .new-modules { + --bg-color: var(--template-bg-dark-80); + --bg-color-hvr: var(--template-bg-dark-65); + --icon-color: var(--template-bg-dark-80); + --icon-color-hvr: var(--template-quickicon-color); + } + } +} + .new-module { display: flex; overflow: hidden; - color: hsl(var(--hue),30%,40%); - background-color: hsl(var(--hue), 60%, 97%); + color: var(--text-color); + background-color: var(--bg-color); border: 1px solid hsl(var(--hue), 50%, 93%); border-radius: $border-radius; @@ -43,14 +61,14 @@ span { margin-bottom: 10px; - color: hsl(var(--hue), 30%, 40%); + color: var(--icon-color); } .new-module:hover & { - background: var(--template-bg-dark); + background: var(--bg-color-hvr); span { - color: $white; + color: var(--icon-color-hvr); } } } diff --git a/build/media_source/templates/administrator/atum/scss/template.scss b/build/media_source/templates/administrator/atum/scss/template.scss index bbe0647381ab8..59ca1f775a069 100644 --- a/build/media_source/templates/administrator/atum/scss/template.scss +++ b/build/media_source/templates/administrator/atum/scss/template.scss @@ -50,6 +50,7 @@ @import "blocks/modals"; @import "blocks/quickicons"; @import "blocks/lists"; +@import "blocks/shepard-modals"; @import "blocks/sidebar"; @import "blocks/sidebar-nav"; @import "blocks/switcher"; @@ -68,6 +69,7 @@ @import "pages/com_content"; @import "pages/com_cpanel"; @import "pages/com_joomlaupdate"; +@import "pages/com_media"; @import "pages/com_modules"; @import "pages/com_tags"; @import "pages/com_privacy"; diff --git a/build/media_source/templates/administrator/atum/scss/vendor/bootstrap/_table.scss b/build/media_source/templates/administrator/atum/scss/vendor/bootstrap/_table.scss index df7fb029cc6bb..37821aebddc20 100644 --- a/build/media_source/templates/administrator/atum/scss/vendor/bootstrap/_table.scss +++ b/build/media_source/templates/administrator/atum/scss/vendor/bootstrap/_table.scss @@ -84,6 +84,6 @@ } .j-main-container > & { - box-shadow: 0 2px 10px -8px var(--template-bg-dark-50); + box-shadow: $atum-box-shadow; } } diff --git a/components/com_contact/src/Controller/ContactController.php b/components/com_contact/src/Controller/ContactController.php index 2c9e35280a09d..9c2bb4cdcaa22 100644 --- a/components/com_contact/src/Controller/ContactController.php +++ b/components/com_contact/src/Controller/ContactController.php @@ -175,7 +175,7 @@ public function submit() // Validation succeeded, continue with custom handlers $results = $this->getDispatcher()->dispatch('onValidateContact', new ValidateContactEvent('onValidateContact', [ 'subject' => $contact, - 'data' => &$data, // TODO: Remove reference in Joomla 6, @deprecated: Data modification onValidateContact is not allowed, use onSubmitContact instead + 'data' => &$data, // @todo: Remove reference in Joomla 6, @deprecated: Data modification onValidateContact is not allowed, use onSubmitContact instead ]))->getArgument('result', []); $passValidation = true; @@ -198,7 +198,7 @@ public function submit() // Passed Validation: Process the contact plugins to integrate with other applications $event = $this->getDispatcher()->dispatch('onSubmitContact', new SubmitContactEvent('onSubmitContact', [ 'subject' => $contact, - 'data' => &$data, // TODO: Remove reference in Joomla 6, see SubmitContactEvent::__constructor() + 'data' => &$data, // @todo: Remove reference in Joomla 6, see SubmitContactEvent::__constructor() ])); // Get the final data $data = $event->getArgument('data', $data); diff --git a/components/com_tags/src/Service/Router.php b/components/com_tags/src/Service/Router.php index 92ec399a3ba91..a425a8008ce1e 100644 --- a/components/com_tags/src/Service/Router.php +++ b/components/com_tags/src/Service/Router.php @@ -89,7 +89,7 @@ public function preprocess($query) } // Get query language - $lang = isset($query['lang']) ? $query['lang'] : '*'; + $lang = $query['lang'] ?? '*'; // Set the language to the current one when multilang is enabled and item is tagged to ALL if (Multilanguage::isEnabled() && $lang === '*') { @@ -298,7 +298,7 @@ protected function buildLookup() } if ($item->query['view'] == 'tags') { - $id = (int) (isset($item->query['parent_id']) ? $item->query['parent_id'] : 0); + $id = (int) ($item->query['parent_id'] ?? 0); $this->lookup[$item->language]['tags'][$id] = $item->id; } } diff --git a/composer.json b/composer.json index 54a75f5b1f708..6f0904f1d626d 100644 --- a/composer.json +++ b/composer.json @@ -84,14 +84,14 @@ "symfony/yaml": "^6.3.3", "typo3/phar-stream-wrapper": "^3.1.7", "wamania/php-stemmer": "^3.0.1", - "maximebf/debugbar": "^1.18.2", + "maximebf/debugbar": "^1.19.0", "tobscure/json-api": "dev-joomla-backports", "willdurand/negotiation": "^3.1.0", "ext-json": "*", "ext-simplexml": "*", "psr/log": "~3.0", "ext-gd": "*", - "web-auth/webauthn-lib": "4.3.0", + "web-auth/webauthn-lib": "4.5.2", "ext-dom": "*", "composer/ca-bundle": "^1.3.7", "dragonmantank/cron-expression": "^3.3.3", @@ -104,7 +104,7 @@ }, "require-dev": { "phpunit/phpunit": "^9.6.11", - "friendsofphp/php-cs-fixer": "^3.4.0", + "friendsofphp/php-cs-fixer": "3.4.0", "squizlabs/php_codesniffer": "^3.7.2", "dealerdirect/phpcodesniffer-composer-installer": "^0.7.2", "joomla/mediawiki": "^3.0.x-dev", diff --git a/composer.lock b/composer.lock index cc07e8477f518..b08dff373f0ed 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0e67017f11ee2998ba0426eb2d563b40", + "content-hash": "2e8b4a5f9b02205929e5b57c13ac17c1", "packages": [ { "name": "algo26-matthias/idna-convert", @@ -462,82 +462,6 @@ }, "time": "2022-02-21T09:13:59+00:00" }, - { - "name": "fgrosse/phpasn1", - "version": "v2.5.0", - "source": { - "type": "git", - "url": "https://github.com/fgrosse/PHPASN1.git", - "reference": "42060ed45344789fb9f21f9f1864fc47b9e3507b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fgrosse/PHPASN1/zipball/42060ed45344789fb9f21f9f1864fc47b9e3507b", - "reference": "42060ed45344789fb9f21f9f1864fc47b9e3507b", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "php-coveralls/php-coveralls": "~2.0", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" - }, - "suggest": { - "ext-bcmath": "BCmath is the fallback extension for big integer calculations", - "ext-curl": "For loading OID information from the web if they have not bee defined statically", - "ext-gmp": "GMP is the preferred extension for big integer calculations", - "phpseclib/bcmath_compat": "BCmath polyfill for servers where neither GMP nor BCmath is available" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "FG\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Friedrich GroĂźe", - "email": "friedrich.grosse@gmail.com", - "homepage": "https://github.com/FGrosse", - "role": "Author" - }, - { - "name": "All contributors", - "homepage": "https://github.com/FGrosse/PHPASN1/contributors" - } - ], - "description": "A PHP Framework that allows you to encode and decode arbitrary ASN.1 structures using the ITU-T X.690 Encoding Rules.", - "homepage": "https://github.com/FGrosse/PHPASN1", - "keywords": [ - "DER", - "asn.1", - "asn1", - "ber", - "binary", - "decoding", - "encoding", - "x.509", - "x.690", - "x509", - "x690" - ], - "support": { - "issues": "https://github.com/fgrosse/PHPASN1/issues", - "source": "https://github.com/fgrosse/PHPASN1/tree/v2.5.0" - }, - "abandoned": true, - "time": "2022-12-19T11:08:26+00:00" - }, { "name": "fig/link-util", "version": "1.2.0", @@ -931,12 +855,12 @@ "source": { "type": "git", "url": "https://github.com/joomla-framework/application.git", - "reference": "2a83022ffe4b271d7fb8cb9542cd0935f4c56b06" + "reference": "13468bdabe70f6a992aecbe38badb0cf4c4d0cf4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/application/zipball/2a83022ffe4b271d7fb8cb9542cd0935f4c56b06", - "reference": "2a83022ffe4b271d7fb8cb9542cd0935f4c56b06", + "url": "https://api.github.com/repos/joomla-framework/application/zipball/13468bdabe70f6a992aecbe38badb0cf4c4d0cf4", + "reference": "13468bdabe70f6a992aecbe38badb0cf4c4d0cf4", "shasum": "" }, "require": { @@ -1020,7 +944,7 @@ "type": "github" } ], - "time": "2023-06-12T11:12:26+00:00" + "time": "2023-09-22T19:31:01+00:00" }, { "name": "joomla/archive", @@ -1028,12 +952,12 @@ "source": { "type": "git", "url": "https://github.com/joomla-framework/archive.git", - "reference": "de578fe4d26d91e3462926e096f2260cb437d72e" + "reference": "f036d96fdaba62e34293cda6b7d47bd785bcae33" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/archive/zipball/de578fe4d26d91e3462926e096f2260cb437d72e", - "reference": "de578fe4d26d91e3462926e096f2260cb437d72e", + "url": "https://api.github.com/repos/joomla-framework/archive/zipball/f036d96fdaba62e34293cda6b7d47bd785bcae33", + "reference": "f036d96fdaba62e34293cda6b7d47bd785bcae33", "shasum": "" }, "require": { @@ -1089,7 +1013,7 @@ "type": "github" } ], - "time": "2023-03-22T13:00:29+00:00" + "time": "2023-09-22T19:33:38+00:00" }, { "name": "joomla/authentication", @@ -1374,12 +1298,12 @@ "source": { "type": "git", "url": "https://github.com/joomla-framework/database.git", - "reference": "c6d741a00b01be07684af3ae313f32d080c7c348" + "reference": "a1d2a244f9175dc0d895eb830b77e34dfd93593f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/database/zipball/c6d741a00b01be07684af3ae313f32d080c7c348", - "reference": "c6d741a00b01be07684af3ae313f32d080c7c348", + "url": "https://api.github.com/repos/joomla-framework/database/zipball/a1d2a244f9175dc0d895eb830b77e34dfd93593f", + "reference": "a1d2a244f9175dc0d895eb830b77e34dfd93593f", "shasum": "" }, "require": { @@ -1449,7 +1373,7 @@ "type": "github" } ], - "time": "2023-04-19T11:47:38+00:00" + "time": "2023-09-22T12:30:58+00:00" }, { "name": "joomla/di", @@ -2602,21 +2526,21 @@ }, { "name": "lcobucci/clock", - "version": "2.3.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/lcobucci/clock.git", - "reference": "c7aadcd6fd97ed9e199114269c0be3f335e38876" + "reference": "039ef98c6b57b101d10bd11d8fdfda12cbd996dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/clock/zipball/c7aadcd6fd97ed9e199114269c0be3f335e38876", - "reference": "c7aadcd6fd97ed9e199114269c0be3f335e38876", + "url": "https://api.github.com/repos/lcobucci/clock/zipball/039ef98c6b57b101d10bd11d8fdfda12cbd996dc", + "reference": "039ef98c6b57b101d10bd11d8fdfda12cbd996dc", "shasum": "" }, "require": { "php": "~8.1.0 || ~8.2.0", - "stella-maris/clock": "^0.1.7" + "psr/clock": "^1.0" }, "provide": { "psr/clock-implementation": "1.0" @@ -2650,7 +2574,7 @@ "description": "Yet another clock abstraction", "support": { "issues": "https://github.com/lcobucci/clock/issues", - "source": "https://github.com/lcobucci/clock/tree/2.3.0" + "source": "https://github.com/lcobucci/clock/tree/3.0.0" }, "funding": [ { @@ -2662,7 +2586,7 @@ "type": "patreon" } ], - "time": "2022-12-19T14:38:11+00:00" + "time": "2022-12-19T15:00:24+00:00" }, { "name": "lcobucci/jwt", @@ -2740,16 +2664,16 @@ }, { "name": "maximebf/debugbar", - "version": "v1.18.2", + "version": "v1.19.0", "source": { "type": "git", "url": "https://github.com/maximebf/php-debugbar.git", - "reference": "17dcf3f6ed112bb85a37cf13538fd8de49f5c274" + "reference": "30f65f18f7ac086255a77a079f8e0dcdd35e828e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/17dcf3f6ed112bb85a37cf13538fd8de49f5c274", - "reference": "17dcf3f6ed112bb85a37cf13538fd8de49f5c274", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/30f65f18f7ac086255a77a079f8e0dcdd35e828e", + "reference": "30f65f18f7ac086255a77a079f8e0dcdd35e828e", "shasum": "" }, "require": { @@ -2800,9 +2724,9 @@ ], "support": { "issues": "https://github.com/maximebf/php-debugbar/issues", - "source": "https://github.com/maximebf/php-debugbar/tree/v1.18.2" + "source": "https://github.com/maximebf/php-debugbar/tree/v1.19.0" }, - "time": "2023-02-04T15:27:00+00:00" + "time": "2023-09-19T19:53:10+00:00" }, { "name": "paragonie/constant_time_encoding", @@ -3101,16 +3025,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.21", + "version": "3.0.23", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "4580645d3fc05c189024eb3b834c6c1e4f0f30a1" + "reference": "866cc78fbd82462ffd880e3f65692afe928bed50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/4580645d3fc05c189024eb3b834c6c1e4f0f30a1", - "reference": "4580645d3fc05c189024eb3b834c6c1e4f0f30a1", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/866cc78fbd82462ffd880e3f65692afe928bed50", + "reference": "866cc78fbd82462ffd880e3f65692afe928bed50", "shasum": "" }, "require": { @@ -3191,7 +3115,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.21" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.23" }, "funding": [ { @@ -3207,7 +3131,7 @@ "type": "tidelift" } ], - "time": "2023-07-09T15:24:48+00:00" + "time": "2023-09-18T17:22:01+00:00" }, { "name": "psr/clock", @@ -3305,18 +3229,68 @@ }, "time": "2021-11-05T16:50:12+00:00" }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, { "name": "psr/http-client", - "version": "1.0.2", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", - "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31" + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31", - "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", "shasum": "" }, "require": { @@ -3353,9 +3327,9 @@ "psr-18" ], "support": { - "source": "https://github.com/php-fig/http-client/tree/1.0.2" + "source": "https://github.com/php-fig/http-client" }, - "time": "2023-04-10T20:12:12+00:00" + "time": "2023-09-23T14:17:50+00:00" }, { "name": "psr/http-factory", @@ -3761,53 +3735,6 @@ ], "time": "2023-02-13T17:21:24+00:00" }, - { - "name": "stella-maris/clock", - "version": "0.1.7", - "source": { - "type": "git", - "url": "https://github.com/stella-maris-solutions/clock.git", - "reference": "fa23ce16019289a18bb3446fdecd45befcdd94f8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/stella-maris-solutions/clock/zipball/fa23ce16019289a18bb3446fdecd45befcdd94f8", - "reference": "fa23ce16019289a18bb3446fdecd45befcdd94f8", - "shasum": "" - }, - "require": { - "php": "^7.0|^8.0", - "psr/clock": "^1.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "StellaMaris\\Clock\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andreas Heigl", - "role": "Maintainer" - } - ], - "description": "A pre-release of the proposed PSR-20 Clock-Interface", - "homepage": "https://gitlab.com/stella-maris/clock", - "keywords": [ - "clock", - "datetime", - "point in time", - "psr20" - ], - "support": { - "source": "https://github.com/stella-maris-solutions/clock/tree/0.1.7" - }, - "time": "2022-11-25T16:15:06+00:00" - }, { "name": "symfony/console", "version": "v6.3.4", @@ -5581,29 +5508,33 @@ }, { "name": "web-auth/metadata-service", - "version": "4.3.0", + "version": "4.5.2", "source": { "type": "git", "url": "https://github.com/web-auth/webauthn-metadata-service.git", - "reference": "af8c413d00f1e5f2074f0156c4d51c3217290efa" + "reference": "82b3a517894987db1f8959a9320b9891515af9e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/web-auth/webauthn-metadata-service/zipball/af8c413d00f1e5f2074f0156c4d51c3217290efa", - "reference": "af8c413d00f1e5f2074f0156c4d51c3217290efa", + "url": "https://api.github.com/repos/web-auth/webauthn-metadata-service/zipball/82b3a517894987db1f8959a9320b9891515af9e7", + "reference": "82b3a517894987db1f8959a9320b9891515af9e7", "shasum": "" }, "require": { "ext-json": "*", - "lcobucci/clock": "^2.2", + "lcobucci/clock": "^2.2|^3.0", "paragonie/constant_time_encoding": "^2.6", "php": ">=8.1", + "psr/clock": "^1.0", + "psr/event-dispatcher": "^1.0", "psr/http-client": "^1.0", "psr/http-factory": "^1.0", - "psr/log": "^3.0", - "spomky-labs/pki-framework": "^1.0" + "psr/log": "^1.0|^2.0|^3.0", + "spomky-labs/pki-framework": "^1.0", + "symfony/deprecation-contracts": "^3.2" }, "suggest": { + "psr/clock-implementation": "As of 4.5.x, the PSR Clock implementation will replace lcobucci/clock", "psr/log-implementation": "Recommended to receive logs from the library", "web-token/jwt-key-mgmt": "Mandatory for fetching Metadata Statement from distant sources", "web-token/jwt-signature-algorithm-ecdsa": "Mandatory for fetching Metadata Statement from distant sources" @@ -5636,7 +5567,7 @@ "webauthn" ], "support": { - "source": "https://github.com/web-auth/webauthn-metadata-service/tree/4.3.0" + "source": "https://github.com/web-auth/webauthn-metadata-service/tree/4.5.2" }, "funding": [ { @@ -5648,32 +5579,32 @@ "type": "patreon" } ], - "time": "2022-10-04T13:12:23+00:00" + "time": "2023-01-22T17:02:25+00:00" }, { "name": "web-auth/webauthn-lib", - "version": "4.3.0", + "version": "4.5.2", "source": { "type": "git", "url": "https://github.com/web-auth/webauthn-lib.git", - "reference": "3f5c41d629f20ce36cabb97be78b7cb4954d0dd8" + "reference": "30c5e891c6418abef6d87a4351132b01b1828a98" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/web-auth/webauthn-lib/zipball/3f5c41d629f20ce36cabb97be78b7cb4954d0dd8", - "reference": "3f5c41d629f20ce36cabb97be78b7cb4954d0dd8", + "url": "https://api.github.com/repos/web-auth/webauthn-lib/zipball/30c5e891c6418abef6d87a4351132b01b1828a98", + "reference": "30c5e891c6418abef6d87a4351132b01b1828a98", "shasum": "" }, "require": { "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", - "fgrosse/phpasn1": "^2.4", "paragonie/constant_time_encoding": "^2.6", "php": ">=8.1", + "psr/event-dispatcher": "^1.0", "psr/http-client": "^1.0", "psr/http-factory": "^1.0", - "psr/log": "^3.0", + "psr/log": "^1.0|^2.0|^3.0", "spomky-labs/cbor-php": "^3.0", "symfony/uid": "^6.1", "web-auth/cose-lib": "^4.0.12", @@ -5718,7 +5649,7 @@ "webauthn" ], "support": { - "source": "https://github.com/web-auth/webauthn-lib/tree/4.3.0" + "source": "https://github.com/web-auth/webauthn-lib/tree/4.5.2" }, "funding": [ { @@ -5730,7 +5661,7 @@ "type": "patreon" } ], - "time": "2022-10-06T11:15:37+00:00" + "time": "2023-05-12T18:26:01+00:00" }, { "name": "web-token/jwt-core", @@ -7925,16 +7856,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.23.1", + "version": "1.24.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "846ae76eef31c6d7790fac9bc399ecee45160b26" + "reference": "9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/846ae76eef31c6d7790fac9bc399ecee45160b26", - "reference": "846ae76eef31c6d7790fac9bc399ecee45160b26", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01", + "reference": "9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01", "shasum": "" }, "require": { @@ -7966,22 +7897,22 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.23.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.1" }, - "time": "2023-08-03T16:32:59+00:00" + "time": "2023-09-18T12:18:02+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.27", + "version": "9.2.29", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1" + "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/b0a88255cb70d52653d80c890bd7f38740ea50d1", - "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76", "shasum": "" }, "require": { @@ -8038,7 +7969,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.27" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29" }, "funding": [ { @@ -8046,7 +7977,7 @@ "type": "github" } ], - "time": "2023-07-26T13:44:30+00:00" + "time": "2023-09-19T04:57:46+00:00" }, { "name": "phpunit/php-file-iterator", @@ -8291,16 +8222,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.11", + "version": "9.6.13", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "810500e92855eba8a7a5319ae913be2da6f957b0" + "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/810500e92855eba8a7a5319ae913be2da6f957b0", - "reference": "810500e92855eba8a7a5319ae913be2da6f957b0", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f3d767f7f9e191eab4189abe41ab37797e30b1be", + "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be", "shasum": "" }, "require": { @@ -8315,7 +8246,7 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.13", + "phpunit/php-code-coverage": "^9.2.28", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", @@ -8374,7 +8305,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.11" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.13" }, "funding": [ { @@ -8390,7 +8321,7 @@ "type": "tidelift" } ], - "time": "2023-08-19T07:10:56+00:00" + "time": "2023-09-19T05:39:22+00:00" }, { "name": "psr/cache", @@ -8441,56 +8372,6 @@ }, "time": "2021-02-03T23:26:27+00:00" }, - { - "name": "psr/event-dispatcher", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\EventDispatcher\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Standard interfaces for event handling.", - "keywords": [ - "events", - "psr", - "psr-14" - ], - "support": { - "issues": "https://github.com/php-fig/event-dispatcher/issues", - "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" - }, - "time": "2019-01-08T18:20:26+00:00" - }, { "name": "sabre/event", "version": "5.1.4", diff --git a/layouts/joomla/toolbar/batch.php b/layouts/joomla/toolbar/batch.php index c79b2e7fb0476..82637dc10b732 100644 --- a/layouts/joomla/toolbar/batch.php +++ b/layouts/joomla/toolbar/batch.php @@ -18,7 +18,7 @@ $wa = \Joomla\CMS\Factory::getApplication()->getDocument()->getWebAssetManager(); $wa->useScript('core'); -$id = isset($displayData['id']) ? $displayData['id'] : ''; +$id = $displayData['id'] ?? ''; $title = $displayData['title']; Text::script('JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST'); Text::script('ERROR'); diff --git a/libraries/src/Application/SiteApplication.php b/libraries/src/Application/SiteApplication.php index 03d95d8e81cf9..1ffaa56f3c09e 100644 --- a/libraries/src/Application/SiteApplication.php +++ b/libraries/src/Application/SiteApplication.php @@ -485,11 +485,7 @@ public function getTemplate($params = false) $cache->store($templates, $cacheId); } - if (isset($templates[$id])) { - $template = $templates[$id]; - } else { - $template = $templates[0]; - } + $template = $templates[$id] ?? $templates[0]; // Allows for overriding the active template from the request $template_override = $this->input->getCmd('template', ''); diff --git a/libraries/src/Cache/CacheController.php b/libraries/src/Cache/CacheController.php index b90898ded0654..93c0558c5ea15 100644 --- a/libraries/src/Cache/CacheController.php +++ b/libraries/src/Cache/CacheController.php @@ -20,6 +20,7 @@ * Public cache handler * * @since 1.7.0 + * @mixin Cache * @note As of 4.0 this class will be abstract */ class CacheController diff --git a/libraries/src/Component/Router/Rules/MenuRules.php b/libraries/src/Component/Router/Rules/MenuRules.php index d0dc642ee4a0e..60f54801a72f6 100644 --- a/libraries/src/Component/Router/Rules/MenuRules.php +++ b/libraries/src/Component/Router/Rules/MenuRules.php @@ -76,7 +76,7 @@ public function preprocess(&$query) } // Get query language - $language = isset($query['lang']) ? $query['lang'] : '*'; + $language = $query['lang'] ?? '*'; // Set the language to the current one when multilang is enabled and item is tagged to ALL if (Multilanguage::isEnabled() && $language === '*') { diff --git a/libraries/src/Component/Router/Rules/StandardRules.php b/libraries/src/Component/Router/Rules/StandardRules.php index d64a3708d5f25..b9d9c35555d77 100644 --- a/libraries/src/Component/Router/Rules/StandardRules.php +++ b/libraries/src/Component/Router/Rules/StandardRules.php @@ -184,10 +184,10 @@ public function build(&$query, &$segments) } // Get menu item layout - $mLayout = isset($item->query['layout']) ? $item->query['layout'] : null; + $mLayout = $item->query['layout'] ?? null; // Get menu item filter_tag - $mFilterTag = isset($item->query['filter_tag']) ? $item->query['filter_tag'] : null; + $mFilterTag = $item->query['filter_tag'] ?? null; // Get all views for this component $views = $this->router->getViews(); diff --git a/libraries/src/Document/Renderer/Html/ModulesRenderer.php b/libraries/src/Document/Renderer/Html/ModulesRenderer.php index b855c472523c1..3255350ef0479 100644 --- a/libraries/src/Document/Renderer/Html/ModulesRenderer.php +++ b/libraries/src/Document/Renderer/Html/ModulesRenderer.php @@ -60,7 +60,7 @@ public function render($position, $params = [], $content = null) // Dispatch onAfterRenderModules event $event = new Module\AfterRenderModulesEvent('onAfterRenderModules', [ - 'content' => &$buffer, // TODO: Remove reference in Joomla 6, see AfterRenderModulesEvent::__constructor() + 'content' => &$buffer, // @todo: Remove reference in Joomla 6, see AfterRenderModulesEvent::__constructor() 'attributes' => $params, ]); $app->getDispatcher()->dispatch('onAfterRenderModules', $event); diff --git a/libraries/src/Document/Renderer/Html/ScriptsRenderer.php b/libraries/src/Document/Renderer/Html/ScriptsRenderer.php index 44787c2002378..396536a4754f2 100644 --- a/libraries/src/Document/Renderer/Html/ScriptsRenderer.php +++ b/libraries/src/Document/Renderer/Html/ScriptsRenderer.php @@ -172,7 +172,7 @@ private function renderElement($item): string } } else { $attribs = $item; - $version = isset($attribs['options']['version']) ? $attribs['options']['version'] : ''; + $version = $attribs['options']['version'] ?? ''; $conditional = !empty($attribs['options']['conditional']) ? $attribs['options']['conditional'] : null; } diff --git a/libraries/src/Document/Renderer/Html/StylesRenderer.php b/libraries/src/Document/Renderer/Html/StylesRenderer.php index 4c637012a837b..d05c3d122da60 100644 --- a/libraries/src/Document/Renderer/Html/StylesRenderer.php +++ b/libraries/src/Document/Renderer/Html/StylesRenderer.php @@ -161,7 +161,7 @@ private function renderElement($item): string } } else { $attribs = $item; - $version = isset($attribs['options']['version']) ? $attribs['options']['version'] : ''; + $version = $attribs['options']['version'] ?? ''; $conditional = !empty($attribs['options']['conditional']) ? $attribs['options']['conditional'] : null; } @@ -185,7 +185,7 @@ private function renderElement($item): string $buffer .= '