From 8510a87d918a0ea264f9c8981ae7f2dd328c3353 Mon Sep 17 00:00:00 2001 From: Bear Date: Sun, 1 Nov 2020 16:58:00 -0600 Subject: [PATCH 01/31] Revert incorrectly changed files in #30778 (#31295) * syncing * revert incorrectly changed files * adding incorrectly ignored file. --- .github/SECURITY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/SECURITY.md b/.github/SECURITY.md index 52af74f0b6c..01c59d2e40a 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -11,7 +11,7 @@ This document outlines security procedures and policies for the `Joomla! Project The `Joomla` team and community take all security bugs in `Joomla` seriously. The Joomla! Security Strike Team (JSST) oversees the project's security issues and follows some specific procedures when dealing with these issues. -If you find a possible vulnerability, please report it to the JSST using the [online form](https://developer.joomla.org/security/contact-the-team.html) or via email at security@joomla.org +If you find a possible vulnerability, please report it to the JSST using the [online form](https://developer.joomla.org/security/contact-the-team.html) or via email at security@joomla.org We maintain a list of [GPG keys and addresses](https://developer.joomla.org/security/gpg-keys.html) for the security@joomla.org address and members of the JSST to allow signed and encrypted communications. From c2dff1b2aedb7e3bcca3bcd2b62d5ceafb755e11 Mon Sep 17 00:00:00 2001 From: Tobias Zulauf Date: Mon, 2 Nov 2020 08:20:03 +0100 Subject: [PATCH 02/31] Log that PDF Fonts in language packs are deprecated and will be removed in 4.0 (#31287) * Log that PDF Fonts in language packs are deprecated and will be removed in 4.0 * Log that PDF Fonts in language packs are deprecated and will be removed in 4.0 * fix log call --- .../src/Installer/Adapter/LanguageAdapter.php | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/libraries/src/Installer/Adapter/LanguageAdapter.php b/libraries/src/Installer/Adapter/LanguageAdapter.php index 6ac8c1ea98b..6314eef42c9 100644 --- a/libraries/src/Installer/Adapter/LanguageAdapter.php +++ b/libraries/src/Installer/Adapter/LanguageAdapter.php @@ -261,6 +261,26 @@ class LanguageAdapter extends InstallerAdapter // Parse optional tags $this->parent->parseMedia($this->getManifest()->media); + /* + * Log that PDF Fonts in language packs are deprecated and will be removed in 4.0 + * Ref: https://github.com/joomla/joomla-cms/issues/31286 + */ + if (is_dir($basePath . '/language/pdf_fonts')) + { + try + { + \JLog::add( + 'Using the "pdf_fonts" folder to load language specific fonts in languages is deprecated and will be removed in 4.0.', + \JLog::WARNING, + 'deprecated' + ); + } + catch (RuntimeException $exception) + { + // Informational log only + } + } + // Copy all the necessary font files to the common pdf_fonts directory $this->parent->setPath('extension_site', $basePath . '/language/pdf_fonts'); $overwrite = $this->parent->setOverwrite(true); @@ -513,6 +533,26 @@ class LanguageAdapter extends InstallerAdapter // Parse optional tags $this->parent->parseMedia($xml->media); + /* + * Log that PDF Fonts in language packs are deprecated and will be removed in 4.0 + * Ref: https://github.com/joomla/joomla-cms/issues/31286 + */ + if (is_dir($basePath . '/language/pdf_fonts')) + { + try + { + \JLog::add( + 'Using the "pdf_fonts" folder to load language specific fonts in languages is deprecated and will be removed in 4.0.', + \JLog::WARNING, + 'deprecated' + ); + } + catch (RuntimeException $exception) + { + // Informational log only + } + } + // Copy all the necessary font files to the common pdf_fonts directory $this->parent->setPath('extension_site', $basePath . '/language/pdf_fonts'); $overwrite = $this->parent->setOverwrite(true); From 088f2a216ec9276e317ae9bd32f5cfd0e0e36607 Mon Sep 17 00:00:00 2001 From: Cliff Date: Fri, 6 Nov 2020 08:33:45 +0000 Subject: [PATCH 03/31] Added JLIB_INSTALLER_DISCOVER_INSTALL (#31315) --- administrator/language/en-GB/en-GB.lib_joomla.ini | 1 + language/en-GB/en-GB.lib_joomla.ini | 1 + 2 files changed, 2 insertions(+) diff --git a/administrator/language/en-GB/en-GB.lib_joomla.ini b/administrator/language/en-GB/en-GB.lib_joomla.ini index 491e8f76089..e96ed9cc625 100644 --- a/administrator/language/en-GB/en-GB.lib_joomla.ini +++ b/administrator/language/en-GB/en-GB.lib_joomla.ini @@ -552,6 +552,7 @@ JLIB_INSTALLER_PURGED_UPDATES="Cleared updates" JLIB_INSTALLER_FAILED_TO_PURGE_UPDATES="Failed to clear updates." JLIB_INSTALLER_DEFAULT_STYLE="%s - Default" JLIB_INSTALLER_DISCOVER="Discover" +JLIB_INSTALLER_DISCOVER_INSTALL="Discover Install" JLIB_INSTALLER_ERROR_CANNOT_UNINSTALL_CHILD_OF_PACKAGE="The %s extension is part of a package which does not allow individual extensions to be uninstalled." JLIB_INSTALLER_ERROR_COMP_DISCOVER_STORE_DETAILS="Component Discover install: Failed to store component details." JLIB_INSTALLER_ERROR_COMP_FAILED_TO_CREATE_DIRECTORY="Component %1$s: Failed to create folder: %2$s." diff --git a/language/en-GB/en-GB.lib_joomla.ini b/language/en-GB/en-GB.lib_joomla.ini index 491e8f76089..e96ed9cc625 100644 --- a/language/en-GB/en-GB.lib_joomla.ini +++ b/language/en-GB/en-GB.lib_joomla.ini @@ -552,6 +552,7 @@ JLIB_INSTALLER_PURGED_UPDATES="Cleared updates" JLIB_INSTALLER_FAILED_TO_PURGE_UPDATES="Failed to clear updates." JLIB_INSTALLER_DEFAULT_STYLE="%s - Default" JLIB_INSTALLER_DISCOVER="Discover" +JLIB_INSTALLER_DISCOVER_INSTALL="Discover Install" JLIB_INSTALLER_ERROR_CANNOT_UNINSTALL_CHILD_OF_PACKAGE="The %s extension is part of a package which does not allow individual extensions to be uninstalled." JLIB_INSTALLER_ERROR_COMP_DISCOVER_STORE_DETAILS="Component Discover install: Failed to store component details." JLIB_INSTALLER_ERROR_COMP_FAILED_TO_CREATE_DIRECTORY="Component %1$s: Failed to create folder: %2$s." From 34dacf8a66e3ac9c099db8bce63d26f6e25e879e Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Fri, 6 Nov 2020 17:32:17 +0100 Subject: [PATCH 04/31] the same from install (#31274) --- .../com_contact/sql/install.mysql.utf8.sql | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/administrator/components/com_contact/sql/install.mysql.utf8.sql b/administrator/components/com_contact/sql/install.mysql.utf8.sql index 73a79307d03..1e1bdb9e00b 100644 --- a/administrator/components/com_contact/sql/install.mysql.utf8.sql +++ b/administrator/components/com_contact/sql/install.mysql.utf8.sql @@ -4,19 +4,19 @@ CREATE TABLE IF NOT EXISTS `#__contact_details` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(255) NOT NULL DEFAULT '', - `alias` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '', - `con_position` varchar(255) DEFAULT NULL, + `name` varchar(255) NOT NULL, + `alias` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, + `con_position` varchar(255), `address` text, - `suburb` varchar(100) DEFAULT NULL, - `state` varchar(100) DEFAULT NULL, - `country` varchar(100) DEFAULT NULL, - `postcode` varchar(100) DEFAULT NULL, - `telephone` varchar(255) DEFAULT NULL, - `fax` varchar(255) DEFAULT NULL, + `suburb` varchar(100), + `state` varchar(100), + `country` varchar(100), + `postcode` varchar(100), + `telephone` varchar(255), + `fax` varchar(255), `misc` mediumtext, - `image` varchar(255) DEFAULT NULL, - `email_to` varchar(255) DEFAULT NULL, + `image` varchar(255), + `email_to` varchar(255), `default_con` tinyint(1) unsigned NOT NULL DEFAULT 0, `published` tinyint(1) NOT NULL DEFAULT 0, `checked_out` int(10) unsigned NOT NULL DEFAULT 0, @@ -28,10 +28,10 @@ CREATE TABLE IF NOT EXISTS `#__contact_details` ( `access` int(10) unsigned NOT NULL DEFAULT 0, `mobile` varchar(255) NOT NULL DEFAULT '', `webpage` varchar(255) NOT NULL DEFAULT '', - `sortname1` varchar(255) NOT NULL, - `sortname2` varchar(255) NOT NULL, - `sortname3` varchar(255) NOT NULL, - `language` char(7) NOT NULL, + `sortname1` varchar(255) NOT NULL DEFAULT '', + `sortname2` varchar(255) NOT NULL DEFAULT '', + `sortname3` varchar(255) NOT NULL DEFAULT '', + `language` varchar(7) NOT NULL, `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `created_by` int(10) unsigned NOT NULL DEFAULT 0, `created_by_alias` varchar(255) NOT NULL DEFAULT '', @@ -41,7 +41,7 @@ CREATE TABLE IF NOT EXISTS `#__contact_details` ( `metadesc` text NOT NULL, `metadata` text NOT NULL, `featured` tinyint(3) unsigned NOT NULL DEFAULT 0 COMMENT 'Set if contact is featured.', - `xreference` varchar(50) NOT NULL COMMENT 'A reference to enable linkages to external data sets.', + `xreference` varchar(50) NOT NULL DEFAULT '' COMMENT 'A reference to enable linkages to external data sets.', `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `version` int(10) unsigned NOT NULL DEFAULT 1, From 767ec05fe52617f34a2c52e64702b6da94fefe1c Mon Sep 17 00:00:00 2001 From: Brian Teeman Date: Sat, 7 Nov 2020 12:32:09 +0000 Subject: [PATCH 05/31] Update robots.txt.dist (#31327) Update the information link as it is now available on https Remove the checker link as it is no longer available. (I couldn't find another vendor neutral checker to replace it with) --- robots.txt.dist | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/robots.txt.dist b/robots.txt.dist index ad0e860481e..97b12448a6b 100644 --- a/robots.txt.dist +++ b/robots.txt.dist @@ -9,10 +9,7 @@ # Disallow: /joomla/administrator/ # # For more information about the robots.txt standard, see: -# http://www.robotstxt.org/orig.html -# -# For syntax checking, see: -# http://tool.motoricerca.info/robots-checker.phtml +# https://www.robotstxt.org/orig.html User-agent: * Disallow: /administrator/ From ab62797b7c167964bb09c09d29290ecca7383170 Mon Sep 17 00:00:00 2001 From: Brian Teeman Date: Sat, 7 Nov 2020 20:40:23 +0000 Subject: [PATCH 06/31] Update en-GB.com_users.ini (#31358) When the change was made from clicking to selecting this english error was introduced code review --- language/en-GB/en-GB.com_users.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/language/en-GB/en-GB.com_users.ini b/language/en-GB/en-GB.com_users.ini index 683695a73e1..92437e5543d 100644 --- a/language/en-GB/en-GB.com_users.ini +++ b/language/en-GB/en-GB.com_users.ini @@ -11,7 +11,7 @@ COM_USERS_DESIRED_PASSWORD="Enter your desired password." COM_USERS_DESIRED_USERNAME="Enter your desired username." COM_USERS_EDIT_PROFILE="Edit Profile" COM_USERS_EMAIL_ACCOUNT_DETAILS="Account Details for %s at %s" -COM_USERS_EMAIL_ACTIVATE_WITH_ADMIN_ACTIVATION_BODY="Hello administrator,\n\nA new user has registered at %s.\nThe user has verified their email address and requests that you approve their account.\nThis email has their details:\n\n Name : %s \n email: %s \n Username: %s \n\nYou can activate the user by selecting on the link below:\n %s \n" +COM_USERS_EMAIL_ACTIVATE_WITH_ADMIN_ACTIVATION_BODY="Hello administrator,\n\nA new user has registered at %s.\nThe user has verified their email address and requests that you approve their account.\nThis email has their details:\n\n Name : %s \n email: %s \n Username: %s \n\nYou can activate the user by selecting the link below:\n %s \n" COM_USERS_EMAIL_ACTIVATE_WITH_ADMIN_ACTIVATION_SUBJECT="Registration approval required for account of %s at %s" COM_USERS_EMAIL_ACTIVATED_BY_ADMIN_ACTIVATION_BODY="Hello %s,\n\nYour account has been activated by an administrator. You can now login at %s using the username %s and the password you chose while registering." COM_USERS_EMAIL_ACTIVATED_BY_ADMIN_ACTIVATION_SUBJECT="Account activated for %s at %s" From edba83f9e4c00a5469d0784f4f34c10db8d9cf50 Mon Sep 17 00:00:00 2001 From: SharkyKZ Date: Sat, 14 Nov 2020 17:04:14 +0200 Subject: [PATCH 07/31] Prepare FoF for PHP 8 (#30922) * Update doc block * Pass the argument --- libraries/fof/controller/controller.php | 9 +++++---- libraries/fof/database/iterator.php | 5 +++-- libraries/fof/layout/helper.php | 6 ++++-- libraries/fof/table/relations.php | 3 ++- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/libraries/fof/controller/controller.php b/libraries/fof/controller/controller.php index d972f077d52..76b3416969c 100644 --- a/libraries/fof/controller/controller.php +++ b/libraries/fof/controller/controller.php @@ -1,9 +1,10 @@ getThisModel(); diff --git a/libraries/fof/database/iterator.php b/libraries/fof/database/iterator.php index c05d8a6f789..96034b8434d 100644 --- a/libraries/fof/database/iterator.php +++ b/libraries/fof/database/iterator.php @@ -4,6 +4,7 @@ * @subpackage database * @copyright Copyright (C) 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt + * @note This file has been modified by the Joomla! Project and no longer reflects the original work of its author. * * This file is adapted from the Joomla! Platform. It is used to iterate a database cursor returning FOFTable objects * instead of plain stdClass objects @@ -86,7 +87,7 @@ abstract class FOFDatabaseIterator implements Iterator * * @throws InvalidArgumentException */ - public static function &getIterator($dbName, $cursor, $column = null, $class, $config = array()) + public static function &getIterator($dbName, $cursor, $column, $class, $config = array()) { $className = 'FOFDatabaseIterator' . ucfirst($dbName); @@ -105,7 +106,7 @@ abstract class FOFDatabaseIterator implements Iterator * * @throws InvalidArgumentException */ - public function __construct($cursor, $column = null, $class, $config = array()) + public function __construct($cursor, $column, $class, $config = array()) { // Figure out the type and prefix of the class by the class name $parts = FOFInflector::explode($class); diff --git a/libraries/fof/layout/helper.php b/libraries/fof/layout/helper.php index 16bf9353a47..644c8bc22ab 100644 --- a/libraries/fof/layout/helper.php +++ b/libraries/fof/layout/helper.php @@ -4,6 +4,7 @@ * @subpackage layout * @copyright Copyright (C) 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt + * @note This file has been modified by the Joomla! Project and no longer reflects the original work of its author. */ // Protect from unauthorized access defined('FOF_INCLUDED') or die; @@ -22,16 +23,17 @@ class FOFLayoutHelper extends JLayoutHelper * @param string $layoutFile Dot separated path to the layout file, relative to base path * @param object $displayData Object which properties are used inside the layout file to build displayed output * @param string $basePath Base path to use when loading layout files + * @param mixed $options Optional custom options to load. Registry or array format * * @return string */ - public static function render($layoutFile, $displayData = null, $basePath = '') + public static function render($layoutFile, $displayData = null, $basePath = '', $options = null) { $basePath = empty($basePath) ? self::$defaultBasePath : $basePath; // Make sure we send null to FOFLayoutFile if no path set $basePath = empty($basePath) ? null : $basePath; - $layout = new FOFLayoutFile($layoutFile, $basePath); + $layout = new FOFLayoutFile($layoutFile, $basePath, $options); $renderedLayout = $layout->render($displayData); return $renderedLayout; diff --git a/libraries/fof/table/relations.php b/libraries/fof/table/relations.php index a431bf7598e..c98f935f9a9 100644 --- a/libraries/fof/table/relations.php +++ b/libraries/fof/table/relations.php @@ -4,6 +4,7 @@ * @subpackage table * @copyright Copyright (C) 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt + * @note This file has been modified by the Joomla! Project and no longer reflects the original work of its author. */ // Protect from unauthorized access @@ -898,7 +899,7 @@ class FOFTableRelations * * @return void */ - protected function normaliseParameters($pivot = false, &$itemName, &$tableClass, &$localKey, &$remoteKey, &$ourPivotKey, &$theirPivotKey, &$pivotTable) + protected function normaliseParameters($pivot, &$itemName, &$tableClass, &$localKey, &$remoteKey, &$ourPivotKey, &$theirPivotKey, &$pivotTable) { // Get a default table class if none is provided if (empty($tableClass)) From 423c8df7f5d7c10f99a7b7c36cfdeb2d1d1920b8 Mon Sep 17 00:00:00 2001 From: Jigius Date: Sat, 14 Nov 2020 22:05:35 +0700 Subject: [PATCH 08/31] fixes issue with type transformations (#29353) --- libraries/src/Profiler/Profiler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/src/Profiler/Profiler.php b/libraries/src/Profiler/Profiler.php index dbbf7437d6e..4c7bfbd2983 100644 --- a/libraries/src/Profiler/Profiler.php +++ b/libraries/src/Profiler/Profiler.php @@ -123,9 +123,9 @@ class Profiler '%s %.3f seconds (%.3f); %0.2f MB (%0.3f) - %s', $m->prefix, $m->totalTime / 1000, - $m->time / 1000, + $current - $this->previousTime, $m->totalMemory, - $m->memory, + $currentMem - $this->previousMem, $m->label ); $this->buffer[] = $mark; From cfdb61ac226a682b1dea91fbdcf02faf31b64a9e Mon Sep 17 00:00:00 2001 From: SharkyKZ Date: Sat, 14 Nov 2020 17:06:00 +0200 Subject: [PATCH 09/31] Remove duplicate minus sign (#30582) --- libraries/src/Profiler/Profiler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/src/Profiler/Profiler.php b/libraries/src/Profiler/Profiler.php index 4c7bfbd2983..2465aa68ccb 100644 --- a/libraries/src/Profiler/Profiler.php +++ b/libraries/src/Profiler/Profiler.php @@ -111,9 +111,9 @@ class Profiler $m = (object) array( 'prefix' => $this->prefix, - 'time' => ($current > $this->previousTime ? '+' : '-') . (($current - $this->previousTime) * 1000), + 'time' => ($current > $this->previousTime ? '+' : '') . (($current - $this->previousTime) * 1000), 'totalTime' => ($current * 1000), - 'memory' => ($currentMem > $this->previousMem ? '+' : '-') . ($currentMem - $this->previousMem), + 'memory' => ($currentMem > $this->previousMem ? '+' : '') . ($currentMem - $this->previousMem), 'totalMemory' => $currentMem, 'label' => $label, ); From 2d86280b5eb97cd5d3f2cc8531601cff8804ea0e Mon Sep 17 00:00:00 2001 From: SharkyKZ Date: Sat, 14 Nov 2020 19:59:34 +0200 Subject: [PATCH 10/31] Fix call_user_func_array() arguments on PHP 8 (#30608) --- libraries/joomla/event/dispatcher.php | 2 +- libraries/joomla/event/event.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/joomla/event/dispatcher.php b/libraries/joomla/event/dispatcher.php index c9431ffc4c8..4b034e56f10 100644 --- a/libraries/joomla/event/dispatcher.php +++ b/libraries/joomla/event/dispatcher.php @@ -162,7 +162,7 @@ class JEventDispatcher extends JObject // Fire the event for a function based observer. elseif (is_array($this->_observers[$key])) { - $value = call_user_func_array($this->_observers[$key]['handler'], $args); + $value = call_user_func_array($this->_observers[$key]['handler'], array_values($args)); } if (isset($value)) diff --git a/libraries/joomla/event/event.php b/libraries/joomla/event/event.php index 1c46956926c..0d00e853256 100644 --- a/libraries/joomla/event/event.php +++ b/libraries/joomla/event/event.php @@ -67,7 +67,7 @@ abstract class JEvent extends JObject */ if (method_exists($this, $event)) { - return call_user_func_array(array($this, $event), $args); + return call_user_func_array(array($this, $event), array_values($args)); } } } From a13a289229cf3146ab48347c2c48608a1f8653a6 Mon Sep 17 00:00:00 2001 From: SharkyKZ Date: Sat, 14 Nov 2020 20:02:02 +0200 Subject: [PATCH 11/31] Use ZipArchive in JArchiveZip (#31246) * Use ZipArchive in JArchiveZip * Correct class names * Update support check --- libraries/joomla/archive/zip.php | 35 ++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/libraries/joomla/archive/zip.php b/libraries/joomla/archive/zip.php index 51314e9c7a6..613a48509cc 100644 --- a/libraries/joomla/archive/zip.php +++ b/libraries/joomla/archive/zip.php @@ -189,7 +189,7 @@ class JArchiveZip implements JArchiveExtractable */ public static function hasNativeSupport() { - return function_exists('zip_open') && function_exists('zip_read'); + return extension_loaded('zip'); } /** @@ -282,9 +282,9 @@ class JArchiveZip implements JArchiveExtractable */ protected function extractNative($archive, $destination) { - $zip = zip_open($archive); + $zip = new \ZipArchive; - if (!is_resource($zip)) + if ($zip->open($archive) !== true) { return $this->raiseWarning(100, 'Unable to open archive'); } @@ -296,27 +296,32 @@ class JArchiveZip implements JArchiveExtractable } // Read files in the archive - while ($file = @zip_read($zip)) + for ($index = 0; $index < $zip->numFiles; $index++) { - if (!zip_entry_open($zip, $file, 'r')) + $file = $zip->getNameIndex($index); + + if (substr($file, -1) === '/') + { + continue; + } + + $stream = $zip->getStream($file); + + if ($stream === false) { return $this->raiseWarning(100, 'Unable to read entry'); } - if (substr(zip_entry_name($file), strlen(zip_entry_name($file)) - 1) != '/') + $buffer = stream_get_contents($stream); + fclose($stream); + + if (JFile::write($destination . '/' . $file, $buffer) === false) { - $buffer = zip_entry_read($file, zip_entry_filesize($file)); - - if (JFile::write($destination . '/' . zip_entry_name($file), $buffer) === false) - { - return $this->raiseWarning(100, 'Unable to write entry'); - } - - zip_entry_close($file); + return $this->raiseWarning(100, 'Unable to write entry'); } } - @zip_close($zip); + $zip->close(); return true; } From 7156edf9c5ec263f9f2e973df770c6abf6aab55b Mon Sep 17 00:00:00 2001 From: Harald Leithner Date: Sun, 15 Nov 2020 13:08:33 +0100 Subject: [PATCH 12/31] Fix reference by variables notice (#31405) --- administrator/components/com_templates/models/template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/administrator/components/com_templates/models/template.php b/administrator/components/com_templates/models/template.php index fce6481c699..a5ae68e74eb 100644 --- a/administrator/components/com_templates/models/template.php +++ b/administrator/components/com_templates/models/template.php @@ -828,7 +828,7 @@ class TemplatesModelTemplate extends JModelForm $inFile = urldecode(base64_decode($input)); $explodeArray = explode('/', $inFile); $fileName = end($explodeArray); - $outFile = reset(explode('.', $fileName)); + $outFile = current(explode('.', $fileName)); $less = new JLess; $less->setFormatter(new JLessFormatterJoomla); From cca99d8fd6dcc57d7e93ee8f85b80af973775f61 Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Sun, 15 Nov 2020 12:09:57 +0000 Subject: [PATCH 13/31] Remove unused import Closes #31383 (#31403) --- administrator/components/com_contact/models/contact.php | 1 - 1 file changed, 1 deletion(-) diff --git a/administrator/components/com_contact/models/contact.php b/administrator/components/com_contact/models/contact.php index 62725ce37e8..62b68031d1e 100644 --- a/administrator/components/com_contact/models/contact.php +++ b/administrator/components/com_contact/models/contact.php @@ -10,7 +10,6 @@ defined('_JEXEC') or die; use Joomla\Registry\Registry; -use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; JLoader::register('ContactHelper', JPATH_ADMINISTRATOR . '/components/com_contact/helpers/contact.php'); From 2beaed4c1f10a0fe54e720b206282a14fd3b4ca2 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Wed, 18 Nov 2020 21:59:16 +0100 Subject: [PATCH 14/31] fix manifest (#31412) --- administrator/components/com_contact/contact.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/administrator/components/com_contact/contact.xml b/administrator/components/com_contact/contact.xml index e2361cf0b06..ef06513f2e3 100644 --- a/administrator/components/com_contact/contact.xml +++ b/administrator/components/com_contact/contact.xml @@ -24,7 +24,6 @@ contact.php controller.php - metadata.xml router.php helpers models @@ -52,7 +51,6 @@ contact.php controller.php controllers - elements helpers models tables From 9d9d9df34f14d94d839e5fe83b9947a787d490cf Mon Sep 17 00:00:00 2001 From: SharkyKZ Date: Wed, 18 Nov 2020 22:59:41 +0200 Subject: [PATCH 15/31] Make read more URLs absolute in feed (#31369) * Read more absolute URLs Co-authored-by: Richard Fath --- components/com_content/views/category/view.feed.php | 9 +++++++-- components/com_content/views/featured/view.feed.php | 7 ++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/components/com_content/views/category/view.feed.php b/components/com_content/views/category/view.feed.php index 7770559a0b5..ac75bca2f88 100644 --- a/components/com_content/views/category/view.feed.php +++ b/components/com_content/views/category/view.feed.php @@ -56,9 +56,14 @@ class ContentViewCategory extends JViewCategoryfeed $item->slug = $item->alias ? ($item->id . ':' . $item->alias) : $item->id; // URL link to article - $link = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language)); + $link = JRoute::_( + ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language), + true, + $app->get('force_ssl') == 2 ? \JRoute::TLS_FORCE : \JRoute::TLS_IGNORE, + true + ); - $item->description .= '

' . JText::_('COM_CONTENT_FEED_READMORE') . '

'; + $item->description .= '

' . JText::_('COM_CONTENT_FEED_READMORE') . '

'; } $item->author = $item->created_by_alias ?: $item->author; diff --git a/components/com_content/views/featured/view.feed.php b/components/com_content/views/featured/view.feed.php index 569a61bfa35..ea09ccbddaf 100644 --- a/components/com_content/views/featured/view.feed.php +++ b/components/com_content/views/featured/view.feed.php @@ -48,7 +48,7 @@ class ContentViewFeatured extends JViewLegacy $row->slug = $row->alias ? ($row->id . ':' . $row->alias) : $row->id; // URL link to article - $link = JRoute::_(ContentHelperRoute::getArticleRoute($row->slug, $row->catid, $row->language)); + $link = ContentHelperRoute::getArticleRoute($row->slug, $row->catid, $row->language); $description = ''; $obj = json_decode($row->images); @@ -66,7 +66,7 @@ class ContentViewFeatured extends JViewLegacy // Load individual item creator class $item = new JFeedItem; $item->title = $title; - $item->link = $link; + $item->link = \JRoute::_($link); $item->date = $row->publish_up; $item->category = array(); @@ -96,7 +96,8 @@ class ContentViewFeatured extends JViewLegacy // Add readmore link to description if introtext is shown, show_readmore is true and fulltext exists if (!$params->get('feed_summary', 0) && $params->get('feed_show_readmore', 0) && $row->fulltext) { - $description .= '

' . JText::_('COM_CONTENT_FEED_READMORE') . '

'; + $link = \JRoute::_($link, true, $app->get('force_ssl') == 2 ? \JRoute::TLS_FORCE : \JRoute::TLS_IGNORE, true); + $description .= '

' . JText::_('COM_CONTENT_FEED_READMORE') . '

'; } // Load item description and add div From 03ba7f36ed5ee87c9d74359ff895f979d8b146c7 Mon Sep 17 00:00:00 2001 From: Ayesh Karunaratne Date: Thu, 19 Nov 2020 04:00:24 +0700 Subject: [PATCH 16/31] Repalce `dirname(__FILE__)` with `__DIR__` (#31299) PHP 5.3 adds support for the `__DIR__` magic constant, and its result is identical to `dirname(__FILE__)`. The former is more clearer and does not has a function call, giving a tiny performance advantage as well. --- plugins/system/actionlogs/actionlogs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/system/actionlogs/actionlogs.php b/plugins/system/actionlogs/actionlogs.php index b3e68c3dd36..d8f2e7fa4c6 100644 --- a/plugins/system/actionlogs/actionlogs.php +++ b/plugins/system/actionlogs/actionlogs.php @@ -126,7 +126,7 @@ class PlgSystemActionLogs extends JPlugin return true; } - Form::addFormPath(dirname(__FILE__) . '/forms'); + Form::addFormPath(__DIR__ . '/forms'); if ((!PluginHelper::isEnabled('actionlog', 'joomla')) && (Factory::getApplication()->isAdmin())) { From 3355f2ee315bec43e22df2231c2f497962ba0c46 Mon Sep 17 00:00:00 2001 From: Konstantin Kolos Date: Thu, 19 Nov 2020 11:51:26 +0200 Subject: [PATCH 17/31] Missing lines JLIB_ when installing language packs (#31426) --- installation/language/en-GB/en-GB.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/installation/language/en-GB/en-GB.ini b/installation/language/en-GB/en-GB.ini index a9e01221d66..2f6f9b2b1a9 100644 --- a/installation/language/en-GB/en-GB.ini +++ b/installation/language/en-GB/en-GB.ini @@ -49,7 +49,6 @@ INSTL_DATABASE_TYPE_LABEL="Database Type" INSTL_DATABASE_USER_DESC="Either a username you created or a username provided by your host." INSTL_DATABASE_USER_LABEL="Username" - ;FTP view INSTL_AUTOFIND_FTP_PATH="Autofind FTP Path" INSTL_FTP="FTP Configuration" @@ -301,10 +300,12 @@ JLIB_FORM_FIELD_INVALID="Invalid field: " JLIB_FORM_VALIDATE_FIELD_INVALID="Invalid field: %s" JLIB_FORM_VALIDATE_FIELD_REQUIRED="Field required: %s" JLIB_INSTALLER_ABORT="Aborting language installation: %s" +JLIB_INSTALLER_ABORT_NOINSTALLPATH="Install path does not exist." JLIB_INSTALLER_ABORT_PACK_INSTALL_CREATE_DIRECTORY="Package Install: Failed to create folder: %s." JLIB_INSTALLER_ABORT_PACK_INSTALL_ERROR_EXTENSION="Package %1$s: There was an error installing an extension: %2$s" JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES="Package %s: There were no files to install!" JLIB_INSTALLER_ERROR_FAIL_COPY_FILE="JInstaller: :Install: Failed to copy file %1$s to %2$s." +JLIB_INSTALLER_INSTALL="Install" JLIB_INSTALLER_NOT_ERROR="If the error is related to the installation of TinyMCE language files it has no effect on the installation of the language(s). Some language packs created prior to Joomla! 3.2.0 may try to install separate TinyMCE language files. As these are now included in the core they no longer need to be installed." JLIB_UTIL_ERROR_CONNECT_DATABASE="JDatabase: :getInstance: Could not connect to database
joomla.library: %1$s - %2$s" From 111541bb98f131867ba2402a0e97c135154f349c Mon Sep 17 00:00:00 2001 From: Harald Leithner Date: Thu, 19 Nov 2020 15:14:04 +0100 Subject: [PATCH 18/31] Update composer packages j/archive, j/string and j-backports/lessphp (#31428) * Update composer packages j/archive, j/string and j-backports/lessphp * Force composer to use https for github --- .drone.yml | 4 +- composer.json | 17 +- composer.lock | 191 +- libraries/vendor/bin/lessify | 14 + libraries/vendor/bin/lessify.bat | 4 + libraries/vendor/bin/plessc | 14 + libraries/vendor/bin/plessc.bat | 4 + libraries/vendor/composer/ClassLoader.php | 2 +- .../vendor/composer/autoload_classmap.php | 16 + libraries/vendor/composer/autoload_real.php | 3 - libraries/vendor/composer/autoload_static.php | 16 + libraries/vendor/composer/installed.json | 174 +- .../vendor/joomla/archive/.drone.jsonnet | 120 + libraries/vendor/joomla/archive/.drone.yml | 372 + .../vendor/joomla/archive/src/Archive.php | 22 +- libraries/vendor/joomla/archive/src/Bzip2.php | 2 +- .../src/Exception/UnknownArchiveException.php | 18 + .../Exception/UnsupportedArchiveException.php | 18 + .../archive/src/ExtractableInterface.php | 2 +- libraries/vendor/joomla/archive/src/Gzip.php | 2 +- libraries/vendor/joomla/archive/src/Tar.php | 4 +- libraries/vendor/joomla/archive/src/Zip.php | 37 +- libraries/vendor/joomla/string/.drone.jsonnet | 137 + libraries/vendor/joomla/string/.drone.yml | 373 + .../joomla/string/src/phputf8/utils/bad.php | 8 +- libraries/vendor/leafo/lessphp/.drone.yml | 346 + libraries/vendor/leafo/lessphp/LICENSE | 4 +- libraries/vendor/leafo/lessphp/lessc.inc.php | 7474 +++++++++-------- libraries/vendor/leafo/lessphp/lessify | 18 +- .../vendor/leafo/lessphp/lessify.inc.php | 696 +- .../vendor/leafo/lessphp/phpunit.xml.dist | 8 + libraries/vendor/leafo/lessphp/plessc | 2 - libraries/vendor/leafo/lessphp/ruleset.xml | 40 + 33 files changed, 5801 insertions(+), 4361 deletions(-) create mode 100644 libraries/vendor/bin/lessify create mode 100644 libraries/vendor/bin/lessify.bat create mode 100644 libraries/vendor/bin/plessc create mode 100644 libraries/vendor/bin/plessc.bat create mode 100644 libraries/vendor/joomla/archive/.drone.jsonnet create mode 100644 libraries/vendor/joomla/archive/.drone.yml create mode 100644 libraries/vendor/joomla/archive/src/Exception/UnknownArchiveException.php create mode 100644 libraries/vendor/joomla/archive/src/Exception/UnsupportedArchiveException.php create mode 100644 libraries/vendor/joomla/string/.drone.jsonnet create mode 100644 libraries/vendor/joomla/string/.drone.yml create mode 100644 libraries/vendor/leafo/lessphp/.drone.yml create mode 100644 libraries/vendor/leafo/lessphp/phpunit.xml.dist create mode 100644 libraries/vendor/leafo/lessphp/ruleset.xml diff --git a/.drone.yml b/.drone.yml index dcdf17d9681..76a99045337 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,6 +11,8 @@ steps: image: joomlaprojects/docker-images:php7.4 commands: - php -v + - git config --global url."git://".insteadOf https:// + - git config --global url."ssh://".insteadOf https:// - composer install - composer require phpmd/phpmd volumes: @@ -722,6 +724,6 @@ steps: --- kind: signature -hmac: 891055d296eb627e4c15bb3a6e672a3171d33e74f73d916075cf384b5c9a552e +hmac: cbef4bc42fe32344786211da2373cc3f6899ed9d40c31678f93fe24dce99a0d6 ... diff --git a/composer.json b/composer.json index daf739d7ba3..e46d38103a6 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,8 @@ "platform": { "php": "5.3.10" }, - "vendor-dir": "libraries/vendor" + "vendor-dir": "libraries/vendor", + "github-protocols": ["https"] }, "support": { "issues": "https://issues.joomla.org", @@ -18,10 +19,16 @@ "forum": "https://forum.joomla.org/", "docs": "https://docs.joomla.org" }, + "repositories": [ + { + "type": "github", + "url": "https://github.com/joomla-backports/lessphp.git" + } + ], "require": { "php": ">=5.3.10", "joomla/application": "~1.9", - "joomla/archive": "~1.1.5", + "joomla/archive": "^1.1.7", "joomla/data": "~1.2", "joomla/di": "~1.5", "joomla/event": "~1.2", @@ -35,7 +42,7 @@ "joomla/uri": "~1.2", "joomla/utilities": "^1.6", "ircmaxell/password-compat": "1.*", - "leafo/lessphp": "0.5.0", + "leafo/lessphp": "dev-joomla3-php8", "paragonie/random_compat": "~1.4", "paragonie/sodium_compat": "1.9.1", "phpmailer/phpmailer": "^5.2.20", @@ -54,5 +61,7 @@ "friendsofphp/php-cs-fixer": "~1.11", "squizlabs/php_codesniffer": "~1.5", "pear/cache_lite": "1.7.16" - } + }, + "minimum-stability": "dev", + "prefer-stable": true } diff --git a/composer.lock b/composer.lock index 21ec9542740..acc95fd2283 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": "d1f6b442e260dddddd65b634e7b4b767", + "content-hash": "c0c23b68c82eccc7946187edf0cee94e", "packages": [ { "name": "brumann/polyfill-unserialize", @@ -187,16 +187,16 @@ }, { "name": "joomla/archive", - "version": "1.1.6", + "version": "1.1.7", "source": { "type": "git", "url": "https://github.com/joomla-framework/archive.git", - "reference": "b1d496e8c7814f1e376cb14296c38d5ef4e08c78" + "reference": "185be301bae7cb6479a1e755944a68d52870e9fe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/archive/zipball/b1d496e8c7814f1e376cb14296c38d5ef4e08c78", - "reference": "b1d496e8c7814f1e376cb14296c38d5ef4e08c78", + "url": "https://api.github.com/repos/joomla-framework/archive/zipball/185be301bae7cb6479a1e755944a68d52870e9fe", + "reference": "185be301bae7cb6479a1e755944a68d52870e9fe", "shasum": "" }, "require": { @@ -206,7 +206,7 @@ "require-dev": { "joomla/coding-standards": "~2.0@alpha", "joomla/test": "~1.0", - "phpunit/phpunit": "^4.8.35|^5.4.3|~6.0" + "phpunit/phpunit": "^4.8.35|^5.4.3|^6.0|^7.0|^8.0" }, "suggest": { "ext-bz2": "To extract bzip2 compressed packages", @@ -235,7 +235,7 @@ "framework", "joomla" ], - "time": "2019-03-10T15:17:48+00:00" + "time": "2020-11-14T17:40:00+00:00" }, { "name": "joomla/compat", @@ -469,16 +469,6 @@ "framework", "joomla" ], - "funding": [ - { - "url": "https://community.joomla.org/sponsorship-campaigns.html", - "type": "custom" - }, - { - "url": "https://github.com/joomla", - "type": "github" - } - ], "time": "2020-09-02T09:05:23+00:00" }, { @@ -788,16 +778,16 @@ }, { "name": "joomla/string", - "version": "1.4.4", + "version": "1.4.5", "source": { "type": "git", "url": "https://github.com/joomla-framework/string.git", - "reference": "5fc1f6fbd588c4b50e97a019be8e9a2b4b3683fc" + "reference": "21269bfcddef4e676c6a1a49b7d959f896522a96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/string/zipball/5fc1f6fbd588c4b50e97a019be8e9a2b4b3683fc", - "reference": "5fc1f6fbd588c4b50e97a019be8e9a2b4b3683fc", + "url": "https://api.github.com/repos/joomla-framework/string/zipball/21269bfcddef4e676c6a1a49b7d959f896522a96", + "reference": "21269bfcddef4e676c6a1a49b7d959f896522a96", "shasum": "" }, "require": { @@ -850,17 +840,7 @@ "joomla", "string" ], - "funding": [ - { - "url": "https://community.joomla.org/sponsorship-campaigns.html", - "type": "custom" - }, - { - "url": "https://github.com/joomla", - "type": "github" - } - ], - "time": "2020-08-04T10:09:53+00:00" + "time": "2020-10-07T08:01:44+00:00" }, { "name": "joomla/uri", @@ -956,30 +936,41 @@ }, { "name": "leafo/lessphp", - "version": "v0.5.0", + "version": "dev-joomla3-php8", "source": { "type": "git", - "url": "https://github.com/leafo/lessphp.git", - "reference": "0f5a7f5545d2bcf4e9fad9a228c8ad89cc9aa283" + "url": "https://github.com/joomla-backports/lessphp.git", + "reference": "1bddadba0691b59dedfe841b1f99f9d4294b208c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/leafo/lessphp/zipball/0f5a7f5545d2bcf4e9fad9a228c8ad89cc9aa283", - "reference": "0f5a7f5545d2bcf4e9fad9a228c8ad89cc9aa283", + "url": "https://api.github.com/repos/joomla-backports/lessphp/zipball/1bddadba0691b59dedfe841b1f99f9d4294b208c", + "reference": "1bddadba0691b59dedfe841b1f99f9d4294b208c", "shasum": "" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.4.x-dev" - } + "require-dev": { + "phpunit/phpunit": "^4.8.35|^5.4.3|~6.0", + "squizlabs/php_codesniffer": "~3.3" }, + "bin": [ + "plessc", + "lessify" + ], + "type": "library", "autoload": { "classmap": [ "lessc.inc.php" ] }, - "notification-url": "https://packagist.org/downloads/", + "scripts": { + "test": [ + "phpunit", + "phpcs -p -s" + ], + "fix": [ + "phpcbf" + ] + }, "license": [ "MIT", "GPL-3.0" @@ -993,7 +984,10 @@ ], "description": "lessphp is a compiler for LESS written in PHP.", "homepage": "http://leafo.net/lessphp/", - "time": "2014-11-24T18:39:20+00:00" + "support": { + "source": "https://github.com/joomla-backports/lessphp/tree/dev-joomla3-php8" + }, + "time": "2020-10-10T19:20:26+00:00" }, { "name": "paragonie/random_compat", @@ -1412,20 +1406,6 @@ "polyfill", "portable" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-07-14T12:35:20+00:00" }, { @@ -1486,20 +1466,6 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-07-14T12:35:20+00:00" }, { @@ -1560,20 +1526,6 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-07-14T12:35:20+00:00" }, { @@ -1633,20 +1585,6 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-07-14T12:35:20+00:00" }, { @@ -1709,20 +1647,6 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-07-14T12:35:20+00:00" }, { @@ -1779,20 +1703,6 @@ "polyfill", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-07-14T12:35:20+00:00" }, { @@ -3390,20 +3300,6 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-07-14T12:35:20+00:00" }, { @@ -3506,9 +3402,11 @@ } ], "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, + "minimum-stability": "dev", + "stability-flags": { + "leafo/lessphp": 20 + }, + "prefer-stable": true, "prefer-lowest": false, "platform": { "php": ">=5.3.10" @@ -3516,6 +3414,5 @@ "platform-dev": [], "platform-overrides": { "php": "5.3.10" - }, - "plugin-api-version": "1.1.0" + } } diff --git a/libraries/vendor/bin/lessify b/libraries/vendor/bin/lessify new file mode 100644 index 00000000000..3b59c0f7acc --- /dev/null +++ b/libraries/vendor/bin/lessify @@ -0,0 +1,14 @@ +#!/usr/bin/env sh + +dir=$(cd "${0%[/\\]*}" > /dev/null; cd "../leafo/lessphp" && pwd) + +if [ -d /proc/cygdrive ]; then + case $(which php) in + $(readlink -n /proc/cygdrive)/*) + # We are in Cygwin using Windows php, so the path must be translated + dir=$(cygpath -m "$dir"); + ;; + esac +fi + +"${dir}/lessify" "$@" diff --git a/libraries/vendor/bin/lessify.bat b/libraries/vendor/bin/lessify.bat new file mode 100644 index 00000000000..c305a2b09d2 --- /dev/null +++ b/libraries/vendor/bin/lessify.bat @@ -0,0 +1,4 @@ +@ECHO OFF +setlocal DISABLEDELAYEDEXPANSION +SET BIN_TARGET=%~dp0/../leafo/lessphp/lessify +php "%BIN_TARGET%" %* diff --git a/libraries/vendor/bin/plessc b/libraries/vendor/bin/plessc new file mode 100644 index 00000000000..fbfc7c6f66b --- /dev/null +++ b/libraries/vendor/bin/plessc @@ -0,0 +1,14 @@ +#!/usr/bin/env sh + +dir=$(cd "${0%[/\\]*}" > /dev/null; cd "../leafo/lessphp" && pwd) + +if [ -d /proc/cygdrive ]; then + case $(which php) in + $(readlink -n /proc/cygdrive)/*) + # We are in Cygwin using Windows php, so the path must be translated + dir=$(cygpath -m "$dir"); + ;; + esac +fi + +"${dir}/plessc" "$@" diff --git a/libraries/vendor/bin/plessc.bat b/libraries/vendor/bin/plessc.bat new file mode 100644 index 00000000000..6dcef5d023f --- /dev/null +++ b/libraries/vendor/bin/plessc.bat @@ -0,0 +1,4 @@ +@ECHO OFF +setlocal DISABLEDELAYEDEXPANSION +SET BIN_TARGET=%~dp0/../leafo/lessphp/plessc +php "%BIN_TARGET%" %* diff --git a/libraries/vendor/composer/ClassLoader.php b/libraries/vendor/composer/ClassLoader.php index 03b9bb9c40c..fce8549f078 100644 --- a/libraries/vendor/composer/ClassLoader.php +++ b/libraries/vendor/composer/ClassLoader.php @@ -60,7 +60,7 @@ class ClassLoader public function getPrefixes() { if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); + return call_user_func_array('array_merge', $this->prefixesPsr0); } return array(); diff --git a/libraries/vendor/composer/autoload_classmap.php b/libraries/vendor/composer/autoload_classmap.php index d925c3b4d41..13153429a2c 100644 --- a/libraries/vendor/composer/autoload_classmap.php +++ b/libraries/vendor/composer/autoload_classmap.php @@ -25,6 +25,8 @@ return array( 'Joomla\\Application\\Web\\WebClient' => $vendorDir . '/joomla/application/src/Web/WebClient.php', 'Joomla\\Archive\\Archive' => $vendorDir . '/joomla/archive/src/Archive.php', 'Joomla\\Archive\\Bzip2' => $vendorDir . '/joomla/archive/src/Bzip2.php', + 'Joomla\\Archive\\Exception\\UnknownArchiveException' => $vendorDir . '/joomla/archive/src/Exception/UnknownArchiveException.php', + 'Joomla\\Archive\\Exception\\UnsupportedArchiveException' => $vendorDir . '/joomla/archive/src/Exception/UnsupportedArchiveException.php', 'Joomla\\Archive\\ExtractableInterface' => $vendorDir . '/joomla/archive/src/ExtractableInterface.php', 'Joomla\\Archive\\Gzip' => $vendorDir . '/joomla/archive/src/Gzip.php', 'Joomla\\Archive\\Tar' => $vendorDir . '/joomla/archive/src/Tar.php', @@ -39,6 +41,11 @@ return array( 'Joomla\\Data\\DataObject' => $vendorDir . '/joomla/data/src/DataObject.php', 'Joomla\\Data\\DataSet' => $vendorDir . '/joomla/data/src/DataSet.php', 'Joomla\\Data\\DumpableInterface' => $vendorDir . '/joomla/data/src/DumpableInterface.php', + 'Joomla\\Data\\Tests\\DataObjectTest' => $vendorDir . '/joomla/data/Tests/DataObjectTest.php', + 'Joomla\\Data\\Tests\\DataSetTest' => $vendorDir . '/joomla/data/Tests/DataSetTest.php', + 'Joomla\\Data\\Tests\\JDataBuran' => $vendorDir . '/joomla/data/Tests/Stubs/buran.php', + 'Joomla\\Data\\Tests\\JDataCapitaliser' => $vendorDir . '/joomla/data/Tests/Stubs/capitaliser.php', + 'Joomla\\Data\\Tests\\JDataVostok' => $vendorDir . '/joomla/data/Tests/Stubs/vostok.php', 'Joomla\\Event\\AbstractEvent' => $vendorDir . '/joomla/event/src/AbstractEvent.php', 'Joomla\\Event\\DelegatingDispatcher' => $vendorDir . '/joomla/event/src/DelegatingDispatcher.php', 'Joomla\\Event\\Dispatcher' => $vendorDir . '/joomla/event/src/Dispatcher.php', @@ -100,6 +107,15 @@ return array( 'Joomla\\Session\\Storage\\None' => $vendorDir . '/joomla/session/Joomla/Session/Storage/None.php', 'Joomla\\Session\\Storage\\Wincache' => $vendorDir . '/joomla/session/Joomla/Session/Storage/Wincache.php', 'Joomla\\Session\\Storage\\Xcache' => $vendorDir . '/joomla/session/Joomla/Session/Storage/Xcache.php', + 'Joomla\\Session\\Tests\\StorageCase' => $vendorDir . '/joomla/session/Joomla/Session/Tests/StorageCase.php', + 'Joomla\\Session\\Tests\\StorageTest' => $vendorDir . '/joomla/session/Joomla/Session/Tests/StorageTest.php', + 'Joomla\\Session\\Tests\\Storage\\ApcTest' => $vendorDir . '/joomla/session/Joomla/Session/Tests/Storage/ApcTest.php', + 'Joomla\\Session\\Tests\\Storage\\DatabaseTest' => $vendorDir . '/joomla/session/Joomla/Session/Tests/Storage/DatabaseTest.php', + 'Joomla\\Session\\Tests\\Storage\\MemcacheTest' => $vendorDir . '/joomla/session/Joomla/Session/Tests/Storage/MemcacheTest.php', + 'Joomla\\Session\\Tests\\Storage\\MemcachedTest' => $vendorDir . '/joomla/session/Joomla/Session/Tests/Storage/MemcachedTest.php', + 'Joomla\\Session\\Tests\\Storage\\NoneTest' => $vendorDir . '/joomla/session/Joomla/Session/Tests/Storage/NoneTest.php', + 'Joomla\\Session\\Tests\\Storage\\WincacheTest' => $vendorDir . '/joomla/session/Joomla/Session/Tests/Storage/WincacheTest.php', + 'Joomla\\Session\\Tests\\Storage\\XcacheTest' => $vendorDir . '/joomla/session/Joomla/Session/Tests/Storage/XcacheTest.php', 'Joomla\\String\\Inflector' => $vendorDir . '/joomla/string/src/Inflector.php', 'Joomla\\String\\Normalise' => $vendorDir . '/joomla/string/src/Normalise.php', 'Joomla\\String\\String' => $vendorDir . '/joomla/string/src/String.php', diff --git a/libraries/vendor/composer/autoload_real.php b/libraries/vendor/composer/autoload_real.php index 2c18d3f8d19..f3a91b2e20d 100644 --- a/libraries/vendor/composer/autoload_real.php +++ b/libraries/vendor/composer/autoload_real.php @@ -13,9 +13,6 @@ class ComposerAutoloaderInit205c915b9c7d3e718e7c95793ee67ffe } } - /** - * @return \Composer\Autoload\ClassLoader - */ public static function getLoader() { if (null !== self::$loader) { diff --git a/libraries/vendor/composer/autoload_static.php b/libraries/vendor/composer/autoload_static.php index e7144b91e39..82231b09e6f 100644 --- a/libraries/vendor/composer/autoload_static.php +++ b/libraries/vendor/composer/autoload_static.php @@ -228,6 +228,8 @@ class ComposerStaticInit205c915b9c7d3e718e7c95793ee67ffe 'Joomla\\Application\\Web\\WebClient' => __DIR__ . '/..' . '/joomla/application/src/Web/WebClient.php', 'Joomla\\Archive\\Archive' => __DIR__ . '/..' . '/joomla/archive/src/Archive.php', 'Joomla\\Archive\\Bzip2' => __DIR__ . '/..' . '/joomla/archive/src/Bzip2.php', + 'Joomla\\Archive\\Exception\\UnknownArchiveException' => __DIR__ . '/..' . '/joomla/archive/src/Exception/UnknownArchiveException.php', + 'Joomla\\Archive\\Exception\\UnsupportedArchiveException' => __DIR__ . '/..' . '/joomla/archive/src/Exception/UnsupportedArchiveException.php', 'Joomla\\Archive\\ExtractableInterface' => __DIR__ . '/..' . '/joomla/archive/src/ExtractableInterface.php', 'Joomla\\Archive\\Gzip' => __DIR__ . '/..' . '/joomla/archive/src/Gzip.php', 'Joomla\\Archive\\Tar' => __DIR__ . '/..' . '/joomla/archive/src/Tar.php', @@ -242,6 +244,11 @@ class ComposerStaticInit205c915b9c7d3e718e7c95793ee67ffe 'Joomla\\Data\\DataObject' => __DIR__ . '/..' . '/joomla/data/src/DataObject.php', 'Joomla\\Data\\DataSet' => __DIR__ . '/..' . '/joomla/data/src/DataSet.php', 'Joomla\\Data\\DumpableInterface' => __DIR__ . '/..' . '/joomla/data/src/DumpableInterface.php', + 'Joomla\\Data\\Tests\\DataObjectTest' => __DIR__ . '/..' . '/joomla/data/Tests/DataObjectTest.php', + 'Joomla\\Data\\Tests\\DataSetTest' => __DIR__ . '/..' . '/joomla/data/Tests/DataSetTest.php', + 'Joomla\\Data\\Tests\\JDataBuran' => __DIR__ . '/..' . '/joomla/data/Tests/Stubs/buran.php', + 'Joomla\\Data\\Tests\\JDataCapitaliser' => __DIR__ . '/..' . '/joomla/data/Tests/Stubs/capitaliser.php', + 'Joomla\\Data\\Tests\\JDataVostok' => __DIR__ . '/..' . '/joomla/data/Tests/Stubs/vostok.php', 'Joomla\\Event\\AbstractEvent' => __DIR__ . '/..' . '/joomla/event/src/AbstractEvent.php', 'Joomla\\Event\\DelegatingDispatcher' => __DIR__ . '/..' . '/joomla/event/src/DelegatingDispatcher.php', 'Joomla\\Event\\Dispatcher' => __DIR__ . '/..' . '/joomla/event/src/Dispatcher.php', @@ -303,6 +310,15 @@ class ComposerStaticInit205c915b9c7d3e718e7c95793ee67ffe 'Joomla\\Session\\Storage\\None' => __DIR__ . '/..' . '/joomla/session/Joomla/Session/Storage/None.php', 'Joomla\\Session\\Storage\\Wincache' => __DIR__ . '/..' . '/joomla/session/Joomla/Session/Storage/Wincache.php', 'Joomla\\Session\\Storage\\Xcache' => __DIR__ . '/..' . '/joomla/session/Joomla/Session/Storage/Xcache.php', + 'Joomla\\Session\\Tests\\StorageCase' => __DIR__ . '/..' . '/joomla/session/Joomla/Session/Tests/StorageCase.php', + 'Joomla\\Session\\Tests\\StorageTest' => __DIR__ . '/..' . '/joomla/session/Joomla/Session/Tests/StorageTest.php', + 'Joomla\\Session\\Tests\\Storage\\ApcTest' => __DIR__ . '/..' . '/joomla/session/Joomla/Session/Tests/Storage/ApcTest.php', + 'Joomla\\Session\\Tests\\Storage\\DatabaseTest' => __DIR__ . '/..' . '/joomla/session/Joomla/Session/Tests/Storage/DatabaseTest.php', + 'Joomla\\Session\\Tests\\Storage\\MemcacheTest' => __DIR__ . '/..' . '/joomla/session/Joomla/Session/Tests/Storage/MemcacheTest.php', + 'Joomla\\Session\\Tests\\Storage\\MemcachedTest' => __DIR__ . '/..' . '/joomla/session/Joomla/Session/Tests/Storage/MemcachedTest.php', + 'Joomla\\Session\\Tests\\Storage\\NoneTest' => __DIR__ . '/..' . '/joomla/session/Joomla/Session/Tests/Storage/NoneTest.php', + 'Joomla\\Session\\Tests\\Storage\\WincacheTest' => __DIR__ . '/..' . '/joomla/session/Joomla/Session/Tests/Storage/WincacheTest.php', + 'Joomla\\Session\\Tests\\Storage\\XcacheTest' => __DIR__ . '/..' . '/joomla/session/Joomla/Session/Tests/Storage/XcacheTest.php', 'Joomla\\String\\Inflector' => __DIR__ . '/..' . '/joomla/string/src/Inflector.php', 'Joomla\\String\\Normalise' => __DIR__ . '/..' . '/joomla/string/src/Normalise.php', 'Joomla\\String\\String' => __DIR__ . '/..' . '/joomla/string/src/String.php', diff --git a/libraries/vendor/composer/installed.json b/libraries/vendor/composer/installed.json index 707be2d4ec8..a5a533fc771 100644 --- a/libraries/vendor/composer/installed.json +++ b/libraries/vendor/composer/installed.json @@ -188,17 +188,17 @@ }, { "name": "joomla/archive", - "version": "1.1.6", - "version_normalized": "1.1.6.0", + "version": "1.1.7", + "version_normalized": "1.1.7.0", "source": { "type": "git", "url": "https://github.com/joomla-framework/archive.git", - "reference": "b1d496e8c7814f1e376cb14296c38d5ef4e08c78" + "reference": "185be301bae7cb6479a1e755944a68d52870e9fe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/archive/zipball/b1d496e8c7814f1e376cb14296c38d5ef4e08c78", - "reference": "b1d496e8c7814f1e376cb14296c38d5ef4e08c78", + "url": "https://api.github.com/repos/joomla-framework/archive/zipball/185be301bae7cb6479a1e755944a68d52870e9fe", + "reference": "185be301bae7cb6479a1e755944a68d52870e9fe", "shasum": "" }, "require": { @@ -208,14 +208,14 @@ "require-dev": { "joomla/coding-standards": "~2.0@alpha", "joomla/test": "~1.0", - "phpunit/phpunit": "^4.8.35|^5.4.3|~6.0" + "phpunit/phpunit": "^4.8.35|^5.4.3|^6.0|^7.0|^8.0" }, "suggest": { "ext-bz2": "To extract bzip2 compressed packages", "ext-zip": "To extract zip compressed packages", "ext-zlib": "To extract gzip or zip compressed packages" }, - "time": "2019-03-10T15:17:48+00:00", + "time": "2020-11-14T17:40:00+00:00", "type": "joomla-package", "extra": { "branch-alias": { @@ -482,16 +482,6 @@ "filesystem", "framework", "joomla" - ], - "funding": [ - { - "url": "https://community.joomla.org/sponsorship-campaigns.html", - "type": "custom" - }, - { - "url": "https://github.com/joomla", - "type": "github" - } ] }, { @@ -813,17 +803,17 @@ }, { "name": "joomla/string", - "version": "1.4.4", - "version_normalized": "1.4.4.0", + "version": "1.4.5", + "version_normalized": "1.4.5.0", "source": { "type": "git", "url": "https://github.com/joomla-framework/string.git", - "reference": "5fc1f6fbd588c4b50e97a019be8e9a2b4b3683fc" + "reference": "21269bfcddef4e676c6a1a49b7d959f896522a96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/string/zipball/5fc1f6fbd588c4b50e97a019be8e9a2b4b3683fc", - "reference": "5fc1f6fbd588c4b50e97a019be8e9a2b4b3683fc", + "url": "https://api.github.com/repos/joomla-framework/string/zipball/21269bfcddef4e676c6a1a49b7d959f896522a96", + "reference": "21269bfcddef4e676c6a1a49b7d959f896522a96", "shasum": "" }, "require": { @@ -837,7 +827,7 @@ "suggest": { "ext-mbstring": "For improved processing" }, - "time": "2020-08-04T10:09:53+00:00", + "time": "2020-10-07T08:01:44+00:00", "type": "joomla-package", "extra": { "branch-alias": { @@ -877,16 +867,6 @@ "framework", "joomla", "string" - ], - "funding": [ - { - "url": "https://community.joomla.org/sponsorship-campaigns.html", - "type": "custom" - }, - { - "url": "https://github.com/joomla", - "type": "github" - } ] }, { @@ -987,33 +967,44 @@ }, { "name": "leafo/lessphp", - "version": "v0.5.0", - "version_normalized": "0.5.0.0", + "version": "dev-joomla3-php8", + "version_normalized": "dev-joomla3-php8", "source": { "type": "git", - "url": "https://github.com/leafo/lessphp.git", - "reference": "0f5a7f5545d2bcf4e9fad9a228c8ad89cc9aa283" + "url": "https://github.com/joomla-backports/lessphp.git", + "reference": "1bddadba0691b59dedfe841b1f99f9d4294b208c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/leafo/lessphp/zipball/0f5a7f5545d2bcf4e9fad9a228c8ad89cc9aa283", - "reference": "0f5a7f5545d2bcf4e9fad9a228c8ad89cc9aa283", + "url": "https://api.github.com/repos/joomla-backports/lessphp/zipball/1bddadba0691b59dedfe841b1f99f9d4294b208c", + "reference": "1bddadba0691b59dedfe841b1f99f9d4294b208c", "shasum": "" }, - "time": "2014-11-24T18:39:20+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.4.x-dev" - } + "require-dev": { + "phpunit/phpunit": "^4.8.35|^5.4.3|~6.0", + "squizlabs/php_codesniffer": "~3.3" }, - "installation-source": "dist", + "time": "2020-10-10T19:20:26+00:00", + "bin": [ + "plessc", + "lessify" + ], + "type": "library", + "installation-source": "source", "autoload": { "classmap": [ "lessc.inc.php" ] }, - "notification-url": "https://packagist.org/downloads/", + "scripts": { + "test": [ + "phpunit", + "phpcs -p -s" + ], + "fix": [ + "phpcbf" + ] + }, "license": [ "MIT", "GPL-3.0" @@ -1026,7 +1017,10 @@ } ], "description": "lessphp is a compiler for LESS written in PHP.", - "homepage": "http://leafo.net/lessphp/" + "homepage": "http://leafo.net/lessphp/", + "support": { + "source": "https://github.com/joomla-backports/lessphp/tree/dev-joomla3-php8" + } }, { "name": "paragonie/random_compat", @@ -1459,20 +1453,6 @@ "ctype", "polyfill", "portable" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } ] }, { @@ -1535,20 +1515,6 @@ "polyfill", "portable", "shim" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } ] }, { @@ -1611,20 +1577,6 @@ "polyfill", "portable", "shim" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } ] }, { @@ -1686,20 +1638,6 @@ "polyfill", "portable", "shim" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } ] }, { @@ -1764,20 +1702,6 @@ "polyfill", "portable", "shim" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } ] }, { @@ -1836,20 +1760,6 @@ "compatibility", "polyfill", "shim" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } ] }, { diff --git a/libraries/vendor/joomla/archive/.drone.jsonnet b/libraries/vendor/joomla/archive/.drone.jsonnet new file mode 100644 index 00000000000..497f9d1eeab --- /dev/null +++ b/libraries/vendor/joomla/archive/.drone.jsonnet @@ -0,0 +1,120 @@ +local volumes = [ + { + name: "composer-cache", + path: "/tmp/composer-cache", + }, +]; + +local hostvolumes = [ + { + name: "composer-cache", + host: {path: "/tmp/composer-cache"} + }, +]; + +local composer(phpversion, params) = { + name: "composer", + image: "joomlaprojects/docker-images:php" + phpversion, + volumes: volumes, + commands: [ + "php -v", + "composer update " + params + ] +}; + +local phpunit(phpversion) = { + name: "PHPUnit", + image: "joomlaprojects/docker-images:php" + phpversion, + [if phpversion == "8.0" then "failure"]: "ignore", + commands: ["vendor/bin/phpunit"] +}; + +local pipeline(name, phpversion, params) = { + kind: "pipeline", + name: "PHP " + name, + volumes: hostvolumes, + steps: [ + composer(phpversion, params), + phpunit(phpversion) + ], +}; + +[ + { + kind: "pipeline", + name: "Codequality", + volumes: hostvolumes, + steps: [ + { + name: "composer", + image: "joomlaprojects/docker-images:php7.4", + volumes: volumes, + commands: [ + "php -v", + "composer update", + "composer require phpmd/phpmd phpstan/phpstan" + ] + }, + { + name: "phpcs", + image: "joomlaprojects/docker-images:php7.4", + depends: [ "composer" ], + commands: [ + "vendor/bin/phpcs --config-set installed_paths vendor/joomla/coding-standards", + "vendor/bin/phpcs -p --report=full --extensions=php --standard=ruleset.xml src/" + ] + }, + { + name: "phpmd", + image: "joomlaprojects/docker-images:php7.4", + depends: [ "composer" ], + failure: "ignore", + commands: [ + "vendor/bin/phpmd src text cleancode", + "vendor/bin/phpmd src text codesize", + "vendor/bin/phpmd src text controversial", + "vendor/bin/phpmd src text design", + "vendor/bin/phpmd src text unusedcode", + ] + }, + { + name: "phpstan", + image: "joomlaprojects/docker-images:php7.4", + depends: [ "composer" ], + failure: "ignore", + commands: [ + "vendor/bin/phpstan analyse src", + ] + }, + { + name: "phploc", + image: "joomlaprojects/docker-images:php7.4", + depends: [ "composer" ], + failure: "ignore", + commands: [ + "phploc src", + ] + }, + { + name: "phpcpd", + image: "joomlaprojects/docker-images:php7.4", + depends: [ "composer" ], + failure: "ignore", + commands: [ + "phpcpd src", + ] + } + ] + }, + pipeline("5.3 lowest", "5.3", "--prefer-stable --prefer-lowest"), + pipeline("5.3", "5.3", "--prefer-stable"), + pipeline("5.4", "5.4", "--prefer-stable"), + pipeline("5.5", "5.5", "--prefer-stable"), + pipeline("5.6", "5.6", "--prefer-stable"), + pipeline("7.0", "7.0", "--prefer-stable"), + pipeline("7.1", "7.1", "--prefer-stable"), + pipeline("7.2", "7.2", "--prefer-stable"), + pipeline("7.3", "7.3", "--prefer-stable"), + pipeline("7.4", "7.4", "--prefer-stable"), + pipeline("8.0", "8.0", "--ignore-platform-reqs --prefer-stable") +] diff --git a/libraries/vendor/joomla/archive/.drone.yml b/libraries/vendor/joomla/archive/.drone.yml new file mode 100644 index 00000000000..0afcc78ba30 --- /dev/null +++ b/libraries/vendor/joomla/archive/.drone.yml @@ -0,0 +1,372 @@ +--- +kind: pipeline +name: Codequality + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php7.4 + commands: + - php -v + - composer update + - composer require phpmd/phpmd phpstan/phpstan + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: phpcs + image: joomlaprojects/docker-images:php7.4 + commands: + - vendor/bin/phpcs --config-set installed_paths vendor/joomla/coding-standards + - vendor/bin/phpcs -p --report=full --extensions=php --standard=ruleset.xml src/ + +- name: phpmd + image: joomlaprojects/docker-images:php7.4 + commands: + - vendor/bin/phpmd src text cleancode + - vendor/bin/phpmd src text codesize + - vendor/bin/phpmd src text controversial + - vendor/bin/phpmd src text design + - vendor/bin/phpmd src text unusedcode + failure: ignore + +- name: phpstan + image: joomlaprojects/docker-images:php7.4 + commands: + - vendor/bin/phpstan analyse src + failure: ignore + +- name: phploc + image: joomlaprojects/docker-images:php7.4 + commands: + - phploc src + failure: ignore + +- name: phpcpd + image: joomlaprojects/docker-images:php7.4 + commands: + - phpcpd src + failure: ignore + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 5.3 lowest + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php5.3 + commands: + - php -v + - composer update --prefer-stable --prefer-lowest + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php5.3 + commands: + - vendor/bin/phpunit + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 5.3 + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php5.3 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php5.3 + commands: + - vendor/bin/phpunit + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 5.4 + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php5.4 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php5.4 + commands: + - vendor/bin/phpunit + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 5.5 + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php5.5 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php5.5 + commands: + - vendor/bin/phpunit + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 5.6 + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php5.6 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php5.6 + commands: + - vendor/bin/phpunit + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 7.0 + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php7.0 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php7.0 + commands: + - vendor/bin/phpunit + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 7.1 + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php7.1 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php7.1 + commands: + - vendor/bin/phpunit + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 7.2 + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php7.2 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php7.2 + commands: + - vendor/bin/phpunit + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 7.3 + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php7.3 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php7.3 + commands: + - vendor/bin/phpunit + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 7.4 + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php7.4 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php7.4 + commands: + - vendor/bin/phpunit + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 8.0 + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php8.0 + commands: + - php -v + - composer update --ignore-platform-reqs --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php8.0 + commands: + - vendor/bin/phpunit + failure: ignore + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: signature +hmac: e5ae92df3344314b0bf189cc6e5bee40abc35e50f343368994d6be854a050272 + +... diff --git a/libraries/vendor/joomla/archive/src/Archive.php b/libraries/vendor/joomla/archive/src/Archive.php index 793de071c71..5b47e82e185 100644 --- a/libraries/vendor/joomla/archive/src/Archive.php +++ b/libraries/vendor/joomla/archive/src/Archive.php @@ -2,12 +2,14 @@ /** * Part of the Joomla Framework Archive Package * - * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ namespace Joomla\Archive; +use Joomla\Archive\Exception\UnknownArchiveException; +use Joomla\Archive\Exception\UnsupportedArchiveException; use Joomla\Filesystem\File; use Joomla\Filesystem\Folder; @@ -66,13 +68,13 @@ class Archive * @return boolean True for success * * @since 1.0 - * @throws \InvalidArgumentException + * @throws UnknownArchiveException if the archive type is not supported */ public function extract($archivename, $extractdir) { - $ext = pathinfo($archivename, PATHINFO_EXTENSION); - $path = pathinfo($archivename, PATHINFO_DIRNAME); - $filename = pathinfo($archivename, PATHINFO_FILENAME); + $ext = pathinfo($archivename, \PATHINFO_EXTENSION); + $path = pathinfo($archivename, \PATHINFO_DIRNAME); + $filename = pathinfo($archivename, \PATHINFO_FILENAME); switch (strtolower($ext)) { @@ -149,7 +151,7 @@ class Archive break; default: - throw new \InvalidArgumentException(sprintf('Unknown archive type: %s', $ext)); + throw new UnknownArchiveException(sprintf('Unknown archive type: %s', $ext)); } return $result; @@ -165,7 +167,7 @@ class Archive * @return Archive This object for chaining. * * @since 1.0 - * @throws \InvalidArgumentException + * @throws UnsupportedArchiveException if the adapter type is not supported */ public function setAdapter($type, $class, $override = true) { @@ -185,7 +187,7 @@ class Archive if ($error != '') { - throw new \InvalidArgumentException( + throw new UnsupportedArchiveException( sprintf($error, $type, $class) ); } @@ -204,7 +206,7 @@ class Archive * @return ExtractableInterface Adapter for the requested type * * @since 1.0 - * @throws \InvalidArgumentException + * @throws UnsupportedArchiveException */ public function getAdapter($type) { @@ -218,7 +220,7 @@ class Archive if (!class_exists($class) || !$class::isSupported()) { - throw new \InvalidArgumentException( + throw new UnsupportedArchiveException( sprintf( 'Archive adapter "%s" (class "%s") not found or supported.', $type, diff --git a/libraries/vendor/joomla/archive/src/Bzip2.php b/libraries/vendor/joomla/archive/src/Bzip2.php index 4a8f1d8e2ba..fd7b4f121af 100644 --- a/libraries/vendor/joomla/archive/src/Bzip2.php +++ b/libraries/vendor/joomla/archive/src/Bzip2.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework Archive Package * - * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ diff --git a/libraries/vendor/joomla/archive/src/Exception/UnknownArchiveException.php b/libraries/vendor/joomla/archive/src/Exception/UnknownArchiveException.php new file mode 100644 index 00000000000..71db7a45495 --- /dev/null +++ b/libraries/vendor/joomla/archive/src/Exception/UnknownArchiveException.php @@ -0,0 +1,18 @@ +=')) + if (version_compare(\PHP_VERSION, '5.5', '>=')) { $info = @unpack( 'Z100filename/Z8mode/Z8uid/Z8gid/Z12size/Z12mtime/Z8checksum/Ctypeflag/Z100link/Z6magic/Z2version/Z32uname/Z32gname/Z8devmajor/Z8devminor', diff --git a/libraries/vendor/joomla/archive/src/Zip.php b/libraries/vendor/joomla/archive/src/Zip.php index 8df53c0b997..785e14428ab 100644 --- a/libraries/vendor/joomla/archive/src/Zip.php +++ b/libraries/vendor/joomla/archive/src/Zip.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework Archive Package * - * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ @@ -275,9 +275,9 @@ class Zip implements ExtractableInterface */ protected function extractNative($archive, $destination) { - $zip = zip_open($archive); + $zip = new \ZipArchive; - if (!\is_resource($zip)) + if ($zip->open($archive) !== true) { throw new \RuntimeException('Unable to open archive'); } @@ -289,27 +289,32 @@ class Zip implements ExtractableInterface } // Read files in the archive - while ($file = @zip_read($zip)) + for ($index = 0; $index < $zip->numFiles; $index++) { - if (!zip_entry_open($zip, $file, 'r')) + $file = $zip->getNameIndex($index); + + if (substr($file, -1) === '/') + { + continue; + } + + $stream = $zip->getStream($file); + + if ($stream === false) { throw new \RuntimeException('Unable to read ZIP entry'); } - if (substr(zip_entry_name($file), \strlen(zip_entry_name($file)) - 1) != '/') + $buffer = stream_get_contents($stream); + fclose($stream); + + if (File::write($destination . '/' . $file, $buffer) === false) { - $buffer = zip_entry_read($file, zip_entry_filesize($file)); - - if (File::write($destination . '/' . zip_entry_name($file), $buffer) === false) - { - throw new \RuntimeException('Unable to write ZIP entry to file ' . $destination . '/' . zip_entry_name($file)); - } - - zip_entry_close($file); + throw new \RuntimeException('Unable to write ZIP entry to file ' . $destination . '/' . $file); } } - @zip_close($zip); + $zip->close(); return true; } @@ -433,7 +438,7 @@ class Zip implements ExtractableInterface } /** - * Returns the file data for a file by offsest in the ZIP archive + * Returns the file data for a file by offset in the ZIP archive * * @param integer $key The position of the file in the archive. * diff --git a/libraries/vendor/joomla/string/.drone.jsonnet b/libraries/vendor/joomla/string/.drone.jsonnet new file mode 100644 index 00000000000..872ba3fb4e4 --- /dev/null +++ b/libraries/vendor/joomla/string/.drone.jsonnet @@ -0,0 +1,137 @@ +local volumes = [ + { + name: "composer-cache", + path: "/tmp/composer-cache", + }, +]; + +local hostvolumes = [ + { + name: "composer-cache", + host: {path: "/tmp/composer-cache"} + }, +]; + +local composer(phpversion, params) = { + name: "composer", + image: "joomlaprojects/docker-images:php" + phpversion, + volumes: volumes, + commands: [ + "php -v", + "composer update " + params, + ] +}; + +local phpunit(phpversion) = { + name: "PHPUnit", + image: "joomlaprojects/docker-images:php" + phpversion, + [if phpversion == "8.0" then "failure"]: "ignore", + commands: ["vendor/bin/phpunit"] +}; + +local pipeline(name, phpversion, params) = { + kind: "pipeline", + name: "PHP " + name, + volumes: hostvolumes, + steps: [ + composer(phpversion, params), + phpunit(phpversion) + ], +}; + +[ + { + kind: "pipeline", + name: "Codequality", + volumes: hostvolumes, + steps: [ + { + name: "composer", + image: "joomlaprojects/docker-images:php7.4", + volumes: volumes, + commands: [ + "php -v", + "composer update", + "composer require phpmd/phpmd phpstan/phpstan" + ] + }, + { + name: "phpcs", + image: "joomlaprojects/docker-images:php7.4", + depends: [ "composer" ], + commands: [ + "vendor/bin/phpcs --config-set installed_paths vendor/joomla/coding-standards", + "vendor/bin/phpcs -p --report=full --extensions=php --standard=ruleset.xml src/" + ] + }, + { + name: "phpmd", + image: "joomlaprojects/docker-images:php7.4", + depends: [ "composer" ], + failure: "ignore", + commands: [ + "vendor/bin/phpmd src text cleancode", + "vendor/bin/phpmd src text codesize", + "vendor/bin/phpmd src text controversial", + "vendor/bin/phpmd src text design", + "vendor/bin/phpmd src text unusedcode", + ] + }, + { + name: "phpstan", + image: "joomlaprojects/docker-images:php7.4", + depends: [ "composer" ], + failure: "ignore", + commands: [ + "vendor/bin/phpstan analyse src", + ] + }, + { + name: "phploc", + image: "joomlaprojects/docker-images:php7.4", + depends: [ "composer" ], + failure: "ignore", + commands: [ + "phploc src", + ] + }, + { + name: "phpcpd", + image: "joomlaprojects/docker-images:php7.4", + depends: [ "composer" ], + failure: "ignore", + commands: [ + "phpcpd src", + ] + } + ] + }, + { + kind: "pipeline", + name: "PHP 5.3 lowest", + volumes: hostvolumes, + steps: [ + { + name: "composer", + image: "joomlaprojects/docker-images:php5.3", + volumes: volumes, + commands: [ + "php -v", + "composer update --prefer-stable --prefer-lowest", + "composer update phpunit/phpunit-mock-objects" + ] + }, + phpunit("5.3") + ] + }, + pipeline("5.3", "5.3", "--prefer-stable"), + pipeline("5.4", "5.4", "--prefer-stable"), + pipeline("5.5", "5.5", "--prefer-stable"), + pipeline("5.6", "5.6", "--prefer-stable"), + pipeline("7.0", "7.0", "--prefer-stable"), + pipeline("7.1", "7.1", "--prefer-stable"), + pipeline("7.2", "7.2", "--prefer-stable"), + pipeline("7.3", "7.3", "--prefer-stable"), + pipeline("7.4", "7.4", "--prefer-stable"), + pipeline("8.0", "8.0", "--ignore-platform-reqs --prefer-stable") +] diff --git a/libraries/vendor/joomla/string/.drone.yml b/libraries/vendor/joomla/string/.drone.yml new file mode 100644 index 00000000000..41b4662ec10 --- /dev/null +++ b/libraries/vendor/joomla/string/.drone.yml @@ -0,0 +1,373 @@ +--- +kind: pipeline +name: Codequality + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php7.4 + commands: + - php -v + - composer update + - composer require phpmd/phpmd phpstan/phpstan + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: phpcs + image: joomlaprojects/docker-images:php7.4 + commands: + - vendor/bin/phpcs --config-set installed_paths vendor/joomla/coding-standards + - vendor/bin/phpcs -p --report=full --extensions=php --standard=ruleset.xml src/ + +- name: phpmd + image: joomlaprojects/docker-images:php7.4 + commands: + - vendor/bin/phpmd src text cleancode + - vendor/bin/phpmd src text codesize + - vendor/bin/phpmd src text controversial + - vendor/bin/phpmd src text design + - vendor/bin/phpmd src text unusedcode + failure: ignore + +- name: phpstan + image: joomlaprojects/docker-images:php7.4 + commands: + - vendor/bin/phpstan analyse src + failure: ignore + +- name: phploc + image: joomlaprojects/docker-images:php7.4 + commands: + - phploc src + failure: ignore + +- name: phpcpd + image: joomlaprojects/docker-images:php7.4 + commands: + - phpcpd src + failure: ignore + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 5.3 lowest + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php5.3 + commands: + - php -v + - composer update --prefer-stable --prefer-lowest + - composer update phpunit/phpunit-mock-objects + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php5.3 + commands: + - vendor/bin/phpunit + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 5.3 + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php5.3 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php5.3 + commands: + - vendor/bin/phpunit + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 5.4 + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php5.4 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php5.4 + commands: + - vendor/bin/phpunit + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 5.5 + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php5.5 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php5.5 + commands: + - vendor/bin/phpunit + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 5.6 + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php5.6 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php5.6 + commands: + - vendor/bin/phpunit + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 7.0 + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php7.0 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php7.0 + commands: + - vendor/bin/phpunit + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 7.1 + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php7.1 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php7.1 + commands: + - vendor/bin/phpunit + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 7.2 + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php7.2 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php7.2 + commands: + - vendor/bin/phpunit + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 7.3 + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php7.3 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php7.3 + commands: + - vendor/bin/phpunit + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 7.4 + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php7.4 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php7.4 + commands: + - vendor/bin/phpunit + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 8.0 + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php8.0 + commands: + - php -v + - composer update --ignore-platform-reqs --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php8.0 + commands: + - vendor/bin/phpunit + failure: ignore + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: signature +hmac: bcd686cd053fd91aff1bb22c260e9f2f41efef8a869cbc0db2deae0894bb2fd9 + +... diff --git a/libraries/vendor/joomla/string/src/phputf8/utils/bad.php b/libraries/vendor/joomla/string/src/phputf8/utils/bad.php index e8b8f117758..3e54fc22277 100644 --- a/libraries/vendor/joomla/string/src/phputf8/utils/bad.php +++ b/libraries/vendor/joomla/string/src/phputf8/utils/bad.php @@ -226,6 +226,12 @@ define('UTF8_BAD_SEQINCOMPLETE',7); /** * Reports on the type of bad byte found in a UTF-8 string. Returns a * status code on the first bad byte found +* +* Joomla modification - As of PHP 7.4, curly brace access has been deprecated. As a result this function has been +* modified to use square brace syntax +* See https://github.com/php/php-src/commit/d574df63dc375f5fc9202ce5afde23f866b6450a +* for additional references +* * @author * @param string UTF-8 encoded string * @return mixed integer constant describing problem or FALSE if valid UTF-8 @@ -244,7 +250,7 @@ function utf8_bad_identify($str, &$i) { for($i = 0; $i < $len; $i++) { - $in = ord($str{$i}); + $in = ord($str[$i]); if ( $mState == 0) { diff --git a/libraries/vendor/leafo/lessphp/.drone.yml b/libraries/vendor/leafo/lessphp/.drone.yml new file mode 100644 index 00000000000..5814a362f34 --- /dev/null +++ b/libraries/vendor/leafo/lessphp/.drone.yml @@ -0,0 +1,346 @@ +--- +kind: pipeline +name: Codequality + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php7.4 + commands: + - php -v + - composer update + - composer require phpmd/phpmd phpstan/phpstan + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: phpcs + image: joomlaprojects/docker-images:php7.4 + commands: + - vendor/bin/phpcs -p --report=full --extensions=php --standard=ruleset.xml lessc.inc.php lessify lessify.inc.php + +- name: phpmd + image: joomlaprojects/docker-images:php7.4 + commands: + - vendor/bin/phpmd lessc.inc.php text cleancode + - vendor/bin/phpmd lessc.inc.php text codesize + - vendor/bin/phpmd lessc.inc.php text controversial + - vendor/bin/phpmd lessc.inc.php text design + - vendor/bin/phpmd lessc.inc.php text unusedcode + failure: ignore + +- name: phpstan + image: joomlaprojects/docker-images:php7.4 + commands: + - vendor/bin/phpstan analyse lessc.inc.php + failure: ignore + +- name: phploc + image: joomlaprojects/docker-images:php7.4 + commands: + - phploc lessc.inc.php + failure: ignore + +- name: phpcpd + image: joomlaprojects/docker-images:php7.4 + commands: + - phpcpd lessc.inc.php + failure: ignore + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 5.3 + +platform: + os: linux + arch: amd64 + +steps: + - name: composer + image: joomlaprojects/docker-images:php5.3 + commands: + - php -v + - composer update --ignore-platform-reqs --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + + - name: PHPUnit + image: joomlaprojects/docker-images:php5.3 + failure: ignore + commands: + - vendor/bin/phpunit + +volumes: + - name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 5.4 + +platform: + os: linux + arch: amd64 + +steps: + - name: composer + image: joomlaprojects/docker-images:php5.4 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + + - name: PHPUnit + image: joomlaprojects/docker-images:php5.4 + failure: ignore + commands: + - vendor/bin/phpunit + +volumes: + - name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 5.5 + +platform: + os: linux + arch: amd64 + +steps: + - name: composer + image: joomlaprojects/docker-images:php5.5 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + + - name: PHPUnit + image: joomlaprojects/docker-images:php5.5 + failure: ignore + commands: + - vendor/bin/phpunit + +volumes: + - name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 5.6 + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php5.6 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php5.6 + commands: + - vendor/bin/phpunit + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 7.0 + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php7.0 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php7.0 + commands: + - vendor/bin/phpunit + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 7.1 + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php7.1 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php7.1 + commands: + - vendor/bin/phpunit + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 7.2 + +platform: + os: linux + arch: amd64 + +steps: + - name: composer + image: joomlaprojects/docker-images:php7.2 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + + - name: PHPUnit + image: joomlaprojects/docker-images:php7.2 + commands: + - vendor/bin/phpunit + +volumes: + - name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 7.3 + +platform: + os: linux + arch: amd64 + +steps: + - name: composer + image: joomlaprojects/docker-images:php7.3 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + + - name: PHPUnit + image: joomlaprojects/docker-images:php7.3 + commands: + - vendor/bin/phpunit + +volumes: + - name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 7.4 + +platform: + os: linux + arch: amd64 + +steps: + - name: composer + image: joomlaprojects/docker-images:php7.4 + commands: + - php -v + - composer update --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + + - name: PHPUnit + image: joomlaprojects/docker-images:php7.4 + commands: + - vendor/bin/phpunit + +volumes: + - name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: pipeline +name: PHP 8.0 + +platform: + os: linux + arch: amd64 + +steps: +- name: composer + image: joomlaprojects/docker-images:php8.0 + commands: + - php -v + - composer update --ignore-platform-reqs --prefer-stable + volumes: + - name: composer-cache + path: /tmp/composer-cache + +- name: PHPUnit + image: joomlaprojects/docker-images:php8.0 + commands: + - vendor/bin/phpunit + failure: ignore + +volumes: +- name: composer-cache + host: + path: /tmp/composer-cache + +--- +kind: signature +hmac: 3e81a7c48ced8b189538371fa08fff1cc6f18755e060cb6a0ecd702f439db3e8 + +... diff --git a/libraries/vendor/leafo/lessphp/LICENSE b/libraries/vendor/leafo/lessphp/LICENSE index 49c9ea41735..3b307b5f385 100644 --- a/libraries/vendor/leafo/lessphp/LICENSE +++ b/libraries/vendor/leafo/lessphp/LICENSE @@ -1,4 +1,4 @@ -For ease of distribution, lessphp 0.4.0 is under a dual license. +For ease of distribution, lessphp is under a dual license. You are free to pick which one suits your needs. @@ -9,7 +9,7 @@ MIT LICENSE -Copyright (c) 2013 Leaf Corcoran, http://leafo.net/lessphp +Copyright (c) 2014 Leaf Corcoran, http://leafo.net/lessphp Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/libraries/vendor/leafo/lessphp/lessc.inc.php b/libraries/vendor/leafo/lessphp/lessc.inc.php index 2292f219d4c..11891cc5a74 100644 --- a/libraries/vendor/leafo/lessphp/lessc.inc.php +++ b/libraries/vendor/leafo/lessphp/lessc.inc.php @@ -38,3731 +38,3843 @@ * handling things like indentation. */ class lessc { - static public $VERSION = "v0.5.0"; + public static $VERSION = "v0.5.0"; - static public $TRUE = array("keyword", "true"); - static public $FALSE = array("keyword", "false"); + public static $TRUE = array("keyword", "true"); + public static $FALSE = array("keyword", "false"); - protected $libFunctions = array(); - protected $registeredVars = array(); - protected $preserveComments = false; + protected $libFunctions = array(); + protected $registeredVars = array(); + protected $preserveComments = false; - public $vPrefix = '@'; // prefix of abstract properties - public $mPrefix = '$'; // prefix of abstract blocks - public $parentSelector = '&'; + public $vPrefix = '@'; // prefix of abstract properties + public $mPrefix = '$'; // prefix of abstract blocks + public $parentSelector = '&'; - public $importDisabled = false; - public $importDir = ''; + public $importDisabled = false; + public $importDir = ''; - protected $numberPrecision = null; + protected $numberPrecision = null; - protected $allParsedFiles = array(); + protected $allParsedFiles = array(); - // set to the parser that generated the current line when compiling - // so we know how to create error messages - protected $sourceParser = null; - protected $sourceLoc = null; + // set to the parser that generated the current line when compiling + // so we know how to create error messages + protected $sourceParser = null; + protected $sourceLoc = null; - static protected $nextImportId = 0; // uniquely identify imports + protected static $nextImportId = 0; // uniquely identify imports - // attempts to find the path of an import url, returns null for css files - protected function findImport($url) { - foreach ((array)$this->importDir as $dir) { - $full = $dir.(substr($dir, -1) != '/' ? '/' : '').$url; - if ($this->fileExists($file = $full.'.less') || $this->fileExists($file = $full)) { - return $file; - } - } - - return null; - } - - protected function fileExists($name) { - return is_file($name); - } - - static public function compressList($items, $delim) { - if (!isset($items[1]) && isset($items[0])) return $items[0]; - else return array('list', $delim, $items); - } - - static public function preg_quote($what) { - return preg_quote($what, '/'); - } - - protected function tryImport($importPath, $parentBlock, $out) { - if ($importPath[0] == "function" && $importPath[1] == "url") { - $importPath = $this->flattenList($importPath[2]); - } - - $str = $this->coerceString($importPath); - if ($str === null) return false; - - $url = $this->compileValue($this->lib_e($str)); - - // don't import if it ends in css - if (substr_compare($url, '.css', -4, 4) === 0) return false; - - $realPath = $this->findImport($url); - - if ($realPath === null) return false; - - if ($this->importDisabled) { - return array(false, "/* import disabled */"); - } - - if (isset($this->allParsedFiles[realpath($realPath)])) { - return array(false, null); - } - - $this->addParsedFile($realPath); - $parser = $this->makeParser($realPath); - $root = $parser->parse(file_get_contents($realPath)); - - // set the parents of all the block props - foreach ($root->props as $prop) { - if ($prop[0] == "block") { - $prop[1]->parent = $parentBlock; - } - } - - // copy mixins into scope, set their parents - // bring blocks from import into current block - // TODO: need to mark the source parser these came from this file - foreach ($root->children as $childName => $child) { - if (isset($parentBlock->children[$childName])) { - $parentBlock->children[$childName] = array_merge( - $parentBlock->children[$childName], - $child); - } else { - $parentBlock->children[$childName] = $child; - } - } - - $pi = pathinfo($realPath); - $dir = $pi["dirname"]; - - list($top, $bottom) = $this->sortProps($root->props, true); - $this->compileImportedProps($top, $parentBlock, $out, $parser, $dir); - - return array(true, $bottom, $parser, $dir); - } - - protected function compileImportedProps($props, $block, $out, $sourceParser, $importDir) { - $oldSourceParser = $this->sourceParser; - - $oldImport = $this->importDir; - - // TODO: this is because the importDir api is stupid - $this->importDir = (array)$this->importDir; - array_unshift($this->importDir, $importDir); - - foreach ($props as $prop) { - $this->compileProp($prop, $block, $out); - } - - $this->importDir = $oldImport; - $this->sourceParser = $oldSourceParser; - } - - /** - * Recursively compiles a block. - * - * A block is analogous to a CSS block in most cases. A single LESS document - * is encapsulated in a block when parsed, but it does not have parent tags - * so all of it's children appear on the root level when compiled. - * - * Blocks are made up of props and children. - * - * Props are property instructions, array tuples which describe an action - * to be taken, eg. write a property, set a variable, mixin a block. - * - * The children of a block are just all the blocks that are defined within. - * This is used to look up mixins when performing a mixin. - * - * Compiling the block involves pushing a fresh environment on the stack, - * and iterating through the props, compiling each one. - * - * See lessc::compileProp() - * - */ - protected function compileBlock($block) { - switch ($block->type) { - case "root": - $this->compileRoot($block); - break; - case null: - $this->compileCSSBlock($block); - break; - case "media": - $this->compileMedia($block); - break; - case "directive": - $name = "@" . $block->name; - if (!empty($block->value)) { - $name .= " " . $this->compileValue($this->reduce($block->value)); - } - - $this->compileNestedBlock($block, array($name)); - break; - default: - $this->throwError("unknown block type: $block->type\n"); - } - } - - protected function compileCSSBlock($block) { - $env = $this->pushEnv(); - - $selectors = $this->compileSelectors($block->tags); - $env->selectors = $this->multiplySelectors($selectors); - $out = $this->makeOutputBlock(null, $env->selectors); - - $this->scope->children[] = $out; - $this->compileProps($block, $out); - - $block->scope = $env; // mixins carry scope with them! - $this->popEnv(); - } - - protected function compileMedia($media) { - $env = $this->pushEnv($media); - $parentScope = $this->mediaParent($this->scope); - - $query = $this->compileMediaQuery($this->multiplyMedia($env)); - - $this->scope = $this->makeOutputBlock($media->type, array($query)); - $parentScope->children[] = $this->scope; - - $this->compileProps($media, $this->scope); - - if (count($this->scope->lines) > 0) { - $orphanSelelectors = $this->findClosestSelectors(); - if (!is_null($orphanSelelectors)) { - $orphan = $this->makeOutputBlock(null, $orphanSelelectors); - $orphan->lines = $this->scope->lines; - array_unshift($this->scope->children, $orphan); - $this->scope->lines = array(); - } - } - - $this->scope = $this->scope->parent; - $this->popEnv(); - } - - protected function mediaParent($scope) { - while (!empty($scope->parent)) { - if (!empty($scope->type) && $scope->type != "media") { - break; - } - $scope = $scope->parent; - } - - return $scope; - } - - protected function compileNestedBlock($block, $selectors) { - $this->pushEnv($block); - $this->scope = $this->makeOutputBlock($block->type, $selectors); - $this->scope->parent->children[] = $this->scope; - - $this->compileProps($block, $this->scope); - - $this->scope = $this->scope->parent; - $this->popEnv(); - } - - protected function compileRoot($root) { - $this->pushEnv(); - $this->scope = $this->makeOutputBlock($root->type); - $this->compileProps($root, $this->scope); - $this->popEnv(); - } - - protected function compileProps($block, $out) { - foreach ($this->sortProps($block->props) as $prop) { - $this->compileProp($prop, $block, $out); - } - $out->lines = $this->deduplicate($out->lines); - } - - /** - * Deduplicate lines in a block. Comments are not deduplicated. If a - * duplicate rule is detected, the comments immediately preceding each - * occurence are consolidated. - */ - protected function deduplicate($lines) { - $unique = array(); - $comments = array(); - - foreach($lines as $line) { - if (strpos($line, '/*') === 0) { - $comments[] = $line; - continue; - } - if (!in_array($line, $unique)) { - $unique[] = $line; - } - array_splice($unique, array_search($line, $unique), 0, $comments); - $comments = array(); - } - return array_merge($unique, $comments); - } - - protected function sortProps($props, $split = false) { - $vars = array(); - $imports = array(); - $other = array(); - $stack = array(); - - foreach ($props as $prop) { - switch ($prop[0]) { - case "comment": - $stack[] = $prop; - break; - case "assign": - $stack[] = $prop; - if (isset($prop[1][0]) && $prop[1][0] == $this->vPrefix) { - $vars = array_merge($vars, $stack); - } else { - $other = array_merge($other, $stack); - } - $stack = array(); - break; - case "import": - $id = self::$nextImportId++; - $prop[] = $id; - $stack[] = $prop; - $imports = array_merge($imports, $stack); - $other[] = array("import_mixin", $id); - $stack = array(); - break; - default: - $stack[] = $prop; - $other = array_merge($other, $stack); - $stack = array(); - break; - } - } - $other = array_merge($other, $stack); - - if ($split) { - return array(array_merge($imports, $vars), $other); - } else { - return array_merge($imports, $vars, $other); - } - } - - protected function compileMediaQuery($queries) { - $compiledQueries = array(); - foreach ($queries as $query) { - $parts = array(); - foreach ($query as $q) { - switch ($q[0]) { - case "mediaType": - $parts[] = implode(" ", array_slice($q, 1)); - break; - case "mediaExp": - if (isset($q[2])) { - $parts[] = "($q[1]: " . - $this->compileValue($this->reduce($q[2])) . ")"; - } else { - $parts[] = "($q[1])"; - } - break; - case "variable": - $parts[] = $this->compileValue($this->reduce($q)); - break; - } - } - - if (count($parts) > 0) { - $compiledQueries[] = implode(" and ", $parts); - } - } - - $out = "@media"; - if (!empty($parts)) { - $out .= " " . - implode($this->formatter->selectorSeparator, $compiledQueries); - } - return $out; - } - - protected function multiplyMedia($env, $childQueries = null) { - if (is_null($env) || - !empty($env->block->type) && $env->block->type != "media") - { - return $childQueries; - } - - // plain old block, skip - if (empty($env->block->type)) { - return $this->multiplyMedia($env->parent, $childQueries); - } - - $out = array(); - $queries = $env->block->queries; - if (is_null($childQueries)) { - $out = $queries; - } else { - foreach ($queries as $parent) { - foreach ($childQueries as $child) { - $out[] = array_merge($parent, $child); - } - } - } - - return $this->multiplyMedia($env->parent, $out); - } - - protected function expandParentSelectors(&$tag, $replace) { - $parts = explode("$&$", $tag); - $count = 0; - foreach ($parts as &$part) { - $part = str_replace($this->parentSelector, $replace, $part, $c); - $count += $c; - } - $tag = implode($this->parentSelector, $parts); - return $count; - } - - protected function findClosestSelectors() { - $env = $this->env; - $selectors = null; - while ($env !== null) { - if (isset($env->selectors)) { - $selectors = $env->selectors; - break; - } - $env = $env->parent; - } - - return $selectors; - } - - - // multiply $selectors against the nearest selectors in env - protected function multiplySelectors($selectors) { - // find parent selectors - - $parentSelectors = $this->findClosestSelectors(); - if (is_null($parentSelectors)) { - // kill parent reference in top level selector - foreach ($selectors as &$s) { - $this->expandParentSelectors($s, ""); - } - - return $selectors; - } - - $out = array(); - foreach ($parentSelectors as $parent) { - foreach ($selectors as $child) { - $count = $this->expandParentSelectors($child, $parent); - - // don't prepend the parent tag if & was used - if ($count > 0) { - $out[] = trim($child); - } else { - $out[] = trim($parent . ' ' . $child); - } - } - } - - return $out; - } - - // reduces selector expressions - protected function compileSelectors($selectors) { - $out = array(); - - foreach ($selectors as $s) { - if (is_array($s)) { - list(, $value) = $s; - $out[] = trim($this->compileValue($this->reduce($value))); - } else { - $out[] = $s; - } - } - - return $out; - } - - protected function eq($left, $right) { - return $left == $right; - } - - protected function patternMatch($block, $orderedArgs, $keywordArgs) { - // match the guards if it has them - // any one of the groups must have all its guards pass for a match - if (!empty($block->guards)) { - $groupPassed = false; - foreach ($block->guards as $guardGroup) { - foreach ($guardGroup as $guard) { - $this->pushEnv(); - $this->zipSetArgs($block->args, $orderedArgs, $keywordArgs); - - $negate = false; - if ($guard[0] == "negate") { - $guard = $guard[1]; - $negate = true; - } - - $passed = $this->reduce($guard) == self::$TRUE; - if ($negate) $passed = !$passed; - - $this->popEnv(); - - if ($passed) { - $groupPassed = true; - } else { - $groupPassed = false; - break; - } - } - - if ($groupPassed) break; - } - - if (!$groupPassed) { - return false; - } - } - - if (empty($block->args)) { - return $block->isVararg || empty($orderedArgs) && empty($keywordArgs); - } - - $remainingArgs = $block->args; - if ($keywordArgs) { - $remainingArgs = array(); - foreach ($block->args as $arg) { - if ($arg[0] == "arg" && isset($keywordArgs[$arg[1]])) { - continue; - } - - $remainingArgs[] = $arg; - } - } - - $i = -1; // no args - // try to match by arity or by argument literal - foreach ($remainingArgs as $i => $arg) { - switch ($arg[0]) { - case "lit": - if (empty($orderedArgs[$i]) || !$this->eq($arg[1], $orderedArgs[$i])) { - return false; - } - break; - case "arg": - // no arg and no default value - if (!isset($orderedArgs[$i]) && !isset($arg[2])) { - return false; - } - break; - case "rest": - $i--; // rest can be empty - break 2; - } - } - - if ($block->isVararg) { - return true; // not having enough is handled above - } else { - $numMatched = $i + 1; - // greater than becuase default values always match - return $numMatched >= count($orderedArgs); - } - } - - protected function patternMatchAll($blocks, $orderedArgs, $keywordArgs, $skip=array()) { - $matches = null; - foreach ($blocks as $block) { - // skip seen blocks that don't have arguments - if (isset($skip[$block->id]) && !isset($block->args)) { - continue; - } - - if ($this->patternMatch($block, $orderedArgs, $keywordArgs)) { - $matches[] = $block; - } - } - - return $matches; - } - - // attempt to find blocks matched by path and args - protected function findBlocks($searchIn, $path, $orderedArgs, $keywordArgs, $seen=array()) { - if ($searchIn == null) return null; - if (isset($seen[$searchIn->id])) return null; - $seen[$searchIn->id] = true; - - $name = $path[0]; - - if (isset($searchIn->children[$name])) { - $blocks = $searchIn->children[$name]; - if (count($path) == 1) { - $matches = $this->patternMatchAll($blocks, $orderedArgs, $keywordArgs, $seen); - if (!empty($matches)) { - // This will return all blocks that match in the closest - // scope that has any matching block, like lessjs - return $matches; - } - } else { - $matches = array(); - foreach ($blocks as $subBlock) { - $subMatches = $this->findBlocks($subBlock, - array_slice($path, 1), $orderedArgs, $keywordArgs, $seen); - - if (!is_null($subMatches)) { - foreach ($subMatches as $sm) { - $matches[] = $sm; - } - } - } - - return count($matches) > 0 ? $matches : null; - } - } - if ($searchIn->parent === $searchIn) return null; - return $this->findBlocks($searchIn->parent, $path, $orderedArgs, $keywordArgs, $seen); - } - - // sets all argument names in $args to either the default value - // or the one passed in through $values - protected function zipSetArgs($args, $orderedValues, $keywordValues) { - $assignedValues = array(); - - $i = 0; - foreach ($args as $a) { - if ($a[0] == "arg") { - if (isset($keywordValues[$a[1]])) { - // has keyword arg - $value = $keywordValues[$a[1]]; - } elseif (isset($orderedValues[$i])) { - // has ordered arg - $value = $orderedValues[$i]; - $i++; - } elseif (isset($a[2])) { - // has default value - $value = $a[2]; - } else { - $this->throwError("Failed to assign arg " . $a[1]); - $value = null; // :( - } - - $value = $this->reduce($value); - $this->set($a[1], $value); - $assignedValues[] = $value; - } else { - // a lit - $i++; - } - } - - // check for a rest - $last = end($args); - if ($last[0] == "rest") { - $rest = array_slice($orderedValues, count($args) - 1); - $this->set($last[1], $this->reduce(array("list", " ", $rest))); - } - - // wow is this the only true use of PHP's + operator for arrays? - $this->env->arguments = $assignedValues + $orderedValues; - } - - // compile a prop and update $lines or $blocks appropriately - protected function compileProp($prop, $block, $out) { - // set error position context - $this->sourceLoc = isset($prop[-1]) ? $prop[-1] : -1; - - switch ($prop[0]) { - case 'assign': - list(, $name, $value) = $prop; - if ($name[0] == $this->vPrefix) { - $this->set($name, $value); - } else { - $out->lines[] = $this->formatter->property($name, - $this->compileValue($this->reduce($value))); - } - break; - case 'block': - list(, $child) = $prop; - $this->compileBlock($child); - break; - case 'mixin': - list(, $path, $args, $suffix) = $prop; - - $orderedArgs = array(); - $keywordArgs = array(); - foreach ((array)$args as $arg) { - $argval = null; - switch ($arg[0]) { - case "arg": - if (!isset($arg[2])) { - $orderedArgs[] = $this->reduce(array("variable", $arg[1])); - } else { - $keywordArgs[$arg[1]] = $this->reduce($arg[2]); - } - break; - - case "lit": - $orderedArgs[] = $this->reduce($arg[1]); - break; - default: - $this->throwError("Unknown arg type: " . $arg[0]); - } - } - - $mixins = $this->findBlocks($block, $path, $orderedArgs, $keywordArgs); - - if ($mixins === null) { - $this->throwError("{$prop[1][0]} is undefined"); - } - - foreach ($mixins as $mixin) { - if ($mixin === $block && !$orderedArgs) { - continue; - } - - $haveScope = false; - if (isset($mixin->parent->scope)) { - $haveScope = true; - $mixinParentEnv = $this->pushEnv(); - $mixinParentEnv->storeParent = $mixin->parent->scope; - } - - $haveArgs = false; - if (isset($mixin->args)) { - $haveArgs = true; - $this->pushEnv(); - $this->zipSetArgs($mixin->args, $orderedArgs, $keywordArgs); - } - - $oldParent = $mixin->parent; - if ($mixin != $block) $mixin->parent = $block; - - foreach ($this->sortProps($mixin->props) as $subProp) { - if ($suffix !== null && - $subProp[0] == "assign" && - is_string($subProp[1]) && - $subProp[1]{0} != $this->vPrefix) - { - $subProp[2] = array( - 'list', ' ', - array($subProp[2], array('keyword', $suffix)) - ); - } - - $this->compileProp($subProp, $mixin, $out); - } - - $mixin->parent = $oldParent; - - if ($haveArgs) $this->popEnv(); - if ($haveScope) $this->popEnv(); - } - - break; - case 'raw': - $out->lines[] = $prop[1]; - break; - case "directive": - list(, $name, $value) = $prop; - $out->lines[] = "@$name " . $this->compileValue($this->reduce($value)).';'; - break; - case "comment": - $out->lines[] = $prop[1]; - break; - case "import"; - list(, $importPath, $importId) = $prop; - $importPath = $this->reduce($importPath); - - if (!isset($this->env->imports)) { - $this->env->imports = array(); - } - - $result = $this->tryImport($importPath, $block, $out); - - $this->env->imports[$importId] = $result === false ? - array(false, "@import " . $this->compileValue($importPath).";") : - $result; - - break; - case "import_mixin": - list(,$importId) = $prop; - $import = $this->env->imports[$importId]; - if ($import[0] === false) { - if (isset($import[1])) { - $out->lines[] = $import[1]; - } - } else { - list(, $bottom, $parser, $importDir) = $import; - $this->compileImportedProps($bottom, $block, $out, $parser, $importDir); - } - - break; - default: - $this->throwError("unknown op: {$prop[0]}\n"); - } - } - - - /** - * Compiles a primitive value into a CSS property value. - * - * Values in lessphp are typed by being wrapped in arrays, their format is - * typically: - * - * array(type, contents [, additional_contents]*) - * - * The input is expected to be reduced. This function will not work on - * things like expressions and variables. - */ - public function compileValue($value) { - switch ($value[0]) { - case 'list': - // [1] - delimiter - // [2] - array of values - return implode($value[1], array_map(array($this, 'compileValue'), $value[2])); - case 'raw_color': - if (!empty($this->formatter->compressColors)) { - return $this->compileValue($this->coerceColor($value)); - } - return $value[1]; - case 'keyword': - // [1] - the keyword - return $value[1]; - case 'number': - list(, $num, $unit) = $value; - // [1] - the number - // [2] - the unit - if ($this->numberPrecision !== null) { - $num = round($num, $this->numberPrecision); - } - return $num . $unit; - case 'string': - // [1] - contents of string (includes quotes) - list(, $delim, $content) = $value; - foreach ($content as &$part) { - if (is_array($part)) { - $part = $this->compileValue($part); - } - } - return $delim . implode($content) . $delim; - case 'color': - // [1] - red component (either number or a %) - // [2] - green component - // [3] - blue component - // [4] - optional alpha component - list(, $r, $g, $b) = $value; - $r = round($r); - $g = round($g); - $b = round($b); - - if (count($value) == 5 && $value[4] != 1) { // rgba - return 'rgba('.$r.','.$g.','.$b.','.$value[4].')'; - } - - $h = sprintf("#%02x%02x%02x", $r, $g, $b); - - if (!empty($this->formatter->compressColors)) { - // Converting hex color to short notation (e.g. #003399 to #039) - if ($h[1] === $h[2] && $h[3] === $h[4] && $h[5] === $h[6]) { - $h = '#' . $h[1] . $h[3] . $h[5]; - } - } - - return $h; - - case 'function': - list(, $name, $args) = $value; - return $name.'('.$this->compileValue($args).')'; - default: // assumed to be unit - $this->throwError("unknown value type: $value[0]"); - } - } - - protected function lib_pow($args) { - list($base, $exp) = $this->assertArgs($args, 2, "pow"); - return pow($this->assertNumber($base), $this->assertNumber($exp)); - } - - protected function lib_pi() { - return pi(); - } - - protected function lib_mod($args) { - list($a, $b) = $this->assertArgs($args, 2, "mod"); - return $this->assertNumber($a) % $this->assertNumber($b); - } - - protected function lib_tan($num) { - return tan($this->assertNumber($num)); - } - - protected function lib_sin($num) { - return sin($this->assertNumber($num)); - } - - protected function lib_cos($num) { - return cos($this->assertNumber($num)); - } - - protected function lib_atan($num) { - $num = atan($this->assertNumber($num)); - return array("number", $num, "rad"); - } - - protected function lib_asin($num) { - $num = asin($this->assertNumber($num)); - return array("number", $num, "rad"); - } - - protected function lib_acos($num) { - $num = acos($this->assertNumber($num)); - return array("number", $num, "rad"); - } - - protected function lib_sqrt($num) { - return sqrt($this->assertNumber($num)); - } - - protected function lib_extract($value) { - list($list, $idx) = $this->assertArgs($value, 2, "extract"); - $idx = $this->assertNumber($idx); - // 1 indexed - if ($list[0] == "list" && isset($list[2][$idx - 1])) { - return $list[2][$idx - 1]; - } - } - - protected function lib_isnumber($value) { - return $this->toBool($value[0] == "number"); - } - - protected function lib_isstring($value) { - return $this->toBool($value[0] == "string"); - } - - protected function lib_iscolor($value) { - return $this->toBool($this->coerceColor($value)); - } - - protected function lib_iskeyword($value) { - return $this->toBool($value[0] == "keyword"); - } - - protected function lib_ispixel($value) { - return $this->toBool($value[0] == "number" && $value[2] == "px"); - } - - protected function lib_ispercentage($value) { - return $this->toBool($value[0] == "number" && $value[2] == "%"); - } - - protected function lib_isem($value) { - return $this->toBool($value[0] == "number" && $value[2] == "em"); - } - - protected function lib_isrem($value) { - return $this->toBool($value[0] == "number" && $value[2] == "rem"); - } - - protected function lib_rgbahex($color) { - $color = $this->coerceColor($color); - if (is_null($color)) - $this->throwError("color expected for rgbahex"); - - return sprintf("#%02x%02x%02x%02x", - isset($color[4]) ? $color[4]*255 : 255, - $color[1],$color[2], $color[3]); - } - - protected function lib_argb($color){ - return $this->lib_rgbahex($color); - } - - /** - * Given an url, decide whether to output a regular link or the base64-encoded contents of the file - * - * @param array $value either an argument list (two strings) or a single string - * @return string formatted url(), either as a link or base64-encoded - */ - protected function lib_data_uri($value) { - $mime = ($value[0] === 'list') ? $value[2][0][2] : null; - $url = ($value[0] === 'list') ? $value[2][1][2][0] : $value[2][0]; - - $fullpath = $this->findImport($url); - - if($fullpath && ($fsize = filesize($fullpath)) !== false) { - // IE8 can't handle data uris larger than 32KB - if($fsize/1024 < 32) { - if(is_null($mime)) { - if(class_exists('finfo')) { // php 5.3+ - $finfo = new finfo(FILEINFO_MIME); - $mime = explode('; ', $finfo->file($fullpath)); - $mime = $mime[0]; - } elseif(function_exists('mime_content_type')) { // PHP 5.2 - $mime = mime_content_type($fullpath); - } - } - - if(!is_null($mime)) // fallback if the mime type is still unknown - $url = sprintf('data:%s;base64,%s', $mime, base64_encode(file_get_contents($fullpath))); - } - } - - return 'url("'.$url.'")'; - } - - // utility func to unquote a string - protected function lib_e($arg) { - switch ($arg[0]) { - case "list": - $items = $arg[2]; - if (isset($items[0])) { - return $this->lib_e($items[0]); - } - $this->throwError("unrecognised input"); - case "string": - $arg[1] = ""; - return $arg; - case "keyword": - return $arg; - default: - return array("keyword", $this->compileValue($arg)); - } - } - - protected function lib__sprintf($args) { - if ($args[0] != "list") return $args; - $values = $args[2]; - $string = array_shift($values); - $template = $this->compileValue($this->lib_e($string)); - - $i = 0; - if (preg_match_all('/%[dsa]/', $template, $m)) { - foreach ($m[0] as $match) { - $val = isset($values[$i]) ? - $this->reduce($values[$i]) : array('keyword', ''); - - // lessjs compat, renders fully expanded color, not raw color - if ($color = $this->coerceColor($val)) { - $val = $color; - } - - $i++; - $rep = $this->compileValue($this->lib_e($val)); - $template = preg_replace('/'.self::preg_quote($match).'/', - $rep, $template, 1); - } - } - - $d = $string[0] == "string" ? $string[1] : '"'; - return array("string", $d, array($template)); - } - - protected function lib_floor($arg) { - $value = $this->assertNumber($arg); - return array("number", floor($value), $arg[2]); - } - - protected function lib_ceil($arg) { - $value = $this->assertNumber($arg); - return array("number", ceil($value), $arg[2]); - } - - protected function lib_round($arg) { - if($arg[0] != "list") { - $value = $this->assertNumber($arg); - return array("number", round($value), $arg[2]); - } else { - $value = $this->assertNumber($arg[2][0]); - $precision = $this->assertNumber($arg[2][1]); - return array("number", round($value, $precision), $arg[2][0][2]); - } - } - - protected function lib_unit($arg) { - if ($arg[0] == "list") { - list($number, $newUnit) = $arg[2]; - return array("number", $this->assertNumber($number), - $this->compileValue($this->lib_e($newUnit))); - } else { - return array("number", $this->assertNumber($arg), ""); - } - } - - /** - * Helper function to get arguments for color manipulation functions. - * takes a list that contains a color like thing and a percentage - */ - public function colorArgs($args) { - if ($args[0] != 'list' || count($args[2]) < 2) { - return array(array('color', 0, 0, 0), 0); - } - list($color, $delta) = $args[2]; - $color = $this->assertColor($color); - $delta = floatval($delta[1]); - - return array($color, $delta); - } - - protected function lib_darken($args) { - list($color, $delta) = $this->colorArgs($args); - - $hsl = $this->toHSL($color); - $hsl[3] = $this->clamp($hsl[3] - $delta, 100); - return $this->toRGB($hsl); - } - - protected function lib_lighten($args) { - list($color, $delta) = $this->colorArgs($args); - - $hsl = $this->toHSL($color); - $hsl[3] = $this->clamp($hsl[3] + $delta, 100); - return $this->toRGB($hsl); - } - - protected function lib_saturate($args) { - list($color, $delta) = $this->colorArgs($args); - - $hsl = $this->toHSL($color); - $hsl[2] = $this->clamp($hsl[2] + $delta, 100); - return $this->toRGB($hsl); - } - - protected function lib_desaturate($args) { - list($color, $delta) = $this->colorArgs($args); - - $hsl = $this->toHSL($color); - $hsl[2] = $this->clamp($hsl[2] - $delta, 100); - return $this->toRGB($hsl); - } - - protected function lib_spin($args) { - list($color, $delta) = $this->colorArgs($args); - - $hsl = $this->toHSL($color); - - $hsl[1] = $hsl[1] + $delta % 360; - if ($hsl[1] < 0) $hsl[1] += 360; - - return $this->toRGB($hsl); - } - - protected function lib_fadeout($args) { - list($color, $delta) = $this->colorArgs($args); - $color[4] = $this->clamp((isset($color[4]) ? $color[4] : 1) - $delta/100); - return $color; - } - - protected function lib_fadein($args) { - list($color, $delta) = $this->colorArgs($args); - $color[4] = $this->clamp((isset($color[4]) ? $color[4] : 1) + $delta/100); - return $color; - } - - protected function lib_hue($color) { - $hsl = $this->toHSL($this->assertColor($color)); - return round($hsl[1]); - } - - protected function lib_saturation($color) { - $hsl = $this->toHSL($this->assertColor($color)); - return round($hsl[2]); - } - - protected function lib_lightness($color) { - $hsl = $this->toHSL($this->assertColor($color)); - return round($hsl[3]); - } - - // get the alpha of a color - // defaults to 1 for non-colors or colors without an alpha - protected function lib_alpha($value) { - if (!is_null($color = $this->coerceColor($value))) { - return isset($color[4]) ? $color[4] : 1; - } - } - - // set the alpha of the color - protected function lib_fade($args) { - list($color, $alpha) = $this->colorArgs($args); - $color[4] = $this->clamp($alpha / 100.0); - return $color; - } - - protected function lib_percentage($arg) { - $num = $this->assertNumber($arg); - return array("number", $num*100, "%"); - } - - // mixes two colors by weight - // mix(@color1, @color2, [@weight: 50%]); - // http://sass-lang.com/docs/yardoc/Sass/Script/Functions.html#mix-instance_method - protected function lib_mix($args) { - if ($args[0] != "list" || count($args[2]) < 2) - $this->throwError("mix expects (color1, color2, weight)"); - - list($first, $second) = $args[2]; - $first = $this->assertColor($first); - $second = $this->assertColor($second); - - $first_a = $this->lib_alpha($first); - $second_a = $this->lib_alpha($second); - - if (isset($args[2][2])) { - $weight = $args[2][2][1] / 100.0; - } else { - $weight = 0.5; - } - - $w = $weight * 2 - 1; - $a = $first_a - $second_a; - - $w1 = (($w * $a == -1 ? $w : ($w + $a)/(1 + $w * $a)) + 1) / 2.0; - $w2 = 1.0 - $w1; - - $new = array('color', - $w1 * $first[1] + $w2 * $second[1], - $w1 * $first[2] + $w2 * $second[2], - $w1 * $first[3] + $w2 * $second[3], - ); - - if ($first_a != 1.0 || $second_a != 1.0) { - $new[] = $first_a * $weight + $second_a * ($weight - 1); - } - - return $this->fixColor($new); - } - - protected function lib_contrast($args) { - $darkColor = array('color', 0, 0, 0); - $lightColor = array('color', 255, 255, 255); - $threshold = 0.43; - - if ( $args[0] == 'list' ) { - $inputColor = ( isset($args[2][0]) ) ? $this->assertColor($args[2][0]) : $lightColor; - $darkColor = ( isset($args[2][1]) ) ? $this->assertColor($args[2][1]) : $darkColor; - $lightColor = ( isset($args[2][2]) ) ? $this->assertColor($args[2][2]) : $lightColor; - $threshold = ( isset($args[2][3]) ) ? $this->assertNumber($args[2][3]) : $threshold; - } - else { - $inputColor = $this->assertColor($args); - } - - $inputColor = $this->coerceColor($inputColor); - $darkColor = $this->coerceColor($darkColor); - $lightColor = $this->coerceColor($lightColor); - - //Figure out which is actually light and dark! - if ( $this->lib_luma($darkColor) > $this->lib_luma($lightColor) ) { - $t = $lightColor; - $lightColor = $darkColor; - $darkColor = $t; - } - - $inputColor_alpha = $this->lib_alpha($inputColor); - if ( ( $this->lib_luma($inputColor) * $inputColor_alpha) < $threshold) { - return $lightColor; - } - return $darkColor; - } - - protected function lib_luma($color) { - $color = $this->coerceColor($color); - return (0.2126 * $color[0] / 255) + (0.7152 * $color[1] / 255) + (0.0722 * $color[2] / 255); - } - - - public function assertColor($value, $error = "expected color value") { - $color = $this->coerceColor($value); - if (is_null($color)) $this->throwError($error); - return $color; - } - - public function assertNumber($value, $error = "expecting number") { - if ($value[0] == "number") return $value[1]; - $this->throwError($error); - } - - public function assertArgs($value, $expectedArgs, $name="") { - if ($expectedArgs == 1) { - return $value; - } else { - if ($value[0] !== "list" || $value[1] != ",") $this->throwError("expecting list"); - $values = $value[2]; - $numValues = count($values); - if ($expectedArgs != $numValues) { - if ($name) { - $name = $name . ": "; - } - - $this->throwError("${name}expecting $expectedArgs arguments, got $numValues"); - } - - return $values; - } - } - - protected function toHSL($color) { - if ($color[0] == 'hsl') return $color; - - $r = $color[1] / 255; - $g = $color[2] / 255; - $b = $color[3] / 255; - - $min = min($r, $g, $b); - $max = max($r, $g, $b); - - $L = ($min + $max) / 2; - if ($min == $max) { - $S = $H = 0; - } else { - if ($L < 0.5) - $S = ($max - $min)/($max + $min); - else - $S = ($max - $min)/(2.0 - $max - $min); - - if ($r == $max) $H = ($g - $b)/($max - $min); - elseif ($g == $max) $H = 2.0 + ($b - $r)/($max - $min); - elseif ($b == $max) $H = 4.0 + ($r - $g)/($max - $min); - - } - - $out = array('hsl', - ($H < 0 ? $H + 6 : $H)*60, - $S*100, - $L*100, - ); - - if (count($color) > 4) $out[] = $color[4]; // copy alpha - return $out; - } - - protected function toRGB_helper($comp, $temp1, $temp2) { - if ($comp < 0) $comp += 1.0; - elseif ($comp > 1) $comp -= 1.0; - - if (6 * $comp < 1) return $temp1 + ($temp2 - $temp1) * 6 * $comp; - if (2 * $comp < 1) return $temp2; - if (3 * $comp < 2) return $temp1 + ($temp2 - $temp1)*((2/3) - $comp) * 6; - - return $temp1; - } - - /** - * Converts a hsl array into a color value in rgb. - * Expects H to be in range of 0 to 360, S and L in 0 to 100 - */ - protected function toRGB($color) { - if ($color[0] == 'color') return $color; - - $H = $color[1] / 360; - $S = $color[2] / 100; - $L = $color[3] / 100; - - if ($S == 0) { - $r = $g = $b = $L; - } else { - $temp2 = $L < 0.5 ? - $L*(1.0 + $S) : - $L + $S - $L * $S; - - $temp1 = 2.0 * $L - $temp2; - - $r = $this->toRGB_helper($H + 1/3, $temp1, $temp2); - $g = $this->toRGB_helper($H, $temp1, $temp2); - $b = $this->toRGB_helper($H - 1/3, $temp1, $temp2); - } - - // $out = array('color', round($r*255), round($g*255), round($b*255)); - $out = array('color', $r*255, $g*255, $b*255); - if (count($color) > 4) $out[] = $color[4]; // copy alpha - return $out; - } - - protected function clamp($v, $max = 1, $min = 0) { - return min($max, max($min, $v)); - } - - /** - * Convert the rgb, rgba, hsl color literals of function type - * as returned by the parser into values of color type. - */ - protected function funcToColor($func) { - $fname = $func[1]; - if ($func[2][0] != 'list') return false; // need a list of arguments - $rawComponents = $func[2][2]; - - if ($fname == 'hsl' || $fname == 'hsla') { - $hsl = array('hsl'); - $i = 0; - foreach ($rawComponents as $c) { - $val = $this->reduce($c); - $val = isset($val[1]) ? floatval($val[1]) : 0; - - if ($i == 0) $clamp = 360; - elseif ($i < 3) $clamp = 100; - else $clamp = 1; - - $hsl[] = $this->clamp($val, $clamp); - $i++; - } - - while (count($hsl) < 4) $hsl[] = 0; - return $this->toRGB($hsl); - - } elseif ($fname == 'rgb' || $fname == 'rgba') { - $components = array(); - $i = 1; - foreach ($rawComponents as $c) { - $c = $this->reduce($c); - if ($i < 4) { - if ($c[0] == "number" && $c[2] == "%") { - $components[] = 255 * ($c[1] / 100); - } else { - $components[] = floatval($c[1]); - } - } elseif ($i == 4) { - if ($c[0] == "number" && $c[2] == "%") { - $components[] = 1.0 * ($c[1] / 100); - } else { - $components[] = floatval($c[1]); - } - } else break; - - $i++; - } - while (count($components) < 3) $components[] = 0; - array_unshift($components, 'color'); - return $this->fixColor($components); - } - - return false; - } - - protected function reduce($value, $forExpression = false) { - switch ($value[0]) { - case "interpolate": - $reduced = $this->reduce($value[1]); - $var = $this->compileValue($reduced); - $res = $this->reduce(array("variable", $this->vPrefix . $var)); - - if ($res[0] == "raw_color") { - $res = $this->coerceColor($res); - } - - if (empty($value[2])) $res = $this->lib_e($res); - - return $res; - case "variable": - $key = $value[1]; - if (is_array($key)) { - $key = $this->reduce($key); - $key = $this->vPrefix . $this->compileValue($this->lib_e($key)); - } - - $seen =& $this->env->seenNames; - - if (!empty($seen[$key])) { - $this->throwError("infinite loop detected: $key"); - } - - $seen[$key] = true; - $out = $this->reduce($this->get($key)); - $seen[$key] = false; - return $out; - case "list": - foreach ($value[2] as &$item) { - $item = $this->reduce($item, $forExpression); - } - return $value; - case "expression": - return $this->evaluate($value); - case "string": - foreach ($value[2] as &$part) { - if (is_array($part)) { - $strip = $part[0] == "variable"; - $part = $this->reduce($part); - if ($strip) $part = $this->lib_e($part); - } - } - return $value; - case "escape": - list(,$inner) = $value; - return $this->lib_e($this->reduce($inner)); - case "function": - $color = $this->funcToColor($value); - if ($color) return $color; - - list(, $name, $args) = $value; - if ($name == "%") $name = "_sprintf"; - - $f = isset($this->libFunctions[$name]) ? - $this->libFunctions[$name] : array($this, 'lib_'.str_replace('-', '_', $name)); - - if (is_callable($f)) { - if ($args[0] == 'list') - $args = self::compressList($args[2], $args[1]); - - $ret = call_user_func($f, $this->reduce($args, true), $this); - - if (is_null($ret)) { - return array("string", "", array( - $name, "(", $args, ")" - )); - } - - // convert to a typed value if the result is a php primitive - if (is_numeric($ret)) $ret = array('number', $ret, ""); - elseif (!is_array($ret)) $ret = array('keyword', $ret); - - return $ret; - } - - // plain function, reduce args - $value[2] = $this->reduce($value[2]); - return $value; - case "unary": - list(, $op, $exp) = $value; - $exp = $this->reduce($exp); - - if ($exp[0] == "number") { - switch ($op) { - case "+": - return $exp; - case "-": - $exp[1] *= -1; - return $exp; - } - } - return array("string", "", array($op, $exp)); - } - - if ($forExpression) { - switch ($value[0]) { - case "keyword": - if ($color = $this->coerceColor($value)) { - return $color; - } - break; - case "raw_color": - return $this->coerceColor($value); - } - } - - return $value; - } - - - // coerce a value for use in color operation - protected function coerceColor($value) { - switch($value[0]) { - case 'color': return $value; - case 'raw_color': - $c = array("color", 0, 0, 0); - $colorStr = substr($value[1], 1); - $num = hexdec($colorStr); - $width = strlen($colorStr) == 3 ? 16 : 256; - - for ($i = 3; $i > 0; $i--) { // 3 2 1 - $t = $num % $width; - $num /= $width; - - $c[$i] = $t * (256/$width) + $t * floor(16/$width); - } - - return $c; - case 'keyword': - $name = $value[1]; - if (isset(self::$cssColors[$name])) { - $rgba = explode(',', self::$cssColors[$name]); - - if(isset($rgba[3])) - return array('color', $rgba[0], $rgba[1], $rgba[2], $rgba[3]); - - return array('color', $rgba[0], $rgba[1], $rgba[2]); - } - return null; - } - } - - // make something string like into a string - protected function coerceString($value) { - switch ($value[0]) { - case "string": - return $value; - case "keyword": - return array("string", "", array($value[1])); - } - return null; - } - - // turn list of length 1 into value type - protected function flattenList($value) { - if ($value[0] == "list" && count($value[2]) == 1) { - return $this->flattenList($value[2][0]); - } - return $value; - } - - public function toBool($a) { - if ($a) return self::$TRUE; - else return self::$FALSE; - } - - // evaluate an expression - protected function evaluate($exp) { - list(, $op, $left, $right, $whiteBefore, $whiteAfter) = $exp; - - $left = $this->reduce($left, true); - $right = $this->reduce($right, true); - - if ($leftColor = $this->coerceColor($left)) { - $left = $leftColor; - } - - if ($rightColor = $this->coerceColor($right)) { - $right = $rightColor; - } - - $ltype = $left[0]; - $rtype = $right[0]; - - // operators that work on all types - if ($op == "and") { - return $this->toBool($left == self::$TRUE && $right == self::$TRUE); - } - - if ($op == "=") { - return $this->toBool($this->eq($left, $right) ); - } - - if ($op == "+" && !is_null($str = $this->stringConcatenate($left, $right))) { - return $str; - } - - // type based operators - $fname = "op_${ltype}_${rtype}"; - if (is_callable(array($this, $fname))) { - $out = $this->$fname($op, $left, $right); - if (!is_null($out)) return $out; - } - - // make the expression look it did before being parsed - $paddedOp = $op; - if ($whiteBefore) $paddedOp = " " . $paddedOp; - if ($whiteAfter) $paddedOp .= " "; - - return array("string", "", array($left, $paddedOp, $right)); - } - - protected function stringConcatenate($left, $right) { - if ($strLeft = $this->coerceString($left)) { - if ($right[0] == "string") { - $right[1] = ""; - } - $strLeft[2][] = $right; - return $strLeft; - } - - if ($strRight = $this->coerceString($right)) { - array_unshift($strRight[2], $left); - return $strRight; - } - } - - - // make sure a color's components don't go out of bounds - protected function fixColor($c) { - foreach (range(1, 3) as $i) { - if ($c[$i] < 0) $c[$i] = 0; - if ($c[$i] > 255) $c[$i] = 255; - } - - return $c; - } - - protected function op_number_color($op, $lft, $rgt) { - if ($op == '+' || $op == '*') { - return $this->op_color_number($op, $rgt, $lft); - } - } - - protected function op_color_number($op, $lft, $rgt) { - if ($rgt[0] == '%') $rgt[1] /= 100; - - return $this->op_color_color($op, $lft, - array_fill(1, count($lft) - 1, $rgt[1])); - } - - protected function op_color_color($op, $left, $right) { - $out = array('color'); - $max = count($left) > count($right) ? count($left) : count($right); - foreach (range(1, $max - 1) as $i) { - $lval = isset($left[$i]) ? $left[$i] : 0; - $rval = isset($right[$i]) ? $right[$i] : 0; - switch ($op) { - case '+': - $out[] = $lval + $rval; - break; - case '-': - $out[] = $lval - $rval; - break; - case '*': - $out[] = $lval * $rval; - break; - case '%': - $out[] = $lval % $rval; - break; - case '/': - if ($rval == 0) $this->throwError("evaluate error: can't divide by zero"); - $out[] = $lval / $rval; - break; - default: - $this->throwError('evaluate error: color op number failed on op '.$op); - } - } - return $this->fixColor($out); - } - - function lib_red($color){ - $color = $this->coerceColor($color); - if (is_null($color)) { - $this->throwError('color expected for red()'); - } - - return $color[1]; - } - - function lib_green($color){ - $color = $this->coerceColor($color); - if (is_null($color)) { - $this->throwError('color expected for green()'); - } - - return $color[2]; - } - - function lib_blue($color){ - $color = $this->coerceColor($color); - if (is_null($color)) { - $this->throwError('color expected for blue()'); - } - - return $color[3]; - } - - - // operator on two numbers - protected function op_number_number($op, $left, $right) { - $unit = empty($left[2]) ? $right[2] : $left[2]; - - $value = 0; - switch ($op) { - case '+': - $value = $left[1] + $right[1]; - break; - case '*': - $value = $left[1] * $right[1]; - break; - case '-': - $value = $left[1] - $right[1]; - break; - case '%': - $value = $left[1] % $right[1]; - break; - case '/': - if ($right[1] == 0) $this->throwError('parse error: divide by zero'); - $value = $left[1] / $right[1]; - break; - case '<': - return $this->toBool($left[1] < $right[1]); - case '>': - return $this->toBool($left[1] > $right[1]); - case '>=': - return $this->toBool($left[1] >= $right[1]); - case '=<': - return $this->toBool($left[1] <= $right[1]); - default: - $this->throwError('parse error: unknown number operator: '.$op); - } - - return array("number", $value, $unit); - } - - - /* environment functions */ - - protected function makeOutputBlock($type, $selectors = null) { - $b = new stdclass; - $b->lines = array(); - $b->children = array(); - $b->selectors = $selectors; - $b->type = $type; - $b->parent = $this->scope; - return $b; - } - - // the state of execution - protected function pushEnv($block = null) { - $e = new stdclass; - $e->parent = $this->env; - $e->store = array(); - $e->block = $block; - - $this->env = $e; - return $e; - } - - // pop something off the stack - protected function popEnv() { - $old = $this->env; - $this->env = $this->env->parent; - return $old; - } - - // set something in the current env - protected function set($name, $value) { - $this->env->store[$name] = $value; - } - - - // get the highest occurrence entry for a name - protected function get($name) { - $current = $this->env; - - $isArguments = $name == $this->vPrefix . 'arguments'; - while ($current) { - if ($isArguments && isset($current->arguments)) { - return array('list', ' ', $current->arguments); - } - - if (isset($current->store[$name])) - return $current->store[$name]; - else { - $current = isset($current->storeParent) ? - $current->storeParent : $current->parent; - } - } - - $this->throwError("variable $name is undefined"); - } - - // inject array of unparsed strings into environment as variables - protected function injectVariables($args) { - $this->pushEnv(); - $parser = new lessc_parser($this, __METHOD__); - foreach ($args as $name => $strValue) { - if ($name{0} != '@') $name = '@'.$name; - $parser->count = 0; - $parser->buffer = (string)$strValue; - if (!$parser->propertyValue($value)) { - throw new Exception("failed to parse passed in variable $name: $strValue"); - } - - $this->set($name, $value); - } - } - - /** - * Initialize any static state, can initialize parser for a file - * $opts isn't used yet - */ - public function __construct($fname = null) { - if ($fname !== null) { - // used for deprecated parse method - $this->_parseFile = $fname; - } - } - - public function compile($string, $name = null) { - $locale = setlocale(LC_NUMERIC, 0); - setlocale(LC_NUMERIC, "C"); - - $this->parser = $this->makeParser($name); - $root = $this->parser->parse($string); - - $this->env = null; - $this->scope = null; - - $this->formatter = $this->newFormatter(); - - if (!empty($this->registeredVars)) { - $this->injectVariables($this->registeredVars); - } - - $this->sourceParser = $this->parser; // used for error messages - $this->compileBlock($root); - - ob_start(); - $this->formatter->block($this->scope); - $out = ob_get_clean(); - setlocale(LC_NUMERIC, $locale); - return $out; - } - - public function compileFile($fname, $outFname = null) { - if (!is_readable($fname)) { - throw new Exception('load error: failed to find '.$fname); - } - - $pi = pathinfo($fname); - - $oldImport = $this->importDir; - - $this->importDir = (array)$this->importDir; - $this->importDir[] = $pi['dirname'].'/'; - - $this->addParsedFile($fname); - - $out = $this->compile(file_get_contents($fname), $fname); - - $this->importDir = $oldImport; - - if ($outFname !== null) { - return file_put_contents($outFname, $out); - } - - return $out; - } - - // compile only if changed input has changed or output doesn't exist - public function checkedCompile($in, $out) { - if (!is_file($out) || filemtime($in) > filemtime($out)) { - $this->compileFile($in, $out); - return true; - } - return false; - } - - /** - * Execute lessphp on a .less file or a lessphp cache structure - * - * The lessphp cache structure contains information about a specific - * less file having been parsed. It can be used as a hint for future - * calls to determine whether or not a rebuild is required. - * - * The cache structure contains two important keys that may be used - * externally: - * - * compiled: The final compiled CSS - * updated: The time (in seconds) the CSS was last compiled - * - * The cache structure is a plain-ol' PHP associative array and can - * be serialized and unserialized without a hitch. - * - * @param mixed $in Input - * @param bool $force Force rebuild? - * @return array lessphp cache structure - */ - public function cachedCompile($in, $force = false) { - // assume no root - $root = null; - - if (is_string($in)) { - $root = $in; - } elseif (is_array($in) and isset($in['root'])) { - if ($force or ! isset($in['files'])) { - // If we are forcing a recompile or if for some reason the - // structure does not contain any file information we should - // specify the root to trigger a rebuild. - $root = $in['root']; - } elseif (isset($in['files']) and is_array($in['files'])) { - foreach ($in['files'] as $fname => $ftime ) { - if (!file_exists($fname) or filemtime($fname) > $ftime) { - // One of the files we knew about previously has changed - // so we should look at our incoming root again. - $root = $in['root']; - break; - } - } - } - } else { - // TODO: Throw an exception? We got neither a string nor something - // that looks like a compatible lessphp cache structure. - return null; - } - - if ($root !== null) { - // If we have a root value which means we should rebuild. - $out = array(); - $out['root'] = $root; - $out['compiled'] = $this->compileFile($root); - $out['files'] = $this->allParsedFiles(); - $out['updated'] = time(); - return $out; - } else { - // No changes, pass back the structure - // we were given initially. - return $in; - } - - } - - // parse and compile buffer - // This is deprecated - public function parse($str = null, $initialVariables = null) { - if (is_array($str)) { - $initialVariables = $str; - $str = null; - } - - $oldVars = $this->registeredVars; - if ($initialVariables !== null) { - $this->setVariables($initialVariables); - } - - if ($str == null) { - if (empty($this->_parseFile)) { - throw new exception("nothing to parse"); - } - - $out = $this->compileFile($this->_parseFile); - } else { - $out = $this->compile($str); - } - - $this->registeredVars = $oldVars; - return $out; - } - - protected function makeParser($name) { - $parser = new lessc_parser($this, $name); - $parser->writeComments = $this->preserveComments; - - return $parser; - } - - public function setFormatter($name) { - $this->formatterName = $name; - } - - protected function newFormatter() { - $className = "lessc_formatter_lessjs"; - if (!empty($this->formatterName)) { - if (!is_string($this->formatterName)) - return $this->formatterName; - $className = "lessc_formatter_$this->formatterName"; - } - - return new $className; - } - - public function setPreserveComments($preserve) { - $this->preserveComments = $preserve; - } - - public function registerFunction($name, $func) { - $this->libFunctions[$name] = $func; - } - - public function unregisterFunction($name) { - unset($this->libFunctions[$name]); - } - - public function setVariables($variables) { - $this->registeredVars = array_merge($this->registeredVars, $variables); - } - - public function unsetVariable($name) { - unset($this->registeredVars[$name]); - } - - public function setImportDir($dirs) { - $this->importDir = (array)$dirs; - } - - public function addImportDir($dir) { - $this->importDir = (array)$this->importDir; - $this->importDir[] = $dir; - } - - public function allParsedFiles() { - return $this->allParsedFiles; - } - - public function addParsedFile($file) { - $this->allParsedFiles[realpath($file)] = filemtime($file); - } - - /** - * Uses the current value of $this->count to show line and line number - */ - public function throwError($msg = null) { - if ($this->sourceLoc >= 0) { - $this->sourceParser->throwError($msg, $this->sourceLoc); - } - throw new exception($msg); - } - - // compile file $in to file $out if $in is newer than $out - // returns true when it compiles, false otherwise - public static function ccompile($in, $out, $less = null) { - if ($less === null) { - $less = new self; - } - return $less->checkedCompile($in, $out); - } - - public static function cexecute($in, $force = false, $less = null) { - if ($less === null) { - $less = new self; - } - return $less->cachedCompile($in, $force); - } - - static protected $cssColors = array( - 'aliceblue' => '240,248,255', - 'antiquewhite' => '250,235,215', - 'aqua' => '0,255,255', - 'aquamarine' => '127,255,212', - 'azure' => '240,255,255', - 'beige' => '245,245,220', - 'bisque' => '255,228,196', - 'black' => '0,0,0', - 'blanchedalmond' => '255,235,205', - 'blue' => '0,0,255', - 'blueviolet' => '138,43,226', - 'brown' => '165,42,42', - 'burlywood' => '222,184,135', - 'cadetblue' => '95,158,160', - 'chartreuse' => '127,255,0', - 'chocolate' => '210,105,30', - 'coral' => '255,127,80', - 'cornflowerblue' => '100,149,237', - 'cornsilk' => '255,248,220', - 'crimson' => '220,20,60', - 'cyan' => '0,255,255', - 'darkblue' => '0,0,139', - 'darkcyan' => '0,139,139', - 'darkgoldenrod' => '184,134,11', - 'darkgray' => '169,169,169', - 'darkgreen' => '0,100,0', - 'darkgrey' => '169,169,169', - 'darkkhaki' => '189,183,107', - 'darkmagenta' => '139,0,139', - 'darkolivegreen' => '85,107,47', - 'darkorange' => '255,140,0', - 'darkorchid' => '153,50,204', - 'darkred' => '139,0,0', - 'darksalmon' => '233,150,122', - 'darkseagreen' => '143,188,143', - 'darkslateblue' => '72,61,139', - 'darkslategray' => '47,79,79', - 'darkslategrey' => '47,79,79', - 'darkturquoise' => '0,206,209', - 'darkviolet' => '148,0,211', - 'deeppink' => '255,20,147', - 'deepskyblue' => '0,191,255', - 'dimgray' => '105,105,105', - 'dimgrey' => '105,105,105', - 'dodgerblue' => '30,144,255', - 'firebrick' => '178,34,34', - 'floralwhite' => '255,250,240', - 'forestgreen' => '34,139,34', - 'fuchsia' => '255,0,255', - 'gainsboro' => '220,220,220', - 'ghostwhite' => '248,248,255', - 'gold' => '255,215,0', - 'goldenrod' => '218,165,32', - 'gray' => '128,128,128', - 'green' => '0,128,0', - 'greenyellow' => '173,255,47', - 'grey' => '128,128,128', - 'honeydew' => '240,255,240', - 'hotpink' => '255,105,180', - 'indianred' => '205,92,92', - 'indigo' => '75,0,130', - 'ivory' => '255,255,240', - 'khaki' => '240,230,140', - 'lavender' => '230,230,250', - 'lavenderblush' => '255,240,245', - 'lawngreen' => '124,252,0', - 'lemonchiffon' => '255,250,205', - 'lightblue' => '173,216,230', - 'lightcoral' => '240,128,128', - 'lightcyan' => '224,255,255', - 'lightgoldenrodyellow' => '250,250,210', - 'lightgray' => '211,211,211', - 'lightgreen' => '144,238,144', - 'lightgrey' => '211,211,211', - 'lightpink' => '255,182,193', - 'lightsalmon' => '255,160,122', - 'lightseagreen' => '32,178,170', - 'lightskyblue' => '135,206,250', - 'lightslategray' => '119,136,153', - 'lightslategrey' => '119,136,153', - 'lightsteelblue' => '176,196,222', - 'lightyellow' => '255,255,224', - 'lime' => '0,255,0', - 'limegreen' => '50,205,50', - 'linen' => '250,240,230', - 'magenta' => '255,0,255', - 'maroon' => '128,0,0', - 'mediumaquamarine' => '102,205,170', - 'mediumblue' => '0,0,205', - 'mediumorchid' => '186,85,211', - 'mediumpurple' => '147,112,219', - 'mediumseagreen' => '60,179,113', - 'mediumslateblue' => '123,104,238', - 'mediumspringgreen' => '0,250,154', - 'mediumturquoise' => '72,209,204', - 'mediumvioletred' => '199,21,133', - 'midnightblue' => '25,25,112', - 'mintcream' => '245,255,250', - 'mistyrose' => '255,228,225', - 'moccasin' => '255,228,181', - 'navajowhite' => '255,222,173', - 'navy' => '0,0,128', - 'oldlace' => '253,245,230', - 'olive' => '128,128,0', - 'olivedrab' => '107,142,35', - 'orange' => '255,165,0', - 'orangered' => '255,69,0', - 'orchid' => '218,112,214', - 'palegoldenrod' => '238,232,170', - 'palegreen' => '152,251,152', - 'paleturquoise' => '175,238,238', - 'palevioletred' => '219,112,147', - 'papayawhip' => '255,239,213', - 'peachpuff' => '255,218,185', - 'peru' => '205,133,63', - 'pink' => '255,192,203', - 'plum' => '221,160,221', - 'powderblue' => '176,224,230', - 'purple' => '128,0,128', - 'red' => '255,0,0', - 'rosybrown' => '188,143,143', - 'royalblue' => '65,105,225', - 'saddlebrown' => '139,69,19', - 'salmon' => '250,128,114', - 'sandybrown' => '244,164,96', - 'seagreen' => '46,139,87', - 'seashell' => '255,245,238', - 'sienna' => '160,82,45', - 'silver' => '192,192,192', - 'skyblue' => '135,206,235', - 'slateblue' => '106,90,205', - 'slategray' => '112,128,144', - 'slategrey' => '112,128,144', - 'snow' => '255,250,250', - 'springgreen' => '0,255,127', - 'steelblue' => '70,130,180', - 'tan' => '210,180,140', - 'teal' => '0,128,128', - 'thistle' => '216,191,216', - 'tomato' => '255,99,71', - 'transparent' => '0,0,0,0', - 'turquoise' => '64,224,208', - 'violet' => '238,130,238', - 'wheat' => '245,222,179', - 'white' => '255,255,255', - 'whitesmoke' => '245,245,245', - 'yellow' => '255,255,0', - 'yellowgreen' => '154,205,50' - ); + // attempts to find the path of an import url, returns null for css files + protected function findImport($url) { + foreach ((array)$this->importDir as $dir) { + $full = $dir.(substr($dir, -1) != '/' ? '/' : '').$url; + if ($this->fileExists($file = $full.'.less') || $this->fileExists($file = $full)) { + return $file; + } + } + + return null; + } + + protected function fileExists($name) { + return is_file($name); + } + + public static function compressList($items, $delim) { + if (!isset($items[1]) && isset($items[0])) return $items[0]; + else return array('list', $delim, $items); + } + + public static function preg_quote($what) { + return preg_quote($what, '/'); + } + + protected function tryImport($importPath, $parentBlock, $out) { + if ($importPath[0] == "function" && $importPath[1] == "url") { + $importPath = $this->flattenList($importPath[2]); + } + + $str = $this->coerceString($importPath); + if ($str === null) return false; + + $url = $this->compileValue($this->lib_e($str)); + + // don't import if it ends in css + if (substr_compare($url, '.css', -4, 4) === 0) return false; + + $realPath = $this->findImport($url); + + if ($realPath === null) return false; + + if ($this->importDisabled) { + return array(false, "/* import disabled */"); + } + + if (isset($this->allParsedFiles[realpath($realPath)])) { + return array(false, null); + } + + $this->addParsedFile($realPath); + $parser = $this->makeParser($realPath); + $root = $parser->parse(file_get_contents($realPath)); + + // set the parents of all the block props + foreach ($root->props as $prop) { + if ($prop[0] == "block") { + $prop[1]->parent = $parentBlock; + } + } + + // copy mixins into scope, set their parents + // bring blocks from import into current block + // TODO: need to mark the source parser these came from this file + foreach ($root->children as $childName => $child) { + if (isset($parentBlock->children[$childName])) { + $parentBlock->children[$childName] = array_merge( + $parentBlock->children[$childName], + $child); + } else { + $parentBlock->children[$childName] = $child; + } + } + + $pi = pathinfo($realPath); + $dir = $pi["dirname"]; + + list($top, $bottom) = $this->sortProps($root->props, true); + $this->compileImportedProps($top, $parentBlock, $out, $parser, $dir); + + return array(true, $bottom, $parser, $dir); + } + + protected function compileImportedProps($props, $block, $out, $sourceParser, $importDir) { + $oldSourceParser = $this->sourceParser; + + $oldImport = $this->importDir; + + // TODO: this is because the importDir api is stupid + $this->importDir = (array)$this->importDir; + array_unshift($this->importDir, $importDir); + + foreach ($props as $prop) { + $this->compileProp($prop, $block, $out); + } + + $this->importDir = $oldImport; + $this->sourceParser = $oldSourceParser; + } + + /** + * Recursively compiles a block. + * + * A block is analogous to a CSS block in most cases. A single LESS document + * is encapsulated in a block when parsed, but it does not have parent tags + * so all of it's children appear on the root level when compiled. + * + * Blocks are made up of props and children. + * + * Props are property instructions, array tuples which describe an action + * to be taken, eg. write a property, set a variable, mixin a block. + * + * The children of a block are just all the blocks that are defined within. + * This is used to look up mixins when performing a mixin. + * + * Compiling the block involves pushing a fresh environment on the stack, + * and iterating through the props, compiling each one. + * + * See lessc::compileProp() + * + */ + protected function compileBlock($block) { + switch ($block->type) { + case "root": + $this->compileRoot($block); + break; + case null: + $this->compileCSSBlock($block); + break; + case "media": + $this->compileMedia($block); + break; + case "directive": + $name = "@" . $block->name; + if (!empty($block->value)) { + $name .= " " . $this->compileValue($this->reduce($block->value)); + } + + $this->compileNestedBlock($block, array($name)); + break; + default: + $this->throwError("unknown block type: $block->type\n"); + } + } + + protected function compileCSSBlock($block) { + $env = $this->pushEnv(); + + $selectors = $this->compileSelectors($block->tags); + $env->selectors = $this->multiplySelectors($selectors); + $out = $this->makeOutputBlock(null, $env->selectors); + + $this->scope->children[] = $out; + $this->compileProps($block, $out); + + $block->scope = $env; // mixins carry scope with them! + $this->popEnv(); + } + + protected function compileMedia($media) { + $env = $this->pushEnv($media); + $parentScope = $this->mediaParent($this->scope); + + $query = $this->compileMediaQuery($this->multiplyMedia($env)); + + $this->scope = $this->makeOutputBlock($media->type, array($query)); + $parentScope->children[] = $this->scope; + + $this->compileProps($media, $this->scope); + + if (count($this->scope->lines) > 0) { + $orphanSelelectors = $this->findClosestSelectors(); + if (!is_null($orphanSelelectors)) { + $orphan = $this->makeOutputBlock(null, $orphanSelelectors); + $orphan->lines = $this->scope->lines; + array_unshift($this->scope->children, $orphan); + $this->scope->lines = array(); + } + } + + $this->scope = $this->scope->parent; + $this->popEnv(); + } + + protected function mediaParent($scope) { + while (!empty($scope->parent)) { + if (!empty($scope->type) && $scope->type != "media") { + break; + } + $scope = $scope->parent; + } + + return $scope; + } + + protected function compileNestedBlock($block, $selectors) { + $this->pushEnv($block); + $this->scope = $this->makeOutputBlock($block->type, $selectors); + $this->scope->parent->children[] = $this->scope; + + $this->compileProps($block, $this->scope); + + $this->scope = $this->scope->parent; + $this->popEnv(); + } + + protected function compileRoot($root) { + $this->pushEnv(); + $this->scope = $this->makeOutputBlock($root->type); + $this->compileProps($root, $this->scope); + $this->popEnv(); + } + + protected function compileProps($block, $out) { + foreach ($this->sortProps($block->props) as $prop) { + $this->compileProp($prop, $block, $out); + } + $out->lines = $this->deduplicate($out->lines); + } + + /** + * Deduplicate lines in a block. Comments are not deduplicated. If a + * duplicate rule is detected, the comments immediately preceding each + * occurence are consolidated. + */ + protected function deduplicate($lines) { + $unique = array(); + $comments = array(); + + foreach ($lines as $line) { + if (strpos($line, '/*') === 0) { + $comments[] = $line; + continue; + } + if (!in_array($line, $unique)) { + $unique[] = $line; + } + array_splice($unique, array_search($line, $unique), 0, $comments); + $comments = array(); + } + return array_merge($unique, $comments); + } + + protected function sortProps($props, $split = false) { + $vars = array(); + $imports = array(); + $other = array(); + $stack = array(); + + foreach ($props as $prop) { + switch ($prop[0]) { + case "comment": + $stack[] = $prop; + break; + case "assign": + $stack[] = $prop; + if (isset($prop[1][0]) && $prop[1][0] == $this->vPrefix) { + $vars = array_merge($vars, $stack); + } else { + $other = array_merge($other, $stack); + } + $stack = array(); + break; + case "import": + $id = self::$nextImportId++; + $prop[] = $id; + $stack[] = $prop; + $imports = array_merge($imports, $stack); + $other[] = array("import_mixin", $id); + $stack = array(); + break; + default: + $stack[] = $prop; + $other = array_merge($other, $stack); + $stack = array(); + break; + } + } + $other = array_merge($other, $stack); + + if ($split) { + return array(array_merge($imports, $vars), $other); + } else { + return array_merge($imports, $vars, $other); + } + } + + protected function compileMediaQuery($queries) { + $compiledQueries = array(); + foreach ($queries as $query) { + $parts = array(); + foreach ($query as $q) { + switch ($q[0]) { + case "mediaType": + $parts[] = implode(" ", array_slice($q, 1)); + break; + case "mediaExp": + if (isset($q[2])) { + $parts[] = "($q[1]: " . + $this->compileValue($this->reduce($q[2])) . ")"; + } else { + $parts[] = "($q[1])"; + } + break; + case "variable": + $parts[] = $this->compileValue($this->reduce($q)); + break; + } + } + + if (count($parts) > 0) { + $compiledQueries[] = implode(" and ", $parts); + } + } + + $out = "@media"; + if (!empty($parts)) { + $out .= " " . + implode($this->formatter->selectorSeparator, $compiledQueries); + } + return $out; + } + + protected function multiplyMedia($env, $childQueries = null) { + if (is_null($env) || + !empty($env->block->type) && $env->block->type != "media" + ) { + return $childQueries; + } + + // plain old block, skip + if (empty($env->block->type)) { + return $this->multiplyMedia($env->parent, $childQueries); + } + + $out = array(); + $queries = $env->block->queries; + if (is_null($childQueries)) { + $out = $queries; + } else { + foreach ($queries as $parent) { + foreach ($childQueries as $child) { + $out[] = array_merge($parent, $child); + } + } + } + + return $this->multiplyMedia($env->parent, $out); + } + + protected function expandParentSelectors(&$tag, $replace) { + $parts = explode("$&$", $tag); + $count = 0; + foreach ($parts as &$part) { + $part = str_replace($this->parentSelector, $replace, $part, $c); + $count += $c; + } + $tag = implode($this->parentSelector, $parts); + return $count; + } + + protected function findClosestSelectors() { + $env = $this->env; + $selectors = null; + while ($env !== null) { + if (isset($env->selectors)) { + $selectors = $env->selectors; + break; + } + $env = $env->parent; + } + + return $selectors; + } + + + // multiply $selectors against the nearest selectors in env + protected function multiplySelectors($selectors) { + // find parent selectors + + $parentSelectors = $this->findClosestSelectors(); + if (is_null($parentSelectors)) { + // kill parent reference in top level selector + foreach ($selectors as &$s) { + $this->expandParentSelectors($s, ""); + } + + return $selectors; + } + + $out = array(); + foreach ($parentSelectors as $parent) { + foreach ($selectors as $child) { + $count = $this->expandParentSelectors($child, $parent); + + // don't prepend the parent tag if & was used + if ($count > 0) { + $out[] = trim($child); + } else { + $out[] = trim($parent . ' ' . $child); + } + } + } + + return $out; + } + + // reduces selector expressions + protected function compileSelectors($selectors) { + $out = array(); + + foreach ($selectors as $s) { + if (is_array($s)) { + list(, $value) = $s; + $out[] = trim($this->compileValue($this->reduce($value))); + } else { + $out[] = $s; + } + } + + return $out; + } + + protected function eq($left, $right) { + return $left == $right; + } + + protected function patternMatch($block, $orderedArgs, $keywordArgs) { + // match the guards if it has them + // any one of the groups must have all its guards pass for a match + if (!empty($block->guards)) { + $groupPassed = false; + foreach ($block->guards as $guardGroup) { + foreach ($guardGroup as $guard) { + $this->pushEnv(); + $this->zipSetArgs($block->args, $orderedArgs, $keywordArgs); + + $negate = false; + if ($guard[0] == "negate") { + $guard = $guard[1]; + $negate = true; + } + + $passed = $this->reduce($guard) == self::$TRUE; + if ($negate) $passed = !$passed; + + $this->popEnv(); + + if ($passed) { + $groupPassed = true; + } else { + $groupPassed = false; + break; + } + } + + if ($groupPassed) break; + } + + if (!$groupPassed) { + return false; + } + } + + if (empty($block->args)) { + return $block->isVararg || empty($orderedArgs) && empty($keywordArgs); + } + + $remainingArgs = $block->args; + if ($keywordArgs) { + $remainingArgs = array(); + foreach ($block->args as $arg) { + if ($arg[0] == "arg" && isset($keywordArgs[$arg[1]])) { + continue; + } + + $remainingArgs[] = $arg; + } + } + + $i = -1; // no args + // try to match by arity or by argument literal + foreach ($remainingArgs as $i => $arg) { + switch ($arg[0]) { + case "lit": + if (empty($orderedArgs[$i]) || !$this->eq($arg[1], $orderedArgs[$i])) { + return false; + } + break; + case "arg": + // no arg and no default value + if (!isset($orderedArgs[$i]) && !isset($arg[2])) { + return false; + } + break; + case "rest": + $i--; // rest can be empty + break 2; + } + } + + if ($block->isVararg) { + return true; // not having enough is handled above + } else { + $numMatched = $i + 1; + // greater than because default values always match + return $numMatched >= count($orderedArgs); + } + } + + protected function patternMatchAll($blocks, $orderedArgs, $keywordArgs, $skip = array()) { + $matches = null; + foreach ($blocks as $block) { + // skip seen blocks that don't have arguments + if (isset($skip[$block->id]) && !isset($block->args)) { + continue; + } + + if ($this->patternMatch($block, $orderedArgs, $keywordArgs)) { + $matches[] = $block; + } + } + + return $matches; + } + + // attempt to find blocks matched by path and args + protected function findBlocks($searchIn, $path, $orderedArgs, $keywordArgs, $seen = array()) { + if ($searchIn == null) return null; + if (isset($seen[$searchIn->id])) return null; + $seen[$searchIn->id] = true; + + $name = $path[0]; + + if (isset($searchIn->children[$name])) { + $blocks = $searchIn->children[$name]; + if (count($path) == 1) { + $matches = $this->patternMatchAll($blocks, $orderedArgs, $keywordArgs, $seen); + if (!empty($matches)) { + // This will return all blocks that match in the closest + // scope that has any matching block, like lessjs + return $matches; + } + } else { + $matches = array(); + foreach ($blocks as $subBlock) { + $subMatches = $this->findBlocks($subBlock, + array_slice($path, 1), $orderedArgs, $keywordArgs, $seen); + + if (!is_null($subMatches)) { + foreach ($subMatches as $sm) { + $matches[] = $sm; + } + } + } + + return count($matches) > 0 ? $matches : null; + } + } + if ($searchIn->parent === $searchIn) return null; + return $this->findBlocks($searchIn->parent, $path, $orderedArgs, $keywordArgs, $seen); + } + + // sets all argument names in $args to either the default value + // or the one passed in through $values + protected function zipSetArgs($args, $orderedValues, $keywordValues) { + $assignedValues = array(); + + $i = 0; + foreach ($args as $a) { + if ($a[0] == "arg") { + if (isset($keywordValues[$a[1]])) { + // has keyword arg + $value = $keywordValues[$a[1]]; + } elseif (isset($orderedValues[$i])) { + // has ordered arg + $value = $orderedValues[$i]; + $i++; + } elseif (isset($a[2])) { + // has default value + $value = $a[2]; + } else { + $this->throwError("Failed to assign arg " . $a[1]); + $value = null; // :( + } + + $value = $this->reduce($value); + $this->set($a[1], $value); + $assignedValues[] = $value; + } else { + // a lit + $i++; + } + } + + // check for a rest + $last = end($args); + if ($last[0] == "rest") { + $rest = array_slice($orderedValues, count($args) - 1); + $this->set($last[1], $this->reduce(array("list", " ", $rest))); + } + + // wow is this the only true use of PHP's + operator for arrays? + $this->env->arguments = $assignedValues + $orderedValues; + } + + // compile a prop and update $lines or $blocks appropriately + protected function compileProp($prop, $block, $out) { + // set error position context + $this->sourceLoc = isset($prop[-1]) ? $prop[-1] : -1; + + switch ($prop[0]) { + case 'assign': + list(, $name, $value) = $prop; + if ($name[0] == $this->vPrefix) { + $this->set($name, $value); + } else { + $out->lines[] = $this->formatter->property($name, + $this->compileValue($this->reduce($value))); + } + break; + case 'block': + list(, $child) = $prop; + $this->compileBlock($child); + break; + case 'mixin': + list(, $path, $args, $suffix) = $prop; + + $orderedArgs = array(); + $keywordArgs = array(); + foreach ((array)$args as $arg) { + $argval = null; + switch ($arg[0]) { + case "arg": + if (!isset($arg[2])) { + $orderedArgs[] = $this->reduce(array("variable", $arg[1])); + } else { + $keywordArgs[$arg[1]] = $this->reduce($arg[2]); + } + break; + + case "lit": + $orderedArgs[] = $this->reduce($arg[1]); + break; + default: + $this->throwError("Unknown arg type: " . $arg[0]); + } + } + + $mixins = $this->findBlocks($block, $path, $orderedArgs, $keywordArgs); + + if ($mixins === null) { + $this->throwError("{$prop[1][0]} is undefined"); + } + + foreach ($mixins as $mixin) { + if ($mixin === $block && !$orderedArgs) { + continue; + } + + $haveScope = false; + if (isset($mixin->parent->scope)) { + $haveScope = true; + $mixinParentEnv = $this->pushEnv(); + $mixinParentEnv->storeParent = $mixin->parent->scope; + } + + $haveArgs = false; + if (isset($mixin->args)) { + $haveArgs = true; + $this->pushEnv(); + $this->zipSetArgs($mixin->args, $orderedArgs, $keywordArgs); + } + + $oldParent = $mixin->parent; + if ($mixin != $block) $mixin->parent = $block; + + foreach ($this->sortProps($mixin->props) as $subProp) { + if ($suffix !== null && + $subProp[0] == "assign" && + is_string($subProp[1]) && + $subProp[1][0] != $this->vPrefix + ) { + $subProp[2] = array( + 'list', ' ', + array($subProp[2], array('keyword', $suffix)) + ); + } + + $this->compileProp($subProp, $mixin, $out); + } + + $mixin->parent = $oldParent; + + if ($haveArgs) $this->popEnv(); + if ($haveScope) $this->popEnv(); + } + + break; + case 'raw': + $out->lines[] = $prop[1]; + break; + case "directive": + list(, $name, $value) = $prop; + $out->lines[] = "@$name " . $this->compileValue($this->reduce($value)).';'; + break; + case "comment": + $out->lines[] = $prop[1]; + break; + case "import": + list(, $importPath, $importId) = $prop; + $importPath = $this->reduce($importPath); + + if (!isset($this->env->imports)) { + $this->env->imports = array(); + } + + $result = $this->tryImport($importPath, $block, $out); + + $this->env->imports[$importId] = $result === false ? + array(false, "@import " . $this->compileValue($importPath).";") : + $result; + + break; + case "import_mixin": + list(,$importId) = $prop; + $import = $this->env->imports[$importId]; + if ($import[0] === false) { + if (isset($import[1])) { + $out->lines[] = $import[1]; + } + } else { + list(, $bottom, $parser, $importDir) = $import; + $this->compileImportedProps($bottom, $block, $out, $parser, $importDir); + } + + break; + default: + $this->throwError("unknown op: {$prop[0]}\n"); + } + } + + + /** + * Compiles a primitive value into a CSS property value. + * + * Values in lessphp are typed by being wrapped in arrays, their format is + * typically: + * + * array(type, contents [, additional_contents]*) + * + * The input is expected to be reduced. This function will not work on + * things like expressions and variables. + */ + public function compileValue($value) { + switch ($value[0]) { + case 'list': + // [1] - delimiter + // [2] - array of values + return implode($value[1], array_map(array($this, 'compileValue'), $value[2])); + case 'raw_color': + if (!empty($this->formatter->compressColors)) { + return $this->compileValue($this->coerceColor($value)); + } + return $value[1]; + case 'keyword': + // [1] - the keyword + return $value[1]; + case 'number': + list(, $num, $unit) = $value; + // [1] - the number + // [2] - the unit + if ($this->numberPrecision !== null) { + $num = round($num, $this->numberPrecision); + } + return $num . $unit; + case 'string': + // [1] - contents of string (includes quotes) + list(, $delim, $content) = $value; + foreach ($content as &$part) { + if (is_array($part)) { + $part = $this->compileValue($part); + } + } + return $delim . implode($content) . $delim; + case 'color': + // [1] - red component (either number or a %) + // [2] - green component + // [3] - blue component + // [4] - optional alpha component + list(, $r, $g, $b) = $value; + $r = round($r); + $g = round($g); + $b = round($b); + + if (count($value) == 5 && $value[4] != 1) { // rgba + return 'rgba('.$r.','.$g.','.$b.','.$value[4].')'; + } + + $h = sprintf("#%02x%02x%02x", $r, $g, $b); + + if (!empty($this->formatter->compressColors)) { + // Converting hex color to short notation (e.g. #003399 to #039) + if ($h[1] === $h[2] && $h[3] === $h[4] && $h[5] === $h[6]) { + $h = '#' . $h[1] . $h[3] . $h[5]; + } + } + + return $h; + + case 'function': + list(, $name, $args) = $value; + return $name.'('.$this->compileValue($args).')'; + default: // assumed to be unit + $this->throwError("unknown value type: $value[0]"); + } + } + + protected function lib_pow($args) { + list($base, $exp) = $this->assertArgs($args, 2, "pow"); + return pow($this->assertNumber($base), $this->assertNumber($exp)); + } + + protected function lib_pi() { + return pi(); + } + + protected function lib_mod($args) { + list($a, $b) = $this->assertArgs($args, 2, "mod"); + return $this->assertNumber($a) % $this->assertNumber($b); + } + + protected function lib_tan($num) { + return tan($this->assertNumber($num)); + } + + protected function lib_sin($num) { + return sin($this->assertNumber($num)); + } + + protected function lib_cos($num) { + return cos($this->assertNumber($num)); + } + + protected function lib_atan($num) { + $num = atan($this->assertNumber($num)); + return array("number", $num, "rad"); + } + + protected function lib_asin($num) { + $num = asin($this->assertNumber($num)); + return array("number", $num, "rad"); + } + + protected function lib_acos($num) { + $num = acos($this->assertNumber($num)); + return array("number", $num, "rad"); + } + + protected function lib_sqrt($num) { + return sqrt($this->assertNumber($num)); + } + + protected function lib_extract($value) { + list($list, $idx) = $this->assertArgs($value, 2, "extract"); + $idx = $this->assertNumber($idx); + // 1 indexed + if ($list[0] == "list" && isset($list[2][$idx - 1])) { + return $list[2][$idx - 1]; + } + } + + protected function lib_isnumber($value) { + return $this->toBool($value[0] == "number"); + } + + protected function lib_isstring($value) { + return $this->toBool($value[0] == "string"); + } + + protected function lib_iscolor($value) { + return $this->toBool($this->coerceColor($value)); + } + + protected function lib_iskeyword($value) { + return $this->toBool($value[0] == "keyword"); + } + + protected function lib_ispixel($value) { + return $this->toBool($value[0] == "number" && $value[2] == "px"); + } + + protected function lib_ispercentage($value) { + return $this->toBool($value[0] == "number" && $value[2] == "%"); + } + + protected function lib_isem($value) { + return $this->toBool($value[0] == "number" && $value[2] == "em"); + } + + protected function lib_isrem($value) { + return $this->toBool($value[0] == "number" && $value[2] == "rem"); + } + + protected function lib_rgbahex($color) { + $color = $this->coerceColor($color); + if (is_null($color)) { + $this->throwError("color expected for rgbahex"); + } + + return sprintf("#%02x%02x%02x%02x", + isset($color[4]) ? $color[4] * 255 : 255, + $color[1], + $color[2], + $color[3] + ); + } + + protected function lib_argb($color){ + return $this->lib_rgbahex($color); + } + + /** + * Given an url, decide whether to output a regular link or the base64-encoded contents of the file + * + * @param array $value either an argument list (two strings) or a single string + * @return string formatted url(), either as a link or base64-encoded + */ + protected function lib_data_uri($value) { + $mime = ($value[0] === 'list') ? $value[2][0][2] : null; + $url = ($value[0] === 'list') ? $value[2][1][2][0] : $value[2][0]; + + $fullpath = $this->findImport($url); + + if ($fullpath && ($fsize = filesize($fullpath)) !== false) { + // IE8 can't handle data uris larger than 32KB + if ($fsize/1024 < 32) { + if (is_null($mime)) { + if (class_exists('finfo')) { // php 5.3+ + $finfo = new finfo(FILEINFO_MIME); + $mime = explode('; ', $finfo->file($fullpath)); + $mime = $mime[0]; + } elseif (function_exists('mime_content_type')) { // PHP 5.2 + $mime = mime_content_type($fullpath); + } + } + + if (!is_null($mime)) // fallback if the mime type is still unknown + $url = sprintf('data:%s;base64,%s', $mime, base64_encode(file_get_contents($fullpath))); + } + } + + return 'url("'.$url.'")'; + } + + // utility func to unquote a string + protected function lib_e($arg) { + switch ($arg[0]) { + case "list": + $items = $arg[2]; + if (isset($items[0])) { + return $this->lib_e($items[0]); + } + $this->throwError("unrecognised input"); + case "string": + $arg[1] = ""; + return $arg; + case "keyword": + return $arg; + default: + return array("keyword", $this->compileValue($arg)); + } + } + + protected function lib__sprintf($args) { + if ($args[0] != "list") return $args; + $values = $args[2]; + $string = array_shift($values); + $template = $this->compileValue($this->lib_e($string)); + + $i = 0; + if (preg_match_all('/%[dsa]/', $template, $m)) { + foreach ($m[0] as $match) { + $val = isset($values[$i]) ? + $this->reduce($values[$i]) : array('keyword', ''); + + // lessjs compat, renders fully expanded color, not raw color + if ($color = $this->coerceColor($val)) { + $val = $color; + } + + $i++; + $rep = $this->compileValue($this->lib_e($val)); + $template = preg_replace('/'.self::preg_quote($match).'/', + $rep, $template, 1); + } + } + + $d = $string[0] == "string" ? $string[1] : '"'; + return array("string", $d, array($template)); + } + + protected function lib_floor($arg) { + $value = $this->assertNumber($arg); + return array("number", floor($value), $arg[2]); + } + + protected function lib_ceil($arg) { + $value = $this->assertNumber($arg); + return array("number", ceil($value), $arg[2]); + } + + protected function lib_round($arg) { + if ($arg[0] != "list") { + $value = $this->assertNumber($arg); + return array("number", round($value), $arg[2]); + } else { + $value = $this->assertNumber($arg[2][0]); + $precision = $this->assertNumber($arg[2][1]); + return array("number", round($value, $precision), $arg[2][0][2]); + } + } + + protected function lib_unit($arg) { + if ($arg[0] == "list") { + list($number, $newUnit) = $arg[2]; + return array("number", $this->assertNumber($number), + $this->compileValue($this->lib_e($newUnit))); + } else { + return array("number", $this->assertNumber($arg), ""); + } + } + + /** + * Helper function to get arguments for color manipulation functions. + * takes a list that contains a color like thing and a percentage + */ + public function colorArgs($args) { + if ($args[0] != 'list' || count($args[2]) < 2) { + return array(array('color', 0, 0, 0), 0); + } + list($color, $delta) = $args[2]; + $color = $this->assertColor($color); + $delta = floatval($delta[1]); + + return array($color, $delta); + } + + protected function lib_darken($args) { + list($color, $delta) = $this->colorArgs($args); + + $hsl = $this->toHSL($color); + $hsl[3] = $this->clamp($hsl[3] - $delta, 100); + return $this->toRGB($hsl); + } + + protected function lib_lighten($args) { + list($color, $delta) = $this->colorArgs($args); + + $hsl = $this->toHSL($color); + $hsl[3] = $this->clamp($hsl[3] + $delta, 100); + return $this->toRGB($hsl); + } + + protected function lib_saturate($args) { + list($color, $delta) = $this->colorArgs($args); + + $hsl = $this->toHSL($color); + $hsl[2] = $this->clamp($hsl[2] + $delta, 100); + return $this->toRGB($hsl); + } + + protected function lib_desaturate($args) { + list($color, $delta) = $this->colorArgs($args); + + $hsl = $this->toHSL($color); + $hsl[2] = $this->clamp($hsl[2] - $delta, 100); + return $this->toRGB($hsl); + } + + protected function lib_spin($args) { + list($color, $delta) = $this->colorArgs($args); + + $hsl = $this->toHSL($color); + + $hsl[1] = $hsl[1] + $delta % 360; + if ($hsl[1] < 0) { + $hsl[1] += 360; + } + + return $this->toRGB($hsl); + } + + protected function lib_fadeout($args) { + list($color, $delta) = $this->colorArgs($args); + $color[4] = $this->clamp((isset($color[4]) ? $color[4] : 1) - $delta/100); + return $color; + } + + protected function lib_fadein($args) { + list($color, $delta) = $this->colorArgs($args); + $color[4] = $this->clamp((isset($color[4]) ? $color[4] : 1) + $delta/100); + return $color; + } + + protected function lib_hue($color) { + $hsl = $this->toHSL($this->assertColor($color)); + return round($hsl[1]); + } + + protected function lib_saturation($color) { + $hsl = $this->toHSL($this->assertColor($color)); + return round($hsl[2]); + } + + protected function lib_lightness($color) { + $hsl = $this->toHSL($this->assertColor($color)); + return round($hsl[3]); + } + + // get the alpha of a color + // defaults to 1 for non-colors or colors without an alpha + protected function lib_alpha($value) { + if (!is_null($color = $this->coerceColor($value))) { + return isset($color[4]) ? $color[4] : 1; + } + } + + // set the alpha of the color + protected function lib_fade($args) { + list($color, $alpha) = $this->colorArgs($args); + $color[4] = $this->clamp($alpha / 100.0); + return $color; + } + + protected function lib_percentage($arg) { + $num = $this->assertNumber($arg); + return array("number", $num*100, "%"); + } + + /** + * Mix color with white in variable proportion. + * + * It is the same as calling `mix(#ffffff, @color, @weight)`. + * + * tint(@color, [@weight: 50%]); + * + * http://lesscss.org/functions/#color-operations-tint + * + * @return array Color + */ + protected function lib_tint($args) { + $white = ['color', 255, 255, 255]; + if ($args[0] == 'color') { + return $this->lib_mix([ 'list', ',', [$white, $args] ]); + } elseif ($args[0] == "list" && count($args[2]) == 2) { + return $this->lib_mix([ $args[0], $args[1], [$white, $args[2][0], $args[2][1]] ]); + } else { + $this->throwError("tint expects (color, weight)"); + } + } + + /** + * Mix color with black in variable proportion. + * + * It is the same as calling `mix(#000000, @color, @weight)` + * + * shade(@color, [@weight: 50%]); + * + * http://lesscss.org/functions/#color-operations-shade + * + * @return array Color + */ + protected function lib_shade($args) { + $black = ['color', 0, 0, 0]; + if ($args[0] == 'color') { + return $this->lib_mix([ 'list', ',', [$black, $args] ]); + } elseif ($args[0] == "list" && count($args[2]) == 2) { + return $this->lib_mix([ $args[0], $args[1], [$black, $args[2][0], $args[2][1]] ]); + } else { + $this->throwError("shade expects (color, weight)"); + } + } + + // mixes two colors by weight + // mix(@color1, @color2, [@weight: 50%]); + // http://sass-lang.com/docs/yardoc/Sass/Script/Functions.html#mix-instance_method + protected function lib_mix($args) { + if ($args[0] != "list" || count($args[2]) < 2) + $this->throwError("mix expects (color1, color2, weight)"); + + list($first, $second) = $args[2]; + $first = $this->assertColor($first); + $second = $this->assertColor($second); + + $first_a = $this->lib_alpha($first); + $second_a = $this->lib_alpha($second); + + if (isset($args[2][2])) { + $weight = $args[2][2][1] / 100.0; + } else { + $weight = 0.5; + } + + $w = $weight * 2 - 1; + $a = $first_a - $second_a; + + $w1 = (($w * $a == -1 ? $w : ($w + $a)/(1 + $w * $a)) + 1) / 2.0; + $w2 = 1.0 - $w1; + + $new = array('color', + $w1 * $first[1] + $w2 * $second[1], + $w1 * $first[2] + $w2 * $second[2], + $w1 * $first[3] + $w2 * $second[3], + ); + + if ($first_a != 1.0 || $second_a != 1.0) { + $new[] = $first_a * $weight + $second_a * ($weight - 1); + } + + return $this->fixColor($new); + } + + protected function lib_contrast($args) { + $darkColor = array('color', 0, 0, 0); + $lightColor = array('color', 255, 255, 255); + $threshold = 0.43; + + if ( $args[0] == 'list' ) { + $inputColor = ( isset($args[2][0]) ) ? $this->assertColor($args[2][0]) : $lightColor; + $darkColor = ( isset($args[2][1]) ) ? $this->assertColor($args[2][1]) : $darkColor; + $lightColor = ( isset($args[2][2]) ) ? $this->assertColor($args[2][2]) : $lightColor; + $threshold = ( isset($args[2][3]) ) ? $this->assertNumber($args[2][3]) : $threshold; + } + else { + $inputColor = $this->assertColor($args); + } + + $inputColor = $this->coerceColor($inputColor); + $darkColor = $this->coerceColor($darkColor); + $lightColor = $this->coerceColor($lightColor); + + //Figure out which is actually light and dark! + if ( $this->toLuma($darkColor) > $this->toLuma($lightColor) ) { + $t = $lightColor; + $lightColor = $darkColor; + $darkColor = $t; + } + + $inputColor_alpha = $this->lib_alpha($inputColor); + if ( ( $this->toLuma($inputColor) * $inputColor_alpha) < $threshold) { + return $lightColor; + } + return $darkColor; + } + + private function toLuma($color) { + list(, $r, $g, $b) = $this->coerceColor($color); + + $r = $r / 255; + $g = $g / 255; + $b = $b / 255; + + $r = ($r <= 0.03928) ? $r / 12.92 : pow((($r + 0.055) / 1.055), 2.4); + $g = ($g <= 0.03928) ? $g / 12.92 : pow((($g + 0.055) / 1.055), 2.4); + $b = ($b <= 0.03928) ? $b / 12.92 : pow((($b + 0.055) / 1.055), 2.4); + + return (0.2126 * $r) + (0.7152 * $g) + (0.0722 * $b); + } + + protected function lib_luma($color) { + return array("number", round($this->toLuma($color) * 100, 8), "%"); + } + + + public function assertColor($value, $error = "expected color value") { + $color = $this->coerceColor($value); + if (is_null($color)) $this->throwError($error); + return $color; + } + + public function assertNumber($value, $error = "expecting number") { + if ($value[0] == "number") return $value[1]; + $this->throwError($error); + } + + public function assertArgs($value, $expectedArgs, $name = "") { + if ($expectedArgs == 1) { + return $value; + } else { + if ($value[0] !== "list" || $value[1] != ",") $this->throwError("expecting list"); + $values = $value[2]; + $numValues = count($values); + if ($expectedArgs != $numValues) { + if ($name) { + $name = $name . ": "; + } + + $this->throwError("${name}expecting $expectedArgs arguments, got $numValues"); + } + + return $values; + } + } + + protected function toHSL($color) { + if ($color[0] === 'hsl') { + return $color; + } + + $r = $color[1] / 255; + $g = $color[2] / 255; + $b = $color[3] / 255; + + $min = min($r, $g, $b); + $max = max($r, $g, $b); + + $L = ($min + $max) / 2; + if ($min == $max) { + $S = $H = 0; + } else { + if ($L < 0.5) { + $S = ($max - $min) / ($max + $min); + } else { + $S = ($max - $min) / (2.0 - $max - $min); + } + if ($r == $max) { + $H = ($g - $b) / ($max - $min); + } elseif ($g == $max) { + $H = 2.0 + ($b - $r) / ($max - $min); + } elseif ($b == $max) { + $H = 4.0 + ($r - $g) / ($max - $min); + } + + } + + $out = array('hsl', + ($H < 0 ? $H + 6 : $H)*60, + $S * 100, + $L * 100, + ); + + if (count($color) > 4) { + // copy alpha + $out[] = $color[4]; + } + return $out; + } + + protected function toRGB_helper($comp, $temp1, $temp2) { + if ($comp < 0) { + $comp += 1.0; + } elseif ($comp > 1) { + $comp -= 1.0; + } + + if (6 * $comp < 1) { + return $temp1 + ($temp2 - $temp1) * 6 * $comp; + } + if (2 * $comp < 1) { + return $temp2; + } + if (3 * $comp < 2) { + return $temp1 + ($temp2 - $temp1)*((2/3) - $comp) * 6; + } + + return $temp1; + } + + /** + * Converts a hsl array into a color value in rgb. + * Expects H to be in range of 0 to 360, S and L in 0 to 100 + */ + protected function toRGB($color) { + if ($color[0] === 'color') { + return $color; + } + + $H = $color[1] / 360; + $S = $color[2] / 100; + $L = $color[3] / 100; + + if ($S == 0) { + $r = $g = $b = $L; + } else { + $temp2 = $L < 0.5 ? + $L * (1.0 + $S) : + $L + $S - $L * $S; + + $temp1 = 2.0 * $L - $temp2; + + $r = $this->toRGB_helper($H + 1/3, $temp1, $temp2); + $g = $this->toRGB_helper($H, $temp1, $temp2); + $b = $this->toRGB_helper($H - 1/3, $temp1, $temp2); + } + + // $out = array('color', round($r*255), round($g*255), round($b*255)); + $out = array('color', $r*255, $g*255, $b*255); + if (count($color) > 4) { + // copy alpha + $out[] = $color[4]; + } + return $out; + } + + protected function clamp($v, $max = 1, $min = 0) { + return min($max, max($min, $v)); + } + + /** + * Convert the rgb, rgba, hsl color literals of function type + * as returned by the parser into values of color type. + */ + protected function funcToColor($func) { + $fname = $func[1]; + if ($func[2][0] != 'list') { + // need a list of arguments + return false; + } + $rawComponents = $func[2][2]; + + if ($fname == 'hsl' || $fname == 'hsla') { + $hsl = array('hsl'); + $i = 0; + foreach ($rawComponents as $c) { + $val = $this->reduce($c); + $val = isset($val[1]) ? floatval($val[1]) : 0; + + if ($i == 0) { + $clamp = 360; + } elseif ($i < 3) { + $clamp = 100; + } else { + $clamp = 1; + } + + $hsl[] = $this->clamp($val, $clamp); + $i++; + } + + while (count($hsl) < 4) { + $hsl[] = 0; + } + return $this->toRGB($hsl); + + } elseif ($fname == 'rgb' || $fname == 'rgba') { + $components = array(); + $i = 1; + foreach ($rawComponents as $c) { + $c = $this->reduce($c); + if ($i < 4) { + if ($c[0] == "number" && $c[2] == "%") { + $components[] = 255 * ($c[1] / 100); + } else { + $components[] = floatval($c[1]); + } + } elseif ($i == 4) { + if ($c[0] == "number" && $c[2] == "%") { + $components[] = 1.0 * ($c[1] / 100); + } else { + $components[] = floatval($c[1]); + } + } else break; + + $i++; + } + while (count($components) < 3) { + $components[] = 0; + } + array_unshift($components, 'color'); + return $this->fixColor($components); + } + + return false; + } + + protected function reduce($value, $forExpression = false) { + switch ($value[0]) { + case "interpolate": + $reduced = $this->reduce($value[1]); + $var = $this->compileValue($reduced); + $res = $this->reduce(array("variable", $this->vPrefix . $var)); + + if ($res[0] == "raw_color") { + $res = $this->coerceColor($res); + } + + if (empty($value[2])) $res = $this->lib_e($res); + + return $res; + case "variable": + $key = $value[1]; + if (is_array($key)) { + $key = $this->reduce($key); + $key = $this->vPrefix . $this->compileValue($this->lib_e($key)); + } + + $seen =& $this->env->seenNames; + + if (!empty($seen[$key])) { + $this->throwError("infinite loop detected: $key"); + } + + $seen[$key] = true; + $out = $this->reduce($this->get($key)); + $seen[$key] = false; + return $out; + case "list": + foreach ($value[2] as &$item) { + $item = $this->reduce($item, $forExpression); + } + return $value; + case "expression": + return $this->evaluate($value); + case "string": + foreach ($value[2] as &$part) { + if (is_array($part)) { + $strip = $part[0] == "variable"; + $part = $this->reduce($part); + if ($strip) $part = $this->lib_e($part); + } + } + return $value; + case "escape": + list(,$inner) = $value; + return $this->lib_e($this->reduce($inner)); + case "function": + $color = $this->funcToColor($value); + if ($color) return $color; + + list(, $name, $args) = $value; + if ($name == "%") $name = "_sprintf"; + + $f = isset($this->libFunctions[$name]) ? + $this->libFunctions[$name] : array($this, 'lib_'.str_replace('-', '_', $name)); + + if (is_callable($f)) { + if ($args[0] == 'list') + $args = self::compressList($args[2], $args[1]); + + $ret = call_user_func($f, $this->reduce($args, true), $this); + + if (is_null($ret)) { + return array("string", "", array( + $name, "(", $args, ")" + )); + } + + // convert to a typed value if the result is a php primitive + if (is_numeric($ret)) { + $ret = array('number', $ret, ""); + } elseif (!is_array($ret)) { + $ret = array('keyword', $ret); + } + + return $ret; + } + + // plain function, reduce args + $value[2] = $this->reduce($value[2]); + return $value; + case "unary": + list(, $op, $exp) = $value; + $exp = $this->reduce($exp); + + if ($exp[0] == "number") { + switch ($op) { + case "+": + return $exp; + case "-": + $exp[1] *= -1; + return $exp; + } + } + return array("string", "", array($op, $exp)); + } + + if ($forExpression) { + switch ($value[0]) { + case "keyword": + if ($color = $this->coerceColor($value)) { + return $color; + } + break; + case "raw_color": + return $this->coerceColor($value); + } + } + + return $value; + } + + + // coerce a value for use in color operation + protected function coerceColor($value) { + switch ($value[0]) { + case 'color': return $value; + case 'raw_color': + $c = array("color", 0, 0, 0); + $colorStr = substr($value[1], 1); + $num = hexdec($colorStr); + $width = strlen($colorStr) == 3 ? 16 : 256; + + for ($i = 3; $i > 0; $i--) { // 3 2 1 + $t = $num % $width; + $num /= $width; + + $c[$i] = $t * (256/$width) + $t * floor(16/$width); + } + + return $c; + case 'keyword': + $name = $value[1]; + if (isset(self::$cssColors[$name])) { + $rgba = explode(',', self::$cssColors[$name]); + + if (isset($rgba[3])) { + return array('color', $rgba[0], $rgba[1], $rgba[2], $rgba[3]); + } + return array('color', $rgba[0], $rgba[1], $rgba[2]); + } + return null; + } + } + + // make something string like into a string + protected function coerceString($value) { + switch ($value[0]) { + case "string": + return $value; + case "keyword": + return array("string", "", array($value[1])); + } + return null; + } + + // turn list of length 1 into value type + protected function flattenList($value) { + if ($value[0] == "list" && count($value[2]) == 1) { + return $this->flattenList($value[2][0]); + } + return $value; + } + + public function toBool($a) { + return $a ? self::$TRUE : self::$FALSE; + } + + // evaluate an expression + protected function evaluate($exp) { + list(, $op, $left, $right, $whiteBefore, $whiteAfter) = $exp; + + $left = $this->reduce($left, true); + $right = $this->reduce($right, true); + + if ($leftColor = $this->coerceColor($left)) { + $left = $leftColor; + } + + if ($rightColor = $this->coerceColor($right)) { + $right = $rightColor; + } + + $ltype = $left[0]; + $rtype = $right[0]; + + // operators that work on all types + if ($op == "and") { + return $this->toBool($left == self::$TRUE && $right == self::$TRUE); + } + + if ($op == "=") { + return $this->toBool($this->eq($left, $right) ); + } + + if ($op == "+" && !is_null($str = $this->stringConcatenate($left, $right))) { + return $str; + } + + // type based operators + $fname = "op_${ltype}_${rtype}"; + if (is_callable(array($this, $fname))) { + $out = $this->$fname($op, $left, $right); + if (!is_null($out)) return $out; + } + + // make the expression look it did before being parsed + $paddedOp = $op; + if ($whiteBefore) { + $paddedOp = " " . $paddedOp; + } + if ($whiteAfter) { + $paddedOp .= " "; + } + + return array("string", "", array($left, $paddedOp, $right)); + } + + protected function stringConcatenate($left, $right) { + if ($strLeft = $this->coerceString($left)) { + if ($right[0] == "string") { + $right[1] = ""; + } + $strLeft[2][] = $right; + return $strLeft; + } + + if ($strRight = $this->coerceString($right)) { + array_unshift($strRight[2], $left); + return $strRight; + } + } + + + // make sure a color's components don't go out of bounds + protected function fixColor($c) { + foreach (range(1, 3) as $i) { + if ($c[$i] < 0) $c[$i] = 0; + if ($c[$i] > 255) $c[$i] = 255; + } + + return $c; + } + + protected function op_number_color($op, $lft, $rgt) { + if ($op == '+' || $op == '*') { + return $this->op_color_number($op, $rgt, $lft); + } + } + + protected function op_color_number($op, $lft, $rgt) { + if ($rgt[0] == '%') $rgt[1] /= 100; + + return $this->op_color_color($op, $lft, + array_fill(1, count($lft) - 1, $rgt[1])); + } + + protected function op_color_color($op, $left, $right) { + $out = array('color'); + $max = count($left) > count($right) ? count($left) : count($right); + foreach (range(1, $max - 1) as $i) { + $lval = isset($left[$i]) ? $left[$i] : 0; + $rval = isset($right[$i]) ? $right[$i] : 0; + switch ($op) { + case '+': + $out[] = $lval + $rval; + break; + case '-': + $out[] = $lval - $rval; + break; + case '*': + $out[] = $lval * $rval; + break; + case '%': + $out[] = $lval % $rval; + break; + case '/': + if ($rval == 0) { + $this->throwError("evaluate error: can't divide by zero"); + } + $out[] = $lval / $rval; + break; + default: + $this->throwError('evaluate error: color op number failed on op '.$op); + } + } + return $this->fixColor($out); + } + + public function lib_red($color){ + $color = $this->coerceColor($color); + if (is_null($color)) { + $this->throwError('color expected for red()'); + } + + return $color[1]; + } + + public function lib_green($color){ + $color = $this->coerceColor($color); + if (is_null($color)) { + $this->throwError('color expected for green()'); + } + + return $color[2]; + } + + public function lib_blue($color){ + $color = $this->coerceColor($color); + if (is_null($color)) { + $this->throwError('color expected for blue()'); + } + + return $color[3]; + } + + + // operator on two numbers + protected function op_number_number($op, $left, $right) { + $unit = empty($left[2]) ? $right[2] : $left[2]; + + $value = 0; + switch ($op) { + case '+': + $value = $left[1] + $right[1]; + break; + case '*': + $value = $left[1] * $right[1]; + break; + case '-': + $value = $left[1] - $right[1]; + break; + case '%': + $value = $left[1] % $right[1]; + break; + case '/': + if ($right[1] == 0) $this->throwError('parse error: divide by zero'); + $value = $left[1] / $right[1]; + break; + case '<': + return $this->toBool($left[1] < $right[1]); + case '>': + return $this->toBool($left[1] > $right[1]); + case '>=': + return $this->toBool($left[1] >= $right[1]); + case '=<': + return $this->toBool($left[1] <= $right[1]); + default: + $this->throwError('parse error: unknown number operator: '.$op); + } + + return array("number", $value, $unit); + } + + + /* environment functions */ + + protected function makeOutputBlock($type, $selectors = null) { + $b = new stdclass; + $b->lines = array(); + $b->children = array(); + $b->selectors = $selectors; + $b->type = $type; + $b->parent = $this->scope; + return $b; + } + + // the state of execution + protected function pushEnv($block = null) { + $e = new stdclass; + $e->parent = $this->env; + $e->store = array(); + $e->block = $block; + + $this->env = $e; + return $e; + } + + // pop something off the stack + protected function popEnv() { + $old = $this->env; + $this->env = $this->env->parent; + return $old; + } + + // set something in the current env + protected function set($name, $value) { + $this->env->store[$name] = $value; + } + + + // get the highest occurrence entry for a name + protected function get($name) { + $current = $this->env; + + $isArguments = $name == $this->vPrefix . 'arguments'; + while ($current) { + if ($isArguments && isset($current->arguments)) { + return array('list', ' ', $current->arguments); + } + + if (isset($current->store[$name])) { + return $current->store[$name]; + } + + $current = isset($current->storeParent) ? + $current->storeParent : + $current->parent; + } + + $this->throwError("variable $name is undefined"); + } + + // inject array of unparsed strings into environment as variables + protected function injectVariables($args) { + $this->pushEnv(); + $parser = new lessc_parser($this, __METHOD__); + foreach ($args as $name => $strValue) { + if ($name[0] !== '@') { + $name = '@' . $name; + } + $parser->count = 0; + $parser->buffer = (string)$strValue; + if (!$parser->propertyValue($value)) { + throw new Exception("failed to parse passed in variable $name: $strValue"); + } + + $this->set($name, $value); + } + } + + /** + * Initialize any static state, can initialize parser for a file + * $opts isn't used yet + */ + public function __construct($fname = null) { + if ($fname !== null) { + // used for deprecated parse method + $this->_parseFile = $fname; + } + } + + public function compile($string, $name = null) { + $locale = setlocale(LC_NUMERIC, 0); + setlocale(LC_NUMERIC, "C"); + + $this->parser = $this->makeParser($name); + $root = $this->parser->parse($string); + + $this->env = null; + $this->scope = null; + + $this->formatter = $this->newFormatter(); + + if (!empty($this->registeredVars)) { + $this->injectVariables($this->registeredVars); + } + + $this->sourceParser = $this->parser; // used for error messages + $this->compileBlock($root); + + ob_start(); + $this->formatter->block($this->scope); + $out = ob_get_clean(); + setlocale(LC_NUMERIC, $locale); + return $out; + } + + public function compileFile($fname, $outFname = null) { + if (!is_readable($fname)) { + throw new Exception('load error: failed to find '.$fname); + } + + $pi = pathinfo($fname); + + $oldImport = $this->importDir; + + $this->importDir = (array)$this->importDir; + $this->importDir[] = $pi['dirname'].'/'; + + $this->addParsedFile($fname); + + $out = $this->compile(file_get_contents($fname), $fname); + + $this->importDir = $oldImport; + + if ($outFname !== null) { + return file_put_contents($outFname, $out); + } + + return $out; + } + + // compile only if changed input has changed or output doesn't exist + public function checkedCompile($in, $out) { + if (!is_file($out) || filemtime($in) > filemtime($out)) { + $this->compileFile($in, $out); + return true; + } + return false; + } + + /** + * Execute lessphp on a .less file or a lessphp cache structure + * + * The lessphp cache structure contains information about a specific + * less file having been parsed. It can be used as a hint for future + * calls to determine whether or not a rebuild is required. + * + * The cache structure contains two important keys that may be used + * externally: + * + * compiled: The final compiled CSS + * updated: The time (in seconds) the CSS was last compiled + * + * The cache structure is a plain-ol' PHP associative array and can + * be serialized and unserialized without a hitch. + * + * @param mixed $in Input + * @param bool $force Force rebuild? + * @return array lessphp cache structure + */ + public function cachedCompile($in, $force = false) { + // assume no root + $root = null; + + if (is_string($in)) { + $root = $in; + } elseif (is_array($in) && isset($in['root'])) { + if ($force || !isset($in['files'])) { + // If we are forcing a recompile or if for some reason the + // structure does not contain any file information we should + // specify the root to trigger a rebuild. + $root = $in['root']; + } elseif (isset($in['files']) && is_array($in['files'])) { + foreach ($in['files'] as $fname => $ftime) { + if (!file_exists($fname) || filemtime($fname) > $ftime) { + // One of the files we knew about previously has changed + // so we should look at our incoming root again. + $root = $in['root']; + break; + } + } + } + } else { + // TODO: Throw an exception? We got neither a string nor something + // that looks like a compatible lessphp cache structure. + return null; + } + + if ($root !== null) { + // If we have a root value which means we should rebuild. + $out = array(); + $out['root'] = $root; + $out['compiled'] = $this->compileFile($root); + $out['files'] = $this->allParsedFiles(); + $out['updated'] = time(); + return $out; + } else { + // No changes, pass back the structure + // we were given initially. + return $in; + } + + } + + // parse and compile buffer + // This is deprecated + public function parse($str = null, $initialVariables = null) { + if (is_array($str)) { + $initialVariables = $str; + $str = null; + } + + $oldVars = $this->registeredVars; + if ($initialVariables !== null) { + $this->setVariables($initialVariables); + } + + if ($str == null) { + if (empty($this->_parseFile)) { + throw new exception("nothing to parse"); + } + + $out = $this->compileFile($this->_parseFile); + } else { + $out = $this->compile($str); + } + + $this->registeredVars = $oldVars; + return $out; + } + + protected function makeParser($name) { + $parser = new lessc_parser($this, $name); + $parser->writeComments = $this->preserveComments; + + return $parser; + } + + public function setFormatter($name) { + $this->formatterName = $name; + } + + protected function newFormatter() { + $className = "lessc_formatter_lessjs"; + if (!empty($this->formatterName)) { + if (!is_string($this->formatterName)) + return $this->formatterName; + $className = "lessc_formatter_$this->formatterName"; + } + + return new $className; + } + + public function setPreserveComments($preserve) { + $this->preserveComments = $preserve; + } + + public function registerFunction($name, $func) { + $this->libFunctions[$name] = $func; + } + + public function unregisterFunction($name) { + unset($this->libFunctions[$name]); + } + + public function setVariables($variables) { + $this->registeredVars = array_merge($this->registeredVars, $variables); + } + + public function unsetVariable($name) { + unset($this->registeredVars[$name]); + } + + public function setImportDir($dirs) { + $this->importDir = (array)$dirs; + } + + public function addImportDir($dir) { + $this->importDir = (array)$this->importDir; + $this->importDir[] = $dir; + } + + public function allParsedFiles() { + return $this->allParsedFiles; + } + + public function addParsedFile($file) { + $this->allParsedFiles[realpath($file)] = filemtime($file); + } + + /** + * Uses the current value of $this->count to show line and line number + */ + public function throwError($msg = null) { + if ($this->sourceLoc >= 0) { + $this->sourceParser->throwError($msg, $this->sourceLoc); + } + throw new exception($msg); + } + + // compile file $in to file $out if $in is newer than $out + // returns true when it compiles, false otherwise + public static function ccompile($in, $out, $less = null) { + if ($less === null) { + $less = new self; + } + return $less->checkedCompile($in, $out); + } + + public static function cexecute($in, $force = false, $less = null) { + if ($less === null) { + $less = new self; + } + return $less->cachedCompile($in, $force); + } + + protected static $cssColors = array( + 'aliceblue' => '240,248,255', + 'antiquewhite' => '250,235,215', + 'aqua' => '0,255,255', + 'aquamarine' => '127,255,212', + 'azure' => '240,255,255', + 'beige' => '245,245,220', + 'bisque' => '255,228,196', + 'black' => '0,0,0', + 'blanchedalmond' => '255,235,205', + 'blue' => '0,0,255', + 'blueviolet' => '138,43,226', + 'brown' => '165,42,42', + 'burlywood' => '222,184,135', + 'cadetblue' => '95,158,160', + 'chartreuse' => '127,255,0', + 'chocolate' => '210,105,30', + 'coral' => '255,127,80', + 'cornflowerblue' => '100,149,237', + 'cornsilk' => '255,248,220', + 'crimson' => '220,20,60', + 'cyan' => '0,255,255', + 'darkblue' => '0,0,139', + 'darkcyan' => '0,139,139', + 'darkgoldenrod' => '184,134,11', + 'darkgray' => '169,169,169', + 'darkgreen' => '0,100,0', + 'darkgrey' => '169,169,169', + 'darkkhaki' => '189,183,107', + 'darkmagenta' => '139,0,139', + 'darkolivegreen' => '85,107,47', + 'darkorange' => '255,140,0', + 'darkorchid' => '153,50,204', + 'darkred' => '139,0,0', + 'darksalmon' => '233,150,122', + 'darkseagreen' => '143,188,143', + 'darkslateblue' => '72,61,139', + 'darkslategray' => '47,79,79', + 'darkslategrey' => '47,79,79', + 'darkturquoise' => '0,206,209', + 'darkviolet' => '148,0,211', + 'deeppink' => '255,20,147', + 'deepskyblue' => '0,191,255', + 'dimgray' => '105,105,105', + 'dimgrey' => '105,105,105', + 'dodgerblue' => '30,144,255', + 'firebrick' => '178,34,34', + 'floralwhite' => '255,250,240', + 'forestgreen' => '34,139,34', + 'fuchsia' => '255,0,255', + 'gainsboro' => '220,220,220', + 'ghostwhite' => '248,248,255', + 'gold' => '255,215,0', + 'goldenrod' => '218,165,32', + 'gray' => '128,128,128', + 'green' => '0,128,0', + 'greenyellow' => '173,255,47', + 'grey' => '128,128,128', + 'honeydew' => '240,255,240', + 'hotpink' => '255,105,180', + 'indianred' => '205,92,92', + 'indigo' => '75,0,130', + 'ivory' => '255,255,240', + 'khaki' => '240,230,140', + 'lavender' => '230,230,250', + 'lavenderblush' => '255,240,245', + 'lawngreen' => '124,252,0', + 'lemonchiffon' => '255,250,205', + 'lightblue' => '173,216,230', + 'lightcoral' => '240,128,128', + 'lightcyan' => '224,255,255', + 'lightgoldenrodyellow' => '250,250,210', + 'lightgray' => '211,211,211', + 'lightgreen' => '144,238,144', + 'lightgrey' => '211,211,211', + 'lightpink' => '255,182,193', + 'lightsalmon' => '255,160,122', + 'lightseagreen' => '32,178,170', + 'lightskyblue' => '135,206,250', + 'lightslategray' => '119,136,153', + 'lightslategrey' => '119,136,153', + 'lightsteelblue' => '176,196,222', + 'lightyellow' => '255,255,224', + 'lime' => '0,255,0', + 'limegreen' => '50,205,50', + 'linen' => '250,240,230', + 'magenta' => '255,0,255', + 'maroon' => '128,0,0', + 'mediumaquamarine' => '102,205,170', + 'mediumblue' => '0,0,205', + 'mediumorchid' => '186,85,211', + 'mediumpurple' => '147,112,219', + 'mediumseagreen' => '60,179,113', + 'mediumslateblue' => '123,104,238', + 'mediumspringgreen' => '0,250,154', + 'mediumturquoise' => '72,209,204', + 'mediumvioletred' => '199,21,133', + 'midnightblue' => '25,25,112', + 'mintcream' => '245,255,250', + 'mistyrose' => '255,228,225', + 'moccasin' => '255,228,181', + 'navajowhite' => '255,222,173', + 'navy' => '0,0,128', + 'oldlace' => '253,245,230', + 'olive' => '128,128,0', + 'olivedrab' => '107,142,35', + 'orange' => '255,165,0', + 'orangered' => '255,69,0', + 'orchid' => '218,112,214', + 'palegoldenrod' => '238,232,170', + 'palegreen' => '152,251,152', + 'paleturquoise' => '175,238,238', + 'palevioletred' => '219,112,147', + 'papayawhip' => '255,239,213', + 'peachpuff' => '255,218,185', + 'peru' => '205,133,63', + 'pink' => '255,192,203', + 'plum' => '221,160,221', + 'powderblue' => '176,224,230', + 'purple' => '128,0,128', + 'red' => '255,0,0', + 'rosybrown' => '188,143,143', + 'royalblue' => '65,105,225', + 'saddlebrown' => '139,69,19', + 'salmon' => '250,128,114', + 'sandybrown' => '244,164,96', + 'seagreen' => '46,139,87', + 'seashell' => '255,245,238', + 'sienna' => '160,82,45', + 'silver' => '192,192,192', + 'skyblue' => '135,206,235', + 'slateblue' => '106,90,205', + 'slategray' => '112,128,144', + 'slategrey' => '112,128,144', + 'snow' => '255,250,250', + 'springgreen' => '0,255,127', + 'steelblue' => '70,130,180', + 'tan' => '210,180,140', + 'teal' => '0,128,128', + 'thistle' => '216,191,216', + 'tomato' => '255,99,71', + 'transparent' => '0,0,0,0', + 'turquoise' => '64,224,208', + 'violet' => '238,130,238', + 'wheat' => '245,222,179', + 'white' => '255,255,255', + 'whitesmoke' => '245,245,245', + 'yellow' => '255,255,0', + 'yellowgreen' => '154,205,50' + ); } // responsible for taking a string of LESS code and converting it into a // syntax tree class lessc_parser { - static protected $nextBlockId = 0; // used to uniquely identify blocks - - static protected $precedence = array( - '=<' => 0, - '>=' => 0, - '=' => 0, - '<' => 0, - '>' => 0, - - '+' => 1, - '-' => 1, - '*' => 2, - '/' => 2, - '%' => 2, - ); - - static protected $whitePattern; - static protected $commentMulti; - - static protected $commentSingle = "//"; - static protected $commentMultiLeft = "/*"; - static protected $commentMultiRight = "*/"; - - // regex string to match any of the operators - static protected $operatorString; - - // these properties will supress division unless it's inside parenthases - static protected $supressDivisionProps = - array('/border-radius$/i', '/^font$/i'); - - protected $blockDirectives = array("font-face", "keyframes", "page", "-moz-document", "viewport", "-moz-viewport", "-o-viewport", "-ms-viewport"); - protected $lineDirectives = array("charset"); - - /** - * if we are in parens we can be more liberal with whitespace around - * operators because it must evaluate to a single value and thus is less - * ambiguous. - * - * Consider: - * property1: 10 -5; // is two numbers, 10 and -5 - * property2: (10 -5); // should evaluate to 5 - */ - protected $inParens = false; - - // caches preg escaped literals - static protected $literalCache = array(); - - public function __construct($lessc, $sourceName = null) { - $this->eatWhiteDefault = true; - // reference to less needed for vPrefix, mPrefix, and parentSelector - $this->lessc = $lessc; - - $this->sourceName = $sourceName; // name used for error messages - - $this->writeComments = false; - - if (!self::$operatorString) { - self::$operatorString = - '('.implode('|', array_map(array('lessc', 'preg_quote'), - array_keys(self::$precedence))).')'; - - $commentSingle = lessc::preg_quote(self::$commentSingle); - $commentMultiLeft = lessc::preg_quote(self::$commentMultiLeft); - $commentMultiRight = lessc::preg_quote(self::$commentMultiRight); - - self::$commentMulti = $commentMultiLeft.'.*?'.$commentMultiRight; - self::$whitePattern = '/'.$commentSingle.'[^\n]*\s*|('.self::$commentMulti.')\s*|\s+/Ais'; - } - } - - public function parse($buffer) { - $this->count = 0; - $this->line = 1; - - $this->env = null; // block stack - $this->buffer = $this->writeComments ? $buffer : $this->removeComments($buffer); - $this->pushSpecialBlock("root"); - $this->eatWhiteDefault = true; - $this->seenComments = array(); - - // trim whitespace on head - // if (preg_match('/^\s+/', $this->buffer, $m)) { - // $this->line += substr_count($m[0], "\n"); - // $this->buffer = ltrim($this->buffer); - // } - $this->whitespace(); - - // parse the entire file - while (false !== $this->parseChunk()); - - if ($this->count != strlen($this->buffer)) - $this->throwError(); - - // TODO report where the block was opened - if ( !property_exists($this->env, 'parent') || !is_null($this->env->parent) ) - throw new exception('parse error: unclosed block'); - - return $this->env; - } - - /** - * Parse a single chunk off the head of the buffer and append it to the - * current parse environment. - * Returns false when the buffer is empty, or when there is an error. - * - * This function is called repeatedly until the entire document is - * parsed. - * - * This parser is most similar to a recursive descent parser. Single - * functions represent discrete grammatical rules for the language, and - * they are able to capture the text that represents those rules. - * - * Consider the function lessc::keyword(). (all parse functions are - * structured the same) - * - * The function takes a single reference argument. When calling the - * function it will attempt to match a keyword on the head of the buffer. - * If it is successful, it will place the keyword in the referenced - * argument, advance the position in the buffer, and return true. If it - * fails then it won't advance the buffer and it will return false. - * - * All of these parse functions are powered by lessc::match(), which behaves - * the same way, but takes a literal regular expression. Sometimes it is - * more convenient to use match instead of creating a new function. - * - * Because of the format of the functions, to parse an entire string of - * grammatical rules, you can chain them together using &&. - * - * But, if some of the rules in the chain succeed before one fails, then - * the buffer position will be left at an invalid state. In order to - * avoid this, lessc::seek() is used to remember and set buffer positions. - * - * Before parsing a chain, use $s = $this->seek() to remember the current - * position into $s. Then if a chain fails, use $this->seek($s) to - * go back where we started. - */ - protected function parseChunk() { - if (empty($this->buffer)) return false; - $s = $this->seek(); - - if ($this->whitespace()) { - return true; - } - - // setting a property - if ($this->keyword($key) && $this->assign() && - $this->propertyValue($value, $key) && $this->end()) - { - $this->append(array('assign', $key, $value), $s); - return true; - } else { - $this->seek($s); - } - - - // look for special css blocks - if ($this->literal('@', false)) { - $this->count--; - - // media - if ($this->literal('@media')) { - if (($this->mediaQueryList($mediaQueries) || true) - && $this->literal('{')) - { - $media = $this->pushSpecialBlock("media"); - $media->queries = is_null($mediaQueries) ? array() : $mediaQueries; - return true; - } else { - $this->seek($s); - return false; - } - } - - if ($this->literal("@", false) && $this->keyword($dirName)) { - if ($this->isDirective($dirName, $this->blockDirectives)) { - if (($this->openString("{", $dirValue, null, array(";")) || true) && - $this->literal("{")) - { - $dir = $this->pushSpecialBlock("directive"); - $dir->name = $dirName; - if (isset($dirValue)) $dir->value = $dirValue; - return true; - } - } elseif ($this->isDirective($dirName, $this->lineDirectives)) { - if ($this->propertyValue($dirValue) && $this->end()) { - $this->append(array("directive", $dirName, $dirValue)); - return true; - } - } - } - - $this->seek($s); - } - - // setting a variable - if ($this->variable($var) && $this->assign() && - $this->propertyValue($value) && $this->end()) - { - $this->append(array('assign', $var, $value), $s); - return true; - } else { - $this->seek($s); - } - - if ($this->import($importValue)) { - $this->append($importValue, $s); - return true; - } - - // opening parametric mixin - if ($this->tag($tag, true) && $this->argumentDef($args, $isVararg) && - ($this->guards($guards) || true) && - $this->literal('{')) - { - $block = $this->pushBlock($this->fixTags(array($tag))); - $block->args = $args; - $block->isVararg = $isVararg; - if (!empty($guards)) $block->guards = $guards; - return true; - } else { - $this->seek($s); - } - - // opening a simple block - if ($this->tags($tags) && $this->literal('{', false)) { - $tags = $this->fixTags($tags); - $this->pushBlock($tags); - return true; - } else { - $this->seek($s); - } - - // closing a block - if ($this->literal('}', false)) { - try { - $block = $this->pop(); - } catch (exception $e) { - $this->seek($s); - $this->throwError($e->getMessage()); - } - - $hidden = false; - if (is_null($block->type)) { - $hidden = true; - if (!isset($block->args)) { - foreach ($block->tags as $tag) { - if (!is_string($tag) || $tag{0} != $this->lessc->mPrefix) { - $hidden = false; - break; - } - } - } - - foreach ($block->tags as $tag) { - if (is_string($tag)) { - $this->env->children[$tag][] = $block; - } - } - } - - if (!$hidden) { - $this->append(array('block', $block), $s); - } - - // this is done here so comments aren't bundled into he block that - // was just closed - $this->whitespace(); - return true; - } - - // mixin - if ($this->mixinTags($tags) && - ($this->argumentDef($argv, $isVararg) || true) && - ($this->keyword($suffix) || true) && $this->end()) - { - $tags = $this->fixTags($tags); - $this->append(array('mixin', $tags, $argv, $suffix), $s); - return true; - } else { - $this->seek($s); - } - - // spare ; - if ($this->literal(';')) return true; - - return false; // got nothing, throw error - } - - protected function isDirective($dirname, $directives) { - // TODO: cache pattern in parser - $pattern = implode("|", - array_map(array("lessc", "preg_quote"), $directives)); - $pattern = '/^(-[a-z-]+-)?(' . $pattern . ')$/i'; - - return preg_match($pattern, $dirname); - } - - protected function fixTags($tags) { - // move @ tags out of variable namespace - foreach ($tags as &$tag) { - if ($tag{0} == $this->lessc->vPrefix) - $tag[0] = $this->lessc->mPrefix; - } - return $tags; - } - - // a list of expressions - protected function expressionList(&$exps) { - $values = array(); - - while ($this->expression($exp)) { - $values[] = $exp; - } - - if (count($values) == 0) return false; - - $exps = lessc::compressList($values, ' '); - return true; - } - - /** - * Attempt to consume an expression. - * @link http://en.wikipedia.org/wiki/Operator-precedence_parser#Pseudo-code - */ - protected function expression(&$out) { - if ($this->value($lhs)) { - $out = $this->expHelper($lhs, 0); - - // look for / shorthand - if (!empty($this->env->supressedDivision)) { - unset($this->env->supressedDivision); - $s = $this->seek(); - if ($this->literal("/") && $this->value($rhs)) { - $out = array("list", "", - array($out, array("keyword", "/"), $rhs)); - } else { - $this->seek($s); - } - } - - return true; - } - return false; - } - - /** - * recursively parse infix equation with $lhs at precedence $minP - */ - protected function expHelper($lhs, $minP) { - $this->inExp = true; - $ss = $this->seek(); - - while (true) { - $whiteBefore = isset($this->buffer[$this->count - 1]) && - ctype_space($this->buffer[$this->count - 1]); - - // If there is whitespace before the operator, then we require - // whitespace after the operator for it to be an expression - $needWhite = $whiteBefore && !$this->inParens; - - if ($this->match(self::$operatorString.($needWhite ? '\s' : ''), $m) && self::$precedence[$m[1]] >= $minP) { - if (!$this->inParens && isset($this->env->currentProperty) && $m[1] == "/" && empty($this->env->supressedDivision)) { - foreach (self::$supressDivisionProps as $pattern) { - if (preg_match($pattern, $this->env->currentProperty)) { - $this->env->supressedDivision = true; - break 2; - } - } - } - - - $whiteAfter = isset($this->buffer[$this->count - 1]) && - ctype_space($this->buffer[$this->count - 1]); - - if (!$this->value($rhs)) break; - - // peek for next operator to see what to do with rhs - if ($this->peek(self::$operatorString, $next) && self::$precedence[$next[1]] > self::$precedence[$m[1]]) { - $rhs = $this->expHelper($rhs, self::$precedence[$next[1]]); - } - - $lhs = array('expression', $m[1], $lhs, $rhs, $whiteBefore, $whiteAfter); - $ss = $this->seek(); - - continue; - } - - break; - } - - $this->seek($ss); - - return $lhs; - } - - // consume a list of values for a property - public function propertyValue(&$value, $keyName = null) { - $values = array(); - - if ($keyName !== null) $this->env->currentProperty = $keyName; - - $s = null; - while ($this->expressionList($v)) { - $values[] = $v; - $s = $this->seek(); - if (!$this->literal(',')) break; - } - - if ($s) $this->seek($s); - - if ($keyName !== null) unset($this->env->currentProperty); - - if (count($values) == 0) return false; - - $value = lessc::compressList($values, ', '); - return true; - } - - protected function parenValue(&$out) { - $s = $this->seek(); - - // speed shortcut - if (isset($this->buffer[$this->count]) && $this->buffer[$this->count] != "(") { - return false; - } - - $inParens = $this->inParens; - if ($this->literal("(") && - ($this->inParens = true) && $this->expression($exp) && - $this->literal(")")) - { - $out = $exp; - $this->inParens = $inParens; - return true; - } else { - $this->inParens = $inParens; - $this->seek($s); - } - - return false; - } - - // a single value - protected function value(&$value) { - $s = $this->seek(); - - // speed shortcut - if (isset($this->buffer[$this->count]) && $this->buffer[$this->count] == "-") { - // negation - if ($this->literal("-", false) && - (($this->variable($inner) && $inner = array("variable", $inner)) || - $this->unit($inner) || - $this->parenValue($inner))) - { - $value = array("unary", "-", $inner); - return true; - } else { - $this->seek($s); - } - } - - if ($this->parenValue($value)) return true; - if ($this->unit($value)) return true; - if ($this->color($value)) return true; - if ($this->func($value)) return true; - if ($this->string($value)) return true; - - if ($this->keyword($word)) { - $value = array('keyword', $word); - return true; - } - - // try a variable - if ($this->variable($var)) { - $value = array('variable', $var); - return true; - } - - // unquote string (should this work on any type? - if ($this->literal("~") && $this->string($str)) { - $value = array("escape", $str); - return true; - } else { - $this->seek($s); - } - - // css hack: \0 - if ($this->literal('\\') && $this->match('([0-9]+)', $m)) { - $value = array('keyword', '\\'.$m[1]); - return true; - } else { - $this->seek($s); - } - - return false; - } - - // an import statement - protected function import(&$out) { - if (!$this->literal('@import')) return false; - - // @import "something.css" media; - // @import url("something.css") media; - // @import url(something.css) media; - - if ($this->propertyValue($value)) { - $out = array("import", $value); - return true; - } - } - - protected function mediaQueryList(&$out) { - if ($this->genericList($list, "mediaQuery", ",", false)) { - $out = $list[2]; - return true; - } - return false; - } - - protected function mediaQuery(&$out) { - $s = $this->seek(); - - $expressions = null; - $parts = array(); - - if (($this->literal("only") && ($only = true) || $this->literal("not") && ($not = true) || true) && $this->keyword($mediaType)) { - $prop = array("mediaType"); - if (isset($only)) $prop[] = "only"; - if (isset($not)) $prop[] = "not"; - $prop[] = $mediaType; - $parts[] = $prop; - } else { - $this->seek($s); - } - - - if (!empty($mediaType) && !$this->literal("and")) { - // ~ - } else { - $this->genericList($expressions, "mediaExpression", "and", false); - if (is_array($expressions)) $parts = array_merge($parts, $expressions[2]); - } - - if (count($parts) == 0) { - $this->seek($s); - return false; - } - - $out = $parts; - return true; - } - - protected function mediaExpression(&$out) { - $s = $this->seek(); - $value = null; - if ($this->literal("(") && - $this->keyword($feature) && - ($this->literal(":") && $this->expression($value) || true) && - $this->literal(")")) - { - $out = array("mediaExp", $feature); - if ($value) $out[] = $value; - return true; - } elseif ($this->variable($variable)) { - $out = array('variable', $variable); - return true; - } - - $this->seek($s); - return false; - } - - // an unbounded string stopped by $end - protected function openString($end, &$out, $nestingOpen=null, $rejectStrs = null) { - $oldWhite = $this->eatWhiteDefault; - $this->eatWhiteDefault = false; - - $stop = array("'", '"', "@{", $end); - $stop = array_map(array("lessc", "preg_quote"), $stop); - // $stop[] = self::$commentMulti; - - if (!is_null($rejectStrs)) { - $stop = array_merge($stop, $rejectStrs); - } - - $patt = '(.*?)('.implode("|", $stop).')'; - - $nestingLevel = 0; - - $content = array(); - while ($this->match($patt, $m, false)) { - if (!empty($m[1])) { - $content[] = $m[1]; - if ($nestingOpen) { - $nestingLevel += substr_count($m[1], $nestingOpen); - } - } - - $tok = $m[2]; - - $this->count-= strlen($tok); - if ($tok == $end) { - if ($nestingLevel == 0) { - break; - } else { - $nestingLevel--; - } - } - - if (($tok == "'" || $tok == '"') && $this->string($str)) { - $content[] = $str; - continue; - } - - if ($tok == "@{" && $this->interpolation($inter)) { - $content[] = $inter; - continue; - } - - if (!empty($rejectStrs) && in_array($tok, $rejectStrs)) { - break; - } - - $content[] = $tok; - $this->count+= strlen($tok); - } - - $this->eatWhiteDefault = $oldWhite; - - if (count($content) == 0) return false; - - // trim the end - if (is_string(end($content))) { - $content[count($content) - 1] = rtrim(end($content)); - } - - $out = array("string", "", $content); - return true; - } - - protected function string(&$out) { - $s = $this->seek(); - if ($this->literal('"', false)) { - $delim = '"'; - } elseif ($this->literal("'", false)) { - $delim = "'"; - } else { - return false; - } - - $content = array(); - - // look for either ending delim , escape, or string interpolation - $patt = '([^\n]*?)(@\{|\\\\|' . - lessc::preg_quote($delim).')'; - - $oldWhite = $this->eatWhiteDefault; - $this->eatWhiteDefault = false; - - while ($this->match($patt, $m, false)) { - $content[] = $m[1]; - if ($m[2] == "@{") { - $this->count -= strlen($m[2]); - if ($this->interpolation($inter, false)) { - $content[] = $inter; - } else { - $this->count += strlen($m[2]); - $content[] = "@{"; // ignore it - } - } elseif ($m[2] == '\\') { - $content[] = $m[2]; - if ($this->literal($delim, false)) { - $content[] = $delim; - } - } else { - $this->count -= strlen($delim); - break; // delim - } - } - - $this->eatWhiteDefault = $oldWhite; - - if ($this->literal($delim)) { - $out = array("string", $delim, $content); - return true; - } - - $this->seek($s); - return false; - } - - protected function interpolation(&$out) { - $oldWhite = $this->eatWhiteDefault; - $this->eatWhiteDefault = true; - - $s = $this->seek(); - if ($this->literal("@{") && - $this->openString("}", $interp, null, array("'", '"', ";")) && - $this->literal("}", false)) - { - $out = array("interpolate", $interp); - $this->eatWhiteDefault = $oldWhite; - if ($this->eatWhiteDefault) $this->whitespace(); - return true; - } - - $this->eatWhiteDefault = $oldWhite; - $this->seek($s); - return false; - } - - protected function unit(&$unit) { - // speed shortcut - if (isset($this->buffer[$this->count])) { - $char = $this->buffer[$this->count]; - if (!ctype_digit($char) && $char != ".") return false; - } - - if ($this->match('([0-9]+(?:\.[0-9]*)?|\.[0-9]+)([%a-zA-Z]+)?', $m)) { - $unit = array("number", $m[1], empty($m[2]) ? "" : $m[2]); - return true; - } - return false; - } - - // a # color - protected function color(&$out) { - if ($this->match('(#(?:[0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{3}))', $m)) { - if (strlen($m[1]) > 7) { - $out = array("string", "", array($m[1])); - } else { - $out = array("raw_color", $m[1]); - } - return true; - } - - return false; - } - - // consume an argument definition list surrounded by () - // each argument is a variable name with optional value - // or at the end a ... or a variable named followed by ... - // arguments are separated by , unless a ; is in the list, then ; is the - // delimiter. - protected function argumentDef(&$args, &$isVararg) { - $s = $this->seek(); - if (!$this->literal('(')) return false; - - $values = array(); - $delim = ","; - $method = "expressionList"; - - $isVararg = false; - while (true) { - if ($this->literal("...")) { - $isVararg = true; - break; - } - - if ($this->$method($value)) { - if ($value[0] == "variable") { - $arg = array("arg", $value[1]); - $ss = $this->seek(); - - if ($this->assign() && $this->$method($rhs)) { - $arg[] = $rhs; - } else { - $this->seek($ss); - if ($this->literal("...")) { - $arg[0] = "rest"; - $isVararg = true; - } - } - - $values[] = $arg; - if ($isVararg) break; - continue; - } else { - $values[] = array("lit", $value); - } - } - - - if (!$this->literal($delim)) { - if ($delim == "," && $this->literal(";")) { - // found new delim, convert existing args - $delim = ";"; - $method = "propertyValue"; - - // transform arg list - if (isset($values[1])) { // 2 items - $newList = array(); - foreach ($values as $i => $arg) { - switch($arg[0]) { - case "arg": - if ($i) { - $this->throwError("Cannot mix ; and , as delimiter types"); - } - $newList[] = $arg[2]; - break; - case "lit": - $newList[] = $arg[1]; - break; - case "rest": - $this->throwError("Unexpected rest before semicolon"); - } - } - - $newList = array("list", ", ", $newList); - - switch ($values[0][0]) { - case "arg": - $newArg = array("arg", $values[0][1], $newList); - break; - case "lit": - $newArg = array("lit", $newList); - break; - } - - } elseif ($values) { // 1 item - $newArg = $values[0]; - } - - if ($newArg) { - $values = array($newArg); - } - } else { - break; - } - } - } - - if (!$this->literal(')')) { - $this->seek($s); - return false; - } - - $args = $values; - - return true; - } - - // consume a list of tags - // this accepts a hanging delimiter - protected function tags(&$tags, $simple = false, $delim = ',') { - $tags = array(); - while ($this->tag($tt, $simple)) { - $tags[] = $tt; - if (!$this->literal($delim)) break; - } - if (count($tags) == 0) return false; - - return true; - } - - // list of tags of specifying mixin path - // optionally separated by > (lazy, accepts extra >) - protected function mixinTags(&$tags) { - $tags = array(); - while ($this->tag($tt, true)) { - $tags[] = $tt; - $this->literal(">"); - } - - if (count($tags) == 0) return false; - - return true; - } - - // a bracketed value (contained within in a tag definition) - protected function tagBracket(&$parts, &$hasExpression) { - // speed shortcut - if (isset($this->buffer[$this->count]) && $this->buffer[$this->count] != "[") { - return false; - } - - $s = $this->seek(); - - $hasInterpolation = false; - - if ($this->literal("[", false)) { - $attrParts = array("["); - // keyword, string, operator - while (true) { - if ($this->literal("]", false)) { - $this->count--; - break; // get out early - } - - if ($this->match('\s+', $m)) { - $attrParts[] = " "; - continue; - } - if ($this->string($str)) { - // escape parent selector, (yuck) - foreach ($str[2] as &$chunk) { - $chunk = str_replace($this->lessc->parentSelector, "$&$", $chunk); - } - - $attrParts[] = $str; - $hasInterpolation = true; - continue; - } - - if ($this->keyword($word)) { - $attrParts[] = $word; - continue; - } - - if ($this->interpolation($inter, false)) { - $attrParts[] = $inter; - $hasInterpolation = true; - continue; - } - - // operator, handles attr namespace too - if ($this->match('[|-~\$\*\^=]+', $m)) { - $attrParts[] = $m[0]; - continue; - } - - break; - } - - if ($this->literal("]", false)) { - $attrParts[] = "]"; - foreach ($attrParts as $part) { - $parts[] = $part; - } - $hasExpression = $hasExpression || $hasInterpolation; - return true; - } - $this->seek($s); - } - - $this->seek($s); - return false; - } - - // a space separated list of selectors - protected function tag(&$tag, $simple = false) { - if ($simple) - $chars = '^@,:;{}\][>\(\) "\''; - else - $chars = '^@,;{}["\''; - - $s = $this->seek(); - - $hasExpression = false; - $parts = array(); - while ($this->tagBracket($parts, $hasExpression)); - - $oldWhite = $this->eatWhiteDefault; - $this->eatWhiteDefault = false; - - while (true) { - if ($this->match('(['.$chars.'0-9]['.$chars.']*)', $m)) { - $parts[] = $m[1]; - if ($simple) break; - - while ($this->tagBracket($parts, $hasExpression)); - continue; - } - - if (isset($this->buffer[$this->count]) && $this->buffer[$this->count] == "@") { - if ($this->interpolation($interp)) { - $hasExpression = true; - $interp[2] = true; // don't unescape - $parts[] = $interp; - continue; - } - - if ($this->literal("@")) { - $parts[] = "@"; - continue; - } - } - - if ($this->unit($unit)) { // for keyframes - $parts[] = $unit[1]; - $parts[] = $unit[2]; - continue; - } - - break; - } - - $this->eatWhiteDefault = $oldWhite; - if (!$parts) { - $this->seek($s); - return false; - } - - if ($hasExpression) { - $tag = array("exp", array("string", "", $parts)); - } else { - $tag = trim(implode($parts)); - } - - $this->whitespace(); - return true; - } - - // a css function - protected function func(&$func) { - $s = $this->seek(); - - if ($this->match('(%|[\w\-_][\w\-_:\.]+|[\w_])', $m) && $this->literal('(')) { - $fname = $m[1]; - - $sPreArgs = $this->seek(); - - $args = array(); - while (true) { - $ss = $this->seek(); - // this ugly nonsense is for ie filter properties - if ($this->keyword($name) && $this->literal('=') && $this->expressionList($value)) { - $args[] = array("string", "", array($name, "=", $value)); - } else { - $this->seek($ss); - if ($this->expressionList($value)) { - $args[] = $value; - } - } - - if (!$this->literal(',')) break; - } - $args = array('list', ',', $args); - - if ($this->literal(')')) { - $func = array('function', $fname, $args); - return true; - } elseif ($fname == 'url') { - // couldn't parse and in url? treat as string - $this->seek($sPreArgs); - if ($this->openString(")", $string) && $this->literal(")")) { - $func = array('function', $fname, $string); - return true; - } - } - } - - $this->seek($s); - return false; - } - - // consume a less variable - protected function variable(&$name) { - $s = $this->seek(); - if ($this->literal($this->lessc->vPrefix, false) && - ($this->variable($sub) || $this->keyword($name))) - { - if (!empty($sub)) { - $name = array('variable', $sub); - } else { - $name = $this->lessc->vPrefix.$name; - } - return true; - } - - $name = null; - $this->seek($s); - return false; - } - - /** - * Consume an assignment operator - * Can optionally take a name that will be set to the current property name - */ - protected function assign($name = null) { - if ($name) $this->currentProperty = $name; - return $this->literal(':') || $this->literal('='); - } - - // consume a keyword - protected function keyword(&$word) { - if ($this->match('([\w_\-\*!"][\w\-_"]*)', $m)) { - $word = $m[1]; - return true; - } - return false; - } - - // consume an end of statement delimiter - protected function end() { - if ($this->literal(';', false)) { - return true; - } elseif ($this->count == strlen($this->buffer) || $this->buffer[$this->count] == '}') { - // if there is end of file or a closing block next then we don't need a ; - return true; - } - return false; - } - - protected function guards(&$guards) { - $s = $this->seek(); - - if (!$this->literal("when")) { - $this->seek($s); - return false; - } - - $guards = array(); - - while ($this->guardGroup($g)) { - $guards[] = $g; - if (!$this->literal(",")) break; - } - - if (count($guards) == 0) { - $guards = null; - $this->seek($s); - return false; - } - - return true; - } - - // a bunch of guards that are and'd together - // TODO rename to guardGroup - protected function guardGroup(&$guardGroup) { - $s = $this->seek(); - $guardGroup = array(); - while ($this->guard($guard)) { - $guardGroup[] = $guard; - if (!$this->literal("and")) break; - } - - if (count($guardGroup) == 0) { - $guardGroup = null; - $this->seek($s); - return false; - } - - return true; - } - - protected function guard(&$guard) { - $s = $this->seek(); - $negate = $this->literal("not"); - - if ($this->literal("(") && $this->expression($exp) && $this->literal(")")) { - $guard = $exp; - if ($negate) $guard = array("negate", $guard); - return true; - } - - $this->seek($s); - return false; - } - - /* raw parsing functions */ - - protected function literal($what, $eatWhitespace = null) { - if ($eatWhitespace === null) $eatWhitespace = $this->eatWhiteDefault; - - // shortcut on single letter - if (!isset($what[1]) && isset($this->buffer[$this->count])) { - if ($this->buffer[$this->count] == $what) { - if (!$eatWhitespace) { - $this->count++; - return true; - } - // goes below... - } else { - return false; - } - } - - if (!isset(self::$literalCache[$what])) { - self::$literalCache[$what] = lessc::preg_quote($what); - } - - return $this->match(self::$literalCache[$what], $m, $eatWhitespace); - } - - protected function genericList(&$out, $parseItem, $delim="", $flatten=true) { - $s = $this->seek(); - $items = array(); - while ($this->$parseItem($value)) { - $items[] = $value; - if ($delim) { - if (!$this->literal($delim)) break; - } - } - - if (count($items) == 0) { - $this->seek($s); - return false; - } - - if ($flatten && count($items) == 1) { - $out = $items[0]; - } else { - $out = array("list", $delim, $items); - } - - return true; - } - - - // advance counter to next occurrence of $what - // $until - don't include $what in advance - // $allowNewline, if string, will be used as valid char set - protected function to($what, &$out, $until = false, $allowNewline = false) { - if (is_string($allowNewline)) { - $validChars = $allowNewline; - } else { - $validChars = $allowNewline ? "." : "[^\n]"; - } - if (!$this->match('('.$validChars.'*?)'.lessc::preg_quote($what), $m, !$until)) return false; - if ($until) $this->count -= strlen($what); // give back $what - $out = $m[1]; - return true; - } - - // try to match something on head of buffer - protected function match($regex, &$out, $eatWhitespace = null) { - if ($eatWhitespace === null) $eatWhitespace = $this->eatWhiteDefault; - - $r = '/'.$regex.($eatWhitespace && !$this->writeComments ? '\s*' : '').'/Ais'; - if (preg_match($r, $this->buffer, $out, null, $this->count)) { - $this->count += strlen($out[0]); - if ($eatWhitespace && $this->writeComments) $this->whitespace(); - return true; - } - return false; - } - - // match some whitespace - protected function whitespace() { - if ($this->writeComments) { - $gotWhite = false; - while (preg_match(self::$whitePattern, $this->buffer, $m, null, $this->count)) { - if (isset($m[1]) && empty($this->seenComments[$this->count])) { - $this->append(array("comment", $m[1])); - $this->seenComments[$this->count] = true; - } - $this->count += strlen($m[0]); - $gotWhite = true; - } - return $gotWhite; - } else { - $this->match("", $m); - return strlen($m[0]) > 0; - } - } - - // match something without consuming it - protected function peek($regex, &$out = null, $from=null) { - if (is_null($from)) $from = $this->count; - $r = '/'.$regex.'/Ais'; - $result = preg_match($r, $this->buffer, $out, null, $from); - - return $result; - } - - // seek to a spot in the buffer or return where we are on no argument - protected function seek($where = null) { - if ($where === null) return $this->count; - else $this->count = $where; - return true; - } - - /* misc functions */ - - public function throwError($msg = "parse error", $count = null) { - $count = is_null($count) ? $this->count : $count; - - $line = $this->line + - substr_count(substr($this->buffer, 0, $count), "\n"); - - if (!empty($this->sourceName)) { - $loc = "$this->sourceName on line $line"; - } else { - $loc = "line: $line"; - } - - // TODO this depends on $this->count - if ($this->peek("(.*?)(\n|$)", $m, $count)) { - throw new exception("$msg: failed at `$m[1]` $loc"); - } else { - throw new exception("$msg: $loc"); - } - } - - protected function pushBlock($selectors=null, $type=null) { - $b = new stdclass; - $b->parent = $this->env; - - $b->type = $type; - $b->id = self::$nextBlockId++; - - $b->isVararg = false; // TODO: kill me from here - $b->tags = $selectors; - - $b->props = array(); - $b->children = array(); - - $this->env = $b; - return $b; - } - - // push a block that doesn't multiply tags - protected function pushSpecialBlock($type) { - return $this->pushBlock(null, $type); - } - - // append a property to the current block - protected function append($prop, $pos = null) { - if ($pos !== null) $prop[-1] = $pos; - $this->env->props[] = $prop; - } - - // pop something off the stack - protected function pop() { - $old = $this->env; - $this->env = $this->env->parent; - return $old; - } - - // remove comments from $text - // todo: make it work for all functions, not just url - protected function removeComments($text) { - $look = array( - 'url(', '//', '/*', '"', "'" - ); - - $out = ''; - $min = null; - while (true) { - // find the next item - foreach ($look as $token) { - $pos = strpos($text, $token); - if ($pos !== false) { - if (!isset($min) || $pos < $min[1]) $min = array($token, $pos); - } - } - - if (is_null($min)) break; - - $count = $min[1]; - $skip = 0; - $newlines = 0; - switch ($min[0]) { - case 'url(': - if (preg_match('/url\(.*?\)/', $text, $m, 0, $count)) - $count += strlen($m[0]) - strlen($min[0]); - break; - case '"': - case "'": - if (preg_match('/'.$min[0].'.*?(? 0, + '>=' => 0, + '=' => 0, + '<' => 0, + '>' => 0, + + '+' => 1, + '-' => 1, + '*' => 2, + '/' => 2, + '%' => 2, + ); + + protected static $whitePattern; + protected static $commentMulti; + + protected static $commentSingle = "//"; + protected static $commentMultiLeft = "/*"; + protected static $commentMultiRight = "*/"; + + // regex string to match any of the operators + protected static $operatorString; + + // these properties will supress division unless it's inside parenthases + protected static $supressDivisionProps = + array('/border-radius$/i', '/^font$/i'); + + protected $blockDirectives = array("font-face", "keyframes", "page", "-moz-document", "viewport", "-moz-viewport", "-o-viewport", "-ms-viewport"); + protected $lineDirectives = array("charset"); + + /** + * if we are in parens we can be more liberal with whitespace around + * operators because it must evaluate to a single value and thus is less + * ambiguous. + * + * Consider: + * property1: 10 -5; // is two numbers, 10 and -5 + * property2: (10 -5); // should evaluate to 5 + */ + protected $inParens = false; + + // caches preg escaped literals + protected static $literalCache = array(); + + public function __construct($lessc, $sourceName = null) { + $this->eatWhiteDefault = true; + // reference to less needed for vPrefix, mPrefix, and parentSelector + $this->lessc = $lessc; + + $this->sourceName = $sourceName; // name used for error messages + + $this->writeComments = false; + + if (!self::$operatorString) { + self::$operatorString = + '('.implode('|', array_map(array('lessc', 'preg_quote'), + array_keys(self::$precedence))).')'; + + $commentSingle = lessc::preg_quote(self::$commentSingle); + $commentMultiLeft = lessc::preg_quote(self::$commentMultiLeft); + $commentMultiRight = lessc::preg_quote(self::$commentMultiRight); + + self::$commentMulti = $commentMultiLeft.'.*?'.$commentMultiRight; + self::$whitePattern = '/'.$commentSingle.'[^\n]*\s*|('.self::$commentMulti.')\s*|\s+/Ais'; + } + } + + public function parse($buffer) { + $this->count = 0; + $this->line = 1; + + $this->env = null; // block stack + $this->buffer = $this->writeComments ? $buffer : $this->removeComments($buffer); + $this->pushSpecialBlock("root"); + $this->eatWhiteDefault = true; + $this->seenComments = array(); + + // trim whitespace on head + // if (preg_match('/^\s+/', $this->buffer, $m)) { + // $this->line += substr_count($m[0], "\n"); + // $this->buffer = ltrim($this->buffer); + // } + $this->whitespace(); + + // parse the entire file + while (false !== $this->parseChunk()); + + if ($this->count != strlen($this->buffer)) + $this->throwError(); + + // TODO report where the block was opened + if ( !property_exists($this->env, 'parent') || !is_null($this->env->parent) ) + throw new exception('parse error: unclosed block'); + + return $this->env; + } + + /** + * Parse a single chunk off the head of the buffer and append it to the + * current parse environment. + * Returns false when the buffer is empty, or when there is an error. + * + * This function is called repeatedly until the entire document is + * parsed. + * + * This parser is most similar to a recursive descent parser. Single + * functions represent discrete grammatical rules for the language, and + * they are able to capture the text that represents those rules. + * + * Consider the function lessc::keyword(). (all parse functions are + * structured the same) + * + * The function takes a single reference argument. When calling the + * function it will attempt to match a keyword on the head of the buffer. + * If it is successful, it will place the keyword in the referenced + * argument, advance the position in the buffer, and return true. If it + * fails then it won't advance the buffer and it will return false. + * + * All of these parse functions are powered by lessc::match(), which behaves + * the same way, but takes a literal regular expression. Sometimes it is + * more convenient to use match instead of creating a new function. + * + * Because of the format of the functions, to parse an entire string of + * grammatical rules, you can chain them together using &&. + * + * But, if some of the rules in the chain succeed before one fails, then + * the buffer position will be left at an invalid state. In order to + * avoid this, lessc::seek() is used to remember and set buffer positions. + * + * Before parsing a chain, use $s = $this->seek() to remember the current + * position into $s. Then if a chain fails, use $this->seek($s) to + * go back where we started. + */ + protected function parseChunk() { + if (empty($this->buffer)) return false; + $s = $this->seek(); + + if ($this->whitespace()) { + return true; + } + + // setting a property + if ($this->keyword($key) && $this->assign() && + $this->propertyValue($value, $key) && $this->end() + ) { + $this->append(array('assign', $key, $value), $s); + return true; + } else { + $this->seek($s); + } + + + // look for special css blocks + if ($this->literal('@', false)) { + $this->count--; + + // media + if ($this->literal('@media')) { + if (($this->mediaQueryList($mediaQueries) || true) + && $this->literal('{') + ) { + $media = $this->pushSpecialBlock("media"); + $media->queries = is_null($mediaQueries) ? array() : $mediaQueries; + return true; + } else { + $this->seek($s); + return false; + } + } + + if ($this->literal("@", false) && $this->keyword($dirName)) { + if ($this->isDirective($dirName, $this->blockDirectives)) { + if (($this->openString("{", $dirValue, null, array(";")) || true) && + $this->literal("{") + ) { + $dir = $this->pushSpecialBlock("directive"); + $dir->name = $dirName; + if (isset($dirValue)) $dir->value = $dirValue; + return true; + } + } elseif ($this->isDirective($dirName, $this->lineDirectives)) { + if ($this->propertyValue($dirValue) && $this->end()) { + $this->append(array("directive", $dirName, $dirValue)); + return true; + } + } + } + + $this->seek($s); + } + + // setting a variable + if ($this->variable($var) && $this->assign() && + $this->propertyValue($value) && $this->end() + ) { + $this->append(array('assign', $var, $value), $s); + return true; + } else { + $this->seek($s); + } + + if ($this->import($importValue)) { + $this->append($importValue, $s); + return true; + } + + // opening parametric mixin + if ($this->tag($tag, true) && $this->argumentDef($args, $isVararg) && + ($this->guards($guards) || true) && + $this->literal('{') + ) { + $block = $this->pushBlock($this->fixTags(array($tag))); + $block->args = $args; + $block->isVararg = $isVararg; + if (!empty($guards)) $block->guards = $guards; + return true; + } else { + $this->seek($s); + } + + // opening a simple block + if ($this->tags($tags) && $this->literal('{', false)) { + $tags = $this->fixTags($tags); + $this->pushBlock($tags); + return true; + } else { + $this->seek($s); + } + + // closing a block + if ($this->literal('}', false)) { + try { + $block = $this->pop(); + } catch (exception $e) { + $this->seek($s); + $this->throwError($e->getMessage()); + } + + $hidden = false; + if (is_null($block->type)) { + $hidden = true; + if (!isset($block->args)) { + foreach ($block->tags as $tag) { + if (!is_string($tag) || $tag[0] != $this->lessc->mPrefix) { + $hidden = false; + break; + } + } + } + + foreach ($block->tags as $tag) { + if (is_string($tag)) { + $this->env->children[$tag][] = $block; + } + } + } + + if (!$hidden) { + $this->append(array('block', $block), $s); + } + + // this is done here so comments aren't bundled into he block that + // was just closed + $this->whitespace(); + return true; + } + + // mixin + if ($this->mixinTags($tags) && + ($this->argumentDef($argv, $isVararg) || true) && + ($this->keyword($suffix) || true) && $this->end() + ) { + $tags = $this->fixTags($tags); + $this->append(array('mixin', $tags, $argv, $suffix), $s); + return true; + } else { + $this->seek($s); + } + + // spare ; + if ($this->literal(';')) return true; + + return false; // got nothing, throw error + } + + protected function isDirective($dirname, $directives) { + // TODO: cache pattern in parser + $pattern = implode("|", + array_map(array("lessc", "preg_quote"), $directives)); + $pattern = '/^(-[a-z-]+-)?(' . $pattern . ')$/i'; + + return preg_match($pattern, $dirname); + } + + protected function fixTags($tags) { + // move @ tags out of variable namespace + foreach ($tags as &$tag) { + if ($tag[0] == $this->lessc->vPrefix) + $tag[0] = $this->lessc->mPrefix; + } + return $tags; + } + + // a list of expressions + protected function expressionList(&$exps) { + $values = array(); + + while ($this->expression($exp)) { + $values[] = $exp; + } + + if (count($values) == 0) return false; + + $exps = lessc::compressList($values, ' '); + return true; + } + + /** + * Attempt to consume an expression. + * @link http://en.wikipedia.org/wiki/Operator-precedence_parser#Pseudo-code + */ + protected function expression(&$out) { + if ($this->value($lhs)) { + $out = $this->expHelper($lhs, 0); + + // look for / shorthand + if (!empty($this->env->supressedDivision)) { + unset($this->env->supressedDivision); + $s = $this->seek(); + if ($this->literal("/") && $this->value($rhs)) { + $out = array("list", "", + array($out, array("keyword", "/"), $rhs)); + } else { + $this->seek($s); + } + } + + return true; + } + return false; + } + + /** + * recursively parse infix equation with $lhs at precedence $minP + */ + protected function expHelper($lhs, $minP) { + $this->inExp = true; + $ss = $this->seek(); + + while (true) { + $whiteBefore = isset($this->buffer[$this->count - 1]) && + ctype_space($this->buffer[$this->count - 1]); + + // If there is whitespace before the operator, then we require + // whitespace after the operator for it to be an expression + $needWhite = $whiteBefore && !$this->inParens; + + if ($this->match(self::$operatorString.($needWhite ? '\s' : ''), $m) && self::$precedence[$m[1]] >= $minP) { + if (!$this->inParens && isset($this->env->currentProperty) && $m[1] == "/" && empty($this->env->supressedDivision)) { + foreach (self::$supressDivisionProps as $pattern) { + if (preg_match($pattern, $this->env->currentProperty)) { + $this->env->supressedDivision = true; + break 2; + } + } + } + + + $whiteAfter = isset($this->buffer[$this->count - 1]) && + ctype_space($this->buffer[$this->count - 1]); + + if (!$this->value($rhs)) break; + + // peek for next operator to see what to do with rhs + if ($this->peek(self::$operatorString, $next) && self::$precedence[$next[1]] > self::$precedence[$m[1]]) { + $rhs = $this->expHelper($rhs, self::$precedence[$next[1]]); + } + + $lhs = array('expression', $m[1], $lhs, $rhs, $whiteBefore, $whiteAfter); + $ss = $this->seek(); + + continue; + } + + break; + } + + $this->seek($ss); + + return $lhs; + } + + // consume a list of values for a property + public function propertyValue(&$value, $keyName = null) { + $values = array(); + + if ($keyName !== null) $this->env->currentProperty = $keyName; + + $s = null; + while ($this->expressionList($v)) { + $values[] = $v; + $s = $this->seek(); + if (!$this->literal(',')) break; + } + + if ($s) $this->seek($s); + + if ($keyName !== null) unset($this->env->currentProperty); + + if (count($values) == 0) return false; + + $value = lessc::compressList($values, ', '); + return true; + } + + protected function parenValue(&$out) { + $s = $this->seek(); + + // speed shortcut + if (isset($this->buffer[$this->count]) && $this->buffer[$this->count] != "(") { + return false; + } + + $inParens = $this->inParens; + if ($this->literal("(") && + ($this->inParens = true) && $this->expression($exp) && + $this->literal(")") + ) { + $out = $exp; + $this->inParens = $inParens; + return true; + } else { + $this->inParens = $inParens; + $this->seek($s); + } + + return false; + } + + // a single value + protected function value(&$value) { + $s = $this->seek(); + + // speed shortcut + if (isset($this->buffer[$this->count]) && $this->buffer[$this->count] == "-") { + // negation + if ($this->literal("-", false) && + (($this->variable($inner) && $inner = array("variable", $inner)) || + $this->unit($inner) || + $this->parenValue($inner)) + ) { + $value = array("unary", "-", $inner); + return true; + } else { + $this->seek($s); + } + } + + if ($this->parenValue($value)) return true; + if ($this->unit($value)) return true; + if ($this->color($value)) return true; + if ($this->func($value)) return true; + if ($this->string($value)) return true; + + if ($this->keyword($word)) { + $value = array('keyword', $word); + return true; + } + + // try a variable + if ($this->variable($var)) { + $value = array('variable', $var); + return true; + } + + // unquote string (should this work on any type? + if ($this->literal("~") && $this->string($str)) { + $value = array("escape", $str); + return true; + } else { + $this->seek($s); + } + + // css hack: \0 + if ($this->literal('\\') && $this->match('([0-9]+)', $m)) { + $value = array('keyword', '\\'.$m[1]); + return true; + } else { + $this->seek($s); + } + + return false; + } + + // an import statement + protected function import(&$out) { + if (!$this->literal('@import')) return false; + + // @import "something.css" media; + // @import url("something.css") media; + // @import url(something.css) media; + + if ($this->propertyValue($value)) { + $out = array("import", $value); + return true; + } + } + + protected function mediaQueryList(&$out) { + if ($this->genericList($list, "mediaQuery", ",", false)) { + $out = $list[2]; + return true; + } + return false; + } + + protected function mediaQuery(&$out) { + $s = $this->seek(); + + $expressions = null; + $parts = array(); + + if (($this->literal("only") && ($only = true) || $this->literal("not") && ($not = true) || true) && $this->keyword($mediaType)) { + $prop = array("mediaType"); + if (isset($only)) $prop[] = "only"; + if (isset($not)) $prop[] = "not"; + $prop[] = $mediaType; + $parts[] = $prop; + } else { + $this->seek($s); + } + + + if (!empty($mediaType) && !$this->literal("and")) { + // ~ + } else { + $this->genericList($expressions, "mediaExpression", "and", false); + if (is_array($expressions)) $parts = array_merge($parts, $expressions[2]); + } + + if (count($parts) == 0) { + $this->seek($s); + return false; + } + + $out = $parts; + return true; + } + + protected function mediaExpression(&$out) { + $s = $this->seek(); + $value = null; + if ($this->literal("(") && + $this->keyword($feature) && + ($this->literal(":") && $this->expression($value) || true) && + $this->literal(")") + ) { + $out = array("mediaExp", $feature); + if ($value) $out[] = $value; + return true; + } elseif ($this->variable($variable)) { + $out = array('variable', $variable); + return true; + } + + $this->seek($s); + return false; + } + + // an unbounded string stopped by $end + protected function openString($end, &$out, $nestingOpen = null, $rejectStrs = null) { + $oldWhite = $this->eatWhiteDefault; + $this->eatWhiteDefault = false; + + $stop = array("'", '"', "@{", $end); + $stop = array_map(array("lessc", "preg_quote"), $stop); + // $stop[] = self::$commentMulti; + + if (!is_null($rejectStrs)) { + $stop = array_merge($stop, $rejectStrs); + } + + $patt = '(.*?)('.implode("|", $stop).')'; + + $nestingLevel = 0; + + $content = array(); + while ($this->match($patt, $m, false)) { + if (!empty($m[1])) { + $content[] = $m[1]; + if ($nestingOpen) { + $nestingLevel += substr_count($m[1], $nestingOpen); + } + } + + $tok = $m[2]; + + $this->count-= strlen($tok); + if ($tok == $end) { + if ($nestingLevel == 0) { + break; + } else { + $nestingLevel--; + } + } + + if (($tok == "'" || $tok == '"') && $this->string($str)) { + $content[] = $str; + continue; + } + + if ($tok == "@{" && $this->interpolation($inter)) { + $content[] = $inter; + continue; + } + + if (!empty($rejectStrs) && in_array($tok, $rejectStrs)) { + break; + } + + $content[] = $tok; + $this->count+= strlen($tok); + } + + $this->eatWhiteDefault = $oldWhite; + + if (count($content) == 0) return false; + + // trim the end + if (is_string(end($content))) { + $content[count($content) - 1] = rtrim(end($content)); + } + + $out = array("string", "", $content); + return true; + } + + protected function string(&$out) { + $s = $this->seek(); + if ($this->literal('"', false)) { + $delim = '"'; + } elseif ($this->literal("'", false)) { + $delim = "'"; + } else { + return false; + } + + $content = array(); + + // look for either ending delim , escape, or string interpolation + $patt = '([^\n]*?)(@\{|\\\\|' . + lessc::preg_quote($delim).')'; + + $oldWhite = $this->eatWhiteDefault; + $this->eatWhiteDefault = false; + + while ($this->match($patt, $m, false)) { + $content[] = $m[1]; + if ($m[2] == "@{") { + $this->count -= strlen($m[2]); + if ($this->interpolation($inter, false)) { + $content[] = $inter; + } else { + $this->count += strlen($m[2]); + $content[] = "@{"; // ignore it + } + } elseif ($m[2] == '\\') { + $content[] = $m[2]; + if ($this->literal($delim, false)) { + $content[] = $delim; + } + } else { + $this->count -= strlen($delim); + break; // delim + } + } + + $this->eatWhiteDefault = $oldWhite; + + if ($this->literal($delim)) { + $out = array("string", $delim, $content); + return true; + } + + $this->seek($s); + return false; + } + + protected function interpolation(&$out) { + $oldWhite = $this->eatWhiteDefault; + $this->eatWhiteDefault = true; + + $s = $this->seek(); + if ($this->literal("@{") && + $this->openString("}", $interp, null, array("'", '"', ";")) && + $this->literal("}", false) + ) { + $out = array("interpolate", $interp); + $this->eatWhiteDefault = $oldWhite; + if ($this->eatWhiteDefault) $this->whitespace(); + return true; + } + + $this->eatWhiteDefault = $oldWhite; + $this->seek($s); + return false; + } + + protected function unit(&$unit) { + // speed shortcut + if (isset($this->buffer[$this->count])) { + $char = $this->buffer[$this->count]; + if (!ctype_digit($char) && $char != ".") return false; + } + + if ($this->match('([0-9]+(?:\.[0-9]*)?|\.[0-9]+)([%a-zA-Z]+)?', $m)) { + $unit = array("number", $m[1], empty($m[2]) ? "" : $m[2]); + return true; + } + return false; + } + + // a # color + protected function color(&$out) { + if ($this->match('(#(?:[0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{3}))', $m)) { + if (strlen($m[1]) > 7) { + $out = array("string", "", array($m[1])); + } else { + $out = array("raw_color", $m[1]); + } + return true; + } + + return false; + } + + // consume an argument definition list surrounded by () + // each argument is a variable name with optional value + // or at the end a ... or a variable named followed by ... + // arguments are separated by , unless a ; is in the list, then ; is the + // delimiter. + protected function argumentDef(&$args, &$isVararg) { + $s = $this->seek(); + if (!$this->literal('(')) { + return false; + } + + $values = array(); + $delim = ","; + $method = "expressionList"; + + $isVararg = false; + while (true) { + if ($this->literal("...")) { + $isVararg = true; + break; + } + + if ($this->$method($value)) { + if ($value[0] == "variable") { + $arg = array("arg", $value[1]); + $ss = $this->seek(); + + if ($this->assign() && $this->$method($rhs)) { + $arg[] = $rhs; + } else { + $this->seek($ss); + if ($this->literal("...")) { + $arg[0] = "rest"; + $isVararg = true; + } + } + + $values[] = $arg; + if ($isVararg) { + break; + } + continue; + } else { + $values[] = array("lit", $value); + } + } + + + if (!$this->literal($delim)) { + if ($delim == "," && $this->literal(";")) { + // found new delim, convert existing args + $delim = ";"; + $method = "propertyValue"; + + // transform arg list + if (isset($values[1])) { // 2 items + $newList = array(); + foreach ($values as $i => $arg) { + switch ($arg[0]) { + case "arg": + if ($i) { + $this->throwError("Cannot mix ; and , as delimiter types"); + } + $newList[] = $arg[2]; + break; + case "lit": + $newList[] = $arg[1]; + break; + case "rest": + $this->throwError("Unexpected rest before semicolon"); + } + } + + $newList = array("list", ", ", $newList); + + switch ($values[0][0]) { + case "arg": + $newArg = array("arg", $values[0][1], $newList); + break; + case "lit": + $newArg = array("lit", $newList); + break; + } + + } elseif ($values) { // 1 item + $newArg = $values[0]; + } + + if ($newArg) { + $values = array($newArg); + } + } else { + break; + } + } + } + + if (!$this->literal(')')) { + $this->seek($s); + return false; + } + + $args = $values; + + return true; + } + + // consume a list of tags + // this accepts a hanging delimiter + protected function tags(&$tags, $simple = false, $delim = ',') { + $tags = array(); + while ($this->tag($tt, $simple)) { + $tags[] = $tt; + if (!$this->literal($delim)) break; + } + if (count($tags) == 0) return false; + + return true; + } + + // list of tags of specifying mixin path + // optionally separated by > (lazy, accepts extra >) + protected function mixinTags(&$tags) { + $tags = array(); + while ($this->tag($tt, true)) { + $tags[] = $tt; + $this->literal(">"); + } + + if (!$tags) { + return false; + } + + return true; + } + + // a bracketed value (contained within in a tag definition) + protected function tagBracket(&$parts, &$hasExpression) { + // speed shortcut + if (isset($this->buffer[$this->count]) && $this->buffer[$this->count] != "[") { + return false; + } + + $s = $this->seek(); + + $hasInterpolation = false; + + if ($this->literal("[", false)) { + $attrParts = array("["); + // keyword, string, operator + while (true) { + if ($this->literal("]", false)) { + $this->count--; + break; // get out early + } + + if ($this->match('\s+', $m)) { + $attrParts[] = " "; + continue; + } + if ($this->string($str)) { + // escape parent selector, (yuck) + foreach ($str[2] as &$chunk) { + $chunk = str_replace($this->lessc->parentSelector, "$&$", $chunk); + } + + $attrParts[] = $str; + $hasInterpolation = true; + continue; + } + + if ($this->keyword($word)) { + $attrParts[] = $word; + continue; + } + + if ($this->interpolation($inter, false)) { + $attrParts[] = $inter; + $hasInterpolation = true; + continue; + } + + // operator, handles attr namespace too + if ($this->match('[|-~\$\*\^=]+', $m)) { + $attrParts[] = $m[0]; + continue; + } + + break; + } + + if ($this->literal("]", false)) { + $attrParts[] = "]"; + foreach ($attrParts as $part) { + $parts[] = $part; + } + $hasExpression = $hasExpression || $hasInterpolation; + return true; + } + $this->seek($s); + } + + $this->seek($s); + return false; + } + + // a space separated list of selectors + protected function tag(&$tag, $simple = false) { + if ($simple) { + $chars = '^@,:;{}\][>\(\) "\''; + } else { + $chars = '^@,;{}["\''; + } + $s = $this->seek(); + + $hasExpression = false; + $parts = array(); + while ($this->tagBracket($parts, $hasExpression)); + + $oldWhite = $this->eatWhiteDefault; + $this->eatWhiteDefault = false; + + while (true) { + if ($this->match('(['.$chars.'0-9]['.$chars.']*)', $m)) { + $parts[] = $m[1]; + if ($simple) break; + + while ($this->tagBracket($parts, $hasExpression)); + continue; + } + + if (isset($this->buffer[$this->count]) && $this->buffer[$this->count] == "@") { + if ($this->interpolation($interp)) { + $hasExpression = true; + $interp[2] = true; // don't unescape + $parts[] = $interp; + continue; + } + + if ($this->literal("@")) { + $parts[] = "@"; + continue; + } + } + + if ($this->unit($unit)) { // for keyframes + $parts[] = $unit[1]; + $parts[] = $unit[2]; + continue; + } + + break; + } + + $this->eatWhiteDefault = $oldWhite; + if (!$parts) { + $this->seek($s); + return false; + } + + if ($hasExpression) { + $tag = array("exp", array("string", "", $parts)); + } else { + $tag = trim(implode($parts)); + } + + $this->whitespace(); + return true; + } + + // a css function + protected function func(&$func) { + $s = $this->seek(); + + if ($this->match('(%|[\w\-_][\w\-_:\.]+|[\w_])', $m) && $this->literal('(')) { + $fname = $m[1]; + + $sPreArgs = $this->seek(); + + $args = array(); + while (true) { + $ss = $this->seek(); + // this ugly nonsense is for ie filter properties + if ($this->keyword($name) && $this->literal('=') && $this->expressionList($value)) { + $args[] = array("string", "", array($name, "=", $value)); + } else { + $this->seek($ss); + if ($this->expressionList($value)) { + $args[] = $value; + } + } + + if (!$this->literal(',')) break; + } + $args = array('list', ',', $args); + + if ($this->literal(')')) { + $func = array('function', $fname, $args); + return true; + } elseif ($fname == 'url') { + // couldn't parse and in url? treat as string + $this->seek($sPreArgs); + if ($this->openString(")", $string) && $this->literal(")")) { + $func = array('function', $fname, $string); + return true; + } + } + } + + $this->seek($s); + return false; + } + + // consume a less variable + protected function variable(&$name) { + $s = $this->seek(); + if ($this->literal($this->lessc->vPrefix, false) && + ($this->variable($sub) || $this->keyword($name)) + ) { + if (!empty($sub)) { + $name = array('variable', $sub); + } else { + $name = $this->lessc->vPrefix.$name; + } + return true; + } + + $name = null; + $this->seek($s); + return false; + } + + /** + * Consume an assignment operator + * Can optionally take a name that will be set to the current property name + */ + protected function assign($name = null) { + if ($name) $this->currentProperty = $name; + return $this->literal(':') || $this->literal('='); + } + + // consume a keyword + protected function keyword(&$word) { + if ($this->match('([\w_\-\*!"][\w\-_"]*)', $m)) { + $word = $m[1]; + return true; + } + return false; + } + + // consume an end of statement delimiter + protected function end() { + if ($this->literal(';', false)) { + return true; + } elseif ($this->count == strlen($this->buffer) || $this->buffer[$this->count] == '}') { + // if there is end of file or a closing block next then we don't need a ; + return true; + } + return false; + } + + protected function guards(&$guards) { + $s = $this->seek(); + + if (!$this->literal("when")) { + $this->seek($s); + return false; + } + + $guards = array(); + + while ($this->guardGroup($g)) { + $guards[] = $g; + if (!$this->literal(",")) break; + } + + if (count($guards) == 0) { + $guards = null; + $this->seek($s); + return false; + } + + return true; + } + + // a bunch of guards that are and'd together + // TODO rename to guardGroup + protected function guardGroup(&$guardGroup) { + $s = $this->seek(); + $guardGroup = array(); + while ($this->guard($guard)) { + $guardGroup[] = $guard; + if (!$this->literal("and")) break; + } + + if (count($guardGroup) == 0) { + $guardGroup = null; + $this->seek($s); + return false; + } + + return true; + } + + protected function guard(&$guard) { + $s = $this->seek(); + $negate = $this->literal("not"); + + if ($this->literal("(") && $this->expression($exp) && $this->literal(")")) { + $guard = $exp; + if ($negate) $guard = array("negate", $guard); + return true; + } + + $this->seek($s); + return false; + } + + /* raw parsing functions */ + + protected function literal($what, $eatWhitespace = null) { + if ($eatWhitespace === null) $eatWhitespace = $this->eatWhiteDefault; + + // shortcut on single letter + if (!isset($what[1]) && isset($this->buffer[$this->count])) { + if ($this->buffer[$this->count] == $what) { + if (!$eatWhitespace) { + $this->count++; + return true; + } + // goes below... + } else { + return false; + } + } + + if (!isset(self::$literalCache[$what])) { + self::$literalCache[$what] = lessc::preg_quote($what); + } + + return $this->match(self::$literalCache[$what], $m, $eatWhitespace); + } + + protected function genericList(&$out, $parseItem, $delim = "", $flatten = true) { + $s = $this->seek(); + $items = array(); + while ($this->$parseItem($value)) { + $items[] = $value; + if ($delim) { + if (!$this->literal($delim)) break; + } + } + + if (count($items) == 0) { + $this->seek($s); + return false; + } + + if ($flatten && count($items) == 1) { + $out = $items[0]; + } else { + $out = array("list", $delim, $items); + } + + return true; + } + + + // advance counter to next occurrence of $what + // $until - don't include $what in advance + // $allowNewline, if string, will be used as valid char set + protected function to($what, &$out, $until = false, $allowNewline = false) { + if (is_string($allowNewline)) { + $validChars = $allowNewline; + } else { + $validChars = $allowNewline ? "." : "[^\n]"; + } + if (!$this->match('('.$validChars.'*?)'.lessc::preg_quote($what), $m, !$until)) return false; + if ($until) $this->count -= strlen($what); // give back $what + $out = $m[1]; + return true; + } + + // try to match something on head of buffer + protected function match($regex, &$out, $eatWhitespace = null) { + if ($eatWhitespace === null) $eatWhitespace = $this->eatWhiteDefault; + + $r = '/'.$regex.($eatWhitespace && !$this->writeComments ? '\s*' : '').'/Ais'; + if (preg_match($r, $this->buffer, $out, null, $this->count)) { + $this->count += strlen($out[0]); + if ($eatWhitespace && $this->writeComments) $this->whitespace(); + return true; + } + return false; + } + + // match some whitespace + protected function whitespace() { + if ($this->writeComments) { + $gotWhite = false; + while (preg_match(self::$whitePattern, $this->buffer, $m, null, $this->count)) { + if (isset($m[1]) && empty($this->seenComments[$this->count])) { + $this->append(array("comment", $m[1])); + $this->seenComments[$this->count] = true; + } + $this->count += strlen($m[0]); + $gotWhite = true; + } + return $gotWhite; + } else { + $this->match("", $m); + return strlen($m[0]) > 0; + } + } + + // match something without consuming it + protected function peek($regex, &$out = null, $from = null) { + if (is_null($from)) $from = $this->count; + $r = '/'.$regex.'/Ais'; + $result = preg_match($r, $this->buffer, $out, null, $from); + + return $result; + } + + // seek to a spot in the buffer or return where we are on no argument + protected function seek($where = null) { + if ($where === null) return $this->count; + else $this->count = $where; + return true; + } + + /* misc functions */ + + public function throwError($msg = "parse error", $count = null) { + $count = is_null($count) ? $this->count : $count; + + $line = $this->line + + substr_count(substr($this->buffer, 0, $count), "\n"); + + if (!empty($this->sourceName)) { + $loc = "$this->sourceName on line $line"; + } else { + $loc = "line: $line"; + } + + // TODO this depends on $this->count + if ($this->peek("(.*?)(\n|$)", $m, $count)) { + throw new exception("$msg: failed at `$m[1]` $loc"); + } else { + throw new exception("$msg: $loc"); + } + } + + protected function pushBlock($selectors = null, $type = null) { + $b = new stdclass; + $b->parent = $this->env; + + $b->type = $type; + $b->id = self::$nextBlockId++; + + $b->isVararg = false; // TODO: kill me from here + $b->tags = $selectors; + + $b->props = array(); + $b->children = array(); + + $this->env = $b; + return $b; + } + + // push a block that doesn't multiply tags + protected function pushSpecialBlock($type) { + return $this->pushBlock(null, $type); + } + + // append a property to the current block + protected function append($prop, $pos = null) { + if ($pos !== null) $prop[-1] = $pos; + $this->env->props[] = $prop; + } + + // pop something off the stack + protected function pop() { + $old = $this->env; + $this->env = $this->env->parent; + return $old; + } + + // remove comments from $text + // todo: make it work for all functions, not just url + protected function removeComments($text) { + $look = array( + 'url(', '//', '/*', '"', "'" + ); + + $out = ''; + $min = null; + while (true) { + // find the next item + foreach ($look as $token) { + $pos = strpos($text, $token); + if ($pos !== false) { + if (!isset($min) || $pos < $min[1]) $min = array($token, $pos); + } + } + + if (is_null($min)) break; + + $count = $min[1]; + $skip = 0; + $newlines = 0; + switch ($min[0]) { + case 'url(': + if (preg_match('/url\(.*?\)/', $text, $m, 0, $count)) + $count += strlen($m[0]) - strlen($min[0]); + break; + case '"': + case "'": + if (preg_match('/'.$min[0].'.*?(?indentLevel = 0; - } + public function __construct() { + $this->indentLevel = 0; + } - public function indentStr($n = 0) { - return str_repeat($this->indentChar, max($this->indentLevel + $n, 0)); - } + public function indentStr($n = 0) { + return str_repeat($this->indentChar, max($this->indentLevel + $n, 0)); + } - public function property($name, $value) { - return $name . $this->assignSeparator . $value . ";"; - } + public function property($name, $value) { + return $name . $this->assignSeparator . $value . ";"; + } - protected function isEmpty($block) { - if (empty($block->lines)) { - foreach ($block->children as $child) { - if (!$this->isEmpty($child)) return false; - } + protected function isEmpty($block) { + if (empty($block->lines)) { + foreach ($block->children as $child) { + if (!$this->isEmpty($child)) return false; + } - return true; - } - return false; - } + return true; + } + return false; + } - public function block($block) { - if ($this->isEmpty($block)) return; + public function block($block) { + if ($this->isEmpty($block)) return; - $inner = $pre = $this->indentStr(); + $inner = $pre = $this->indentStr(); - $isSingle = !$this->disableSingle && - is_null($block->type) && count($block->lines) == 1; + $isSingle = !$this->disableSingle && + is_null($block->type) && count($block->lines) == 1; - if (!empty($block->selectors)) { - $this->indentLevel++; + if (!empty($block->selectors)) { + $this->indentLevel++; - if ($this->breakSelectors) { - $selectorSeparator = $this->selectorSeparator . $this->break . $pre; - } else { - $selectorSeparator = $this->selectorSeparator; - } + if ($this->breakSelectors) { + $selectorSeparator = $this->selectorSeparator . $this->break . $pre; + } else { + $selectorSeparator = $this->selectorSeparator; + } - echo $pre . - implode($selectorSeparator, $block->selectors); - if ($isSingle) { - echo $this->openSingle; - $inner = ""; - } else { - echo $this->open . $this->break; - $inner = $this->indentStr(); - } + echo $pre . + implode($selectorSeparator, $block->selectors); + if ($isSingle) { + echo $this->openSingle; + $inner = ""; + } else { + echo $this->open . $this->break; + $inner = $this->indentStr(); + } - } + } - if (!empty($block->lines)) { - $glue = $this->break.$inner; - echo $inner . implode($glue, $block->lines); - if (!$isSingle && !empty($block->children)) { - echo $this->break; - } - } + if (!empty($block->lines)) { + $glue = $this->break.$inner; + echo $inner . implode($glue, $block->lines); + if (!$isSingle && !empty($block->children)) { + echo $this->break; + } + } - foreach ($block->children as $child) { - $this->block($child); - } + foreach ($block->children as $child) { + $this->block($child); + } - if (!empty($block->selectors)) { - if (!$isSingle && empty($block->children)) echo $this->break; + if (!empty($block->selectors)) { + if (!$isSingle && empty($block->children)) echo $this->break; - if ($isSingle) { - echo $this->closeSingle . $this->break; - } else { - echo $pre . $this->close . $this->break; - } + if ($isSingle) { + echo $this->closeSingle . $this->break; + } else { + echo $pre . $this->close . $this->break; + } - $this->indentLevel--; - } - } + $this->indentLevel--; + } + } } class lessc_formatter_compressed extends lessc_formatter_classic { - public $disableSingle = true; - public $open = "{"; - public $selectorSeparator = ","; - public $assignSeparator = ":"; - public $break = ""; - public $compressColors = true; + public $disableSingle = true; + public $open = "{"; + public $selectorSeparator = ","; + public $assignSeparator = ":"; + public $break = ""; + public $compressColors = true; - public function indentStr($n = 0) { - return ""; - } + public function indentStr($n = 0) { + return ""; + } } class lessc_formatter_lessjs extends lessc_formatter_classic { - public $disableSingle = true; - public $breakSelectors = true; - public $assignSeparator = ": "; - public $selectorSeparator = ","; + public $disableSingle = true; + public $breakSelectors = true; + public $assignSeparator = ": "; + public $selectorSeparator = ","; } - - diff --git a/libraries/vendor/leafo/lessphp/lessify b/libraries/vendor/leafo/lessphp/lessify index becc53887bc..b0f4e759402 100644 --- a/libraries/vendor/leafo/lessphp/lessify +++ b/libraries/vendor/leafo/lessphp/lessify @@ -1,23 +1,21 @@ -#!/usr/bin/php +#!/usr/bin/env php parse(); +try { + $parser = new lessify($fname); + echo $parser->parse(); } catch (exception $e) { - exit("Fatal error: ".$e->getMessage()."\n"); + exit("Fatal error: ".$e->getMessage()."\n"); } - - diff --git a/libraries/vendor/leafo/lessphp/lessify.inc.php b/libraries/vendor/leafo/lessphp/lessify.inc.php index 91c144230c5..88e7ceb7544 100644 --- a/libraries/vendor/leafo/lessphp/lessify.inc.php +++ b/libraries/vendor/leafo/lessphp/lessify.inc.php @@ -21,427 +21,431 @@ require "lessc.inc.php"; // class easyparse { - var $buffer; - var $count; + public $buffer; + public $count; - function __construct($str) { - $this->count = 0; - $this->buffer = trim($str); - } + public function __construct($str) { + $this->count = 0; + $this->buffer = trim($str); + } - function seek($where = null) { - if ($where === null) return $this->count; - else $this->count = $where; - return true; - } + public function seek($where = null) { + if ($where === null) { + return $this->count; + } + $this->count = $where; + return true; + } - function preg_quote($what) { - return preg_quote($what, '/'); - } + public function preg_quote($what) { + return preg_quote($what, '/'); + } - function match($regex, &$out, $eatWhitespace = true) { - $r = '/'.$regex.($eatWhitespace ? '\s*' : '').'/Ais'; - if (preg_match($r, $this->buffer, $out, null, $this->count)) { - $this->count += strlen($out[0]); - return true; - } - return false; - } + public function match($regex, &$out, $eatWhitespace = true) { + $r = '/'.$regex.($eatWhitespace ? '\s*' : '').'/Ais'; + if (preg_match($r, $this->buffer, $out, null, $this->count)) { + $this->count += strlen($out[0]); + return true; + } + return false; + } - function literal($what, $eatWhitespace = true) { - // this is here mainly prevent notice from { } string accessor - if ($this->count >= strlen($this->buffer)) return false; + public function literal($what, $eatWhitespace = true) { + // this is here mainly prevent notice from { } string accessor + if ($this->count >= strlen($this->buffer)) return false; - // shortcut on single letter - if (!$eatWhitespace and strlen($what) == 1) { - if ($this->buffer{$this->count} == $what) { - $this->count++; - return true; - } - else return false; - } + // shortcut on single letter + if (!$eatWhitespace and strlen($what) === 1) { + if ($this->buffer{$this->count} == $what) { + $this->count++; + return true; + } + return false; + } - return $this->match($this->preg_quote($what), $m, $eatWhitespace); - } + return $this->match($this->preg_quote($what), $m, $eatWhitespace); + } } class tagparse extends easyparse { - static private $combinators = null; - static private $match_opts = null; + private static $combinators = null; + private static $match_opts = null; - function parse() { - if (empty(self::$combinators)) { - self::$combinators = '('.implode('|', array_map(array($this, 'preg_quote'), - array('+', '>', '~'))).')'; - self::$match_opts = '('.implode('|', array_map(array($this, 'preg_quote'), - array('=', '~=', '|=', '$=', '*='))).')'; - } + public function parse() { + if (empty(self::$combinators)) { + self::$combinators = '(' . implode('|', array_map(array($this, 'preg_quote'), + array('+', '>', '~'))).')'; + self::$match_opts = '(' . implode('|', array_map(array($this, 'preg_quote'), + array('=', '~=', '|=', '$=', '*='))) . ')'; + } - // crush whitespace - $this->buffer = preg_replace('/\s+/', ' ', $this->buffer).' '; + // crush whitespace + $this->buffer = preg_replace('/\s+/', ' ', $this->buffer) . ' '; - $tags = array(); - while ($this->tag($t)) $tags[] = $t; + $tags = array(); + while ($this->tag($t)) { + $tags[] = $t; + } - return $tags; - } + return $tags; + } - static function compileString($string) { - list(, $delim, $str) = $string; - $str = str_replace($delim, "\\".$delim, $str); - $str = str_replace("\n", "\\\n", $str); - return $delim.$str.$delim; - } + public static function compileString($string) { + list(, $delim, $str) = $string; + $str = str_replace($delim, "\\" . $delim, $str); + $str = str_replace("\n", "\\\n", $str); + return $delim . $str . $delim; + } - static function compilePaths($paths) { - return implode(', ', array_map(array('self', 'compilePath'), $paths)); - } + public static function compilePaths($paths) { + return implode(', ', array_map(array('self', 'compilePath'), $paths)); + } - // array of tags - static function compilePath($path) { - return implode(' ', array_map(array('self', 'compileTag'), $path)); - } + // array of tags + public static function compilePath($path) { + return implode(' ', array_map(array('self', 'compileTag'), $path)); + } - static function compileTag($tag) { - ob_start(); - if (isset($tag['comb'])) echo $tag['comb']." "; - if (isset($tag['front'])) echo $tag['front']; - if (isset($tag['attr'])) { - echo '['.$tag['attr']; - if (isset($tag['op'])) { - echo $tag['op'].$tag['op_value']; - } - echo ']'; - } - return ob_get_clean(); - } + public static function compileTag($tag) { + ob_start(); + if (isset($tag['comb'])) echo $tag['comb'] . " "; + if (isset($tag['front'])) echo $tag['front']; + if (isset($tag['attr'])) { + echo '[' . $tag['attr']; + if (isset($tag['op'])) { + echo $tag['op'] . $tag['op_value']; + } + echo ']'; + } + return ob_get_clean(); + } - function string(&$out) { - $s = $this->seek(); + public function string(&$out) { + $s = $this->seek(); - if ($this->literal('"')) { - $delim = '"'; - } elseif ($this->literal("'")) { - $delim = "'"; - } else { - return false; - } + if ($this->literal('"')) { + $delim = '"'; + } elseif ($this->literal("'")) { + $delim = "'"; + } else { + return false; + } - while (true) { - // step through letters looking for either end or escape - $buff = ""; - $escapeNext = false; - $finished = false; - for ($i = $this->count; $i < strlen($this->buffer); $i++) { - $char = $this->buffer[$i]; - switch ($char) { - case $delim: - if ($escapeNext) { - $buff .= $char; - $escapeNext = false; - break; - } - $finished = true; - break 2; - case "\\": - if ($escapeNext) { - $buff .= $char; - $escapeNext = false; - } else { - $escapeNext = true; - } - break; - case "\n": - if (!$escapeNext) { - break 3; - } + while (true) { + // step through letters looking for either end or escape + $buff = ""; + $escapeNext = false; + $finished = false; + for ($i = $this->count; $i < strlen($this->buffer); $i++) { + $char = $this->buffer[$i]; + switch ($char) { + case $delim: + if ($escapeNext) { + $buff .= $char; + $escapeNext = false; + break; + } + $finished = true; + break 2; + case "\\": + if ($escapeNext) { + $buff .= $char; + $escapeNext = false; + } else { + $escapeNext = true; + } + break; + case "\n": + if (!$escapeNext) { + break 3; + } - $buff .= $char; - $escapeNext = false; - break; - default: - if ($escapeNext) { - $buff .= "\\"; - $escapeNext = false; - } - $buff .= $char; - } - } - if (!$finished) break; - $out = array('string', $delim, $buff); - $this->seek($i+1); - return true; - } + $buff .= $char; + $escapeNext = false; + break; + default: + if ($escapeNext) { + $buff .= "\\"; + $escapeNext = false; + } + $buff .= $char; + } + } + if (!$finished) break; + $out = array('string', $delim, $buff); + $this->seek($i+1); + return true; + } - $this->seek($s); - return false; - } + $this->seek($s); + return false; + } - function tag(&$out) { - $s = $this->seek(); - $tag = array(); - if ($this->combinator($op)) $tag['comb'] = $op; + public function tag(&$out) { + $s = $this->seek(); + $tag = array(); + if ($this->combinator($op)) $tag['comb'] = $op; - if (!$this->match('(.*?)( |$|\[|'.self::$combinators.')', $match)) { - $this->seek($s); - return false; - } + if (!$this->match('(.*?)( |$|\[|'.self::$combinators.')', $match)) { + $this->seek($s); + return false; + } - if (!empty($match[3])) { - // give back combinator - $this->count-=strlen($match[3]); - } + if (!empty($match[3])) { + // give back combinator + $this->count-=strlen($match[3]); + } - if (!empty($match[1])) $tag['front'] = $match[1]; + if (!empty($match[1])) $tag['front'] = $match[1]; - if ($match[2] == '[') { - if ($this->ident($i)) { - $tag['attr'] = $i; + if ($match[2] == '[') { + if ($this->ident($i)) { + $tag['attr'] = $i; - if ($this->match(self::$match_opts, $m) && $this->value($v)) { - $tag['op'] = $m[1]; - $tag['op_value'] = $v; - } + if ($this->match(self::$match_opts, $m) && $this->value($v)) { + $tag['op'] = $m[1]; + $tag['op_value'] = $v; + } - if ($this->literal(']')) { - $out = $tag; - return true; - } - } - } elseif (isset($tag['front'])) { - $out = $tag; - return true; - } + if ($this->literal(']')) { + $out = $tag; + return true; + } + } + } elseif (isset($tag['front'])) { + $out = $tag; + return true; + } - $this->seek($s); - return false; - } + $this->seek($s); + return false; + } - function ident(&$out) { - // [-]?{nmstart}{nmchar}* - // nmstart: [_a-z]|{nonascii}|{escape} - // nmchar: [_a-z0-9-]|{nonascii}|{escape} - if ($this->match('(-?[_a-z][_\w]*)', $m)) { - $out = $m[1]; - return true; - } - return false; - } + public function ident(&$out) { + // [-]?{nmstart}{nmchar}* + // nmstart: [_a-z]|{nonascii}|{escape} + // nmchar: [_a-z0-9-]|{nonascii}|{escape} + if ($this->match('(-?[_a-z][_\w]*)', $m)) { + $out = $m[1]; + return true; + } + return false; + } - function value(&$out) { - if ($this->string($str)) { - $out = $this->compileString($str); - return true; - } elseif ($this->ident($id)) { - $out = $id; - return true; - } - return false; - } + public function value(&$out) { + if ($this->string($str)) { + $out = $this->compileString($str); + return true; + } elseif ($this->ident($id)) { + $out = $id; + return true; + } + return false; + } - function combinator(&$op) { - if ($this->match(self::$combinators, $m)) { - $op = $m[1]; - return true; - } - return false; - } + public function combinator(&$op) { + if ($this->match(self::$combinators, $m)) { + $op = $m[1]; + return true; + } + return false; + } } class nodecounter { - var $count = 0; - var $children = array(); + public $count = 0; + public $children = array(); - var $name; - var $child_blocks; - var $the_block; + public $name; + public $child_blocks; + public $the_block; - function __construct($name) { - $this->name = $name; - } + public function __construct($name) { + $this->name = $name; + } - function dump($stack = null) { - if (is_null($stack)) $stack = array(); - $stack[] = $this->getName(); - echo implode(' -> ', $stack)." ($this->count)\n"; - foreach ($this->children as $child) { - $child->dump($stack); - } - } + public function dump($stack = null) { + if (is_null($stack)) $stack = array(); + $stack[] = $this->getName(); + echo implode(' -> ', $stack) . " ($this->count)\n"; + foreach ($this->children as $child) { + $child->dump($stack); + } + } - static function compileProperties($c, $block) { - foreach($block as $name => $value) { - if ($c->isProperty($name, $value)) { - echo $c->compileProperty($name, $value)."\n"; - } - } - } + public static function compileProperties($c, $block) { + foreach ($block as $name => $value) { + if ($c->isProperty($name, $value)) { + echo $c->compileProperty($name, $value) . "\n"; + } + } + } - function compile($c, $path = null) { - if (is_null($path)) $path = array(); - $path[] = $this->name; + public function compile($c, $path = null) { + if (is_null($path)) $path = array(); + $path[] = $this->name; - $isVisible = !is_null($this->the_block) || !is_null($this->child_blocks); + $isVisible = !is_null($this->the_block) || !is_null($this->child_blocks); - if ($isVisible) { - echo $c->indent(implode(' ', $path).' {'); - $c->indentLevel++; - $path = array(); + if ($isVisible) { + echo $c->indent(implode(' ', $path) . ' {'); + $c->indentLevel++; + $path = array(); - if ($this->the_block) { - $this->compileProperties($c, $this->the_block); - } + if ($this->the_block) { + $this->compileProperties($c, $this->the_block); + } - if ($this->child_blocks) { - foreach ($this->child_blocks as $block) { - echo $c->indent(tagparse::compilePaths($block['__tags']).' {'); - $c->indentLevel++; - $this->compileProperties($c, $block); - $c->indentLevel--; - echo $c->indent('}'); - } - } - } + if ($this->child_blocks) { + foreach ($this->child_blocks as $block) { + echo $c->indent(tagparse::compilePaths($block['__tags']).' {'); + $c->indentLevel++; + $this->compileProperties($c, $block); + $c->indentLevel--; + echo $c->indent('}'); + } + } + } - // compile child nodes - foreach($this->children as $node) { - $node->compile($c, $path); - } + // compile child nodes + foreach ($this->children as $node) { + $node->compile($c, $path); + } - if ($isVisible) { - $c->indentLevel--; - echo $c->indent('}'); - } + if ($isVisible) { + $c->indentLevel--; + echo $c->indent('}'); + } - } + } - function getName() { - if (is_null($this->name)) return "[root]"; - else return $this->name; - } + public function getName() { + if (is_null($this->name)) return "[root]"; + else return $this->name; + } - function getNode($name) { - if (!isset($this->children[$name])) { - $this->children[$name] = new nodecounter($name); - } + public function getNode($name) { + if (!isset($this->children[$name])) { + $this->children[$name] = new nodecounter($name); + } - return $this->children[$name]; - } + return $this->children[$name]; + } - function findNode($path) { - $current = $this; - for ($i = 0; $i < count($path); $i++) { - $t = tagparse::compileTag($path[$i]); - $current = $current->getNode($t); - } + public function findNode($path) { + $current = $this; + for ($i = 0; $i < count($path); $i++) { + $t = tagparse::compileTag($path[$i]); + $current = $current->getNode($t); + } - return $current; - } + return $current; + } - function addBlock($path, $block) { - $node = $this->findNode($path); - if (!is_null($node->the_block)) throw new exception("can this happen?"); + public function addBlock($path, $block) { + $node = $this->findNode($path); + if (!is_null($node->the_block)) throw new exception("can this happen?"); - unset($block['__tags']); - $node->the_block = $block; - } + unset($block['__tags']); + $node->the_block = $block; + } - function addToNode($path, $block) { - $node = $this->findNode($path); - $node->child_blocks[] = $block; - } + public function addToNode($path, $block) { + $node = $this->findNode($path); + $node->child_blocks[] = $block; + } } /** * create a less file from a css file by combining blocks where appropriate */ class lessify extends lessc { - public function dump() { - print_r($this->env); - } + public function dump() { + print_r($this->env); + } - public function parse($str = null) { - $this->prepareParser($str ? $str : $this->buffer); - while (false !== $this->parseChunk()); + public function parse($str = null) { + $this->prepareParser($str ? $str : $this->buffer); + while (false !== $this->parseChunk()); - $root = new nodecounter(null); + $root = new nodecounter(null); - // attempt to preserve some of the block order - $order = array(); + // attempt to preserve some of the block order + $order = array(); - $visitedTags = array(); - foreach (end($this->env) as $name => $block) { - if (!$this->isBlock($name, $block)) continue; - if (isset($visitedTags[$name])) continue; + $visitedTags = array(); + foreach (end($this->env) as $name => $block) { + if (!$this->isBlock($name, $block)) continue; + if (isset($visitedTags[$name])) continue; - foreach ($block['__tags'] as $t) { - $visitedTags[$t] = true; - } + foreach ($block['__tags'] as $t) { + $visitedTags[$t] = true; + } - // skip those with more than 1 - if (count($block['__tags']) == 1) { - $p = new tagparse(end($block['__tags'])); - $path = $p->parse(); - $root->addBlock($path, $block); - $order[] = array('compressed', $path, $block); - continue; - } else { - $common = null; - $paths = array(); - foreach ($block['__tags'] as $rawtag) { - $p = new tagparse($rawtag); - $paths[] = $path = $p->parse(); - if (is_null($common)) $common = $path; - else { - $new_common = array(); - foreach ($path as $tag) { - $head = array_shift($common); - if ($tag == $head) { - $new_common[] = $head; - } else break; - } - $common = $new_common; - if (empty($common)) { - // nothing in common - break; - } - } - } + // skip those with more than 1 + if (count($block['__tags']) == 1) { + $p = new tagparse(end($block['__tags'])); + $path = $p->parse(); + $root->addBlock($path, $block); + $order[] = array('compressed', $path, $block); + continue; + } else { + $common = null; + $paths = array(); + foreach ($block['__tags'] as $rawtag) { + $p = new tagparse($rawtag); + $paths[] = $path = $p->parse(); + if (is_null($common)) $common = $path; + else { + $new_common = array(); + foreach ($path as $tag) { + $head = array_shift($common); + if ($tag == $head) { + $new_common[] = $head; + } else break; + } + $common = $new_common; + if (empty($common)) { + // nothing in common + break; + } + } + } - if (!empty($common)) { - $new_paths = array(); - foreach ($paths as $p) $new_paths[] = array_slice($p, count($common)); - $block['__tags'] = $new_paths; - $root->addToNode($common, $block); - $order[] = array('compressed', $common, $block); - continue; - } + if (!empty($common)) { + $new_paths = array(); + foreach ($paths as $p) $new_paths[] = array_slice($p, count($common)); + $block['__tags'] = $new_paths; + $root->addToNode($common, $block); + $order[] = array('compressed', $common, $block); + continue; + } - } + } - $order[] = array('none', $block['__tags'], $block); - } + $order[] = array('none', $block['__tags'], $block); + } - $compressed = $root->children; - foreach ($order as $item) { - list($type, $tags, $block) = $item; - if ($type == 'compressed') { - $top = tagparse::compileTag(reset($tags)); - if (isset($compressed[$top])) { - $compressed[$top]->compile($this); - unset($compressed[$top]); - } - } else { - echo $this->indent(implode(', ', $tags).' {'); - $this->indentLevel++; - nodecounter::compileProperties($this, $block); - $this->indentLevel--; - echo $this->indent('}'); - } - } - } + $compressed = $root->children; + foreach ($order as $item) { + list($type, $tags, $block) = $item; + if ($type == 'compressed') { + $top = tagparse::compileTag(reset($tags)); + if (isset($compressed[$top])) { + $compressed[$top]->compile($this); + unset($compressed[$top]); + } + } else { + echo $this->indent(implode(', ', $tags).' {'); + $this->indentLevel++; + nodecounter::compileProperties($this, $block); + $this->indentLevel--; + echo $this->indent('}'); + } + } + } } diff --git a/libraries/vendor/leafo/lessphp/phpunit.xml.dist b/libraries/vendor/leafo/lessphp/phpunit.xml.dist new file mode 100644 index 00000000000..e1c737f4bf5 --- /dev/null +++ b/libraries/vendor/leafo/lessphp/phpunit.xml.dist @@ -0,0 +1,8 @@ + + + + + ./tests + + + diff --git a/libraries/vendor/leafo/lessphp/plessc b/libraries/vendor/leafo/lessphp/plessc index 1871dc77b89..1745315fcf1 100644 --- a/libraries/vendor/leafo/lessphp/plessc +++ b/libraries/vendor/leafo/lessphp/plessc @@ -246,5 +246,3 @@ try { err($fa.$ex->getMessage()); exit(1); } - -?> diff --git a/libraries/vendor/leafo/lessphp/ruleset.xml b/libraries/vendor/leafo/lessphp/ruleset.xml new file mode 100644 index 00000000000..802e79c6321 --- /dev/null +++ b/libraries/vendor/leafo/lessphp/ruleset.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . + + + vendor + From a5b37ed5b199b7489e9f91b35a47209947d41c02 Mon Sep 17 00:00:00 2001 From: Harald Leithner Date: Thu, 19 Nov 2020 16:18:38 +0100 Subject: [PATCH 19/31] Prepare Joomla! 3.9.23-rc --- administrator/language/en-GB/en-GB.xml | 2 +- administrator/language/en-GB/install.xml | 2 +- administrator/manifests/files/joomla.xml | 4 ++-- administrator/manifests/packages/pkg_en-GB.xml | 2 +- installation/language/en-GB/en-GB.xml | 2 +- language/en-GB/en-GB.xml | 2 +- language/en-GB/install.xml | 2 +- libraries/src/Version.php | 10 +++++----- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/administrator/language/en-GB/en-GB.xml b/administrator/language/en-GB/en-GB.xml index 934b21688ac..77edab773f9 100644 --- a/administrator/language/en-GB/en-GB.xml +++ b/administrator/language/en-GB/en-GB.xml @@ -2,7 +2,7 @@ English (en-GB) 3.9.23 - October 2020 + November 2020 Joomla! Project admin@joomla.org www.joomla.org diff --git a/administrator/language/en-GB/install.xml b/administrator/language/en-GB/install.xml index 7bfc34a7ceb..291fcb75e89 100644 --- a/administrator/language/en-GB/install.xml +++ b/administrator/language/en-GB/install.xml @@ -3,7 +3,7 @@ English (en-GB) en-GB 3.9.23 - October 2020 + November 2020 Joomla! Project admin@joomla.org www.joomla.org diff --git a/administrator/manifests/files/joomla.xml b/administrator/manifests/files/joomla.xml index d55ecc96a09..8cf93d1b1c2 100644 --- a/administrator/manifests/files/joomla.xml +++ b/administrator/manifests/files/joomla.xml @@ -6,8 +6,8 @@ www.joomla.org (C) 2005 - 2020 Open Source Matters. All rights reserved GNU General Public License version 2 or later; see LICENSE.txt - 3.9.23-dev - October 2020 + 3.9.23-rc + November 2020 FILES_JOOMLA_XML_DESCRIPTION administrator/components/com_admin/script.php diff --git a/administrator/manifests/packages/pkg_en-GB.xml b/administrator/manifests/packages/pkg_en-GB.xml index 8d1a15ad029..3f2bc4a9bb3 100644 --- a/administrator/manifests/packages/pkg_en-GB.xml +++ b/administrator/manifests/packages/pkg_en-GB.xml @@ -3,7 +3,7 @@ English (en-GB) Language Pack en-GB 3.9.23.1 - October 2020 + November 2020 Joomla! Project admin@joomla.org www.joomla.org diff --git a/installation/language/en-GB/en-GB.xml b/installation/language/en-GB/en-GB.xml index 015a4ef072f..1032bc0b1c4 100644 --- a/installation/language/en-GB/en-GB.xml +++ b/installation/language/en-GB/en-GB.xml @@ -4,7 +4,7 @@ client="installation"> English (United Kingdom) 3.9.23 - October 2020 + November 2020 Joomla! Project Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/language/en-GB/en-GB.xml b/language/en-GB/en-GB.xml index e30812d3c3c..382b6067e90 100644 --- a/language/en-GB/en-GB.xml +++ b/language/en-GB/en-GB.xml @@ -2,7 +2,7 @@ English (en-GB) 3.9.23 - October 2020 + November 2020 Joomla! Project admin@joomla.org www.joomla.org diff --git a/language/en-GB/install.xml b/language/en-GB/install.xml index d3b62c7ebb0..798c615f84c 100644 --- a/language/en-GB/install.xml +++ b/language/en-GB/install.xml @@ -3,7 +3,7 @@ English (en-GB) en-GB 3.9.23 - October 2020 + November 2020 Joomla! Project admin@joomla.org www.joomla.org diff --git a/libraries/src/Version.php b/libraries/src/Version.php index fd319ad27ec..b6bdc65e7ce 100644 --- a/libraries/src/Version.php +++ b/libraries/src/Version.php @@ -60,7 +60,7 @@ final class Version * @var string * @since 3.8.0 */ - const EXTRA_VERSION = 'dev'; + const EXTRA_VERSION = 'rc'; /** * Release version. @@ -78,7 +78,7 @@ final class Version * @since 3.5 * @deprecated 4.0 Use separated version constants instead */ - const DEV_LEVEL = '23-dev'; + const DEV_LEVEL = '23-rc'; /** * Development status. @@ -86,7 +86,7 @@ final class Version * @var string * @since 3.5 */ - const DEV_STATUS = 'Development'; + const DEV_STATUS = 'Release Candidate'; /** * Build number. @@ -111,7 +111,7 @@ final class Version * @var string * @since 3.5 */ - const RELDATE = '5-October-2020'; + const RELDATE = '19-November-2020'; /** * Release time. @@ -119,7 +119,7 @@ final class Version * @var string * @since 3.5 */ - const RELTIME = '22:25'; + const RELTIME = '14:40'; /** * Release timezone. From 4c434000c9ba717602846a144b709e0a66a3631d Mon Sep 17 00:00:00 2001 From: Harald Leithner Date: Sat, 21 Nov 2020 10:51:47 +0100 Subject: [PATCH 20/31] Cleanup unnecessary files (#31440) * Cleanup unnecessary files * Update administrator/components/com_admin/script.php Co-authored-by: Richard Fath Co-authored-by: Richard Fath --- .gitignore | 6 + administrator/components/com_admin/script.php | 14 + composer.lock | 17 +- libraries/vendor/bin/lessify | 14 - libraries/vendor/bin/lessify.bat | 4 - libraries/vendor/bin/plessc | 14 - libraries/vendor/bin/plessc.bat | 4 - libraries/vendor/composer/ClassLoader.php | 2 +- libraries/vendor/composer/autoload_real.php | 3 + .../vendor/joomla/archive/.drone.jsonnet | 120 ------ libraries/vendor/joomla/archive/.drone.yml | 372 ----------------- libraries/vendor/joomla/string/.drone.jsonnet | 137 ------- libraries/vendor/joomla/string/.drone.yml | 373 ------------------ libraries/vendor/leafo/lessphp/.drone.yml | 346 ---------------- .../vendor/leafo/lessphp/phpunit.xml.dist | 8 - libraries/vendor/leafo/lessphp/ruleset.xml | 40 -- 16 files changed, 40 insertions(+), 1434 deletions(-) delete mode 100644 libraries/vendor/bin/lessify delete mode 100644 libraries/vendor/bin/lessify.bat delete mode 100644 libraries/vendor/bin/plessc delete mode 100644 libraries/vendor/bin/plessc.bat delete mode 100644 libraries/vendor/joomla/archive/.drone.jsonnet delete mode 100644 libraries/vendor/joomla/archive/.drone.yml delete mode 100644 libraries/vendor/joomla/string/.drone.jsonnet delete mode 100644 libraries/vendor/joomla/string/.drone.yml delete mode 100644 libraries/vendor/leafo/lessphp/.drone.yml delete mode 100644 libraries/vendor/leafo/lessphp/phpunit.xml.dist delete mode 100644 libraries/vendor/leafo/lessphp/ruleset.xml diff --git a/.gitignore b/.gitignore index 2cc459232af..53135183ab3 100644 --- a/.gitignore +++ b/.gitignore @@ -70,6 +70,7 @@ Desktop.ini # Extra files installed by Composer not needed in the CMS environment # This should only ignore files like unit testing or READMEs, production # code must remain to ensure all libraries properly function +/libraries/vendor/bin /libraries/vendor/brumann/polyfill-unserialize/.gitattributes /libraries/vendor/brumann/polyfill-unserialize/.gitignore /libraries/vendor/brumann/polyfill-unserialize/.travis.yml @@ -97,6 +98,8 @@ Desktop.ini /libraries/vendor/joomla/*/.github /libraries/vendor/joomla/*/.gitignore /libraries/vendor/joomla/*/.gitmodules +/libraries/vendor/joomla/*/.drone.jsonnet +/libraries/vendor/joomla/*/.drone.yml /libraries/vendor/joomla/*/docs /libraries/vendor/joomla/*/Tests /libraries/vendor/joomla/*/vendor @@ -118,12 +121,15 @@ Desktop.ini /libraries/vendor/joomla/session/Joomla/Session/ruleset.xml /libraries/vendor/leafo/lessphp/docs /libraries/vendor/leafo/lessphp/tests +/libraries/vendor/leafo/lessphp/.drone.yml /libraries/vendor/leafo/lessphp/.gitignore /libraries/vendor/leafo/lessphp/.travis.yml /libraries/vendor/leafo/lessphp/composer.json /libraries/vendor/leafo/lessphp/Makefile /libraries/vendor/leafo/lessphp/package.sh +/libraries/vendor/leafo/lessphp/phpunit.xml.dist /libraries/vendor/leafo/lessphp/README.md +/libraries/vendor/leafo/lessphp/ruleset.xml /libraries/vendor/paragonie/random_compat/.gitignore /libraries/vendor/paragonie/random_compat/.scrutinizer.yml /libraries/vendor/paragonie/random_compat/.travis.yml diff --git a/administrator/components/com_admin/script.php b/administrator/components/com_admin/script.php index 5fbfe07dac7..db7b1840996 100644 --- a/administrator/components/com_admin/script.php +++ b/administrator/components/com_admin/script.php @@ -2039,6 +2039,20 @@ class JoomlaInstallerScript // Joomla! 3.9.23 '/.drone.jsonnet', + + // Joomla! added by the 3.9.23-rc1 + '/libraries/vendor/bin/lessify', + '/libraries/vendor/bin/lessify.bat', + '/libraries/vendor/bin/plessc', + '/libraries/vendor/bin/plessc.bat', + '/libraries/vendor/joomla/archive/.drone.jsonnet', + '/libraries/vendor/joomla/archive/.drone.yml', + '/libraries/vendor/joomla/string/.drone.jsonnet', + '/libraries/vendor/joomla/string/.drone.yml', + '/libraries/vendor/leafo/lessphp/.drone.yml', + '/libraries/vendor/leafo/lessphp/phpunit.xml.dist', + '/libraries/vendor/leafo/lessphp/ruleset.xml', + ); // TODO There is an issue while deleting folders using the ftp mode diff --git a/composer.lock b/composer.lock index acc95fd2283..f831873fff5 100644 --- a/composer.lock +++ b/composer.lock @@ -3300,6 +3300,20 @@ "portable", "shim" ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-07-14T12:35:20+00:00" }, { @@ -3414,5 +3428,6 @@ "platform-dev": [], "platform-overrides": { "php": "5.3.10" - } + }, + "plugin-api-version": "1.1.0" } diff --git a/libraries/vendor/bin/lessify b/libraries/vendor/bin/lessify deleted file mode 100644 index 3b59c0f7acc..00000000000 --- a/libraries/vendor/bin/lessify +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env sh - -dir=$(cd "${0%[/\\]*}" > /dev/null; cd "../leafo/lessphp" && pwd) - -if [ -d /proc/cygdrive ]; then - case $(which php) in - $(readlink -n /proc/cygdrive)/*) - # We are in Cygwin using Windows php, so the path must be translated - dir=$(cygpath -m "$dir"); - ;; - esac -fi - -"${dir}/lessify" "$@" diff --git a/libraries/vendor/bin/lessify.bat b/libraries/vendor/bin/lessify.bat deleted file mode 100644 index c305a2b09d2..00000000000 --- a/libraries/vendor/bin/lessify.bat +++ /dev/null @@ -1,4 +0,0 @@ -@ECHO OFF -setlocal DISABLEDELAYEDEXPANSION -SET BIN_TARGET=%~dp0/../leafo/lessphp/lessify -php "%BIN_TARGET%" %* diff --git a/libraries/vendor/bin/plessc b/libraries/vendor/bin/plessc deleted file mode 100644 index fbfc7c6f66b..00000000000 --- a/libraries/vendor/bin/plessc +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env sh - -dir=$(cd "${0%[/\\]*}" > /dev/null; cd "../leafo/lessphp" && pwd) - -if [ -d /proc/cygdrive ]; then - case $(which php) in - $(readlink -n /proc/cygdrive)/*) - # We are in Cygwin using Windows php, so the path must be translated - dir=$(cygpath -m "$dir"); - ;; - esac -fi - -"${dir}/plessc" "$@" diff --git a/libraries/vendor/bin/plessc.bat b/libraries/vendor/bin/plessc.bat deleted file mode 100644 index 6dcef5d023f..00000000000 --- a/libraries/vendor/bin/plessc.bat +++ /dev/null @@ -1,4 +0,0 @@ -@ECHO OFF -setlocal DISABLEDELAYEDEXPANSION -SET BIN_TARGET=%~dp0/../leafo/lessphp/plessc -php "%BIN_TARGET%" %* diff --git a/libraries/vendor/composer/ClassLoader.php b/libraries/vendor/composer/ClassLoader.php index fce8549f078..03b9bb9c40c 100644 --- a/libraries/vendor/composer/ClassLoader.php +++ b/libraries/vendor/composer/ClassLoader.php @@ -60,7 +60,7 @@ class ClassLoader public function getPrefixes() { if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', $this->prefixesPsr0); + return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); } return array(); diff --git a/libraries/vendor/composer/autoload_real.php b/libraries/vendor/composer/autoload_real.php index f3a91b2e20d..2c18d3f8d19 100644 --- a/libraries/vendor/composer/autoload_real.php +++ b/libraries/vendor/composer/autoload_real.php @@ -13,6 +13,9 @@ class ComposerAutoloaderInit205c915b9c7d3e718e7c95793ee67ffe } } + /** + * @return \Composer\Autoload\ClassLoader + */ public static function getLoader() { if (null !== self::$loader) { diff --git a/libraries/vendor/joomla/archive/.drone.jsonnet b/libraries/vendor/joomla/archive/.drone.jsonnet deleted file mode 100644 index 497f9d1eeab..00000000000 --- a/libraries/vendor/joomla/archive/.drone.jsonnet +++ /dev/null @@ -1,120 +0,0 @@ -local volumes = [ - { - name: "composer-cache", - path: "/tmp/composer-cache", - }, -]; - -local hostvolumes = [ - { - name: "composer-cache", - host: {path: "/tmp/composer-cache"} - }, -]; - -local composer(phpversion, params) = { - name: "composer", - image: "joomlaprojects/docker-images:php" + phpversion, - volumes: volumes, - commands: [ - "php -v", - "composer update " + params - ] -}; - -local phpunit(phpversion) = { - name: "PHPUnit", - image: "joomlaprojects/docker-images:php" + phpversion, - [if phpversion == "8.0" then "failure"]: "ignore", - commands: ["vendor/bin/phpunit"] -}; - -local pipeline(name, phpversion, params) = { - kind: "pipeline", - name: "PHP " + name, - volumes: hostvolumes, - steps: [ - composer(phpversion, params), - phpunit(phpversion) - ], -}; - -[ - { - kind: "pipeline", - name: "Codequality", - volumes: hostvolumes, - steps: [ - { - name: "composer", - image: "joomlaprojects/docker-images:php7.4", - volumes: volumes, - commands: [ - "php -v", - "composer update", - "composer require phpmd/phpmd phpstan/phpstan" - ] - }, - { - name: "phpcs", - image: "joomlaprojects/docker-images:php7.4", - depends: [ "composer" ], - commands: [ - "vendor/bin/phpcs --config-set installed_paths vendor/joomla/coding-standards", - "vendor/bin/phpcs -p --report=full --extensions=php --standard=ruleset.xml src/" - ] - }, - { - name: "phpmd", - image: "joomlaprojects/docker-images:php7.4", - depends: [ "composer" ], - failure: "ignore", - commands: [ - "vendor/bin/phpmd src text cleancode", - "vendor/bin/phpmd src text codesize", - "vendor/bin/phpmd src text controversial", - "vendor/bin/phpmd src text design", - "vendor/bin/phpmd src text unusedcode", - ] - }, - { - name: "phpstan", - image: "joomlaprojects/docker-images:php7.4", - depends: [ "composer" ], - failure: "ignore", - commands: [ - "vendor/bin/phpstan analyse src", - ] - }, - { - name: "phploc", - image: "joomlaprojects/docker-images:php7.4", - depends: [ "composer" ], - failure: "ignore", - commands: [ - "phploc src", - ] - }, - { - name: "phpcpd", - image: "joomlaprojects/docker-images:php7.4", - depends: [ "composer" ], - failure: "ignore", - commands: [ - "phpcpd src", - ] - } - ] - }, - pipeline("5.3 lowest", "5.3", "--prefer-stable --prefer-lowest"), - pipeline("5.3", "5.3", "--prefer-stable"), - pipeline("5.4", "5.4", "--prefer-stable"), - pipeline("5.5", "5.5", "--prefer-stable"), - pipeline("5.6", "5.6", "--prefer-stable"), - pipeline("7.0", "7.0", "--prefer-stable"), - pipeline("7.1", "7.1", "--prefer-stable"), - pipeline("7.2", "7.2", "--prefer-stable"), - pipeline("7.3", "7.3", "--prefer-stable"), - pipeline("7.4", "7.4", "--prefer-stable"), - pipeline("8.0", "8.0", "--ignore-platform-reqs --prefer-stable") -] diff --git a/libraries/vendor/joomla/archive/.drone.yml b/libraries/vendor/joomla/archive/.drone.yml deleted file mode 100644 index 0afcc78ba30..00000000000 --- a/libraries/vendor/joomla/archive/.drone.yml +++ /dev/null @@ -1,372 +0,0 @@ ---- -kind: pipeline -name: Codequality - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php7.4 - commands: - - php -v - - composer update - - composer require phpmd/phpmd phpstan/phpstan - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: phpcs - image: joomlaprojects/docker-images:php7.4 - commands: - - vendor/bin/phpcs --config-set installed_paths vendor/joomla/coding-standards - - vendor/bin/phpcs -p --report=full --extensions=php --standard=ruleset.xml src/ - -- name: phpmd - image: joomlaprojects/docker-images:php7.4 - commands: - - vendor/bin/phpmd src text cleancode - - vendor/bin/phpmd src text codesize - - vendor/bin/phpmd src text controversial - - vendor/bin/phpmd src text design - - vendor/bin/phpmd src text unusedcode - failure: ignore - -- name: phpstan - image: joomlaprojects/docker-images:php7.4 - commands: - - vendor/bin/phpstan analyse src - failure: ignore - -- name: phploc - image: joomlaprojects/docker-images:php7.4 - commands: - - phploc src - failure: ignore - -- name: phpcpd - image: joomlaprojects/docker-images:php7.4 - commands: - - phpcpd src - failure: ignore - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 5.3 lowest - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php5.3 - commands: - - php -v - - composer update --prefer-stable --prefer-lowest - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php5.3 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 5.3 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php5.3 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php5.3 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 5.4 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php5.4 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php5.4 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 5.5 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php5.5 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php5.5 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 5.6 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php5.6 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php5.6 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 7.0 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php7.0 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php7.0 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 7.1 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php7.1 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php7.1 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 7.2 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php7.2 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php7.2 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 7.3 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php7.3 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php7.3 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 7.4 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php7.4 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php7.4 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 8.0 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php8.0 - commands: - - php -v - - composer update --ignore-platform-reqs --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php8.0 - commands: - - vendor/bin/phpunit - failure: ignore - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: signature -hmac: e5ae92df3344314b0bf189cc6e5bee40abc35e50f343368994d6be854a050272 - -... diff --git a/libraries/vendor/joomla/string/.drone.jsonnet b/libraries/vendor/joomla/string/.drone.jsonnet deleted file mode 100644 index 872ba3fb4e4..00000000000 --- a/libraries/vendor/joomla/string/.drone.jsonnet +++ /dev/null @@ -1,137 +0,0 @@ -local volumes = [ - { - name: "composer-cache", - path: "/tmp/composer-cache", - }, -]; - -local hostvolumes = [ - { - name: "composer-cache", - host: {path: "/tmp/composer-cache"} - }, -]; - -local composer(phpversion, params) = { - name: "composer", - image: "joomlaprojects/docker-images:php" + phpversion, - volumes: volumes, - commands: [ - "php -v", - "composer update " + params, - ] -}; - -local phpunit(phpversion) = { - name: "PHPUnit", - image: "joomlaprojects/docker-images:php" + phpversion, - [if phpversion == "8.0" then "failure"]: "ignore", - commands: ["vendor/bin/phpunit"] -}; - -local pipeline(name, phpversion, params) = { - kind: "pipeline", - name: "PHP " + name, - volumes: hostvolumes, - steps: [ - composer(phpversion, params), - phpunit(phpversion) - ], -}; - -[ - { - kind: "pipeline", - name: "Codequality", - volumes: hostvolumes, - steps: [ - { - name: "composer", - image: "joomlaprojects/docker-images:php7.4", - volumes: volumes, - commands: [ - "php -v", - "composer update", - "composer require phpmd/phpmd phpstan/phpstan" - ] - }, - { - name: "phpcs", - image: "joomlaprojects/docker-images:php7.4", - depends: [ "composer" ], - commands: [ - "vendor/bin/phpcs --config-set installed_paths vendor/joomla/coding-standards", - "vendor/bin/phpcs -p --report=full --extensions=php --standard=ruleset.xml src/" - ] - }, - { - name: "phpmd", - image: "joomlaprojects/docker-images:php7.4", - depends: [ "composer" ], - failure: "ignore", - commands: [ - "vendor/bin/phpmd src text cleancode", - "vendor/bin/phpmd src text codesize", - "vendor/bin/phpmd src text controversial", - "vendor/bin/phpmd src text design", - "vendor/bin/phpmd src text unusedcode", - ] - }, - { - name: "phpstan", - image: "joomlaprojects/docker-images:php7.4", - depends: [ "composer" ], - failure: "ignore", - commands: [ - "vendor/bin/phpstan analyse src", - ] - }, - { - name: "phploc", - image: "joomlaprojects/docker-images:php7.4", - depends: [ "composer" ], - failure: "ignore", - commands: [ - "phploc src", - ] - }, - { - name: "phpcpd", - image: "joomlaprojects/docker-images:php7.4", - depends: [ "composer" ], - failure: "ignore", - commands: [ - "phpcpd src", - ] - } - ] - }, - { - kind: "pipeline", - name: "PHP 5.3 lowest", - volumes: hostvolumes, - steps: [ - { - name: "composer", - image: "joomlaprojects/docker-images:php5.3", - volumes: volumes, - commands: [ - "php -v", - "composer update --prefer-stable --prefer-lowest", - "composer update phpunit/phpunit-mock-objects" - ] - }, - phpunit("5.3") - ] - }, - pipeline("5.3", "5.3", "--prefer-stable"), - pipeline("5.4", "5.4", "--prefer-stable"), - pipeline("5.5", "5.5", "--prefer-stable"), - pipeline("5.6", "5.6", "--prefer-stable"), - pipeline("7.0", "7.0", "--prefer-stable"), - pipeline("7.1", "7.1", "--prefer-stable"), - pipeline("7.2", "7.2", "--prefer-stable"), - pipeline("7.3", "7.3", "--prefer-stable"), - pipeline("7.4", "7.4", "--prefer-stable"), - pipeline("8.0", "8.0", "--ignore-platform-reqs --prefer-stable") -] diff --git a/libraries/vendor/joomla/string/.drone.yml b/libraries/vendor/joomla/string/.drone.yml deleted file mode 100644 index 41b4662ec10..00000000000 --- a/libraries/vendor/joomla/string/.drone.yml +++ /dev/null @@ -1,373 +0,0 @@ ---- -kind: pipeline -name: Codequality - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php7.4 - commands: - - php -v - - composer update - - composer require phpmd/phpmd phpstan/phpstan - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: phpcs - image: joomlaprojects/docker-images:php7.4 - commands: - - vendor/bin/phpcs --config-set installed_paths vendor/joomla/coding-standards - - vendor/bin/phpcs -p --report=full --extensions=php --standard=ruleset.xml src/ - -- name: phpmd - image: joomlaprojects/docker-images:php7.4 - commands: - - vendor/bin/phpmd src text cleancode - - vendor/bin/phpmd src text codesize - - vendor/bin/phpmd src text controversial - - vendor/bin/phpmd src text design - - vendor/bin/phpmd src text unusedcode - failure: ignore - -- name: phpstan - image: joomlaprojects/docker-images:php7.4 - commands: - - vendor/bin/phpstan analyse src - failure: ignore - -- name: phploc - image: joomlaprojects/docker-images:php7.4 - commands: - - phploc src - failure: ignore - -- name: phpcpd - image: joomlaprojects/docker-images:php7.4 - commands: - - phpcpd src - failure: ignore - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 5.3 lowest - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php5.3 - commands: - - php -v - - composer update --prefer-stable --prefer-lowest - - composer update phpunit/phpunit-mock-objects - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php5.3 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 5.3 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php5.3 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php5.3 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 5.4 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php5.4 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php5.4 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 5.5 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php5.5 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php5.5 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 5.6 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php5.6 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php5.6 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 7.0 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php7.0 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php7.0 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 7.1 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php7.1 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php7.1 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 7.2 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php7.2 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php7.2 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 7.3 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php7.3 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php7.3 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 7.4 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php7.4 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php7.4 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 8.0 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php8.0 - commands: - - php -v - - composer update --ignore-platform-reqs --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php8.0 - commands: - - vendor/bin/phpunit - failure: ignore - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: signature -hmac: bcd686cd053fd91aff1bb22c260e9f2f41efef8a869cbc0db2deae0894bb2fd9 - -... diff --git a/libraries/vendor/leafo/lessphp/.drone.yml b/libraries/vendor/leafo/lessphp/.drone.yml deleted file mode 100644 index 5814a362f34..00000000000 --- a/libraries/vendor/leafo/lessphp/.drone.yml +++ /dev/null @@ -1,346 +0,0 @@ ---- -kind: pipeline -name: Codequality - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php7.4 - commands: - - php -v - - composer update - - composer require phpmd/phpmd phpstan/phpstan - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: phpcs - image: joomlaprojects/docker-images:php7.4 - commands: - - vendor/bin/phpcs -p --report=full --extensions=php --standard=ruleset.xml lessc.inc.php lessify lessify.inc.php - -- name: phpmd - image: joomlaprojects/docker-images:php7.4 - commands: - - vendor/bin/phpmd lessc.inc.php text cleancode - - vendor/bin/phpmd lessc.inc.php text codesize - - vendor/bin/phpmd lessc.inc.php text controversial - - vendor/bin/phpmd lessc.inc.php text design - - vendor/bin/phpmd lessc.inc.php text unusedcode - failure: ignore - -- name: phpstan - image: joomlaprojects/docker-images:php7.4 - commands: - - vendor/bin/phpstan analyse lessc.inc.php - failure: ignore - -- name: phploc - image: joomlaprojects/docker-images:php7.4 - commands: - - phploc lessc.inc.php - failure: ignore - -- name: phpcpd - image: joomlaprojects/docker-images:php7.4 - commands: - - phpcpd lessc.inc.php - failure: ignore - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 5.3 - -platform: - os: linux - arch: amd64 - -steps: - - name: composer - image: joomlaprojects/docker-images:php5.3 - commands: - - php -v - - composer update --ignore-platform-reqs --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - - - name: PHPUnit - image: joomlaprojects/docker-images:php5.3 - failure: ignore - commands: - - vendor/bin/phpunit - -volumes: - - name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 5.4 - -platform: - os: linux - arch: amd64 - -steps: - - name: composer - image: joomlaprojects/docker-images:php5.4 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - - - name: PHPUnit - image: joomlaprojects/docker-images:php5.4 - failure: ignore - commands: - - vendor/bin/phpunit - -volumes: - - name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 5.5 - -platform: - os: linux - arch: amd64 - -steps: - - name: composer - image: joomlaprojects/docker-images:php5.5 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - - - name: PHPUnit - image: joomlaprojects/docker-images:php5.5 - failure: ignore - commands: - - vendor/bin/phpunit - -volumes: - - name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 5.6 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php5.6 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php5.6 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 7.0 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php7.0 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php7.0 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 7.1 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php7.1 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php7.1 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 7.2 - -platform: - os: linux - arch: amd64 - -steps: - - name: composer - image: joomlaprojects/docker-images:php7.2 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - - - name: PHPUnit - image: joomlaprojects/docker-images:php7.2 - commands: - - vendor/bin/phpunit - -volumes: - - name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 7.3 - -platform: - os: linux - arch: amd64 - -steps: - - name: composer - image: joomlaprojects/docker-images:php7.3 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - - - name: PHPUnit - image: joomlaprojects/docker-images:php7.3 - commands: - - vendor/bin/phpunit - -volumes: - - name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 7.4 - -platform: - os: linux - arch: amd64 - -steps: - - name: composer - image: joomlaprojects/docker-images:php7.4 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - - - name: PHPUnit - image: joomlaprojects/docker-images:php7.4 - commands: - - vendor/bin/phpunit - -volumes: - - name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: pipeline -name: PHP 8.0 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php8.0 - commands: - - php -v - - composer update --ignore-platform-reqs --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php8.0 - commands: - - vendor/bin/phpunit - failure: ignore - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - ---- -kind: signature -hmac: 3e81a7c48ced8b189538371fa08fff1cc6f18755e060cb6a0ecd702f439db3e8 - -... diff --git a/libraries/vendor/leafo/lessphp/phpunit.xml.dist b/libraries/vendor/leafo/lessphp/phpunit.xml.dist deleted file mode 100644 index e1c737f4bf5..00000000000 --- a/libraries/vendor/leafo/lessphp/phpunit.xml.dist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - ./tests - - - diff --git a/libraries/vendor/leafo/lessphp/ruleset.xml b/libraries/vendor/leafo/lessphp/ruleset.xml deleted file mode 100644 index 802e79c6321..00000000000 --- a/libraries/vendor/leafo/lessphp/ruleset.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - . - - - vendor - From 6316fc93319492d94df35f7c380c4c637d51fb71 Mon Sep 17 00:00:00 2001 From: Harald Leithner Date: Sat, 21 Nov 2020 13:00:47 +0100 Subject: [PATCH 21/31] Limit offset to max len in com_search (#31444) Limit the offset length to textlength --- .../components/com_search/helpers/search.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/administrator/components/com_search/helpers/search.php b/administrator/components/com_search/helpers/search.php index 0f26825210e..a096b90b3bb 100644 --- a/administrator/components/com_search/helpers/search.php +++ b/administrator/components/com_search/helpers/search.php @@ -287,8 +287,9 @@ class SearchHelper $lsearchword = StringHelper::strtolower(self::remove_accents($searchword)); $wordfound = false; $pos = 0; + $length = $length > $textlen ? $textlen : $length; - while ($wordfound === false && $pos < $textlen) + while ($wordfound === false && $pos + $length < $textlen) { if (($wordpos = @StringHelper::strpos($ltext, ' ', $pos + $length)) !== false) { @@ -316,29 +317,29 @@ class SearchHelper { $iOriLen = StringHelper::strlen(StringHelper::substr($text, 0, $pos + $chunk_size)); $iModLen = StringHelper::strlen(self::remove_accents(StringHelper::substr($text, 0, $pos + $chunk_size))); - + $chunk_size += $iOriLen - $iModLen; } else { $iOriSkippedLen = StringHelper::strlen(StringHelper::substr($text, 0, $pos)); $iModSkippedLen = StringHelper::strlen(self::remove_accents(StringHelper::substr($text, 0, $pos))); - + // Adjust starting position $pos if ($iOriSkippedLen !== $iModSkippedLen) { $pos += $iOriSkippedLen - $iModSkippedLen; } - + $iOriReturnLen = StringHelper::strlen(StringHelper::substr($text, $pos, $chunk_size)); $iModReturnLen = StringHelper::strlen(self::remove_accents(StringHelper::substr($text, $pos, $chunk_size))); - + if ($iOriReturnLen !== $iModReturnLen) { $chunk_size += $iOriReturnLen - $iModReturnLen; } } - + $sPre = $pos > 0 ? '... ' : ''; $sPost = ($pos + $chunk_size) >= StringHelper::strlen($text) ? '' : ' ...'; From 2ca4ab98043eb792fef652f71df625191f109ecd Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Sat, 21 Nov 2020 15:51:27 +0100 Subject: [PATCH 22/31] [3][com_content] fix php8 Deprecated (#31434) --- administrator/components/com_contact/helpers/html/contact.php | 2 +- .../com_content/helpers/html/contentadministrator.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/administrator/components/com_contact/helpers/html/contact.php b/administrator/components/com_contact/helpers/html/contact.php index 9344831c1d2..64b1287e9d9 100644 --- a/administrator/components/com_contact/helpers/html/contact.php +++ b/administrator/components/com_contact/helpers/html/contact.php @@ -101,7 +101,7 @@ abstract class JHtmlContact * * @since 1.6 */ - public static function featured($value = 0, $i, $canChange = true) + public static function featured($value = 0, $i = 0, $canChange = true) { // Array of image, task, title, action diff --git a/administrator/components/com_content/helpers/html/contentadministrator.php b/administrator/components/com_content/helpers/html/contentadministrator.php index 93198a65064..3f26dce91c1 100644 --- a/administrator/components/com_content/helpers/html/contentadministrator.php +++ b/administrator/components/com_content/helpers/html/contentadministrator.php @@ -100,7 +100,7 @@ abstract class JHtmlContentAdministrator * * @return string HTML code */ - public static function featured($value = 0, $i, $canChange = true) + public static function featured($value = 0, $i = 0, $canChange = true) { JHtml::_('bootstrap.tooltip'); From ac9e4f901fed501cb3806214b84125b1388c090f Mon Sep 17 00:00:00 2001 From: Richard Fath Date: Sat, 21 Nov 2020 15:52:09 +0100 Subject: [PATCH 23/31] Fix empty path in com_joomlaupdate restore.php (#31442) --- administrator/components/com_joomlaupdate/restore.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/administrator/components/com_joomlaupdate/restore.php b/administrator/components/com_joomlaupdate/restore.php index d832b10862c..00a8bde3778 100644 --- a/administrator/components/com_joomlaupdate/restore.php +++ b/administrator/components/com_joomlaupdate/restore.php @@ -874,7 +874,7 @@ abstract class AKAbstractUnarchiver extends AKAbstractPart */ public function __wakeup() { - if ($this->currentPartNumber >= 0) + if ($this->currentPartNumber >= 0 && !empty($this->archiveList[$this->currentPartNumber])) { $this->fp = @fopen($this->archiveList[$this->currentPartNumber], 'rb'); if ((is_resource($this->fp)) && ($this->currentPartOffset > 0)) From 9cfe0b5ea9d369e14ebdc4e8984059dc4f231add Mon Sep 17 00:00:00 2001 From: Harald Leithner Date: Sat, 21 Nov 2020 19:30:30 +0100 Subject: [PATCH 24/31] Use proper string comparison function for tag aliases (#31445) * Use proper string comparison function for tag aliases * Update libraries/joomla/form/fields/aliastag.php Co-authored-by: Quy Co-authored-by: Quy --- libraries/joomla/form/fields/aliastag.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/joomla/form/fields/aliastag.php b/libraries/joomla/form/fields/aliastag.php index ac3ff33e5aa..b0701482fe2 100644 --- a/libraries/joomla/form/fields/aliastag.php +++ b/libraries/joomla/form/fields/aliastag.php @@ -63,7 +63,7 @@ class JFormFieldAliastag extends JFormFieldList $options, function($a, $b) { - return $a->text > $b->text; + return strcmp($a->text, $b->text); } ); From 8b48edd280d4acc1c4e3513f1a0f473f2943bfbe Mon Sep 17 00:00:00 2001 From: Thomas Hunziker Date: Sat, 21 Nov 2020 19:34:47 +0100 Subject: [PATCH 25/31] Updated installation language files (#31447) --- installation/language/da-DK/da-DK.ini | 2 + installation/language/da-DK/da-DK.xml | 4 +- installation/language/fr-FR/fr-FR.ini | 4 +- installation/language/fr-FR/fr-FR.xml | 4 +- installation/language/hr-HR/hr-HR.ini | 119 +++++++++++++------------- installation/language/hr-HR/hr-HR.xml | 18 ++-- installation/language/nl-NL/nl-NL.ini | 28 +----- installation/language/nl-NL/nl-NL.xml | 4 +- installation/language/sl-SI/sl-SI.ini | 80 ++++++----------- installation/language/sl-SI/sl-SI.xml | 4 +- installation/language/sr-RS/sr-RS.ini | 2 + installation/language/sr-RS/sr-RS.xml | 4 +- installation/language/sr-YU/sr-YU.ini | 2 + installation/language/sr-YU/sr-YU.xml | 4 +- installation/language/sv-SE/sv-SE.ini | 92 +++++++++++++------- installation/language/sv-SE/sv-SE.xml | 4 +- installation/language/sw-KE/sw-KE.ini | 3 +- installation/language/sw-KE/sw-KE.xml | 4 +- installation/language/ta-IN/ta-IN.ini | 2 + installation/language/ta-IN/ta-IN.xml | 4 +- 20 files changed, 190 insertions(+), 198 deletions(-) diff --git a/installation/language/da-DK/da-DK.ini b/installation/language/da-DK/da-DK.ini index 6d68876f1e8..5eaac8e3f57 100644 --- a/installation/language/da-DK/da-DK.ini +++ b/installation/language/da-DK/da-DK.ini @@ -301,10 +301,12 @@ JLIB_FORM_FIELD_INVALID="Ugyldigt felt: " JLIB_FORM_VALIDATE_FIELD_INVALID="Ugyldigt felt: %s" JLIB_FORM_VALIDATE_FIELD_REQUIRED="Felt påkrævet: %s" JLIB_INSTALLER_ABORT="Abryder sproginstallation: %s" +JLIB_INSTALLER_ABORT_NOINSTALLPATH="Installationssti eksisterer ikke." JLIB_INSTALLER_ABORT_PACK_INSTALL_CREATE_DIRECTORY="Pakkeinstallation: Kunne ikke oprette mappe: %s." JLIB_INSTALLER_ABORT_PACK_INSTALL_ERROR_EXTENSION="Pakke %1$s: Der opstod en fejl under installation af udvidelsen: %2$s" JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES="Pakke %s: Der var ingen filer til installation!" JLIB_INSTALLER_ERROR_FAIL_COPY_FILE="JInstaller: :Installer: Kunne ikke kopiere filen %1$s til %2$s." +JLIB_INSTALLER_INSTALL="Installer" JLIB_INSTALLER_NOT_ERROR="Hvis fejlen er relateret til installationen af TinyMCE sprogfiler, så har det ingen effekt på installationen af sprog. Nogle sprogpakker, der er oprettet før Joomla! 3.2.0 kan forsøge at installere separate TinyMCE sprogfiler. Da disse nu er inkluderet i kernen behøves de ikke længere at blive installeret." JLIB_UTIL_ERROR_CONNECT_DATABASE="JDatabase: :getInstance: Kunne ikke forbinde til database
joomla.library: %1$s - %2$s" diff --git a/installation/language/da-DK/da-DK.xml b/installation/language/da-DK/da-DK.xml index 7532cb39828..075504b0520 100644 --- a/installation/language/da-DK/da-DK.xml +++ b/installation/language/da-DK/da-DK.xml @@ -3,8 +3,8 @@ version="3.9" client="installation"> Danish (Denmark) - 3.9.17 - March 2020 + 3.9.23 + November 2020 Danish Translation Team (Transl.: Mikael Winther, Ronny Buelund, Ole Bang Ottosen) Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/installation/language/fr-FR/fr-FR.ini b/installation/language/fr-FR/fr-FR.ini index 4f240153b82..4cb66174f79 100644 --- a/installation/language/fr-FR/fr-FR.ini +++ b/installation/language/fr-FR/fr-FR.ini @@ -1,5 +1,5 @@ ; Joomla! Project -; Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved. +; (C) 2005 Open Source Matters, Inc. ; License GNU General Public License version 2 or later; see LICENSE.txt ; Note : All ini files need to be saved as UTF-8 @@ -299,12 +299,14 @@ JLIB_FILESYSTEM_ERROR_COPY_FAILED="Echec de la copie" JLIB_FILESYSTEM_ERROR_PATH_IS_NOT_A_FOLDER_FILES="JFolder: :files: Le chemin n'est pas un dossier. Chemin: %s" JLIB_FORM_FIELD_INVALID="Champ invalide : " JLIB_INSTALLER_ABORT="Annulation de l'installation de langues : %s" +JLIB_INSTALLER_ABORT_NOINSTALLPATH="Le chemin d’installation n’existe pas." JLIB_INSTALLER_ABORT_PACK_INSTALL_CREATE_DIRECTORY="Installation de paquet : Échec de la création du répertoire : %s." JLIB_INSTALLER_ABORT_PACK_INSTALL_ERROR_EXTENSION="Paquet %1$s: Erreur lors de l'installation de l'extension : %2$s" JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES="Paquet %s: Aucun fichier à installer!" JLIB_FORM_VALIDATE_FIELD_INVALID="Champ invalide : %s" JLIB_FORM_VALIDATE_FIELD_REQUIRED="Champ requis : %s" JLIB_INSTALLER_ERROR_FAIL_COPY_FILE="JInstaller: :Install: Erreur de copie du fichier %1$s vers %2$s." +JLIB_INSTALLER_INSTALL="Installation" JLIB_INSTALLER_NOT_ERROR="Si l'erreur ci-dessus concerne l'installation de fichiers de langue pour TinyMce, elle n'a pas d'effet sur l'installation de(s) langue(s). Certains paquets de langue créés avant la version 3.2.0 de Joomla! peuvent aussi tenter d'installer des fichiers de langue TinyMce. Comme ceux-ci sont dorévanant inclus dans le noyau, ils n'ont plus besoin d'être installés." JLIB_UTIL_ERROR_CONNECT_DATABASE="JDatabase: :getInstance: Impossible de se connecter à a base de données
joomla.library: %1$s - %2$s" diff --git a/installation/language/fr-FR/fr-FR.xml b/installation/language/fr-FR/fr-FR.xml index 857fde31e3f..53ca1714a43 100644 --- a/installation/language/fr-FR/fr-FR.xml +++ b/installation/language/fr-FR/fr-FR.xml @@ -3,10 +3,10 @@ version="3.9" client="installation"> French (France) - 3.9.17 + 3.9.23 2020-03-24 Joomla.fr - Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved. + (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt fr-FR.ini diff --git a/installation/language/hr-HR/hr-HR.ini b/installation/language/hr-HR/hr-HR.ini index 790e8a19bbe..a8d01edcc70 100644 --- a/installation/language/hr-HR/hr-HR.ini +++ b/installation/language/hr-HR/hr-HR.ini @@ -1,3 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + ; Joomla! Project ; Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved. ; License GNU General Public License version 2 or later; see LICENSE.txt @@ -11,45 +38,40 @@ INSTL_STEP_FTP_LABEL="FTP" INSTL_STEP_LANGUAGES_LABEL="Instalacija jezika" INSTL_STEP_SITE_LABEL="Konfiguracija" INSTL_STEP_SUMMARY_LABEL="Pregled" - ;Language view INSTL_SELECT_LANGUAGE_TITLE="Odaberite jezik" INSTL_WARNJAVASCRIPT="Upozorenje! JavaScript mora biti omogućen za ispravnu Joomla! instalaciju" INSTL_WARNJSON="Vaša PHP instalacija mora imati podršku za JSON da bi se Joomla! mogla instalirati!" - ;Preinstall view INSTL_PRECHECK_TITLE="Provjera prije instalacije" -INSTL_PRECHECK_DESC="Ako neka od ovih stavki nije podržana (obilježena kao Ne) tada vas molimo da poduzmete potrebne radnje da ih ispravite.
Ne možete instalirati Joomlu tako dugo dok vaša instalacija ne zadovolji niže navedene zahtjeve." +INSTL_PRECHECK_DESC="Ako neka od ovih stavki nije podržana (obilježena kao Ne) tada vas molimo da poduzmete potrebne radnje da ih ispravite.
Ne možete instalirati Joomlu tako dugo dok vaša instalacija ne zadovolji niže navedene zahtjeve." INSTL_PRECHECK_RECOMMENDED_SETTINGS_TITLE="Preporučene postavke:" INSTL_PRECHECK_RECOMMENDED_SETTINGS_DESC="Ove PHP postavke su preporučene za potpunu kompatibilnost s Joomlom.
Ipak, Joomla! će biti funkcionalna i ako postavke nisu identične preporučenima." INSTL_PRECHECK_DIRECTIVE="Direktiva" INSTL_PRECHECK_RECOMMENDED="Preporuka" INSTL_PRECHECK_ACTUAL="Trenutno" - ; Database view INSTL_DATABASE="Konfiguracija baze podataka" INSTL_DATABASE_ERROR_POSTGRESQL_QUERY="PostgreSQL upit na bazu nije uspio." -INSTL_DATABASE_HOST_DESC="Ovo je najčešće "_QQ_"localhost"_QQ_" ili ime koje ste dobili od hostera." +INSTL_DATABASE_HOST_DESC="Ovo je najčešće \"localhost\" ili ime koje ste dobili od hostera." INSTL_DATABASE_HOST_LABEL="Ime servera" -INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_CREATE_FILE="Nismo mogli kreirati datoteku. Molimo vas da ručno kreirate datoteku naziva "_QQ_"%1$s"_QQ_" i učitate je u "_QQ_"%2$s"_QQ_" direktorij vašeg Joomla sitea." -INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_DELETE_FILE="Kako bi potvrdili da ste vlasnik ovog web sitea, molimo da izbrišete datoteku naziva "_QQ_"%1$s"_QQ_" koju smo kreirali u "_QQ_"%2$s"_QQ_" direktoriju vašeg Joomla sitea." -INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_GENERAL_MESSAGE="Želite koristiti host baze podataka koji nije na vašem lokalnom serveru. Iz sigurnosnih razloga morate potvrditi vlasništvo vašeg web hosting računa. Za više informacija pročitajte dokumentaciju." +INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_CREATE_FILE="Nismo mogli kreirati datoteku. Molimo vas da ručno kreirate datoteku naziva \"%1$s\" i učitate je u \"%2$s\" direktorij vašeg Joomla sitea." +INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_DELETE_FILE="Kako bi potvrdili da ste vlasnik ovog web sitea, molimo da izbrišete datoteku naziva \"%1$s\" koju smo kreirali u \"%2$s\" direktoriju vašeg Joomla sitea." +INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_GENERAL_MESSAGE="Želite koristiti host baze podataka koji nije na vašem lokalnom serveru. Iz sigurnosnih razloga morate potvrditi vlasništvo vašeg web hosting računa. Za više informacija pročitajte dokumentaciju." INSTL_DATABASE_NAME_DESC="Neki hosteri dozvoljavaju samo određena imena baze podataka za svaki site. Koristite drugačiji prefiks tablice za različite Joomla! stranice." -INSTL_DATABASE_NAME_LABEL="Ime baze podataka" +INSTL_DATABASE_NAME_LABEL="Ime Baze podataka" INSTL_DATABASE_NO_SCHEMA="Ne postoji shema baze podataka za ovaj tip baze podataka." -INSTL_DATABASE_OLD_PROCESS_DESC=""_QQ_"Sigurnosna kopija"_QQ_" ili "_QQ_"Izbriši"_QQ_" sve postojeće tablice iz prethodnih Joomla! instalacija s istim "_QQ_"Prefiksom tablice"_QQ_"." +INSTL_DATABASE_OLD_PROCESS_DESC="\"Sigurnosna kopija\" ili \"Izbriši\" sve postojeće tablice iz prethodnih Joomla! instalacija s istim \"Prefiksom tablice\"." INSTL_DATABASE_OLD_PROCESS_LABEL="Obrada stare baze" INSTL_DATABASE_PASSWORD_DESC="Zbog sigurnosti vašeg sitea obavezno je korištenje lozinke za korisnički račun baze podataka" INSTL_DATABASE_PASSWORD_LABEL="Lozinka" INSTL_DATABASE_PREFIX_DESC="Odaberite prefiks baze ili koristite nasumično generirani. Idealno duljine četiri ili pet znakova, može sadržavati samo alfanumeričke znakove i MORA završavati donjom crtom. Pobrinite se da druge tablice ne koriste odabrani prefiks." INSTL_DATABASE_PREFIX_LABEL="Prefiks tablice" INSTL_DATABASE_PREFIX_MSG="Prefiks baze podataka mora započinjati sa slovom, kojeg sljede proizvoljni alfanumerički znakovi, a završavati donjom crtom" -INSTL_DATABASE_TYPE_DESC="Ovo je vjerojatno "_QQ_"MySQLi"_QQ_"" -INSTL_DATABASE_TYPE_LABEL="Tip baze podataka" +INSTL_DATABASE_TYPE_DESC="Ovo je vjerojatno \"MySQLi\"" +INSTL_DATABASE_TYPE_LABEL="Tip Baze podataka" INSTL_DATABASE_USER_DESC="Ili korisničko ime koje ste kreirali ili korisničko ime dobiveno od hostera." INSTL_DATABASE_USER_LABEL="Korisničko ime" - - ;FTP view INSTL_AUTOFIND_FTP_PATH="Automatsko traženje FTP putanje" INSTL_FTP="FTP Konfiguracija" @@ -60,13 +82,12 @@ INSTL_FTP_PASSWORD_LABEL="FTP Lozinka" INSTL_FTP_PORT_LABEL="FTP Port" INSTL_FTP_ROOT_LABEL="FTP Root direktorij" INSTL_FTP_SAVE_LABEL="Sačuvaj FTP lozinku" -INSTL_FTP_TITLE="FTP Konfiguracija (Opcionalno - većina korisnika može preskočiti ovaj korak - Pritisnite na "_QQ_"Dalje"_QQ_" za preskakanje ovog dijela)" -INSTL_FTP_USER_LABEL="FTP korisničko ime" +INSTL_FTP_TITLE="FTP Konfiguracija (Opcionalno - većina korisnika može preskočiti ovaj korak - Pritisnite na \"Dalje\" za preskakanje ovog dijela)" +INSTL_FTP_USER_LABEL="FTP Korisničko ime" INSTL_VERIFY_FTP_SETTINGS="Provjeri FTP postavke" INSTL_FTP_SETTINGS_CORRECT="Postavke ispravne" INSTL_FTP_USER_DESC="Upozorenje! Preporučljivo je da ovo ostavite prazno i da unesete vaše FTP korisničko ime prilikom svakog kopiranja datoteka." INSTL_FTP_PASSWORD_DESC="Upozorenje! Preporučljivo je da ovo ostavite prazno i da unesete vašu FTP lozinku prilikom svakog kopiranja datoteka." - ;Site View INSTL_SITE="Glavna konfiguracija" INSTL_ADMIN_EMAIL_LABEL="E-mail" @@ -79,7 +100,7 @@ INSTL_ADMIN_USER_DESC="Postavite korisničko ime za vaš Super Administrator kor INSTL_SITE_NAME_LABEL="Ime stranice" INSTL_SITE_NAME_DESC="Upišite naziv vaše Joomla! stranice." INSTL_SITE_METADESC_LABEL="Opis" -INSTL_SITE_METADESC_TITLE_LABEL="Upišite opis za cjelokupni web site koji će koristiti web pretraživači. Općenito je optimalno upisati do najviše 20 riječi." +INSTL_SITE_METADESC_TITLE_LABEL="Unesite opis cjelokupnog web sitea koji će se koristiti od strane internet pretraživača. Općenito, najviše 20 riječi je najbolje." INSTL_SITE_OFFLINE_LABEL="Site Neaktivan" INSTL_SITE_OFFLINE_TITLE_LABEL="Po završetku instalacije postavlja site neaktivnim. Status sitea se kasnije u Globalnoj konfiguraciji može postaviti na aktivan." INSTL_SITE_INSTALL_SAMPLE_LABEL="Instaliranje primjera" @@ -97,7 +118,6 @@ INSTL_SAMPLE_DATA_SET_DESC="Instalacija Joomle s jednom stranicom (izbornik s je INSTL_SAMPLE_LEARN_SET_DESC="Instalacija Joomle s primjerima članaka koji opisuju kako Joomla radi." INSTL_SAMPLE_TESTING_SET_DESC="Instalacija Joomle sa svim mogućim izborničkim stavkama da bi se pomoglo s testiranjem Joomle." INSTL_SUPER_USER_TITLE="Detalji računa Super korisnika" - ;Summary view INSTL_FINALISATION="Završavanje" INSTL_SUMMARY_INSTALL="Instalacija" @@ -105,7 +125,6 @@ INSTL_SUMMARY_EMAIL_LABEL="E-mail konfiguracije" INSTL_SUMMARY_EMAIL_DESC="Nakon instalacije pošalji konfiguracijske postavke e-mailom na %s." INSTL_SUMMARY_EMAIL_PASSWORDS_LABEL="Prikaži lozinke u e-mailu" INSTL_SUMMARY_EMAIL_PASSWORDS_DESC="Upozorenje! Nije preporučeno slati i spremati lozinke u emailovima." - ;Installing view INSTL_INSTALLING="Instalacija u tijeku ..." INSTL_INSTALLING_DATABASE_BACKUP="Spremanje starih tablica baze podataka" @@ -114,25 +133,22 @@ INSTL_INSTALLING_DATABASE="Kreiranje tablica baze podataka" INSTL_INSTALLING_SAMPLE="Instalacija primjera podataka" INSTL_INSTALLING_CONFIG="Kreiranje konfiguracijske datoteke" INSTL_INSTALLING_EMAIL="Slanje emaila na %s" - ;Email INSTL_EMAIL_SUBJECT="Konfiguracijski detalji: %s" INSTL_EMAIL_HEADING="Ovdje možete naći konfiguracijske postavke za novo instaliranu Joomla! web stranicu:" INSTL_EMAIL_NOT_SENT="E-mail nije bilo moguće poslati." - ;Complete view INSTL_COMPLETE_ADMINISTRATION_LOGIN_DETAILS="Detalji administratorske prijave" -INSTL_COMPLETE_ERROR_FOLDER_ALREADY_REMOVED=""_QQ_"%s"_QQ_" direktorij je već izbrisan." +INSTL_COMPLETE_ERROR_FOLDER_ALREADY_REMOVED="\"%s\" direktorij je već izbrisan." INSTL_COMPLETE_ERROR_FOLDER_DELETE="\"%s\" direktorij ne može biti obrisan. Molim, obrišite ručno direktorij." INSTL_COMPLETE_FOLDER_REMOVED="\"%s\" direktorij je uklonjen." INSTL_COMPLETE_LANGUAGE_1="Joomla! na vašem jeziku?" -INSTL_COMPLETE_LANGUAGE_DESC="Prije uklanjanja "_QQ_"%s"_QQ_" direktorija možete instalirati dodatne jezike. Ako želite instalirati dodatne jezike u vašu Joomla! aplikaciju odaberite sljedeću tipku." +INSTL_COMPLETE_LANGUAGE_DESC="Prije uklanjanja \"%s\" direktorija možete instalirati dodatne jezike. Ako želite instalirati dodatne jezike u vašu Joomla! aplikaciju odaberite sljedeću tipku." INSTL_COMPLETE_LANGUAGE_DESC2="Opaska: trebat će vam pristup internetu kako bi mogli skinuti i instalirati nove jezike.
Neke konfiguracije servera neće dozvoliti Joomli da instalira jezike. U tom slučaju ne brinite, moći ćete ih instalirati kasnije koristeći Joomla administratorsko sučelje." -INSTL_COMPLETE_REMOVE_FOLDER="Ukloni "_QQ_"%s"_QQ_" direktorij" -INSTL_COMPLETE_REMOVE_INSTALLATION="MOLIM DA NE ZABORAVITE OBRISATI INSTALLATION DIREKTORIJ.
Nećete moći dalje raditi dok se ne ukloni "_QQ_"%s"_QQ_" direktorij. Ovo je sigurnosna mogućnost Joomle!" +INSTL_COMPLETE_REMOVE_FOLDER="Ukloni \"%s\" direktorij" +INSTL_COMPLETE_REMOVE_INSTALLATION="MOLIM DA NE ZABORAVITE OBRISATI INSTALLATION DIREKTORIJ.
Nećete moći dalje raditi dok se ne ukloni \"%s\" direktorij. Ovo je sigurnosna mogućnost Joomle!" INSTL_COMPLETE_TITLE="Čestitamo! Joomla! je instalirana!" INSTL_COMPLETE_INSTALL_LANGUAGES="Dodatni koraci: Instalacija jezika" - ;Languages view INSTL_LANGUAGES="Instalacija jezičnih paketa" INSTL_LANGUAGES_COLUMN_HEADER_LANGUAGE="Jezik" @@ -145,7 +161,6 @@ INSTL_LANGUAGES_NO_LANGUAGE_SELECTED="Nije odabran niti jedan jezik za instalaci INSTL_LANGUAGES_WARNING_NO_INTERNET="Joomla! se nije mogla spojiti na server za jezike. Molimo završite proces instalacije." INSTL_LANGUAGES_WARNING_NO_INTERNET2="Opaska: Moći ćete i kasnije instalirati jezike koristeći Joomla! administratorsko sučelje" INSTL_LANGUAGES_WARNING_BACK_BUTTON="Povratak na posljednji korak instalacije" - ;Default language view INSTL_DEFAULTLANGUAGE_ACTIVATE_MULTILANGUAGE="Aktiviraj mogućnost višejezičnosti" INSTL_DEFAULTLANGUAGE_ACTIVATE_MULTILANGUAGE_DESC="Ako je aktivirano, vaš Joomla site imati će uključenu mogućnost višejezičnosti s lokaliziranim izbornicima za svaki instalirani jezik" @@ -154,7 +169,7 @@ INSTL_DEFAULTLANGUAGE_ACTIVATE_LANGUAGE_CODE_PLUGIN_DESC="Ako je omogućeno, plu INSTL_DEFAULTLANGUAGE_ADMINISTRATOR="Osnovni jezik za Administratorsko sučelje" INSTL_DEFAULTLANGUAGE_ADMIN_COULDNT_SET_DEFAULT="Joomla nije mogla postavti jezik kao zadani. Engleski će biti korišten kao zadani jezik za Administrator sučelje." INSTL_DEFAULTLANGUAGE_ADMIN_SET_DEFAULT="Joomla je postavila %s kao vaš osnovni jezik za ADMINISTRATORSKO sučelje." -INSTL_DEFAULTLANGUAGE_COLUMN_HEADER_SELECT="Odabir" +INSTL_DEFAULTLANGUAGE_COLUMN_HEADER_SELECT="Odaberi" INSTL_DEFAULTLANGUAGE_COLUMN_HEADER_LANGUAGE="Jezik" INSTL_DEFAULTLANGUAGE_COLUMN_HEADER_TAG="Oznaka" INSTL_DEFAULTLANGUAGE_COULD_NOT_ADD_ASSOCIATIONS="Joomla nije uspjela automatski kreirati dodjeljivanje jezika." @@ -181,10 +196,8 @@ INSTL_DEFAULTLANGUAGE_INSTALL_LOCALISED_CONTENT_DESC="Ako je uključeno, Joomla INSTL_DEFAULTLANGUAGE_MULTILANGUAGE_TITLE="Višejezičnost" INSTL_DEFAULTLANGUAGE_MULTILANGUAGE_DESC="Ovo omogućuje automatsko uključivanje opcije Joomla! višejezičnosti" INSTL_DEFAULTLANGUAGE_TRY_LATER="Moći ćete to instalirati kasnije koristeći Joomla! Administrator - backend." - ; IMPORTANT NOTE FOR TRANSLATORS: Do not literally translate this line, instead add the localised name of the language. For example Spanish will be Español INSTL_DEFAULTLANGUAGE_NATIVE_LANGUAGE_NAME="Hrvatski (HR)" - ;Database Model INSTL_DATABASE_COULD_NOT_CONNECT="Nije moguće povezati se na bazu. Povezivanje vraća grešku: %s" INSTL_DATABASE_COULD_NOT_CREATE_DATABASE="Instalacija se nije mogla povezati na definiranu bazu podataka i nije mogla kreirati bazu. Potvrdite svoje postavke i ako je potrebno ručno kreirajte bazu podataka." @@ -206,39 +219,34 @@ INSTL_DATABASE_INVALID_SQLSRV_VERSION="Potreban je SQL Server 2008 R2 (10.50.160 INSTL_DATABASE_INVALID_SQLZURE_VERSION="Potreban je SQL Server 2008 R2 (10.50.1600.1) ili više za nastavak instalacije. Vaša verzija je: %s" INSTL_DATABASE_INVALID_TYPE="Molim odaberite tip baze" INSTL_DATABASE_NAME_TOO_LONG="Ime MySQL baze podataka mora imati najviše 64 znaka" -INSTL_DATABASE_INVALID_NAME="MySQL verzija prije verzije 5.1.6 ne smije sadržavati točke ili druge "_QQ_"posebne"_QQ_" znakove u imenu. Vaša verzija je: %s" +INSTL_DATABASE_INVALID_NAME="MySQL verzija prije verzije 5.1.6 ne smije sadržavati točke ili druge \"posebne\" znakove u imenu. Vaša verzija je: %s" INSTL_DATABASE_NAME_INVALID_SPACES="MySQL ime baze i tablice ne može početi ili završiti se praznim mjestom (razmaci)." INSTL_DATABASE_NAME_INVALID_CHAR="Niti jedan MySQL identifikator ne može sadržavati NULL ASCII(0x00)." INSTL_DATABASE_FILE_DOES_NOT_EXIST="Datoteka %s ne postoji" - ;controllers INSTL_COOKIES_NOT_ENABLED="Izgleda da kolačići nisu dozvoljeni u vašem web pregledniku. Nećete moći instalirati aplikaciju ukoliko je ova opcija isključena. Također je moguće da je problem u postavkama session.save_path na serveru. Ako je ovo slučaj, kontaktirajte svog davatelja hosting usluge ako ne znate kako da to sami provjerite i ispravite." INSTL_HEADER_ERROR="Greška" - ;Helpers INSTL_PAGE_TITLE="Joomla! Web Instalacija" - ;Configuration model -INSTL_ERROR_CONNECT_DB="Nije moguće povezati se na bazu. Povezivanje vraća grešku broj: %s" +INSTL_ERROR_CONNECT_DB="Nije moguće povezati se na bazu. Povezivanje vraća grešku: %s" INSTL_STD_OFFLINE_MSG="Pauza zbog održavanja sustava.
Molimo, navratite kasnije." - ;FTP model INSTL_FTP_INVALIDROOT="Uneseni FTP direktorij nije direktorij ove Joomla! instalacije" INSTL_FTP_NOCONNECT="Nije moguće povezati se na FTP server" -INSTL_FTP_NODELE="Funkcija "_QQ_"DELE"_QQ_" nije uspjela." +INSTL_FTP_NODELE="Funkcija \"DELE\" nije uspjela." INSTL_FTP_NODIRECTORYLISTING="Nije moguće dohvatiti popis direktorija s FTP servera" -INSTL_FTP_NOLIST="Funkcija "_QQ_"LIST"_QQ_" nije uspjela." +INSTL_FTP_NOLIST="Funkcija \"LIST\" nije uspjela." INSTL_FTP_NOLOGIN="Nije moguća prijava na FTP server." -INSTL_FTP_NOMKD="Funkcija "_QQ_"MKD"_QQ_" nije uspjela." -INSTL_FTP_NONLST="Funkcija "_QQ_"NLST"_QQ_" nije uspjela." -INSTL_FTP_NOPWD="Funkcija "_QQ_"PWD"_QQ_" nije uspjela." -INSTL_FTP_NORETR="Funkcija "_QQ_"RETR"_QQ_" nije uspjela." -INSTL_FTP_NORMD="Funkcija "_QQ_"RMD"_QQ_" nije uspjela." +INSTL_FTP_NOMKD="Funkcija \"MKD\" nije uspjela." +INSTL_FTP_NONLST="Funkcija \"NLST\" nije uspjela." +INSTL_FTP_NOPWD="Funkcija \"PWD\" nije uspjela." +INSTL_FTP_NORETR="Funkcija \"RETR\" nije uspjela." +INSTL_FTP_NORMD="Funkcija \"RMD\" nije uspjela." INSTL_FTP_NOROOT="Nije moguće pristupiti traženom FTP direktoriju" -INSTL_FTP_NOSTOR="Funkcija "_QQ_"STOR"_QQ_" nije uspjela." -INSTL_FTP_NOSYST="Funkcija "_QQ_"SYST"_QQ_" nije uspjela." +INSTL_FTP_NOSTOR="Funkcija \"STOR\" nije uspjela." +INSTL_FTP_NOSYST="Funkcija \"SYST\" nije uspjela." INSTL_FTP_UNABLE_DETECT_ROOT_FOLDER="Nije moguće automatsko prepoznavanje osnovnog FTP direktorija" - ;others INSTL_CONFPROBLEM="Vaša konfiguracijska datoteka ili direktorij nemaju prava za zapisivanje ili je došlo do problema prilikom izrade konfiguracijske datoteke. Morati ćete ručno učitati sljedeći kod. Označite cijeli tekst kôda u prostoru za tekst, zatim ga kopirajte i dodajte u novu datoteku imena 'configuration.php', te datoteku prenesite u osnovni direktorij vaše stranice." INSTL_DATABASE_SUPPORT="Podrška baze podataka:" @@ -267,7 +275,6 @@ INSTL_XML_SUPPORT="XML podrška" INSTL_ZIP_SUPPORT_AVAILABLE="Nativna ZIP podrška" INSTL_ZLIB_COMPRESSION_SUPPORT="Podrška za Zlib kompresiju" INSTL_PROCESS_BUSY="Postupak je u tijeku. Molimo pričekajte..." - ;Global strings JADMINISTRATOR="Administrator" JCHECK_AGAIN="Provjeri ponovo" @@ -275,11 +282,11 @@ JERROR="Greška" JEMAIL="E-mail" JGLOBAL_ISFREESOFTWARE="%s je slobodan softver izdan pod %s." JGLOBAL_LANGUAGE_VERSION_NOT_PLATFORM="Jezični paket ne odgovara ovoj verziji Joomle. Neki prijevodi bi mogli nedostajati i biti će prikazani na engleskom." -JGLOBAL_SELECT_AN_OPTION="Odaberite opciju" +JGLOBAL_SELECT_AN_OPTION="Odaberi opciju" JGLOBAL_SELECT_NO_RESULTS_MATCH="Nema zadovoljavajućih rezultata" JGLOBAL_SELECT_SOME_OPTIONS="Odaberite neke opcije" JINVALID_TOKEN="Najnoviji zahtjev je odbijen jer je sadržavao nevažeći sigurnosni token. Osvježite stranicu i pokušajte ponovno." -JNEXT="Dalje" +JNEXT="Sljedeće" JNO="Ne" JNOTICE="Napomena" JOFF="Isključeno" @@ -288,11 +295,10 @@ JPREVIOUS="Prethodno" JSITE="Site" JUSERNAME="Korisničko ime" JYES="Da" - ; Framework strings necessary when no lang pack is available JLIB_DATABASE_ERROR_CONNECT_MYSQL="Nije moguće spajanje na MySQL." JLIB_DATABASE_ERROR_DATABASE="Došlo je do greške baze podataka." -JLIB_DATABASE_ERROR_LOAD_DATABASE_DRIVER="Nije moguće učitati pogonski program (driver) baze: %s" +JLIB_DATABASE_ERROR_LOAD_DATABASE_DRIVER="Nije uspjelo učitavanje upravljačkog programa baze podataka: %s" JLIB_DATABASE_ERROR_VALID_MAIL="E-mail adresa koju ste unijeli nije ispravna. Molimo unesite drugu e-mail adresu." JLIB_ENVIRONMENT_SESSION_EXPIRED="Vaša sesija je istekla, molim ponovo učitajte stranu." JLIB_FILESYSTEM_ERROR_COPY_FAILED="Kopiranje nije uspjelo" @@ -301,24 +307,23 @@ JLIB_FORM_FIELD_INVALID="Neispravno polje: " JLIB_FORM_VALIDATE_FIELD_INVALID="Neispravno polje: %s" JLIB_FORM_VALIDATE_FIELD_REQUIRED="Obavezno polje: %s" JLIB_INSTALLER_ABORT="Odustajanje od instalacije jezika: %s" +JLIB_INSTALLER_ABORT_NOINSTALLPATH="Instalacijska putanja ne postoji" JLIB_INSTALLER_ABORT_PACK_INSTALL_CREATE_DIRECTORY="Instalacija paketa: Nije moguće kreiranje direktorija: %s." JLIB_INSTALLER_ABORT_PACK_INSTALL_ERROR_EXTENSION="Paket %1$s: Došlo je do greške kod instalacije dodatka: %2$s" JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES="Paket %s: Nema datoteka za instalaciju!" JLIB_INSTALLER_ERROR_FAIL_COPY_FILE="JInstaller: :Install: Nije uspjelo kopiranje datoteke %1$s u %2$s." +JLIB_INSTALLER_INSTALL="Instalacija" JLIB_INSTALLER_NOT_ERROR="Ako je greška povezana s instalacijom TinyMCE jezičnih datoteka, to nema nikakvog učinka na instalaciju jezik(a). Neki jezični paketi kreirani prije Joomla! 3.2.0 mogu pokušati instalirati odvojene TinyMCE jezične datoteke. Kako su one sada uključene u Joomla jezgru više ih nije potrebno zasebno instalirati." JLIB_UTIL_ERROR_CONNECT_DATABASE="JDatabase: :getInstance: Nije moguće spajanje na bazu podataka
joomla.library: %1$s - %2$s" - ; Strings for the language debugger JDEBUG_LANGUAGE_FILES_IN_ERROR="Greške raščlanjivanja u jezičnim datotekama" JDEBUG_LANGUAGE_UNTRANSLATED_STRING="Neprevedeni nizovi" JNONE="Ništa" - ; Necessary for errors ADMIN_EMAIL="E-mail administratora" ADMIN_PASSWORD="Lozinka administratora" ADMIN_PASSWORD2="Potvrda lozinke administratora" SITE_NAME="Ime stranice" - ; Database types (allows for a more descriptive label than the internal name) MYSQL="MySQL" MYSQLI="MySQLi" @@ -329,17 +334,15 @@ POSTGRESQL="PostgreSQL" SQLAZURE="Microsoft SQL Azure" SQLITE="SQLite" SQLSRV="Microsoft SQL Server" - ; Javascript message titles ERROR="Greška" MESSAGE="Poruka" NOTICE="Obavijest" WARNING="Upozorenje" - ; Javascript ajax error messages JLIB_JS_AJAX_ERROR_CONNECTION_ABORT="Došlo je do prekida veze prilikom dohvaćanja JSON podataka." JLIB_JS_AJAX_ERROR_NO_CONTENT="Nema vraćenog sadržaja." JLIB_JS_AJAX_ERROR_OTHER="Greška kod dohvaćanja JSON podataka: HTTP %s status kôd." -JLIB_JS_AJAX_ERROR_PARSE="Greška prilikom procesiranja JSON podataka:
%s" +JLIB_JS_AJAX_ERROR_PARSE="Greška prilikom procesiranja JSON podataka:
%s" JLIB_JS_AJAX_ERROR_TIMEOUT="Isteklo je vrijeme za dohvaćanje JSON podataka." diff --git a/installation/language/hr-HR/hr-HR.xml b/installation/language/hr-HR/hr-HR.xml index ebeb5519892..dd9b69de55e 100644 --- a/installation/language/hr-HR/hr-HR.xml +++ b/installation/language/hr-HR/hr-HR.xml @@ -1,21 +1,19 @@ - - Croatian (Hrvatski) - 3.9.17 - March 2020 - Croatian Translation Team + + Croatian (Croatia) + 3.9.23 + November 2020 + Joomla! Hrvatska team Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt hr-HR.ini - Croatian (hr-HR) - Croatian (Hrvatska) + Croatian (Croatia) + Hrvatski (Hrvatska) hr-HR 0 - + diff --git a/installation/language/nl-NL/nl-NL.ini b/installation/language/nl-NL/nl-NL.ini index 72e21744869..581808e72d9 100644 --- a/installation/language/nl-NL/nl-NL.ini +++ b/installation/language/nl-NL/nl-NL.ini @@ -11,12 +11,10 @@ INSTL_STEP_FTP_LABEL="FTP" INSTL_STEP_LANGUAGES_LABEL="Installeer taal" INSTL_STEP_SITE_LABEL="Configuratie" INSTL_STEP_SUMMARY_LABEL="Samenvatting" - ;Language view INSTL_SELECT_LANGUAGE_TITLE="Selecteer taal" INSTL_WARNJAVASCRIPT="Waarschuwing! JavaScript dient ingeschakeld te zijn voor een juiste installatie van Joomla!" INSTL_WARNJSON="In de PHP installatie dient JSON ingeschakeld te zijn om Joomla te kunnen installeren!" - ;Preinstall view INSTL_PRECHECK_TITLE="Pre-installatie controle" INSTL_PRECHECK_DESC="Indien één van deze items niet ondersteund wordt (weergegeven als Nee) neem dan de nodige stappen om dit te corrigeren.
Joomla! kan niet geïnstalleerd worden wanneer de instellingen niet aan de onderstaande vereisten voldoen." @@ -25,7 +23,6 @@ INSTL_PRECHECK_RECOMMENDED_SETTINGS_DESC="Deze PHP instellingen worden aanbevole INSTL_PRECHECK_DIRECTIVE="Richtlijn" INSTL_PRECHECK_RECOMMENDED="Aanbevolen" INSTL_PRECHECK_ACTUAL="Huidige waarde" - ; Database view INSTL_DATABASE="Database configuratie" INSTL_DATABASE_ERROR_POSTGRESQL_QUERY="PostgreSQL database-query is mislukt." @@ -48,8 +45,6 @@ INSTL_DATABASE_TYPE_DESC="Dit is waarschijnlijk \"MySQLi\"." INSTL_DATABASE_TYPE_LABEL="Databasetype" INSTL_DATABASE_USER_DESC="Een gebruikersnaam door uzelf aangemaakt, of een gebruikersnaam die door de webhost is doorgegeven." INSTL_DATABASE_USER_LABEL="Gebruikersnaam" - - ;FTP view INSTL_AUTOFIND_FTP_PATH="Automatisch FTP pad zoeken" INSTL_FTP="FTP configuratie" @@ -66,7 +61,6 @@ INSTL_VERIFY_FTP_SETTINGS="Bevestig FTP instellingen" INSTL_FTP_SETTINGS_CORRECT="De instellingen zijn juist" INSTL_FTP_USER_DESC="Waarschuwing! Aanbevolen wordt dit leeg te laten en uw FTP gebruikersnaam telkens in te vullen wanneer u bestanden overbrengt." INSTL_FTP_PASSWORD_DESC="Waarschuwing! Aanbevolen wordt dit leeg te laten en uw FTP wachtwoord telkens in te vullen wanneer u bestanden overbrengt." - ;Site View INSTL_SITE="Hoofdconfiguratie" INSTL_ADMIN_EMAIL_LABEL="E-mailadres" @@ -97,7 +91,6 @@ INSTL_SAMPLE_DATA_SET_DESC="Installeer Joomla met één pagina (een menu met een INSTL_SAMPLE_LEARN_SET_DESC="Installeer Joomla met voorbeeldartikelen die beschrijven hoe Joomla werkt." INSTL_SAMPLE_TESTING_SET_DESC="Installeer Joomla met alle mogelijke menu-items om te helpen met het testen van Joomla." INSTL_SUPER_USER_TITLE="Account details van de Supergebruiker" - ;Summary view INSTL_FINALISATION="Voltooien" INSTL_SUMMARY_INSTALL="Installeren" @@ -105,7 +98,6 @@ INSTL_SUMMARY_EMAIL_LABEL="E-mail instellingen" INSTL_SUMMARY_EMAIL_DESC="Verzend de onderstaande instellingen na de installatie in een e-mailbericht naar %s." INSTL_SUMMARY_EMAIL_PASSWORDS_LABEL="Voeg de wachtwoorden in het e-mailbericht toe" INSTL_SUMMARY_EMAIL_PASSWORDS_DESC="Waarschuwing! Het wordt aanbevolen om geen wachtwoorden te versturen en te bewaren in e-mailberichten." - ;Installing view INSTL_INSTALLING="Installeren..." INSTL_INSTALLING_DATABASE_BACKUP="Back-up maken van oude databasetabellen" @@ -114,12 +106,10 @@ INSTL_INSTALLING_DATABASE="Databasetabellen maken" INSTL_INSTALLING_SAMPLE="Installeren voorbeelddata" INSTL_INSTALLING_CONFIG="Configuratiebestand maken" INSTL_INSTALLING_EMAIL="E-mail verzenden naar %s" - ;Email INSTL_EMAIL_SUBJECT="Configuratiegegevens: %s" INSTL_EMAIL_HEADING="Hieronder vindt u de instellingen van de nieuwe geïnstalleerde Joomla! website:" INSTL_EMAIL_NOT_SENT="E-mail kan niet verzonden worden." - ;Complete view INSTL_COMPLETE_ADMINISTRATION_LOGIN_DETAILS="Inloggegevens beheergedeelte" INSTL_COMPLETE_ERROR_FOLDER_ALREADY_REMOVED="De map \"%s\" is al verwijderd." @@ -132,7 +122,6 @@ INSTL_COMPLETE_REMOVE_FOLDER="Verwijder de map \"%s\"" INSTL_COMPLETE_REMOVE_INSTALLATION="VERWIJDER NU DE VOLLEDIGE INSTALLATION-MAP VAN DE SERVER.
U kunt niet verdergaan als deze \"%s\"-map niet is verwijderd. Dit is een veiligheidsinstelling van Joomla!" INSTL_COMPLETE_TITLE="Gefeliciteerd! Joomla! is nu geïnstalleerd." INSTL_COMPLETE_INSTALL_LANGUAGES="Extra stappen: Installeer talen" - ;Languages view INSTL_LANGUAGES="Installeer taalpakketten" INSTL_LANGUAGES_COLUMN_HEADER_LANGUAGE="Taal" @@ -145,7 +134,6 @@ INSTL_LANGUAGES_NO_LANGUAGE_SELECTED="Er zijn geen talen om te installeren gesel INSTL_LANGUAGES_WARNING_NO_INTERNET="Joomla! kan geen verbinding maken met de taalserver. Voltooi de installatieprocedure." INSTL_LANGUAGES_WARNING_NO_INTERNET2="Let op: Taalpakketten kunnen later vanaf het beheergedeelte geïnstalleerd worden" INSTL_LANGUAGES_WARNING_BACK_BUTTON="Ga terug naar de laatste installatiestap" - ;Default language view INSTL_DEFAULTLANGUAGE_ACTIVATE_MULTILANGUAGE="Activeer de meertalige functionaliteit" INSTL_DEFAULTLANGUAGE_ACTIVATE_MULTILANGUAGE_DESC="Indien geactiveerd wordt de meertalige functionaliteit van de Joomla website ingeschakeld met voor iedere geïnstalleerde taal een bijbehorend menu." @@ -181,10 +169,8 @@ INSTL_DEFAULTLANGUAGE_INSTALL_LOCALISED_CONTENT_DESC="Indien geactiveerd zal Joo INSTL_DEFAULTLANGUAGE_MULTILANGUAGE_TITLE="Meertalig" INSTL_DEFAULTLANGUAGE_MULTILANGUAGE_DESC="Dit gedeelte maakt het mogelijk om de meertalige functionaliteit van Joomla! te activeren" INSTL_DEFAULTLANGUAGE_TRY_LATER="U kunt deze later vanaf het beheergedeelte installeren" - ; IMPORTANT NOTE FOR TRANSLATORS: Do not literally translate this line, instead add the localised name of the language. For example Spanish will be Español INSTL_DEFAULTLANGUAGE_NATIVE_LANGUAGE_NAME="Nederlands" - ;Database Model INSTL_DATABASE_COULD_NOT_CONNECT="Er kan geen verbinding worden gemaakt met de database. Foutnummer: %s" INSTL_DATABASE_COULD_NOT_CREATE_DATABASE="De installatie kan niet met de gespecificeerde database verbinden en kan geen database aanmaken. Controleer uw instellingen en maak, indien nodig, handmatig de database aan." @@ -210,18 +196,14 @@ INSTL_DATABASE_INVALID_NAME="In MySQL versies ouder dan 5.1.6 mogen in de naam g INSTL_DATABASE_NAME_INVALID_SPACES="MySQL databasenamen en tabelnamen mogen niet beginnen of eindigen met een spatie." INSTL_DATABASE_NAME_INVALID_CHAR="Een MySQL identifier kan geen NULL ASCII(0x00) bevatten." INSTL_DATABASE_FILE_DOES_NOT_EXIST="Bestand %s bestaat niet" - ;controllers INSTL_COOKIES_NOT_ENABLED="Cookies zijn uitgeschakeld in uw browser. Om de toepassing te installeren moeten cookies ingeschakeld zijn. Eventueel kan dit ook een gevolg zijn van een probleem met de server's session.save_path. Indien dit het geval is neem dan contact op met uw webhost wanneer u niet weet hoe u dit probleem zelf kunt oplossen." INSTL_HEADER_ERROR="Fout" - ;Helpers INSTL_PAGE_TITLE="Joomla! Webinstallatie" - ;Configuration model INSTL_ERROR_CONNECT_DB="Er kan geen verbinding worden gemaakt met de database. Connector geeft foutnummer %s terug" INSTL_STD_OFFLINE_MSG="Deze site is niet beschikbaar wegens onderhoud.
Probeert u het later nog eens." - ;FTP model INSTL_FTP_INVALIDROOT="De opgegeven FTP map is niet de map van deze Joomla! installatie" INSTL_FTP_NOCONNECT="Kan niet verbinden met de FTP server" @@ -238,7 +220,6 @@ INSTL_FTP_NOROOT="De opgegeven FTP map kan niet bereikt worden." INSTL_FTP_NOSTOR="De functie \"STOR\" is mislukt." INSTL_FTP_NOSYST="De functie \"SYST\" is mislukt." INSTL_FTP_UNABLE_DETECT_ROOT_FOLDER="Kan FTP rootmap niet automatisch vinden." - ;others INSTL_CONFPROBLEM="Uw configuratiebestand of map is niet schrijfbaar of er is een probleem bij het aanmaken hiervan. U dient volgende code handmatig te uploaden. Klik in het tekstvak om alle code te kopiëren, en plak de code in een nieuw bestand. Noem dit bestand 'configuration.php' en upload deze naar de rootmap van uw website." INSTL_DATABASE_SUPPORT="Database ondersteuning:" @@ -267,7 +248,6 @@ INSTL_XML_SUPPORT="XML ondersteuning" INSTL_ZIP_SUPPORT_AVAILABLE="Oorspronkelijke ZIP ondersteuning" INSTL_ZLIB_COMPRESSION_SUPPORT="Zlib compressie ondersteuning" INSTL_PROCESS_BUSY="Verwerking is bezig. Even geduld..." - ;Global strings JADMINISTRATOR="Administrator" JCHECK_AGAIN="Controleer opnieuw" @@ -288,7 +268,6 @@ JPREVIOUS="Vorige" JSITE="Site" JUSERNAME="Gebruikersnaam" JYES="Ja" - ; Framework strings necessary when no lang pack is available JLIB_DATABASE_ERROR_CONNECT_MYSQL="Kan niet met MySQL verbinden." JLIB_DATABASE_ERROR_DATABASE="Er vond een databasefout plaats." @@ -301,24 +280,23 @@ JLIB_FORM_FIELD_INVALID="Ongeldig veld: " JLIB_FORM_VALIDATE_FIELD_INVALID="Ongeldig veld: %s" JLIB_FORM_VALIDATE_FIELD_REQUIRED="Verplicht veld: %s" JLIB_INSTALLER_ABORT="Installeren taal afgebroken: %s" +JLIB_INSTALLER_ABORT_NOINSTALLPATH="Installatiepad bestaat niet" JLIB_INSTALLER_ABORT_PACK_INSTALL_CREATE_DIRECTORY="Pakket installeren: Aanmaken map: %s mislukt." JLIB_INSTALLER_ABORT_PACK_INSTALL_ERROR_EXTENSION="Pakket %1$s: Er deed zich een fout voor tijdens het installeren van een extensie: %2$s" JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES="Pakket %s: Er zijn geen bestanden om te installeren!" JLIB_INSTALLER_ERROR_FAIL_COPY_FILE="JInstaller: :Installeren: Kopiëren bestand %1$s naar %2$s mislukt." +JLIB_INSTALLER_INSTALL="Installeren" JLIB_INSTALLER_NOT_ERROR="Wanneer deze foutmelding betrekking heeft op de installatie van TinyMCE taalbestanden heeft dit geen effect op de installatie van de ta(a)l(en). Sommige taalpakketten die gemaakt zijn voor oudere versies dan Joomla! 3.2.0 bevatten aparte TinyMCE taalbestanden. Deze hoeven niet langer apart geïnstalleerd te worden omdat Joomla core deze al bevat." JLIB_UTIL_ERROR_CONNECT_DATABASE="JDatabase: :getInstance: Kan niet verbinden met de database
joomla.library: %1$s - %2$s" - ; Strings for the language debugger JDEBUG_LANGUAGE_FILES_IN_ERROR="Pars-fouten in taalbestanden" JDEBUG_LANGUAGE_UNTRANSLATED_STRING="Onvertaalde strings" JNONE="Geen" - ; Necessary for errors ADMIN_EMAIL="E-mailadres administrator" ADMIN_PASSWORD="Wachtwoord administrator" ADMIN_PASSWORD2="Bevestig wachtwoord administrator" SITE_NAME="Site naam" - ; Database types (allows for a more descriptive label than the internal name) MYSQL="MySQL" MYSQLI="MySQLi" @@ -329,13 +307,11 @@ POSTGRESQL="PostgreSQL" SQLAZURE="Microsoft SQL Azure" SQLITE="SQLite" SQLSRV="Microsoft SQL Server" - ; Javascript message titles ERROR="Fout" MESSAGE="Bericht" NOTICE="Opmerking" WARNING="Waarschuwing" - ; Javascript ajax error messages JLIB_JS_AJAX_ERROR_CONNECTION_ABORT="De verbinding is verbroken bij het ophalen van de JSON-gegevens." JLIB_JS_AJAX_ERROR_NO_CONTENT="Er is geen inhoud teruggegeven." diff --git a/installation/language/nl-NL/nl-NL.xml b/installation/language/nl-NL/nl-NL.xml index 3a82c5150e1..12cb96022db 100644 --- a/installation/language/nl-NL/nl-NL.xml +++ b/installation/language/nl-NL/nl-NL.xml @@ -3,8 +3,8 @@ version="3.9" client="installation"> Nederlands (Dutch) - 3.9.17 - March 2020 + 3.9.23 + November 2020 Dutch Translation Team Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/installation/language/sl-SI/sl-SI.ini b/installation/language/sl-SI/sl-SI.ini index 4d6ccb68084..6e493f64995 100644 --- a/installation/language/sl-SI/sl-SI.ini +++ b/installation/language/sl-SI/sl-SI.ini @@ -11,45 +11,40 @@ INSTL_STEP_FTP_LABEL="FTP" INSTL_STEP_LANGUAGES_LABEL="Namestite jezike" INSTL_STEP_SITE_LABEL="Nastavitve" INSTL_STEP_SUMMARY_LABEL="Pregled" - ;Language view INSTL_SELECT_LANGUAGE_TITLE="Izberite jezik" INSTL_WARNJAVASCRIPT="Opozorilo! Javascript mora biti omogočen za pravilno namestitev Joomla!" INSTL_WARNJSON="Vaša PHP namestitev mora imeti JSON omogočeno, za namestitev Joomla!" - ;Preinstall view INSTL_PRECHECK_TITLE="Pre-namestitveno preverjanje" -INSTL_PRECHECK_DESC="Če kateri koli od teh elementov ni podprt (označena kot ne) potem prosim izvedite ukrepe za njihovo odpravljanje. < br / > Ne morete namestiti Joomla! dokler vaše nastavitve ne izpolnjujejo spodaj navedene zahteve." +INSTL_PRECHECK_DESC="Če kateri koli od teh elementov ni podprt (označena kot ne) potem prosim izvedite ukrepe za njihovo odpravljanje. < br / > Ne morete namestiti Joomla! dokler vaše nastavitve ne izpolnjujejo spodaj navedene zahteve." INSTL_PRECHECK_RECOMMENDED_SETTINGS_TITLE="Priporočene nastavitve:" INSTL_PRECHECK_RECOMMENDED_SETTINGS_DESC="Te nastavitve se priporočajo za PHP, da bi zagotovili popolno združljivost z Joomla.
Vendar bo Joomla! še vedno delovala, če se vaše nastavitve povsem ne ujemajo priporočeno konfiguracijo." INSTL_PRECHECK_DIRECTIVE="Direktiva" INSTL_PRECHECK_RECOMMENDED="Zahtevano" INSTL_PRECHECK_ACTUAL="Dejansko" - ; Database view INSTL_DATABASE="Nastavitev baze podatkov" INSTL_DATABASE_ERROR_POSTGRESQL_QUERY="PostgreSQL poizvedba zbirke podatkov ni uspela." -INSTL_DATABASE_HOST_DESC="To je običajno "_QQ_"localhost"_QQ_" ali ime vašega gostitelja." +INSTL_DATABASE_HOST_DESC="To je običajno \"localhost\" ali ime vašega gostitelja." INSTL_DATABASE_HOST_LABEL="Ime gostitelja" -INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_CREATE_FILE="Iz neznanega razloga nismo mogli ustvariti datoteke. Prosimo ročno ustvarite datoteko z imenom "_QQ_"%1$s"_QQ_" in jo naložite v "_QQ_"%2$s"_QQ_" mapo v vaši Joomla strani." -INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_DELETE_FILE="Za potrditev da ste lastnik te spletne strani, izbrišite datoteko z imenom "_QQ_"%1$s"_QQ_" ki smo jo pravkar ustvarili v "_QQ_"%2$s"_QQ_" mapi na vaši Joomla spletni strani." -INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_GENERAL_MESSAGE="Želite uporabljati strežnik zbirke podatkov, ki ni v lokalnem strežniku. Zaradi varnostnih razlogov, morate preveriti lastništvo računa vašeg gostovanje. Prosimo, preberite dokumentacijo za več informacij." +INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_CREATE_FILE="Iz neznanega razloga nismo mogli ustvariti datoteke. Prosimo ročno ustvarite datoteko z imenom \"%1$s\" in jo naložite v \"%2$s\" mapo v vaši Joomla strani." +INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_DELETE_FILE="Za potrditev da ste lastnik te spletne strani, izbrišite datoteko z imenom \"%1$s\" ki smo jo pravkar ustvarili v \"%2$s\" mapi na vaši Joomla spletni strani." +INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_GENERAL_MESSAGE="Želite uporabljati strežnik zbirke podatkov, ki ni v lokalnem strežniku. Zaradi varnostnih razlogov, morate preveriti lastništvo računa vašeg gostovanje. Prosimo, preberite dokumentacijo za več informacij." INSTL_DATABASE_NAME_DESC="Nekateri gostitelji omogočajo le določeno DB ime na stran. Uporaba predpone tabele v tem primeru za izrazito Joomla! strani." INSTL_DATABASE_NAME_LABEL="Ime baze podatkov" INSTL_DATABASE_NO_SCHEMA="Za to vrsto baze podatkov ne obstaja nobena shema baz podatkov." -INSTL_DATABASE_OLD_PROCESS_DESC=""_QQ_"Backup"_QQ_" ali "_QQ_"Odstrani"_QQ_" vse obstoječe tabele iz prejšnjega Joomla! namestitve z istim "_QQ_"Tabele Prefix"_QQ_"." +INSTL_DATABASE_OLD_PROCESS_DESC="\"Backup\" ali \"Odstrani\" vse obstoječe tabele iz prejšnjega Joomla! namestitve z istim \"Tabele Prefix\"." INSTL_DATABASE_OLD_PROCESS_LABEL="Stara baza podatkov proces" INSTL_DATABASE_PASSWORD_DESC="Za varnost strani je uporaba gesla računa zbirke podatkov obvezna." INSTL_DATABASE_PASSWORD_LABEL="Geslo" INSTL_DATABASE_PREFIX_DESC="Ustvari predpono tabele ali uporabite eno naključno ustvarjeno. V idealnem štiri ali pet znakov, lahko vsebuje samo alfanumerične znake in se morajo končati z podčrtajem. Prepričajte se, da se izbrana predpona ne uporablja že pri drugih tabelah." INSTL_DATABASE_PREFIX_LABEL="Predpona tabele" INSTL_DATABASE_PREFIX_MSG="Predpona tabela mora začeti s črko lahko sledijo poljubne črke in številke in podčrtaj" -INSTL_DATABASE_TYPE_DESC="To je verjetno "_QQ_"MySQLi"_QQ_"." +INSTL_DATABASE_TYPE_DESC="To je verjetno \"MySQLi\"." INSTL_DATABASE_TYPE_LABEL="Tip baze podatkov" -INSTL_DATABASE_USER_DESC="Bodisi nekaj kot "_QQ_"root"_QQ_" ali uporabniško ime, ki ga zagotavlja vaš gostitelj." +INSTL_DATABASE_USER_DESC="Bodisi nekaj kot \"root\" ali uporabniško ime, ki ga zagotavlja vaš gostitelj." INSTL_DATABASE_USER_LABEL="Uporabniško ime" - - ;FTP view INSTL_AUTOFIND_FTP_PATH="Samodejno Najdi FTP pot" INSTL_FTP="FTP nastavitev" @@ -60,13 +55,12 @@ INSTL_FTP_PASSWORD_LABEL="FTP Geslo" INSTL_FTP_PORT_LABEL="FTP Vrata" INSTL_FTP_ROOT_LABEL="FTP Korenska pot" INSTL_FTP_SAVE_LABEL="Shrani FTP geslo" -INSTL_FTP_TITLE="FTP nastavitve ( Neobvezno - Večina uporabnikov lahko ta korak preskoči - Pritisniti Naprej za Preskoči )" +INSTL_FTP_TITLE="FTP nastavitve ( Neobvezno - Večina uporabnikov lahko ta korak preskoči - Pritisniti Naprej za Preskoči )" INSTL_FTP_USER_LABEL="FTP uporabniško ime" INSTL_VERIFY_FTP_SETTINGS="Preverite FTP nastavitev" INSTL_FTP_SETTINGS_CORRECT="Korekcija nastavitev" INSTL_FTP_USER_DESC="OPOZORILO! Priporočljivo je, da pustite to prazno in vnesite FTP uporabniško ime vsakič, ko prenašate datoteke." INSTL_FTP_PASSWORD_DESC="OPOZORILO! Priporočljivo je, da pustite to prazno in vnesite FTP uporabniško ime vsakič, ko prenašate datoteke." - ;Site View INSTL_SITE="Glavna nastavitev" INSTL_ADMIN_EMAIL_LABEL="E-mail" @@ -97,7 +91,6 @@ INSTL_SAMPLE_DATA_SET_DESC="Namestite Joomla z eno stranjo (meni z eno povezavo) INSTL_SAMPLE_LEARN_SET_DESC="Namestite Joomla z vzorčnimi prispevki, ki opisujejo, kako Joomla dela." INSTL_SAMPLE_TESTING_SET_DESC="Namestite Joomla z vsemi možnimi meniji za pomoč pri testiranju Joomla." INSTL_SUPER_USER_TITLE="Super uporabnik podrobnosti računa" - ;Summary view INSTL_FINALISATION="Dokončanje" INSTL_SUMMARY_INSTALL="Namestite" @@ -105,7 +98,6 @@ INSTL_SUMMARY_EMAIL_LABEL="Nastavitev e-maila" INSTL_SUMMARY_EMAIL_DESC="Pošlji nastavitve za %s po e-pošti po namestitvi." INSTL_SUMMARY_EMAIL_PASSWORDS_LABEL="Vključi gesla v e-pošti" INSTL_SUMMARY_EMAIL_PASSWORDS_DESC="OPOZORILo! Priporočljivo je, da ne pošiljate in shranjujete gesel v e-pošti." - ;Installing view INSTL_INSTALLING="Nameščam...." INSTL_INSTALLING_DATABASE_BACKUP="Varnostno kopiranje stare tabele zbirke podatkov" @@ -114,25 +106,22 @@ INSTL_INSTALLING_DATABASE="Ustvari tabele zbirke podatkov" INSTL_INSTALLING_SAMPLE="Nameščanje vzorčnih podatkov" INSTL_INSTALLING_CONFIG="Ustvarjanje konfiguracijske datoteke" INSTL_INSTALLING_EMAIL="Pošiljanje e-pošte za %s" - ;Email INSTL_EMAIL_SUBJECT="Konfiguracija Podrobnosti: %s" INSTL_EMAIL_HEADING="Spodaj lahko najdete nastavitve za novo namestitev Joomla! Spletna stran:" INSTL_EMAIL_NOT_SENT="Podatki Administrativne prijave" - ;Complete view INSTL_COMPLETE_ADMINISTRATION_LOGIN_DETAILS="Podatki Administrativne prijave" -INSTL_COMPLETE_ERROR_FOLDER_ALREADY_REMOVED=""_QQ_"%s"_QQ_" mapa je že izbrisana." +INSTL_COMPLETE_ERROR_FOLDER_ALREADY_REMOVED="\"%s\" mapa je že izbrisana." INSTL_COMPLETE_ERROR_FOLDER_DELETE="\"%s\" mapo ni bilo mogoče izbrisati. Prosimo ročno izbrišite mapo." INSTL_COMPLETE_FOLDER_REMOVED="\"%s\" mapa je odstranjena." INSTL_COMPLETE_LANGUAGE_1="Joomla! v vašem jeziku in/ali ustvarjanje samodejno osnovne native večjezične strani" -INSTL_COMPLETE_LANGUAGE_DESC="Preden odstranite "_QQ_"%s"_QQ_" mapo, lahko namestite dodatne jezike. Če želite dodati dodatne jezike za vašo Joomla! aplikacijo izberite naslednji gumb." +INSTL_COMPLETE_LANGUAGE_DESC="Preden odstranite \"%s\" mapo, lahko namestite dodatne jezike. Če želite dodati dodatne jezike za vašo Joomla! aplikacijo izberite naslednji gumb." INSTL_COMPLETE_LANGUAGE_DESC2="Opomba: potrebovali boste dostop do interneta za Joomla! prenesti in namestiti nove jezike.
nekaterih strežnika konfiguracije ne dovoli Joomla! namestite na jezike. Če je to vaš primer, ne skrbite, boste lahko namestite pozneje z Joomla! Skrbnik." -INSTL_COMPLETE_REMOVE_FOLDER="Odstrani "_QQ_"%s"_QQ_" mapo" -INSTL_COMPLETE_REMOVE_INSTALLATION="PROSIM NE POZABITE POPOLNOMA ODSTRANITI INSTALLATION MAPO.
Ne boste mogli nadaljevati po tej točki, dokler ni "_QQ_"%s"_QQ_" mapa odstranjena. To je varnostna funkcija, Joomla!" +INSTL_COMPLETE_REMOVE_FOLDER="Odstrani \"%s\" mapo" +INSTL_COMPLETE_REMOVE_INSTALLATION="PROSIM NE POZABITE POPOLNOMA ODSTRANITI INSTALLATION MAPO.
Ne boste mogli nadaljevati po tej točki, dokler ni \"%s\" mapa odstranjena. To je varnostna funkcija, Joomla!" INSTL_COMPLETE_TITLE="Čestitamo! Joomla! je zdaj nameščena." INSTL_COMPLETE_INSTALL_LANGUAGES="Dodatni koraki: Namestitev jezikov" - ;Languages view INSTL_LANGUAGES="Namestite jezikovni paket" INSTL_LANGUAGES_COLUMN_HEADER_LANGUAGE="Jezik" @@ -145,7 +134,6 @@ INSTL_LANGUAGES_NO_LANGUAGE_SELECTED="Nobena jeziku so bila izbrana za namešča INSTL_LANGUAGES_WARNING_NO_INTERNET="Joomla! se ne more povezati s strežnikom jezikov. Prosimo, dokončajte namestitev." INSTL_LANGUAGES_WARNING_NO_INTERNET2="OPOMBA: Jezike lahko namestite, pozneje preko Joomla! skrbništva" INSTL_LANGUAGES_WARNING_BACK_BUTTON="Vrni se na zadnji korak namestitve" - ;Default language view INSTL_DEFAULTLANGUAGE_ACTIVATE_MULTILANGUAGE="Aktivirajte večjezično funkcijo" INSTL_DEFAULTLANGUAGE_ACTIVATE_MULTILANGUAGE_DESC="Če je aktiven, vaše spletne strani Joomla so večjezično funkcijo aktivne s lokaliziranih meniji za vsak nameščeni jezik." @@ -181,10 +169,8 @@ INSTL_DEFAULTLANGUAGE_INSTALL_LOCALISED_CONTENT_DESC="Če je aktivno, bo Joomla INSTL_DEFAULTLANGUAGE_MULTILANGUAGE_TITLE="Večjezično" INSTL_DEFAULTLANGUAGE_MULTILANGUAGE_DESC="Ta oddelek vam omogoča, da samodejno aktivirate Joomla! večjezične funkcije." INSTL_DEFAULTLANGUAGE_TRY_LATER="Morda ne boste mogli namestiti pozneje preko Joomla! skrbništva" - ; IMPORTANT NOTE FOR TRANSLATORS: Do not literally translate this line, instead add the localised name of the language. For example Spanish will be Español INSTL_DEFAULTLANGUAGE_NATIVE_LANGUAGE_NAME="Slovenščina (SL)" - ;Database Model INSTL_DATABASE_COULD_NOT_CONNECT="Ne morem se povezati z bazo podatkov. Povezava je vrnila številko: %s" INSTL_DATABASE_COULD_NOT_CREATE_DATABASE="Namestitveni program se ni mogel povezati z določeno zbirko podatkov in ni uspel ustvariti zbirke podatkov. Preverite nastavitve in če je potrebno ročno ustvarite zbirko podatkov." @@ -210,37 +196,32 @@ INSTL_DATABASE_INVALID_NAME="MySQL različice do 5.1.6, ne smejo vsebovati obdob INSTL_DATABASE_NAME_INVALID_SPACES="MySQL ime baze in imena tabele se ne sme začeti ali končati s presledki." INSTL_DATABASE_NAME_INVALID_CHAR="MySQL indifikator lahko vsebujejo NULL ASCII(0x00)." INSTL_DATABASE_FILE_DOES_NOT_EXIST="Datoteka %s ne obstaja" - ;controllers INSTL_COOKIES_NOT_ENABLED="Zdi se da Piškotki niso omogočeni v vašem brskalniku. Ne boste mogli namestiti aplikacijo če je ta funkcija onemogočena. Druga možnost je, da bi lahko bil tudi problem s strežnikom session.save_path. Če je temu tako, se obrnite na svojega ponudnika gostovanja, če ne veste, sami kako to preveriti ali popraviti." INSTL_HEADER_ERROR="Error" - ;Helpers INSTL_PAGE_TITLE="Joomla! spletna namestitev" - ;Configuration model INSTL_ERROR_CONNECT_DB="Ne morem se povezati z bazo podatkov. Povezava je vrnila številko: %s" INSTL_STD_OFFLINE_MSG="Ta stran je v vzdrževanju.
Prosimo pridite spet kmalu nazaj." - ;FTP model INSTL_FTP_INVALIDROOT="Določena FTP mapa ni mapa to Joomla! namestitev" INSTL_FTP_NOCONNECT="Ne morem se povezati s FTP strežnikom" -INSTL_FTP_NODELE="Funkcija "_QQ_"DELE"_QQ_" ni uspela." +INSTL_FTP_NODELE="Funkcija \"DELE\" ni uspela." INSTL_FTP_NODIRECTORYLISTING="Seznam iz strežnika FTP mapo ni bilo mogoče pridobiti." -INSTL_FTP_NOLIST="Funkcija "_QQ_"LIST"_QQ_" ni uspela." +INSTL_FTP_NOLIST="Funkcija \"LIST\" ni uspela." INSTL_FTP_NOLOGIN="Ne morem se prijaviti v FTP strežnik." -INSTL_FTP_NOMKD="Funkcija "_QQ_"MKD"_QQ_" ni uspela." -INSTL_FTP_NONLST="Funkcija "_QQ_"NLST"_QQ_" ni uspela." -INSTL_FTP_NOPWD="Funkcija "_QQ_"PWD"_QQ_" ni uspela." -INSTL_FTP_NORETR="Funkcija "_QQ_"RETR"_QQ_" ni uspela." -INSTL_FTP_NORMD="Funkcija "_QQ_"RMD"_QQ_" ni uspela." +INSTL_FTP_NOMKD="Funkcija \"MKD\" ni uspela." +INSTL_FTP_NONLST="Funkcija \"NLST\" ni uspela." +INSTL_FTP_NOPWD="Funkcija \"PWD\" ni uspela." +INSTL_FTP_NORETR="Funkcija \"RETR\" ni uspela." +INSTL_FTP_NORMD="Funkcija \"RMD\" ni uspela." INSTL_FTP_NOROOT="Ne morem dostopati do določene mape FTP." -INSTL_FTP_NOSTOR="Funkcija "_QQ_"STOR"_QQ_" ni uspela." -INSTL_FTP_NOSYST="Funkcija "_QQ_"SYST"_QQ_" ni uspela." +INSTL_FTP_NOSTOR="Funkcija \"STOR\" ni uspela." +INSTL_FTP_NOSYST="Funkcija \"SYST\" ni uspela." INSTL_FTP_UNABLE_DETECT_ROOT_FOLDER="Ne morem samodejno zaznati FTP korensko mapo." - ;others -INSTL_CONFPROBLEM="Konfiguracijska datoteka ali mapa ni zapisljiv ali je prišlo do težave, ustvarjanje konfiguracijske datoteke. Morate naložiti naslednjo kodo z roko. Izberite na področju besedila izpostaviti vse kode in nato prilepite v novo besedilno datoteko. Ime te datoteke "_QQ_"configuration.php"_QQ_" in naložite vašo stran korensko mapo." +INSTL_CONFPROBLEM="Konfiguracijska datoteka ali mapa ni zapisljiv ali je prišlo do težave, ustvarjanje konfiguracijske datoteke. Morate naložiti naslednjo kodo z roko. Izberite na področju besedila izpostaviti vse kode in nato prilepite v novo besedilno datoteko. Ime te datoteke \"configuration.php\" in naložite vašo stran korensko mapo." INSTL_DATABASE_SUPPORT="Baza podatkov Podpora:" INSTL_DISPLAY_ERRORS="Prikaz napak" INSTL_ERROR_DB="Prišlo je do nekaj napak pri pisanju v bazo podatkov: %s" @@ -254,7 +235,7 @@ INSTL_MB_LANGUAGE_IS_DEFAULT="MB Jezik je privzeti" INSTL_MB_STRING_OVERLOAD_OFF="MB Niz preobremenitve izklopljen" INSTL_NOTICEMBLANGNOTDEFAULT="PHP mbstring jezik ni nastavljen v nevtralni položaj. To je mogoče nastaviti na lokalni ravni z vnosom php_value mbstring.language neutral v vaši .htaccess datoteki." INSTL_NOTICEMBSTRINGOVERLOAD="PHP mbstring preobremenitev funkcija je nastavljena. To je mogoče izklopiti lokalno z vnosom php_value mbstring.func_overload 0 v vaši .htaccess datoteki." -INSTL_NOTICEYOUCANSTILLINSTALL="
lahko še vedno nadaljujete namestitev kot nastavitev bo prikazan na koncu. Boste morali ročno nalaganje kodo. Izberite na področju besedila izpostaviti vse kode in nato prilepite v novo besedilno datoteko. Ime te datoteke "_QQ_"configuration.php"_QQ_" in naložite vašo stran korensko mapo." +INSTL_NOTICEYOUCANSTILLINSTALL="
lahko še vedno nadaljujete namestitev kot nastavitev bo prikazan na koncu. Boste morali ročno nalaganje kodo. Izberite na področju besedila izpostaviti vse kode in nato prilepite v novo besedilno datoteko. Ime te datoteke \"configuration.php\" in naložite vašo stran korensko mapo." INSTL_OUTPUT_BUFFERING="Izhodno medpomnjenje" INSTL_PARSE_INI_FILE_AVAILABLE="INI Razčlenjevalnik Podpora" INSTL_PHP_VERSION="PHP različica" @@ -267,7 +248,6 @@ INSTL_XML_SUPPORT="XML Podpora" INSTL_ZIP_SUPPORT_AVAILABLE="Native ZIP podpora" INSTL_ZLIB_COMPRESSION_SUPPORT="Zlib stiskanje podpora" INSTL_PROCESS_BUSY="Postopek je v teku. počakajte, prosim..." - ;Global strings JADMINISTRATOR="Skrbnik" JCHECK_AGAIN="Preverite znova" @@ -288,12 +268,11 @@ JPREVIOUS="Prejšnje" JSITE="Prejšnje" JUSERNAME="Uporabniško ime" JYES="Da" - ; Framework strings necessary when no lang pack is available JLIB_DATABASE_ERROR_CONNECT_MYSQL="Ne morem se povezati z MySQL." JLIB_DATABASE_ERROR_DATABASE="Prišlo je do napake zbirke podatkov." JLIB_DATABASE_ERROR_LOAD_DATABASE_DRIVER="Ne morem naložiti gonilnikov za podatkovno bazo: %s" -JLIB_DATABASE_ERROR_VALID_MAIL="E-poštni naslov, ki ste ga vnesli, je neveljaven. Vnesite drug e-poštni naslov." +JLIB_DATABASE_ERROR_VALID_MAIL="Vneseni e-poštni naslov je neveljaven. Vnesite drug e-poštni naslov." JLIB_ENVIRONMENT_SESSION_EXPIRED="Vaša seja je potekla, prosimo ponovno naložite stran." JLIB_FILESYSTEM_ERROR_COPY_FAILED="Kopiranje ni uspelo" JLIB_FILESYSTEM_ERROR_PATH_IS_NOT_A_FOLDER_FILES="JFolder: :datoteke: Pot ni mapa. Pot: %s" @@ -301,24 +280,23 @@ JLIB_FORM_FIELD_INVALID="Neveljavno polje: " JLIB_FORM_VALIDATE_FIELD_INVALID="Neveljavno polje: %s" JLIB_FORM_VALIDATE_FIELD_REQUIRED="Polja so obvezna: %s" JLIB_INSTALLER_ABORT="Prekinjam namestitev jezika: %s" +JLIB_INSTALLER_ABORT_NOINSTALLPATH="Pot namestitve ne obstaja." +JLIB_INSTALLER_INSTALL="Namestite" JLIB_INSTALLER_ABORT_PACK_INSTALL_CREATE_DIRECTORY="Namestitev paketa: napaka pri ustvarjanju imenika: %s." JLIB_INSTALLER_ABORT_PACK_INSTALL_ERROR_EXTENSION="Paket %1$s: Prišlo je do napake med nameščanjem razširitve: %2$s" JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES="Paket %s: Ni bilo datotek za namestitev!" JLIB_INSTALLER_ERROR_FAIL_COPY_FILE="JInstaller: :Namestitev: Napaka kopiranja datoteke %1$s v %2$s." JLIB_INSTALLER_NOT_ERROR="Če se napaka povezana z namestitvijo TinyMCE jezikovnih datotek nima vpliva na namestitev jezika (-ov). Nekatere jezikovne pakete, ustvarjeni pred Joomla! 3.2.0 lahko poskusite namestiti ločene TinyMCE jezikovnih datotek. Ker so ti zdaj vključene v jedru jih ni več treba namestiti." JLIB_UTIL_ERROR_CONNECT_DATABASE="JDatabase: :getInstance: Ne morem se povezati z bazo podatkov
joomla.library: %1$s - %2$s" - ; Strings for the language debugger JDEBUG_LANGUAGE_FILES_IN_ERROR="Razčlenjevanje napak v jezikovnih datotekah" JDEBUG_LANGUAGE_UNTRANSLATED_STRING="Neprevedeni nizi" JNONE="Nič" - ; Necessary for errors ADMIN_EMAIL="E-mail skrbnika" ADMIN_PASSWORD="Geslo skrbnika" ADMIN_PASSWORD2="Potrdite geslo skrbnika" SITE_NAME="Ime strani" - ; Database types (allows for a more descriptive label than the internal name) MYSQL="MySQL " MYSQLI="MySQLi" @@ -329,17 +307,15 @@ POSTGRESQL="PostgreSQL" SQLAZURE="Microsoft SQL Azure" SQLITE="SQLite" SQLSRV="Microsoft SQL Server" - ; Javascript message titles ERROR="Napaka" MESSAGE="Sporočilo" NOTICE="Obvestilo" WARNING="Opozorilo" - ; Javascript ajax error messages JLIB_JS_AJAX_ERROR_CONNECTION_ABORT="Povezava je prekinjena do napake pri pridobivanju JSON podatkov." JLIB_JS_AJAX_ERROR_NO_CONTENT="Vsebina ni vrnjena." JLIB_JS_AJAX_ERROR_OTHER="Prišlo je do napake pri pridobivanju JSON podatkov: HTTP %s status code." -JLIB_JS_AJAX_ERROR_PARSE="Prišlo je do napake pri razčlenjevanju med obdelavo naslednjih JSON podatkov:
%s" +JLIB_JS_AJAX_ERROR_PARSE="Prišlo je do napake pri razčlenjevanju med obdelavo naslednjih JSON podatkov:
%s" JLIB_JS_AJAX_ERROR_TIMEOUT="Časovna omejitev Je potekla do napake pri pridobivanja JSON podatkov." diff --git a/installation/language/sl-SI/sl-SI.xml b/installation/language/sl-SI/sl-SI.xml index eb29e94854f..26b95b1f853 100644 --- a/installation/language/sl-SI/sl-SI.xml +++ b/installation/language/sl-SI/sl-SI.xml @@ -1,8 +1,8 @@ Slovenščina (Slovenia) - 3.9.17 - Marec 2020 + 3.9.23 + November 2020 Slovenska prevajalska ekipa Copyright (C) 2005 - 2020 Open Source Matters. Vse pravice pridržane. GNU General Public License 2 ali novejši; glej LICENSE.txt diff --git a/installation/language/sr-RS/sr-RS.ini b/installation/language/sr-RS/sr-RS.ini index e9e03fd622c..d5c17d5edd5 100644 --- a/installation/language/sr-RS/sr-RS.ini +++ b/installation/language/sr-RS/sr-RS.ini @@ -305,10 +305,12 @@ JLIB_FORM_FIELD_INVALID="Погрешно поље: " JLIB_FORM_VALIDATE_FIELD_INVALID="Погрешно поље: %s" JLIB_FORM_VALIDATE_FIELD_REQUIRED="Обавезно: %s" JLIB_INSTALLER_ABORT="Прекид инсталације језика: %s" +JLIB_INSTALLER_ABORT_NOINSTALLPATH="Инсталациона путања не постоји." JLIB_INSTALLER_ABORT_PACK_INSTALL_CREATE_DIRECTORY="Инсталација пакета: неуспело креирање директоријума: %s." JLIB_INSTALLER_ABORT_PACK_INSTALL_ERROR_EXTENSION="Пакет %1$s: Грешка приликом инсталације екстензије: %2$s" JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES="Пакет %s: Не постоје датотеке за инсталацију!" JLIB_INSTALLER_ERROR_FAIL_COPY_FILE="JInstaller: :Install: није успело копирање датотеке %1$s у %2$s." +JLIB_INSTALLER_INSTALL="Инсталација" JLIB_INSTALLER_NOT_ERROR="Ако је грешка везана за инсталацију TinyMCE језичких датотека то нема никаквог утицаја на уградњу језик(а). Неки пакети језика пре Јоомла! 3.2.0 могу покушати да инсталирају одвојене TinyMCE језичке датотеке. Они су сада укључени у основну инсталацију и више нема потребе да се инсталирају." JLIB_JS_AJAX_ERROR_CONNECTION_ABORT="Дошло је до прекида везе приликом преузимања JSON података." JLIB_JS_AJAX_ERROR_NO_CONTENT="Нема садржаја." diff --git a/installation/language/sr-RS/sr-RS.xml b/installation/language/sr-RS/sr-RS.xml index 0c7aae0c6c4..1ee5ac5d7ac 100644 --- a/installation/language/sr-RS/sr-RS.xml +++ b/installation/language/sr-RS/sr-RS.xml @@ -3,8 +3,8 @@ version="3.9" client="installation"> Serbian Cyrillic (Serbia) - 3.9.17 - March 2020 + 3.9.23 + November 2020 joomla-serbia.com Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/installation/language/sr-YU/sr-YU.ini b/installation/language/sr-YU/sr-YU.ini index af34866ec0a..de76817aecd 100644 --- a/installation/language/sr-YU/sr-YU.ini +++ b/installation/language/sr-YU/sr-YU.ini @@ -305,10 +305,12 @@ JLIB_FORM_FIELD_INVALID="Pogrešno polje: " JLIB_FORM_VALIDATE_FIELD_INVALID="Pogrešno polje: %s" JLIB_FORM_VALIDATE_FIELD_REQUIRED="Obavezno: %s" JLIB_INSTALLER_ABORT="Prekid instalacije jezika: %s" +JLIB_INSTALLER_ABORT_NOINSTALLPATH="Instalaciona putanja ne postoji." JLIB_INSTALLER_ABORT_PACK_INSTALL_CREATE_DIRECTORY="Instalacija paketa: neuspelo kreiranje direktorijuma: %s." JLIB_INSTALLER_ABORT_PACK_INSTALL_ERROR_EXTENSION="Paket %1$s: Greška prilikom instalacije ekstenzije: %2$s" JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES="Paket %s: Ne postoje datoteke za instalaciju!" JLIB_INSTALLER_ERROR_FAIL_COPY_FILE="JInstaller: :Install: nije uspelo kopiranje datoteke %1$s u %2$s." +JLIB_INSTALLER_INSTALL="Instalacija" JLIB_INSTALLER_NOT_ERROR="Ako je greška vezana za instalaciju TinyMCE jezičkih datoteka to nema nikakvog uticaja na ugradnju jezik(a). Neki paketi jezika pre Joomla! 3.2.0 mogu pokušati da instaliraju odvojene TinyMCE jezičke datoteke. Oni su sada uključeni u osnovnu instalaciju i više nema potrebe da se instaliraju." JLIB_JS_AJAX_ERROR_CONNECTION_ABORT="Došlo je do prekida veze prilikom preuzimanja JSON podataka." JLIB_JS_AJAX_ERROR_NO_CONTENT="Nema sadržaja." diff --git a/installation/language/sr-YU/sr-YU.xml b/installation/language/sr-YU/sr-YU.xml index 8e1347bdfe2..4c671d5462f 100644 --- a/installation/language/sr-YU/sr-YU.xml +++ b/installation/language/sr-YU/sr-YU.xml @@ -3,8 +3,8 @@ version="3.9" client="installation"> Serbian Latin (Serbia) - 3.9.17 - March 2020 + 3.9.23 + November 2020 joomla-serbia.com Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/installation/language/sv-SE/sv-SE.ini b/installation/language/sv-SE/sv-SE.ini index ba7efc636df..f617d88bb1d 100644 --- a/installation/language/sv-SE/sv-SE.ini +++ b/installation/language/sv-SE/sv-SE.ini @@ -4,7 +4,7 @@ ; Note : All ini files need to be saved as UTF-8 ;Stepbar -INSTL_STEP_COMPLETE_LABEL="Avsluta" +INSTL_STEP_COMPLETE_LABEL="Slutför" INSTL_STEP_DATABASE_LABEL="Databas" INSTL_STEP_DEFAULTLANGUAGE_LABEL="Välj standardspråk" INSTL_STEP_FTP_LABEL="FTP" @@ -28,23 +28,28 @@ INSTL_PRECHECK_ACTUAL="Verklig" ; Database view INSTL_DATABASE="Databasinställningar" -INSTL_DATABASE_HOST_DESC="Detta är ofta "localhost"" +INSTL_DATABASE_ERROR_POSTGRESQL_QUERY="PostgreSQL databasfrågan misslyckades." +INSTL_DATABASE_HOST_DESC="Detta är ofta "_QQ_"localhost"_QQ_" eller ett namn du fått från webhotellet." INSTL_DATABASE_HOST_LABEL="Värdnamn" +INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_CREATE_FILE="Vi kan inte skapa filen. Skapa manuellt en fil med namnet "_QQ_"%1$s"_QQ_" och ladda upp den till mappen "_QQ_"%2$s"_QQ_" på din Joomla webbplats." +INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_DELETE_FILE="För att bekräfta att du är ägare av detta webbhotellkonto, måste du radera filen "_QQ_"%1$s"_QQ_" vi just nu har skapat i mappen ”i%2$s” i din Joomla." +INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_GENERAL_MESSAGE="Du vill använda en databasvärd som inte är localhost. Av säkerhetsskäl måste du verifiera äganderätten till webhosting kontot. Ta del av dokumentationen för mer information." INSTL_DATABASE_NAME_DESC="Vissa webbhotell tillåter bara ett databasnamn per konto. Använd i så fall tabellprefix för att särskilja flera Joomla-installationer." INSTL_DATABASE_NAME_LABEL="Databasens namn" INSTL_DATABASE_NO_SCHEMA="Det finns inget databasschema för den här databastypen." -INSTL_DATABASE_OLD_PROCESS_DESC="Eventuella tidigare säkerhetskopior av tabeller från tidigare joomlainstallationer kommer att ersättas" +INSTL_DATABASE_OLD_PROCESS_DESC=""_QQ_"Backup"_QQ_" eller "_QQ_"Ta bort"_QQ_" alla befintliga tabeller från tidigare Joomla! installationer med samma "_QQ_"tabellprefix"_QQ_"." INSTL_DATABASE_OLD_PROCESS_LABEL="Hantera gammal databas" INSTL_DATABASE_PASSWORD_DESC="Av säkerhetsskäl är det obligatoriskt att använda lösenord på MySQL-kontot" INSTL_DATABASE_PASSWORD_LABEL="Lösenord" -INSTL_DATABASE_PREFIX_DESC="Välj ett tabellprefix eller använd det slumpvis genererade. Lämpligtvis, tre eller fyra tecken långt, och det MÅSTE sluta med ett understrykningstecken. Kontrollera att prefixet inte används av någon annan tabell." +INSTL_DATABASE_PREFIX_DESC="Välj ett tabellprefix eller använd det slumpvis genererade. Lämpligen, tre eller fyra tecken långt, och det MÅSTE sluta med ett understrykningstecken. Kontrollera att prefixet inte används av någon annan tabell." INSTL_DATABASE_PREFIX_LABEL="Tabellprefix" INSTL_DATABASE_PREFIX_MSG="Databasprefixet måste börja med en bokstav, följas av alfanumeriska tecken och därefter ett understrykningstecken" -INSTL_DATABASE_TYPE_DESC="Detta är vanligen "MySQLi"" +INSTL_DATABASE_TYPE_DESC="Detta är vanligen "_QQ_"MySQLi"_QQ_"" INSTL_DATABASE_TYPE_LABEL="Databastyp" -INSTL_DATABASE_USER_DESC="Antingen någonting som "_QQ_"root"_QQ_" eller ett användarnamn tillhandahållet av webbhotellet" +INSTL_DATABASE_USER_DESC="Antingen ett användarnamn du har skapat eller ett användarnamn du fått från webbhotellet." INSTL_DATABASE_USER_LABEL="Användarnamn" + ;FTP view INSTL_AUTOFIND_FTP_PATH="Hitta FTP-sökväg" INSTL_FTP="FTP-inställningar" @@ -64,14 +69,14 @@ INSTL_FTP_PASSWORD_DESC="Varning! Det rekommenderas att du lämnar fältet tomt ;Site View INSTL_SITE="Grundinställningar" -INSTL_ADMIN_EMAIL_LABEL="Din e-postadress" +INSTL_ADMIN_EMAIL_LABEL="Email" INSTL_ADMIN_EMAIL_DESC="Ange en e-postadress. Det här blir Super Administratörens e-postadress." -INSTL_ADMIN_PASSWORD_LABEL="Admin lösenord" +INSTL_ADMIN_PASSWORD_LABEL="Lösenord" INSTL_ADMIN_PASSWORD_DESC="Ange Super Administratörens lösenord och bekräfta det i fältet nedan." -INSTL_ADMIN_PASSWORD2_LABEL="Bekräfta admin lösenord" -INSTL_ADMIN_USER_LABEL="Admin användarnamn" +INSTL_ADMIN_PASSWORD2_LABEL="Bekräfta lösenord" +INSTL_ADMIN_USER_LABEL="Användarnamn" INSTL_ADMIN_USER_DESC="Du kan ändra standard användarnamn admin." -INSTL_SITE_NAME_TITLE="Webbplatsens namn" +INSTL_SITE_NAME_LABEL="Webbplatsens namn" INSTL_SITE_NAME_DESC="Ange namnet på din Joomla! webbplats." INSTL_SITE_METADESC_LABEL="Metabeskrivning" INSTL_SITE_METADESC_TITLE_LABEL="Ange en beskrivning som gäller för hela webbplatsen att användas av sökmotorer. Generellt så är max ca 20 ord optimalt." @@ -87,10 +92,11 @@ INSTL_SAMPLE_LEARN_SET="Lär dig Joomla engelsk (GB) exempelata" INSTL_SAMPLE_TESTING_SET="Test engelsk (GB) exempelata" INSTL_SITE_INSTALL_SAMPLE_NONE_DESC="Installera Joomla med endast en meny och loginformulär, utan något innehåll." INSTL_SAMPLE_BLOG_SET_DESC="Installera Joomla med endast några få artiklar och bloggrelaterade moduler såsom Gamla inlägg, Bloggroller, Mest lästa inlägg." -INSTL_SAMPLE_BROCHURE_SET_DESC="Installera Joomla med några få sidor (en meny med sidorna Hem, Om oss, Nyheter, Kontakta oss) och moduler såsom Sök, Egen, Logga in." +INSTL_SAMPLE_BROCHURE_SET_DESC="Installera Joomla med några få sidor (en meny med sidorna Hem, Om oss, Nyheter, Kontakta oss) och moduler såsom Sök, Egen HTML, Logga in." INSTL_SAMPLE_DATA_SET_DESC="Installera Joomla med en sida (en meny med en länk) och moduler såsom Senaste artiklarna, Logga in." INSTL_SAMPLE_LEARN_SET_DESC="Installera Joomla med exempelartiklar som beskriver hur Joomla fungerar." INSTL_SAMPLE_TESTING_SET_DESC="Installera Joomla med alla typer av menyobjekt för hjälp att prova Joomla." +INSTL_SUPER_USER_TITLE="Superadmins kontouppgifter" ;Summary view INSTL_FINALISATION="Slutförande" @@ -116,40 +122,42 @@ INSTL_EMAIL_NOT_SENT="Kunde inte skicka e-post." ;Complete view INSTL_COMPLETE_ADMINISTRATION_LOGIN_DETAILS="Administration inloggningsuppgifter" -INSTL_COMPLETE_ERROR_FOLDER_ALREADY_REMOVED="Installationsmappen är redan borttagen." -INSTL_COMPLETE_ERROR_FOLDER_DELETE="Installationsmappen kunde inte tas bort. Du kan ta bort den manuellt." -INSTL_COMPLETE_FOLDER_REMOVED="Installationsmappen har tagits bort" +INSTL_COMPLETE_ERROR_FOLDER_ALREADY_REMOVED="Mappen "_QQ_"%s"_QQ_" är redan borttagen." +INSTL_COMPLETE_ERROR_FOLDER_DELETE="Mappen \"%s\" kan inte tas bort. Du kan ta bort den manuellt." +INSTL_COMPLETE_FOLDER_REMOVED="Mappen \"%s\" har tagits bort." INSTL_COMPLETE_LANGUAGE_1="Joomla! på ditt eget språk?" -INSTL_COMPLETE_LANGUAGE_DESC="Innan du tar bort installationsmappen kan du installera fler språk. Om du vill lägga till fler språk till din Joomla-applikation, klicka på knappen nedan." +INSTL_COMPLETE_LANGUAGE_DESC="Innan du tar bort mappen "_QQ_"%s"_QQ_" kan du installera fler språk. Om du vill lägga till fler språk till din Joomla-applikation, klicka på knappen nedan." INSTL_COMPLETE_LANGUAGE_DESC2="OBS: Du måste ha åtkomst till Internet för att låta Joomla! ladda ner och installera flera språk.
Vissa serverkonfigurationer låter inte Joomla! installera språk. Om så är fallet för dig, finns det ingen anledning att oroa sig. Du kommer att kunna installera språk senare via Joomlas adminsida." -INSTL_COMPLETE_REMOVE_FOLDER="Ta bort installationsmappen" -INSTL_COMPLETE_REMOVE_INSTALLATION="KOM IHÅG ATT TA BORT INSTALLATIONSMAPPEN
HELT OCH HÅLLET.
Du kan inte fortsätta innan installationsmappen är borttagen. Detta är en säkerhetsfunktion i Joomla!." +INSTL_COMPLETE_REMOVE_FOLDER="Ta bort mappen "_QQ_"%s"_QQ_"" +INSTL_COMPLETE_REMOVE_INSTALLATION="KOM IHÅG ATT TA BORT INSTALLATIONSMAPPEN HELT OCH HÅLLET.
Du kan inte fortsätta innan mappen "_QQ_"%s"_QQ_" är borttagen. Detta är en säkerhetsfunktion i Joomla!" INSTL_COMPLETE_TITLE="Gratulerar! Joomla! är nu installerat." INSTL_COMPLETE_INSTALL_LANGUAGES="Extra steg: Installera språk" ;Languages view INSTL_LANGUAGES="Installera språkpaket" INSTL_LANGUAGES_COLUMN_HEADER_LANGUAGE="Språk" +INSTL_LANGUAGES_COLUMN_HEADER_LANGUAGE_TAG="Språktagg" INSTL_LANGUAGES_COLUMN_HEADER_VERSION="Version" INSTL_LANGUAGES_DESC="Joomlas gränssnitt finns tillgängligt på flera språk. Välj de språk du vill installera genom att klicka i kryssrutorna och installera dem genom att klicka på Nästa.
OBS: åtgärden kommer att ta några sekunder extra för varje språk som ska laddas ner och installeras. Du bör inte välja fler än tre språk för att undvika timeout." INSTL_LANGUAGES_MESSAGE_PLEASE_WAIT="Den här åtgärden kommer att ta upp till 10 sekunder per språk att slutföra
Vänta medan språk laddas ner och installeras..." +INSTL_LANGUAGES_MORE_LANGUAGES="Tryck på knappen 'Föregående' om du vill installera fler språk." INSTL_LANGUAGES_NO_LANGUAGE_SELECTED="Välj ett språk. Om du inte behöver installera fler språk, klicka på 'Föregående'" -INSTL_LANGUAGES_NO_LANGUAGE_SELECTED="Inga språk har valts för att installeras. Om du vill installera fler språk, klicka på knappen 'Tillbaka' och välj önskat språk i listan." -INSTL_LANGUAGES_WARNING_NO_INTERNET="Joomla! kunde inte ansluta till språkservern. Du kan fortsätta med att slutföra installationsprocessen." +INSTL_LANGUAGES_WARNING_NO_INTERNET="Joomla! kan inte ansluta till språkservern. Du kan fortsätta med att slutföra installationsprocessen." INSTL_LANGUAGES_WARNING_NO_INTERNET2="OBS: Du kommer att kunna installera språk senare via Joomlas adminsida." INSTL_LANGUAGES_WARNING_BACK_BUTTON="Gå tillbaka till föregående installationssteg" -;Defaultlanguage view +;Default language view INSTL_DEFAULTLANGUAGE_ACTIVATE_MULTILANGUAGE="Aktivera funktioner för att använda flera språk" INSTL_DEFAULTLANGUAGE_ACTIVATE_MULTILANGUAGE_DESC="Om aktiverad, kommer din Joomla-webbplats att ha funktioner för att hantera flera språk med menyer anpassade till varje installerat språk." INSTL_DEFAULTLANGUAGE_ACTIVATE_LANGUAGE_CODE_PLUGIN="Aktivera plugin för språkkod" INSTL_DEFAULTLANGUAGE_ACTIVATE_LANGUAGE_CODE_PLUGIN_DESC="Om aktiverad, kommer en plugin att aktiveras, som infogar en språkkod i URL:erna för att förbättra SEO-resultat." INSTL_DEFAULTLANGUAGE_ADMINISTRATOR="Standardspråk för backend" -INSTL_DEFAULTLANGUAGE_ADMIN_COULDNT_SET_DEFAULT="Joomla kunde inte ställa in språket som standard. Engelska kommer att användas som standardspråk för backend." +INSTL_DEFAULTLANGUAGE_ADMIN_COULDNT_SET_DEFAULT="Joomla kan inte ställa in språket som standard. Engelska kommer att användas som standardspråk för backend." INSTL_DEFAULTLANGUAGE_ADMIN_SET_DEFAULT="Joomla har satt %s som standardspråk för backend." INSTL_DEFAULTLANGUAGE_COLUMN_HEADER_SELECT="Välj" INSTL_DEFAULTLANGUAGE_COLUMN_HEADER_LANGUAGE="Språk" INSTL_DEFAULTLANGUAGE_COLUMN_HEADER_TAG="Tagg" +INSTL_DEFAULTLANGUAGE_COULD_NOT_ADD_ASSOCIATIONS="Joomla kan inte automatiskt skapa språkkopplingarna." INSTL_DEFAULTLANGUAGE_COULD_NOT_CREATE_CONTENT_LANGUAGE="Joomla kan inte automatiskt skapa inställning för språkrelaterat innehåll till %s" INSTL_DEFAULTLANGUAGE_COULD_NOT_CREATE_MENU="Joomla kan inte automatiskt skapa menyn %s" INSTL_DEFAULTLANGUAGE_COULD_NOT_CREATE_MENU_ITEM="Joomla kan inte automatiskt skapa ett menyobjekt %s för startsidan" @@ -178,22 +186,23 @@ INSTL_DEFAULTLANGUAGE_NATIVE_LANGUAGE_NAME="Svenska" ;Database Model INSTL_DATABASE_COULD_NOT_CONNECT="Kan inte ansluta till databasen. Anslutningen returnerar felkod: %s" -INSTL_DATABASE_COULD_NOT_REFRESH_MANIFEST_CACHE="Kan inte rensa manifest-cache för tillägg: %s" INSTL_DATABASE_COULD_NOT_CREATE_DATABASE="Installeraren kan inte ansluta till den angivna databasen och kan inte skapa databasen. Kontrollera dina inställningar och om det är nödvändigt, skapa databasen manuellt." -INSTL_DATABASE_EMPTY_NAME="" +INSTL_DATABASE_COULD_NOT_REFRESH_MANIFEST_CACHE="Kan inte rensa manifest-cache för tillägg: %s" +INSTL_DATABASE_EMPTY_NAME="511" INSTL_DATABASE_ERROR_BACKINGUP="Fel inträffade vid backup av databas" INSTL_DATABASE_ERROR_CREATE="Ett fel inträffade vid skapande av databasen %s.
Användaren saknar antagligen rättighet att skapa en databas. Den nödvändiga databasen måste skapas manuellt innan Joomla-installationen kan påbörjas." -INSTL_DATABASE_ERROR_INITIALISE_SCHEMA="Kunde inte initiera schema version nummer" +INSTL_DATABASE_ERROR_DELETE="Vissa fel uppstod vid Ta bort databasen." INSTL_DATABASE_FIELD_VALUE_REMOVE="Ta bort" INSTL_DATABASE_FIELD_VALUE_BACKUP="Backup" +INSTL_DATABASE_FIX_LOWERCASE="Tabellprefixet måste vara i gemena tecken för PostgreSQL." INSTL_DATABASE_FIX_TOO_LONG="Tabellprefixet i MySQL får innehålla maximalt 15 tecken" INSTL_DATABASE_INVALID_DB_DETAILS="Informationen om databasen du angav är fel och/eller tom." INSTL_DATABASE_INVALID_MYSQL_VERSION="Du måste ha MySQL 5.0.4 eller högre för att fortsätta installationen. Din version är: %s" +INSTL_DATABASE_INVALID_MYSQLI_VERSION="Du måste ha MySQL 5.0.4 eller högre för att fortsätta installationen. Din version är: %s" INSTL_DATABASE_INVALID_PDOMYSQL_VERSION="Du behöver ha MySQL 5.0.4 eller högre för att fortsätta installationen. Din version är: %s" INSTL_DATABASE_INVALID_POSTGRESQL_VERSION="Du behöver ha PostgreSQL 8.3.18 eller högre för att fortsätta installationen. Din version är: %s" INSTL_DATABASE_INVALID_SQLSRV_VERSION="Du måste ha SQL Server 2008 R2 (10.50.1600.1) eller högre för att fortsätta installationen. Din version är: %s" INSTL_DATABASE_INVALID_SQLZURE_VERSION="Du måste ha SQL Server 2008 R2 (10.50.1600.1) eller högre för att fortsätta installationen. Din version är: %s" -INSTL_DATABASE_INVALID_MYSQLI_VERSION="Du måste ha MySQL 5.0.4 eller högre för att fortsätta installationen. Din version är: %s" INSTL_DATABASE_INVALID_TYPE="Välj databastyp" INSTL_DATABASE_NAME_TOO_LONG="MySQL databasnamn får innehålla maximalt 64 tecken" INSTL_DATABASE_INVALID_NAME="MySQL-versioner före 5.1.6 får inte innehålla punkt eller andra "_QQ_"special"_QQ_" tecken i namnet. Din version är: %s" @@ -206,7 +215,7 @@ INSTL_COOKIES_NOT_ENABLED="Cookies verkar inte vara aktiverade i din webbläsare INSTL_HEADER_ERROR="fel" ;Helpers -INSTL_PAGE_TITLE="Joomla! Webbinstallation" +INSTL_PAGE_TITLE="Joomla! Installera från Webben" ;Configuration model INSTL_ERROR_CONNECT_DB="Kunde inte ansluta till databasen. Anslutningen returnerade nummer: %s" @@ -242,12 +251,15 @@ INSTL_MAGIC_QUOTES_GPC="Magic Quotes GPC" INSTL_MAGIC_QUOTES_RUNTIME="Magic Quotes Runtime" INSTL_MB_LANGUAGE_IS_DEFAULT="MB language är standard" INSTL_MB_STRING_OVERLOAD_OFF="MB string overload är avstängt" +INSTL_MCRYPT_SUPPORT_AVAILABLE="Mcrypt stöd" INSTL_NOTICEMBLANGNOTDEFAULT="PHP mbstring language är inte satt till neutral. Detta kan ställas in lokalt genom att skriva in php_value mbstring.language neutral i .htaccess." INSTL_NOTICEMBSTRINGOVERLOAD="PHP mbstring function overload är aktiverat. Detta kan stängas av lokalt genom att skriva in php_value mbstring.func_overload 0 i .htaccess." +INSTL_NOTICEMCRYPTNOTAVAILABLE="Varning! PHP-tillägget mcrypt bör vara installerat eller aktiverat. Utan detta blir vissa funktioner i Joomla inte tillgängliga." INSTL_NOTICEYOUCANSTILLINSTALL="
Du kan fortsätta installationen eftersom inställningarna kommer att visas som kod i slutet. Du kan då ladda upp koden manuellt. Klicka i textarean för att markera den visade koden, kopiera och klistra in koden i en ny fil som du döper till 'configuration.php'. Ladda sedan upp filen till webbplatsens rotmapp." INSTL_OUTPUT_BUFFERING="Output Buffering" INSTL_PARSE_INI_FILE_AVAILABLE="INI Parser Support" INSTL_PHP_VERSION="PHP Version" +INSTL_PHP_VERSION_NEWER="PHP Version >= %s" INSTL_REGISTER_GLOBALS="Register Globals" INSTL_SAFE_MODE="Safe Mode" INSTL_SESSION_AUTO_START="Session Auto Start" @@ -256,8 +268,6 @@ INSTL_XML_SUPPORT="XML-stöd" INSTL_ZIP_SUPPORT_AVAILABLE="Inbyggt stöd för ZIP" INSTL_ZLIB_COMPRESSION_SUPPORT="Stöd för zlib-komprimering" INSTL_PROCESS_BUSY="Processen pågår. Vänta..." -INSTL_PHP_VERSION_NEWER="PHP Version >= %s" -INSTL_DEFAULTLANGUAGE_COULD_NOT_INSTALL_MULTILANG="Joomla kan inte installera flerspråkigt exempeldata eftersom endast ett språk är installerat. För att aktivera funktioner för multispråk, måste du installera flera språk. Klicka på knappen 'Tillbaka' och välj det önskade språket från listan." ;Global strings JADMINISTRATOR="Backend" @@ -265,7 +275,7 @@ JCHECK_AGAIN="Kontrollera igen" JERROR="fel" JEMAIL="E-post" JGLOBAL_ISFREESOFTWARE="%s är fri programvara publicerad under %s." -JGLOBAL_LANGUAGE_VERSION_NOT_PLATFORM="Språkpaketet är inte av samma version som Joomla. Vissa ssträngar kan fattas." +JGLOBAL_LANGUAGE_VERSION_NOT_PLATFORM="Språkpaketet är inte av samma version som denna version av Joomla. Vissa strängar kan fattas och kommer att visas på engelska." JGLOBAL_SELECT_AN_OPTION="Välj ett alternativ" JGLOBAL_SELECT_NO_RESULTS_MATCH="Inga matchande resultat" JGLOBAL_SELECT_SOME_OPTIONS="Välj några alternativ" @@ -290,6 +300,10 @@ JLIB_FILESYSTEM_ERROR_PATH_IS_NOT_A_FOLDER_FILES="JFolder: :files: Sökvägen ä JLIB_FORM_FIELD_INVALID="Ogiltigt fält: " JLIB_FORM_VALIDATE_FIELD_INVALID="Ogiltigt fält: %s" JLIB_FORM_VALIDATE_FIELD_REQUIRED="Obligatoriskt fält: %s" +JLIB_INSTALLER_ABORT="Avbryter språkinstallation: %s" +JLIB_INSTALLER_ABORT_PACK_INSTALL_CREATE_DIRECTORY="Installera paket: Kan inte skapa mapp: %s " +JLIB_INSTALLER_ABORT_PACK_INSTALL_ERROR_EXTENSION="Paket %1$s: Det uppstod ett fel när ett tillägget %2$s installerades." +JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES="Paket %s: Det fanns inga filer att installera!" JLIB_INSTALLER_ERROR_FAIL_COPY_FILE="JInstaller: :Install: Kan inte kopiera filen %1$s till %2$s." JLIB_INSTALLER_NOT_ERROR="Om felmeddelanden är relaterade till installation av språkfiler för TinyMCE, så har de ingen påverkan på installation av språket. Vissa språkpaket skapade före Joomla! 3.2.0 kan försöka att installera separata TinyMCE språkfiler. Dessa ingår nu i grundpaketet och skall inte längre installeras." JLIB_UTIL_ERROR_CONNECT_DATABASE="JDatabase: :getInstance: Kan inte ansluta till databasen
joomla.library: %1$s - %2$s" @@ -299,7 +313,7 @@ JDEBUG_LANGUAGE_FILES_IN_ERROR="Parsingfel i språkfilen" JDEBUG_LANGUAGE_UNTRANSLATED_STRING="Ej översatta strängar" JNONE="Ingen" -;Necessary for errors +; Necessary for errors ADMIN_EMAIL="Din e-postadress" ADMIN_PASSWORD="Admin lösenord" ADMIN_PASSWORD2="Bekräfta admin lösenord" @@ -308,9 +322,23 @@ SITE_NAME="Webbplatsens namn" ; Database types (allows for a more descriptive label than the internal name) MYSQL="MySQL" MYSQLI="MySQLi" -PDOMYSQL="MySQL (PDO)" ORACLE="Oracle" +PDOMYSQL="MySQL (PDO)" POSTGRESQL="PostgreSQL" SQLAZURE="Microsoft SQL Azure" SQLITE="SQLite" SQLSRV="Microsoft SQL Server" + +; Javascript message titles +ERROR="Fel" +MESSAGE="Meddelande" +NOTICE="Observera" +WARNING="Varning" + +; Javascript ajax error messages +JLIB_JS_AJAX_ERROR_CONNECTION_ABORT="En anslutning avbröts när JSON-data hämtades." +JLIB_JS_AJAX_ERROR_NO_CONTENT="Inget innehåll har returnerats." +JLIB_JS_AJAX_ERROR_OTHER="Ett fel uppstod när JSON-data hämtades: HTTP %s statuskod." +JLIB_JS_AJAX_ERROR_PARSE="Ett parsningsfel har uppstått medan följande JSON-data behandlades:
%s" +JLIB_JS_AJAX_ERROR_TIMEOUT="En timeout uppstod medan JSON-data hämtades." + diff --git a/installation/language/sv-SE/sv-SE.xml b/installation/language/sv-SE/sv-SE.xml index 49a7177c56a..1da2cfe886f 100644 --- a/installation/language/sv-SE/sv-SE.xml +++ b/installation/language/sv-SE/sv-SE.xml @@ -3,8 +3,8 @@ version="3.9" client="installation"> Svenska (Sverige) - 3.9.12 - Semptember 2018 + 3.9.23 + November 2020 Swedish Joomla Translation Team - SvenskJoomla Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved. GNU General Public License version 2 eller senare; Se LICENSE.txt diff --git a/installation/language/sw-KE/sw-KE.ini b/installation/language/sw-KE/sw-KE.ini index d71600c1cbb..87d41bc98b1 100644 --- a/installation/language/sw-KE/sw-KE.ini +++ b/installation/language/sw-KE/sw-KE.ini @@ -49,7 +49,6 @@ INSTL_DATABASE_TYPE_LABEL="Aina ya hifadhidata" INSTL_DATABASE_USER_DESC="Kama jina la mtumiaji ulilotengeza au jina la mtumiaji lililopeanwa na hosti yako." INSTL_DATABASE_USER_LABEL="Jina la mtumiaji" - ;Mtazamo wa FTP INSTL_AUTOFIND_FTP_PATH="Kujipatiayenyewe njia ya FTP" INSTL_FTP="Usanidi wa FTP" @@ -301,10 +300,12 @@ JLIB_FORM_FIELD_INVALID="Uga batili: " JLIB_FORM_VALIDATE_FIELD_INVALID="Uga batili: %s" JLIB_FORM_VALIDATE_FIELD_REQUIRED="Uga unaohitajika %s" JLIB_INSTALLER_ABORT="Inakatiza kusakinisha lugha: %s" +JLIB_INSTALLER_ABORT_NOINSTALLPATH="Njia ya kusakinisha haipo." JLIB_INSTALLER_ABORT_PACK_INSTALL_CREATE_DIRECTORY="Inakatiza kusakinisha lugha: %s" JLIB_INSTALLER_ABORT_PACK_INSTALL_ERROR_EXTENSION="Paketi %1$s: Imeshindwa kusakinisha kiendelezo: %2$s" JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES="Paketi %s: Hapakuwa na faili za kusakinisha!" JLIB_INSTALLER_ERROR_FAIL_COPY_FILE="JInstaller: :Kusakinisha: Imeshindwa kunakili faili %1$s kwa %2$s." +JLIB_INSTALLER_INSTALL="Sakinisha" JLIB_INSTALLER_NOT_ERROR="Ikiwa makosa yanalingana na usakinishaji wa mafaili ya lugha za TinyMCE, haitasababisha usakinishaji wa lugha. Baadhi ya paketi za lugha zilitengezwa kabla ya Joomla! 3.2.0 pengine zitajaribu kusakinisha mafaili zaidi ya lugha za TinyMCE. Kama faili hizi sasa ziko ndani ya ukuu (core), hazihitaji kusakinishwa tena." JLIB_UTIL_ERROR_CONNECT_DATABASE="JDatabase: :getInstance: Haikuweza kuunganishwa na hifadhitata
joomla.library: %1$s - %2$s" diff --git a/installation/language/sw-KE/sw-KE.xml b/installation/language/sw-KE/sw-KE.xml index 5e46a4d13fe..cc81a2ef554 100644 --- a/installation/language/sw-KE/sw-KE.xml +++ b/installation/language/sw-KE/sw-KE.xml @@ -3,8 +3,8 @@ version="3.9" client="installation"> Swahili (East Africa) - 3.9.17 - March 2020 + 3.9.23 + November 2020 Hassan Abdalla Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/installation/language/ta-IN/ta-IN.ini b/installation/language/ta-IN/ta-IN.ini index bba4a14cd49..8ccb0e81cd5 100644 --- a/installation/language/ta-IN/ta-IN.ini +++ b/installation/language/ta-IN/ta-IN.ini @@ -300,10 +300,12 @@ JLIB_FORM_FIELD_INVALID="செல்லாத புலம்: " JLIB_FORM_VALIDATE_FIELD_INVALID="செல்லாத புலம்: %s" JLIB_FORM_VALIDATE_FIELD_REQUIRED="தேவைப்படும் புலம்: %s" JLIB_INSTALLER_ABORT="மொழி நிறுவல் ரத்து செய்யப்பட்டது: %s" +JLIB_INSTALLER_ABORT_NOINSTALLPATH="நிறுவல் பாதை இல்லை." JLIB_INSTALLER_ABORT_PACK_INSTALL_CREATE_DIRECTORY="தொகுப்பு நிறுவல்: கோப்பகம் உருவாக்குதல் தோல்வியுற்றது: %s" JLIB_INSTALLER_ABORT_PACK_INSTALL_ERROR_EXTENSION="தொகுப்பு %1$s: ஒரு நீட்சியை நிறுவுவதில் பிழை: %2$s" JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES="தொகுப்பு %s: நிறுவுவதற்கு எந்தக் கோப்பும் இல்லை!" JLIB_INSTALLER_ERROR_FAIL_COPY_FILE="JInstaller: :Install: கோப்பு %1$s-ஐ %2$s-க்கு நகலெடுத்தல் தோல்வியுற்றது" +JLIB_INSTALLER_INSTALL="நிறுவல்" JLIB_INSTALLER_NOT_ERROR="பிழையானது TinyMCE மொழிக் கோப்புகள் நிறுவல் தொடர்பானது என்றால் இந்தப் பிழை Joomla மொழிகள் நிறுவலுக்கு எந்த விளைவையும் ஏற்படுத்தாது. Joomla! 3.2.0-க்கு முன் உருவாக்கப்பட்ட சில மொழித் தொகுப்புகள் TinyMCE மொழிக் கோப்புகளைத் தனியாக நிறுவ முயற்சிக்கலாம். இந்த TinyMCE மொழிக் கோப்புகள் தற்சமயம் அடிப்படை Joomla-இல் சேர்க்கப்பட்டிருப்பதால் இவற்றைத் தனியாக நிறுவ வேண்டாம்." JLIB_UTIL_ERROR_CONNECT_DATABASE="JDatabase: :getInstance: தரவுத்தளத்துடன் தொடர்பு கொள்ள முடியவில்லை
joomla.library: %1$s - %2$s" diff --git a/installation/language/ta-IN/ta-IN.xml b/installation/language/ta-IN/ta-IN.xml index b41666b211a..06b4f83bfc6 100644 --- a/installation/language/ta-IN/ta-IN.xml +++ b/installation/language/ta-IN/ta-IN.xml @@ -3,8 +3,8 @@ version="3.9" client="installation"> Tamil (INDIA) - 3.9.17 - March 2020 + 3.9.23 + November 2020 Ilagnayeru 'MIG' Manickam, Elango Samy Manim Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt From baf88ba91a990a89df72d8241e43298e36057229 Mon Sep 17 00:00:00 2001 From: Harald Leithner Date: Sat, 21 Nov 2020 19:41:01 +0100 Subject: [PATCH 26/31] Prepare Joomla! 3.9.23-rc2 --- administrator/manifests/files/joomla.xml | 2 +- libraries/src/Version.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/administrator/manifests/files/joomla.xml b/administrator/manifests/files/joomla.xml index 8cf93d1b1c2..7656437ca1f 100644 --- a/administrator/manifests/files/joomla.xml +++ b/administrator/manifests/files/joomla.xml @@ -6,7 +6,7 @@ www.joomla.org (C) 2005 - 2020 Open Source Matters. All rights reserved GNU General Public License version 2 or later; see LICENSE.txt - 3.9.23-rc + 3.9.23-rc2 November 2020 FILES_JOOMLA_XML_DESCRIPTION diff --git a/libraries/src/Version.php b/libraries/src/Version.php index b6bdc65e7ce..e1b6c7cc8dc 100644 --- a/libraries/src/Version.php +++ b/libraries/src/Version.php @@ -60,7 +60,7 @@ final class Version * @var string * @since 3.8.0 */ - const EXTRA_VERSION = 'rc'; + const EXTRA_VERSION = 'rc2'; /** * Release version. @@ -78,7 +78,7 @@ final class Version * @since 3.5 * @deprecated 4.0 Use separated version constants instead */ - const DEV_LEVEL = '23-rc'; + const DEV_LEVEL = '23-rc2'; /** * Development status. @@ -111,7 +111,7 @@ final class Version * @var string * @since 3.5 */ - const RELDATE = '19-November-2020'; + const RELDATE = '21-November-2020'; /** * Release time. @@ -119,7 +119,7 @@ final class Version * @var string * @since 3.5 */ - const RELTIME = '14:40'; + const RELTIME = '18:39'; /** * Release timezone. From a71f2fac02fc81fcd5663bef050f6a73b01c1e15 Mon Sep 17 00:00:00 2001 From: Stefan Wendhausen Date: Sun, 22 Nov 2020 21:20:05 +0100 Subject: [PATCH 27/31] updated german language files (#31462) --- installation/language/de-AT/de-AT.ini | 2 ++ installation/language/de-AT/de-AT.xml | 4 ++-- installation/language/de-CH/de-CH.ini | 2 ++ installation/language/de-CH/de-CH.xml | 4 ++-- installation/language/de-DE/de-DE.ini | 2 ++ installation/language/de-DE/de-DE.xml | 4 ++-- installation/language/de-LI/de-LI.ini | 2 ++ installation/language/de-LI/de-LI.xml | 4 ++-- installation/language/de-LU/de-LU.ini | 2 ++ installation/language/de-LU/de-LU.xml | 4 ++-- 10 files changed, 20 insertions(+), 10 deletions(-) diff --git a/installation/language/de-AT/de-AT.ini b/installation/language/de-AT/de-AT.ini index cee01f5ba33..35ef39b8b45 100644 --- a/installation/language/de-AT/de-AT.ini +++ b/installation/language/de-AT/de-AT.ini @@ -308,10 +308,12 @@ JLIB_FORM_FIELD_INVALID="Ungültiges Feld: " JLIB_FORM_VALIDATE_FIELD_INVALID="Ungültiges Feld: %s" JLIB_FORM_VALIDATE_FIELD_REQUIRED="Feld benötigt: %s" JLIB_INSTALLER_ABORT="Spracheninstallation abgebrochen: %s" +JLIB_INSTALLER_ABORT_NOINSTALLPATH="Installationspfad existiert nicht." JLIB_INSTALLER_ABORT_PACK_INSTALL_CREATE_DIRECTORY="Paketinstallation: Das Verzeichnis „%s“ konnte nicht angelegt werden!" JLIB_INSTALLER_ABORT_PACK_INSTALL_ERROR_EXTENSION="Paket %1$s: Bei der Installation der Erweiterung trat ein Fehler auf: %2$s" JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES="Paket %s: Keine Dateien zur Installation vorhanden!" JLIB_INSTALLER_ERROR_FAIL_COPY_FILE="JInstaller: :Install: Fehler beim Kopieren der Datei „%1$s“ nach „%2$s“." +JLIB_INSTALLER_INSTALL="Installieren" JLIB_INSTALLER_NOT_ERROR="Wenn der Fehler mit der Installation von TinyMCE-Sprachdateien in Verbindung steht, so hat er keine Auswirkungen auf die Installation der Sprache(n). Einige Sprachpakete vor Joomla! 3.2.0 haben separate TinyMCE-Sprachdateien mitinstalliert, da diese Sprachdateien jetzt aber bereits im Joomla!-Kern enthalten sind, brauchen sie nun nicht länger separat installiert zu werden." JLIB_UTIL_ERROR_CONNECT_DATABASE="JDatabase: :getInstance: Keine Verbindung mit der Datenbank!
joomla.library: %1$s - %2$s" diff --git a/installation/language/de-AT/de-AT.xml b/installation/language/de-AT/de-AT.xml index 23ab9b8e6f5..a82bed2e0ba 100644 --- a/installation/language/de-AT/de-AT.xml +++ b/installation/language/de-AT/de-AT.xml @@ -1,8 +1,8 @@ German (Austria) - 3.9.19 - 02.06.2020 + 3.9.23 + 24.11.2020 J!German Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/installation/language/de-CH/de-CH.ini b/installation/language/de-CH/de-CH.ini index da4980a2a99..2926c739b58 100644 --- a/installation/language/de-CH/de-CH.ini +++ b/installation/language/de-CH/de-CH.ini @@ -308,10 +308,12 @@ JLIB_FORM_FIELD_INVALID="Ungültiges Feld: " JLIB_FORM_VALIDATE_FIELD_INVALID="Ungültiges Feld: %s" JLIB_FORM_VALIDATE_FIELD_REQUIRED="Feld benötigt: %s" JLIB_INSTALLER_ABORT="Spracheninstallation abgebrochen: %s" +JLIB_INSTALLER_ABORT_NOINSTALLPATH="Installationspfad existiert nicht." JLIB_INSTALLER_ABORT_PACK_INSTALL_CREATE_DIRECTORY="Paketinstallation: Das Verzeichnis „%s“ konnte nicht angelegt werden!" JLIB_INSTALLER_ABORT_PACK_INSTALL_ERROR_EXTENSION="Paket %1$s: Bei der Installation der Erweiterung trat ein Fehler auf: %2$s" JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES="Paket %s: Keine Dateien zur Installation vorhanden!" JLIB_INSTALLER_ERROR_FAIL_COPY_FILE="JInstaller: :Install: Fehler beim Kopieren der Datei „%1$s“ nach „%2$s“." +JLIB_INSTALLER_INSTALL="Installieren" JLIB_INSTALLER_NOT_ERROR="Wenn der Fehler mit der Installation von TinyMCE-Sprachdateien in Verbindung steht, so hat er keine Auswirkungen auf die Installation der Sprache(n). Einige Sprachpakete vor Joomla! 3.2.0 haben separate TinyMCE-Sprachdateien mitinstalliert, da diese Sprachdateien jetzt aber bereits im Joomla!-Kern enthalten sind, brauchen sie nun nicht länger separat installiert zu werden." JLIB_UTIL_ERROR_CONNECT_DATABASE="JDatabase: :getInstance: Keine Verbindung mit der Datenbank!
joomla.library: %1$s - %2$s" diff --git a/installation/language/de-CH/de-CH.xml b/installation/language/de-CH/de-CH.xml index 11a51739cc7..a1a256e5ddf 100644 --- a/installation/language/de-CH/de-CH.xml +++ b/installation/language/de-CH/de-CH.xml @@ -1,8 +1,8 @@ German (Switzerland) - 3.9.19 - 02.06.2020 + 3.9.23 + 24.11.2020 J!German Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/installation/language/de-DE/de-DE.ini b/installation/language/de-DE/de-DE.ini index 0ceac8d97f8..aa351e1c88e 100644 --- a/installation/language/de-DE/de-DE.ini +++ b/installation/language/de-DE/de-DE.ini @@ -308,10 +308,12 @@ JLIB_FORM_FIELD_INVALID="Ungültiges Feld: " JLIB_FORM_VALIDATE_FIELD_INVALID="Ungültiges Feld: %s" JLIB_FORM_VALIDATE_FIELD_REQUIRED="Feld benötigt: %s" JLIB_INSTALLER_ABORT="Spracheninstallation abgebrochen: %s" +JLIB_INSTALLER_ABORT_NOINSTALLPATH="Installationspfad existiert nicht." JLIB_INSTALLER_ABORT_PACK_INSTALL_CREATE_DIRECTORY="Paketinstallation: Das Verzeichnis „%s“ konnte nicht angelegt werden!" JLIB_INSTALLER_ABORT_PACK_INSTALL_ERROR_EXTENSION="Paket %1$s: Bei der Installation der Erweiterung trat ein Fehler auf: %2$s" JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES="Paket %s: Keine Dateien zur Installation vorhanden!" JLIB_INSTALLER_ERROR_FAIL_COPY_FILE="JInstaller: :Install: Fehler beim Kopieren der Datei „%1$s“ nach „%2$s“." +JLIB_INSTALLER_INSTALL="Installieren" JLIB_INSTALLER_NOT_ERROR="Wenn der Fehler mit der Installation von TinyMCE-Sprachdateien in Verbindung steht, so hat er keine Auswirkungen auf die Installation der Sprache(n). Einige Sprachpakete vor Joomla! 3.2.0 haben separate TinyMCE-Sprachdateien mitinstalliert, da diese Sprachdateien jetzt aber bereits im Joomla!-Kern enthalten sind, brauchen sie nun nicht länger separat installiert zu werden." JLIB_UTIL_ERROR_CONNECT_DATABASE="JDatabase: :getInstance: Keine Verbindung mit der Datenbank!
joomla.library: %1$s - %2$s" diff --git a/installation/language/de-DE/de-DE.xml b/installation/language/de-DE/de-DE.xml index ccbc96a976f..fb8cc7788fc 100644 --- a/installation/language/de-DE/de-DE.xml +++ b/installation/language/de-DE/de-DE.xml @@ -1,8 +1,8 @@ German (Germany) - 3.9.19 - 02.06.2020 + 3.9.23 + 24.11.2020 J!German Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/installation/language/de-LI/de-LI.ini b/installation/language/de-LI/de-LI.ini index 9eee334ff4f..5d0dd641499 100644 --- a/installation/language/de-LI/de-LI.ini +++ b/installation/language/de-LI/de-LI.ini @@ -308,10 +308,12 @@ JLIB_FORM_FIELD_INVALID="Ungültiges Feld: " JLIB_FORM_VALIDATE_FIELD_INVALID="Ungültiges Feld: %s" JLIB_FORM_VALIDATE_FIELD_REQUIRED="Feld benötigt: %s" JLIB_INSTALLER_ABORT="Spracheninstallation abgebrochen: %s" +JLIB_INSTALLER_ABORT_NOINSTALLPATH="Installationspfad existiert nicht." JLIB_INSTALLER_ABORT_PACK_INSTALL_CREATE_DIRECTORY="Paketinstallation: Das Verzeichnis „%s“ konnte nicht angelegt werden!" JLIB_INSTALLER_ABORT_PACK_INSTALL_ERROR_EXTENSION="Paket %1$s: Bei der Installation der Erweiterung trat ein Fehler auf: %2$s" JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES="Paket %s: Keine Dateien zur Installation vorhanden!" JLIB_INSTALLER_ERROR_FAIL_COPY_FILE="JInstaller: :Install: Fehler beim Kopieren der Datei „%1$s“ nach „%2$s“." +JLIB_INSTALLER_INSTALL="Installieren" JLIB_INSTALLER_NOT_ERROR="Wenn der Fehler mit der Installation von TinyMCE-Sprachdateien in Verbindung steht, so hat er keine Auswirkungen auf die Installation der Sprache(n). Einige Sprachpakete vor Joomla! 3.2.0 haben separate TinyMCE-Sprachdateien mitinstalliert, da diese Sprachdateien jetzt aber bereits im Joomla!-Kern enthalten sind, brauchen sie nun nicht länger separat installiert zu werden." JLIB_UTIL_ERROR_CONNECT_DATABASE="JDatabase: :getInstance: Keine Verbindung mit der Datenbank!
joomla.library: %1$s - %2$s" diff --git a/installation/language/de-LI/de-LI.xml b/installation/language/de-LI/de-LI.xml index 5e71465fc80..c63856fd9a5 100644 --- a/installation/language/de-LI/de-LI.xml +++ b/installation/language/de-LI/de-LI.xml @@ -1,8 +1,8 @@ German (Lichtenstein) - 3.9.19 - 02.06.2020 + 3.9.23 + 24.11.2020 J!German Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/installation/language/de-LU/de-LU.ini b/installation/language/de-LU/de-LU.ini index e80db4e599a..dc105dbaf0f 100644 --- a/installation/language/de-LU/de-LU.ini +++ b/installation/language/de-LU/de-LU.ini @@ -308,10 +308,12 @@ JLIB_FORM_FIELD_INVALID="Ungültiges Feld: " JLIB_FORM_VALIDATE_FIELD_INVALID="Ungültiges Feld: %s" JLIB_FORM_VALIDATE_FIELD_REQUIRED="Feld benötigt: %s" JLIB_INSTALLER_ABORT="Spracheninstallation abgebrochen: %s" +JLIB_INSTALLER_ABORT_NOINSTALLPATH="Installationspfad existiert nicht." JLIB_INSTALLER_ABORT_PACK_INSTALL_CREATE_DIRECTORY="Paketinstallation: Das Verzeichnis „%s“ konnte nicht angelegt werden!" JLIB_INSTALLER_ABORT_PACK_INSTALL_ERROR_EXTENSION="Paket %1$s: Bei der Installation der Erweiterung trat ein Fehler auf: %2$s" JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES="Paket %s: Keine Dateien zur Installation vorhanden!" JLIB_INSTALLER_ERROR_FAIL_COPY_FILE="JInstaller: :Install: Fehler beim Kopieren der Datei „%1$s“ nach „%2$s“." +JLIB_INSTALLER_INSTALL="Installieren" JLIB_INSTALLER_NOT_ERROR="Wenn der Fehler mit der Installation von TinyMCE-Sprachdateien in Verbindung steht, so hat er keine Auswirkungen auf die Installation der Sprache(n). Einige Sprachpakete vor Joomla! 3.2.0 haben separate TinyMCE-Sprachdateien mitinstalliert, da diese Sprachdateien jetzt aber bereits im Joomla!-Kern enthalten sind, brauchen sie nun nicht länger separat installiert zu werden." JLIB_UTIL_ERROR_CONNECT_DATABASE="JDatabase: :getInstance: Keine Verbindung mit der Datenbank!
joomla.library: %1$s - %2$s" diff --git a/installation/language/de-LU/de-LU.xml b/installation/language/de-LU/de-LU.xml index 605bd27c1ea..c604d4c3c70 100644 --- a/installation/language/de-LU/de-LU.xml +++ b/installation/language/de-LU/de-LU.xml @@ -1,8 +1,8 @@ German (Luxembourg) - 3.9.19 - 02.06.2020 + 3.9.23 + 24.11.2020 J!German Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt From bfe4fc6aea2afb77d64c7e99e8306bb49c1004a0 Mon Sep 17 00:00:00 2001 From: Thomas Hunziker Date: Sun, 22 Nov 2020 21:21:04 +0100 Subject: [PATCH 28/31] Updated installation language files (#31461) --- installation/language/el-GR/el-GR.ini | 6 +- installation/language/el-GR/el-GR.xml | 4 +- installation/language/it-IT/it-IT.ini | 2 + installation/language/it-IT/it-IT.xml | 4 +- installation/language/nb-NO/nb-NO.ini | 38 +---- installation/language/nb-NO/nb-NO.xml | 4 +- installation/language/ru-RU/ru-RU.ini | 232 +++++++++++++------------- installation/language/ru-RU/ru-RU.xml | 10 +- installation/language/th-TH/th-TH.ini | 2 + installation/language/th-TH/th-TH.xml | 4 +- 10 files changed, 143 insertions(+), 163 deletions(-) diff --git a/installation/language/el-GR/el-GR.ini b/installation/language/el-GR/el-GR.ini index f5830677f4e..d056c70eb73 100644 --- a/installation/language/el-GR/el-GR.ini +++ b/installation/language/el-GR/el-GR.ini @@ -301,10 +301,12 @@ JLIB_FORM_FIELD_INVALID="Άκυρο πεδίο: " JLIB_FORM_VALIDATE_FIELD_INVALID="Άκυρο πεδίο:%s" JLIB_FORM_VALIDATE_FIELD_REQUIRED="Απαιτούμενο πεδίο:%s" JLIB_INSTALLER_ABORT="Η εγκατάσταση της γλώσσας ματαιώθηκε: %s" +JLIB_INSTALLER_ABORT_NOINSTALLPATH="Η διαδρομή εγκατάστασης δεν υπάρχει." JLIB_INSTALLER_ABORT_PACK_INSTALL_CREATE_DIRECTORY="Εγκατάσταση Πακέτου: Αποτυχία δημιουργίας φακέλου: %s" JLIB_INSTALLER_ABORT_PACK_INSTALL_ERROR_EXTENSION="Πακέτο %1$s: Προέκυψε σφάλμα κατά την εγκατάσταση μιας επέκτασης: %2$s" JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES="Πακέτο %s: Δεν βρέθηκαν αρχεία προς εγκατάσταση!" JLIB_INSTALLER_ERROR_FAIL_COPY_FILE="JInstaller: :Install: Αποτυχία αντιγραφής αρχείου %1$s σε %2$s." +JLIB_INSTALLER_INSTALL="Εγκατάσταση" JLIB_INSTALLER_NOT_ERROR="Εάν το σφάλμα σχετίζεται με την εγκατάσταση γλωσσών του TinyMCE δεν έχει επίδραση στην εγκατάσταση των γλωσσών. Μερικά πακέτα γλώσσας που δημιουργήθηκαν πριν από το Joomla! 3.2.0 μπορεί να προσπαθήσουν να εγκαταστήσουν ξεχωριστά αρχεία γλώσσας για το TinyMCE. Καθώς αυτά συμπεριλαμβάνονται τώρα στον πυρήνα, δεν χρειάζεται πλέον να εγκατασταθούν." JLIB_UTIL_ERROR_CONNECT_DATABASE="Database: :getInstance: Αδυναμία σύνδεσης στη βάση δεδομένων
joomla.library: %1$s - %2$s" @@ -341,6 +343,4 @@ JLIB_JS_AJAX_ERROR_CONNECTION_ABORT="Η σύνδεση διακόπηκε κατ JLIB_JS_AJAX_ERROR_NO_CONTENT="Δεν επεστράφει περιεχόμενο." JLIB_JS_AJAX_ERROR_OTHER="Σφάλμα κατά την ανάκτηση δεδομένων JSON: Κωδικός κατάστασης HTTP %s." JLIB_JS_AJAX_ERROR_PARSE="Σφάλμα ανάλυσης κατά την επεξεργασία των παρακάτω δεδομένων JSON:
%s" -JLIB_JS_AJAX_ERROR_TIMEOUT="Λήξης χρόνου σύνδεσης κατά την ανάκτηση δεδομένων JSON." - -JLIB_DATABASE_ERROR_VALID_MAIL="Η διεύθυνση email που δώσατε δεν είναι έγκυρη. Δώστε μια άλλη διεύθυνση ηλεκτρονικού ταχυδρομείου." \ No newline at end of file +JLIB_JS_AJAX_ERROR_TIMEOUT="Λήξης χρόνου σύνδεσης κατά την ανάκτηση δεδομένων JSON." \ No newline at end of file diff --git a/installation/language/el-GR/el-GR.xml b/installation/language/el-GR/el-GR.xml index acf9173b7a4..14d266b398b 100644 --- a/installation/language/el-GR/el-GR.xml +++ b/installation/language/el-GR/el-GR.xml @@ -3,8 +3,8 @@ version="3.9" client="installation"> Greek - 3.9.17 - March 2020 + 3.9.23 + November 2020 Ελληνική ομάδα μετάφρασης: joomla. gr Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/installation/language/it-IT/it-IT.ini b/installation/language/it-IT/it-IT.ini index 239915a5618..28d8fc935a0 100644 --- a/installation/language/it-IT/it-IT.ini +++ b/installation/language/it-IT/it-IT.ini @@ -301,10 +301,12 @@ JLIB_FORM_FIELD_INVALID="Campo non valido: " JLIB_FORM_VALIDATE_FIELD_REQUIRED="Campo richiesto: %s" JLIB_FORM_VALIDATE_FIELD_INVALID="Campo non valido: %s" JLIB_INSTALLER_ABORT="Interruzione installazione lingua: %s" +JLIB_INSTALLER_ABORT_NOINSTALLPATH="Il percorso di installazione non esiste." JLIB_INSTALLER_ABORT_PACK_INSTALL_CREATE_DIRECTORY="Installazione pacchetto: fallita creazione cartella: %s." JLIB_INSTALLER_ABORT_PACK_INSTALL_ERROR_EXTENSION="Pacchetto %1$s: Si è verificato un errore nell'installazione di una estensione: %2$s" JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES="Pacchetto %s: non ci sono file da installare!" JLIB_INSTALLER_ERROR_FAIL_COPY_FILE="JInstaller: :Install: Copia del file %1$s in %2$s fallita." +JLIB_INSTALLER_INSTALL="Installa" JLIB_INSTALLER_NOT_ERROR="Se l'errore è correlato all'installazione dei file lingua di TinyMCE, non ha effetto sull'installazione della(e) lingua(e). Alcuni pacchetti lingua creati prima di Joomla! 3.2.0 potrebbero cercare di installare separatamente i file lingua di TinyMCE. Ora sono inclusi nel core quindi non è più necessario installarli." JLIB_UTIL_ERROR_CONNECT_DATABASE="JDatabase: :getInstance: Non è stato possibile connettersi al database
joomla.library: %1$s - %2$s" diff --git a/installation/language/it-IT/it-IT.xml b/installation/language/it-IT/it-IT.xml index 42ab8c83392..a6b5141e7eb 100644 --- a/installation/language/it-IT/it-IT.xml +++ b/installation/language/it-IT/it-IT.xml @@ -3,8 +3,8 @@ version="3.9" client="installation"> Italian -Italy - 3.9.17 - March 2020 + 3.9.23 + November 2020 Italian Translation team Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/installation/language/nb-NO/nb-NO.ini b/installation/language/nb-NO/nb-NO.ini index 9a0d2adfef8..4349335e085 100644 --- a/installation/language/nb-NO/nb-NO.ini +++ b/installation/language/nb-NO/nb-NO.ini @@ -11,21 +11,18 @@ INSTL_STEP_FTP_LABEL="FTP" INSTL_STEP_LANGUAGES_LABEL="Installer språk" INSTL_STEP_SITE_LABEL="Konfigurasjon" INSTL_STEP_SUMMARY_LABEL="Oversikt" - ;Language view INSTL_SELECT_LANGUAGE_TITLE="Velg språk" INSTL_WARNJAVASCRIPT="Advarsel! JavaScript må være aktivert for riktig installasjon av Joomla!" INSTL_WARNJSON="JSON må være aktivert i din PHP-installasjon før Joomla kan installeres!" - ;Preinstall view INSTL_PRECHECK_TITLE="Systemsjekk" -INSTL_PRECHECK_DESC="Dersom noen av disse elementene ikke er støttet (merket med Nei) bør du sørge for korrigering av disse..
Du kan ikke installere Joomla før ditt oppsett oppfyller kravene listet nedenfor." +INSTL_PRECHECK_DESC="Dersom noen av disse elementene ikke er støttet (merket med Nei) bør du sørge for korrigering av disse..
Du kan ikke installere Joomla før ditt oppsett oppfyller kravene listet nedenfor." INSTL_PRECHECK_RECOMMENDED_SETTINGS_TITLE="Anbefalte innstillinger:" INSTL_PRECHECK_RECOMMENDED_SETTINGS_DESC="Disse innstillingene er anbefalt for PHP for å sikre full kompatibilitet med Joomla, men Joomla vil likevel kunne kjøre selv om dine innstillinger ikke stemmer helt med de anbefalte." INSTL_PRECHECK_DIRECTIVE="Direktiv" INSTL_PRECHECK_RECOMMENDED="Anbefalte" INSTL_PRECHECK_ACTUAL="Gjeldende" - ; Database view INSTL_DATABASE="Databasekonfigurasjon" INSTL_DATABASE_ERROR_POSTGRESQL_QUERY="PostgreSQL databasespørring feilet." @@ -33,7 +30,7 @@ INSTL_DATABASE_HOST_DESC="Dette er vanligvis 'localhost' eller et navn angitt av INSTL_DATABASE_HOST_LABEL="Tjenernavn" INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_CREATE_FILE="Filen kunne ikke opprettes. Du må manuelt opprette en fil med navn '%1$s', for så å laste denne opp til '%2$s'-mappen for deres nettsted." INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_DELETE_FILE="For å bekrefte at du er eieren av dette nettstedet må du slette filen '%1$s', som har blitt opprettet i '%2$s'-mappen for deres nettsted." -INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_GENERAL_MESSAGE="Du forsøker å bruke en databasetjener som ikke er på deres lokale server. Av sikkerhetshensyn må du bekrefte eierskap for netttjenerkontoen. Les dokumentasjonen for mer informasjon." +INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_GENERAL_MESSAGE="Du forsøker å bruke en databasetjener som ikke er på deres lokale server. Av sikkerhetshensyn må du bekrefte eierskap for netttjenerkontoen. Les dokumentasjonen for mer informasjon." INSTL_DATABASE_NAME_DESC="Noen netthotell tillater kun et gitt antall databasenavn per nettsted. Bruk tabellprefiks i slike tilfeller for å skille Joomla-installasjonene." INSTL_DATABASE_NAME_LABEL="Databasenavn" INSTL_DATABASE_NO_SCHEMA="Ingen databaseskjema eksisterer for denne databasetypen." @@ -48,25 +45,22 @@ INSTL_DATABASE_TYPE_DESC="Dette er trolig 'MySQLi'" INSTL_DATABASE_TYPE_LABEL="Databasetype" INSTL_DATABASE_USER_DESC="Enten et brukernavn du har angitt, eller et som er angitt av din leverandør av netthotell." INSTL_DATABASE_USER_LABEL="Brukernavn" - - ;FTP view INSTL_AUTOFIND_FTP_PATH="Finn FTP-sti automatisk" INSTL_FTP="FTP-konfigurasjon" -INSTL_FTP_DESC="

På noen tjenere må du oppgi brukerdetaljer for FTP for å kunne fullføre installasjonen. Dersom du har problemer med å fullføre installasjonen uten dette, sjekk med leverandøren av netthotell for å finne ut om dette er nødvendig.

Av sikkerhetshensyn er det best å opprette en egen FTP-brukerkonto som kun har tilgang til Joomla-installasjon og ikke hele netthotellkontoen. Din leverandør av netthotell kan hjelpe deg med dette.

Merk: Dersom du installerer på et Windows-operativsystem, er ikke FTP-laget nødvendig.

" +INSTL_FTP_DESC="

På noen tjenere må du oppgi brukerdetaljer for FTP for å kunne fullføre installasjonen. Dersom du har problemer med å fullføre installasjonen uten dette, sjekk med leverandøren av netthotell for å finne ut om dette er nødvendig.

Av sikkerhetshensyn er det best å opprette en egen FTP-brukerkonto som kun har tilgang til Joomla-installasjon og ikke hele netthotellkontoen. Din leverandør av netthotell kan hjelpe deg med dette.

Merk: Dersom du installerer på et Windows-operativsystem, er ikke FTP-laget nødvendig.

" INSTL_FTP_ENABLE_LABEL="Aktiver FTP" INSTL_FTP_HOST_LABEL="FTP-tjener" INSTL_FTP_PASSWORD_LABEL="FTP-passord" INSTL_FTP_PORT_LABEL="FTP-port" INSTL_FTP_ROOT_LABEL="FTP-rotsti" INSTL_FTP_SAVE_LABEL="Lagre FTP-passord" -INSTL_FTP_TITLE="FTP-konfigurasjon (Valgfritt - De fleste brukere kan hoppe over dette trinnet - Trykk Neste for å fortsette)" +INSTL_FTP_TITLE="FTP-konfigurasjon (Valgfritt - De fleste brukere kan hoppe over dette trinnet - Trykk Neste for å fortsette)" INSTL_FTP_USER_LABEL="FTP-brukernavn" INSTL_VERIFY_FTP_SETTINGS="Bekreft FTP-innstillinger" INSTL_FTP_SETTINGS_CORRECT="Innstillinger er korrekt" INSTL_FTP_USER_DESC="Advarsel! Det anbefales å la dette stå tomt, og heller skrive inn FTP-brukernavn for hver gang du overfører filer." INSTL_FTP_PASSWORD_DESC="Advarsel! Det anbefales å la dette stå tomt, og heller skrive inn FTP-passord for hver gang du overfører filer." - ;Site View INSTL_SITE="Konfigurasjon" INSTL_ADMIN_EMAIL_LABEL="E-postadresse" @@ -97,7 +91,6 @@ INSTL_SAMPLE_DATA_SET_DESC="Installer Joomla med en side (en meny med en lenke), INSTL_SAMPLE_LEARN_SET_DESC="Installer Joomla med eksempelartikler som forklarer hvordan systemet fungerer." INSTL_SAMPLE_TESTING_SET_DESC="Installer Joomla med alle mulige menytyper, for rask og enkel hjelp til testing av hele systemet." INSTL_SUPER_USER_TITLE="Superadministrators kontodetaljer" - ;Summary view INSTL_FINALISATION="Ferdigstilling" INSTL_SUMMARY_INSTALL="Installer" @@ -105,7 +98,6 @@ INSTL_SUMMARY_EMAIL_LABEL="E-postoppsett" INSTL_SUMMARY_EMAIL_DESC="Send konfigurasjonsdetaljer på e-post til %s når installasjonen er ferdigstilt." INSTL_SUMMARY_EMAIL_PASSWORDS_LABEL="Inkludere passord i e-post" INSTL_SUMMARY_EMAIL_PASSWORDS_DESC="Advarsel! Det anbefales at man ikke sender og lagrer passord i e-poster." - ;Installing view INSTL_INSTALLING="Installerer ..." INSTL_INSTALLING_DATABASE_BACKUP="Sikkerhetskopierer gamle databasetabeller" @@ -114,12 +106,10 @@ INSTL_INSTALLING_DATABASE="Oppretter databasetabeller" INSTL_INSTALLING_SAMPLE="Installerer eksempeldata" INSTL_INSTALLING_CONFIG="Oppretter konfigurasjonsfil" INSTL_INSTALLING_EMAIL="Sender e-post til %s" - ;Email INSTL_EMAIL_SUBJECT="Konfigurasjonsdetaljer: %s" INSTL_EMAIL_HEADING="Her finner du konfigurasjonsdetaljene for et nylig installert Joomla-nettsted:" INSTL_EMAIL_NOT_SENT="E-post kunne ikke sendes." - ;Complete view INSTL_COMPLETE_ADMINISTRATION_LOGIN_DETAILS="Innloggingsdetaljer for administrasjonspanelet" INSTL_COMPLETE_ERROR_FOLDER_ALREADY_REMOVED="Mappen '%s' er allerede slettet." @@ -132,7 +122,6 @@ INSTL_COMPLETE_REMOVE_FOLDER="Slett mappen '%s'" INSTL_COMPLETE_REMOVE_INSTALLATION="HUSK Å SLETTE INSTALLASJONSMAPPEN
Du vil ikke kunne bruke nettstedet før mappen '%s' er slettet. Dette er en sikkerhetsfunksjon for Joomla!" INSTL_COMPLETE_TITLE="Gratulerer! Joomla! er nå installert." INSTL_COMPLETE_INSTALL_LANGUAGES="Ekstra steg: Installer språk" - ;Languages view INSTL_LANGUAGES="Installer språkpakker" INSTL_LANGUAGES_COLUMN_HEADER_LANGUAGE="Språk" @@ -145,7 +134,6 @@ INSTL_LANGUAGES_NO_LANGUAGE_SELECTED="Ingen språk har blitt installert. Dersom INSTL_LANGUAGES_WARNING_NO_INTERNET="Joomla kunne ikke koble til språkserveren. Fullfør installasjonen." INSTL_LANGUAGES_WARNING_NO_INTERNET2="Merk: Du vil kunne installere språk senere via administrasjonspanelet." INSTL_LANGUAGES_WARNING_BACK_BUTTON="Gå tilbake til siste steg av installasjonen." - ;Default language view INSTL_DEFAULTLANGUAGE_ACTIVATE_MULTILANGUAGE="Aktiver flerspråklig funksjonalitet" INSTL_DEFAULTLANGUAGE_ACTIVATE_MULTILANGUAGE_DESC="Dersom aktivert vil ditt nettsted ha flerspråklig funksjonalitet aktivert, med lokaliserte menyer for hvert språk." @@ -181,10 +169,8 @@ INSTL_DEFAULTLANGUAGE_INSTALL_LOCALISED_CONTENT_DESC="Dersom aktivert vil Joomla INSTL_DEFAULTLANGUAGE_MULTILANGUAGE_TITLE="Flerspråklig" INSTL_DEFAULTLANGUAGE_MULTILANGUAGE_DESC="Denne delen lar deg aktivere Joomlas flerspråklige funksjonalitet automatisk." INSTL_DEFAULTLANGUAGE_TRY_LATER="Du vil kunne installere dette senere gjennom administrasjonspanelet." - ; IMPORTANT NOTE FOR TRANSLATORS: Do not literally translate this line, instead add the localised name of the language. For example Spanish will be Español INSTL_DEFAULTLANGUAGE_NATIVE_LANGUAGE_NAME="Norsk (NO)" - ;Database Model INSTL_DATABASE_COULD_NOT_CONNECT="Kunne ikke koble til databasen. Tilkobling svarte med nummer: %s" INSTL_DATABASE_COULD_NOT_CREATE_DATABASE="Installasjonsprogrammet kunne ikke koble til den angitte databasen og var ikke i stand til å opprette databasen. Sjekk innstillingene eller om nødvendig opprette databasen manuelt." @@ -210,18 +196,14 @@ INSTL_DATABASE_INVALID_NAME="MySQL-versjoner eldre enn 5.1.6 kan ikke inneholde INSTL_DATABASE_NAME_INVALID_SPACES="MySQL-databasenavn og -tabellnavn kan ikke begynne eller slutte med mellomrom." INSTL_DATABASE_NAME_INVALID_CHAR="Ingen MySQL-identifikator kan inneholde en NULL ASCII(0x00)." INSTL_DATABASE_FILE_DOES_NOT_EXIST="Filen %s finnes ikke" - ;controllers INSTL_COOKIES_NOT_ENABLED="Informasjonskapsler ser ikke ut til å være aktivert i din nettleser. Du vil ikke kunne installere applikasjonen med denne funksjonen deaktivert. Det kan også være noe feil med session.save_path på tjeneren, dersom dette er tilfellet bør du forhøre deg med din leverandør om du er usikker på hvordan du selv sjekker eller retter opp dette." INSTL_HEADER_ERROR="Feil" - ;Helpers INSTL_PAGE_TITLE="Nettinstallasjon av Joomla!" - ;Configuration model INSTL_ERROR_CONNECT_DB="Kunne ikke koble til databasen. Tilkobling svarte med nummer: %s." INSTL_STD_OFFLINE_MSG="Dette nettstedet er nede for vedlikehold.
Velkommen tilbake litt senere." - ;FTP model INSTL_FTP_INVALIDROOT="Angitt FTP-mappe er ikke mappen til denne installasjonen." INSTL_FTP_NOCONNECT="Kunne ikke koble til FTP-tjener." @@ -238,7 +220,6 @@ INSTL_FTP_NOROOT="Kunne ikke åpne angitt FTP-mappe." INSTL_FTP_NOSTOR="Funksjonen 'STOR' feilet." INSTL_FTP_NOSYST="Funksjonen 'SYST' feilet." INSTL_FTP_UNABLE_DETECT_ROOT_FOLDER="Kunne ikke finne FTP-rotmappe automatisk." - ;others INSTL_CONFPROBLEM="Din konfigurasjonsfil eller -mappe er skrivebeskyttet, eller det var et annet problem som forhindret opprettelse av konfigurasjonsfilen. Du må derfor laste opp konfigurasjonskoden manuelt. Klikk i tekstfeltet nedenfor for å merke og kopiere hele koden (Høyreklikk-Kopier eller Ctrl+C). Deretter limer du innholdet inn i en ny tekstfil (Høyreklikk-Lim inn eller Ctrl+V), som du navngir configuration.php. Denne fila laster du så opp i rotmappen for ditt nettsted." INSTL_DATABASE_SUPPORT="Database-støtte:" @@ -267,7 +248,6 @@ INSTL_XML_SUPPORT="XML-støtte" INSTL_ZIP_SUPPORT_AVAILABLE="Lokal ZIP-støtte" INSTL_ZLIB_COMPRESSION_SUPPORT="Zlib Compression-støtte" INSTL_PROCESS_BUSY="Prosess pågår. Vennligst vent ..." - ;Global strings JADMINISTRATOR="Administrator" JCHECK_AGAIN="Sjekk igjen" @@ -288,7 +268,6 @@ JPREVIOUS="Tilbake" JSITE="Nettsted" JUSERNAME="Brukernavn" JYES="Ja" - ; Framework strings necessary when no lang pack is available JLIB_DATABASE_ERROR_CONNECT_MYSQL="Kunne ikke koble til MySQL." JLIB_DATABASE_ERROR_DATABASE="En databasefeil oppstod." @@ -301,24 +280,23 @@ JLIB_FORM_FIELD_INVALID="Ugyldig felt: " JLIB_FORM_VALIDATE_FIELD_INVALID="Ugyldig felt: %s" JLIB_FORM_VALIDATE_FIELD_REQUIRED="Obligatorisk felt: %s" JLIB_INSTALLER_ABORT="Avbryter språkinstallasjonen: %s" +JLIB_INSTALLER_ABORT_NOINSTALLPATH="Installasjonsstien finnes ikke" JLIB_INSTALLER_ABORT_PACK_INSTALL_CREATE_DIRECTORY="Installer utvidelse: Kunne ikke opprette mappen: %s." JLIB_INSTALLER_ABORT_PACK_INSTALL_ERROR_EXTENSION="Utvidelsen %1$s: Det oppstod en feil ved installasjon av utvidelsen: %2$s" JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES="Utvidelsen %s: Det var ingen filer å installere!" JLIB_INSTALLER_ERROR_FAIL_COPY_FILE="JInstaller: :Install: Kunne ikke kopiere filen %1$s til %2$s." +JLIB_INSTALLER_INSTALL="Installer" JLIB_INSTALLER_NOT_ERROR="Dersom feilen er relatert til installasjonen av språkfiler for TinyMCE vil det ikke påvirke installasjon av kjernespråk. Noen språkpakker laget for eldre versjoner enn Joomla 3.2 vil kunne forsøke installere egne språkfiler for TinyMCE, men ettersom disse nå er inkludert i kjernen behøves de ikke installeres lengre." JLIB_UTIL_ERROR_CONNECT_DATABASE="JDatabase: :getInstance: Kunne ikke koble til database
joomla.library: %1$s - %2$s" - ; Strings for the language debugger JDEBUG_LANGUAGE_FILES_IN_ERROR="Analysefeil i språkfiler" JDEBUG_LANGUAGE_UNTRANSLATED_STRING="Uoversatte strenger" JNONE="Ingen" - ; Necessary for errors ADMIN_EMAIL="E-postadresse" ADMIN_PASSWORD="Passord" ADMIN_PASSWORD2="Bekreft passord" SITE_NAME="Nettstednavn" - ; Database types (allows for a more descriptive label than the internal name) MYSQL="MySQL" MYSQLI="MySQLi" @@ -329,17 +307,15 @@ POSTGRESQL="PostgreSQL" SQLAZURE="Microsoft SQL Azure" SQLITE="SQLite" SQLSRV="Microsoft SQL Server" - ; Javascript message titles ERROR="Feil" MESSAGE="Melding" NOTICE="Merknad" WARNING="Advarsel" - ; Javascript ajax error messages JLIB_JS_AJAX_ERROR_CONNECTION_ABORT="Det oppstod et tilkoblingsbrudd under henting av JSON-data." JLIB_JS_AJAX_ERROR_NO_CONTENT="Ingen innhold ble returnert." JLIB_JS_AJAX_ERROR_OTHER="Det oppstod en feil under henting av JSON-data: HTTP %s statuskode." -JLIB_JS_AJAX_ERROR_PARSE="En analysefeil oppstod under behandlingen av følgende JSON-data:
%s" +JLIB_JS_AJAX_ERROR_PARSE="En analysefeil oppstod under behandlingen av følgende JSON-data:
%s" JLIB_JS_AJAX_ERROR_TIMEOUT="Det oppstod et tidsavbrudd under henting av JSON-data." diff --git a/installation/language/nb-NO/nb-NO.xml b/installation/language/nb-NO/nb-NO.xml index fbed7ef14f7..3deb416fd19 100644 --- a/installation/language/nb-NO/nb-NO.xml +++ b/installation/language/nb-NO/nb-NO.xml @@ -1,8 +1,8 @@ Norwegian Bokmal (Norway) - 3.9.17 - March 2020 + 3.9.23 + November 2020 Norwegian Translation Team Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/installation/language/ru-RU/ru-RU.ini b/installation/language/ru-RU/ru-RU.ini index e430352f580..c66224303cd 100644 --- a/installation/language/ru-RU/ru-RU.ini +++ b/installation/language/ru-RU/ru-RU.ini @@ -10,125 +10,125 @@ INSTL_STEP_DEFAULTLANGUAGE_LABEL="Выбор языка по умолчанию" INSTL_STEP_FTP_LABEL="Конфигурация FTP" INSTL_STEP_LANGUAGES_LABEL="Установка языковых пакетов" INSTL_STEP_SITE_LABEL="Конфигурация сайта" -INSTL_STEP_SUMMARY_LABEL="Обзор" +INSTL_STEP_SUMMARY_LABEL="Обзор параметров" ; Language view INSTL_SELECT_LANGUAGE_TITLE="Выберите язык" -INSTL_WARNJAVASCRIPT="Внимание! В вашем браузере отключен обработчик Javascript. Пожалуйста, разрешите использование Javascript перед тем, как продолжить процесс установки Joomla!" -INSTL_WARNJSON="Для установки Joomla необходимо включить поддержку JSON в PHP!" +INSTL_WARNJAVASCRIPT="Для корректной установки Joomla в вашем браузере должен быть включен Javascript." +INSTL_WARNJSON="Для установки Joomla в PHP должен быть включен JSON." ; Preinstall view INSTL_PRECHECK_TITLE="Начальная проверка" -INSTL_PRECHECK_DESC="Если любой из этих параметров не поддерживается (выделен как Нет), то настройки вашей системы не соответствуют минимально необходимым требованиям. Вы не сможете завершить установку Joomla, пока настройки вашей системы не будут соответствовать указанным требованиям." +INSTL_PRECHECK_DESC="Если любой из параметров не поддерживается (отмечен Нет), то конфигурация сервера не соответствуют минимально необходимым требованиям. В таком случае вы не сможете завершить установку Joomla." INSTL_PRECHECK_RECOMMENDED_SETTINGS_TITLE="Рекомендуемые параметры" -INSTL_PRECHECK_RECOMMENDED_SETTINGS_DESC="Эти параметры рекомендуются для полнофункциональной совместимости PHP с Joomla! Однако, Joomla! может работать даже если текущие значения параметров не полностью совпадают с рекомендуемыми." +INSTL_PRECHECK_RECOMMENDED_SETTINGS_DESC="Параметры ниже рекомендуются для полнофункциональной совместимости PHP с Joomla. Однако, Joomla может работать даже если текущие значения параметров не полностью совпадают с рекомендуемыми." INSTL_PRECHECK_DIRECTIVE="Директивы" INSTL_PRECHECK_RECOMMENDED="Рекомендуется" INSTL_PRECHECK_ACTUAL="Текущее" ; Database view INSTL_DATABASE="Конфигурация базы данных" -INSTL_DATABASE_ERROR_POSTGRESQL_QUERY="Запрос к базе данных PostgreSQL не выполнен." -INSTL_DATABASE_HOST_DESC="Обычно "_QQ_"localhost"_QQ_"." +INSTL_DATABASE_ERROR_POSTGRESQL_QUERY="Ошибка запроса базы данных PostgreSQL." +INSTL_DATABASE_HOST_DESC="Обычно \"localhost\"." INSTL_DATABASE_HOST_LABEL="Имя хоста" -INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_CREATE_FILE="Не удалось создать файл. Пожалуйста, вручную создайте файл с именем "_QQ_"%1$s"_QQ_" и загрузите его в директорию "_QQ_"%2$s"_QQ_" вашего сайта Joomla." -INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_DELETE_FILE="Для подтверждения, что вы являетесь владельцем сайта, пожалуйста, удалите файл с именем "_QQ_"%1$s"_QQ_" в директории "_QQ_"%2$s"_QQ_" вашего сайта Joomla." -INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_GENERAL_MESSAGE="Вы пытаетесь использовать хост базы данных, которого нет на вашем локальном сервере. В целях безопасности вам необходимо подтвердить право собственности на свою учетную запись на хостинге. Пожалуйста, ознакомьтесь с информацией на странице документации." -INSTL_DATABASE_NAME_DESC="На некоторых хостингах присутствует ограничение по количеству используемых баз данных. Использование префиксов таблиц позволяет установить несколько сайтов на Joomla! в одну базу данных." +INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_CREATE_FILE="Не удалось создать файл. Пожалуйста, создайте файл с именем \"%1$s\" и загрузите его в директорию \"%2$s\" вашего сайта." +INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_DELETE_FILE="Для подтверждения, что вы являетесь владельцем сайта, пожалуйста, удалите файл с именем \"%1$s\" в директории \"%2$s\" вашего сайта." +INSTL_DATABASE_HOST_IS_NOT_LOCALHOST_GENERAL_MESSAGE="Вы пытаетесь использовать хост базы данных, которого нет на вашем локальном сервере. С целью обеспечения безопасности вам необходимо подтвердить право собственности на вашу учетную запись на хостинге. Пожалуйста, ознакомьтесь с информацией на странице документации." +INSTL_DATABASE_NAME_DESC="Введите имя базы данных. Обратите внимание, что некоторые хостинг-провайдеры разрешают использовать только определенное имя БД для каждого сайта. Использование префиксов таблиц позволяет установить несколько сайтов в одну базу данных." INSTL_DATABASE_NAME_LABEL="Имя базы данных" INSTL_DATABASE_NO_SCHEMA="Для данного типа базы данных отсутствует схема базы данных." -INSTL_DATABASE_OLD_PROCESS_DESC="Существующая резервная копия таблиц от предыдущей установки Joomla! будет заменена или удалена." -INSTL_DATABASE_OLD_PROCESS_LABEL="Действия с уже имеющимися таблицами" +INSTL_DATABASE_OLD_PROCESS_DESC="Переименовать (создать резервную копию) или удалить все существующие таблицы базы данных с таким же префиксом из предыдущей установки Joomla." +INSTL_DATABASE_OLD_PROCESS_LABEL="Действия с уже существующими таблицами" INSTL_DATABASE_PASSWORD_DESC="Введите пароль пользователя базы данных. Не рекомендуется использовать учетную запись без пароля." INSTL_DATABASE_PASSWORD_LABEL="Пароль" -INSTL_DATABASE_PREFIX_DESC="Введите префикс таблиц или используйте автоматически сгенерированный. Рекомендуемая длина префикса: 3-4 символа (латинские буквы и цифры) и символ подчеркивания в конце. Убедитесь, что выбранный префикс не используется в именах существующих таблиц базы данных." +INSTL_DATABASE_PREFIX_DESC="Введите префикс таблиц или воспользуйтесь автоматически сгенерированным. Рекомендуемая длина префикса: 4-5 символов (латинские буквы и цифры) и символ подчеркивания в конце. Пожалуйста, убедитесь, что данный префикс не используется в именах существующих таблиц базы данных." INSTL_DATABASE_PREFIX_LABEL="Префикс таблиц" -INSTL_DATABASE_PREFIX_MSG="Префикс таблиц должен начинаться с латинской буквы и может содержать только латинские буквы, цифры или символ подчеркивания (A-Z,a-z,0-9,_)." -INSTL_DATABASE_TYPE_DESC="Обычно "_QQ_"MySQLi"_QQ_"." +INSTL_DATABASE_PREFIX_MSG="Префикс таблиц должен начинаться с латинской буквы, за которой следуют буквенно-цифровые символы и символ подчеркивания в конце строки." +INSTL_DATABASE_TYPE_DESC="Обычно \"MySQLi\"." INSTL_DATABASE_TYPE_LABEL="Тип базы данных" -INSTL_DATABASE_USER_DESC="Введите имя пользователя базы данных.
На локальном сервере обычно используется учетная запись "_QQ_"root"_QQ_" без пароля." +INSTL_DATABASE_USER_DESC="Введите имя пользователя базы данных." INSTL_DATABASE_USER_LABEL="Имя пользователя" ; FTP view INSTL_AUTOFIND_FTP_PATH="Автопоиск пути FTP" INSTL_FTP="Конфигурация FTP" -INSTL_FTP_DESC="

Поскольку возможности выполнения операций с файлами на многих серверах, как правило, ограничены правами доступа или включением режима Safe Mode, в Joomla! предусмотрена возможность использования для этих целей протокола FTP. Для этого, на текущем шаге установки, необходимо указать параметры учетной записи FTP-доступа.

С целью обеспечения безопасности рекомендуется создать специальную учетную запись, имеющую право на доступ только к корневой директории сайта, а не ко всему серверу.

Примечание: при установке Joomla! на сервер с операционной системой Windows в использовании протокола FTP нет необходимости.

" -INSTL_FTP_ENABLE_LABEL="Включить FTP-доступ" -INSTL_FTP_HOST_LABEL="FTP-хост" +INSTL_FTP_DESC="

Поскольку возможности выполнения операций с файлами на многих серверах, как правило, ограничены правами доступа или включением режима Safe Mode, в Joomla предусмотрена возможность использования протокола FTP. На текущем шаге установки необходимо ввести параметры учетной записи FTP-доступа.

С целью обеспечения безопасности рекомендуется создать специальную учетную запись с правом доступа только к корневой директории сайта.

Внимание! При установке Joomla на сервер с операционной системой Windows в использовании протокола FTP нет необходимости.

" +INSTL_FTP_ENABLE_LABEL="Включить FTP" +INSTL_FTP_HOST_LABEL="Имя хоста FTP" INSTL_FTP_PASSWORD_LABEL="Пароль FTP" INSTL_FTP_PORT_LABEL="Порт FTP" -INSTL_FTP_ROOT_LABEL="Путь к корню FTP" +INSTL_FTP_ROOT_LABEL="Корень FTP" INSTL_FTP_SAVE_LABEL="Сохранить пароль FTP" -INSTL_FTP_TITLE="Конфигурация FTP (Не обязательно, нажмите "_QQ_"Далее"_QQ_" для перехода к следующему шагу)" -INSTL_FTP_USER_LABEL="Пользователь FTP" -INSTL_VERIFY_FTP_SETTINGS="Проверить настройки FTP" -INSTL_FTP_SETTINGS_CORRECT="Настройки FTP корректны." +INSTL_FTP_TITLE="Конфигурация FTP (Не обязательно, нажмите \"Далее\" для перехода к следующему шагу)" +INSTL_FTP_USER_LABEL="Имя пользователя FTP" +INSTL_VERIFY_FTP_SETTINGS="Проверить параметры FTP" +INSTL_FTP_SETTINGS_CORRECT="Параметры FTP корректны." INSTL_FTP_USER_DESC="Внимание! Рекомендуем поле оставить пустым и вводить имя пользователя FTP каждый раз при перемещении файлов." INSTL_FTP_PASSWORD_DESC="Внимание! Рекомендуем поле оставить пустым и вводить пароль FTP каждый раз при перемещении файлов." ; Site View INSTL_SITE="Конфигурация сайта" -INSTL_ADMIN_EMAIL_LABEL="E-mail администратора" +INSTL_ADMIN_EMAIL_LABEL="E-mail" INSTL_ADMIN_EMAIL_DESC="Введите адрес e-mail для учетной записи Суперадминистратора сайта." -INSTL_ADMIN_PASSWORD_LABEL="Пароль администратора" +INSTL_ADMIN_PASSWORD_LABEL="Пароль" INSTL_ADMIN_PASSWORD_DESC="Введите пароль для учетной записи Суперадминистратора сайта и подтвердите введенный пароль в соответствующем поле ниже." -INSTL_ADMIN_PASSWORD2_LABEL="Подтверждение пароля" -INSTL_ADMIN_USER_LABEL="Логин администратора" +INSTL_ADMIN_PASSWORD2_LABEL="Подтвердите пароль" +INSTL_ADMIN_USER_LABEL="Логин" INSTL_ADMIN_USER_DESC="Введите логин для учетной записи Суперадминистратора сайта." INSTL_SITE_NAME_LABEL="Название сайта" INSTL_SITE_NAME_DESC="Введите название вашего сайта." -INSTL_SITE_METADESC_LABEL="Описание" +INSTL_SITE_METADESC_LABEL="Описание сайта" INSTL_SITE_METADESC_TITLE_LABEL="Введите описание вашего сайта для поисковых систем. Оптимальная длина описания - 20 слов." INSTL_SITE_OFFLINE_LABEL="Выключить сайт" -INSTL_SITE_OFFLINE_TITLE_LABEL="Перевести сайт в режим технического обслуживания после завершения процесса установки.
Вы сможете включить сайт позже в разделе Панели управления "_QQ_"Общие настройки"_QQ_"." +INSTL_SITE_OFFLINE_TITLE_LABEL="Перевести сайт в режим технического обслуживания после завершения процесса установки. Вы сможете включить сайт позже в разделе \"Общие настройки\" панели управления Joomla." INSTL_SITE_INSTALL_SAMPLE_LABEL="Установка демо-данных" -INSTL_SITE_INSTALL_SAMPLE_DESC="Начинающим пользователям рекомендуется установить демо-данные,
так как они помогут легче освоить основные функции системы." +INSTL_SITE_INSTALL_SAMPLE_DESC="Начинающим пользователям рекомендуется установить демо-данные,
так как они помогут быстрее освоить основные функции Joomla." INSTL_SITE_INSTALL_SAMPLE_NONE="Нет (Необходимо для создания стандартного многоязычного сайта)" INSTL_SAMPLE_BLOG_SET="Блог English (GB) демо-данные" INSTL_SAMPLE_BROCHURE_SET="Визитка English (GB) демо-данные" INSTL_SAMPLE_DATA_SET="Стандартные English (GB) демо-данные" INSTL_SAMPLE_LEARN_SET="Изучаем Joomla! English (GB) демо-данные" INSTL_SAMPLE_TESTING_SET="Тестовые English (GB) демо-данные" -INSTL_SITE_INSTALL_SAMPLE_NONE_DESC="Установить Joomla с одним меню и формой авторизации (без дополнительного содержимого)." -INSTL_SAMPLE_BLOG_SET_DESC="Установить Joomla с несколькими материалами и модулями, используемыми в блогах (Популярные материалы, Последние материалы)." -INSTL_SAMPLE_BROCHURE_SET_DESC="Установить Joomla с несколькими страницами (с пунктами меню Главная, О нас, Новости, Контакты) и модулями Поиск, Вход на сайт, HTML-код." -INSTL_SAMPLE_DATA_SET_DESC="Установить Joomla с одной страницей (меню с одной ссылкой) и модулями Последние материалы, Вход на сайт." -INSTL_SAMPLE_LEARN_SET_DESC="Установить Joomla с набором материалов, описывающих принципы работы Joomla." +INSTL_SITE_INSTALL_SAMPLE_NONE_DESC="Установить Joomla с одним меню и формой авторизации без какого-либо содержимого." +INSTL_SAMPLE_BLOG_SET_DESC="Установить Joomla с несколькими материалами и модулями \"Популярные материалы\", \"Последние материалы\"." +INSTL_SAMPLE_BROCHURE_SET_DESC="Установить Joomla с пунктами меню \"Главная\", \"О нас\", \"Новости\", \"Контакты\" и модулями \"Поиск\", \"Вход на сайт\", \"HTML-код\"." +INSTL_SAMPLE_DATA_SET_DESC="Установить Joomla с одной страницей (меню с одной ссылкой) и модулями \"Последние материалы\", \"Вход на сайт\"." +INSTL_SAMPLE_LEARN_SET_DESC="Установить Joomla с материалами, которые описывают основные принципы работы Joomla." INSTL_SAMPLE_TESTING_SET_DESC="Установить Joomla со всеми возможными пунктами меню для тестирования возможностей Joomla." INSTL_SUPER_USER_TITLE="Учетная запись администратора" ; Summary view INSTL_FINALISATION="Завершение установки" INSTL_SUMMARY_INSTALL="Установка" -INSTL_SUMMARY_EMAIL_LABEL="Отправить конфигурацию сайта на e-mail" -INSTL_SUMMARY_EMAIL_DESC="Позволяет после завершения установки отправить параметры конфигурации на e-mail: %s." +INSTL_SUMMARY_EMAIL_LABEL="Отправить параметры конфигурации на e-mail" +INSTL_SUMMARY_EMAIL_DESC="Отправить параметры конфигурации сайта на %s после завершения установки Joomla." INSTL_SUMMARY_EMAIL_PASSWORDS_LABEL="Включить пароли в e-mail" -INSTL_SUMMARY_EMAIL_PASSWORDS_DESC="Внимание! Из соображений безопасности не рекомендуется отправлять/хранить пароли в e-mail." +INSTL_SUMMARY_EMAIL_PASSWORDS_DESC="С целью обеспечения безопасности сайта не рекомендуется отправлять/хранить пароли в e-mail." ; Installing view INSTL_INSTALLING="Установка..." -INSTL_INSTALLING_DATABASE_BACKUP="Создание резервной копии таблиц базы данных" -INSTL_INSTALLING_DATABASE_REMOVE="Удаление старых таблиц базы данных" +INSTL_INSTALLING_DATABASE_BACKUP="Создание резервной копии существующих таблиц базы данных" +INSTL_INSTALLING_DATABASE_REMOVE="Удаление существующих таблиц базы данных" INSTL_INSTALLING_DATABASE="Создание таблиц базы данных" INSTL_INSTALLING_SAMPLE="Установка демо-данных" INSTL_INSTALLING_CONFIG="Создание файла конфигурации" -INSTL_INSTALLING_EMAIL="Отправка e-mail %s" +INSTL_INSTALLING_EMAIL="Отправка параметров конфигурации на %s" ; E-mail INSTL_EMAIL_SUBJECT="Параметры конфигурации: %s" INSTL_EMAIL_HEADING="Параметры конфигурации для сайта:" -INSTL_EMAIL_NOT_SENT="Ошибка отправки e-mail." +INSTL_EMAIL_NOT_SENT="Не удалось отправить параметры конфигурации на e-mail администратора сайта." ; Complete view -INSTL_COMPLETE_ADMINISTRATION_LOGIN_DETAILS="Подробности учетной записи администратора:" -INSTL_COMPLETE_ERROR_FOLDER_ALREADY_REMOVED="Директория "_QQ_"installation"_QQ_" уже удалена" -INSTL_COMPLETE_ERROR_FOLDER_DELETE="Не удалось удалить директорию "_QQ_"installation"_QQ_". Пожалуйста, удалите директорию вручную." -INSTL_COMPLETE_FOLDER_REMOVED="Директория "_QQ_"installation"_QQ_" успешно удалена" +INSTL_COMPLETE_ADMINISTRATION_LOGIN_DETAILS="Учетная запись администратора" +INSTL_COMPLETE_ERROR_FOLDER_ALREADY_REMOVED="Директория \"installation\" уже удалена" +INSTL_COMPLETE_ERROR_FOLDER_DELETE="Не удалось удалить директорию \"installation\". Пожалуйста, удалите директорию вручную." +INSTL_COMPLETE_FOLDER_REMOVED="Директория \"installation\" успешно удалена" INSTL_COMPLETE_LANGUAGE_1="Интерфейс Joomla! на вашем родном языке и/или создание стандартного многоязычного сайта" -INSTL_COMPLETE_LANGUAGE_DESC="Прежде чем вы удалите директорию "_QQ_"installation"_QQ_", вы можете установить дополнительные языковые пакеты. Для начала процесса установки дополнительных языковых пакетов нажмите кнопку "_QQ_"Установка языковых пакетов"_QQ_"." -INSTL_COMPLETE_LANGUAGE_DESC2="Примечание: для установки дополнительных языковых пакетов вам необходимо подключение к сети интернет.
В некоторых случаях конфигурация сервера не позволяет Joomla! устанавливать дополнительные языковые пакеты. Вы сможете установить их позже в Панели управления Joomla!" -INSTL_COMPLETE_REMOVE_FOLDER="Удалить директорию "_QQ_"installation"_QQ_"" -INSTL_COMPLETE_REMOVE_INSTALLATION="ВНИМАНИЕ: НЕОБХОДИМО ПОЛНОСТЬЮ УДАЛИТЬ ДИРЕКТОРИЮ "_QQ_"INSTALLATION"_QQ_".
Установка Joomla! не будет завершена, пока вы не удалите данную директорию. Это требование безопасности Joomla!" +INSTL_COMPLETE_LANGUAGE_DESC="Перед удалением директории \"installation\" вы можете установить дополнительные языковые пакеты." +INSTL_COMPLETE_LANGUAGE_DESC2="Для установки дополнительных языковых пакетов необходимо подключение к сети интернет. В некоторых случаях конфигурация сервера не позволяет Joomla устанавливать языковые пакеты, но вы сможете установить их позже в панели управления Joomla." +INSTL_COMPLETE_REMOVE_FOLDER="Удалить директорию \"installation\"" +INSTL_COMPLETE_REMOVE_INSTALLATION="ВНИМАНИЕ! НЕОБХОДИМО ПОЛНОСТЬЮ УДАЛИТЬ ДИРЕКТОРИЮ \"INSTALLATION\".
Установка Joomla! не будет завершена, пока вы не удалите данную директорию. Это требование безопасности Joomla!" INSTL_COMPLETE_TITLE="Поздравляем, вы успешно установили Joomla!" INSTL_COMPLETE_INSTALL_LANGUAGES="Установка языковых пакетов" @@ -137,22 +137,22 @@ INSTL_LANGUAGES="Установка языковых пакетов" INSTL_LANGUAGES_COLUMN_HEADER_LANGUAGE="Язык" INSTL_LANGUAGES_COLUMN_HEADER_LANGUAGE_TAG="Тег языка" INSTL_LANGUAGES_COLUMN_HEADER_VERSION="Версия" -INSTL_LANGUAGES_DESC="Интерфейс Joomla доступен на множестве языков. Выберите необходимые языковые пакеты и нажмите кнопку "_QQ_"Далее"_QQ_".
Примечание: на установку каждого языкового пакета необходимо около 10 секунд. Не рекомендуется выбирать более 3-х языковых пакетов одновременно." -INSTL_LANGUAGES_MESSAGE_PLEASE_WAIT="На установку каждого языкового пакета необходимо около 10 секунд.
Пожалуйста, подождите пока языковые пакеты будут загружены и установлены." -INSTL_LANGUAGES_MORE_LANGUAGES="Если вам необходимо установить дополнительные языковые пакеты, нажмите кнопку "_QQ_"Назад"_QQ_"." -INSTL_LANGUAGES_NO_LANGUAGE_SELECTED="Пожалуйста, выберите язык. Для установки дополнительных языковых пакетов нажмите кнопку "_QQ_"Назад"_QQ_" и выберите языковые пакеты из списка." +INSTL_LANGUAGES_DESC="Интерфейс Joomla доступен на множестве языков. Выберите необходимые языковые пакеты и нажмите кнопку \"Далее\". На установку каждого языкового пакета необходимо около 10 секунд. Не рекомендуется выбирать более трех языковых пакетов одновременно." +INSTL_LANGUAGES_MESSAGE_PLEASE_WAIT="На установку каждого языкового пакета необходимо около 10 секунд. Пожалуйста, подождите пока языковые пакеты будут загружены и установлены." +INSTL_LANGUAGES_MORE_LANGUAGES="Если вам необходимо установить дополнительные языковые пакеты, нажмите кнопку \"Назад\"." +INSTL_LANGUAGES_NO_LANGUAGE_SELECTED="Пожалуйста, выберите язык. Для установки дополнительных языковых пакетов нажмите кнопку \"Назад\" и выберите языковые пакеты из списка." INSTL_LANGUAGES_WARNING_NO_INTERNET="Ошибка подключения к серверу языковых пакетов Joomla! Пожалуйста, завершите процесс установки." -INSTL_LANGUAGES_WARNING_NO_INTERNET2="Примечание: вы сможете установить языковые пакеты позже в панели управления Joomla!" -INSTL_LANGUAGES_WARNING_BACK_BUTTON="Вернуться назад" +INSTL_LANGUAGES_WARNING_NO_INTERNET2="Вы сможете установить языковые пакеты позже в панели управления Joomla." +INSTL_LANGUAGES_WARNING_BACK_BUTTON="Назад" ; Default language view INSTL_DEFAULTLANGUAGE_ACTIVATE_MULTILANGUAGE="Активировать функцию многоязычности" -INSTL_DEFAULTLANGUAGE_ACTIVATE_MULTILANGUAGE_DESC="Функция многоязычности Joomla позволяет создать локализованные пункты меню и содержимое для каждого из установленных языков." -INSTL_DEFAULTLANGUAGE_ACTIVATE_LANGUAGE_CODE_PLUGIN="Активировать плагин "_QQ_"Система - Подмена кода языка"_QQ_"" -INSTL_DEFAULTLANGUAGE_ACTIVATE_LANGUAGE_CODE_PLUGIN_DESC="Активировать плагин "_QQ_"Система - Подмена кода языка"_QQ_" для обеспечения возможности подмены кода языка в HTML-разметке страницы для улучшения SEO." +INSTL_DEFAULTLANGUAGE_ACTIVATE_MULTILANGUAGE_DESC="Позволяет создать локализованные пункты меню и содержимое для каждого из установленных языков." +INSTL_DEFAULTLANGUAGE_ACTIVATE_LANGUAGE_CODE_PLUGIN="Активировать плагин \"Система - Подмена кода языка\"" +INSTL_DEFAULTLANGUAGE_ACTIVATE_LANGUAGE_CODE_PLUGIN_DESC="Позволяет обеспечить возможность подмены кода языка в HTML-разметке страницы для улучшения SEO." INSTL_DEFAULTLANGUAGE_ADMINISTRATOR="Язык панели управления" -INSTL_DEFAULTLANGUAGE_ADMIN_COULDNT_SET_DEFAULT="Не удалось изменить значение языка по умолчанию для Панели управления. По умолчанию языком Панели управления будет "_QQ_"английский"_QQ_"." -INSTL_DEFAULTLANGUAGE_ADMIN_SET_DEFAULT="Язык "_QQ_"%s"_QQ_" установлен в качестве языка по умолчанию для панели управления Joomla!" +INSTL_DEFAULTLANGUAGE_ADMIN_COULDNT_SET_DEFAULT="Не удалось изменить значение языка по умолчанию для панели управления. По умолчанию языком панели управления будет \"английский\"." +INSTL_DEFAULTLANGUAGE_ADMIN_SET_DEFAULT="Язык \"%s\" установлен в качестве языка по умолчанию для панели управления Joomla." INSTL_DEFAULTLANGUAGE_COLUMN_HEADER_SELECT="Выбрать" INSTL_DEFAULTLANGUAGE_COLUMN_HEADER_LANGUAGE="Язык" INSTL_DEFAULTLANGUAGE_COLUMN_HEADER_TAG="Тег" @@ -163,39 +163,39 @@ INSTL_DEFAULTLANGUAGE_COULD_NOT_CREATE_MENU_ITEM="Ошибка автомати INSTL_DEFAULTLANGUAGE_COULD_NOT_CREATE_MENU_MODULE="Ошибка автоматического создания модуля меню %s." INSTL_DEFAULTLANGUAGE_COULD_NOT_CREATE_CATEGORY="Ошибка автоматического создания категории %s." INSTL_DEFAULTLANGUAGE_COULD_NOT_CREATE_ARTICLE="Ошибка автоматического создания локализованного материала %s." -INSTL_DEFAULTLANGUAGE_COULD_NOT_ENABLE_MODULESWHITCHER_LANGUAGECODE="Ошибка автоматической публикации модуля "_QQ_"Переключение языков"_QQ_"." -INSTL_DEFAULTLANGUAGE_COULD_NOT_ENABLE_PLG_LANGUAGECODE="Ошибка автоматической активации плагина "_QQ_"Система - Подмена кода языка"_QQ_"." -INSTL_DEFAULTLANGUAGE_COULD_NOT_ENABLE_PLG_LANGUAGEFILTER="Ошибка автоматической активации плагина "_QQ_"Система - Фильтр языка"_QQ_"." +INSTL_DEFAULTLANGUAGE_COULD_NOT_ENABLE_MODULESWHITCHER_LANGUAGECODE="Ошибка автоматической публикации модуля \"Переключение языков\"." +INSTL_DEFAULTLANGUAGE_COULD_NOT_ENABLE_PLG_LANGUAGECODE="Ошибка автоматического включения плагина \"Система - Подмена кода языка\"." +INSTL_DEFAULTLANGUAGE_COULD_NOT_ENABLE_PLG_LANGUAGEFILTER="Ошибка автоматического включения плагина \"Система - Фильтр языка\"." INSTL_DEFAULTLANGUAGE_COULD_NOT_INSTALL_LANGUAGE="Не удалось установить языковой пакет %s." -INSTL_DEFAULTLANGUAGE_COULD_NOT_INSTALL_MULTILANG="Не удалось установить многоязычное содержимое, так как установлен только один язык. Для активации многоязычной функции необходимо установить несколько языков. Нажмите кнопку "_QQ_"Назад"_QQ_" и выберите языковые пакеты из списка." -INSTL_DEFAULTLANGUAGE_COULD_NOT_PUBLISH_MOD_MULTILANGSTATUS="Ошибка автоматической публикации модуля Панели управления "_QQ_"Мультиязычность"_QQ_"." +INSTL_DEFAULTLANGUAGE_COULD_NOT_INSTALL_MULTILANG="Не удалось установить многоязычное содержимое, так как установлен только один язык. Для активации функции многоязычности необходимо установить несколько языков. Нажмите кнопку \"Назад\" и выберите языковые пакеты из списка." +INSTL_DEFAULTLANGUAGE_COULD_NOT_PUBLISH_MOD_MULTILANGSTATUS="Ошибка автоматической публикации модуля панели управления \"Статус многоязычности\"." INSTL_DEFAULTLANGUAGE_COULD_NOT_UNPUBLISH_MOD_DEFAULTMENU="Ошибка автоматического снятия с публикации главного меню." -INSTL_DEFAULTLANGUAGE_DESC="Языковые пакеты установлены. Пожалуйста, выберите язык по умолчанию для Панели управления и нажмите кнопку "_QQ_"Далее"_QQ_"." -INSTL_DEFAULTLANGUAGE_DESC_FRONTEND="Языковые пакеты установлены. Пожалуйста, выберите язык по умолчанию для Сайта и нажмите кнопку "_QQ_"Далее"_QQ_"." +INSTL_DEFAULTLANGUAGE_DESC="Языковые пакеты установлены. Пожалуйста, выберите язык по умолчанию для панели управления и нажмите кнопку \"Далее\"." +INSTL_DEFAULTLANGUAGE_DESC_FRONTEND="Языковые пакеты установлены. Пожалуйста, выберите язык по умолчанию для сайта и нажмите кнопку \"Далее\"." INSTL_DEFAULTLANGUAGE_FRONTEND="Язык сайта" -INSTL_DEFAULTLANGUAGE_FRONTEND_COULDNT_SET_DEFAULT="Не удалось изменить значение языка по умолчанию для Сайта. По умолчанию языком Сайта будет "_QQ_"английский"_QQ_"." -INSTL_DEFAULTLANGUAGE_FRONTEND_SET_DEFAULT="Язык "_QQ_"%s"_QQ_" установлен в качестве языка по умолчанию для вашего сайта." +INSTL_DEFAULTLANGUAGE_FRONTEND_COULDNT_SET_DEFAULT="Не удалось изменить значение языка по умолчанию для сайта. По умолчанию языком сайта будет \"английский\"." +INSTL_DEFAULTLANGUAGE_FRONTEND_SET_DEFAULT="Язык \"%s\" установлен в качестве языка по умолчанию для вашего сайта." INSTL_DEFAULTLANGUAGE_INSTALL_LOCALISED_CONTENT="Установить локализованное содержимое" -INSTL_DEFAULTLANGUAGE_INSTALL_LOCALISED_CONTENT_DESC="Позволяет автоматически создать по одной категории материалов для каждого из установленных языков. В каждую из категорий будет помещен один тестовый материал." -INSTL_DEFAULTLANGUAGE_MULTILANGUAGE_TITLE="Мультиязычность" -INSTL_DEFAULTLANGUAGE_MULTILANGUAGE_DESC="Данный раздел позволяет вам автоматически активировать функцию мультиязычности Joomla!" -INSTL_DEFAULTLANGUAGE_TRY_LATER="Вы сможете это изменить позже в Панели управления Joomla!" +INSTL_DEFAULTLANGUAGE_INSTALL_LOCALISED_CONTENT_DESC="Позволяет создать по одной категории для каждого из установленных языков. Кроме того, в каждой категории будет создан один тестовый материал." +INSTL_DEFAULTLANGUAGE_MULTILANGUAGE_TITLE="Многоязычность" +INSTL_DEFAULTLANGUAGE_MULTILANGUAGE_DESC="Данный раздел позволяет вам автоматически активировать функцию многоязычности Joomla!" +INSTL_DEFAULTLANGUAGE_TRY_LATER="Вы сможете установить языковые пакеты позже в панели управления Joomla." ; IMPORTANT NOTE FOR TRANSLATORS: Do not literally translate this line, instead add the localised name of the language. For example Spanish will be Español INSTL_DEFAULTLANGUAGE_NATIVE_LANGUAGE_NAME="Русский (RU)" ; Database Model INSTL_DATABASE_COULD_NOT_CONNECT="Не удалось подключиться к базе данных. Текст сообщения об ошибке: %s" -INSTL_DATABASE_COULD_NOT_CREATE_DATABASE="Не удалось подключиться к базе данных и не удалось создать базу данных. Пожалуйста, проверьте ваши настройки и при необходимости создайте базу данных вручную." +INSTL_DATABASE_COULD_NOT_CREATE_DATABASE="Не удалось подключиться к базе данных и не удалось создать базу данных. Пожалуйста, проверьте параметры и при необходимости создайте базу данных вручную." INSTL_DATABASE_COULD_NOT_REFRESH_MANIFEST_CACHE="Не удалось обновить кэш манифеста для расширения: %s" -INSTL_DATABASE_ERROR_BACKINGUP="Возникли ошибки при резервном копировании базы данных." -INSTL_DATABASE_ERROR_CREATE="При создании базы данных возникла ошибка: %s.
Возможно текущий пользователь не имеет достаточно прав для создания новой базы данных. В этом случае база данных может быть создана вручную, до начала установки Joomla!" +INSTL_DATABASE_ERROR_BACKINGUP="При создании резервной копии базы данных возникли ошибки." +INSTL_DATABASE_ERROR_CREATE="При создании базы данных возникли ошибки: %s.
Возможно, у текущего пользователя недостаточно прав для создания базы данных. В таком случае база данных может быть создана вручную, до начала установки Joomla." INSTL_DATABASE_ERROR_DELETE="При удалении базы данных возникли ошибки." INSTL_DATABASE_FIELD_VALUE_REMOVE="Удалить" INSTL_DATABASE_FIELD_VALUE_BACKUP="Переименовать" INSTL_DATABASE_FIX_LOWERCASE="Префикс таблиц PostgreSQL должен содержать символы в нижнем регистре." INSTL_DATABASE_FIX_TOO_LONG="Префикс таблиц MySQL должен содержать не более 15 символов." -INSTL_DATABASE_INVALID_DB_DETAILS="Параметры базы данных не указаны или указаны неверно." +INSTL_DATABASE_INVALID_DB_DETAILS="Параметры базы данных не введены или введены некорректно." INSTL_DATABASE_INVALID_MYSQL_VERSION="Для продолжения процесса установки требуется MySQL 5.0.4 или выше. Текущая версия: %s" INSTL_DATABASE_INVALID_MYSQLI_VERSION="Для продолжения процесса установки требуется MySQL 5.0.4 или выше. Текущая версия: %s" INSTL_DATABASE_INVALID_PGSQL_VERSION="Для продолжения процесса установки требуется PostgreSQL 8.3.18 или выше. Текущая версия: %s" @@ -205,13 +205,13 @@ INSTL_DATABASE_INVALID_SQLSRV_VERSION="Для продолжения проце INSTL_DATABASE_INVALID_SQLZURE_VERSION="Для продолжения процесса установки требуется SQL Server 2008 R2 (10.50.1600.1) или выше. Текущая версия: %s" INSTL_DATABASE_INVALID_TYPE="Пожалуйста, выберите тип базы данных." INSTL_DATABASE_NAME_TOO_LONG="Имя базы данных MySQL должно содержать не более 64 символов." -INSTL_DATABASE_INVALID_NAME="В версиях MySQL ниже 5.1.6 запрещено использование точек или других "_QQ_"специальных"_QQ_" символов в имени. Текущая версия: %s." +INSTL_DATABASE_INVALID_NAME="Имя базы данных в версиях MySQL ниже 5.1.6 не может содержать точек или других \"специальных\" символов. Текущая версия: %s" INSTL_DATABASE_NAME_INVALID_SPACES="Имя базы данных и таблиц MySQL не может начинаться или заканчиваться пробелами." -INSTL_DATABASE_NAME_INVALID_CHAR="В именах баз данных и таблиц MySQL запрещено использование символа ASCII(0x00)." +INSTL_DATABASE_NAME_INVALID_CHAR="Идентификатор MySQL не может содержать NULL ASCII(0x00)." INSTL_DATABASE_FILE_DOES_NOT_EXIST="Файла %s не существует." ; Controllers -INSTL_COOKIES_NOT_ENABLED="В вашем браузере отключена возможность принимать cookie. Если эта функция будет выключена, вы не сможете установить приложение. Кроме того, существует вероятность неправильной настройки переменной session.save_path на вашем сервере. Если вы не знаете как это исправить, пожалуйста, обратитесь к администратору вашего сервера (хостинга)." +INSTL_COOKIES_NOT_ENABLED="Вероятно, в вашем браузере отключена возможность принимать cookie. Вы не сможете установить приложение, если эта функция отключена. Кроме того, существует вероятность некорректной настройки переменной session.save_path на вашем сервере. Пожалуйста, обратитесь в администрацию хостинг-провайдера, если вы не знаете, как это проверить или исправить самостоятельно." INSTL_HEADER_ERROR="Ошибка" ; Helpers @@ -219,28 +219,28 @@ INSTL_PAGE_TITLE="Мастер установки Joomla!" ; Configuration model INSTL_ERROR_CONNECT_DB="Не удалось подключиться к базе данных. Текст сообщения об ошибке: %s" -INSTL_STD_OFFLINE_MSG="Сайт закрыт на техническое обслуживание.
Пожалуйста, зайдите позже." +INSTL_STD_OFFLINE_MSG="Сайт закрыт на техническое обслуживание.
Пожалуйста, зайдите позже." ; FTP model INSTL_FTP_INVALIDROOT="Указанная директория FTP не является директорией установки Joomla!" INSTL_FTP_NOCONNECT="Не удалось подключиться к FTP-серверу." -INSTL_FTP_NODELE="Сбой выполнения команды "_QQ_"DELE"_QQ_"." -INSTL_FTP_NODIRECTORYLISTING="Не удалось получить список файлов от FTP-сервера." -INSTL_FTP_NOLIST="Сбой выполнения команды "_QQ_"LIST"_QQ_"." -INSTL_FTP_NOLOGIN="Не удалось зайти на FTP-сервер." -INSTL_FTP_NOMKD="Сбой выполнения команды "_QQ_"MKD"_QQ_"." -INSTL_FTP_NONLST="Сбой выполнения команды "_QQ_"NLST"_QQ_"." -INSTL_FTP_NOPWD="Сбой выполнения команды "_QQ_"PWD"_QQ_"." -INSTL_FTP_NORETR="Сбой выполнения команды "_QQ_"RETR"_QQ_"." -INSTL_FTP_NORMD="Сбой выполнения команды "_QQ_"RMD"_QQ_"." +INSTL_FTP_NODELE="Сбой выполнения команды \"DELE\"." +INSTL_FTP_NODIRECTORYLISTING="Не удалось получить список файлов/каталогов на FTP-сервере." +INSTL_FTP_NOLIST="Сбой выполнения команды \"LIST\"." +INSTL_FTP_NOLOGIN="Не удалось авторизоваться на FTP-сервере." +INSTL_FTP_NOMKD="Сбой выполнения команды \"MKD\"." +INSTL_FTP_NONLST="Сбой выполнения команды \"NLST\"." +INSTL_FTP_NOPWD="Сбой выполнения команды \"PWD\"." +INSTL_FTP_NORETR="Сбой выполнения команды \"RETR\"." +INSTL_FTP_NORMD="Сбой выполнения команды \"RMD\"." INSTL_FTP_NOROOT="Не удалось получить доступ к указанной директории FTP." -INSTL_FTP_NOSTOR="Сбой выполнения команды "_QQ_"STOR"_QQ_"." -INSTL_FTP_NOSYST="Сбой выполнения команды "_QQ_"SYST"_QQ_"." +INSTL_FTP_NOSTOR="Сбой выполнения команды \"STOR\"." +INSTL_FTP_NOSYST="Сбой выполнения команды \"SYST\"." INSTL_FTP_UNABLE_DETECT_ROOT_FOLDER="Не удалось автоматически определить корневую директорию FTP." ; Others -INSTL_CONFPROBLEM="Ваш файл конфигурации недоступен для записи или возникла ошибка при его создании. Необходимо вручную создать текстовый файл, переименовать его в configuration.php, выделить и скопировать отображаемый код и вставить в него, а затем разместить файл конфигурации в корневой директории вашего сайта." -INSTL_DATABASE_SUPPORT="Поддержка баз данных:" +INSTL_CONFPROBLEM="Файл конфигурации недоступен для записи или произошла ошибка при его создании. Необходимо вручную создать текстовый файл, переименовать его в configuration.php, выделить/скопировать отображаемый код и вставить в него, а затем разместить файл конфигурации в корневой директории вашего сайта." +INSTL_DATABASE_SUPPORT="Поддержка баз данных" INSTL_DISPLAY_ERRORS="Отображение ошибок" INSTL_ERROR_DB="При заполнении базы данных возникли ошибки: %s" INSTL_ERROR_INITIALISE_SCHEMA="Ошибка инициализации схемы базы данных" @@ -249,11 +249,11 @@ INSTL_GNU_GPL_LICENSE="GNU General Public License" INSTL_JSON_SUPPORT_AVAILABLE="Поддержка JSON" INSTL_MAGIC_QUOTES_GPC="Magic Quotes GPC Выкл" INSTL_MAGIC_QUOTES_RUNTIME="Magic Quotes Runtime" -INSTL_MB_LANGUAGE_IS_DEFAULT="MB язык по умолчанию" +INSTL_MB_LANGUAGE_IS_DEFAULT="MB Language по умолчанию" INSTL_MB_STRING_OVERLOAD_OFF="MB String Overload Выкл" -INSTL_NOTICEMBLANGNOTDEFAULT="Язык PHP mbstring не установлен в "_QQ_"neutral"_QQ_". Это можно исправить, добавив строку php_value mbstring.language neutral в файл .htaccess." -INSTL_NOTICEMBSTRINGOVERLOAD="Установлена перегрузка функции PHP mbstring. Это можно отключить локально, добавив строку php_value mbstring.func_overload 0 в файл .htaccess." -INSTL_NOTICEYOUCANSTILLINSTALL="
Вы можете продолжить процесс установки, так как настройки конфигурации будут отображены в конце. Необходимо вручную создать текстовый файл, переименовать его в configuration.php, выделить и скопировать отображаемый код и вставить в него, а затем разместить файл конфигурации в корневой директории вашего сайта." +INSTL_NOTICEMBLANGNOTDEFAULT="Язык PHP mbstring не установлен в \"neutral\". Вы можете изменить значение локально, добавив строку php_value mbstring.language neutral в файл .htaccess." +INSTL_NOTICEMBSTRINGOVERLOAD="Перегрузка функции PHP mbstring включена. Вы можете изменить значение локально, добавив строку php_value mbstring.func_overload 0 в файл .htaccess." +INSTL_NOTICEYOUCANSTILLINSTALL="
Вы можете продолжить процесс установки, так как параметры конфигурации будут отображены в конце. Необходимо вручную создать текстовый файл, переименовать его в configuration.php, выделить/скопировать отображаемый код и вставить в него, а затем разместить файл конфигурации в корневой директории вашего сайта." INSTL_OUTPUT_BUFFERING="Буферизация вывода" INSTL_PARSE_INI_FILE_AVAILABLE="Поддержка INI Parser" INSTL_PHP_VERSION="Версия PHP" @@ -261,7 +261,7 @@ INSTL_PHP_VERSION_NEWER="Версия PHP >= %s" INSTL_REGISTER_GLOBALS="Register Globals Выкл" INSTL_SAFE_MODE="Safe Mode" INSTL_SESSION_AUTO_START="Session Auto Start" -INSTL_WRITABLE="%s доступен на запись" +INSTL_WRITABLE="Файл %s доступен для записи" INSTL_XML_SUPPORT="Поддержка XML" INSTL_ZIP_SUPPORT_AVAILABLE="Встроенная поддержка ZIP" INSTL_ZLIB_COMPRESSION_SUPPORT="Поддержка Zlib" @@ -273,14 +273,14 @@ JCHECK_AGAIN="Повторить проверку" JERROR="Ошибка" JEMAIL="E-mail" JGLOBAL_ISFREESOFTWARE="%s распространяется по лицензии %s." -JGLOBAL_LANGUAGE_VERSION_NOT_PLATFORM="Языковой пакет не соответствует версии Joomla! Некоторые языковые константы могут отсутствовать." +JGLOBAL_LANGUAGE_VERSION_NOT_PLATFORM="Языковой пакет не соответствует версии Joomla. Некоторые языковые константы могут отсутствовать." JGLOBAL_SELECT_AN_OPTION="Выберите значение" -JGLOBAL_SELECT_NO_RESULTS_MATCH="Результаты не совпадают" +JGLOBAL_SELECT_NO_RESULTS_MATCH="Ничего не найдено." JGLOBAL_SELECT_SOME_OPTIONS="Выберите несколько значений" -JINVALID_TOKEN="Последний запрос был отклонен, поскольку содержит неверный ключ безопасности. Обновите страницу и попробуйте еще раз." +JINVALID_TOKEN="Последний запрос был отклонен, поскольку он содержит некорректный токен безопасности. Пожалуйста, обновите страницу и попробуйте еще раз." JNEXT="Далее" JNO="Нет" -JNOTICE="Замечание" +JNOTICE="Внимание" JOFF="Выкл" JON="Вкл" JPREVIOUS="Назад" @@ -293,19 +293,21 @@ JLIB_DATABASE_ERROR_CONNECT_MYSQL="Не удалось подключиться JLIB_DATABASE_ERROR_DATABASE="Ошибка базы данных." JLIB_DATABASE_ERROR_LOAD_DATABASE_DRIVER="Не удалось загрузить драйвер базы данных: %s" JLIB_DATABASE_ERROR_VALID_MAIL="Пожалуйста, введите корректный адрес e-mail." -JLIB_ENVIRONMENT_SESSION_EXPIRED="Ваша сессия истекла, пожалуйста, обновите страницу." +JLIB_ENVIRONMENT_SESSION_EXPIRED="Время сессии истекло. Пожалуйста, обновите страницу." JLIB_FILESYSTEM_ERROR_COPY_FAILED="Ошибка копирования." -JLIB_FILESYSTEM_ERROR_PATH_IS_NOT_A_FOLDER_FILES="JFolder: :files: Указанный путь не является директорией. Путь: %s" +JLIB_FILESYSTEM_ERROR_PATH_IS_NOT_A_FOLDER_FILES="JFolder: :files: Путь ведет не к каталогу: %s" JLIB_FORM_FIELD_INVALID="Некорректно заполнено поле: " JLIB_FORM_VALIDATE_FIELD_INVALID="Некорректно заполнено поле: %s" JLIB_FORM_VALIDATE_FIELD_REQUIRED="Необходимо заполнить поле: %s" JLIB_INSTALLER_ABORT="Отмена установки языкового пакета: %s" -JLIB_INSTALLER_ABORT_PACK_INSTALL_CREATE_DIRECTORY="Установка пакета: не удалось создать директорию: %s." -JLIB_INSTALLER_ABORT_PACK_INSTALL_ERROR_EXTENSION="Пакет %1$s: при установке расширения произошла ошибка: %2$s." -JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES="Пакет %s: Не найдено файлов для установки." -JLIB_INSTALLER_ERROR_FAIL_COPY_FILE="JInstaller: :Install: Ошибка копирования файла %1$s в %2$s." -JLIB_INSTALLER_NOT_ERROR="Ошибка, которая связана с установкой языковых файлов TinyMCE, не влияет на установку языкового пакета. Некоторые языковые пакеты, которые созданы для Joomla! до версии 3.2.0, могут пытаться устанавливать локализацию TinyMCE. Однако, файлы локализации TinyMCE уже включены в дистрибутив, поэтому в их дополнительной установке нет необходимости." -JLIB_UTIL_ERROR_CONNECT_DATABASE="JDatabase: :getInstance: Не удалось подключиться к базе данных.
joomla.library: %1$s - %2$s" +JLIB_INSTALLER_ABORT_NOINSTALLPATH="Пути установки не существует." +JLIB_INSTALLER_ABORT_PACK_INSTALL_CREATE_DIRECTORY="Установка пакета: Не удалось создать каталог: %s" +JLIB_INSTALLER_ABORT_PACK_INSTALL_ERROR_EXTENSION="Пакет: %1$s: В процессе установки произошла ошибка: %2$s" +JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES="Пакет: %s: Не удалось найти файлы для установки пакета." +JLIB_INSTALLER_ERROR_FAIL_COPY_FILE="JInstaller: :Install: Не удалось скопировать файл %1$s в %2$s" +JLIB_INSTALLER_INSTALL="Установка" +JLIB_INSTALLER_NOT_ERROR="Ошибка, которая связана с установкой языковых файлов TinyMCE, не влияет на установку языковых пакетов. Некоторые языковые пакеты, созданные до версии Joomla! 3.2.0, могут пытаться установить отдельные языковые файлы TinyMCE. Поскольку в настоящее время они включены в ядро, их больше не нужно устанавливать отдельно." +JLIB_UTIL_ERROR_CONNECT_DATABASE="JDatabase: :getInstance: Не удалось подключиться к базе данных.
joomla.library: %1$s - %2$s" ; Strings for the language debugger JDEBUG_LANGUAGE_FILES_IN_ERROR="Ошибки в языковых файлах" @@ -339,5 +341,5 @@ WARNING="Предупреждение" JLIB_JS_AJAX_ERROR_CONNECTION_ABORT="Произошла ошибка соединения при получении данных JSON." JLIB_JS_AJAX_ERROR_NO_CONTENT="Содержимое не было возвращено." JLIB_JS_AJAX_ERROR_OTHER="Произошла ошибка при получении данных JSON: код состояния HTTP %s." -JLIB_JS_AJAX_ERROR_PARSE="Произошла ошибка парсинга при обработке данных JSON:
%s" +JLIB_JS_AJAX_ERROR_PARSE="Произошла ошибка парсинга при обработке данных JSON:
%s" JLIB_JS_AJAX_ERROR_TIMEOUT="Превышено время ожидания ответа при получении данных JSON." diff --git a/installation/language/ru-RU/ru-RU.xml b/installation/language/ru-RU/ru-RU.xml index 26d9c55f7d2..daf8b626303 100644 --- a/installation/language/ru-RU/ru-RU.xml +++ b/installation/language/ru-RU/ru-RU.xml @@ -1,10 +1,8 @@ - - Russian (Russia) - 3.9.17 - March 2020 + + Russian (ru-RU) + 3.9.23 + 2020-11-20 Russian Translation Team Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/installation/language/th-TH/th-TH.ini b/installation/language/th-TH/th-TH.ini index 35c96ecce2c..823f9bde68a 100644 --- a/installation/language/th-TH/th-TH.ini +++ b/installation/language/th-TH/th-TH.ini @@ -301,10 +301,12 @@ JLIB_FORM_FIELD_INVALID="ข้อมูลในฟิลด์ไม่ถู JLIB_FORM_VALIDATE_FIELD_INVALID="ข้อมูลในฟิลด์ไม่ถูกต้อง: %s" JLIB_FORM_VALIDATE_FIELD_REQUIRED="ต้องใส่: %s" JLIB_INSTALLER_ABORT="ยกเลิกการติดตั้งภาษา: %s" +JLIB_INSTALLER_ABORT_NOINSTALLPATH="ไม่พบพาทที่ใช้ในการติดตั้ง" JLIB_INSTALLER_ABORT_PACK_INSTALL_CREATE_DIRECTORY="ติดตั้งแพคเกจ: ไม่สามารถสร้างโฟลเดอร์: %s" JLIB_INSTALLER_ABORT_PACK_INSTALL_ERROR_EXTENSION="แพคเกจ %1$s: มีข้อผิดพลาดในการติดตั้งส่วนเสริม: %2$s" JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES="แพคเกจ %s: ไม่มีไฟล์สำหรับใช้ติดตั้ง!" JLIB_INSTALLER_ERROR_FAIL_COPY_FILE="JInstaller: :Install: การคัดลอกไฟล์ล้มเหลวจาก %1$s ไปยัง %2$s" +JLIB_INSTALLER_INSTALL="ติดตั้ง" JLIB_INSTALLER_NOT_ERROR="หากมีข้อผิดที่เกี่ยวข้องกับการติดตั้งไฟล์ภาษาของ TinyMCE ซึ่งจะไม่มีผลกระทบต่อการติดตั้งของไฟล์ภาษา เพราะบางแพ็คเกจภาษาถูกสร้างขึ้นก่อนที่จะมี Joomla! 3.2.0 อาจเป็นเพราะพยายามที่จะติดตั้งไฟล์ภาษาของ TinyMCE แยกต่างหาก ซึ่งตอนนี้ได้ถูกรวมอยู่ในคอร์หลักนี้แล้ว โดยที่ไม่จำเป็นต้องมีการติดตั้งตามลงไป" JLIB_UTIL_ERROR_CONNECT_DATABASE="JDatabase: :getInstance: ไม่สามารถติดต่อฐานข้อมูลได้
joomla.library: %1$s - %2$s" diff --git a/installation/language/th-TH/th-TH.xml b/installation/language/th-TH/th-TH.xml index 64dba31be18..107ced19a5e 100644 --- a/installation/language/th-TH/th-TH.xml +++ b/installation/language/th-TH/th-TH.xml @@ -3,8 +3,8 @@ version="3.9" client="installation"> Thai (ภาษาไทย) - 3.9.17 - March 2020 + 3.9.23 + November 2020 Thai Translation Team Copyright (C) 2005 - 2020 Open Source Matters, Inc & JoomlaCorner.com. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt From 435d780d9a87504267256033c5f6fb984f713ff9 Mon Sep 17 00:00:00 2001 From: Harald Leithner Date: Sun, 22 Nov 2020 23:26:01 +0100 Subject: [PATCH 29/31] Prepare Joomla! 3.9.23 Signed-off-by: Harald Leithner --- .../com_categories/models/category.php | 26 +++++++++++ .../com_config/model/application.php | 30 +++++++++++- .../components/com_config/model/component.php | 5 ++ .../com_config/model/form/application.xml | 5 ++ .../components/com_content/models/article.php | 8 ++++ .../components/com_fields/models/field.php | 26 +++++++++++ .../components/com_fields/models/group.php | 26 +++++++++++ .../components/com_menus/models/menu.php | 26 +++++++++++ .../components/com_modules/models/module.php | 8 ++++ .../com_privacy/controllers/request.php | 3 ++ .../views/requests/tmpl/default.php | 2 +- .../components/com_users/models/users.php | 7 +++ administrator/manifests/files/joomla.xml | 2 +- components/com_finder/models/suggestions.php | 46 ++++++++++++++++--- libraries/src/Version.php | 10 ++-- modules/mod_random_image/mod_random_image.xml | 1 + plugins/actionlog/joomla/joomla.php | 24 ++++++++-- 17 files changed, 236 insertions(+), 19 deletions(-) diff --git a/administrator/components/com_categories/models/category.php b/administrator/components/com_categories/models/category.php index 0a34a73a13a..f23198661fb 100644 --- a/administrator/components/com_categories/models/category.php +++ b/administrator/components/com_categories/models/category.php @@ -353,6 +353,32 @@ class CategoriesModelCategory extends JModelAdmin return $data; } + /** + * Method to validate the form data. + * + * @param JForm $form The form to validate against. + * @param array $data The data to validate. + * @param string $group The name of the field group to validate. + * + * @return array|boolean Array of filtered data if valid, false otherwise. + * + * @see JFormRule + * @see JFilterInput + * @since 3.9.23 + */ + public function validate($form, $data, $group = null) + { + if (!JFactory::getUser()->authorise('core.admin', $data['extension'])) + { + if (isset($data['rules'])) + { + unset($data['rules']); + } + } + + return parent::validate($form, $data, $group); + } + /** * Method to preprocess the form. * diff --git a/administrator/components/com_config/model/application.php b/administrator/components/com_config/model/application.php index 6ae10ad52f0..d6a1d1a9b91 100644 --- a/administrator/components/com_config/model/application.php +++ b/administrator/components/com_config/model/application.php @@ -19,6 +19,15 @@ use Joomla\Utilities\ArrayHelper; */ class ConfigModelApplication extends ConfigModelForm { + /** + * Array of protected password fields from the configuration.php + * + * @var array + * @since 3.9.23 + */ + private $protectedConfigurtionFields = array('password', 'secret', 'ftp_pass', 'smtppass', 'redis_server_auth', 'session_redis_server_auth'); + + /** * Method to get a form object. * @@ -85,6 +94,15 @@ class ConfigModelApplication extends ConfigModelForm $data = array_merge($data, $temp); } + // Unset all protected config fields to empty + foreach ($this->protectedConfigurtionFields as $fieldKey) + { + if (isset($data[$fieldKey])) + { + $data[$fieldKey] = ''; + } + } + return $data; } @@ -101,13 +119,23 @@ class ConfigModelApplication extends ConfigModelForm { $app = JFactory::getApplication(); $dispatcher = JEventDispatcher::getInstance(); + $config = JFactory::getConfig(); + + // Try to load the values from the configuration file + foreach ($this->protectedConfigurtionFields as $fieldKey) + { + if (isset($data[$fieldKey]) && empty($data[$fieldKey])) + { + $data[$fieldKey] = $config->get($fieldKey); + } + } // Check that we aren't setting wrong database configuration $options = array( 'driver' => $data['dbtype'], 'host' => $data['host'], 'user' => $data['user'], - 'password' => JFactory::getConfig()->get('password'), + 'password' => $config->get('password'), 'database' => $data['db'], 'prefix' => $data['dbprefix'] ); diff --git a/administrator/components/com_config/model/component.php b/administrator/components/com_config/model/component.php index 3308bf1f3a1..456369cbabd 100644 --- a/administrator/components/com_config/model/component.php +++ b/administrator/components/com_config/model/component.php @@ -153,6 +153,11 @@ class ConfigModelComponent extends ConfigModelForm // Save the rules. if (isset($data['params']) && isset($data['params']['rules'])) { + if (!JFactory::getUser()->authorise('core.admin', $data['option'])) + { + throw new RuntimeException(JText::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED')); + } + $rules = new JAccessRules($data['params']['rules']); $asset = JTable::getInstance('asset'); diff --git a/administrator/components/com_config/model/form/application.xml b/administrator/components/com_config/model/form/application.xml index a276fc52c5f..e68f5f86587 100644 --- a/administrator/components/com_config/model/form/application.xml +++ b/administrator/components/com_config/model/form/application.xml @@ -177,6 +177,7 @@ showon="cache_handler:redis" autocomplete="off" size="30" + hint="***************" /> @@ -662,6 +665,7 @@ filter="raw" autocomplete="off" size="30" + hint="***************" /> @@ -982,6 +986,7 @@ showon="session_handler:redis" autocomplete="off" size="30" + hint="***************" /> authorise('core.admin', 'com_content')) + { + if (isset($data['rules'])) + { + unset($data['rules']); + } + } + return parent::validate($form, $data, $group); } diff --git a/administrator/components/com_fields/models/field.php b/administrator/components/com_fields/models/field.php index f8ef6634243..63017cfd9aa 100644 --- a/administrator/components/com_fields/models/field.php +++ b/administrator/components/com_fields/models/field.php @@ -876,6 +876,32 @@ class FieldsModelField extends JModelAdmin return $data; } + /** + * Method to validate the form data. + * + * @param JForm $form The form to validate against. + * @param array $data The data to validate. + * @param string $group The name of the field group to validate. + * + * @return array|boolean Array of filtered data if valid, false otherwise. + * + * @see JFormRule + * @see JFilterInput + * @since 3.9.23 + */ + public function validate($form, $data, $group = null) + { + if (!JFactory::getUser()->authorise('core.admin', 'com_fields')) + { + if (isset($data['rules'])) + { + unset($data['rules']); + } + } + + return parent::validate($form, $data, $group); + } + /** * Method to allow derived classes to preprocess the form. * diff --git a/administrator/components/com_fields/models/group.php b/administrator/components/com_fields/models/group.php index 004f0afc5f3..09b629ddee8 100644 --- a/administrator/components/com_fields/models/group.php +++ b/administrator/components/com_fields/models/group.php @@ -255,6 +255,32 @@ class FieldsModelGroup extends JModelAdmin } } + /** + * Method to validate the form data. + * + * @param JForm $form The form to validate against. + * @param array $data The data to validate. + * @param string $group The name of the field group to validate. + * + * @return array|boolean Array of filtered data if valid, false otherwise. + * + * @see JFormRule + * @see JFilterInput + * @since 3.9.23 + */ + public function validate($form, $data, $group = null) + { + if (!JFactory::getUser()->authorise('core.admin', 'com_fields')) + { + if (isset($data['rules'])) + { + unset($data['rules']); + } + } + + return parent::validate($form, $data, $group); + } + /** * Method to get the data that should be injected in the form. * diff --git a/administrator/components/com_menus/models/menu.php b/administrator/components/com_menus/models/menu.php index f4ffb18c775..18c9359902c 100644 --- a/administrator/components/com_menus/models/menu.php +++ b/administrator/components/com_menus/models/menu.php @@ -184,6 +184,32 @@ class MenusModelMenu extends JModelForm return $data; } + /** + * Method to validate the form data. + * + * @param JForm $form The form to validate against. + * @param array $data The data to validate. + * @param string $group The name of the field group to validate. + * + * @return array|boolean Array of filtered data if valid, false otherwise. + * + * @see JFormRule + * @see JFilterInput + * @since 3.9.23 + */ + public function validate($form, $data, $group = null) + { + if (!JFactory::getUser()->authorise('core.admin', 'com_menus')) + { + if (isset($data['rules'])) + { + unset($data['rules']); + } + } + + return parent::validate($form, $data, $group); + } + /** * Method to save the form data. * diff --git a/administrator/components/com_modules/models/module.php b/administrator/components/com_modules/models/module.php index f2ebcfeac93..afdc2e9cc89 100644 --- a/administrator/components/com_modules/models/module.php +++ b/administrator/components/com_modules/models/module.php @@ -896,6 +896,14 @@ class ModulesModelModule extends JModelAdmin { JLoader::register('ContentHelper', JPATH_ADMINISTRATOR . '/components/com_content/helpers/content.php'); + if (!JFactory::getUser()->authorise('core.admin', 'com_modules')) + { + if (isset($data['rules'])) + { + unset($data['rules']); + } + } + return parent::validate($form, $data, $group); } diff --git a/administrator/components/com_privacy/controllers/request.php b/administrator/components/com_privacy/controllers/request.php index 222eebb33d0..9fa20e22a1d 100644 --- a/administrator/components/com_privacy/controllers/request.php +++ b/administrator/components/com_privacy/controllers/request.php @@ -135,6 +135,9 @@ class PrivacyControllerRequest extends JControllerForm */ public function emailexport() { + // Check for request forgeries. + $this->checkToken('get'); + /** @var PrivacyModelExport $model */ $model = $this->getModel('Export'); diff --git a/administrator/components/com_privacy/views/requests/tmpl/default.php b/administrator/components/com_privacy/views/requests/tmpl/default.php index ddb1cfb7ba3..4488eb9a964 100644 --- a/administrator/components/com_privacy/views/requests/tmpl/default.php +++ b/administrator/components/com_privacy/views/requests/tmpl/default.php @@ -84,7 +84,7 @@ $urgentRequestDate->sub(new DateInterval('P' . $this->urgentRequestAge . 'D')); status == 1 && $item->request_type === 'export') : ?> sendMailEnabled) : ?> - + status == 1 && $item->request_type === 'remove') : ?> diff --git a/administrator/components/com_users/models/users.php b/administrator/components/com_users/models/users.php index dba23073d07..f9eff641277 100644 --- a/administrator/components/com_users/models/users.php +++ b/administrator/components/com_users/models/users.php @@ -18,6 +18,13 @@ use Joomla\Utilities\ArrayHelper; */ class UsersModelUsers extends JModelList { + /** + * A blacklist of filter variables to not merge into the model's state + * + * @var array + */ + protected $filterBlacklist = array('groups', 'excluded'); + /** * Constructor. * diff --git a/administrator/manifests/files/joomla.xml b/administrator/manifests/files/joomla.xml index 7656437ca1f..4dec2e85706 100644 --- a/administrator/manifests/files/joomla.xml +++ b/administrator/manifests/files/joomla.xml @@ -6,7 +6,7 @@ www.joomla.org (C) 2005 - 2020 Open Source Matters. All rights reserved GNU General Public License version 2 or later; see LICENSE.txt - 3.9.23-rc2 + 3.9.23 November 2020 FILES_JOOMLA_XML_DESCRIPTION diff --git a/components/com_finder/models/suggestions.php b/components/com_finder/models/suggestions.php index 4fd5dd2aae6..5081034cef3 100644 --- a/components/com_finder/models/suggestions.php +++ b/components/com_finder/models/suggestions.php @@ -57,20 +57,54 @@ class FinderModelSuggestions extends JModelList */ protected function getListQuery() { + $user = JFactory::getUser(); + $groups = \Joomla\Utilities\ArrayHelper::toInteger($user->getAuthorisedViewLevels()); + // Create a new query object. $db = $this->getDbo(); - $query = $db->getQuery(true); + $termIdQuery = $db->getQuery(true); + $termQuery = $db->getQuery(true); + + // Limit term count to a reasonable number of results to reduce main query join size + $termIdQuery->select('ti.term_id') + ->from($db->quoteName('#__finder_terms', 'ti')) + ->where('ti.term LIKE ' . $db->quote($db->escape($this->getState('input'), true) . '%', false)) + ->where('ti.common = 0') + ->where('ti.language IN (' . $db->quote($this->getState('language')) . ', ' . $db->quote('*') . ')') + ->order('ti.links DESC') + ->order('ti.weight DESC'); + + $termIds = $db->setQuery($termIdQuery, 0, 100)->loadColumn(); + + // Early return on term mismatch + if (!count($termIds)) + { + return $termIdQuery; + } + + $termIdString = implode(',', $termIds); // Select required fields - $query->select('t.term') + $termQuery->select('DISTINCT(t.term)') ->from($db->quoteName('#__finder_terms') . ' AS t') - ->where('t.term LIKE ' . $db->quote($db->escape($this->getState('input'), true) . '%')) - ->where('t.common = 0') - ->where('t.language IN (' . $db->quote($db->escape($this->getState('language'), true)) . ', ' . $db->quote('*') . ')') + ->where('t.term_id IN (' . $termIdString . ')') ->order('t.links DESC') ->order('t.weight DESC'); - return $query; + // Determine the relevant mapping table suffix by inverting the logic from drivers + $mappingTableSuffix = substr(md5(substr($this->getState('input'), 0, 1)), 0, 1); + + // Join mapping table for term <-> link relation + $mappingTable = $db->quoteName('#__finder_links_terms' . $mappingTableSuffix); + $termQuery->join('INNER', $mappingTable . ' AS tm ON tm.term_id = t.term_id'); + + // Join links table + $termQuery->join('INNER', $db->quoteName('#__finder_links') . ' AS l ON (tm.link_id = l.link_id)') + ->where('l.access IN (' . implode(',', $groups) . ')') + ->where('l.state = 1') + ->where('l.published = 1'); + + return $termQuery; } /** diff --git a/libraries/src/Version.php b/libraries/src/Version.php index e1b6c7cc8dc..100f1f7f199 100644 --- a/libraries/src/Version.php +++ b/libraries/src/Version.php @@ -60,7 +60,7 @@ final class Version * @var string * @since 3.8.0 */ - const EXTRA_VERSION = 'rc2'; + const EXTRA_VERSION = ''; /** * Release version. @@ -78,7 +78,7 @@ final class Version * @since 3.5 * @deprecated 4.0 Use separated version constants instead */ - const DEV_LEVEL = '23-rc2'; + const DEV_LEVEL = '23'; /** * Development status. @@ -86,7 +86,7 @@ final class Version * @var string * @since 3.5 */ - const DEV_STATUS = 'Release Candidate'; + const DEV_STATUS = 'Stable'; /** * Build number. @@ -111,7 +111,7 @@ final class Version * @var string * @since 3.5 */ - const RELDATE = '21-November-2020'; + const RELDATE = '24-November-2020'; /** * Release time. @@ -119,7 +119,7 @@ final class Version * @var string * @since 3.5 */ - const RELTIME = '18:39'; + const RELTIME = '15:00'; /** * Release timezone. diff --git a/modules/mod_random_image/mod_random_image.xml b/modules/mod_random_image/mod_random_image.xml index 46ebfac8155..128a617d9c9 100644 --- a/modules/mod_random_image/mod_random_image.xml +++ b/modules/mod_random_image/mod_random_image.xml @@ -35,6 +35,7 @@ type="text" label="MOD_RANDOM_IMAGE_FIELD_FOLDER_LABEL" description="MOD_RANDOM_IMAGE_FIELD_FOLDER_DESC" + validate="filePath" /> db->getQuery(true) + ->select($this->db->quoteName(array('id', 'username'))) + ->from($this->db->quoteName('#__users')) + ->where($this->db->quoteName('username') . ' = ' . $this->db->quote($response['username'])); + $this->db->setQuery($query); + + try + { + $loggedInUser = $this->db->loadObject(); + } + catch (JDatabaseExceptionExecuting $e) + { + return; + } // Not a valid user, return - if (!$loggedInUser->id) + if (!isset($loggedInUser->id)) { return; } @@ -1066,10 +1080,10 @@ class PlgActionlogJoomla extends ActionLogPlugin { $context = $this->app->input->get('option'); $user = JFactory::getUser(); - + if (empty($oldVersion)) - { - $oldVersion = JText::_('JLIB_UNKNOWN'); + { + $oldVersion = JText::_('JLIB_UNKNOWN'); } $message = array( From 1a08c81844ccde9f8c6988779d94179f1dddc4ca Mon Sep 17 00:00:00 2001 From: Harald Leithner Date: Tue, 24 Nov 2020 17:14:20 +0100 Subject: [PATCH 30/31] Reset to dev --- administrator/language/en-GB/en-GB.xml | 2 +- administrator/language/en-GB/install.xml | 2 +- administrator/manifests/files/joomla.xml | 2 +- administrator/manifests/packages/pkg_en-GB.xml | 2 +- installation/language/en-GB/en-GB.xml | 2 +- language/en-GB/en-GB.xml | 2 +- language/en-GB/install.xml | 2 +- libraries/src/Version.php | 10 +++++----- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/administrator/language/en-GB/en-GB.xml b/administrator/language/en-GB/en-GB.xml index 77edab773f9..004c243a92b 100644 --- a/administrator/language/en-GB/en-GB.xml +++ b/administrator/language/en-GB/en-GB.xml @@ -1,7 +1,7 @@ English (en-GB) - 3.9.23 + 3.9.24 November 2020 Joomla! Project admin@joomla.org diff --git a/administrator/language/en-GB/install.xml b/administrator/language/en-GB/install.xml index 291fcb75e89..cebcfc9ab1c 100644 --- a/administrator/language/en-GB/install.xml +++ b/administrator/language/en-GB/install.xml @@ -2,7 +2,7 @@ English (en-GB) en-GB - 3.9.23 + 3.9.24 November 2020 Joomla! Project admin@joomla.org diff --git a/administrator/manifests/files/joomla.xml b/administrator/manifests/files/joomla.xml index 4dec2e85706..f316afb21f5 100644 --- a/administrator/manifests/files/joomla.xml +++ b/administrator/manifests/files/joomla.xml @@ -6,7 +6,7 @@ www.joomla.org (C) 2005 - 2020 Open Source Matters. All rights reserved GNU General Public License version 2 or later; see LICENSE.txt - 3.9.23 + 3.9.24-dev November 2020 FILES_JOOMLA_XML_DESCRIPTION diff --git a/administrator/manifests/packages/pkg_en-GB.xml b/administrator/manifests/packages/pkg_en-GB.xml index 3f2bc4a9bb3..24127f408bb 100644 --- a/administrator/manifests/packages/pkg_en-GB.xml +++ b/administrator/manifests/packages/pkg_en-GB.xml @@ -2,7 +2,7 @@ English (en-GB) Language Pack en-GB - 3.9.23.1 + 3.9.24.1 November 2020 Joomla! Project admin@joomla.org diff --git a/installation/language/en-GB/en-GB.xml b/installation/language/en-GB/en-GB.xml index 1032bc0b1c4..e25842550c6 100644 --- a/installation/language/en-GB/en-GB.xml +++ b/installation/language/en-GB/en-GB.xml @@ -3,7 +3,7 @@ version="3.8" client="installation"> English (United Kingdom) - 3.9.23 + 3.9.24 November 2020 Joomla! Project Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved. diff --git a/language/en-GB/en-GB.xml b/language/en-GB/en-GB.xml index 382b6067e90..282eaafb0b2 100644 --- a/language/en-GB/en-GB.xml +++ b/language/en-GB/en-GB.xml @@ -1,7 +1,7 @@ English (en-GB) - 3.9.23 + 3.9.24 November 2020 Joomla! Project admin@joomla.org diff --git a/language/en-GB/install.xml b/language/en-GB/install.xml index 798c615f84c..c12b3e9b33a 100644 --- a/language/en-GB/install.xml +++ b/language/en-GB/install.xml @@ -2,7 +2,7 @@ English (en-GB) en-GB - 3.9.23 + 3.9.24 November 2020 Joomla! Project admin@joomla.org diff --git a/libraries/src/Version.php b/libraries/src/Version.php index 100f1f7f199..8c05d396e8f 100644 --- a/libraries/src/Version.php +++ b/libraries/src/Version.php @@ -49,7 +49,7 @@ final class Version * @var integer * @since 3.8.0 */ - const PATCH_VERSION = 23; + const PATCH_VERSION = 24; /** * Extra release version info. @@ -60,7 +60,7 @@ final class Version * @var string * @since 3.8.0 */ - const EXTRA_VERSION = ''; + const EXTRA_VERSION = 'dev'; /** * Release version. @@ -78,7 +78,7 @@ final class Version * @since 3.5 * @deprecated 4.0 Use separated version constants instead */ - const DEV_LEVEL = '23'; + const DEV_LEVEL = '24-dev'; /** * Development status. @@ -86,7 +86,7 @@ final class Version * @var string * @since 3.5 */ - const DEV_STATUS = 'Stable'; + const DEV_STATUS = 'Development'; /** * Build number. @@ -119,7 +119,7 @@ final class Version * @var string * @since 3.5 */ - const RELTIME = '15:00'; + const RELTIME = '16:13'; /** * Release timezone. From d10bd68fc45f8be627eb573774074063982771fa Mon Sep 17 00:00:00 2001 From: George Wilson Date: Thu, 26 Nov 2020 03:43:18 +0000 Subject: [PATCH 31/31] Add deprecation note --- libraries/src/MVC/Model/BaseDatabaseModel.php | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/src/MVC/Model/BaseDatabaseModel.php b/libraries/src/MVC/Model/BaseDatabaseModel.php index 33dc9a7a912..df56c291d01 100644 --- a/libraries/src/MVC/Model/BaseDatabaseModel.php +++ b/libraries/src/MVC/Model/BaseDatabaseModel.php @@ -76,6 +76,7 @@ abstract class BaseDatabaseModel extends \JObject * * @var MVCFactoryInterface * @since 3.10.0 + * @deprecated 4.0 This is a temporary property that will be moved into a trait in Joomla 4 */ protected $factory;