diff --git a/.gitignore b/.gitignore index 5b8a7149..13d06bef 100644 --- a/.gitignore +++ b/.gitignore @@ -50,5 +50,6 @@ config/* res/ tools/ tmp/ +inc/Plugins/* !.blank \ No newline at end of file diff --git a/ajax/ajax_accGetFiles.php b/ajax/ajax_accGetFiles.php index b1344b02..9369c364 100644 --- a/ajax/ajax_accGetFiles.php +++ b/ajax/ajax_accGetFiles.php @@ -29,7 +29,7 @@ use SP\Http\Request; use SP\Http\Response; use SP\Util\Checks; -define('APP_ROOT', '..'); +define('APP_ROOT', dirname(__DIR__)); require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; diff --git a/ajax/ajax_accSearch.php b/ajax/ajax_accSearch.php index 9498b77e..372a59c9 100644 --- a/ajax/ajax_accSearch.php +++ b/ajax/ajax_accSearch.php @@ -28,7 +28,7 @@ use SP\Http\Request; use SP\Core\SessionUtil; use SP\Http\Response; -define('APP_ROOT', '..'); +define('APP_ROOT', dirname(__DIR__)); require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; diff --git a/ajax/ajax_checkConnection.php b/ajax/ajax_checkConnection.php index 263ddb7f..f4276701 100644 --- a/ajax/ajax_checkConnection.php +++ b/ajax/ajax_checkConnection.php @@ -25,7 +25,7 @@ use SP\Controller\ChecksController; use SP\Http\Request; -define('APP_ROOT', '..'); +define('APP_ROOT', dirname(__DIR__)); require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; diff --git a/ajax/ajax_checkUpds.php b/ajax/ajax_checkUpds.php index f9a34e70..8b15e698 100644 --- a/ajax/ajax_checkUpds.php +++ b/ajax/ajax_checkUpds.php @@ -25,7 +25,7 @@ use SP\Controller\MainController; use SP\Http\Request; -define('APP_ROOT', '..'); +define('APP_ROOT', dirname(__DIR__)); require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; diff --git a/ajax/ajax_configSave.php b/ajax/ajax_configSave.php index 4d6f9c59..79573b80 100644 --- a/ajax/ajax_configSave.php +++ b/ajax/ajax_configSave.php @@ -25,7 +25,7 @@ use SP\Controller\ConfigActionController; use SP\Http\Request; -define('APP_ROOT', '..'); +define('APP_ROOT', dirname(__DIR__)); require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; diff --git a/ajax/ajax_doLogin.php b/ajax/ajax_doLogin.php index 33269ddd..29de9b96 100644 --- a/ajax/ajax_doLogin.php +++ b/ajax/ajax_doLogin.php @@ -25,7 +25,7 @@ use SP\Controller\LoginController; use SP\Http\Request; -define('APP_ROOT', '..'); +define('APP_ROOT', dirname(__DIR__)); require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; diff --git a/ajax/ajax_eventlog.php b/ajax/ajax_eventlog.php index 34aa7891..132c5d0c 100644 --- a/ajax/ajax_eventlog.php +++ b/ajax/ajax_eventlog.php @@ -26,7 +26,7 @@ use SP\Controller\EventlogController; use SP\Core\Init; use SP\Http\Request; -define('APP_ROOT', '..'); +define('APP_ROOT', dirname(__DIR__)); require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; diff --git a/ajax/ajax_filesMgmt.php b/ajax/ajax_filesMgmt.php index 214469c9..6cb26ef4 100644 --- a/ajax/ajax_filesMgmt.php +++ b/ajax/ajax_filesMgmt.php @@ -38,7 +38,7 @@ use SP\Mgmt\Files\FileUtil; use SP\Util\Checks; use SP\Util\Util; -define('APP_ROOT', '..'); +define('APP_ROOT', dirname(__DIR__)); require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; diff --git a/ajax/ajax_getContent.php b/ajax/ajax_getContent.php index 401f8602..2201f919 100644 --- a/ajax/ajax_getContent.php +++ b/ajax/ajax_getContent.php @@ -39,7 +39,7 @@ use SP\Http\Request; use SP\Http\Response; use SP\Util\Util; -define('APP_ROOT', '..'); +define('APP_ROOT', dirname(__DIR__)); require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; diff --git a/ajax/ajax_getEnvironment.php b/ajax/ajax_getEnvironment.php index f0cf24c2..fd4dbd95 100644 --- a/ajax/ajax_getEnvironment.php +++ b/ajax/ajax_getEnvironment.php @@ -32,7 +32,7 @@ use SP\Http\Request; use SP\Http\Response; use SP\Util\Checks; -define('APP_ROOT', '..'); +define('APP_ROOT', dirname(__DIR__)); require APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; require APP_ROOT . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'strings.js.php'; diff --git a/ajax/ajax_getItems.php b/ajax/ajax_getItems.php index 80efa9b7..6e3fab49 100644 --- a/ajax/ajax_getItems.php +++ b/ajax/ajax_getItems.php @@ -25,7 +25,7 @@ use SP\Controller\ItemsController; use SP\Http\Request; -define('APP_ROOT', '..'); +define('APP_ROOT', dirname(__DIR__)); require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; diff --git a/ajax/ajax_install.php b/ajax/ajax_install.php index b9310225..69443646 100644 --- a/ajax/ajax_install.php +++ b/ajax/ajax_install.php @@ -29,7 +29,7 @@ use SP\Http\JsonResponse; use SP\Http\Request; use SP\Util\Json; -define('APP_ROOT', '..'); +define('APP_ROOT', dirname(__DIR__)); define('IS_INSTALLER', 1); require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; diff --git a/ajax/ajax_itemSave.php b/ajax/ajax_itemSave.php index ff2aa467..8bcc393f 100644 --- a/ajax/ajax_itemSave.php +++ b/ajax/ajax_itemSave.php @@ -25,7 +25,7 @@ use SP\Controller\ItemActionController; use SP\Http\Request; -define('APP_ROOT', '..'); +define('APP_ROOT', dirname(__DIR__)); require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; diff --git a/ajax/ajax_itemSearch.php b/ajax/ajax_itemSearch.php index f1078b16..59a2909c 100644 --- a/ajax/ajax_itemSearch.php +++ b/ajax/ajax_itemSearch.php @@ -22,11 +22,11 @@ * along with sysPass. If not, see . */ -define('APP_ROOT', '..'); - use SP\Controller\ItemSearchController; use SP\Http\Request; +define('APP_ROOT', dirname(__DIR__)); + require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; Request::checkReferer('GET'); diff --git a/ajax/ajax_itemShow.php b/ajax/ajax_itemShow.php index 798fdcc9..769e6544 100644 --- a/ajax/ajax_itemShow.php +++ b/ajax/ajax_itemShow.php @@ -25,7 +25,7 @@ use SP\Controller\ItemShowController; use SP\Http\Request; -define('APP_ROOT', '..'); +define('APP_ROOT', dirname(__DIR__)); require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; diff --git a/ajax/ajax_noticeSearch.php b/ajax/ajax_noticeSearch.php index 69637fda..037acf47 100644 --- a/ajax/ajax_noticeSearch.php +++ b/ajax/ajax_noticeSearch.php @@ -22,11 +22,11 @@ * along with sysPass. If not, see . */ -define('APP_ROOT', '..'); - use SP\Controller\NoticesSearchController; use SP\Http\Request; +define('APP_ROOT', dirname(__DIR__)); + require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; Request::checkReferer('GET'); diff --git a/ajax/ajax_noticeShow.php b/ajax/ajax_noticeShow.php index 4f38be0b..8ee02abc 100644 --- a/ajax/ajax_noticeShow.php +++ b/ajax/ajax_noticeShow.php @@ -22,11 +22,11 @@ * along with sysPass. If not, see . */ -define('APP_ROOT', '..'); - use SP\Controller\NoticeShowController; use SP\Http\Request; +define('APP_ROOT', dirname(__DIR__)); + require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; Request::checkReferer('GET'); diff --git a/ajax/ajax_passReset.php b/ajax/ajax_passReset.php index 400dba18..7a4eadb8 100644 --- a/ajax/ajax_passReset.php +++ b/ajax/ajax_passReset.php @@ -34,7 +34,7 @@ use SP\Mgmt\Users\UserPass; use SP\Mgmt\Users\UserPassRecover; use SP\Util\Json; -define('APP_ROOT', '..'); +define('APP_ROOT', dirname(__DIR__)); require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; diff --git a/ajax/ajax_task.php b/ajax/ajax_task.php index fd17eea7..9b4a37bf 100644 --- a/ajax/ajax_task.php +++ b/ajax/ajax_task.php @@ -25,7 +25,7 @@ use SP\Controller\TaskController; use SP\Http\Request; -define('APP_ROOT', '..'); +define('APP_ROOT', dirname(__DIR__)); require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; diff --git a/ajax/ajax_upgrade.php b/ajax/ajax_upgrade.php index e8213874..06e631bf 100644 --- a/ajax/ajax_upgrade.php +++ b/ajax/ajax_upgrade.php @@ -25,7 +25,7 @@ use SP\Controller\MainActionController; use SP\Http\Request; -define('APP_ROOT', '..'); +define('APP_ROOT', dirname(__DIR__)); define('IS_UPGRADE', 1); require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; diff --git a/ajax/ajax_userPrefsSave.php b/ajax/ajax_userPrefsSave.php index 78a01859..f7c930dc 100644 --- a/ajax/ajax_userPrefsSave.php +++ b/ajax/ajax_userPrefsSave.php @@ -38,7 +38,7 @@ use SP\Util\Checks; use SP\Util\Json; use SP\Util\Util; -define('APP_ROOT', '..'); +define('APP_ROOT', dirname(__DIR__)); require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; diff --git a/ajax/ajax_wiki.php b/ajax/ajax_wiki.php index b1791577..d3cc27d2 100644 --- a/ajax/ajax_wiki.php +++ b/ajax/ajax_wiki.php @@ -25,7 +25,7 @@ use SP\Controller\WikiController; use SP\Http\Request; -define('APP_ROOT', '..'); +define('APP_ROOT', dirname(__DIR__)); require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; diff --git a/composer.json b/composer.json new file mode 100644 index 00000000..a90e80b0 --- /dev/null +++ b/composer.json @@ -0,0 +1,34 @@ +{ + "name": "nuxsmin/syspass", + "description": "PHP web based Password Manager for business and personal use.", + "homepage": "https://syspass.org", + "minimum-stability": "stable", + "license": "GPL-3.0", + "authors": [ + { + "name": "Rubén Domínguez", + "email": "nuxsmin@syspass.org", + "role": "Author/Developer", + "homepage": "https://syspass.org/" + } + ], + "support": { + "issues": "https://github.com/nuxsmin/sysPass/issues", + "source": "https://github.com/nuxsmin/sysPass", + "docs": "https://doc.syspass.org" + }, + "require": { + "defuse/php-encryption": "~2.0", + "phpmailer/phpmailer": "~v6.0", + "ademarre/binary-to-text-php": "dev-master", + "phpseclib/phpseclib": "~2.0" + }, + "autoload": { + "psr-4": { + "SP\\": "inc/" + } + }, + "config": { + "classmap-authoritative": true + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 00000000..ea2eaad2 --- /dev/null +++ b/composer.lock @@ -0,0 +1,333 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "content-hash": "bed8589b95fe90446e446e0920ae8063", + "packages": [ + { + "name": "ademarre/binary-to-text-php", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/ademarre/binary-to-text-php.git", + "reference": "5d98d17be16d65e03851654a717293a4317bb947" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ademarre/binary-to-text-php/zipball/5d98d17be16d65e03851654a717293a4317bb947", + "reference": "5d98d17be16d65e03851654a717293a4317bb947", + "shasum": "" + }, + "require": { + "php": ">=5.2.14" + }, + "type": "library", + "autoload": { + "psr-0": { + "Base2n": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andre DeMarre", + "role": "Developer" + } + ], + "description": "Collection of binary-to-text encoding utilities for PHP. Includes Base32 support and much more.", + "homepage": "https://github.com/ademarre/binary-to-text-php", + "keywords": [ + "base-4", + "base-8", + "base32", + "binary", + "octal", + "rfc4648" + ], + "time": "2015-02-27T05:11:22+00:00" + }, + { + "name": "defuse/php-encryption", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/defuse/php-encryption.git", + "reference": "5176f5abb38d3ea8a6e3ac6cd3bbb54d8185a689" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/defuse/php-encryption/zipball/5176f5abb38d3ea8a6e3ac6cd3bbb54d8185a689", + "reference": "5176f5abb38d3ea8a6e3ac6cd3bbb54d8185a689", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "paragonie/random_compat": "~2.0", + "php": ">=5.4.0" + }, + "require-dev": { + "nikic/php-parser": "^2.0|^3.0", + "phpunit/phpunit": "^4|^5" + }, + "bin": [ + "bin/generate-defuse-key" + ], + "type": "library", + "autoload": { + "psr-4": { + "Defuse\\Crypto\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Hornby", + "email": "taylor@defuse.ca", + "homepage": "https://defuse.ca/" + }, + { + "name": "Scott Arciszewski", + "email": "info@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "Secure PHP Encryption Library", + "keywords": [ + "aes", + "authenticated encryption", + "cipher", + "crypto", + "cryptography", + "encrypt", + "encryption", + "openssl", + "security", + "symmetric key cryptography" + ], + "time": "2017-05-18T21:28:48+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v2.0.10", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/634bae8e911eefa89c1abfbf1b66da679ac8f54d", + "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "autoload": { + "files": [ + "lib/random.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "pseudorandom", + "random" + ], + "time": "2017-03-13T16:27:32+00:00" + }, + { + "name": "phpmailer/phpmailer", + "version": "v6.0.1", + "source": { + "type": "git", + "url": "https://github.com/PHPMailer/PHPMailer.git", + "reference": "992392437c2e2784e0dc41446024fe411d293c96" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/992392437c2e2784e0dc41446024fe411d293c96", + "reference": "992392437c2e2784e0dc41446024fe411d293c96", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": ">=5.5.0" + }, + "require-dev": { + "doctrine/annotations": "1.2.*", + "friendsofphp/php-cs-fixer": "^2.2", + "phpdocumentor/phpdocumentor": "2.*", + "phpunit/phpunit": "^4.8 || ^5.7", + "zendframework/zend-eventmanager": "3.0.*", + "zendframework/zend-i18n": "2.7.3", + "zendframework/zend-serializer": "2.7.*" + }, + "suggest": { + "ext-mbstring": "Needed to send email in multibyte encoding charset", + "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", + "league/oauth2-google": "Needed for Google XOAUTH2 authentication", + "psr/log": "For optional PSR-3 debug logging", + "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1" + ], + "authors": [ + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "description": "PHPMailer is a full-featured email creation and transfer class for PHP", + "time": "2017-09-14T16:47:12+00:00" + }, + { + "name": "phpseclib/phpseclib", + "version": "2.0.6", + "source": { + "type": "git", + "url": "https://github.com/phpseclib/phpseclib.git", + "reference": "34a7699e6f31b1ef4035ee36444407cecf9f56aa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/34a7699e6f31b1ef4035ee36444407cecf9f56aa", + "reference": "34a7699e6f31b1ef4035ee36444407cecf9f56aa", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phing/phing": "~2.7", + "phpunit/phpunit": "~4.0", + "sami/sami": "~2.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "suggest": { + "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", + "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", + "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", + "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." + }, + "type": "library", + "autoload": { + "files": [ + "phpseclib/bootstrap.php" + ], + "psr-4": { + "phpseclib\\": "phpseclib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jim Wigginton", + "email": "terrafrost@php.net", + "role": "Lead Developer" + }, + { + "name": "Patrick Monnerat", + "email": "pm@datasphere.ch", + "role": "Developer" + }, + { + "name": "Andreas Fischer", + "email": "bantu@phpbb.com", + "role": "Developer" + }, + { + "name": "Hans-Jürgen Petrich", + "email": "petrich@tronic-media.com", + "role": "Developer" + }, + { + "name": "Graham Campbell", + "email": "graham@alt-three.com", + "role": "Developer" + } + ], + "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", + "homepage": "http://phpseclib.sourceforge.net", + "keywords": [ + "BigInteger", + "aes", + "asn.1", + "asn1", + "blowfish", + "crypto", + "cryptography", + "encryption", + "rsa", + "security", + "sftp", + "signature", + "signing", + "ssh", + "twofish", + "x.509", + "x509" + ], + "time": "2017-06-05T06:31:10+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": { + "ademarre/binary-to-text-php": 20 + }, + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/css/css.php b/css/css.php index dfabc425..f278783f 100644 --- a/css/css.php +++ b/css/css.php @@ -25,7 +25,7 @@ use SP\Html\Minify; use SP\Http\Request; -define('APP_ROOT', '..'); +define('APP_ROOT', dirname(__DIR__)); require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; diff --git a/inc/Base.php b/inc/Base.php index 85d27ac3..bcbb00d8 100644 --- a/inc/Base.php +++ b/inc/Base.php @@ -30,34 +30,37 @@ defined('APP_ROOT') || die(); define('XML_CONFIG_FILE', __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.xml'); define('BASE_DIR', __DIR__); -define('CONFIG_FILE', __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php'); -define('MODEL_PATH', __DIR__ . DIRECTORY_SEPARATOR . 'SP'); -define('CONTROLLER_PATH', __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'web'); -define('VIEW_PATH', __DIR__ . DIRECTORY_SEPARATOR . 'themes'); -define('EXTENSIONS_PATH', __DIR__ . DIRECTORY_SEPARATOR . 'Exts'); -define('PLUGINS_PATH', __DIR__ . DIRECTORY_SEPARATOR . 'Plugins'); -define('LOCALES_PATH', __DIR__ . DIRECTORY_SEPARATOR . 'locales'); -define('SQL_PATH', __DIR__ . DIRECTORY_SEPARATOR . 'sql'); -define('LOG_FILE', __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'syspass.log'); +define('CONFIG_FILE', APP_ROOT . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php'); +define('VENDOR_PATH', APP_ROOT . DIRECTORY_SEPARATOR . 'vendor'); +define('LOG_FILE', APP_ROOT . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'syspass.log'); +define('MODEL_PATH', BASE_DIR . DIRECTORY_SEPARATOR . 'SP'); +define('VIEW_PATH', BASE_DIR . DIRECTORY_SEPARATOR . 'themes'); +define('EXTENSIONS_PATH', BASE_DIR . DIRECTORY_SEPARATOR . 'Exts'); +define('PLUGINS_PATH', BASE_DIR . DIRECTORY_SEPARATOR . 'Plugins'); +define('LOCALES_PATH', BASE_DIR . DIRECTORY_SEPARATOR . 'locales'); +define('SQL_PATH', BASE_DIR . DIRECTORY_SEPARATOR . 'sql'); define('DEBUG', false); +require VENDOR_PATH . DIRECTORY_SEPARATOR . 'autoload.php'; + // Required random_compat polyfill for random_bytes() and random_int() // @see https://github.com/paragonie/random_compat/tree/v2.0.4#random_compat -require_once EXTENSIONS_PATH . DIRECTORY_SEPARATOR . 'random_compat' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'random.php'; - +//require_once EXTENSIONS_PATH . DIRECTORY_SEPARATOR . 'random_compat' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'random.php'; +// require __DIR__ . DIRECTORY_SEPARATOR . 'SplClassLoader.php'; -$ClassLoader = new SplClassLoader('SP'); -$ClassLoader->setFileExtension('.class.php'); -$ClassLoader->addExcluded('SP\\Profile'); -$ClassLoader->addExcluded('SP\\Mgmt\\User\\Profile'); -$ClassLoader->addExcluded('SP\\UserPreferences'); -$ClassLoader->addExcluded('SP\\Mgmt\\User\\UserPreferences'); -$ClassLoader->addExcluded('SP\\CustomFieldDef'); -$ClassLoader->addExcluded('SP\\Mgmt\\CustomFieldDef'); -$ClassLoader->addExcluded('SP\\PublicLink'); -$ClassLoader->register(); +// +//$ClassLoader = new SplClassLoader('SP'); +//$ClassLoader->setFileExtension('.class.php'); +//$ClassLoader->addExcluded('SP\\Profile'); +//$ClassLoader->addExcluded('SP\\Mgmt\\User\\Profile'); +//$ClassLoader->addExcluded('SP\\UserPreferences'); +//$ClassLoader->addExcluded('SP\\Mgmt\\User\\UserPreferences'); +//$ClassLoader->addExcluded('SP\\CustomFieldDef'); +//$ClassLoader->addExcluded('SP\\Mgmt\\CustomFieldDef'); +//$ClassLoader->addExcluded('SP\\PublicLink'); +//$ClassLoader->register(); require __DIR__ . DIRECTORY_SEPARATOR . 'BaseFunctions.php'; diff --git a/inc/Exts/Base2n.class.php b/inc/Exts/Base2n.class.php deleted file mode 100644 index e4244967..00000000 --- a/inc/Exts/Base2n.class.php +++ /dev/null @@ -1,305 +0,0 @@ -= ($radix <<= 1) && $bitsPerCharacter < 8) { - $bitsPerCharacter++; - } - - $radix >>= 1; - throw new \InvalidArgumentException( - '$bitsPerCharacter can not be more than ' . $bitsPerCharacter - . ' given $chars length of ' . $charLength - . ' (max radix ' . $radix . ')'); - - } elseif ($bitsPerCharacter > 8) { - // $bitsPerCharacter must not be greater than 8 - throw new \InvalidArgumentException('$bitsPerCharacter can not be greater than 8'); - - } else { - $radix = 1 << $bitsPerCharacter; - } - - $this->_chars = $chars; - $this->_bitsPerCharacter = $bitsPerCharacter; - $this->_radix = $radix; - $this->_rightPadFinalBits = $rightPadFinalBits; - $this->_padFinalGroup = $padFinalGroup; - $this->_padCharacter = $padCharacter[0]; - $this->_caseSensitive = $caseSensitive; - } - - /** - * Encode a string - * - * @param string $rawString Binary data to encode - * @return string - */ - public function encode($rawString) - { - // Unpack string into an array of bytes - $bytes = unpack('C*', $rawString); - $byteCount = count($bytes); - - $encodedString = ''; - $byte = array_shift($bytes); - $bitsRead = 0; - $oldBits = 0; - - $chars = $this->_chars; - $bitsPerCharacter = $this->_bitsPerCharacter; - $rightPadFinalBits = $this->_rightPadFinalBits; - $padFinalGroup = $this->_padFinalGroup; - $padCharacter = $this->_padCharacter; - - $charsPerByte = 8 / $bitsPerCharacter; - $encodedLength = $byteCount * $charsPerByte; - - // Generate encoded output; each loop produces one encoded character - for ($c = 0; $c < $encodedLength; $c++) { - - // Get the bits needed for this encoded character - if ($bitsRead + $bitsPerCharacter > 8) { - // Not enough bits remain in this byte for the current character - // Save the remaining bits before getting the next byte - $oldBitCount = 8 - $bitsRead; - $oldBits = $byte ^ ($byte >> $oldBitCount << $oldBitCount); - $newBitCount = $bitsPerCharacter - $oldBitCount; - - if (!$bytes) { - // Last bits; match final character and exit loop - if ($rightPadFinalBits) $oldBits <<= $newBitCount; - $encodedString .= $chars[$oldBits]; - - if ($padFinalGroup) { - // Array of the lowest common multiples of $bitsPerCharacter and 8, divided by 8 - $lcmMap = array(1 => 1, 2 => 1, 3 => 3, 4 => 1, 5 => 5, 6 => 3, 7 => 7, 8 => 1); - $bytesPerGroup = $lcmMap[$bitsPerCharacter]; - $pads = $bytesPerGroup * $charsPerByte - ceil((strlen($rawString) % $bytesPerGroup) * $charsPerByte); - $encodedString .= str_repeat($padCharacter, $pads); - } - - break; - } - - // Get next byte - $byte = array_shift($bytes); - $bitsRead = 0; - - } else { - $oldBitCount = 0; - $newBitCount = $bitsPerCharacter; - } - - // Read only the needed bits from this byte - $bits = $byte >> 8 - ($bitsRead + ($newBitCount)); - $bits ^= $bits >> $newBitCount << $newBitCount; - $bitsRead += $newBitCount; - - if ($oldBitCount) { - // Bits come from seperate bytes, add $oldBits to $bits - $bits = ($oldBits << $newBitCount) | $bits; - } - - $encodedString .= $chars[$bits]; - } - - return $encodedString; - } - - /** - * Decode a string - * - * @param string $encodedString Data to decode - * @param boolean $strict Returns NULL if $encodedString contains an undecodable character - * @return string - */ - public function decode($encodedString, $strict = FALSE) - { - if (!$encodedString || !is_string($encodedString)) { - // Empty string, nothing to decode - return ''; - } - - $chars = $this->_chars; - $bitsPerCharacter = $this->_bitsPerCharacter; - $radix = $this->_radix; - $rightPadFinalBits = $this->_rightPadFinalBits; - $padFinalGroup = $this->_padFinalGroup; - $padCharacter = $this->_padCharacter; - $caseSensitive = $this->_caseSensitive; - - // Get index of encoded characters - if ($this->_charmap) { - $charmap = $this->_charmap; - - } else { - $charmap = array(); - - for ($i = 0; $i < $radix; $i++) { - $charmap[$chars[$i]] = $i; - } - - $this->_charmap = $charmap; - } - - // The last encoded character is $encodedString[$lastNotatedIndex] - $lastNotatedIndex = strlen($encodedString) - 1; - - // Remove trailing padding characters - if ($padFinalGroup) { - while ($encodedString[$lastNotatedIndex] === $padCharacter) { - $encodedString = substr($encodedString, 0, $lastNotatedIndex); - $lastNotatedIndex--; - } - } - - $rawString = ''; - $byte = 0; - $bitsWritten = 0; - - // Convert each encoded character to a series of unencoded bits - for ($c = 0; $c <= $lastNotatedIndex; $c++) { - - if (!$caseSensitive && !isset($charmap[$encodedString[$c]])) { - // Encoded character was not found; try other case - if (isset($charmap[$cUpper = strtoupper($encodedString[$c])])) { - $charmap[$encodedString[$c]] = $charmap[$cUpper]; - - } elseif (isset($charmap[$cLower = strtolower($encodedString[$c])])) { - $charmap[$encodedString[$c]] = $charmap[$cLower]; - } - } - - if (isset($charmap[$encodedString[$c]])) { - $bitsNeeded = 8 - $bitsWritten; - $unusedBitCount = $bitsPerCharacter - $bitsNeeded; - - // Get the new bits ready - if ($bitsNeeded > $bitsPerCharacter) { - // New bits aren't enough to complete a byte; shift them left into position - $newBits = $charmap[$encodedString[$c]] << $bitsNeeded - $bitsPerCharacter; - $bitsWritten += $bitsPerCharacter; - - } elseif ($c !== $lastNotatedIndex || $rightPadFinalBits) { - // Zero or more too many bits to complete a byte; shift right - $newBits = $charmap[$encodedString[$c]] >> $unusedBitCount; - $bitsWritten = 8; //$bitsWritten += $bitsNeeded; - - } else { - // Final bits don't need to be shifted - $newBits = $charmap[$encodedString[$c]]; - $bitsWritten = 8; - } - - $byte |= $newBits; - - if ($bitsWritten === 8 || $c === $lastNotatedIndex) { - // Byte is ready to be written - $rawString .= pack('C', $byte); - - if ($c !== $lastNotatedIndex) { - // Start the next byte - $bitsWritten = $unusedBitCount; - $byte = ($charmap[$encodedString[$c]] ^ ($newBits << $unusedBitCount)) << 8 - $bitsWritten; - } - } - - } elseif ($strict) { - // Unable to decode character; abort - return NULL; - } - } - - return $rawString; - } -} \ No newline at end of file diff --git a/inc/Exts/CssMin.class.php b/inc/Exts/CssMin.class.php deleted file mode 100644 index 2f15b838..00000000 --- a/inc/Exts/CssMin.class.php +++ /dev/null @@ -1,4821 +0,0 @@ - - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * -- - * - * @package CssMin - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ - -/** - * Abstract definition of a CSS token class. - * - * Every token has to extend this class. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -abstract class aCssToken -{ - /** - * Returns the token as string. - * - * @return string - */ - abstract public function __toString(); -} - -/** - * Abstract definition of a for a ruleset start token. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -abstract class aCssRulesetStartToken extends aCssToken -{ - -} - -/** - * Abstract definition of a for ruleset end token. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -abstract class aCssRulesetEndToken extends aCssToken -{ - /** - * Implements {@link aCssToken::__toString()}. - * - * @return string - */ - public function __toString() - { - return "}"; - } -} - -/** - * Abstract definition of a parser plugin. - * - * Every parser plugin have to extend this class. A parser plugin contains the logic to parse one or aspects of a - * stylesheet. - * - * @package CssMin/Parser/Plugins - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -abstract class aCssParserPlugin -{ - /** - * Plugin configuration. - * - * @var array - */ - protected $configuration = array(); - /** - * The CssParser of the plugin. - * - * @var CssParser - */ - protected $parser = null; - /** - * Plugin buffer. - * - * @var string - */ - protected $buffer = ""; - - /** - * Constructor. - * - * @param CssParser $parser The CssParser object of this plugin. - * @param array $configuration Plugin configuration [optional] - * @return void - */ - public function __construct(CssParser $parser, array $configuration = null) - { - $this->configuration = $configuration; - $this->parser = $parser; - } - - /** - * Returns the array of chars triggering the parser plugin. - * - * @return array - */ - abstract public function getTriggerChars(); - - /** - * Returns the array of states triggering the parser plugin or FALSE if every state will trigger the parser plugin. - * - * @return array - */ - abstract public function getTriggerStates(); - - /** - * Parser routine of the plugin. - * - * @param integer $index Current index - * @param string $char Current char - * @param string $previousChar Previous char - * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing - */ - abstract public function parse($index, $char, $previousChar, $state); -} - -/** - * Abstract definition of a minifier plugin class. - * - * Minifier plugin process the parsed tokens one by one to apply changes to the token. Every minifier plugin has to - * extend this class. - * - * @package CssMin/Minifier/Plugins - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -abstract class aCssMinifierPlugin -{ - /** - * Plugin configuration. - * - * @var array - */ - protected $configuration = array(); - /** - * The CssMinifier of the plugin. - * - * @var CssMinifier - */ - protected $minifier = null; - - /** - * Constructor. - * - * @param CssMinifier $minifier The CssMinifier object of this plugin. - * @param array $configuration Plugin configuration [optional] - * @return void - */ - public function __construct(CssMinifier $minifier, array $configuration = array()) - { - $this->configuration = $configuration; - $this->minifier = $minifier; - } - - /** - * Apply the plugin to the token. - * - * @param aCssToken $token Token to process - * @return boolean Return TRUE to break the processing of this token; FALSE to continue - */ - abstract public function apply(aCssToken &$token); - - /** - * -- - * - * @return array - */ - abstract public function getTriggerTokens(); -} - -/** - * Abstract definition of a minifier filter class. - * - * Minifier filters allows a pre-processing of the parsed token to add, edit or delete tokens. Every minifier filter - * has to extend this class. - * - * @package CssMin/Minifier/Filters - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -abstract class aCssMinifierFilter -{ - /** - * Filter configuration. - * - * @var array - */ - protected $configuration = array(); - /** - * The CssMinifier of the filter. - * - * @var CssMinifier - */ - protected $minifier = null; - - /** - * Constructor. - * - * @param CssMinifier $minifier The CssMinifier object of this plugin. - * @param array $configuration Filter configuration [optional] - * @return void - */ - public function __construct(CssMinifier $minifier, array $configuration = array()) - { - $this->configuration = $configuration; - $this->minifier = $minifier; - } - - /** - * Filter the tokens. - * - * @param array $tokens Array of objects of type aCssToken - * @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array - */ - abstract public function apply(array &$tokens); -} - -/** - * Abstract formatter definition. - * - * Every formatter have to extend this class. - * - * @package CssMin/Formatter - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -abstract class aCssFormatter -{ - /** - * Indent string. - * - * @var string - */ - protected $indent = " "; - /** - * Declaration padding. - * - * @var integer - */ - protected $padding = 0; - /** - * Tokens. - * - * @var array - */ - protected $tokens = array(); - - /** - * Constructor. - * - * @param array $tokens Array of CssToken - * @param string $indent Indent string [optional] - * @param integer $padding Declaration value padding [optional] - */ - public function __construct(array $tokens, $indent = null, $padding = null) - { - $this->tokens = $tokens; - $this->indent = !is_null($indent) ? $indent : $this->indent; - $this->padding = !is_null($padding) ? $padding : $this->padding; - } - - /** - * Returns the array of aCssToken as formatted string. - * - * @return string - */ - abstract public function __toString(); -} - -/** - * Abstract definition of a ruleset declaration token. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -abstract class aCssDeclarationToken extends aCssToken -{ - /** - * Is the declaration flagged as important? - * - * @var boolean - */ - public $IsImportant = false; - /** - * Is the declaration flagged as last one of the ruleset? - * - * @var boolean - */ - public $IsLast = false; - /** - * Property name of the declaration. - * - * @var string - */ - public $Property = ""; - /** - * Value of the declaration. - * - * @var string - */ - public $Value = ""; - - /** - * Set the properties of the @font-face declaration. - * - * @param string $property Property of the declaration - * @param string $value Value of the declaration - * @param boolean $isImportant Is the !important flag is set? - * @param boolean $IsLast Is the declaration the last one of the block? - * @return void - */ - public function __construct($property, $value, $isImportant = false, $isLast = false) - { - $this->Property = $property; - $this->Value = $value; - $this->IsImportant = $isImportant; - $this->IsLast = $isLast; - } - - /** - * Implements {@link aCssToken::__toString()}. - * - * @return string - */ - public function __toString() - { - return $this->Property . ":" . $this->Value . ($this->IsImportant ? " !important" : "") . ($this->IsLast ? "" : ";"); - } -} - -/** - * Abstract definition of a for at-rule block start token. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -abstract class aCssAtBlockStartToken extends aCssToken -{ - -} - -/** - * Abstract definition of a for at-rule block end token. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -abstract class aCssAtBlockEndToken extends aCssToken -{ - /** - * Implements {@link aCssToken::__toString()}. - * - * @return string - */ - public function __toString() - { - return "}"; - } -} - -/** - * {@link aCssFromatter Formatter} returning the CSS source in {@link http://goo.gl/etzLs Whitesmiths indent style}. - * - * @package CssMin/Formatter - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssWhitesmithsFormatter extends aCssFormatter -{ - /** - * Implements {@link aCssFormatter::__toString()}. - * - * @return string - */ - public function __toString() - { - $r = array(); - $level = 0; - for ($i = 0, $l = count($this->tokens); $i < $l; $i++) { - $token = $this->tokens[$i]; - $class = get_class($token); - $indent = str_repeat($this->indent, $level); - if ($class === "CssCommentToken") { - $lines = array_map("trim", explode("\n", $token->Comment)); - for ($ii = 0, $ll = count($lines); $ii < $ll; $ii++) { - $r[] = $indent . (substr($lines[$ii], 0, 1) == "*" ? " " : "") . $lines[$ii]; - } - } elseif ($class === "CssAtCharsetToken") { - $r[] = $indent . "@charset " . $token->Charset . ";"; - } elseif ($class === "CssAtFontFaceStartToken") { - $r[] = $indent . "@font-face"; - $r[] = $this->indent . $indent . "{"; - $level++; - } elseif ($class === "CssAtImportToken") { - $r[] = $indent . "@import " . $token->Import . " " . implode(", ", $token->MediaTypes) . ";"; - } elseif ($class === "CssAtKeyframesStartToken") { - $r[] = $indent . "@keyframes \"" . $token->Name . "\""; - $r[] = $this->indent . $indent . "{"; - $level++; - } elseif ($class === "CssAtMediaStartToken") { - $r[] = $indent . "@media " . implode(", ", $token->MediaTypes); - $r[] = $this->indent . $indent . "{"; - $level++; - } elseif ($class === "CssAtPageStartToken") { - $r[] = $indent . "@page"; - $r[] = $this->indent . $indent . "{"; - $level++; - } elseif ($class === "CssAtVariablesStartToken") { - $r[] = $indent . "@variables " . implode(", ", $token->MediaTypes); - $r[] = $this->indent . $indent . "{"; - $level++; - } elseif ($class === "CssRulesetStartToken" || $class === "CssAtKeyframesRulesetStartToken") { - $r[] = $indent . implode(", ", $token->Selectors); - $r[] = $this->indent . $indent . "{"; - $level++; - } elseif ($class == "CssAtFontFaceDeclarationToken" - || $class === "CssAtKeyframesRulesetDeclarationToken" - || $class === "CssAtPageDeclarationToken" - || $class == "CssAtVariablesDeclarationToken" - || $class === "CssRulesetDeclarationToken" - ) { - $declaration = $indent . $token->Property . ": "; - if ($this->padding) { - $declaration = str_pad($declaration, $this->padding, " ", STR_PAD_RIGHT); - } - $r[] = $declaration . $token->Value . ($token->IsImportant ? " !important" : "") . ";"; - } elseif ($class === "CssAtFontFaceEndToken" - || $class === "CssAtMediaEndToken" - || $class === "CssAtKeyframesEndToken" - || $class === "CssAtKeyframesRulesetEndToken" - || $class === "CssAtPageEndToken" - || $class === "CssAtVariablesEndToken" - || $class === "CssRulesetEndToken" - ) { - $r[] = $indent . "}"; - $level--; - } - } - return implode("\n", $r); - } -} - -/** - * This {@link aCssMinifierPlugin} will process var-statement and sets the declaration value to the variable value. - * - * This plugin only apply the variable values. The variable values itself will get parsed by the - * {@link CssVariablesMinifierFilter}. - * - * Example: - * - * - * @variables - * { - * defaultColor: black; - * } - * color: var(defaultColor); - * - * - * Will get converted to: - * - * color:black; - * - * - * @package CssMin/Minifier/Plugins - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssVariablesMinifierPlugin extends aCssMinifierPlugin -{ - /** - * Regular expression matching a value. - * - * @var string - */ - private $reMatch = "/var\((.+)\)/iSU"; - /** - * Parsed variables. - * - * @var array - */ - private $variables = null; - - /** - * Returns the variables. - * - * @return array - */ - public function getVariables() - { - return $this->variables; - } - - /** - * Sets the variables. - * - * @param array $variables Variables to set - * @return void - */ - public function setVariables(array $variables) - { - $this->variables = $variables; - } - - /** - * Implements {@link aCssMinifierPlugin::minify()}. - * - * @param aCssToken $token Token to process - * @return boolean Return TRUE to break the processing of this token; FALSE to continue - */ - public function apply(aCssToken &$token) - { - if (stripos($token->Value, "var") !== false && preg_match_all($this->reMatch, $token->Value, $m)) { - $mediaTypes = $token->MediaTypes; - if (!in_array("all", $mediaTypes)) { - $mediaTypes[] = "all"; - } - for ($i = 0, $l = count($m[0]); $i < $l; $i++) { - $variable = trim($m[1][$i]); - foreach ($mediaTypes as $mediaType) { - if (isset($this->variables[$mediaType], $this->variables[$mediaType][$variable])) { - // Variable value found => set the declaration value to the variable value and return - $token->Value = str_replace($m[0][$i], $this->variables[$mediaType][$variable], $token->Value); - continue 2; - } - } - // If no value was found trigger an error and replace the token with a CssNullToken - CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": No value found for variable " . $variable . " in media types " . implode(", ", $mediaTypes) . "", (string)$token)); - $token = new CssNullToken(); - return true; - } - } - return false; - } - - /** - * Implements {@link aMinifierPlugin::getTriggerTokens()} - * - * @return array - */ - public function getTriggerTokens() - { - return array - ( - "CssAtFontFaceDeclarationToken", - "CssAtPageDeclarationToken", - "CssRulesetDeclarationToken" - ); - } -} - -/** - * This {@link aCssMinifierFilter minifier filter} will parse the variable declarations out of @variables at-rule - * blocks. The variables will get store in the {@link CssVariablesMinifierPlugin} that will apply the variables to - * declaration. - * - * @package CssMin/Minifier/Filters - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssVariablesMinifierFilter extends aCssMinifierFilter -{ - /** - * Implements {@link aCssMinifierFilter::filter()}. - * - * @param array $tokens Array of objects of type aCssToken - * @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array - */ - public function apply(array &$tokens) - { - $variables = array(); - $defaultMediaTypes = array("all"); - $mediaTypes = array(); - $remove = array(); - for ($i = 0, $l = count($tokens); $i < $l; $i++) { - // @variables at-rule block found - if (get_class($tokens[$i]) === "CssAtVariablesStartToken") { - $remove[] = $i; - $mediaTypes = (count($tokens[$i]->MediaTypes) == 0 ? $defaultMediaTypes : $tokens[$i]->MediaTypes); - foreach ($mediaTypes as $mediaType) { - if (!isset($variables[$mediaType])) { - $variables[$mediaType] = array(); - } - } - // Read the variable declaration tokens - for ($i = $i; $i < $l; $i++) { - // Found a variable declaration => read the variable values - if (get_class($tokens[$i]) === "CssAtVariablesDeclarationToken") { - foreach ($mediaTypes as $mediaType) { - $variables[$mediaType][$tokens[$i]->Property] = $tokens[$i]->Value; - } - $remove[] = $i; - } // Found the variables end token => break; - elseif (get_class($tokens[$i]) === "CssAtVariablesEndToken") { - $remove[] = $i; - break; - } - } - } - } - // Variables in @variables at-rule blocks - foreach ($variables as $mediaType => $null) { - foreach ($variables[$mediaType] as $variable => $value) { - // If a var() statement in a variable value found... - if (stripos($value, "var") !== false && preg_match_all("/var\((.+)\)/iSU", $value, $m)) { - // ... then replace the var() statement with the variable values. - for ($i = 0, $l = count($m[0]); $i < $l; $i++) { - $variables[$mediaType][$variable] = str_replace($m[0][$i], (isset($variables[$mediaType][$m[1][$i]]) ? $variables[$mediaType][$m[1][$i]] : ""), $variables[$mediaType][$variable]); - } - } - } - } - // Remove the complete @variables at-rule block - foreach ($remove as $i) { - $tokens[$i] = null; - } - if (!($plugin = $this->minifier->getPlugin("CssVariablesMinifierPlugin"))) { - CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": The plugin CssVariablesMinifierPlugin was not found but is required for " . __CLASS__ . "")); - } else { - $plugin->setVariables($variables); - } - return count($remove); - } -} - -/** - * {@link aCssParserPlugin Parser plugin} for preserve parsing url() values. - * - * This plugin return no {@link aCssToken CssToken} but ensures that url() values will get parsed properly. - * - * @package CssMin/Parser/Plugins - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssUrlParserPlugin extends aCssParserPlugin -{ - /** - * Implements {@link aCssParserPlugin::getTriggerChars()}. - * - * @return array - */ - public function getTriggerChars() - { - return array("(", ")"); - } - - /** - * Implements {@link aCssParserPlugin::getTriggerStates()}. - * - * @return array - */ - public function getTriggerStates() - { - return false; - } - - /** - * Implements {@link aCssParserPlugin::parse()}. - * - * @param integer $index Current index - * @param string $char Current char - * @param string $previousChar Previous char - * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing - */ - public function parse($index, $char, $previousChar, $state) - { - // Start of string - if ($char === "(" && strtolower(substr($this->parser->getSource(), $index - 3, 4)) === "url(" && $state !== "T_URL") { - $this->parser->pushState("T_URL"); - $this->parser->setExclusive(__CLASS__); - } // Escaped LF in url => remove escape backslash and LF - elseif ($char === "\n" && $previousChar === "\\" && $state === "T_URL") { - $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -2)); - } // Parse error: Unescaped LF in string literal - elseif ($char === "\n" && $previousChar !== "\\" && $state === "T_URL") { - $line = $this->parser->getBuffer(); - $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -1) . ")"); // Replace the LF with the url string delimiter - $this->parser->popState(); - $this->parser->unsetExclusive(); - CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Unterminated string literal", $line . "_")); - } // End of string - elseif ($char === ")" && $state === "T_URL") { - $this->parser->popState(); - $this->parser->unsetExclusive(); - } else { - return false; - } - return true; - } -} - -/** - * {@link aCssParserPlugin Parser plugin} for preserve parsing string values. - * - * This plugin return no {@link aCssToken CssToken} but ensures that string values will get parsed properly. - * - * @package CssMin/Parser/Plugins - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssStringParserPlugin extends aCssParserPlugin -{ - /** - * Current string delimiter char. - * - * @var string - */ - private $delimiterChar = null; - - /** - * Implements {@link aCssParserPlugin::getTriggerChars()}. - * - * @return array - */ - public function getTriggerChars() - { - return array("\"", "'", "\n"); - } - - /** - * Implements {@link aCssParserPlugin::getTriggerStates()}. - * - * @return array - */ - public function getTriggerStates() - { - return false; - } - - /** - * Implements {@link aCssParserPlugin::parse()}. - * - * @param integer $index Current index - * @param string $char Current char - * @param string $previousChar Previous char - * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing - */ - public function parse($index, $char, $previousChar, $state) - { - // Start of string - if (($char === "\"" || $char === "'") && $state !== "T_STRING") { - $this->delimiterChar = $char; - $this->parser->pushState("T_STRING"); - $this->parser->setExclusive(__CLASS__); - } // Escaped LF in string => remove escape backslash and LF - elseif ($char === "\n" && $previousChar === "\\" && $state === "T_STRING") { - $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -2)); - } // Parse error: Unescaped LF in string literal - elseif ($char === "\n" && $previousChar !== "\\" && $state === "T_STRING") { - $line = $this->parser->getBuffer(); - $this->parser->popState(); - $this->parser->unsetExclusive(); - $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -1) . $this->delimiterChar); // Replace the LF with the current string char - CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Unterminated string literal", $line . "_")); - $this->delimiterChar = null; - } // End of string - elseif ($char === $this->delimiterChar && $state === "T_STRING") { - // If the Previous char is a escape char count the amount of the previous escape chars. If the amount of - // escape chars is uneven do not end the string - if ($previousChar == "\\") { - $source = $this->parser->getSource(); - $c = 1; - $i = $index - 2; - while (substr($source, $i, 1) === "\\") { - $c++; - $i--; - } - if ($c % 2) { - return false; - } - } - $this->parser->popState(); - $this->parser->unsetExclusive(); - $this->delimiterChar = null; - } else { - return false; - } - return true; - } -} - -/** - * This {@link aCssMinifierFilter minifier filter} sorts the ruleset declarations of a ruleset by name. - * - * @package CssMin/Minifier/Filters - * @link http://code.google.com/p/cssmin/ - * @author Rowan Beentje - * @copyright Rowan Beentje - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssSortRulesetPropertiesMinifierFilter extends aCssMinifierFilter -{ - /** - * User defined sort function. - * - * @return integer - */ - public static function userDefinedSort1($a, $b) - { - return strcmp($a->Property, $b->Property); - } - - /** - * Implements {@link aCssMinifierFilter::filter()}. - * - * @param array $tokens Array of objects of type aCssToken - * @return integer Count of added, changed or removed tokens; a return value larger than 0 will rebuild the array - */ - public function apply(array &$tokens) - { - $r = 0; - for ($i = 0, $l = count($tokens); $i < $l; $i++) { - // Only look for ruleset start rules - if (get_class($tokens[$i]) !== "CssRulesetStartToken") { - continue; - } - // Look for the corresponding ruleset end - $endIndex = false; - for ($ii = $i + 1; $ii < $l; $ii++) { - if (get_class($tokens[$ii]) !== "CssRulesetEndToken") { - continue; - } - $endIndex = $ii; - break; - } - if (!$endIndex) { - break; - } - $startIndex = $i; - $i = $endIndex; - // Skip if there's only one token in this ruleset - if ($endIndex - $startIndex <= 2) { - continue; - } - // Ensure that everything between the start and end is a declaration token, for safety - for ($ii = $startIndex + 1; $ii < $endIndex; $ii++) { - if (get_class($tokens[$ii]) !== "CssRulesetDeclarationToken") { - continue(2); - } - } - $declarations = array_slice($tokens, $startIndex + 1, $endIndex - $startIndex - 1); - // Check whether a sort is required - $sortRequired = $lastPropertyName = false; - foreach ($declarations as $declaration) { - if ($lastPropertyName) { - if (strcmp($lastPropertyName, $declaration->Property) > 0) { - $sortRequired = true; - break; - } - } - $lastPropertyName = $declaration->Property; - } - if (!$sortRequired) { - continue; - } - // Arrange the declarations alphabetically by name - usort($declarations, array(__CLASS__, "userDefinedSort1")); - // Update "IsLast" property - for ($ii = 0, $ll = count($declarations) - 1; $ii <= $ll; $ii++) { - if ($ii == $ll) { - $declarations[$ii]->IsLast = true; - } else { - $declarations[$ii]->IsLast = false; - } - } - // Splice back into the array. - array_splice($tokens, $startIndex + 1, $endIndex - $startIndex - 1, $declarations); - $r += $endIndex - $startIndex - 1; - } - return $r; - } -} - -/** - * This {@link aCssToken CSS token} represents the start of a ruleset. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssRulesetStartToken extends aCssRulesetStartToken -{ - /** - * Array of selectors. - * - * @var array - */ - public $Selectors = array(); - - /** - * Set the properties of a ruleset token. - * - * @param array $selectors Selectors of the ruleset - * @return void - */ - public function __construct(array $selectors = array()) - { - $this->Selectors = $selectors; - } - - /** - * Implements {@link aCssToken::__toString()}. - * - * @return string - */ - public function __toString() - { - return implode(",", $this->Selectors) . "{"; - } -} - -/** - * {@link aCssParserPlugin Parser plugin} for parsing ruleset block with including declarations. - * - * Found rulesets will add a {@link CssRulesetStartToken} and {@link CssRulesetEndToken} to the - * parser; including declarations as {@link CssRulesetDeclarationToken}. - * - * @package CssMin/Parser/Plugins - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssRulesetParserPlugin extends aCssParserPlugin -{ - /** - * Selectors. - * - * @var array - */ - private $selectors = array(); - - /** - * Implements {@link aCssParserPlugin::getTriggerChars()}. - * - * @return array - */ - public function getTriggerChars() - { - return array(",", "{", "}", ":", ";"); - } - - /** - * Implements {@link aCssParserPlugin::getTriggerStates()}. - * - * @return array - */ - public function getTriggerStates() - { - return array("T_DOCUMENT", "T_AT_MEDIA", "T_RULESET::SELECTORS", "T_RULESET", "T_RULESET_DECLARATION"); - } - - /** - * Implements {@link aCssParserPlugin::parse()}. - * - * @param integer $index Current index - * @param string $char Current char - * @param string $previousChar Previous char - * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing - */ - public function parse($index, $char, $previousChar, $state) - { - // Start of Ruleset and selectors - if ($char === "," && ($state === "T_DOCUMENT" || $state === "T_AT_MEDIA" || $state === "T_RULESET::SELECTORS")) { - if ($state !== "T_RULESET::SELECTORS") { - $this->parser->pushState("T_RULESET::SELECTORS"); - } - $this->selectors[] = $this->parser->getAndClearBuffer(",{"); - } // End of selectors and start of declarations - elseif ($char === "{" && ($state === "T_DOCUMENT" || $state === "T_AT_MEDIA" || $state === "T_RULESET::SELECTORS")) { - if ($this->parser->getBuffer() !== "") { - $this->selectors[] = $this->parser->getAndClearBuffer(",{"); - if ($state == "T_RULESET::SELECTORS") { - $this->parser->popState(); - } - $this->parser->pushState("T_RULESET"); - $this->parser->appendToken(new CssRulesetStartToken($this->selectors)); - $this->selectors = array(); - } - } // Start of declaration - elseif ($char === ":" && $state === "T_RULESET") { - $this->parser->pushState("T_RULESET_DECLARATION"); - $this->buffer = $this->parser->getAndClearBuffer(":;", true); - } // Unterminated ruleset declaration - elseif ($char === ":" && $state === "T_RULESET_DECLARATION") { - // Ignore Internet Explorer filter declarations - if ($this->buffer === "filter") { - return false; - } - CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Unterminated declaration", $this->buffer . ":" . $this->parser->getBuffer() . "_")); - } // End of declaration - elseif (($char === ";" || $char === "}") && $state === "T_RULESET_DECLARATION") { - $value = $this->parser->getAndClearBuffer(";}"); - if (strtolower(substr($value, -10, 10)) === "!important") { - $value = trim(substr($value, 0, -10)); - $isImportant = true; - } else { - $isImportant = false; - } - $this->parser->popState(); - $this->parser->appendToken(new CssRulesetDeclarationToken($this->buffer, $value, $this->parser->getMediaTypes(), $isImportant)); - // Declaration ends with a right curly brace; so we have to end the ruleset - if ($char === "}") { - $this->parser->appendToken(new CssRulesetEndToken()); - $this->parser->popState(); - } - $this->buffer = ""; - } // End of ruleset - elseif ($char === "}" && $state === "T_RULESET") { - $this->parser->popState(); - $this->parser->clearBuffer(); - $this->parser->appendToken(new CssRulesetEndToken()); - $this->buffer = ""; - $this->selectors = array(); - } else { - return false; - } - return true; - } -} - -/** - * This {@link aCssToken CSS token} represents the end of a ruleset. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssRulesetEndToken extends aCssRulesetEndToken -{ - -} - -/** - * This {@link aCssToken CSS token} represents a ruleset declaration. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssRulesetDeclarationToken extends aCssDeclarationToken -{ - /** - * Media types of the declaration. - * - * @var array - */ - public $MediaTypes = array("all"); - - /** - * Set the properties of a ddocument- or at-rule @media level declaration. - * - * @param string $property Property of the declaration - * @param string $value Value of the declaration - * @param mixed $mediaTypes Media types of the declaration - * @param boolean $isImportant Is the !important flag is set - * @param boolean $isLast Is the declaration the last one of the ruleset - * @return void - */ - public function __construct($property, $value, $mediaTypes = null, $isImportant = false, $isLast = false) - { - parent::__construct($property, $value, $isImportant, $isLast); - $this->MediaTypes = $mediaTypes ? $mediaTypes : array("all"); - } -} - -/** - * This {@link aCssMinifierFilter minifier filter} sets the IsLast property of any last declaration in a ruleset, - * - * @font-face at-rule or @page at-rule block. If the property IsLast is TRUE the decrations will get stringified - * without tailing semicolon. - * - * @package CssMin/Minifier/Filters - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssRemoveLastDelarationSemiColonMinifierFilter extends aCssMinifierFilter -{ - /** - * Implements {@link aCssMinifierFilter::filter()}. - * - * @param array $tokens Array of objects of type aCssToken - * @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array - */ - public function apply(array &$tokens) - { - for ($i = 0, $l = count($tokens); $i < $l; $i++) { - $current = get_class($tokens[$i]); - $next = isset($tokens[$i + 1]) ? get_class($tokens[$i + 1]) : false; - if (($current === "CssRulesetDeclarationToken" && $next === "CssRulesetEndToken") || - ($current === "CssAtFontFaceDeclarationToken" && $next === "CssAtFontFaceEndToken") || - ($current === "CssAtPageDeclarationToken" && $next === "CssAtPageEndToken") - ) { - $tokens[$i]->IsLast = true; - } - } - return 0; - } -} - -/** - * This {@link aCssMinifierFilter minifier filter} will remove any empty rulesets (including @keyframes at-rule block - * rulesets). - * - * @package CssMin/Minifier/Filters - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssRemoveEmptyRulesetsMinifierFilter extends aCssMinifierFilter -{ - /** - * Implements {@link aCssMinifierFilter::filter()}. - * - * @param array $tokens Array of objects of type aCssToken - * @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array - */ - public function apply(array &$tokens) - { - $r = 0; - for ($i = 0, $l = count($tokens); $i < $l; $i++) { - $current = get_class($tokens[$i]); - $next = isset($tokens[$i + 1]) ? get_class($tokens[$i + 1]) : false; - if (($current === "CssRulesetStartToken" && $next === "CssRulesetEndToken") || - ($current === "CssAtKeyframesRulesetStartToken" && $next === "CssAtKeyframesRulesetEndToken" && !array_intersect(array("from", "0%", "to", "100%"), array_map("strtolower", $tokens[$i]->Selectors))) - ) { - $tokens[$i] = null; - $tokens[$i + 1] = null; - $i++; - $r = $r + 2; - } - } - return $r; - } -} - -/** - * This {@link aCssMinifierFilter minifier filter} will remove any empty @font-face, @keyframes, @media and @page - * at-rule blocks. - * - * @package CssMin/Minifier/Filters - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssRemoveEmptyAtBlocksMinifierFilter extends aCssMinifierFilter -{ - /** - * Implements {@link aCssMinifierFilter::filter()}. - * - * @param array $tokens Array of objects of type aCssToken - * @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array - */ - public function apply(array &$tokens) - { - $r = 0; - for ($i = 0, $l = count($tokens); $i < $l; $i++) { - $current = get_class($tokens[$i]); - $next = isset($tokens[$i + 1]) ? get_class($tokens[$i + 1]) : false; - if (($current === "CssAtFontFaceStartToken" && $next === "CssAtFontFaceEndToken") || - ($current === "CssAtKeyframesStartToken" && $next === "CssAtKeyframesEndToken") || - ($current === "CssAtPageStartToken" && $next === "CssAtPageEndToken") || - ($current === "CssAtMediaStartToken" && $next === "CssAtMediaEndToken") - ) { - $tokens[$i] = null; - $tokens[$i + 1] = null; - $i++; - $r = $r + 2; - } - } - return $r; - } -} - -/** - * This {@link aCssMinifierFilter minifier filter} will remove any comments from the array of parsed tokens. - * - * @package CssMin/Minifier/Filters - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssRemoveCommentsMinifierFilter extends aCssMinifierFilter -{ - /** - * Implements {@link aCssMinifierFilter::filter()}. - * - * @param array $tokens Array of objects of type aCssToken - * @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array - */ - public function apply(array &$tokens) - { - $r = 0; - for ($i = 0, $l = count($tokens); $i < $l; $i++) { - if (get_class($tokens[$i]) === "CssCommentToken") { - $tokens[$i] = null; - $r++; - } - } - return $r; - } -} - -/** - * CSS Parser. - * - * @package CssMin/Parser - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssParser -{ - /** - * Parse buffer. - * - * @var string - */ - public $buffer = ""; - /** - * {@link aCssParserPlugin Plugins}. - * - * @var array - */ - private $plugins = array(); - /** - * Source to parse. - * - * @var string - */ - private $source = ""; - /** - * Current state. - * - * @var integer - */ - private $state = "T_DOCUMENT"; - /** - * Exclusive state. - * - * @var string - */ - private $stateExclusive = false; - /** - * Media types state. - * - * @var mixed - */ - private $stateMediaTypes = false; - /** - * State stack. - * - * @var array - */ - private $states = array("T_DOCUMENT"); - /** - * Parsed tokens. - * - * @var array - */ - private $tokens = array(); - - /** - * Constructer. - * - * Create instances of the used {@link aCssParserPlugin plugins}. - * - * @param string $source CSS source [optional] - * @param array $plugins Plugin configuration [optional] - * @return void - */ - public function __construct($source = null, array $plugins = null) - { - $plugins = array_merge(array - ( - "Comment" => true, - "String" => true, - "Url" => true, - "Expression" => true, - "Ruleset" => true, - "AtCharset" => true, - "AtFontFace" => true, - "AtImport" => true, - "AtKeyframes" => true, - "AtMedia" => true, - "AtPage" => true, - "AtVariables" => true - ), is_array($plugins) ? $plugins : array()); - // Create plugin instances - foreach ($plugins as $name => $config) { - if ($config !== false) { - $class = "Css" . $name . "ParserPlugin"; - $config = is_array($config) ? $config : array(); - if (class_exists($class)) { - $this->plugins[] = new $class($this, $config); - } else { - CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": The plugin " . $name . " with the class name " . $class . " was not found")); - } - } - } - if (!is_null($source)) { - $this->parse($source); - } - } - - /** - * Parse the CSS source and return a array with parsed tokens. - * - * @param string $source CSS source - * @return array Array with tokens - */ - public function parse($source) - { - // Reset - $this->source = ""; - $this->tokens = array(); - // Create a global and plugin lookup table for trigger chars; set array of plugins as local variable and create - // several helper variables for plugin handling - $globalTriggerChars = ""; - $plugins = $this->plugins; - $pluginCount = count($plugins); - $pluginIndex = array(); - $pluginTriggerStates = array(); - $pluginTriggerChars = array(); - for ($i = 0, $l = count($plugins); $i < $l; $i++) { - $tPluginClassName = get_class($plugins[$i]); - $pluginTriggerChars[$i] = implode("", $plugins[$i]->getTriggerChars()); - $tPluginTriggerStates = $plugins[$i]->getTriggerStates(); - $pluginTriggerStates[$i] = $tPluginTriggerStates === false ? false : "|" . implode("|", $tPluginTriggerStates) . "|"; - $pluginIndex[$tPluginClassName] = $i; - for ($ii = 0, $ll = strlen($pluginTriggerChars[$i]); $ii < $ll; $ii++) { - $c = substr($pluginTriggerChars[$i], $ii, 1); - if (strpos($globalTriggerChars, $c) === false) { - $globalTriggerChars .= $c; - } - } - } - // Normalise line endings - $source = str_replace("\r\n", "\n", $source); // Windows to Unix line endings - $source = str_replace("\r", "\n", $source); // Mac to Unix line endings - $this->source = $source; - // Variables - $buffer = &$this->buffer; - $exclusive = &$this->stateExclusive; - $state = &$this->state; - $c = $p = null; - // -- - for ($i = 0, $l = strlen($source); $i < $l; $i++) { - // Set the current Char - $c = $source[$i]; // Is faster than: $c = substr($source, $i, 1); - // Normalize and filter double whitespace characters - if ($exclusive === false) { - if ($c === "\n" || $c === "\t") { - $c = " "; - } - if ($c === " " && $p === " ") { - continue; - } - } - $buffer .= $c; - // Extended processing only if the current char is a global trigger char - if (strpos($globalTriggerChars, $c) !== false) { - // Exclusive state is set; process with the exclusive plugin - if ($exclusive) { - $tPluginIndex = $pluginIndex[$exclusive]; - if (strpos($pluginTriggerChars[$tPluginIndex], $c) !== false && ($pluginTriggerStates[$tPluginIndex] === false || strpos($pluginTriggerStates[$tPluginIndex], $state) !== false)) { - $r = $plugins[$tPluginIndex]->parse($i, $c, $p, $state); - // Return value is TRUE => continue with next char - if ($r === true) { - continue; - } // Return value is numeric => set new index and continue with next char - elseif ($r !== false && $r != $i) { - $i = $r; - continue; - } - } - } // Else iterate through the plugins - else { - $triggerState = "|" . $state . "|"; - for ($ii = 0, $ll = $pluginCount; $ii < $ll; $ii++) { - // Only process if the current char is one of the plugin trigger chars - if (strpos($pluginTriggerChars[$ii], $c) !== false && ($pluginTriggerStates[$ii] === false || strpos($pluginTriggerStates[$ii], $triggerState) !== false)) { - // Process with the plugin - $r = $plugins[$ii]->parse($i, $c, $p, $state); - // Return value is TRUE => break the plugin loop and and continue with next char - if ($r === true) { - break; - } // Return value is numeric => set new index, break the plugin loop and and continue with next char - elseif ($r !== false && $r != $i) { - $i = $r; - break; - } - } - } - } - } - $p = $c; // Set the parent char - } - return $this->tokens; - } - - /** - * Append a token to the array of tokens. - * - * @param aCssToken $token Token to append - * @return void - */ - public function appendToken(aCssToken $token) - { - $this->tokens[] = $token; - } - - /** - * Clears the current buffer. - * - * @return void - */ - public function clearBuffer() - { - $this->buffer = ""; - } - - /** - * Returns and clear the current buffer. - * - * @param string $trim Chars to use to trim the returned buffer - * @param boolean $tolower if TRUE the returned buffer will get converted to lower case - * @return string - */ - public function getAndClearBuffer($trim = "", $tolower = false) - { - $r = $this->getBuffer($trim, $tolower); - $this->buffer = ""; - return $r; - } - - /** - * Returns the current buffer. - * - * @param string $trim Chars to use to trim the returned buffer - * @param boolean $tolower if TRUE the returned buffer will get converted to lower case - * @return string - */ - public function getBuffer($trim = "", $tolower = false) - { - $r = $this->buffer; - if ($trim) { - $r = trim($r, " \t\n\r\0\x0B" . $trim); - } - if ($tolower) { - $r = strtolower($r); - } - return $r; - } - - /** - * Sets/restores the buffer. - * - * @param string $buffer Buffer to set - * @return void - */ - public function setBuffer($buffer) - { - $this->buffer = $buffer; - } - - /** - * Returns the current media types state. - * - * @return array - */ - public function getMediaTypes() - { - return $this->stateMediaTypes; - } - - /** - * Returns the CSS source. - * - * @return string - */ - public function getSource() - { - return $this->source; - } - - /** - * Returns the current state. - * - * @return integer The current state - */ - public function getState() - { - return $this->state; - } - - /** - * Sets the current state in the state stack; equals to {@link CssParser::popState()} + {@link CssParser::pushState()}. - * - * @param integer $state State to set - * @return integer - */ - public function setState($state) - { - $r = array_pop($this->states); - array_push($this->states, $state); - $this->state = $this->states[count($this->states) - 1]; - return $r; - } - - /** - * Returns a plugin by class name. - * - * @param string $name Class name of the plugin - * @return aCssParserPlugin - */ - public function getPlugin($class) - { - static $index = null; - if (is_null($index)) { - $index = array(); - for ($i = 0, $l = count($this->plugins); $i < $l; $i++) { - $index[get_class($this->plugins[$i])] = $i; - } - } - return isset($index[$class]) ? $this->plugins[$index[$class]] : false; - } - - /** - * Returns the parsed tokens. - * - * @return array - */ - public function getTokens() - { - return $this->tokens; - } - - /** - * Returns if the current state equals the passed state. - * - * @param integer $state State to compare with the current state - * @return boolean TRUE is the state equals to the passed state; FALSE if not - */ - public function isState($state) - { - return ($this->state == $state); - } - - /** - * Remove the last state of the state stack and return the removed stack value. - * - * @return integer Removed state value - */ - public function popState() - { - $r = array_pop($this->states); - $this->state = $this->states[count($this->states) - 1]; - return $r; - } - - /** - * Adds a new state onto the state stack. - * - * @param integer $state State to add onto the state stack. - * @return integer The index of the added state in the state stacks - */ - public function pushState($state) - { - $r = array_push($this->states, $state); - $this->state = $this->states[count($this->states) - 1]; - return $r; - } - - /** - * Set the exclusive state. - * - * @param string $exclusive Exclusive state - * @return void - */ - public function setExclusive($exclusive) - { - $this->stateExclusive = $exclusive; - } - - /** - * Set the media types state. - * - * @param array $mediaTypes Media types state - * @return void - */ - public function setMediaTypes(array $mediaTypes) - { - $this->stateMediaTypes = $mediaTypes; - } - - /** - * Removes the exclusive state. - * - * @return void - */ - public function unsetExclusive() - { - $this->stateExclusive = false; - } - - /** - * Removes the media types state. - * - * @return void - */ - public function unsetMediaTypes() - { - $this->stateMediaTypes = false; - } -} - -/** - * {@link aCssFromatter Formatter} returning the CSS source in {@link http://goo.gl/j4XdU OTBS indent style} (The One True Brace Style). - * - * @package CssMin/Formatter - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssOtbsFormatter extends aCssFormatter -{ - /** - * Implements {@link aCssFormatter::__toString()}. - * - * @return string - */ - public function __toString() - { - $r = array(); - $level = 0; - for ($i = 0, $l = count($this->tokens); $i < $l; $i++) { - $token = $this->tokens[$i]; - $class = get_class($token); - $indent = str_repeat($this->indent, $level); - if ($class === "CssCommentToken") { - $lines = array_map("trim", explode("\n", $token->Comment)); - for ($ii = 0, $ll = count($lines); $ii < $ll; $ii++) { - $r[] = $indent . (substr($lines[$ii], 0, 1) == "*" ? " " : "") . $lines[$ii]; - } - } elseif ($class === "CssAtCharsetToken") { - $r[] = $indent . "@charset " . $token->Charset . ";"; - } elseif ($class === "CssAtFontFaceStartToken") { - $r[] = $indent . "@font-face {"; - $level++; - } elseif ($class === "CssAtImportToken") { - $r[] = $indent . "@import " . $token->Import . " " . implode(", ", $token->MediaTypes) . ";"; - } elseif ($class === "CssAtKeyframesStartToken") { - $r[] = $indent . "@keyframes \"" . $token->Name . "\" {"; - $level++; - } elseif ($class === "CssAtMediaStartToken") { - $r[] = $indent . "@media " . implode(", ", $token->MediaTypes) . " {"; - $level++; - } elseif ($class === "CssAtPageStartToken") { - $r[] = $indent . "@page {"; - $level++; - } elseif ($class === "CssAtVariablesStartToken") { - $r[] = $indent . "@variables " . implode(", ", $token->MediaTypes) . " {"; - $level++; - } elseif ($class === "CssRulesetStartToken" || $class === "CssAtKeyframesRulesetStartToken") { - $r[] = $indent . implode(", ", $token->Selectors) . " {"; - $level++; - } elseif ($class == "CssAtFontFaceDeclarationToken" - || $class === "CssAtKeyframesRulesetDeclarationToken" - || $class === "CssAtPageDeclarationToken" - || $class == "CssAtVariablesDeclarationToken" - || $class === "CssRulesetDeclarationToken" - ) { - $declaration = $indent . $token->Property . ": "; - if ($this->padding) { - $declaration = str_pad($declaration, $this->padding, " ", STR_PAD_RIGHT); - } - $r[] = $declaration . $token->Value . ($token->IsImportant ? " !important" : "") . ";"; - } elseif ($class === "CssAtFontFaceEndToken" - || $class === "CssAtMediaEndToken" - || $class === "CssAtKeyframesEndToken" - || $class === "CssAtKeyframesRulesetEndToken" - || $class === "CssAtPageEndToken" - || $class === "CssAtVariablesEndToken" - || $class === "CssRulesetEndToken" - ) { - $level--; - $r[] = str_repeat($indent, $level) . "}"; - } - } - return implode("\n", $r); - } -} - -/** - * This {@link aCssToken CSS token} is a utility token that extends {@link aNullToken} and returns only a empty string. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssNullToken extends aCssToken -{ - /** - * Implements {@link aCssToken::__toString()}. - * - * @return string - */ - public function __toString() - { - return ""; - } -} - -/** - * CSS Minifier. - * - * @package CssMin/Minifier - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssMinifier -{ - /** - * {@link aCssMinifierFilter Filters}. - * - * @var array - */ - private $filters = array(); - /** - * {@link aCssMinifierPlugin Plugins}. - * - * @var array - */ - private $plugins = array(); - /** - * Minified source. - * - * @var string - */ - private $minified = ""; - - /** - * Constructer. - * - * Creates instances of {@link aCssMinifierFilter filters} and {@link aCssMinifierPlugin plugins}. - * - * @param string $source CSS source [optional] - * @param array $filters Filter configuration [optional] - * @param array $plugins Plugin configuration [optional] - * @return void - */ - public function __construct($source = null, array $filters = null, array $plugins = null) - { - $filters = array_merge(array - ( - "ImportImports" => false, - "RemoveComments" => true, - "RemoveEmptyRulesets" => true, - "RemoveEmptyAtBlocks" => true, - "ConvertLevel3Properties" => false, - "ConvertLevel3AtKeyframes" => false, - "Variables" => true, - "RemoveLastDelarationSemiColon" => true - ), is_array($filters) ? $filters : array()); - $plugins = array_merge(array - ( - "Variables" => true, - "ConvertFontWeight" => false, - "ConvertHslColors" => false, - "ConvertRgbColors" => false, - "ConvertNamedColors" => false, - "CompressColorValues" => false, - "CompressUnitValues" => false, - "CompressExpressionValues" => false - ), is_array($plugins) ? $plugins : array()); - // Filters - foreach ($filters as $name => $config) { - if ($config !== false) { - $class = "Css" . $name . "MinifierFilter"; - $config = is_array($config) ? $config : array(); - if (class_exists($class)) { - $this->filters[] = new $class($this, $config); - } else { - CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": The filter " . $name . " with the class name " . $class . " was not found")); - } - } - } - // Plugins - foreach ($plugins as $name => $config) { - if ($config !== false) { - $class = "Css" . $name . "MinifierPlugin"; - $config = is_array($config) ? $config : array(); - if (class_exists($class)) { - $this->plugins[] = new $class($this, $config); - } else { - CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": The plugin " . $name . " with the class name " . $class . " was not found")); - } - } - } - // -- - if (!is_null($source)) { - $this->minify($source); - } - } - - /** - * Minifies the CSS source. - * - * @param string $source CSS source - * @return string - */ - public function minify($source) - { - // Variables - $r = ""; - $parser = new CssParser($source); - $tokens = $parser->getTokens(); - $filters = $this->filters; - $filterCount = count($this->filters); - $plugins = $this->plugins; - $pluginCount = count($plugins); - $pluginIndex = array(); - $pluginTriggerTokens = array(); - $globalTriggerTokens = array(); - for ($i = 0, $l = count($plugins); $i < $l; $i++) { - $tPluginClassName = get_class($plugins[$i]); - $pluginTriggerTokens[$i] = $plugins[$i]->getTriggerTokens(); - foreach ($pluginTriggerTokens[$i] as $v) { - if (!in_array($v, $globalTriggerTokens)) { - $globalTriggerTokens[] = $v; - } - } - $pluginTriggerTokens[$i] = "|" . implode("|", $pluginTriggerTokens[$i]) . "|"; - $pluginIndex[$tPluginClassName] = $i; - } - $globalTriggerTokens = "|" . implode("|", $globalTriggerTokens) . "|"; - /* - * Apply filters - */ - for ($i = 0; $i < $filterCount; $i++) { - // Apply the filter; if the return value is larger than 0... - if ($filters[$i]->apply($tokens) > 0) { - // ...then filter null values and rebuild the token array - $tokens = array_values(array_filter($tokens)); - } - } - $tokenCount = count($tokens); - /* - * Apply plugins - */ - for ($i = 0; $i < $tokenCount; $i++) { - $triggerToken = "|" . get_class($tokens[$i]) . "|"; - if (strpos($globalTriggerTokens, $triggerToken) !== false) { - for ($ii = 0; $ii < $pluginCount; $ii++) { - if (strpos($pluginTriggerTokens[$ii], $triggerToken) !== false || $pluginTriggerTokens[$ii] === false) { - // Apply the plugin; if the return value is TRUE continue to the next token - if ($plugins[$ii]->apply($tokens[$i]) === true) { - continue 2; - } - } - } - } - } - // Stringify the tokens - for ($i = 0; $i < $tokenCount; $i++) { - $r .= (string)$tokens[$i]; - } - $this->minified = $r; - return $r; - } - - /** - * Returns the minified Source. - * - * @return string - */ - public function getMinified() - { - return $this->minified; - } - - /** - * Returns a plugin by class name. - * - * @param string $name Class name of the plugin - * @return aCssMinifierPlugin - */ - public function getPlugin($class) - { - static $index = null; - if (is_null($index)) { - $index = array(); - for ($i = 0, $l = count($this->plugins); $i < $l; $i++) { - $index[get_class($this->plugins[$i])] = $i; - } - } - return isset($index[$class]) ? $this->plugins[$index[$class]] : false; - } -} - -/** - * CssMin - A (simple) css minifier with benefits - * - * -- - * Copyright (c) 2011 Joe Scylla - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * -- - * - * @package CssMin - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssMin -{ - /** - * Index of classes - * - * @var array - */ - private static $classIndex = array(); - /** - * Parse/minify errors - * - * @var array - */ - private static $errors = array(); - /** - * Verbose output. - * - * @var boolean - */ - private static $isVerbose = false; - - /** - * {@link http://goo.gl/JrW54 Autoload} function of CssMin. - * - * @param string $class Name of the class - * @return void - */ - public static function autoload($class) - { - if (isset(self::$classIndex[$class])) { - require(self::$classIndex[$class]); - } - } - - /** - * Return errors - * - * @return array of {CssError}. - */ - public static function getErrors() - { - return self::$errors; - } - - /** - * Returns if there were errors. - * - * @return boolean - */ - public static function hasErrors() - { - return count(self::$errors) > 0; - } - - /** - * Initialises CssMin. - * - * @return void - */ - public static function initialise() - { - // Create the class index for autoloading or including - $paths = array(dirname(__FILE__)); - while (list($i, $path) = each($paths)) { - $subDirectorys = glob($path . "*", GLOB_MARK | GLOB_ONLYDIR | GLOB_NOSORT); - if (is_array($subDirectorys)) { - foreach ($subDirectorys as $subDirectory) { - $paths[] = $subDirectory; - } - } - $files = glob($path . "*.php", 0); - if (is_array($files)) { - foreach ($files as $file) { - $class = substr(basename($file), 0, -4); - self::$classIndex[$class] = $file; - } - } - } - krsort(self::$classIndex); - // Only use autoloading if spl_autoload_register() is available and no __autoload() is defined (because - // __autoload() breaks if spl_autoload_register() is used. - if (function_exists("spl_autoload_register") && !is_callable("__autoload")) { - spl_autoload_register(array(__CLASS__, "autoload")); - } // Otherwise include all class files - else { - foreach (self::$classIndex as $class => $file) { - if (!class_exists($class)) { - require_once($file); - } - } - } - } - - /** - * Minifies CSS source. - * - * @param string $source CSS source - * @param array $filters Filter configuration [optional] - * @param array $plugins Plugin configuration [optional] - * @return string Minified CSS - */ - public static function minify($source, array $filters = null, array $plugins = null) - { - self::$errors = array(); - $minifier = new CssMinifier($source, $filters, $plugins); - return $minifier->getMinified(); - } - - /** - * Parse the CSS source. - * - * @param string $source CSS source - * @param array $plugins Plugin configuration [optional] - * @return array Array of aCssToken - */ - public static function parse($source, array $plugins = null) - { - self::$errors = array(); - $parser = new CssParser($source, $plugins); - return $parser->getTokens(); - } - - /** - * -- - * - * @param boolean $to - * @return boolean - */ - public static function setVerbose($to) - { - self::$isVerbose = (boolean)$to; - return self::$isVerbose; - } - - /** - * -- - * - * @param CssError $error - * @return void - */ - public static function triggerError(CssError $error) - { - self::$errors[] = $error; - if (self::$isVerbose) { - trigger_error((string)$error, E_USER_WARNING); - } - } -} - -// Initialises CssMin -CssMin::initialise(); - -/** - * This {@link aCssMinifierFilter minifier filter} import external css files defined with the @import at-rule into the - * current stylesheet. - * - * @package CssMin/Minifier/Filters - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssImportImportsMinifierFilter extends aCssMinifierFilter -{ - /** - * Array with already imported external stylesheets. - * - * @var array - */ - private $imported = array(); - - /** - * Implements {@link aCssMinifierFilter::filter()}. - * - * @param array $tokens Array of objects of type aCssToken - * @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array - */ - public function apply(array &$tokens) - { - if (!isset($this->configuration["BasePath"]) || !is_dir($this->configuration["BasePath"])) { - CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Base path " . ($this->configuration["BasePath"] ? $this->configuration["BasePath"] : "null") . " is not a directory")); - return 0; - } - for ($i = 0, $l = count($tokens); $i < $l; $i++) { - if (get_class($tokens[$i]) === "CssAtImportToken") { - $import = $this->configuration["BasePath"] . "/" . $tokens[$i]->Import; - // Import file was not found/is not a file - if (!is_file($import)) { - CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Import file " . $import . " was not found.", (string)$tokens[$i])); - } // Import file already imported; remove this @import at-rule to prevent recursions - elseif (in_array($import, $this->imported)) { - CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Import file " . $import . " was already imported.", (string)$tokens[$i])); - $tokens[$i] = null; - } else { - $this->imported[] = $import; - $parser = new CssParser(file_get_contents($import)); - $import = $parser->getTokens(); - // The @import at-rule has media types defined requiring special handling - if (count($tokens[$i]->MediaTypes) > 0 && !(count($tokens[$i]->MediaTypes) == 1 && $tokens[$i]->MediaTypes[0] == "all")) { - $blocks = array(); - /* - * Filter or set media types of @import at-rule or remove the @import at-rule if no media type is matching the parent @import at-rule - */ - for ($ii = 0, $ll = count($import); $ii < $ll; $ii++) { - if (get_class($import[$ii]) === "CssAtImportToken") { - // @import at-rule defines no media type or only the "all" media type; set the media types to the one defined in the parent @import at-rule - if (count($import[$ii]->MediaTypes) == 0 || (count($import[$ii]->MediaTypes) == 1 && $import[$ii]->MediaTypes[0] == "all")) { - $import[$ii]->MediaTypes = $tokens[$i]->MediaTypes; - } // @import at-rule defineds one or more media types; filter out media types not matching with the parent @import at-rule - elseif (count($import[$ii]->MediaTypes > 0)) { - foreach ($import[$ii]->MediaTypes as $index => $mediaType) { - if (!in_array($mediaType, $tokens[$i]->MediaTypes)) { - unset($import[$ii]->MediaTypes[$index]); - } - } - $import[$ii]->MediaTypes = array_values($import[$ii]->MediaTypes); - // If there are no media types left in the @import at-rule remove the @import at-rule - if (count($import[$ii]->MediaTypes) == 0) { - $import[$ii] = null; - } - } - } - } - /* - * Remove media types of @media at-rule block not defined in the @import at-rule - */ - for ($ii = 0, $ll = count($import); $ii < $ll; $ii++) { - if (get_class($import[$ii]) === "CssAtMediaStartToken") { - foreach ($import[$ii]->MediaTypes as $index => $mediaType) { - if (!in_array($mediaType, $tokens[$i]->MediaTypes)) { - unset($import[$ii]->MediaTypes[$index]); - } - $import[$ii]->MediaTypes = array_values($import[$ii]->MediaTypes); - } - } - } - /* - * If no media types left of the @media at-rule block remove the complete block - */ - for ($ii = 0, $ll = count($import); $ii < $ll; $ii++) { - if (get_class($import[$ii]) === "CssAtMediaStartToken") { - if (count($import[$ii]->MediaTypes) === 0) { - for ($iii = $ii; $iii < $ll; $iii++) { - if (get_class($import[$iii]) === "CssAtMediaEndToken") { - break; - } - } - if (get_class($import[$iii]) === "CssAtMediaEndToken") { - array_splice($import, $ii, $iii - $ii + 1, array()); - $ll = count($import); - } - } - } - } - /* - * If the media types of the @media at-rule equals the media types defined in the @import - * at-rule remove the CssAtMediaStartToken and CssAtMediaEndToken token - */ - for ($ii = 0, $ll = count($import); $ii < $ll; $ii++) { - if (get_class($import[$ii]) === "CssAtMediaStartToken" && count(array_diff($tokens[$i]->MediaTypes, $import[$ii]->MediaTypes)) === 0) { - for ($iii = $ii; $iii < $ll; $iii++) { - if (get_class($import[$iii]) == "CssAtMediaEndToken") { - break; - } - } - if (get_class($import[$iii]) == "CssAtMediaEndToken") { - unset($import[$ii]); - unset($import[$iii]); - $import = array_values($import); - $ll = count($import); - } - } - } - /** - * Extract CssAtImportToken and CssAtCharsetToken tokens - */ - for ($ii = 0, $ll = count($import); $ii < $ll; $ii++) { - $class = get_class($import[$ii]); - if ($class === "CssAtImportToken" || $class === "CssAtCharsetToken") { - $blocks = array_merge($blocks, array_splice($import, $ii, 1, array())); - $ll = count($import); - } - } - /* - * Extract the @font-face, @media and @page at-rule block - */ - for ($ii = 0, $ll = count($import); $ii < $ll; $ii++) { - $class = get_class($import[$ii]); - if ($class === "CssAtFontFaceStartToken" || $class === "CssAtMediaStartToken" || $class === "CssAtPageStartToken" || $class === "CssAtVariablesStartToken") { - for ($iii = $ii; $iii < $ll; $iii++) { - $class = get_class($import[$iii]); - if ($class === "CssAtFontFaceEndToken" || $class === "CssAtMediaEndToken" || $class === "CssAtPageEndToken" || $class === "CssAtVariablesEndToken") { - break; - } - } - $class = get_class($import[$iii]); - if (isset($import[$iii]) && ($class === "CssAtFontFaceEndToken" || $class === "CssAtMediaEndToken" || $class === "CssAtPageEndToken" || $class === "CssAtVariablesEndToken")) { - $blocks = array_merge($blocks, array_splice($import, $ii, $iii - $ii + 1, array())); - $ll = count($import); - } - } - } - // Create the import array with extracted tokens and the rulesets wrapped into a @media at-rule block - $import = array_merge($blocks, array(new CssAtMediaStartToken($tokens[$i]->MediaTypes)), $import, array(new CssAtMediaEndToken())); - } - // Insert the imported tokens - array_splice($tokens, $i, 1, $import); - // Modify parameters of the for-loop - $i--; - $l = count($tokens); - } - } - } - } -} - -/** - * {@link aCssParserPlugin Parser plugin} for preserve parsing expression() declaration values. - * - * This plugin return no {@link aCssToken CssToken} but ensures that expression() declaration values will get parsed - * properly. - * - * @package CssMin/Parser/Plugins - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssExpressionParserPlugin extends aCssParserPlugin -{ - /** - * Count of left braces. - * - * @var integer - */ - private $leftBraces = 0; - /** - * Count of right braces. - * - * @var integer - */ - private $rightBraces = 0; - - /** - * Implements {@link aCssParserPlugin::getTriggerChars()}. - * - * @return array - */ - public function getTriggerChars() - { - return array("(", ")", ";", "}"); - } - - /** - * Implements {@link aCssParserPlugin::getTriggerStates()}. - * - * @return array - */ - public function getTriggerStates() - { - return false; - } - - /** - * Implements {@link aCssParserPlugin::parse()}. - * - * @param integer $index Current index - * @param string $char Current char - * @param string $previousChar Previous char - * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing - */ - public function parse($index, $char, $previousChar, $state) - { - // Start of expression - if ($char === "(" && strtolower(substr($this->parser->getSource(), $index - 10, 11)) === "expression(" && $state !== "T_EXPRESSION") { - $this->parser->pushState("T_EXPRESSION"); - $this->leftBraces++; - } // Count left braces - elseif ($char === "(" && $state === "T_EXPRESSION") { - $this->leftBraces++; - } // Count right braces - elseif ($char === ")" && $state === "T_EXPRESSION") { - $this->rightBraces++; - } // Possible end of expression; if left and right braces are equal the expressen ends - elseif (($char === ";" || $char === "}") && $state === "T_EXPRESSION" && $this->leftBraces === $this->rightBraces) { - $this->leftBraces = $this->rightBraces = 0; - $this->parser->popState(); - return $index - 1; - } else { - return false; - } - return true; - } -} - -/** - * CSS Error. - * - * @package CssMin - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssError -{ - /** - * File. - * - * @var string - */ - public $File = ""; - /** - * Line. - * - * @var integer - */ - public $Line = 0; - /** - * Error message. - * - * @var string - */ - public $Message = ""; - /** - * Source. - * - * @var string - */ - public $Source = ""; - - /** - * Constructor triggering the error. - * - * @param string $message Error message - * @param string $source Corresponding line [optional] - * @return void - */ - public function __construct($file, $line, $message, $source = "") - { - $this->File = $file; - $this->Line = $line; - $this->Message = $message; - $this->Source = $source; - } - - /** - * Returns the error as formatted string. - * - * @return string - */ - public function __toString() - { - return $this->Message . ($this->Source ? ":
" . $this->Source . "" : "") . "
in file " . $this->File . " at line " . $this->Line; - } -} - -/** - * This {@link aCssMinifierPlugin} will convert a color value in rgb notation to hexadecimal notation. - * - * Example: - * - * color: rgb(200,60%,5); - * - * - * Will get converted to: - * - * color:#c89905; - * - * - * @package CssMin/Minifier/Plugins - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssConvertRgbColorsMinifierPlugin extends aCssMinifierPlugin -{ - /** - * Regular expression matching the value. - * - * @var string - */ - private $reMatch = "/rgb\s*\(\s*([0-9%]+)\s*,\s*([0-9%]+)\s*,\s*([0-9%]+)\s*\)/iS"; - - /** - * Implements {@link aCssMinifierPlugin::minify()}. - * - * @param aCssToken $token Token to process - * @return boolean Return TRUE to break the processing of this token; FALSE to continue - */ - public function apply(aCssToken &$token) - { - if (stripos($token->Value, "rgb") !== false && preg_match($this->reMatch, $token->Value, $m)) { - for ($i = 1, $l = count($m); $i < $l; $i++) { - if (strpos("%", $m[$i]) !== false) { - $m[$i] = substr($m[$i], 0, -1); - $m[$i] = (int)(256 * ($m[$i] / 100)); - } - $m[$i] = str_pad(dechex($m[$i]), 2, "0", STR_PAD_LEFT); - } - $token->Value = str_replace($m[0], "#" . $m[1] . $m[2] . $m[3], $token->Value); - } - return false; - } - - /** - * Implements {@link aMinifierPlugin::getTriggerTokens()} - * - * @return array - */ - public function getTriggerTokens() - { - return array - ( - "CssAtFontFaceDeclarationToken", - "CssAtPageDeclarationToken", - "CssRulesetDeclarationToken" - ); - } -} - -/** - * This {@link aCssMinifierPlugin} will convert named color values to hexadecimal notation. - * - * Example: - * - * color: black; - * border: 1px solid indigo; - * - * - * Will get converted to: - * - * color:#000; - * border:1px solid #4b0082; - * - * - * @package CssMin/Minifier/Plugins - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssConvertNamedColorsMinifierPlugin extends aCssMinifierPlugin -{ - - /** - * Regular expression matching the value. - * - * @var string - */ - private $reMatch = null; - /** - * Regular expression replacing the value. - * - * @var string - */ - private $reReplace = "\"\${1}\" . \$this->transformation[strtolower(\"\${2}\")] . \"\${3}\""; - /** - * Transformation table used by the {@link CssConvertNamedColorsMinifierPlugin::$reReplace replace regular expression}. - * - * @var array - */ - private $transformation = array - ( - "aliceblue" => "#f0f8ff", - "antiquewhite" => "#faebd7", - "aqua" => "#0ff", - "aquamarine" => "#7fffd4", - "azure" => "#f0ffff", - "beige" => "#f5f5dc", - "black" => "#000", - "blue" => "#00f", - "blueviolet" => "#8a2be2", - "brown" => "#a52a2a", - "burlywood" => "#deb887", - "cadetblue" => "#5f9ea0", - "chartreuse" => "#7fff00", - "chocolate" => "#d2691e", - "coral" => "#ff7f50", - "cornflowerblue" => "#6495ed", - "cornsilk" => "#fff8dc", - "crimson" => "#dc143c", - "darkblue" => "#00008b", - "darkcyan" => "#008b8b", - "darkgoldenrod" => "#b8860b", - "darkgray" => "#a9a9a9", - "darkgreen" => "#006400", - "darkkhaki" => "#bdb76b", - "darkmagenta" => "#8b008b", - "darkolivegreen" => "#556b2f", - "darkorange" => "#ff8c00", - "darkorchid" => "#9932cc", - "darkred" => "#8b0000", - "darksalmon" => "#e9967a", - "darkseagreen" => "#8fbc8f", - "darkslateblue" => "#483d8b", - "darkslategray" => "#2f4f4f", - "darkturquoise" => "#00ced1", - "darkviolet" => "#9400d3", - "deeppink" => "#ff1493", - "deepskyblue" => "#00bfff", - "dimgray" => "#696969", - "dodgerblue" => "#1e90ff", - "firebrick" => "#b22222", - "floralwhite" => "#fffaf0", - "forestgreen" => "#228b22", - "fuchsia" => "#f0f", - "gainsboro" => "#dcdcdc", - "ghostwhite" => "#f8f8ff", - "gold" => "#ffd700", - "goldenrod" => "#daa520", - "gray" => "#808080", - "green" => "#008000", - "greenyellow" => "#adff2f", - "honeydew" => "#f0fff0", - "hotpink" => "#ff69b4", - "indianred" => "#cd5c5c", - "indigo" => "#4b0082", - "ivory" => "#fffff0", - "khaki" => "#f0e68c", - "lavender" => "#e6e6fa", - "lavenderblush" => "#fff0f5", - "lawngreen" => "#7cfc00", - "lemonchiffon" => "#fffacd", - "lightblue" => "#add8e6", - "lightcoral" => "#f08080", - "lightcyan" => "#e0ffff", - "lightgoldenrodyellow" => "#fafad2", - "lightgreen" => "#90ee90", - "lightgrey" => "#d3d3d3", - "lightpink" => "#ffb6c1", - "lightsalmon" => "#ffa07a", - "lightseagreen" => "#20b2aa", - "lightskyblue" => "#87cefa", - "lightslategray" => "#789", - "lightsteelblue" => "#b0c4de", - "lightyellow" => "#ffffe0", - "lime" => "#0f0", - "limegreen" => "#32cd32", - "linen" => "#faf0e6", - "maroon" => "#800000", - "mediumaquamarine" => "#66cdaa", - "mediumblue" => "#0000cd", - "mediumorchid" => "#ba55d3", - "mediumpurple" => "#9370db", - "mediumseagreen" => "#3cb371", - "mediumslateblue" => "#7b68ee", - "mediumspringgreen" => "#00fa9a", - "mediumturquoise" => "#48d1cc", - "mediumvioletred" => "#c71585", - "midnightblue" => "#191970", - "mintcream" => "#f5fffa", - "mistyrose" => "#ffe4e1", - "moccasin" => "#ffe4b5", - "navajowhite" => "#ffdead", - "navy" => "#000080", - "oldlace" => "#fdf5e6", - "olive" => "#808000", - "olivedrab" => "#6b8e23", - "orange" => "#ffa500", - "orangered" => "#ff4500", - "orchid" => "#da70d6", - "palegoldenrod" => "#eee8aa", - "palegreen" => "#98fb98", - "paleturquoise" => "#afeeee", - "palevioletred" => "#db7093", - "papayawhip" => "#ffefd5", - "peachpuff" => "#ffdab9", - "peru" => "#cd853f", - "pink" => "#ffc0cb", - "plum" => "#dda0dd", - "powderblue" => "#b0e0e6", - "purple" => "#800080", - "red" => "#f00", - "rosybrown" => "#bc8f8f", - "royalblue" => "#4169e1", - "saddlebrown" => "#8b4513", - "salmon" => "#fa8072", - "sandybrown" => "#f4a460", - "seagreen" => "#2e8b57", - "seashell" => "#fff5ee", - "sienna" => "#a0522d", - "silver" => "#c0c0c0", - "skyblue" => "#87ceeb", - "slateblue" => "#6a5acd", - "slategray" => "#708090", - "snow" => "#fffafa", - "springgreen" => "#00ff7f", - "steelblue" => "#4682b4", - "tan" => "#d2b48c", - "teal" => "#008080", - "thistle" => "#d8bfd8", - "tomato" => "#ff6347", - "turquoise" => "#40e0d0", - "violet" => "#ee82ee", - "wheat" => "#f5deb3", - "white" => "#fff", - "whitesmoke" => "#f5f5f5", - "yellow" => "#ff0", - "yellowgreen" => "#9acd32" - ); - - /** - * Overwrites {@link aCssMinifierPlugin::__construct()}. - * - * The constructor will create the {@link CssConvertNamedColorsMinifierPlugin::$reReplace replace regular expression} - * based on the {@link CssConvertNamedColorsMinifierPlugin::$transformation transformation table}. - * - * @param CssMinifier $minifier The CssMinifier object of this plugin. - * @param array $configuration Plugin configuration [optional] - * @return void - */ - public function __construct(CssMinifier $minifier, array $configuration = array()) - { - $this->reMatch = "/(^|\s)+(" . implode("|", array_keys($this->transformation)) . ")(\s|$)+/eiS"; - parent::__construct($minifier, $configuration); - } - - /** - * Implements {@link aCssMinifierPlugin::minify()}. - * - * @param aCssToken $token Token to process - * @return boolean Return TRUE to break the processing of this token; FALSE to continue - */ - public function apply(aCssToken &$token) - { - $lcValue = strtolower($token->Value); - // Declaration value equals a value in the transformation table => simple replace - if (isset($this->transformation[$lcValue])) { - $token->Value = $this->transformation[$lcValue]; - } // Declaration value contains a value in the transformation table => regular expression replace - elseif (preg_match($this->reMatch, $token->Value)) { - $token->Value = preg_replace($this->reMatch, $this->reReplace, $token->Value); - } - return false; - } - - /** - * Implements {@link aMinifierPlugin::getTriggerTokens()} - * - * @return array - */ - public function getTriggerTokens() - { - return array - ( - "CssAtFontFaceDeclarationToken", - "CssAtPageDeclarationToken", - "CssRulesetDeclarationToken" - ); - } -} - -/** - * This {@link aCssMinifierFilter minifier filter} triggers on CSS Level 3 properties and will add declaration tokens - * with browser-specific properties. - * - * @package CssMin/Minifier/Filters - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssConvertLevel3PropertiesMinifierFilter extends aCssMinifierFilter -{ - /** - * Css property transformations table. Used to convert CSS3 and proprietary properties to the browser-specific - * counterparts. - * - * @var array - */ - private $transformations = array - ( - // Property Array(Mozilla, Webkit, Opera, Internet Explorer); NULL values are placeholders and will get ignored - "animation" => array(null, "-webkit-animation", null, null), - "animation-delay" => array(null, "-webkit-animation-delay", null, null), - "animation-direction" => array(null, "-webkit-animation-direction", null, null), - "animation-duration" => array(null, "-webkit-animation-duration", null, null), - "animation-fill-mode" => array(null, "-webkit-animation-fill-mode", null, null), - "animation-iteration-count" => array(null, "-webkit-animation-iteration-count", null, null), - "animation-name" => array(null, "-webkit-animation-name", null, null), - "animation-play-state" => array(null, "-webkit-animation-play-state", null, null), - "animation-timing-function" => array(null, "-webkit-animation-timing-function", null, null), - "appearance" => array("-moz-appearance", "-webkit-appearance", null, null), - "backface-visibility" => array(null, "-webkit-backface-visibility", null, null), - "background-clip" => array(null, "-webkit-background-clip", null, null), - "background-composite" => array(null, "-webkit-background-composite", null, null), - "background-inline-policy" => array("-moz-background-inline-policy", null, null, null), - "background-origin" => array(null, "-webkit-background-origin", null, null), - "background-position-x" => array(null, null, null, "-ms-background-position-x"), - "background-position-y" => array(null, null, null, "-ms-background-position-y"), - "background-size" => array(null, "-webkit-background-size", null, null), - "behavior" => array(null, null, null, "-ms-behavior"), - "binding" => array("-moz-binding", null, null, null), - "border-after" => array(null, "-webkit-border-after", null, null), - "border-after-color" => array(null, "-webkit-border-after-color", null, null), - "border-after-style" => array(null, "-webkit-border-after-style", null, null), - "border-after-width" => array(null, "-webkit-border-after-width", null, null), - "border-before" => array(null, "-webkit-border-before", null, null), - "border-before-color" => array(null, "-webkit-border-before-color", null, null), - "border-before-style" => array(null, "-webkit-border-before-style", null, null), - "border-before-width" => array(null, "-webkit-border-before-width", null, null), - "border-border-bottom-colors" => array("-moz-border-bottom-colors", null, null, null), - "border-bottom-left-radius" => array("-moz-border-radius-bottomleft", "-webkit-border-bottom-left-radius", null, null), - "border-bottom-right-radius" => array("-moz-border-radius-bottomright", "-webkit-border-bottom-right-radius", null, null), - "border-end" => array("-moz-border-end", "-webkit-border-end", null, null), - "border-end-color" => array("-moz-border-end-color", "-webkit-border-end-color", null, null), - "border-end-style" => array("-moz-border-end-style", "-webkit-border-end-style", null, null), - "border-end-width" => array("-moz-border-end-width", "-webkit-border-end-width", null, null), - "border-fit" => array(null, "-webkit-border-fit", null, null), - "border-horizontal-spacing" => array(null, "-webkit-border-horizontal-spacing", null, null), - "border-image" => array("-moz-border-image", "-webkit-border-image", null, null), - "border-left-colors" => array("-moz-border-left-colors", null, null, null), - "border-radius" => array("-moz-border-radius", "-webkit-border-radius", null, null), - "border-border-right-colors" => array("-moz-border-right-colors", null, null, null), - "border-start" => array("-moz-border-start", "-webkit-border-start", null, null), - "border-start-color" => array("-moz-border-start-color", "-webkit-border-start-color", null, null), - "border-start-style" => array("-moz-border-start-style", "-webkit-border-start-style", null, null), - "border-start-width" => array("-moz-border-start-width", "-webkit-border-start-width", null, null), - "border-top-colors" => array("-moz-border-top-colors", null, null, null), - "border-top-left-radius" => array("-moz-border-radius-topleft", "-webkit-border-top-left-radius", null, null), - "border-top-right-radius" => array("-moz-border-radius-topright", "-webkit-border-top-right-radius", null, null), - "border-vertical-spacing" => array(null, "-webkit-border-vertical-spacing", null, null), - "box-align" => array("-moz-box-align", "-webkit-box-align", null, null), - "box-direction" => array("-moz-box-direction", "-webkit-box-direction", null, null), - "box-flex" => array("-moz-box-flex", "-webkit-box-flex", null, null), - "box-flex-group" => array(null, "-webkit-box-flex-group", null, null), - "box-flex-lines" => array(null, "-webkit-box-flex-lines", null, null), - "box-ordinal-group" => array("-moz-box-ordinal-group", "-webkit-box-ordinal-group", null, null), - "box-orient" => array("-moz-box-orient", "-webkit-box-orient", null, null), - "box-pack" => array("-moz-box-pack", "-webkit-box-pack", null, null), - "box-reflect" => array(null, "-webkit-box-reflect", null, null), - "box-shadow" => array("-moz-box-shadow", "-webkit-box-shadow", null, null), - "box-sizing" => array("-moz-box-sizing", null, null, null), - "color-correction" => array(null, "-webkit-color-correction", null, null), - "column-break-after" => array(null, "-webkit-column-break-after", null, null), - "column-break-before" => array(null, "-webkit-column-break-before", null, null), - "column-break-inside" => array(null, "-webkit-column-break-inside", null, null), - "column-count" => array("-moz-column-count", "-webkit-column-count", null, null), - "column-gap" => array("-moz-column-gap", "-webkit-column-gap", null, null), - "column-rule" => array("-moz-column-rule", "-webkit-column-rule", null, null), - "column-rule-color" => array("-moz-column-rule-color", "-webkit-column-rule-color", null, null), - "column-rule-style" => array("-moz-column-rule-style", "-webkit-column-rule-style", null, null), - "column-rule-width" => array("-moz-column-rule-width", "-webkit-column-rule-width", null, null), - "column-span" => array(null, "-webkit-column-span", null, null), - "column-width" => array("-moz-column-width", "-webkit-column-width", null, null), - "columns" => array(null, "-webkit-columns", null, null), - "filter" => array(__CLASS__, "filter"), - "float-edge" => array("-moz-float-edge", null, null, null), - "font-feature-settings" => array("-moz-font-feature-settings", null, null, null), - "font-language-override" => array("-moz-font-language-override", null, null, null), - "font-size-delta" => array(null, "-webkit-font-size-delta", null, null), - "font-smoothing" => array(null, "-webkit-font-smoothing", null, null), - "force-broken-image-icon" => array("-moz-force-broken-image-icon", null, null, null), - "highlight" => array(null, "-webkit-highlight", null, null), - "hyphenate-character" => array(null, "-webkit-hyphenate-character", null, null), - "hyphenate-locale" => array(null, "-webkit-hyphenate-locale", null, null), - "hyphens" => array(null, "-webkit-hyphens", null, null), - "force-broken-image-icon" => array("-moz-image-region", null, null, null), - "ime-mode" => array(null, null, null, "-ms-ime-mode"), - "interpolation-mode" => array(null, null, null, "-ms-interpolation-mode"), - "layout-flow" => array(null, null, null, "-ms-layout-flow"), - "layout-grid" => array(null, null, null, "-ms-layout-grid"), - "layout-grid-char" => array(null, null, null, "-ms-layout-grid-char"), - "layout-grid-line" => array(null, null, null, "-ms-layout-grid-line"), - "layout-grid-mode" => array(null, null, null, "-ms-layout-grid-mode"), - "layout-grid-type" => array(null, null, null, "-ms-layout-grid-type"), - "line-break" => array(null, "-webkit-line-break", null, "-ms-line-break"), - "line-clamp" => array(null, "-webkit-line-clamp", null, null), - "line-grid-mode" => array(null, null, null, "-ms-line-grid-mode"), - "logical-height" => array(null, "-webkit-logical-height", null, null), - "logical-width" => array(null, "-webkit-logical-width", null, null), - "margin-after" => array(null, "-webkit-margin-after", null, null), - "margin-after-collapse" => array(null, "-webkit-margin-after-collapse", null, null), - "margin-before" => array(null, "-webkit-margin-before", null, null), - "margin-before-collapse" => array(null, "-webkit-margin-before-collapse", null, null), - "margin-bottom-collapse" => array(null, "-webkit-margin-bottom-collapse", null, null), - "margin-collapse" => array(null, "-webkit-margin-collapse", null, null), - "margin-end" => array("-moz-margin-end", "-webkit-margin-end", null, null), - "margin-start" => array("-moz-margin-start", "-webkit-margin-start", null, null), - "margin-top-collapse" => array(null, "-webkit-margin-top-collapse", null, null), - "marquee " => array(null, "-webkit-marquee", null, null), - "marquee-direction" => array(null, "-webkit-marquee-direction", null, null), - "marquee-increment" => array(null, "-webkit-marquee-increment", null, null), - "marquee-repetition" => array(null, "-webkit-marquee-repetition", null, null), - "marquee-speed" => array(null, "-webkit-marquee-speed", null, null), - "marquee-style" => array(null, "-webkit-marquee-style", null, null), - "mask" => array(null, "-webkit-mask", null, null), - "mask-attachment" => array(null, "-webkit-mask-attachment", null, null), - "mask-box-image" => array(null, "-webkit-mask-box-image", null, null), - "mask-clip" => array(null, "-webkit-mask-clip", null, null), - "mask-composite" => array(null, "-webkit-mask-composite", null, null), - "mask-image" => array(null, "-webkit-mask-image", null, null), - "mask-origin" => array(null, "-webkit-mask-origin", null, null), - "mask-position" => array(null, "-webkit-mask-position", null, null), - "mask-position-x" => array(null, "-webkit-mask-position-x", null, null), - "mask-position-y" => array(null, "-webkit-mask-position-y", null, null), - "mask-repeat" => array(null, "-webkit-mask-repeat", null, null), - "mask-repeat-x" => array(null, "-webkit-mask-repeat-x", null, null), - "mask-repeat-y" => array(null, "-webkit-mask-repeat-y", null, null), - "mask-size" => array(null, "-webkit-mask-size", null, null), - "match-nearest-mail-blockquote-color" => array(null, "-webkit-match-nearest-mail-blockquote-color", null, null), - "max-logical-height" => array(null, "-webkit-max-logical-height", null, null), - "max-logical-width" => array(null, "-webkit-max-logical-width", null, null), - "min-logical-height" => array(null, "-webkit-min-logical-height", null, null), - "min-logical-width" => array(null, "-webkit-min-logical-width", null, null), - "object-fit" => array(null, null, "-o-object-fit", null), - "object-position" => array(null, null, "-o-object-position", null), - "opacity" => array(__CLASS__, "opacity"), - "outline-radius" => array("-moz-outline-radius", null, null, null), - "outline-bottom-left-radius" => array("-moz-outline-radius-bottomleft", null, null, null), - "outline-bottom-right-radius" => array("-moz-outline-radius-bottomright", null, null, null), - "outline-top-left-radius" => array("-moz-outline-radius-topleft", null, null, null), - "outline-top-right-radius" => array("-moz-outline-radius-topright", null, null, null), - "padding-after" => array(null, "-webkit-padding-after", null, null), - "padding-before" => array(null, "-webkit-padding-before", null, null), - "padding-end" => array("-moz-padding-end", "-webkit-padding-end", null, null), - "padding-start" => array("-moz-padding-start", "-webkit-padding-start", null, null), - "perspective" => array(null, "-webkit-perspective", null, null), - "perspective-origin" => array(null, "-webkit-perspective-origin", null, null), - "perspective-origin-x" => array(null, "-webkit-perspective-origin-x", null, null), - "perspective-origin-y" => array(null, "-webkit-perspective-origin-y", null, null), - "rtl-ordering" => array(null, "-webkit-rtl-ordering", null, null), - "scrollbar-3dlight-color" => array(null, null, null, "-ms-scrollbar-3dlight-color"), - "scrollbar-arrow-color" => array(null, null, null, "-ms-scrollbar-arrow-color"), - "scrollbar-base-color" => array(null, null, null, "-ms-scrollbar-base-color"), - "scrollbar-darkshadow-color" => array(null, null, null, "-ms-scrollbar-darkshadow-color"), - "scrollbar-face-color" => array(null, null, null, "-ms-scrollbar-face-color"), - "scrollbar-highlight-color" => array(null, null, null, "-ms-scrollbar-highlight-color"), - "scrollbar-shadow-color" => array(null, null, null, "-ms-scrollbar-shadow-color"), - "scrollbar-track-color" => array(null, null, null, "-ms-scrollbar-track-color"), - "stack-sizing" => array("-moz-stack-sizing", null, null, null), - "svg-shadow" => array(null, "-webkit-svg-shadow", null, null), - "tab-size" => array("-moz-tab-size", null, "-o-tab-size", null), - "table-baseline" => array(null, null, "-o-table-baseline", null), - "text-align-last" => array(null, null, null, "-ms-text-align-last"), - "text-autospace" => array(null, null, null, "-ms-text-autospace"), - "text-combine" => array(null, "-webkit-text-combine", null, null), - "text-decorations-in-effect" => array(null, "-webkit-text-decorations-in-effect", null, null), - "text-emphasis" => array(null, "-webkit-text-emphasis", null, null), - "text-emphasis-color" => array(null, "-webkit-text-emphasis-color", null, null), - "text-emphasis-position" => array(null, "-webkit-text-emphasis-position", null, null), - "text-emphasis-style" => array(null, "-webkit-text-emphasis-style", null, null), - "text-fill-color" => array(null, "-webkit-text-fill-color", null, null), - "text-justify" => array(null, null, null, "-ms-text-justify"), - "text-kashida-space" => array(null, null, null, "-ms-text-kashida-space"), - "text-overflow" => array(null, null, "-o-text-overflow", "-ms-text-overflow"), - "text-security" => array(null, "-webkit-text-security", null, null), - "text-size-adjust" => array(null, "-webkit-text-size-adjust", null, "-ms-text-size-adjust"), - "text-stroke" => array(null, "-webkit-text-stroke", null, null), - "text-stroke-color" => array(null, "-webkit-text-stroke-color", null, null), - "text-stroke-width" => array(null, "-webkit-text-stroke-width", null, null), - "text-underline-position" => array(null, null, null, "-ms-text-underline-position"), - "transform" => array("-moz-transform", "-webkit-transform", "-o-transform", null), - "transform-origin" => array("-moz-transform-origin", "-webkit-transform-origin", "-o-transform-origin", null), - "transform-origin-x" => array(null, "-webkit-transform-origin-x", null, null), - "transform-origin-y" => array(null, "-webkit-transform-origin-y", null, null), - "transform-origin-z" => array(null, "-webkit-transform-origin-z", null, null), - "transform-style" => array(null, "-webkit-transform-style", null, null), - "transition" => array("-moz-transition", "-webkit-transition", "-o-transition", null), - "transition-delay" => array("-moz-transition-delay", "-webkit-transition-delay", "-o-transition-delay", null), - "transition-duration" => array("-moz-transition-duration", "-webkit-transition-duration", "-o-transition-duration", null), - "transition-property" => array("-moz-transition-property", "-webkit-transition-property", "-o-transition-property", null), - "transition-timing-function" => array("-moz-transition-timing-function", "-webkit-transition-timing-function", "-o-transition-timing-function", null), - "user-drag" => array(null, "-webkit-user-drag", null, null), - "user-focus" => array("-moz-user-focus", null, null, null), - "user-input" => array("-moz-user-input", null, null, null), - "user-modify" => array("-moz-user-modify", "-webkit-user-modify", null, null), - "user-select" => array("-moz-user-select", "-webkit-user-select", null, null), - "white-space" => array(__CLASS__, "whiteSpace"), - "window-shadow" => array("-moz-window-shadow", null, null, null), - "word-break" => array(null, null, null, "-ms-word-break"), - "word-wrap" => array(null, null, null, "-ms-word-wrap"), - "writing-mode" => array(null, "-webkit-writing-mode", null, "-ms-writing-mode"), - "zoom" => array(null, null, null, "-ms-zoom") - ); - - /** - * Transforms the Internet Explorer specific declaration property "filter" to Internet Explorer 8+ compatible - * declaratiopn property "-ms-filter". - * - * @param aCssToken $token - * @return array - */ - private static function filter($token) - { - $r = array - ( - new CssRulesetDeclarationToken("-ms-filter", "\"" . $token->Value . "\"", $token->MediaTypes), - ); - return $r; - } - - /** - * Transforms "opacity: {value}" into browser specific counterparts. - * - * @param aCssToken $token - * @return array - */ - private static function opacity($token) - { - // Calculate the value for Internet Explorer filter statement - $ieValue = (int)((float)$token->Value * 100); - $r = array - ( - // Internet Explorer >= 8 - new CssRulesetDeclarationToken("-ms-filter", "\"alpha(opacity=" . $ieValue . ")\"", $token->MediaTypes), - // Internet Explorer >= 4 <= 7 - new CssRulesetDeclarationToken("filter", "alpha(opacity=" . $ieValue . ")", $token->MediaTypes), - new CssRulesetDeclarationToken("zoom", "1", $token->MediaTypes) - ); - return $r; - } - - /** - * Transforms "white-space: pre-wrap" into browser specific counterparts. - * - * @param aCssToken $token - * @return array - */ - private static function whiteSpace($token) - { - if (strtolower($token->Value) === "pre-wrap") { - $r = array - ( - // Firefox < 3 - new CssRulesetDeclarationToken("white-space", "-moz-pre-wrap", $token->MediaTypes), - // Webkit - new CssRulesetDeclarationToken("white-space", "-webkit-pre-wrap", $token->MediaTypes), - // Opera >= 4 <= 6 - new CssRulesetDeclarationToken("white-space", "-pre-wrap", $token->MediaTypes), - // Opera >= 7 - new CssRulesetDeclarationToken("white-space", "-o-pre-wrap", $token->MediaTypes), - // Internet Explorer >= 5.5 - new CssRulesetDeclarationToken("word-wrap", "break-word", $token->MediaTypes) - ); - return $r; - } else { - return array(); - } - } - - /** - * Implements {@link aCssMinifierFilter::filter()}. - * - * @param array $tokens Array of objects of type aCssToken - * @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array - */ - public function apply(array &$tokens) - { - $r = 0; - $transformations = &$this->transformations; - for ($i = 0, $l = count($tokens); $i < $l; $i++) { - if (get_class($tokens[$i]) === "CssRulesetDeclarationToken") { - $tProperty = $tokens[$i]->Property; - if (isset($transformations[$tProperty])) { - $result = array(); - if (is_callable($transformations[$tProperty])) { - $result = call_user_func_array($transformations[$tProperty], array($tokens[$i])); - if (!is_array($result) && is_object($result)) { - $result = array($result); - } - } else { - $tValue = $tokens[$i]->Value; - $tMediaTypes = $tokens[$i]->MediaTypes; - foreach ($transformations[$tProperty] as $property) { - if ($property !== null) { - $result[] = new CssRulesetDeclarationToken($property, $tValue, $tMediaTypes); - } - } - } - if (count($result) > 0) { - array_splice($tokens, $i + 1, 0, $result); - $i += count($result); - $l += count($result); - } - } - } - } - return $r; - } -} - -/** - * This {@link aCssMinifierFilter minifier filter} will convert @keyframes at-rule block to browser specific counterparts. - * - * @package CssMin/Minifier/Filters - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssConvertLevel3AtKeyframesMinifierFilter extends aCssMinifierFilter -{ - /** - * Implements {@link aCssMinifierFilter::filter()}. - * - * @param array $tokens Array of objects of type aCssToken - * @return integer Count of added, changed or removed tokens; a return value larger than 0 will rebuild the array - */ - public function apply(array &$tokens) - { - $r = 0; - $transformations = array("-moz-keyframes", "-webkit-keyframes"); - for ($i = 0, $l = count($tokens); $i < $l; $i++) { - if (get_class($tokens[$i]) === "CssAtKeyframesStartToken") { - for ($ii = $i; $ii < $l; $ii++) { - if (get_class($tokens[$ii]) === "CssAtKeyframesEndToken") { - break; - } - } - if (get_class($tokens[$ii]) === "CssAtKeyframesEndToken") { - $add = array(); - $source = array(); - for ($iii = $i; $iii <= $ii; $iii++) { - $source[] = clone($tokens[$iii]); - } - foreach ($transformations as $transformation) { - $t = array(); - foreach ($source as $token) { - $t[] = clone($token); - } - $t[0]->AtRuleName = $transformation; - $add = array_merge($add, $t); - } - if (isset($this->configuration["RemoveSource"]) && $this->configuration["RemoveSource"] === true) { - array_splice($tokens, $i, $ii - $i + 1, $add); - } else { - array_splice($tokens, $ii + 1, 0, $add); - } - $l = count($tokens); - $i = $ii + count($add); - $r += count($add); - } - } - } - return $r; - } -} - -/** - * This {@link aCssMinifierPlugin} will convert a color value in hsl notation to hexadecimal notation. - * - * Example: - * - * color: hsl(232,36%,48%); - * - * - * Will get converted to: - * - * color:#4e5aa7; - * - * - * @package CssMin/Minifier/Plugins - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssConvertHslColorsMinifierPlugin extends aCssMinifierPlugin -{ - /** - * Regular expression matching the value. - * - * @var string - */ - private $reMatch = "/^hsl\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*%\s*,\s*([0-9]+)\s*%\s*\)/iS"; - - /** - * Implements {@link aCssMinifierPlugin::minify()}. - * - * @param aCssToken $token Token to process - * @return boolean Return TRUE to break the processing of this token; FALSE to continue - */ - public function apply(aCssToken &$token) - { - if (stripos($token->Value, "hsl") !== false && preg_match($this->reMatch, $token->Value, $m)) { - $token->Value = str_replace($m[0], $this->hsl2hex($m[1], $m[2], $m[3]), $token->Value); - } - return false; - } - - /** - * Convert a HSL value to hexadecimal notation. - * - * Based on: {@link http://www.easyrgb.com/index.php?X=MATH&H=19#text19}. - * - * @param integer $hue Hue - * @param integer $saturation Saturation - * @param integer $lightness Lightnesss - * @return string - */ - private function hsl2hex($hue, $saturation, $lightness) - { - $hue = $hue / 360; - $saturation = $saturation / 100; - $lightness = $lightness / 100; - if ($saturation == 0) { - $red = $lightness * 255; - $green = $lightness * 255; - $blue = $lightness * 255; - } else { - if ($lightness < 0.5) { - $v2 = $lightness * (1 + $saturation); - } else { - $v2 = ($lightness + $saturation) - ($saturation * $lightness); - } - $v1 = 2 * $lightness - $v2; - $red = 255 * self::hue2rgb($v1, $v2, $hue + (1 / 3)); - $green = 255 * self::hue2rgb($v1, $v2, $hue); - $blue = 255 * self::hue2rgb($v1, $v2, $hue - (1 / 3)); - } - return "#" . str_pad(dechex(round($red)), 2, "0", STR_PAD_LEFT) . str_pad(dechex(round($green)), 2, "0", STR_PAD_LEFT) . str_pad(dechex(round($blue)), 2, "0", STR_PAD_LEFT); - } - - /** - * Apply hue to a rgb color value. - * - * @param integer $v1 Value 1 - * @param integer $v2 Value 2 - * @param integer $hue Hue - * @return integer - */ - private function hue2rgb($v1, $v2, $hue) - { - if ($hue < 0) { - $hue += 1; - } - if ($hue > 1) { - $hue -= 1; - } - if ((6 * $hue) < 1) { - return ($v1 + ($v2 - $v1) * 6 * $hue); - } - if ((2 * $hue) < 1) { - return ($v2); - } - if ((3 * $hue) < 2) { - return ($v1 + ($v2 - $v1) * ((2 / 3) - $hue) * 6); - } - return $v1; - } - - /** - * Implements {@link aMinifierPlugin::getTriggerTokens()} - * - * @return array - */ - public function getTriggerTokens() - { - return array - ( - "CssAtFontFaceDeclarationToken", - "CssAtPageDeclarationToken", - "CssRulesetDeclarationToken" - ); - } -} - -/** - * This {@link aCssMinifierPlugin} will convert the font-weight values normal and bold to their numeric notation. - * - * Example: - * - * font-weight: normal; - * font: bold 11px monospace; - * - * - * Will get converted to: - * - * font-weight:400; - * font:700 11px monospace; - * - * - * @package CssMin/Minifier/Pluginsn - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssConvertFontWeightMinifierPlugin extends aCssMinifierPlugin -{ - /** - * Array of included declaration properties this plugin will process; others declaration properties will get - * ignored. - * - * @var array - */ - private $include = array - ( - "font", - "font-weight" - ); - /** - * Regular expression matching the value. - * - * @var string - */ - private $reMatch = null; - /** - * Regular expression replace the value. - * - * @var string - */ - private $reReplace = "\"\${1}\" . \$this->transformation[\"\${2}\"] . \"\${3}\""; - /** - * Transformation table used by the {@link CssConvertFontWeightMinifierPlugin::$reReplace replace regular expression}. - * - * @var array - */ - private $transformation = array - ( - "normal" => "400", - "bold" => "700" - ); - - /** - * Overwrites {@link aCssMinifierPlugin::__construct()}. - * - * The constructor will create the {@link CssConvertFontWeightMinifierPlugin::$reReplace replace regular expression} - * based on the {@link CssConvertFontWeightMinifierPlugin::$transformation transformation table}. - * - * @param CssMinifier $minifier The CssMinifier object of this plugin. - * @return void - */ - public function __construct(CssMinifier $minifier) - { - $this->reMatch = "/(^|\s)+(" . implode("|", array_keys($this->transformation)) . ")(\s|$)+/eiS"; - parent::__construct($minifier); - } - - /** - * Implements {@link aCssMinifierPlugin::minify()}. - * - * @param aCssToken $token Token to process - * @return boolean Return TRUE to break the processing of this token; FALSE to continue - */ - public function apply(aCssToken &$token) - { - if (in_array($token->Property, $this->include) && preg_match($this->reMatch, $token->Value, $m)) { - $token->Value = preg_replace($this->reMatch, $this->reReplace, $token->Value); - } - return false; - } - - /** - * Implements {@link aMinifierPlugin::getTriggerTokens()} - * - * @return array - */ - public function getTriggerTokens() - { - return array - ( - "CssAtFontFaceDeclarationToken", - "CssAtPageDeclarationToken", - "CssRulesetDeclarationToken" - ); - } -} - -/** - * This {@link aCssMinifierPlugin} will compress several unit values to their short notations. Examples: - * - * - * padding: 0.5em; - * border: 0px; - * margin: 0 0 0 0; - * - * - * Will get compressed to: - * - * - * padding:.5px; - * border:0; - * margin:0; - * - * - * -- - * - * @package CssMin/Minifier/Plugins - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssCompressUnitValuesMinifierPlugin extends aCssMinifierPlugin -{ - /** - * Regular expression used for matching and replacing unit values. - * - * @var array - */ - private $re = array - ( - "/(^| |-)0\.([0-9]+?)(0+)?(%|em|ex|px|in|cm|mm|pt|pc)/iS" => "\${1}.\${2}\${4}", - "/(^| )-?(\.?)0(%|em|ex|px|in|cm|mm|pt|pc)/iS" => "\${1}0", - "/(^0\s0\s0\s0)|(^0\s0\s0$)|(^0\s0$)/iS" => "0" - ); - /** - * Regular expression matching the value. - * - * @var string - */ - private $reMatch = "/(^| |-)0\.([0-9]+?)(0+)?(%|em|ex|px|in|cm|mm|pt|pc)|(^| )-?(\.?)0(%|em|ex|px|in|cm|mm|pt|pc)|(^0\s0\s0\s0$)|(^0\s0\s0$)|(^0\s0$)/iS"; - - /** - * Implements {@link aCssMinifierPlugin::minify()}. - * - * @param aCssToken $token Token to process - * @return boolean Return TRUE to break the processing of this token; FALSE to continue - */ - public function apply(aCssToken &$token) - { - if (preg_match($this->reMatch, $token->Value)) { - foreach ($this->re as $reMatch => $reReplace) { - $token->Value = preg_replace($reMatch, $reReplace, $token->Value); - } - } - return false; - } - - /** - * Implements {@link aMinifierPlugin::getTriggerTokens()} - * - * @return array - */ - public function getTriggerTokens() - { - return array - ( - "CssAtFontFaceDeclarationToken", - "CssAtPageDeclarationToken", - "CssRulesetDeclarationToken" - ); - } -} - -/** - * This {@link aCssMinifierPlugin} compress the content of expresssion() declaration values. - * - * For compression of expressions {@link https://github.com/rgrove/jsmin-php/ JSMin} will get used. JSMin have to be - * already included or loadable via {@link http://goo.gl/JrW54 PHP autoloading}. - * - * @package CssMin/Minifier/Plugins - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssCompressExpressionValuesMinifierPlugin extends aCssMinifierPlugin -{ - /** - * Implements {@link aCssMinifierPlugin::minify()}. - * - * @param aCssToken $token Token to process - * @return boolean Return TRUE to break the processing of this token; FALSE to continue - */ - public function apply(aCssToken &$token) - { - if (class_exists("JSMin") && stripos($token->Value, "expression(") !== false) { - $value = $token->Value; - $value = substr($token->Value, stripos($token->Value, "expression(") + 10); - $value = trim(JSMin::minify($value)); - $token->Value = "expression(" . $value . ")"; - } - return false; - } - - /** - * Implements {@link aMinifierPlugin::getTriggerTokens()} - * - * @return array - */ - public function getTriggerTokens() - { - return array - ( - "CssAtFontFaceDeclarationToken", - "CssAtPageDeclarationToken", - "CssRulesetDeclarationToken" - ); - } -} - -/** - * This {@link aCssMinifierPlugin} will convert hexadecimal color value with 6 chars to their 3 char hexadecimal - * notation (if possible). - * - * Example: - * - * color: #aabbcc; - * - * - * Will get converted to: - * - * color:#abc; - * - * - * @package CssMin/Minifier/Plugins - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssCompressColorValuesMinifierPlugin extends aCssMinifierPlugin -{ - /** - * Regular expression matching 6 char hexadecimal color values. - * - * @var string - */ - private $reMatch = "/\#([0-9a-f]{6})/iS"; - - /** - * Implements {@link aCssMinifierPlugin::minify()}. - * - * @param aCssToken $token Token to process - * @return boolean Return TRUE to break the processing of this token; FALSE to continue - */ - public function apply(aCssToken &$token) - { - if (strpos($token->Value, "#") !== false && preg_match($this->reMatch, $token->Value, $m)) { - $value = strtolower($m[1]); - if ($value[0] == $value[1] && $value[2] == $value[3] && $value[4] == $value[5]) { - $token->Value = str_replace($m[0], "#" . $value[0] . $value[2] . $value[4], $token->Value); - } - } - return false; - } - - /** - * Implements {@link aMinifierPlugin::getTriggerTokens()} - * - * @return array - */ - public function getTriggerTokens() - { - return array - ( - "CssAtFontFaceDeclarationToken", - "CssAtPageDeclarationToken", - "CssRulesetDeclarationToken" - ); - } -} - -/** - * This {@link aCssToken CSS token} represents a CSS comment. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssCommentToken extends aCssToken -{ - /** - * Comment as Text. - * - * @var string - */ - public $Comment = ""; - - /** - * Set the properties of a comment token. - * - * @param string $comment Comment including comment delimiters - * @return void - */ - public function __construct($comment) - { - $this->Comment = $comment; - } - - /** - * Implements {@link aCssToken::__toString()}. - * - * @return string - */ - public function __toString() - { - return $this->Comment; - } -} - -/** - * {@link aCssParserPlugin Parser plugin} for parsing comments. - * - * Adds a {@link CssCommentToken} to the parser if a comment was found. - * - * @package CssMin/Parser/Plugins - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssCommentParserPlugin extends aCssParserPlugin -{ - /** - * Stored buffer for restore. - * - * @var string - */ - private $restoreBuffer = ""; - - /** - * Implements {@link aCssParserPlugin::getTriggerChars()}. - * - * @return array - */ - public function getTriggerChars() - { - return array("*", "/"); - } - - /** - * Implements {@link aCssParserPlugin::getTriggerStates()}. - * - * @return array - */ - public function getTriggerStates() - { - return false; - } - - /** - * Implements {@link aCssParserPlugin::parse()}. - * - * @param integer $index Current index - * @param string $char Current char - * @param string $previousChar Previous char - * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing - */ - public function parse($index, $char, $previousChar, $state) - { - if ($char === "*" && $previousChar === "/" && $state !== "T_COMMENT") { - $this->parser->pushState("T_COMMENT"); - $this->parser->setExclusive(__CLASS__); - $this->restoreBuffer = substr($this->parser->getAndClearBuffer(), 0, -2); - } elseif ($char === "/" && $previousChar === "*" && $state === "T_COMMENT") { - $this->parser->popState(); - $this->parser->unsetExclusive(); - $this->parser->appendToken(new CssCommentToken("/*" . $this->parser->getAndClearBuffer())); - $this->parser->setBuffer($this->restoreBuffer); - } else { - return false; - } - return true; - } -} - -/** - * This {@link aCssToken CSS token} represents the start of a @variables at-rule block. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssAtVariablesStartToken extends aCssAtBlockStartToken -{ - /** - * Media types of the @variables at-rule block. - * - * @var array - */ - public $MediaTypes = array(); - - /** - * Set the properties of a @variables at-rule token. - * - * @param array $mediaTypes Media types - * @return void - */ - public function __construct($mediaTypes = null) - { - $this->MediaTypes = $mediaTypes ? $mediaTypes : array("all"); - } - - /** - * Implements {@link aCssToken::__toString()}. - * - * @return string - */ - public function __toString() - { - return ""; - } -} - -/** - * {@link aCssParserPlugin Parser plugin} for parsing @variables at-rule block with including declarations. - * - * Found @variables at-rule blocks will add a {@link CssAtVariablesStartToken} and {@link CssAtVariablesEndToken} to the - * parser; including declarations as {@link CssAtVariablesDeclarationToken}. - * - * @package CssMin/Parser/Plugins - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssAtVariablesParserPlugin extends aCssParserPlugin -{ - /** - * Implements {@link aCssParserPlugin::getTriggerChars()}. - * - * @return array - */ - public function getTriggerChars() - { - return array("@", "{", "}", ":", ";"); - } - - /** - * Implements {@link aCssParserPlugin::getTriggerStates()}. - * - * @return array - */ - public function getTriggerStates() - { - return array("T_DOCUMENT", "T_AT_VARIABLES::PREPARE", "T_AT_VARIABLES", "T_AT_VARIABLES_DECLARATION"); - } - - /** - * Implements {@link aCssParserPlugin::parse()}. - * - * @param integer $index Current index - * @param string $char Current char - * @param string $previousChar Previous char - * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing - */ - public function parse($index, $char, $previousChar, $state) - { - // Start of @variables at-rule block - if ($char === "@" && $state === "T_DOCUMENT" && strtolower(substr($this->parser->getSource(), $index, 10)) === "@variables") { - $this->parser->pushState("T_AT_VARIABLES::PREPARE"); - $this->parser->clearBuffer(); - return $index + 10; - } // Start of @variables declarations - elseif ($char === "{" && $state === "T_AT_VARIABLES::PREPARE") { - $this->parser->setState("T_AT_VARIABLES"); - $mediaTypes = array_filter(array_map("trim", explode(",", $this->parser->getAndClearBuffer("{")))); - $this->parser->appendToken(new CssAtVariablesStartToken($mediaTypes)); - } - // Start of @variables declaration - if ($char === ":" && $state === "T_AT_VARIABLES") { - $this->buffer = $this->parser->getAndClearBuffer(":"); - $this->parser->pushState("T_AT_VARIABLES_DECLARATION"); - } // Unterminated @variables declaration - elseif ($char === ":" && $state === "T_AT_VARIABLES_DECLARATION") { - // Ignore Internet Explorer filter declarations - if ($this->buffer === "filter") { - return false; - } - CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Unterminated @variables declaration", $this->buffer . ":" . $this->parser->getBuffer() . "_")); - } // End of @variables declaration - elseif (($char === ";" || $char === "}") && $state === "T_AT_VARIABLES_DECLARATION") { - $value = $this->parser->getAndClearBuffer(";}"); - if (strtolower(substr($value, -10, 10)) === "!important") { - $value = trim(substr($value, 0, -10)); - $isImportant = true; - } else { - $isImportant = false; - } - $this->parser->popState(); - $this->parser->appendToken(new CssAtVariablesDeclarationToken($this->buffer, $value, $isImportant)); - $this->buffer = ""; - } // End of @variables at-rule block - elseif ($char === "}" && $state === "T_AT_VARIABLES") { - $this->parser->popState(); - $this->parser->clearBuffer(); - $this->parser->appendToken(new CssAtVariablesEndToken()); - } else { - return false; - } - return true; - } -} - -/** - * This {@link aCssToken CSS token} represents the end of a @variables at-rule block. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssAtVariablesEndToken extends aCssAtBlockEndToken -{ - /** - * Implements {@link aCssToken::__toString()}. - * - * @return string - */ - public function __toString() - { - return ""; - } -} - -/** - * This {@link aCssToken CSS token} represents a declaration of a @variables at-rule block. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssAtVariablesDeclarationToken extends aCssDeclarationToken -{ - /** - * Implements {@link aCssToken::__toString()}. - * - * @return string - */ - public function __toString() - { - return ""; - } -} - -/** - * This {@link aCssToken CSS token} represents the start of a @page at-rule block. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssAtPageStartToken extends aCssAtBlockStartToken -{ - /** - * Selector. - * - * @var string - */ - public $Selector = ""; - - /** - * Sets the properties of the @page at-rule. - * - * @param string $selector Selector - * @return void - */ - public function __construct($selector = "") - { - $this->Selector = $selector; - } - - /** - * Implements {@link aCssToken::__toString()}. - * - * @return string - */ - public function __toString() - { - return "@page" . ($this->Selector ? " " . $this->Selector : "") . "{"; - } -} - -/** - * {@link aCssParserPlugin Parser plugin} for parsing @page at-rule block with including declarations. - * - * Found @page at-rule blocks will add a {@link CssAtPageStartToken} and {@link CssAtPageEndToken} to the - * parser; including declarations as {@link CssAtPageDeclarationToken}. - * - * @package CssMin/Parser/Plugins - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssAtPageParserPlugin extends aCssParserPlugin -{ - /** - * Implements {@link aCssParserPlugin::getTriggerChars()}. - * - * @return array - */ - public function getTriggerChars() - { - return array("@", "{", "}", ":", ";"); - } - - /** - * Implements {@link aCssParserPlugin::getTriggerStates()}. - * - * @return array - */ - public function getTriggerStates() - { - return array("T_DOCUMENT", "T_AT_PAGE::SELECTOR", "T_AT_PAGE", "T_AT_PAGE_DECLARATION"); - } - - /** - * Implements {@link aCssParserPlugin::parse()}. - * - * @param integer $index Current index - * @param string $char Current char - * @param string $previousChar Previous char - * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing - */ - public function parse($index, $char, $previousChar, $state) - { - // Start of @page at-rule block - if ($char === "@" && $state === "T_DOCUMENT" && strtolower(substr($this->parser->getSource(), $index, 5)) === "@page") { - $this->parser->pushState("T_AT_PAGE::SELECTOR"); - $this->parser->clearBuffer(); - return $index + 5; - } // Start of @page declarations - elseif ($char === "{" && $state === "T_AT_PAGE::SELECTOR") { - $selector = $this->parser->getAndClearBuffer("{"); - $this->parser->setState("T_AT_PAGE"); - $this->parser->clearBuffer(); - $this->parser->appendToken(new CssAtPageStartToken($selector)); - } // Start of @page declaration - elseif ($char === ":" && $state === "T_AT_PAGE") { - $this->parser->pushState("T_AT_PAGE_DECLARATION"); - $this->buffer = $this->parser->getAndClearBuffer(":", true); - } // Unterminated @font-face declaration - elseif ($char === ":" && $state === "T_AT_PAGE_DECLARATION") { - // Ignore Internet Explorer filter declarations - if ($this->buffer === "filter") { - return false; - } - CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Unterminated @page declaration", $this->buffer . ":" . $this->parser->getBuffer() . "_")); - } // End of @page declaration - elseif (($char === ";" || $char === "}") && $state == "T_AT_PAGE_DECLARATION") { - $value = $this->parser->getAndClearBuffer(";}"); - if (strtolower(substr($value, -10, 10)) == "!important") { - $value = trim(substr($value, 0, -10)); - $isImportant = true; - } else { - $isImportant = false; - } - $this->parser->popState(); - $this->parser->appendToken(new CssAtPageDeclarationToken($this->buffer, $value, $isImportant)); - // -- - if ($char === "}") { - $this->parser->popState(); - $this->parser->appendToken(new CssAtPageEndToken()); - } - $this->buffer = ""; - } // End of @page at-rule block - elseif ($char === "}" && $state === "T_AT_PAGE") { - $this->parser->popState(); - $this->parser->clearBuffer(); - $this->parser->appendToken(new CssAtPageEndToken()); - } else { - return false; - } - return true; - } -} - -/** - * This {@link aCssToken CSS token} represents the end of a @page at-rule block. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssAtPageEndToken extends aCssAtBlockEndToken -{ - -} - -/** - * This {@link aCssToken CSS token} represents a declaration of a @page at-rule block. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssAtPageDeclarationToken extends aCssDeclarationToken -{ - -} - -/** - * This {@link aCssToken CSS token} represents the start of a @media at-rule block. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssAtMediaStartToken extends aCssAtBlockStartToken -{ - /** - * Sets the properties of the @media at-rule. - * - * @param array $mediaTypes Media types - * @return void - */ - public function __construct(array $mediaTypes = array()) - { - $this->MediaTypes = $mediaTypes; - } - - /** - * Implements {@link aCssToken::__toString()}. - * - * @return string - */ - public function __toString() - { - return "@media " . implode(",", $this->MediaTypes) . "{"; - } -} - -/** - * {@link aCssParserPlugin Parser plugin} for parsing @media at-rule block. - * - * Found @media at-rule blocks will add a {@link CssAtMediaStartToken} and {@link CssAtMediaEndToken} to the parser. - * This plugin will also set the the current media types using {@link CssParser::setMediaTypes()} and - * {@link CssParser::unsetMediaTypes()}. - * - * @package CssMin/Parser/Plugins - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssAtMediaParserPlugin extends aCssParserPlugin -{ - /** - * Implements {@link aCssParserPlugin::getTriggerChars()}. - * - * @return array - */ - public function getTriggerChars() - { - return array("@", "{", "}"); - } - - /** - * Implements {@link aCssParserPlugin::getTriggerStates()}. - * - * @return array - */ - public function getTriggerStates() - { - return array("T_DOCUMENT", "T_AT_MEDIA::PREPARE", "T_AT_MEDIA"); - } - - /** - * Implements {@link aCssParserPlugin::parse()}. - * - * @param integer $index Current index - * @param string $char Current char - * @param string $previousChar Previous char - * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing - */ - public function parse($index, $char, $previousChar, $state) - { - if ($char === "@" && $state === "T_DOCUMENT" && strtolower(substr($this->parser->getSource(), $index, 6)) === "@media") { - $this->parser->pushState("T_AT_MEDIA::PREPARE"); - $this->parser->clearBuffer(); - return $index + 6; - } elseif ($char === "{" && $state === "T_AT_MEDIA::PREPARE") { - $mediaTypes = array_filter(array_map("trim", explode(",", $this->parser->getAndClearBuffer("{")))); - $this->parser->setMediaTypes($mediaTypes); - $this->parser->setState("T_AT_MEDIA"); - $this->parser->appendToken(new CssAtMediaStartToken($mediaTypes)); - } elseif ($char === "}" && $state === "T_AT_MEDIA") { - $this->parser->appendToken(new CssAtMediaEndToken()); - $this->parser->clearBuffer(); - $this->parser->unsetMediaTypes(); - $this->parser->popState(); - } else { - return false; - } - return true; - } -} - -/** - * This {@link aCssToken CSS token} represents the end of a @media at-rule block. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssAtMediaEndToken extends aCssAtBlockEndToken -{ - -} - -/** - * This {@link aCssToken CSS token} represents the start of a @keyframes at-rule block. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssAtKeyframesStartToken extends aCssAtBlockStartToken -{ - /** - * Name of the at-rule. - * - * @var string - */ - public $AtRuleName = "keyframes"; - /** - * Name - * - * @var string - */ - public $Name = ""; - - /** - * Sets the properties of the @page at-rule. - * - * @param string $selector Selector - * @return void - */ - public function __construct($name, $atRuleName = null) - { - $this->Name = $name; - if (!is_null($atRuleName)) { - $this->AtRuleName = $atRuleName; - } - } - - /** - * Implements {@link aCssToken::__toString()}. - * - * @return string - */ - public function __toString() - { - return "@" . $this->AtRuleName . " \"" . $this->Name . "\"{"; - } -} - -/** - * This {@link aCssToken CSS token} represents the start of a ruleset of a @keyframes at-rule block. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssAtKeyframesRulesetStartToken extends aCssRulesetStartToken -{ - /** - * Array of selectors. - * - * @var array - */ - public $Selectors = array(); - - /** - * Set the properties of a ruleset token. - * - * @param array $selectors Selectors of the ruleset - * @return void - */ - public function __construct(array $selectors = array()) - { - $this->Selectors = $selectors; - } - - /** - * Implements {@link aCssToken::__toString()}. - * - * @return string - */ - public function __toString() - { - return implode(",", $this->Selectors) . "{"; - } -} - -/** - * This {@link aCssToken CSS token} represents the end of a ruleset of a @keyframes at-rule block. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssAtKeyframesRulesetEndToken extends aCssRulesetEndToken -{ - -} - -/** - * This {@link aCssToken CSS token} represents a ruleset declaration of a @keyframes at-rule block. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssAtKeyframesRulesetDeclarationToken extends aCssDeclarationToken -{ - -} - -/** - * {@link aCssParserPlugin Parser plugin} for parsing @keyframes at-rule blocks, rulesets and declarations. - * - * @package CssMin/Parser/Plugins - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssAtKeyframesParserPlugin extends aCssParserPlugin -{ - /** - * @var string Keyword - */ - private $atRuleName = ""; - /** - * Selectors. - * - * @var array - */ - private $selectors = array(); - - /** - * Implements {@link aCssParserPlugin::getTriggerChars()}. - * - * @return array - */ - public function getTriggerChars() - { - return array("@", "{", "}", ":", ",", ";"); - } - - /** - * Implements {@link aCssParserPlugin::getTriggerStates()}. - * - * @return array - */ - public function getTriggerStates() - { - return array("T_DOCUMENT", "T_AT_KEYFRAMES::NAME", "T_AT_KEYFRAMES", "T_AT_KEYFRAMES_RULESETS", "T_AT_KEYFRAMES_RULESET", "T_AT_KEYFRAMES_RULESET_DECLARATION"); - } - - /** - * Implements {@link aCssParserPlugin::parse()}. - * - * @param integer $index Current index - * @param string $char Current char - * @param string $previousChar Previous char - * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing - */ - public function parse($index, $char, $previousChar, $state) - { - // Start of @keyframes at-rule block - if ($char === "@" && $state === "T_DOCUMENT" && strtolower(substr($this->parser->getSource(), $index, 10)) === "@keyframes") { - $this->atRuleName = "keyframes"; - $this->parser->pushState("T_AT_KEYFRAMES::NAME"); - $this->parser->clearBuffer(); - return $index + 10; - } // Start of @keyframes at-rule block (@-moz-keyframes) - elseif ($char === "@" && $state === "T_DOCUMENT" && strtolower(substr($this->parser->getSource(), $index, 15)) === "@-moz-keyframes") { - $this->atRuleName = "-moz-keyframes"; - $this->parser->pushState("T_AT_KEYFRAMES::NAME"); - $this->parser->clearBuffer(); - return $index + 15; - } // Start of @keyframes at-rule block (@-webkit-keyframes) - elseif ($char === "@" && $state === "T_DOCUMENT" && strtolower(substr($this->parser->getSource(), $index, 18)) === "@-webkit-keyframes") { - $this->atRuleName = "-webkit-keyframes"; - $this->parser->pushState("T_AT_KEYFRAMES::NAME"); - $this->parser->clearBuffer(); - return $index + 18; - } // Start of @keyframes rulesets - elseif ($char === "{" && $state === "T_AT_KEYFRAMES::NAME") { - $name = $this->parser->getAndClearBuffer("{\"'"); - $this->parser->setState("T_AT_KEYFRAMES_RULESETS"); - $this->parser->clearBuffer(); - $this->parser->appendToken(new CssAtKeyframesStartToken($name, $this->atRuleName)); - } - // Start of @keyframe ruleset and selectors - if ($char === "," && $state === "T_AT_KEYFRAMES_RULESETS") { - $this->selectors[] = $this->parser->getAndClearBuffer(",{"); - } // Start of a @keyframes ruleset - elseif ($char === "{" && $state === "T_AT_KEYFRAMES_RULESETS") { - if ($this->parser->getBuffer() !== "") { - $this->selectors[] = $this->parser->getAndClearBuffer(",{"); - $this->parser->pushState("T_AT_KEYFRAMES_RULESET"); - $this->parser->appendToken(new CssAtKeyframesRulesetStartToken($this->selectors)); - $this->selectors = array(); - } - } // Start of @keyframes ruleset declaration - elseif ($char === ":" && $state === "T_AT_KEYFRAMES_RULESET") { - $this->parser->pushState("T_AT_KEYFRAMES_RULESET_DECLARATION"); - $this->buffer = $this->parser->getAndClearBuffer(":;", true); - } // Unterminated @keyframes ruleset declaration - elseif ($char === ":" && $state === "T_AT_KEYFRAMES_RULESET_DECLARATION") { - // Ignore Internet Explorer filter declarations - if ($this->buffer === "filter") { - return false; - } - CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Unterminated @keyframes ruleset declaration", $this->buffer . ":" . $this->parser->getBuffer() . "_")); - } // End of declaration - elseif (($char === ";" || $char === "}") && $state === "T_AT_KEYFRAMES_RULESET_DECLARATION") { - $value = $this->parser->getAndClearBuffer(";}"); - if (strtolower(substr($value, -10, 10)) === "!important") { - $value = trim(substr($value, 0, -10)); - $isImportant = true; - } else { - $isImportant = false; - } - $this->parser->popState(); - $this->parser->appendToken(new CssAtKeyframesRulesetDeclarationToken($this->buffer, $value, $isImportant)); - // Declaration ends with a right curly brace; so we have to end the ruleset - if ($char === "}") { - $this->parser->appendToken(new CssAtKeyframesRulesetEndToken()); - $this->parser->popState(); - } - $this->buffer = ""; - } // End of @keyframes ruleset - elseif ($char === "}" && $state === "T_AT_KEYFRAMES_RULESET") { - $this->parser->clearBuffer(); - - $this->parser->popState(); - $this->parser->appendToken(new CssAtKeyframesRulesetEndToken()); - } // End of @keyframes rulesets - elseif ($char === "}" && $state === "T_AT_KEYFRAMES_RULESETS") { - $this->parser->clearBuffer(); - $this->parser->popState(); - $this->parser->appendToken(new CssAtKeyframesEndToken()); - } else { - return false; - } - return true; - } -} - -/** - * This {@link aCssToken CSS token} represents the end of a @keyframes at-rule block. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssAtKeyframesEndToken extends aCssAtBlockEndToken -{ - -} - -/** - * This {@link aCssToken CSS token} represents a @import at-rule. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1.b1 (2001-02-22) - */ -class CssAtImportToken extends aCssToken -{ - /** - * Import path of the @import at-rule. - * - * @var string - */ - public $Import = ""; - /** - * Media types of the @import at-rule. - * - * @var array - */ - public $MediaTypes = array(); - - /** - * Set the properties of a @import at-rule token. - * - * @param string $import Import path - * @param array $mediaTypes Media types - * @return void - */ - public function __construct($import, $mediaTypes) - { - $this->Import = $import; - $this->MediaTypes = $mediaTypes ? $mediaTypes : array(); - } - - /** - * Implements {@link aCssToken::__toString()}. - * - * @return string - */ - public function __toString() - { - return "@import \"" . $this->Import . "\"" . (count($this->MediaTypes) > 0 ? " " . implode(",", $this->MediaTypes) : "") . ";"; - } -} - -/** - * {@link aCssParserPlugin Parser plugin} for parsing @import at-rule. - * - * If a @import at-rule was found this plugin will add a {@link CssAtImportToken} to the parser. - * - * @package CssMin/Parser/Plugins - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssAtImportParserPlugin extends aCssParserPlugin -{ - /** - * Implements {@link aCssParserPlugin::getTriggerChars()}. - * - * @return array - */ - public function getTriggerChars() - { - return array("@", ";", ",", "\n"); - } - - /** - * Implements {@link aCssParserPlugin::getTriggerStates()}. - * - * @return array - */ - public function getTriggerStates() - { - return array("T_DOCUMENT", "T_AT_IMPORT"); - } - - /** - * Implements {@link aCssParserPlugin::parse()}. - * - * @param integer $index Current index - * @param string $char Current char - * @param string $previousChar Previous char - * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing - */ - public function parse($index, $char, $previousChar, $state) - { - if ($char === "@" && $state === "T_DOCUMENT" && strtolower(substr($this->parser->getSource(), $index, 7)) === "@import") { - $this->parser->pushState("T_AT_IMPORT"); - $this->parser->clearBuffer(); - return $index + 7; - } elseif (($char === ";" || $char === "\n") && $state === "T_AT_IMPORT") { - $this->buffer = $this->parser->getAndClearBuffer(";"); - $pos = false; - foreach (array(")", "\"", "'") as $needle) { - if (($pos = strrpos($this->buffer, $needle)) !== false) { - break; - } - } - $import = substr($this->buffer, 0, $pos + 1); - if (stripos($import, "url(") === 0) { - $import = substr($import, 4, -1); - } - $import = trim($import, " \t\n\r\0\x0B'\""); - $mediaTypes = array_filter(array_map("trim", explode(",", trim(substr($this->buffer, $pos + 1), " \t\n\r\0\x0B{")))); - if ($pos) { - $this->parser->appendToken(new CssAtImportToken($import, $mediaTypes)); - } else { - CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Invalid @import at-rule syntax", $this->parser->buffer)); - } - $this->parser->popState(); - } else { - return false; - } - return true; - } -} - -/** - * This {@link aCssToken CSS token} represents the start of a @font-face at-rule block. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssAtFontFaceStartToken extends aCssAtBlockStartToken -{ - /** - * Implements {@link aCssToken::__toString()}. - * - * @return string - */ - public function __toString() - { - return "@font-face{"; - } -} - -/** - * {@link aCssParserPlugin Parser plugin} for parsing @font-face at-rule block with including declarations. - * - * Found @font-face at-rule blocks will add a {@link CssAtFontFaceStartToken} and {@link CssAtFontFaceEndToken} to the - * parser; including declarations as {@link CssAtFontFaceDeclarationToken}. - * - * @package CssMin/Parser/Plugins - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssAtFontFaceParserPlugin extends aCssParserPlugin -{ - /** - * Implements {@link aCssParserPlugin::getTriggerChars()}. - * - * @return array - */ - public function getTriggerChars() - { - return array("@", "{", "}", ":", ";"); - } - - /** - * Implements {@link aCssParserPlugin::getTriggerStates()}. - * - * @return array - */ - public function getTriggerStates() - { - return array("T_DOCUMENT", "T_AT_FONT_FACE::PREPARE", "T_AT_FONT_FACE", "T_AT_FONT_FACE_DECLARATION"); - } - - /** - * Implements {@link aCssParserPlugin::parse()}. - * - * @param integer $index Current index - * @param string $char Current char - * @param string $previousChar Previous char - * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing - */ - public function parse($index, $char, $previousChar, $state) - { - // Start of @font-face at-rule block - if ($char === "@" && $state === "T_DOCUMENT" && strtolower(substr($this->parser->getSource(), $index, 10)) === "@font-face") { - $this->parser->pushState("T_AT_FONT_FACE::PREPARE"); - $this->parser->clearBuffer(); - return $index + 10; - } // Start of @font-face declarations - elseif ($char === "{" && $state === "T_AT_FONT_FACE::PREPARE") { - $this->parser->setState("T_AT_FONT_FACE"); - $this->parser->clearBuffer(); - $this->parser->appendToken(new CssAtFontFaceStartToken()); - } // Start of @font-face declaration - elseif ($char === ":" && $state === "T_AT_FONT_FACE") { - $this->parser->pushState("T_AT_FONT_FACE_DECLARATION"); - $this->buffer = $this->parser->getAndClearBuffer(":", true); - } // Unterminated @font-face declaration - elseif ($char === ":" && $state === "T_AT_FONT_FACE_DECLARATION") { - // Ignore Internet Explorer filter declarations - if ($this->buffer === "filter") { - return false; - } - CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Unterminated @font-face declaration", $this->buffer . ":" . $this->parser->getBuffer() . "_")); - } // End of @font-face declaration - elseif (($char === ";" || $char === "}") && $state === "T_AT_FONT_FACE_DECLARATION") { - $value = $this->parser->getAndClearBuffer(";}"); - if (strtolower(substr($value, -10, 10)) === "!important") { - $value = trim(substr($value, 0, -10)); - $isImportant = true; - } else { - $isImportant = false; - } - $this->parser->popState(); - $this->parser->appendToken(new CssAtFontFaceDeclarationToken($this->buffer, $value, $isImportant)); - $this->buffer = ""; - // -- - if ($char === "}") { - $this->parser->appendToken(new CssAtFontFaceEndToken()); - $this->parser->popState(); - } - } // End of @font-face at-rule block - elseif ($char === "}" && $state === "T_AT_FONT_FACE") { - $this->parser->appendToken(new CssAtFontFaceEndToken()); - $this->parser->clearBuffer(); - $this->parser->popState(); - } else { - return false; - } - return true; - } -} - -/** - * This {@link aCssToken CSS token} represents the end of a @font-face at-rule block. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssAtFontFaceEndToken extends aCssAtBlockEndToken -{ - -} - -/** - * This {@link aCssToken CSS token} represents a declaration of a @font-face at-rule block. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssAtFontFaceDeclarationToken extends aCssDeclarationToken -{ - -} - -/** - * This {@link aCssToken CSS token} represents a @charset at-rule. - * - * @package CssMin/Tokens - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssAtCharsetToken extends aCssToken -{ - /** - * Charset of the @charset at-rule. - * - * @var string - */ - public $Charset = ""; - - /** - * Set the properties of @charset at-rule token. - * - * @param string $charset Charset of the @charset at-rule token - * @return void - */ - public function __construct($charset) - { - $this->Charset = $charset; - } - - /** - * Implements {@link aCssToken::__toString()}. - * - * @return string - */ - public function __toString() - { - return "@charset " . $this->Charset . ";"; - } -} - -/** - * {@link aCssParserPlugin Parser plugin} for parsing @charset at-rule. - * - * If a @charset at-rule was found this plugin will add a {@link CssAtCharsetToken} to the parser. - * - * @package CssMin/Parser/Plugins - * @link http://code.google.com/p/cssmin/ - * @author Joe Scylla - * @copyright 2008 - 2011 Joe Scylla - * @license http://opensource.org/licenses/mit-license.php MIT License - * @version 3.0.1 - */ -class CssAtCharsetParserPlugin extends aCssParserPlugin -{ - /** - * Implements {@link aCssParserPlugin::getTriggerChars()}. - * - * @return array - */ - public function getTriggerChars() - { - return array("@", ";", "\n"); - } - - /** - * Implements {@link aCssParserPlugin::getTriggerStates()}. - * - * @return array - */ - public function getTriggerStates() - { - return array("T_DOCUMENT", "T_AT_CHARSET"); - } - - /** - * Implements {@link aCssParserPlugin::parse()}. - * - * @param integer $index Current index - * @param string $char Current char - * @param string $previousChar Previous char - * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing - */ - public function parse($index, $char, $previousChar, $state) - { - if ($char === "@" && $state === "T_DOCUMENT" && strtolower(substr($this->parser->getSource(), $index, 8)) === "@charset") { - $this->parser->pushState("T_AT_CHARSET"); - $this->parser->clearBuffer(); - return $index + 8; - } elseif (($char === ";" || $char === "\n") && $state === "T_AT_CHARSET") { - $charset = $this->parser->getAndClearBuffer(";"); - $this->parser->popState(); - $this->parser->appendToken(new CssAtCharsetToken($charset)); - } else { - return false; - } - return true; - } -} - -?> \ No newline at end of file diff --git a/inc/Exts/phpseclib/Crypt/Hash.php b/inc/Exts/phpseclib/Crypt/Hash.php deleted file mode 100644 index 41afd6d9..00000000 --- a/inc/Exts/phpseclib/Crypt/Hash.php +++ /dev/null @@ -1,206 +0,0 @@ - - * setKey('abcdefg'); - * - * echo base64_encode($hash->hash('abcdefg')); - * ?> - * - * - * @category Crypt - * @package Hash - * @author Jim Wigginton - * @copyright 2015 Jim Wigginton - * @author Andreas Fischer - * @copyright 2015 Andreas Fischer - * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @link http://phpseclib.sourceforge.net - */ - -namespace phpseclib\Crypt; - -use phpseclib\Exception\UnsupportedAlgorithmException; - -/** - * @package Hash - * @author Jim Wigginton - * @author Andreas Fischer - * @access public - */ -class Hash -{ - /** - * Hash Parameter - * - * @see \phpseclib\Crypt\Hash::setHash() - * @var int - * @access private - */ - var $hashParam; - - /** - * Byte-length of hash output (Internal HMAC) - * - * @see \phpseclib\Crypt\Hash::setHash() - * @var int - * @access private - */ - var $length; - - /** - * Hash Algorithm - * - * @see \phpseclib\Crypt\Hash::setHash() - * @var string - * @access private - */ - var $hash; - - /** - * Key - * - * @see \phpseclib\Crypt\Hash::setKey() - * @var string - * @access private - */ - var $key = false; - - /** - * Default Constructor. - * - * @param string $hash - * @access public - */ - function __construct($hash = 'sha256') - { - $this->setHash($hash); - } - - /** - * Sets the key for HMACs - * - * Keys can be of any length. - * - * @access public - * @param string $key - */ - function setKey($key = false) - { - $this->key = $key; - } - - /** - * Gets the hash function. - * - * As set by the constructor or by the setHash() method. - * - * @access public - * @return string - */ - function getHash() - { - return $this->hashParam; - } - - /** - * Sets the hash function. - * - * @access public - * @param string $hash - */ - function setHash($hash) - { - $this->hashParam = $hash = strtolower($hash); - switch ($hash) { - case 'md5-96': - case 'sha1-96': - case 'sha256-96': - case 'sha512-96': - $hash = substr($hash, 0, -3); - $this->length = 12; // 96 / 8 = 12 - break; - case 'md2': - case 'md5': - $this->length = 16; - break; - case 'sha1': - $this->length = 20; - break; - case 'sha256': - $this->length = 32; - break; - case 'sha384': - $this->length = 48; - break; - case 'sha512': - $this->length = 64; - break; - default: - // see if the hash isn't "officially" supported see if it can - // be "unofficially" supported and calculate the length - // accordingly. - if (in_array($hash, hash_algos())) { - $this->length = strlen(hash($hash, '', true)); - break; - } - // if the hash algorithm doens't exist maybe it's a truncated - // hash, e.g. whirlpool-12 or some such. - if (preg_match('#(-\d+)$#', $hash, $matches)) { - $hash = substr($hash, 0, -strlen($matches[1])); - if (in_array($hash, hash_algos())) { - $this->length = abs($matches[1]) >> 3; - break; - } - } - throw new UnsupportedAlgorithmException( - "$hash is not a supported algorithm" - ); - } - - $this->hash = $hash; - } - - /** - * Compute the HMAC. - * - * @access public - * @param string $text - * @return string - */ - function hash($text) - { - $output = !empty($this->key) || is_string($this->key) ? - hash_hmac($this->hash, $text, $this->key, true) : - hash($this->hash, $text, true); - - return strlen($output) > $this->length - ? substr($output, 0, $this->length) - : $output; - } - - /** - * Returns the hash length (in bytes) - * - * @access public - * @return int - */ - function getLength() - { - return $this->length; - } -} diff --git a/inc/Exts/phpseclib/Exception/BadConfigurationException.php b/inc/Exts/phpseclib/Exception/BadConfigurationException.php deleted file mode 100644 index 096148a0..00000000 --- a/inc/Exts/phpseclib/Exception/BadConfigurationException.php +++ /dev/null @@ -1,26 +0,0 @@ - - * @copyright 2015 Jim Wigginton - * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @link http://phpseclib.sourceforge.net - */ - -namespace phpseclib\Exception; - -/** - * BadConfigurationException - * - * @package BadConfigurationException - * @author Jim Wigginton - */ -class BadConfigurationException extends \RuntimeException -{ -} diff --git a/inc/Exts/phpseclib/Exception/FileNotFoundException.php b/inc/Exts/phpseclib/Exception/FileNotFoundException.php deleted file mode 100644 index 984edfcc..00000000 --- a/inc/Exts/phpseclib/Exception/FileNotFoundException.php +++ /dev/null @@ -1,26 +0,0 @@ - - * @copyright 2015 Jim Wigginton - * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @link http://phpseclib.sourceforge.net - */ - -namespace phpseclib\Exception; - -/** - * FileNotFoundException - * - * @package FileNotFoundException - * @author Jim Wigginton - */ -class FileNotFoundException extends \RuntimeException -{ -} diff --git a/inc/Exts/phpseclib/Exception/NoSupportedAlgorithmsException.php b/inc/Exts/phpseclib/Exception/NoSupportedAlgorithmsException.php deleted file mode 100644 index bca9a753..00000000 --- a/inc/Exts/phpseclib/Exception/NoSupportedAlgorithmsException.php +++ /dev/null @@ -1,26 +0,0 @@ - - * @copyright 2015 Jim Wigginton - * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @link http://phpseclib.sourceforge.net - */ - -namespace phpseclib\Exception; - -/** - * NoSupportedAlgorithmsException - * - * @package NoSupportedAlgorithmsException - * @author Jim Wigginton - */ -class NoSupportedAlgorithmsException extends \RuntimeException -{ -} diff --git a/inc/Exts/phpseclib/Exception/UnsupportedAlgorithmException.php b/inc/Exts/phpseclib/Exception/UnsupportedAlgorithmException.php deleted file mode 100644 index 47cc41d4..00000000 --- a/inc/Exts/phpseclib/Exception/UnsupportedAlgorithmException.php +++ /dev/null @@ -1,26 +0,0 @@ - - * @copyright 2015 Jim Wigginton - * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @link http://phpseclib.sourceforge.net - */ - -namespace phpseclib\Exception; - -/** - * UnsupportedAlgorithmException - * - * @package UnsupportedAlgorithmException - * @author Jim Wigginton - */ -class UnsupportedAlgorithmException extends \RuntimeException -{ -} diff --git a/inc/Exts/random_compat/lib/random.php b/inc/Exts/random_compat/lib/random.php deleted file mode 100644 index 5a451da7..00000000 --- a/inc/Exts/random_compat/lib/random.php +++ /dev/null @@ -1,215 +0,0 @@ -GetRandom() - * 5. openssl_random_pseudo_bytes() (absolute last resort) - * - * See RATIONALE.md for our reasoning behind this particular order - */ - if (extension_loaded('libsodium')) { - // See random_bytes_libsodium.php - if (PHP_VERSION_ID >= 50300 && is_callable('\\Sodium\\randombytes_buf')) { - require_once $RandomCompatDIR.'/random_bytes_libsodium.php'; - } elseif (method_exists('Sodium', 'randombytes_buf')) { - require_once $RandomCompatDIR.'/random_bytes_libsodium_legacy.php'; - } - } - - /** - * Reading directly from /dev/urandom: - */ - if (DIRECTORY_SEPARATOR === '/') { - // DIRECTORY_SEPARATOR === '/' on Unix-like OSes -- this is a fast - // way to exclude Windows. - $RandomCompatUrandom = true; - $RandomCompat_basedir = ini_get('open_basedir'); - - if (!empty($RandomCompat_basedir)) { - $RandomCompat_open_basedir = explode( - PATH_SEPARATOR, - strtolower($RandomCompat_basedir) - ); - $RandomCompatUrandom = (array() !== array_intersect( - array('/dev', '/dev/', '/dev/urandom'), - $RandomCompat_open_basedir - )); - $RandomCompat_open_basedir = null; - } - - if ( - !is_callable('random_bytes') - && - $RandomCompatUrandom - && - @is_readable('/dev/urandom') - ) { - // Error suppression on is_readable() in case of an open_basedir - // or safe_mode failure. All we care about is whether or not we - // can read it at this point. If the PHP environment is going to - // panic over trying to see if the file can be read in the first - // place, that is not helpful to us here. - - // See random_bytes_dev_urandom.php - require_once $RandomCompatDIR.'/random_bytes_dev_urandom.php'; - } - // Unset variables after use - $RandomCompat_basedir = null; - } else { - $RandomCompatUrandom = false; - } - - /** - * mcrypt_create_iv() - * - * We only want to use mcypt_create_iv() if: - * - * - random_bytes() hasn't already been defined - * - PHP >= 5.3.7 - * - the mcrypt extensions is loaded - * - One of these two conditions is true: - * - We're on Windows (DIRECTORY_SEPARATOR !== '/') - * - We're not on Windows and /dev/urandom is readabale - * (i.e. we're not in a chroot jail) - * - Special case: - * - If we're not on Windows, but the PHP version is between - * 5.6.10 and 5.6.12, we don't want to use mcrypt. It will - * hang indefinitely. This is bad. - */ - if ( - !is_callable('random_bytes') - && - PHP_VERSION_ID >= 50307 - && - extension_loaded('mcrypt') - ) { - // Prevent this code from hanging indefinitely on non-Windows; - // see https://bugs.php.net/bug.php?id=69833 - if ( - DIRECTORY_SEPARATOR !== '/' || - (PHP_VERSION_ID <= 50609 || PHP_VERSION_ID >= 50613) - ) { - // See random_bytes_mcrypt.php - require_once $RandomCompatDIR.'/random_bytes_mcrypt.php'; - } - } - $RandomCompatUrandom = null; - - /** - * This is a Windows-specific fallback, for when the mcrypt extension - * isn't loaded. - */ - if ( - !is_callable('random_bytes') - && - extension_loaded('com_dotnet') - && - class_exists('COM') - ) { - $RandomCompat_disabled_classes = preg_split( - '#\s*,\s*#', - strtolower(ini_get('disable_classes')) - ); - - if (!in_array('com', $RandomCompat_disabled_classes)) { - try { - $RandomCompatCOMtest = new COM('CAPICOM.Utilities.1'); - if (method_exists($RandomCompatCOMtest, 'GetRandom')) { - // See random_bytes_com_dotnet.php - require_once $RandomCompatDIR.'/random_bytes_com_dotnet.php'; - } - } catch (com_exception $e) { - // Don't try to use it. - } - } - $RandomCompat_disabled_classes = null; - $RandomCompatCOMtest = null; - } - - /** - * throw new Exception - */ - if (!is_callable('random_bytes')) { - /** - * We don't have any more options, so let's throw an exception right now - * and hope the developer won't let it fail silently. - */ - function random_bytes($length) - { - throw new Exception( - 'There is no suitable CSPRNG installed on your system' - ); - } - } - } - - if (!is_callable('random_int')) { - require_once $RandomCompatDIR.'/random_int.php'; - } - - $RandomCompatDIR = null; -} diff --git a/inc/Exts/random_compat/lib/random_int.php b/inc/Exts/random_compat/lib/random_int.php deleted file mode 100644 index ce0ccbd3..00000000 --- a/inc/Exts/random_compat/lib/random_int.php +++ /dev/null @@ -1,191 +0,0 @@ - operators might accidentally let a float - * through. - */ - - try { - $min = RandomCompat_intval($min); - } catch (TypeError $ex) { - throw new TypeError( - 'random_int(): $min must be an integer' - ); - } - - try { - $max = RandomCompat_intval($max); - } catch (TypeError $ex) { - throw new TypeError( - 'random_int(): $max must be an integer' - ); - } - - /** - * Now that we've verified our weak typing system has given us an integer, - * let's validate the logic then we can move forward with generating random - * integers along a given range. - */ - if ($min > $max) { - throw new Error( - 'Minimum value must be less than or equal to the maximum value' - ); - } - - if ($max === $min) { - return $min; - } - - /** - * Initialize variables to 0 - * - * We want to store: - * $bytes => the number of random bytes we need - * $mask => an integer bitmask (for use with the &) operator - * so we can minimize the number of discards - */ - $attempts = $bits = $bytes = $mask = $valueShift = 0; - - /** - * At this point, $range is a positive number greater than 0. It might - * overflow, however, if $max - $min > PHP_INT_MAX. PHP will cast it to - * a float and we will lose some precision. - */ - $range = $max - $min; - - /** - * Test for integer overflow: - */ - if (!is_int($range)) { - - /** - * Still safely calculate wider ranges. - * Provided by @CodesInChaos, @oittaa - * - * @ref https://gist.github.com/CodesInChaos/03f9ea0b58e8b2b8d435 - * - * We use ~0 as a mask in this case because it generates all 1s - * - * @ref https://eval.in/400356 (32-bit) - * @ref http://3v4l.org/XX9r5 (64-bit) - */ - $bytes = PHP_INT_SIZE; - $mask = ~0; - - } else { - - /** - * $bits is effectively ceil(log($range, 2)) without dealing with - * type juggling - */ - while ($range > 0) { - if ($bits % 8 === 0) { - ++$bytes; - } - ++$bits; - $range >>= 1; - $mask = $mask << 1 | 1; - } - $valueShift = $min; - } - - /** - * Now that we have our parameters set up, let's begin generating - * random integers until one falls between $min and $max - */ - do { - /** - * The rejection probability is at most 0.5, so this corresponds - * to a failure probability of 2^-128 for a working RNG - */ - if ($attempts > 128) { - throw new Exception( - 'random_int: RNG is broken - too many rejections' - ); - } - - /** - * Let's grab the necessary number of random bytes - */ - $randomByteString = random_bytes($bytes); - if ($randomByteString === false) { - throw new Exception( - 'Random number generator failure' - ); - } - - /** - * Let's turn $randomByteString into an integer - * - * This uses bitwise operators (<< and |) to build an integer - * out of the values extracted from ord() - * - * Example: [9F] | [6D] | [32] | [0C] => - * 159 + 27904 + 3276800 + 201326592 => - * 204631455 - */ - $val = 0; - for ($i = 0; $i < $bytes; ++$i) { - $val |= ord($randomByteString[$i]) << ($i * 8); - } - - /** - * Apply mask - */ - $val &= $mask; - $val += $valueShift; - - ++$attempts; - /** - * If $val overflows to a floating point number, - * ... or is larger than $max, - * ... or smaller than $min, - * then try again. - */ - } while (!is_int($val) || $val > $max || $val < $min); - - return (int) $val; -} diff --git a/inc/SP/Account/Account.class.php b/inc/SP/Account/Account.php similarity index 100% rename from inc/SP/Account/Account.class.php rename to inc/SP/Account/Account.php diff --git a/inc/SP/Account/AccountAcl.class.php b/inc/SP/Account/AccountAcl.php similarity index 100% rename from inc/SP/Account/AccountAcl.class.php rename to inc/SP/Account/AccountAcl.php diff --git a/inc/SP/Account/AccountBase.class.php b/inc/SP/Account/AccountBase.php similarity index 100% rename from inc/SP/Account/AccountBase.class.php rename to inc/SP/Account/AccountBase.php diff --git a/inc/SP/Account/AccountCrypt.class.php b/inc/SP/Account/AccountCrypt.php similarity index 100% rename from inc/SP/Account/AccountCrypt.class.php rename to inc/SP/Account/AccountCrypt.php diff --git a/inc/SP/Account/AccountFavorites.class.php b/inc/SP/Account/AccountFavorites.php similarity index 100% rename from inc/SP/Account/AccountFavorites.class.php rename to inc/SP/Account/AccountFavorites.php diff --git a/inc/SP/Account/AccountHistory.class.php b/inc/SP/Account/AccountHistory.php similarity index 100% rename from inc/SP/Account/AccountHistory.class.php rename to inc/SP/Account/AccountHistory.php diff --git a/inc/SP/Account/AccountHistoryCrypt.class.php b/inc/SP/Account/AccountHistoryCrypt.php similarity index 100% rename from inc/SP/Account/AccountHistoryCrypt.class.php rename to inc/SP/Account/AccountHistoryCrypt.php diff --git a/inc/SP/Account/AccountHistoryUtil.class.php b/inc/SP/Account/AccountHistoryUtil.php similarity index 100% rename from inc/SP/Account/AccountHistoryUtil.class.php rename to inc/SP/Account/AccountHistoryUtil.php diff --git a/inc/SP/Account/AccountInterface.class.php b/inc/SP/Account/AccountInterface.php similarity index 100% rename from inc/SP/Account/AccountInterface.class.php rename to inc/SP/Account/AccountInterface.php diff --git a/inc/SP/Account/AccountSearch.class.php b/inc/SP/Account/AccountSearch.php similarity index 100% rename from inc/SP/Account/AccountSearch.class.php rename to inc/SP/Account/AccountSearch.php diff --git a/inc/SP/Account/AccountTags.class.php b/inc/SP/Account/AccountTags.php similarity index 100% rename from inc/SP/Account/AccountTags.class.php rename to inc/SP/Account/AccountTags.php diff --git a/inc/SP/Account/AccountUtil.class.php b/inc/SP/Account/AccountUtil.php similarity index 100% rename from inc/SP/Account/AccountUtil.class.php rename to inc/SP/Account/AccountUtil.php diff --git a/inc/SP/Account/AccountsSearchItem.class.php b/inc/SP/Account/AccountsSearchItem.php similarity index 100% rename from inc/SP/Account/AccountsSearchItem.class.php rename to inc/SP/Account/AccountsSearchItem.php diff --git a/inc/SP/Account/UserAccounts.class.php b/inc/SP/Account/UserAccounts.php similarity index 100% rename from inc/SP/Account/UserAccounts.class.php rename to inc/SP/Account/UserAccounts.php diff --git a/inc/SP/Api/ApiBase.class.php b/inc/SP/Api/ApiBase.php similarity index 100% rename from inc/SP/Api/ApiBase.class.php rename to inc/SP/Api/ApiBase.php diff --git a/inc/SP/Api/ApiInterface.class.php b/inc/SP/Api/ApiInterface.php similarity index 100% rename from inc/SP/Api/ApiInterface.class.php rename to inc/SP/Api/ApiInterface.php diff --git a/inc/SP/Api/ApiRequest.class.php b/inc/SP/Api/ApiRequest.php similarity index 100% rename from inc/SP/Api/ApiRequest.class.php rename to inc/SP/Api/ApiRequest.php diff --git a/inc/SP/Api/ApiUtil.class.php b/inc/SP/Api/ApiUtil.php similarity index 100% rename from inc/SP/Api/ApiUtil.class.php rename to inc/SP/Api/ApiUtil.php diff --git a/inc/SP/Api/SyspassApi.class.php b/inc/SP/Api/SyspassApi.php similarity index 100% rename from inc/SP/Api/SyspassApi.class.php rename to inc/SP/Api/SyspassApi.php diff --git a/inc/SP/Auth/Auth.class.php b/inc/SP/Auth/Auth.php similarity index 100% rename from inc/SP/Auth/Auth.class.php rename to inc/SP/Auth/Auth.php diff --git a/inc/SP/Auth/AuthDataBase.class.php b/inc/SP/Auth/AuthDataBase.php similarity index 100% rename from inc/SP/Auth/AuthDataBase.class.php rename to inc/SP/Auth/AuthDataBase.php diff --git a/inc/SP/Auth/AuthInterface.class.php b/inc/SP/Auth/AuthInterface.php similarity index 100% rename from inc/SP/Auth/AuthInterface.class.php rename to inc/SP/Auth/AuthInterface.php diff --git a/inc/SP/Auth/AuthResult.class.php b/inc/SP/Auth/AuthResult.php similarity index 100% rename from inc/SP/Auth/AuthResult.class.php rename to inc/SP/Auth/AuthResult.php diff --git a/inc/SP/Auth/AuthUtil.class.php b/inc/SP/Auth/AuthUtil.php similarity index 100% rename from inc/SP/Auth/AuthUtil.class.php rename to inc/SP/Auth/AuthUtil.php diff --git a/inc/SP/Auth/Browser/Browser.class.php b/inc/SP/Auth/Browser/Browser.php similarity index 100% rename from inc/SP/Auth/Browser/Browser.class.php rename to inc/SP/Auth/Browser/Browser.php diff --git a/inc/SP/Auth/Browser/BrowserAuthData.class.php b/inc/SP/Auth/Browser/BrowserAuthData.php similarity index 100% rename from inc/SP/Auth/Browser/BrowserAuthData.class.php rename to inc/SP/Auth/Browser/BrowserAuthData.php diff --git a/inc/SP/Auth/Database/Database.class.php b/inc/SP/Auth/Database/Database.php similarity index 100% rename from inc/SP/Auth/Database/Database.class.php rename to inc/SP/Auth/Database/Database.php diff --git a/inc/SP/Auth/Database/DatabaseAuthData.class.php b/inc/SP/Auth/Database/DatabaseAuthData.php similarity index 100% rename from inc/SP/Auth/Database/DatabaseAuthData.class.php rename to inc/SP/Auth/Database/DatabaseAuthData.php diff --git a/inc/SP/Auth/Ldap/LdapAuthData.class.php b/inc/SP/Auth/Ldap/LdapAuthData.php similarity index 100% rename from inc/SP/Auth/Ldap/LdapAuthData.class.php rename to inc/SP/Auth/Ldap/LdapAuthData.php diff --git a/inc/SP/Auth/Ldap/LdapBase.class.php b/inc/SP/Auth/Ldap/LdapBase.php similarity index 100% rename from inc/SP/Auth/Ldap/LdapBase.class.php rename to inc/SP/Auth/Ldap/LdapBase.php diff --git a/inc/SP/Auth/Ldap/LdapInterface.class.php b/inc/SP/Auth/Ldap/LdapInterface.php similarity index 100% rename from inc/SP/Auth/Ldap/LdapInterface.class.php rename to inc/SP/Auth/Ldap/LdapInterface.php diff --git a/inc/SP/Auth/Ldap/LdapMsAds.class.php b/inc/SP/Auth/Ldap/LdapMsAds.php similarity index 100% rename from inc/SP/Auth/Ldap/LdapMsAds.class.php rename to inc/SP/Auth/Ldap/LdapMsAds.php diff --git a/inc/SP/Auth/Ldap/LdapStd.class.php b/inc/SP/Auth/Ldap/LdapStd.php similarity index 100% rename from inc/SP/Auth/Ldap/LdapStd.class.php rename to inc/SP/Auth/Ldap/LdapStd.php diff --git a/inc/SP/Auth/Ldap/LdapUtil.class.php b/inc/SP/Auth/Ldap/LdapUtil.php similarity index 100% rename from inc/SP/Auth/Ldap/LdapUtil.class.php rename to inc/SP/Auth/Ldap/LdapUtil.php diff --git a/inc/SP/Config/Config.class.php b/inc/SP/Config/Config.php similarity index 100% rename from inc/SP/Config/Config.class.php rename to inc/SP/Config/Config.php diff --git a/inc/SP/Config/ConfigDB.class.php b/inc/SP/Config/ConfigDB.php similarity index 100% rename from inc/SP/Config/ConfigDB.class.php rename to inc/SP/Config/ConfigDB.php diff --git a/inc/SP/Config/ConfigData.class.php b/inc/SP/Config/ConfigData.php similarity index 100% rename from inc/SP/Config/ConfigData.class.php rename to inc/SP/Config/ConfigData.php diff --git a/inc/SP/Config/ConfigInterface.class.php b/inc/SP/Config/ConfigInterface.php similarity index 100% rename from inc/SP/Config/ConfigInterface.class.php rename to inc/SP/Config/ConfigInterface.php diff --git a/inc/SP/Config/ConfigUtil.class.php b/inc/SP/Config/ConfigUtil.php similarity index 100% rename from inc/SP/Config/ConfigUtil.class.php rename to inc/SP/Config/ConfigUtil.php diff --git a/inc/SP/Controller/AccountController.class.php b/inc/SP/Controller/AccountController.php similarity index 100% rename from inc/SP/Controller/AccountController.class.php rename to inc/SP/Controller/AccountController.php diff --git a/inc/SP/Controller/AccountSearchController.class.php b/inc/SP/Controller/AccountSearchController.php similarity index 100% rename from inc/SP/Controller/AccountSearchController.class.php rename to inc/SP/Controller/AccountSearchController.php diff --git a/inc/SP/Controller/ChecksController.class.php b/inc/SP/Controller/ChecksController.php similarity index 100% rename from inc/SP/Controller/ChecksController.class.php rename to inc/SP/Controller/ChecksController.php diff --git a/inc/SP/Controller/ConfigActionController.class.php b/inc/SP/Controller/ConfigActionController.php similarity index 100% rename from inc/SP/Controller/ConfigActionController.class.php rename to inc/SP/Controller/ConfigActionController.php diff --git a/inc/SP/Controller/ConfigController.class.php b/inc/SP/Controller/ConfigController.php similarity index 100% rename from inc/SP/Controller/ConfigController.class.php rename to inc/SP/Controller/ConfigController.php diff --git a/inc/SP/Controller/ControllerBase.class.php b/inc/SP/Controller/ControllerBase.php similarity index 100% rename from inc/SP/Controller/ControllerBase.class.php rename to inc/SP/Controller/ControllerBase.php diff --git a/inc/SP/Controller/EventlogController.class.php b/inc/SP/Controller/EventlogController.php similarity index 100% rename from inc/SP/Controller/EventlogController.class.php rename to inc/SP/Controller/EventlogController.php diff --git a/inc/SP/Controller/GridItemsSearchController.class.php b/inc/SP/Controller/GridItemsSearchController.php similarity index 100% rename from inc/SP/Controller/GridItemsSearchController.class.php rename to inc/SP/Controller/GridItemsSearchController.php diff --git a/inc/SP/Controller/GridTabControllerBase.class.php b/inc/SP/Controller/GridTabControllerBase.php similarity index 100% rename from inc/SP/Controller/GridTabControllerBase.class.php rename to inc/SP/Controller/GridTabControllerBase.php diff --git a/inc/SP/Controller/Grids/GridBase.class.php b/inc/SP/Controller/Grids/GridBase.php similarity index 100% rename from inc/SP/Controller/Grids/GridBase.class.php rename to inc/SP/Controller/Grids/GridBase.php diff --git a/inc/SP/Controller/Grids/Items.class.php b/inc/SP/Controller/Grids/Items.php similarity index 100% rename from inc/SP/Controller/Grids/Items.class.php rename to inc/SP/Controller/Grids/Items.php diff --git a/inc/SP/Controller/Grids/Notices.class.php b/inc/SP/Controller/Grids/Notices.php similarity index 100% rename from inc/SP/Controller/Grids/Notices.class.php rename to inc/SP/Controller/Grids/Notices.php diff --git a/inc/SP/Controller/ItemActionController.class.php b/inc/SP/Controller/ItemActionController.php similarity index 100% rename from inc/SP/Controller/ItemActionController.class.php rename to inc/SP/Controller/ItemActionController.php diff --git a/inc/SP/Controller/ItemControllerInterface.class.php b/inc/SP/Controller/ItemControllerInterface.php similarity index 100% rename from inc/SP/Controller/ItemControllerInterface.class.php rename to inc/SP/Controller/ItemControllerInterface.php diff --git a/inc/SP/Controller/ItemListController.class.php b/inc/SP/Controller/ItemListController.php similarity index 100% rename from inc/SP/Controller/ItemListController.class.php rename to inc/SP/Controller/ItemListController.php diff --git a/inc/SP/Controller/ItemSearchController.class.php b/inc/SP/Controller/ItemSearchController.php similarity index 100% rename from inc/SP/Controller/ItemSearchController.class.php rename to inc/SP/Controller/ItemSearchController.php diff --git a/inc/SP/Controller/ItemShowController.class.php b/inc/SP/Controller/ItemShowController.php similarity index 100% rename from inc/SP/Controller/ItemShowController.class.php rename to inc/SP/Controller/ItemShowController.php diff --git a/inc/SP/Controller/ItemsController.class.php b/inc/SP/Controller/ItemsController.php similarity index 100% rename from inc/SP/Controller/ItemsController.class.php rename to inc/SP/Controller/ItemsController.php diff --git a/inc/SP/Controller/LoginController.class.php b/inc/SP/Controller/LoginController.php similarity index 100% rename from inc/SP/Controller/LoginController.class.php rename to inc/SP/Controller/LoginController.php diff --git a/inc/SP/Controller/MainActionController.class.php b/inc/SP/Controller/MainActionController.php similarity index 100% rename from inc/SP/Controller/MainActionController.class.php rename to inc/SP/Controller/MainActionController.php diff --git a/inc/SP/Controller/MainController.class.php b/inc/SP/Controller/MainController.php similarity index 100% rename from inc/SP/Controller/MainController.class.php rename to inc/SP/Controller/MainController.php diff --git a/inc/SP/Controller/NoticeShowController.class.php b/inc/SP/Controller/NoticeShowController.php similarity index 100% rename from inc/SP/Controller/NoticeShowController.class.php rename to inc/SP/Controller/NoticeShowController.php diff --git a/inc/SP/Controller/NoticesController.class.php b/inc/SP/Controller/NoticesController.php similarity index 100% rename from inc/SP/Controller/NoticesController.class.php rename to inc/SP/Controller/NoticesController.php diff --git a/inc/SP/Controller/NoticesSearchController.class.php b/inc/SP/Controller/NoticesSearchController.php similarity index 100% rename from inc/SP/Controller/NoticesSearchController.class.php rename to inc/SP/Controller/NoticesSearchController.php diff --git a/inc/SP/Controller/RequestControllerTrait.class.php b/inc/SP/Controller/RequestControllerTrait.php similarity index 100% rename from inc/SP/Controller/RequestControllerTrait.class.php rename to inc/SP/Controller/RequestControllerTrait.php diff --git a/inc/SP/Controller/TabControllerBase.class.php b/inc/SP/Controller/TabControllerBase.php similarity index 100% rename from inc/SP/Controller/TabControllerBase.class.php rename to inc/SP/Controller/TabControllerBase.php diff --git a/inc/SP/Controller/TabsInterface.class.php b/inc/SP/Controller/TabsInterface.php similarity index 100% rename from inc/SP/Controller/TabsInterface.class.php rename to inc/SP/Controller/TabsInterface.php diff --git a/inc/SP/Controller/TaskController.class.php b/inc/SP/Controller/TaskController.php similarity index 100% rename from inc/SP/Controller/TaskController.class.php rename to inc/SP/Controller/TaskController.php diff --git a/inc/SP/Controller/UserPreferencesController.class.php b/inc/SP/Controller/UserPreferencesController.php similarity index 100% rename from inc/SP/Controller/UserPreferencesController.class.php rename to inc/SP/Controller/UserPreferencesController.php diff --git a/inc/SP/Controller/WikiController.class.php b/inc/SP/Controller/WikiController.php similarity index 100% rename from inc/SP/Controller/WikiController.class.php rename to inc/SP/Controller/WikiController.php diff --git a/inc/SP/Core/Acl.class.php b/inc/SP/Core/Acl.php similarity index 100% rename from inc/SP/Core/Acl.class.php rename to inc/SP/Core/Acl.php diff --git a/inc/SP/Core/ActionsInterface.class.php b/inc/SP/Core/ActionsInterface.php similarity index 100% rename from inc/SP/Core/ActionsInterface.class.php rename to inc/SP/Core/ActionsInterface.php diff --git a/inc/SP/Core/Backup.class.php b/inc/SP/Core/Backup.php similarity index 100% rename from inc/SP/Core/Backup.class.php rename to inc/SP/Core/Backup.php diff --git a/inc/SP/Core/Crypt/Cookie.class.php b/inc/SP/Core/Crypt/Cookie.php similarity index 100% rename from inc/SP/Core/Crypt/Cookie.class.php rename to inc/SP/Core/Crypt/Cookie.php diff --git a/inc/SP/Core/Crypt/Crypt.class.php b/inc/SP/Core/Crypt/Crypt.php similarity index 100% rename from inc/SP/Core/Crypt/Crypt.class.php rename to inc/SP/Core/Crypt/Crypt.php diff --git a/inc/SP/Core/Crypt/CryptSessionHandler.class.php b/inc/SP/Core/Crypt/CryptSessionHandler.php similarity index 100% rename from inc/SP/Core/Crypt/CryptSessionHandler.class.php rename to inc/SP/Core/Crypt/CryptSessionHandler.php diff --git a/inc/SP/Core/Crypt/Hash.class.php b/inc/SP/Core/Crypt/Hash.php similarity index 100% rename from inc/SP/Core/Crypt/Hash.class.php rename to inc/SP/Core/Crypt/Hash.php diff --git a/inc/SP/Core/Crypt/SecureKeyCookie.class.php b/inc/SP/Core/Crypt/SecureKeyCookie.php similarity index 100% rename from inc/SP/Core/Crypt/SecureKeyCookie.class.php rename to inc/SP/Core/Crypt/SecureKeyCookie.php diff --git a/inc/SP/Core/Crypt/Session.class.php b/inc/SP/Core/Crypt/Session.php similarity index 100% rename from inc/SP/Core/Crypt/Session.class.php rename to inc/SP/Core/Crypt/Session.php diff --git a/inc/SP/Core/Crypt/Vault.class.php b/inc/SP/Core/Crypt/Vault.php similarity index 100% rename from inc/SP/Core/Crypt/Vault.class.php rename to inc/SP/Core/Crypt/Vault.php diff --git a/inc/SP/Core/CryptMasterPass.class.php b/inc/SP/Core/CryptMasterPass.php similarity index 100% rename from inc/SP/Core/CryptMasterPass.class.php rename to inc/SP/Core/CryptMasterPass.php diff --git a/inc/SP/Core/CryptPKI.class.php b/inc/SP/Core/CryptPKI.php similarity index 100% rename from inc/SP/Core/CryptPKI.class.php rename to inc/SP/Core/CryptPKI.php diff --git a/inc/SP/Core/DiFactory.class.php b/inc/SP/Core/DiFactory.php similarity index 100% rename from inc/SP/Core/DiFactory.class.php rename to inc/SP/Core/DiFactory.php diff --git a/inc/SP/Core/Events/EventDispatcher.class.php b/inc/SP/Core/Events/EventDispatcher.php similarity index 100% rename from inc/SP/Core/Events/EventDispatcher.class.php rename to inc/SP/Core/Events/EventDispatcher.php diff --git a/inc/SP/Core/Events/EventDispatcherBase.class.php b/inc/SP/Core/Events/EventDispatcherBase.php similarity index 100% rename from inc/SP/Core/Events/EventDispatcherBase.class.php rename to inc/SP/Core/Events/EventDispatcherBase.php diff --git a/inc/SP/Core/Events/EventDispatcherInterface.class.php b/inc/SP/Core/Events/EventDispatcherInterface.php similarity index 100% rename from inc/SP/Core/Events/EventDispatcherInterface.class.php rename to inc/SP/Core/Events/EventDispatcherInterface.php diff --git a/inc/SP/Core/Events/EventReceiver.class.php b/inc/SP/Core/Events/EventReceiver.php similarity index 100% rename from inc/SP/Core/Events/EventReceiver.class.php rename to inc/SP/Core/Events/EventReceiver.php diff --git a/inc/SP/Core/Exceptions/AuthException.class.php b/inc/SP/Core/Exceptions/AuthException.php similarity index 100% rename from inc/SP/Core/Exceptions/AuthException.class.php rename to inc/SP/Core/Exceptions/AuthException.php diff --git a/inc/SP/Core/Exceptions/ConstraintException.class.php b/inc/SP/Core/Exceptions/ConstraintException.php similarity index 100% rename from inc/SP/Core/Exceptions/ConstraintException.class.php rename to inc/SP/Core/Exceptions/ConstraintException.php diff --git a/inc/SP/Core/Exceptions/FileNotFoundException.class.php b/inc/SP/Core/Exceptions/FileNotFoundException.php similarity index 100% rename from inc/SP/Core/Exceptions/FileNotFoundException.class.php rename to inc/SP/Core/Exceptions/FileNotFoundException.php diff --git a/inc/SP/Core/Exceptions/InvalidArgumentException.class.php b/inc/SP/Core/Exceptions/InvalidArgumentException.php similarity index 100% rename from inc/SP/Core/Exceptions/InvalidArgumentException.class.php rename to inc/SP/Core/Exceptions/InvalidArgumentException.php diff --git a/inc/SP/Core/Exceptions/InvalidClassException.class.php b/inc/SP/Core/Exceptions/InvalidClassException.php similarity index 100% rename from inc/SP/Core/Exceptions/InvalidClassException.class.php rename to inc/SP/Core/Exceptions/InvalidClassException.php diff --git a/inc/SP/Core/Exceptions/ItemException.class.php b/inc/SP/Core/Exceptions/ItemException.php similarity index 100% rename from inc/SP/Core/Exceptions/ItemException.class.php rename to inc/SP/Core/Exceptions/ItemException.php diff --git a/inc/SP/Core/Exceptions/QueryException.class.php b/inc/SP/Core/Exceptions/QueryException.php similarity index 100% rename from inc/SP/Core/Exceptions/QueryException.class.php rename to inc/SP/Core/Exceptions/QueryException.php diff --git a/inc/SP/Core/Exceptions/SPException.class.php b/inc/SP/Core/Exceptions/SPException.php similarity index 100% rename from inc/SP/Core/Exceptions/SPException.class.php rename to inc/SP/Core/Exceptions/SPException.php diff --git a/inc/SP/Core/Exceptions/ValidationException.class.php b/inc/SP/Core/Exceptions/ValidationException.php similarity index 100% rename from inc/SP/Core/Exceptions/ValidationException.class.php rename to inc/SP/Core/Exceptions/ValidationException.php diff --git a/inc/SP/Core/Init.class.php b/inc/SP/Core/Init.php similarity index 98% rename from inc/SP/Core/Init.class.php rename to inc/SP/Core/Init.php index d628e4e2..40908db3 100644 --- a/inc/SP/Core/Init.class.php +++ b/inc/SP/Core/Init.php @@ -90,6 +90,10 @@ class Init * @var bool Indica si el script requiere inicialización */ private static $checkInitSourceInclude; + /** + * @var string + */ + private static $sourceScript; /** * Inicializar la aplicación. @@ -117,7 +121,7 @@ class Init self::setLogging(); // Cargar las extensiones - self::loadExtensions(); +// self::loadExtensions(); // Establecer el lenguaje por defecto Language::setLocales('en_US'); @@ -230,10 +234,10 @@ class Init */ private static function checkInitSourceInclude() { - $srcScript = pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_BASENAME); + self::$sourceScript = pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_BASENAME); $skipInit = ['js.php', 'css.php', 'api.php', 'ajax_getEnvironment.php', 'ajax_task.php']; - return in_array($srcScript, $skipInit, true); + return in_array(self::$sourceScript, $skipInit, true); } /** @@ -461,7 +465,7 @@ class Init */ private static function checkConfigDir() { - if (self::checkInitSourceInclude()) { + if (self::$checkInitSourceInclude) { return; } @@ -720,6 +724,9 @@ class Init */ public static function loadPlugins() { + $PluginsLoader = new \SplClassLoader('Plugins', BASE_DIR); + $PluginsLoader->register(); + foreach (PluginUtil::getPlugins() as $plugin) { $Plugin = PluginUtil::loadPlugin($plugin); @@ -736,7 +743,7 @@ class Init * Comprobar si hay que ejecutar acciones de URL antes de presentar la pantalla de login. * * @return bool - * @throws \phpmailer\phpmailerException + * @throws phpmailerException */ public static function checkPreLoginActions() { diff --git a/inc/SP/Core/Installer.class.php b/inc/SP/Core/Installer.php similarity index 100% rename from inc/SP/Core/Installer.class.php rename to inc/SP/Core/Installer.php diff --git a/inc/SP/Core/ItemsTypeInterface.class.php b/inc/SP/Core/ItemsTypeInterface.php similarity index 100% rename from inc/SP/Core/ItemsTypeInterface.class.php rename to inc/SP/Core/ItemsTypeInterface.php diff --git a/inc/SP/Core/Language.class.php b/inc/SP/Core/Language.php similarity index 100% rename from inc/SP/Core/Language.class.php rename to inc/SP/Core/Language.php diff --git a/inc/SP/Core/Messages/LogMessage.class.php b/inc/SP/Core/Messages/LogMessage.php similarity index 100% rename from inc/SP/Core/Messages/LogMessage.class.php rename to inc/SP/Core/Messages/LogMessage.php diff --git a/inc/SP/Core/Messages/MessageBase.class.php b/inc/SP/Core/Messages/MessageBase.php similarity index 100% rename from inc/SP/Core/Messages/MessageBase.class.php rename to inc/SP/Core/Messages/MessageBase.php diff --git a/inc/SP/Core/Messages/MessageInterface.class.php b/inc/SP/Core/Messages/MessageInterface.php similarity index 100% rename from inc/SP/Core/Messages/MessageInterface.class.php rename to inc/SP/Core/Messages/MessageInterface.php diff --git a/inc/SP/Core/Messages/NoticeMessage.class.php b/inc/SP/Core/Messages/NoticeMessage.php similarity index 100% rename from inc/SP/Core/Messages/NoticeMessage.class.php rename to inc/SP/Core/Messages/NoticeMessage.php diff --git a/inc/SP/Core/Messages/TaskMessage.class.php b/inc/SP/Core/Messages/TaskMessage.php similarity index 100% rename from inc/SP/Core/Messages/TaskMessage.class.php rename to inc/SP/Core/Messages/TaskMessage.php diff --git a/inc/SP/Core/OldCrypt.class.php b/inc/SP/Core/OldCrypt.php similarity index 100% rename from inc/SP/Core/OldCrypt.class.php rename to inc/SP/Core/OldCrypt.php diff --git a/inc/SP/Core/Plugin/PluginBase.class.php b/inc/SP/Core/Plugin/PluginBase.php similarity index 100% rename from inc/SP/Core/Plugin/PluginBase.class.php rename to inc/SP/Core/Plugin/PluginBase.php diff --git a/inc/SP/Core/Plugin/PluginDataStore.class.php b/inc/SP/Core/Plugin/PluginDataStore.php similarity index 100% rename from inc/SP/Core/Plugin/PluginDataStore.class.php rename to inc/SP/Core/Plugin/PluginDataStore.php diff --git a/inc/SP/Core/Plugin/PluginInterface.class.php b/inc/SP/Core/Plugin/PluginInterface.php similarity index 100% rename from inc/SP/Core/Plugin/PluginInterface.class.php rename to inc/SP/Core/Plugin/PluginInterface.php diff --git a/inc/SP/Core/Plugin/PluginUtil.class.php b/inc/SP/Core/Plugin/PluginUtil.php similarity index 95% rename from inc/SP/Core/Plugin/PluginUtil.class.php rename to inc/SP/Core/Plugin/PluginUtil.php index c398578a..b5b90350 100644 --- a/inc/SP/Core/Plugin/PluginUtil.class.php +++ b/inc/SP/Core/Plugin/PluginUtil.php @@ -110,9 +110,11 @@ class PluginUtil self::$disabledPlugins[] = $name; } catch (\ReflectionException $e) { - Log::writeNewLog(__FUNCTION__, sprintf(__('No es posible cargar el plugin "%s"'), $name)); + Log::writeNewLog(__FUNCTION__, + sprintf(__('No es posible cargar el plugin "%s"'), $name)); } catch (SPException $e) { - Log::writeNewLog(__FUNCTION__, sprintf(__('No es posible cargar el plugin "%s"'), $name)); + Log::writeNewLog(__FUNCTION__, + sprintf(__('No es posible cargar el plugin "%s"'), $name)); } return false; diff --git a/inc/SP/Core/Session.class.php b/inc/SP/Core/Session.php similarity index 100% rename from inc/SP/Core/Session.class.php rename to inc/SP/Core/Session.php diff --git a/inc/SP/Core/SessionUtil.class.php b/inc/SP/Core/SessionUtil.php similarity index 100% rename from inc/SP/Core/SessionUtil.class.php rename to inc/SP/Core/SessionUtil.php diff --git a/inc/SP/Core/Task.class.php b/inc/SP/Core/Task.php similarity index 100% rename from inc/SP/Core/Task.class.php rename to inc/SP/Core/Task.php diff --git a/inc/SP/Core/TaskFactory.class.php b/inc/SP/Core/TaskFactory.php similarity index 100% rename from inc/SP/Core/TaskFactory.class.php rename to inc/SP/Core/TaskFactory.php diff --git a/inc/SP/Core/Template.class.php b/inc/SP/Core/Template.php similarity index 100% rename from inc/SP/Core/Template.class.php rename to inc/SP/Core/Template.php diff --git a/inc/SP/Core/UI/Theme.class.php b/inc/SP/Core/UI/Theme.php similarity index 95% rename from inc/SP/Core/UI/Theme.class.php rename to inc/SP/Core/UI/Theme.php index 0ce0587b..93071f94 100644 --- a/inc/SP/Core/UI/Theme.class.php +++ b/inc/SP/Core/UI/Theme.php @@ -27,7 +27,6 @@ namespace SP\Core\UI; use SP\Config\Config; use SP\Core\Init; use SP\Core\Session; -use SP\Mgmt\Users\UserPreferences; use Theme\Icons; defined('APP_ROOT') || die(); @@ -90,7 +89,7 @@ class Theme implements ThemeInterface $this->themeUri = Init::$WEBURI . '/inc/themes/' . $this->themeName; $this->themePath = DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $this->themeName; - $this->themePathFull = Init::$SERVERROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $this->themeName; + $this->themePathFull = VIEW_PATH . DIRECTORY_SEPARATOR . $this->themeName; $this->viewsPath = $this->themePathFull . DIRECTORY_SEPARATOR . 'views'; } @@ -121,7 +120,7 @@ class Theme implements ThemeInterface */ protected function initIcons() { - $iconsClass = $this->themePathFull . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Icons.class.php'; + $iconsClass = $this->themePathFull . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Icons.php'; if (file_exists($iconsClass)) { include_once $iconsClass; diff --git a/inc/SP/Core/UI/ThemeIconsBase.class.php b/inc/SP/Core/UI/ThemeIconsBase.php similarity index 100% rename from inc/SP/Core/UI/ThemeIconsBase.class.php rename to inc/SP/Core/UI/ThemeIconsBase.php diff --git a/inc/SP/Core/UI/ThemeIconsInterface.class.php b/inc/SP/Core/UI/ThemeIconsInterface.php similarity index 100% rename from inc/SP/Core/UI/ThemeIconsInterface.class.php rename to inc/SP/Core/UI/ThemeIconsInterface.php diff --git a/inc/SP/Core/UI/ThemeInterface.class.php b/inc/SP/Core/UI/ThemeInterface.php similarity index 100% rename from inc/SP/Core/UI/ThemeInterface.class.php rename to inc/SP/Core/UI/ThemeInterface.php diff --git a/inc/SP/Core/Upgrade/Account.class.php b/inc/SP/Core/Upgrade/Account.php similarity index 100% rename from inc/SP/Core/Upgrade/Account.class.php rename to inc/SP/Core/Upgrade/Account.php diff --git a/inc/SP/Core/Upgrade/Category.class.php b/inc/SP/Core/Upgrade/Category.php similarity index 100% rename from inc/SP/Core/Upgrade/Category.class.php rename to inc/SP/Core/Upgrade/Category.php diff --git a/inc/SP/Core/Upgrade/Check.class.php b/inc/SP/Core/Upgrade/Check.php similarity index 100% rename from inc/SP/Core/Upgrade/Check.class.php rename to inc/SP/Core/Upgrade/Check.php diff --git a/inc/SP/Core/Upgrade/Crypt.class.php b/inc/SP/Core/Upgrade/Crypt.php similarity index 100% rename from inc/SP/Core/Upgrade/Crypt.class.php rename to inc/SP/Core/Upgrade/Crypt.php diff --git a/inc/SP/Core/Upgrade/Customer.class.php b/inc/SP/Core/Upgrade/Customer.php similarity index 100% rename from inc/SP/Core/Upgrade/Customer.class.php rename to inc/SP/Core/Upgrade/Customer.php diff --git a/inc/SP/Core/Upgrade/Group.class.php b/inc/SP/Core/Upgrade/Group.php similarity index 100% rename from inc/SP/Core/Upgrade/Group.class.php rename to inc/SP/Core/Upgrade/Group.php diff --git a/inc/SP/Core/Upgrade/Profile.class.php b/inc/SP/Core/Upgrade/Profile.php similarity index 100% rename from inc/SP/Core/Upgrade/Profile.class.php rename to inc/SP/Core/Upgrade/Profile.php diff --git a/inc/SP/Core/Upgrade/Upgrade.class.php b/inc/SP/Core/Upgrade/Upgrade.php similarity index 100% rename from inc/SP/Core/Upgrade/Upgrade.class.php rename to inc/SP/Core/Upgrade/Upgrade.php diff --git a/inc/SP/Core/Upgrade/User.class.php b/inc/SP/Core/Upgrade/User.php similarity index 100% rename from inc/SP/Core/Upgrade/User.class.php rename to inc/SP/Core/Upgrade/User.php diff --git a/inc/SP/Core/XmlExport.class.php b/inc/SP/Core/XmlExport.php similarity index 100% rename from inc/SP/Core/XmlExport.class.php rename to inc/SP/Core/XmlExport.php diff --git a/inc/SP/DataModel/AccountData.class.php b/inc/SP/DataModel/AccountData.php similarity index 100% rename from inc/SP/DataModel/AccountData.class.php rename to inc/SP/DataModel/AccountData.php diff --git a/inc/SP/DataModel/AccountExtData.class.php b/inc/SP/DataModel/AccountExtData.php similarity index 100% rename from inc/SP/DataModel/AccountExtData.class.php rename to inc/SP/DataModel/AccountExtData.php diff --git a/inc/SP/DataModel/AccountHistoryData.class.php b/inc/SP/DataModel/AccountHistoryData.php similarity index 100% rename from inc/SP/DataModel/AccountHistoryData.class.php rename to inc/SP/DataModel/AccountHistoryData.php diff --git a/inc/SP/DataModel/AccountSearchData.class.php b/inc/SP/DataModel/AccountSearchData.php similarity index 100% rename from inc/SP/DataModel/AccountSearchData.class.php rename to inc/SP/DataModel/AccountSearchData.php diff --git a/inc/SP/DataModel/ApiTokenData.class.php b/inc/SP/DataModel/ApiTokenData.php similarity index 100% rename from inc/SP/DataModel/ApiTokenData.class.php rename to inc/SP/DataModel/ApiTokenData.php diff --git a/inc/SP/DataModel/CategoryData.class.php b/inc/SP/DataModel/CategoryData.php similarity index 100% rename from inc/SP/DataModel/CategoryData.class.php rename to inc/SP/DataModel/CategoryData.php diff --git a/inc/SP/DataModel/CustomFieldBaseData.class.php b/inc/SP/DataModel/CustomFieldBaseData.php similarity index 100% rename from inc/SP/DataModel/CustomFieldBaseData.class.php rename to inc/SP/DataModel/CustomFieldBaseData.php diff --git a/inc/SP/DataModel/CustomFieldData.class.php b/inc/SP/DataModel/CustomFieldData.php similarity index 100% rename from inc/SP/DataModel/CustomFieldData.class.php rename to inc/SP/DataModel/CustomFieldData.php diff --git a/inc/SP/DataModel/CustomFieldDefData.class.php b/inc/SP/DataModel/CustomFieldDefData.php similarity index 100% rename from inc/SP/DataModel/CustomFieldDefData.class.php rename to inc/SP/DataModel/CustomFieldDefData.php diff --git a/inc/SP/DataModel/CustomerData.class.php b/inc/SP/DataModel/CustomerData.php similarity index 100% rename from inc/SP/DataModel/CustomerData.class.php rename to inc/SP/DataModel/CustomerData.php diff --git a/inc/SP/DataModel/DataModelBase.class.php b/inc/SP/DataModel/DataModelBase.php similarity index 100% rename from inc/SP/DataModel/DataModelBase.class.php rename to inc/SP/DataModel/DataModelBase.php diff --git a/inc/SP/DataModel/DataModelInterface.class.php b/inc/SP/DataModel/DataModelInterface.php similarity index 100% rename from inc/SP/DataModel/DataModelInterface.class.php rename to inc/SP/DataModel/DataModelInterface.php diff --git a/inc/SP/DataModel/FileData.class.php b/inc/SP/DataModel/FileData.php similarity index 100% rename from inc/SP/DataModel/FileData.class.php rename to inc/SP/DataModel/FileData.php diff --git a/inc/SP/DataModel/FileExtData.class.php b/inc/SP/DataModel/FileExtData.php similarity index 100% rename from inc/SP/DataModel/FileExtData.class.php rename to inc/SP/DataModel/FileExtData.php diff --git a/inc/SP/DataModel/GroupAccountsData.class.php b/inc/SP/DataModel/GroupAccountsData.php similarity index 100% rename from inc/SP/DataModel/GroupAccountsData.class.php rename to inc/SP/DataModel/GroupAccountsData.php diff --git a/inc/SP/DataModel/GroupData.class.php b/inc/SP/DataModel/GroupData.php similarity index 100% rename from inc/SP/DataModel/GroupData.class.php rename to inc/SP/DataModel/GroupData.php diff --git a/inc/SP/DataModel/GroupUsersData.class.php b/inc/SP/DataModel/GroupUsersData.php similarity index 100% rename from inc/SP/DataModel/GroupUsersData.class.php rename to inc/SP/DataModel/GroupUsersData.php diff --git a/inc/SP/DataModel/InstallData.class.php b/inc/SP/DataModel/InstallData.php similarity index 100% rename from inc/SP/DataModel/InstallData.class.php rename to inc/SP/DataModel/InstallData.php diff --git a/inc/SP/DataModel/ItemSearchData.class.php b/inc/SP/DataModel/ItemSearchData.php similarity index 100% rename from inc/SP/DataModel/ItemSearchData.class.php rename to inc/SP/DataModel/ItemSearchData.php diff --git a/inc/SP/DataModel/NoticeData.class.php b/inc/SP/DataModel/NoticeData.php similarity index 100% rename from inc/SP/DataModel/NoticeData.class.php rename to inc/SP/DataModel/NoticeData.php diff --git a/inc/SP/DataModel/PluginData.class.php b/inc/SP/DataModel/PluginData.php similarity index 100% rename from inc/SP/DataModel/PluginData.class.php rename to inc/SP/DataModel/PluginData.php diff --git a/inc/SP/DataModel/ProfileBaseData.class.php b/inc/SP/DataModel/ProfileBaseData.php similarity index 100% rename from inc/SP/DataModel/ProfileBaseData.class.php rename to inc/SP/DataModel/ProfileBaseData.php diff --git a/inc/SP/DataModel/ProfileData.class.php b/inc/SP/DataModel/ProfileData.php similarity index 100% rename from inc/SP/DataModel/ProfileData.class.php rename to inc/SP/DataModel/ProfileData.php diff --git a/inc/SP/DataModel/PublicLinkBaseData.class.php b/inc/SP/DataModel/PublicLinkBaseData.php similarity index 100% rename from inc/SP/DataModel/PublicLinkBaseData.class.php rename to inc/SP/DataModel/PublicLinkBaseData.php diff --git a/inc/SP/DataModel/PublicLinkData.class.php b/inc/SP/DataModel/PublicLinkData.php similarity index 100% rename from inc/SP/DataModel/PublicLinkData.class.php rename to inc/SP/DataModel/PublicLinkData.php diff --git a/inc/SP/DataModel/PublicLinkListData.class.php b/inc/SP/DataModel/PublicLinkListData.php similarity index 100% rename from inc/SP/DataModel/PublicLinkListData.class.php rename to inc/SP/DataModel/PublicLinkListData.php diff --git a/inc/SP/DataModel/TagData.class.php b/inc/SP/DataModel/TagData.php similarity index 100% rename from inc/SP/DataModel/TagData.class.php rename to inc/SP/DataModel/TagData.php diff --git a/inc/SP/DataModel/TrackData.class.php b/inc/SP/DataModel/TrackData.php similarity index 100% rename from inc/SP/DataModel/TrackData.class.php rename to inc/SP/DataModel/TrackData.php diff --git a/inc/SP/DataModel/UserData.class.php b/inc/SP/DataModel/UserData.php similarity index 100% rename from inc/SP/DataModel/UserData.class.php rename to inc/SP/DataModel/UserData.php diff --git a/inc/SP/DataModel/UserLoginData.class.php b/inc/SP/DataModel/UserLoginData.php similarity index 100% rename from inc/SP/DataModel/UserLoginData.class.php rename to inc/SP/DataModel/UserLoginData.php diff --git a/inc/SP/DataModel/UserPassData.class.php b/inc/SP/DataModel/UserPassData.php similarity index 100% rename from inc/SP/DataModel/UserPassData.class.php rename to inc/SP/DataModel/UserPassData.php diff --git a/inc/SP/DataModel/UserPassRecoverData.class.php b/inc/SP/DataModel/UserPassRecoverData.php similarity index 100% rename from inc/SP/DataModel/UserPassRecoverData.class.php rename to inc/SP/DataModel/UserPassRecoverData.php diff --git a/inc/SP/DataModel/UserPreferencesData.class.php b/inc/SP/DataModel/UserPreferencesData.php similarity index 100% rename from inc/SP/DataModel/UserPreferencesData.class.php rename to inc/SP/DataModel/UserPreferencesData.php diff --git a/inc/SP/Forms/AccountForm.class.php b/inc/SP/Forms/AccountForm.php similarity index 100% rename from inc/SP/Forms/AccountForm.class.php rename to inc/SP/Forms/AccountForm.php diff --git a/inc/SP/Forms/ApiTokenForm.class.php b/inc/SP/Forms/ApiTokenForm.php similarity index 100% rename from inc/SP/Forms/ApiTokenForm.class.php rename to inc/SP/Forms/ApiTokenForm.php diff --git a/inc/SP/Forms/CategoryForm.class.php b/inc/SP/Forms/CategoryForm.php similarity index 100% rename from inc/SP/Forms/CategoryForm.class.php rename to inc/SP/Forms/CategoryForm.php diff --git a/inc/SP/Forms/CustomFieldDefForm.class.php b/inc/SP/Forms/CustomFieldDefForm.php similarity index 100% rename from inc/SP/Forms/CustomFieldDefForm.class.php rename to inc/SP/Forms/CustomFieldDefForm.php diff --git a/inc/SP/Forms/CustomerForm.class.php b/inc/SP/Forms/CustomerForm.php similarity index 100% rename from inc/SP/Forms/CustomerForm.class.php rename to inc/SP/Forms/CustomerForm.php diff --git a/inc/SP/Forms/FormBase.class.php b/inc/SP/Forms/FormBase.php similarity index 100% rename from inc/SP/Forms/FormBase.class.php rename to inc/SP/Forms/FormBase.php diff --git a/inc/SP/Forms/FormInterface.class.php b/inc/SP/Forms/FormInterface.php similarity index 100% rename from inc/SP/Forms/FormInterface.class.php rename to inc/SP/Forms/FormInterface.php diff --git a/inc/SP/Forms/GroupForm.class.php b/inc/SP/Forms/GroupForm.php similarity index 100% rename from inc/SP/Forms/GroupForm.class.php rename to inc/SP/Forms/GroupForm.php diff --git a/inc/SP/Forms/NoticeForm.class.php b/inc/SP/Forms/NoticeForm.php similarity index 100% rename from inc/SP/Forms/NoticeForm.class.php rename to inc/SP/Forms/NoticeForm.php diff --git a/inc/SP/Forms/ProfileForm.class.php b/inc/SP/Forms/ProfileForm.php similarity index 100% rename from inc/SP/Forms/ProfileForm.class.php rename to inc/SP/Forms/ProfileForm.php diff --git a/inc/SP/Forms/PublicLinkForm.class.php b/inc/SP/Forms/PublicLinkForm.php similarity index 100% rename from inc/SP/Forms/PublicLinkForm.class.php rename to inc/SP/Forms/PublicLinkForm.php diff --git a/inc/SP/Forms/TagForm.class.php b/inc/SP/Forms/TagForm.php similarity index 100% rename from inc/SP/Forms/TagForm.class.php rename to inc/SP/Forms/TagForm.php diff --git a/inc/SP/Forms/UserForm.class.php b/inc/SP/Forms/UserForm.php similarity index 100% rename from inc/SP/Forms/UserForm.class.php rename to inc/SP/Forms/UserForm.php diff --git a/inc/SP/Html/Assets/FontIcon.class.php b/inc/SP/Html/Assets/FontIcon.php similarity index 100% rename from inc/SP/Html/Assets/FontIcon.class.php rename to inc/SP/Html/Assets/FontIcon.php diff --git a/inc/SP/Html/Assets/IconBase.class.php b/inc/SP/Html/Assets/IconBase.php similarity index 100% rename from inc/SP/Html/Assets/IconBase.class.php rename to inc/SP/Html/Assets/IconBase.php diff --git a/inc/SP/Html/Assets/IconInterface.class.php b/inc/SP/Html/Assets/IconInterface.php similarity index 100% rename from inc/SP/Html/Assets/IconInterface.class.php rename to inc/SP/Html/Assets/IconInterface.php diff --git a/inc/SP/Html/Assets/ImageIcon.class.php b/inc/SP/Html/Assets/ImageIcon.php similarity index 100% rename from inc/SP/Html/Assets/ImageIcon.class.php rename to inc/SP/Html/Assets/ImageIcon.php diff --git a/inc/SP/Html/DataGrid/DataGrid.class.php b/inc/SP/Html/DataGrid/DataGrid.php similarity index 100% rename from inc/SP/Html/DataGrid/DataGrid.class.php rename to inc/SP/Html/DataGrid/DataGrid.php diff --git a/inc/SP/Html/DataGrid/DataGridAction.class.php b/inc/SP/Html/DataGrid/DataGridAction.php similarity index 100% rename from inc/SP/Html/DataGrid/DataGridAction.class.php rename to inc/SP/Html/DataGrid/DataGridAction.php diff --git a/inc/SP/Html/DataGrid/DataGridActionBase.class.php b/inc/SP/Html/DataGrid/DataGridActionBase.php similarity index 100% rename from inc/SP/Html/DataGrid/DataGridActionBase.class.php rename to inc/SP/Html/DataGrid/DataGridActionBase.php diff --git a/inc/SP/Html/DataGrid/DataGridActionInterface.class.php b/inc/SP/Html/DataGrid/DataGridActionInterface.php similarity index 100% rename from inc/SP/Html/DataGrid/DataGridActionInterface.class.php rename to inc/SP/Html/DataGrid/DataGridActionInterface.php diff --git a/inc/SP/Html/DataGrid/DataGridActionSearch.class.php b/inc/SP/Html/DataGrid/DataGridActionSearch.php similarity index 100% rename from inc/SP/Html/DataGrid/DataGridActionSearch.class.php rename to inc/SP/Html/DataGrid/DataGridActionSearch.php diff --git a/inc/SP/Html/DataGrid/DataGridActionType.class.php b/inc/SP/Html/DataGrid/DataGridActionType.php similarity index 100% rename from inc/SP/Html/DataGrid/DataGridActionType.class.php rename to inc/SP/Html/DataGrid/DataGridActionType.php diff --git a/inc/SP/Html/DataGrid/DataGridBase.class.php b/inc/SP/Html/DataGrid/DataGridBase.php similarity index 100% rename from inc/SP/Html/DataGrid/DataGridBase.class.php rename to inc/SP/Html/DataGrid/DataGridBase.php diff --git a/inc/SP/Html/DataGrid/DataGridData.class.php b/inc/SP/Html/DataGrid/DataGridData.php similarity index 100% rename from inc/SP/Html/DataGrid/DataGridData.class.php rename to inc/SP/Html/DataGrid/DataGridData.php diff --git a/inc/SP/Html/DataGrid/DataGridDataBase.class.php b/inc/SP/Html/DataGrid/DataGridDataBase.php similarity index 100% rename from inc/SP/Html/DataGrid/DataGridDataBase.class.php rename to inc/SP/Html/DataGrid/DataGridDataBase.php diff --git a/inc/SP/Html/DataGrid/DataGridDataInterface.class.php b/inc/SP/Html/DataGrid/DataGridDataInterface.php similarity index 100% rename from inc/SP/Html/DataGrid/DataGridDataInterface.class.php rename to inc/SP/Html/DataGrid/DataGridDataInterface.php diff --git a/inc/SP/Html/DataGrid/DataGridHeader.class.php b/inc/SP/Html/DataGrid/DataGridHeader.php similarity index 100% rename from inc/SP/Html/DataGrid/DataGridHeader.class.php rename to inc/SP/Html/DataGrid/DataGridHeader.php diff --git a/inc/SP/Html/DataGrid/DataGridHeaderBase.class.php b/inc/SP/Html/DataGrid/DataGridHeaderBase.php similarity index 100% rename from inc/SP/Html/DataGrid/DataGridHeaderBase.class.php rename to inc/SP/Html/DataGrid/DataGridHeaderBase.php diff --git a/inc/SP/Html/DataGrid/DataGridHeaderInterface.class.php b/inc/SP/Html/DataGrid/DataGridHeaderInterface.php similarity index 100% rename from inc/SP/Html/DataGrid/DataGridHeaderInterface.class.php rename to inc/SP/Html/DataGrid/DataGridHeaderInterface.php diff --git a/inc/SP/Html/DataGrid/DataGridHeaderSort.class.php b/inc/SP/Html/DataGrid/DataGridHeaderSort.php similarity index 100% rename from inc/SP/Html/DataGrid/DataGridHeaderSort.class.php rename to inc/SP/Html/DataGrid/DataGridHeaderSort.php diff --git a/inc/SP/Html/DataGrid/DataGridInterface.class.php b/inc/SP/Html/DataGrid/DataGridInterface.php similarity index 100% rename from inc/SP/Html/DataGrid/DataGridInterface.class.php rename to inc/SP/Html/DataGrid/DataGridInterface.php diff --git a/inc/SP/Html/DataGrid/DataGridPager.class.php b/inc/SP/Html/DataGrid/DataGridPager.php similarity index 100% rename from inc/SP/Html/DataGrid/DataGridPager.class.php rename to inc/SP/Html/DataGrid/DataGridPager.php diff --git a/inc/SP/Html/DataGrid/DataGridPagerBase.class.php b/inc/SP/Html/DataGrid/DataGridPagerBase.php similarity index 100% rename from inc/SP/Html/DataGrid/DataGridPagerBase.class.php rename to inc/SP/Html/DataGrid/DataGridPagerBase.php diff --git a/inc/SP/Html/DataGrid/DataGridPagerInterface.class.php b/inc/SP/Html/DataGrid/DataGridPagerInterface.php similarity index 100% rename from inc/SP/Html/DataGrid/DataGridPagerInterface.class.php rename to inc/SP/Html/DataGrid/DataGridPagerInterface.php diff --git a/inc/SP/Html/DataGrid/DataGridSort.class.php b/inc/SP/Html/DataGrid/DataGridSort.php similarity index 100% rename from inc/SP/Html/DataGrid/DataGridSort.class.php rename to inc/SP/Html/DataGrid/DataGridSort.php diff --git a/inc/SP/Html/DataGrid/DataGridSortInterface.class.php b/inc/SP/Html/DataGrid/DataGridSortInterface.php similarity index 100% rename from inc/SP/Html/DataGrid/DataGridSortInterface.class.php rename to inc/SP/Html/DataGrid/DataGridSortInterface.php diff --git a/inc/SP/Html/DataGrid/DataGridTab.class.php b/inc/SP/Html/DataGrid/DataGridTab.php similarity index 100% rename from inc/SP/Html/DataGrid/DataGridTab.class.php rename to inc/SP/Html/DataGrid/DataGridTab.php diff --git a/inc/SP/Html/Html.class.php b/inc/SP/Html/Html.php similarity index 100% rename from inc/SP/Html/Html.class.php rename to inc/SP/Html/Html.php diff --git a/inc/SP/Html/Minify.class.php b/inc/SP/Html/Minify.php similarity index 100% rename from inc/SP/Html/Minify.class.php rename to inc/SP/Html/Minify.php diff --git a/inc/SP/Http/Cookies.class.php b/inc/SP/Http/Cookies.php similarity index 100% rename from inc/SP/Http/Cookies.class.php rename to inc/SP/Http/Cookies.php diff --git a/inc/SP/Http/JsonResponse.class.php b/inc/SP/Http/JsonResponse.php similarity index 100% rename from inc/SP/Http/JsonResponse.class.php rename to inc/SP/Http/JsonResponse.php diff --git a/inc/SP/Http/Message.class.php b/inc/SP/Http/Message.php similarity index 100% rename from inc/SP/Http/Message.class.php rename to inc/SP/Http/Message.php diff --git a/inc/SP/Http/Request.class.php b/inc/SP/Http/Request.php similarity index 100% rename from inc/SP/Http/Request.class.php rename to inc/SP/Http/Request.php diff --git a/inc/SP/Http/Response.class.php b/inc/SP/Http/Response.php similarity index 100% rename from inc/SP/Http/Response.class.php rename to inc/SP/Http/Response.php diff --git a/inc/SP/Http/XMLRPCResponseParse.class.php b/inc/SP/Http/XMLRPCResponseParse.php similarity index 100% rename from inc/SP/Http/XMLRPCResponseParse.class.php rename to inc/SP/Http/XMLRPCResponseParse.php diff --git a/inc/SP/Import/CsvImport.class.php b/inc/SP/Import/CsvImport.php similarity index 100% rename from inc/SP/Import/CsvImport.class.php rename to inc/SP/Import/CsvImport.php diff --git a/inc/SP/Import/CsvImportBase.class.php b/inc/SP/Import/CsvImportBase.php similarity index 100% rename from inc/SP/Import/CsvImportBase.class.php rename to inc/SP/Import/CsvImportBase.php diff --git a/inc/SP/Import/FileImport.class.php b/inc/SP/Import/FileImport.php similarity index 100% rename from inc/SP/Import/FileImport.class.php rename to inc/SP/Import/FileImport.php diff --git a/inc/SP/Import/Import.class.php b/inc/SP/Import/Import.php similarity index 100% rename from inc/SP/Import/Import.class.php rename to inc/SP/Import/Import.php diff --git a/inc/SP/Import/ImportBase.class.php b/inc/SP/Import/ImportBase.php similarity index 100% rename from inc/SP/Import/ImportBase.class.php rename to inc/SP/Import/ImportBase.php diff --git a/inc/SP/Import/ImportInterface.class.php b/inc/SP/Import/ImportInterface.php similarity index 100% rename from inc/SP/Import/ImportInterface.class.php rename to inc/SP/Import/ImportInterface.php diff --git a/inc/SP/Import/ImportParams.class.php b/inc/SP/Import/ImportParams.php similarity index 100% rename from inc/SP/Import/ImportParams.class.php rename to inc/SP/Import/ImportParams.php diff --git a/inc/SP/Import/KeepassImport.class.php b/inc/SP/Import/KeepassImport.php similarity index 100% rename from inc/SP/Import/KeepassImport.class.php rename to inc/SP/Import/KeepassImport.php diff --git a/inc/SP/Import/KeepassXImport.class.php b/inc/SP/Import/KeepassXImport.php similarity index 100% rename from inc/SP/Import/KeepassXImport.class.php rename to inc/SP/Import/KeepassXImport.php diff --git a/inc/SP/Import/SyspassImport.class.php b/inc/SP/Import/SyspassImport.php similarity index 100% rename from inc/SP/Import/SyspassImport.class.php rename to inc/SP/Import/SyspassImport.php diff --git a/inc/SP/Import/XmlFileImport.class.php b/inc/SP/Import/XmlFileImport.php similarity index 100% rename from inc/SP/Import/XmlFileImport.class.php rename to inc/SP/Import/XmlFileImport.php diff --git a/inc/SP/Import/XmlImport.class.php b/inc/SP/Import/XmlImport.php similarity index 100% rename from inc/SP/Import/XmlImport.class.php rename to inc/SP/Import/XmlImport.php diff --git a/inc/SP/Import/XmlImportTrait.class.php b/inc/SP/Import/XmlImportTrait.php similarity index 100% rename from inc/SP/Import/XmlImportTrait.class.php rename to inc/SP/Import/XmlImportTrait.php diff --git a/inc/SP/Log/AbstractLogger.class.php b/inc/SP/Log/AbstractLogger.php similarity index 100% rename from inc/SP/Log/AbstractLogger.class.php rename to inc/SP/Log/AbstractLogger.php diff --git a/inc/SP/Log/ActionLog.class.php b/inc/SP/Log/ActionLog.php similarity index 100% rename from inc/SP/Log/ActionLog.class.php rename to inc/SP/Log/ActionLog.php diff --git a/inc/SP/Log/Email.class.php b/inc/SP/Log/Email.php similarity index 100% rename from inc/SP/Log/Email.class.php rename to inc/SP/Log/Email.php diff --git a/inc/SP/Log/Log.class.php b/inc/SP/Log/Log.php similarity index 100% rename from inc/SP/Log/Log.class.php rename to inc/SP/Log/Log.php diff --git a/inc/SP/Log/LogLevel.class.php b/inc/SP/Log/LogLevel.php similarity index 100% rename from inc/SP/Log/LogLevel.class.php rename to inc/SP/Log/LogLevel.php diff --git a/inc/SP/Log/LogUtil.class.php b/inc/SP/Log/LogUtil.php similarity index 100% rename from inc/SP/Log/LogUtil.class.php rename to inc/SP/Log/LogUtil.php diff --git a/inc/SP/Log/LoggerInterface.class.php b/inc/SP/Log/LoggerInterface.php similarity index 100% rename from inc/SP/Log/LoggerInterface.class.php rename to inc/SP/Log/LoggerInterface.php diff --git a/inc/SP/Log/Syslog.class.php b/inc/SP/Log/Syslog.php similarity index 100% rename from inc/SP/Log/Syslog.class.php rename to inc/SP/Log/Syslog.php diff --git a/inc/SP/Mgmt/ApiTokens/ApiToken.class.php b/inc/SP/Mgmt/ApiTokens/ApiToken.php similarity index 100% rename from inc/SP/Mgmt/ApiTokens/ApiToken.class.php rename to inc/SP/Mgmt/ApiTokens/ApiToken.php diff --git a/inc/SP/Mgmt/ApiTokens/ApiTokenBase.class.php b/inc/SP/Mgmt/ApiTokens/ApiTokenBase.php similarity index 100% rename from inc/SP/Mgmt/ApiTokens/ApiTokenBase.class.php rename to inc/SP/Mgmt/ApiTokens/ApiTokenBase.php diff --git a/inc/SP/Mgmt/ApiTokens/ApiTokenSearch.class.php b/inc/SP/Mgmt/ApiTokens/ApiTokenSearch.php similarity index 100% rename from inc/SP/Mgmt/ApiTokens/ApiTokenSearch.class.php rename to inc/SP/Mgmt/ApiTokens/ApiTokenSearch.php diff --git a/inc/SP/Mgmt/ApiTokens/ApiTokensUtil.class.php b/inc/SP/Mgmt/ApiTokens/ApiTokensUtil.php similarity index 100% rename from inc/SP/Mgmt/ApiTokens/ApiTokensUtil.class.php rename to inc/SP/Mgmt/ApiTokens/ApiTokensUtil.php diff --git a/inc/SP/Mgmt/Categories/Category.class.php b/inc/SP/Mgmt/Categories/Category.php similarity index 100% rename from inc/SP/Mgmt/Categories/Category.class.php rename to inc/SP/Mgmt/Categories/Category.php diff --git a/inc/SP/Mgmt/Categories/CategoryBase.class.php b/inc/SP/Mgmt/Categories/CategoryBase.php similarity index 100% rename from inc/SP/Mgmt/Categories/CategoryBase.class.php rename to inc/SP/Mgmt/Categories/CategoryBase.php diff --git a/inc/SP/Mgmt/Categories/CategorySearch.class.php b/inc/SP/Mgmt/Categories/CategorySearch.php similarity index 100% rename from inc/SP/Mgmt/Categories/CategorySearch.class.php rename to inc/SP/Mgmt/Categories/CategorySearch.php diff --git a/inc/SP/Mgmt/CustomFields/CustomField.class.php b/inc/SP/Mgmt/CustomFields/CustomField.php similarity index 100% rename from inc/SP/Mgmt/CustomFields/CustomField.class.php rename to inc/SP/Mgmt/CustomFields/CustomField.php diff --git a/inc/SP/Mgmt/CustomFields/CustomFieldBase.class.php b/inc/SP/Mgmt/CustomFields/CustomFieldBase.php similarity index 100% rename from inc/SP/Mgmt/CustomFields/CustomFieldBase.class.php rename to inc/SP/Mgmt/CustomFields/CustomFieldBase.php diff --git a/inc/SP/Mgmt/CustomFields/CustomFieldDef.class.php b/inc/SP/Mgmt/CustomFields/CustomFieldDef.php similarity index 100% rename from inc/SP/Mgmt/CustomFields/CustomFieldDef.class.php rename to inc/SP/Mgmt/CustomFields/CustomFieldDef.php diff --git a/inc/SP/Mgmt/CustomFields/CustomFieldDefSearch.class.php b/inc/SP/Mgmt/CustomFields/CustomFieldDefSearch.php similarity index 100% rename from inc/SP/Mgmt/CustomFields/CustomFieldDefSearch.class.php rename to inc/SP/Mgmt/CustomFields/CustomFieldDefSearch.php diff --git a/inc/SP/Mgmt/CustomFields/CustomFieldTypes.class.php b/inc/SP/Mgmt/CustomFields/CustomFieldTypes.php similarity index 100% rename from inc/SP/Mgmt/CustomFields/CustomFieldTypes.class.php rename to inc/SP/Mgmt/CustomFields/CustomFieldTypes.php diff --git a/inc/SP/Mgmt/CustomFields/CustomFieldsUtil.class.php b/inc/SP/Mgmt/CustomFields/CustomFieldsUtil.php similarity index 100% rename from inc/SP/Mgmt/CustomFields/CustomFieldsUtil.class.php rename to inc/SP/Mgmt/CustomFields/CustomFieldsUtil.php diff --git a/inc/SP/Mgmt/Customers/Customer.class.php b/inc/SP/Mgmt/Customers/Customer.php similarity index 100% rename from inc/SP/Mgmt/Customers/Customer.class.php rename to inc/SP/Mgmt/Customers/Customer.php diff --git a/inc/SP/Mgmt/Customers/CustomerBase.class.php b/inc/SP/Mgmt/Customers/CustomerBase.php similarity index 100% rename from inc/SP/Mgmt/Customers/CustomerBase.class.php rename to inc/SP/Mgmt/Customers/CustomerBase.php diff --git a/inc/SP/Mgmt/Customers/CustomerSearch.class.php b/inc/SP/Mgmt/Customers/CustomerSearch.php similarity index 100% rename from inc/SP/Mgmt/Customers/CustomerSearch.class.php rename to inc/SP/Mgmt/Customers/CustomerSearch.php diff --git a/inc/SP/Mgmt/Files/File.class.php b/inc/SP/Mgmt/Files/File.php similarity index 100% rename from inc/SP/Mgmt/Files/File.class.php rename to inc/SP/Mgmt/Files/File.php diff --git a/inc/SP/Mgmt/Files/FileBase.class.php b/inc/SP/Mgmt/Files/FileBase.php similarity index 100% rename from inc/SP/Mgmt/Files/FileBase.class.php rename to inc/SP/Mgmt/Files/FileBase.php diff --git a/inc/SP/Mgmt/Files/FileSearch.class.php b/inc/SP/Mgmt/Files/FileSearch.php similarity index 100% rename from inc/SP/Mgmt/Files/FileSearch.class.php rename to inc/SP/Mgmt/Files/FileSearch.php diff --git a/inc/SP/Mgmt/Files/FileUtil.class.php b/inc/SP/Mgmt/Files/FileUtil.php similarity index 100% rename from inc/SP/Mgmt/Files/FileUtil.class.php rename to inc/SP/Mgmt/Files/FileUtil.php diff --git a/inc/SP/Mgmt/Groups/Group.class.php b/inc/SP/Mgmt/Groups/Group.php similarity index 100% rename from inc/SP/Mgmt/Groups/Group.class.php rename to inc/SP/Mgmt/Groups/Group.php diff --git a/inc/SP/Mgmt/Groups/GroupAccounts.class.php b/inc/SP/Mgmt/Groups/GroupAccounts.php similarity index 100% rename from inc/SP/Mgmt/Groups/GroupAccounts.class.php rename to inc/SP/Mgmt/Groups/GroupAccounts.php diff --git a/inc/SP/Mgmt/Groups/GroupAccountsBase.class.php b/inc/SP/Mgmt/Groups/GroupAccountsBase.php similarity index 100% rename from inc/SP/Mgmt/Groups/GroupAccountsBase.class.php rename to inc/SP/Mgmt/Groups/GroupAccountsBase.php diff --git a/inc/SP/Mgmt/Groups/GroupAccountsUtil.class.php b/inc/SP/Mgmt/Groups/GroupAccountsUtil.php similarity index 100% rename from inc/SP/Mgmt/Groups/GroupAccountsUtil.class.php rename to inc/SP/Mgmt/Groups/GroupAccountsUtil.php diff --git a/inc/SP/Mgmt/Groups/GroupBase.class.php b/inc/SP/Mgmt/Groups/GroupBase.php similarity index 100% rename from inc/SP/Mgmt/Groups/GroupBase.class.php rename to inc/SP/Mgmt/Groups/GroupBase.php diff --git a/inc/SP/Mgmt/Groups/GroupSearch.class.php b/inc/SP/Mgmt/Groups/GroupSearch.php similarity index 100% rename from inc/SP/Mgmt/Groups/GroupSearch.class.php rename to inc/SP/Mgmt/Groups/GroupSearch.php diff --git a/inc/SP/Mgmt/Groups/GroupUsers.class.php b/inc/SP/Mgmt/Groups/GroupUsers.php similarity index 100% rename from inc/SP/Mgmt/Groups/GroupUsers.class.php rename to inc/SP/Mgmt/Groups/GroupUsers.php diff --git a/inc/SP/Mgmt/Groups/GroupUsersBase.class.php b/inc/SP/Mgmt/Groups/GroupUsersBase.php similarity index 100% rename from inc/SP/Mgmt/Groups/GroupUsersBase.class.php rename to inc/SP/Mgmt/Groups/GroupUsersBase.php diff --git a/inc/SP/Mgmt/Groups/GroupUtil.class.php b/inc/SP/Mgmt/Groups/GroupUtil.php similarity index 100% rename from inc/SP/Mgmt/Groups/GroupUtil.class.php rename to inc/SP/Mgmt/Groups/GroupUtil.php diff --git a/inc/SP/Mgmt/ItemBaseInterface.class.php b/inc/SP/Mgmt/ItemBaseInterface.php similarity index 100% rename from inc/SP/Mgmt/ItemBaseInterface.class.php rename to inc/SP/Mgmt/ItemBaseInterface.php diff --git a/inc/SP/Mgmt/ItemBaseTrait.class.php b/inc/SP/Mgmt/ItemBaseTrait.php similarity index 100% rename from inc/SP/Mgmt/ItemBaseTrait.class.php rename to inc/SP/Mgmt/ItemBaseTrait.php diff --git a/inc/SP/Mgmt/ItemInterface.class.php b/inc/SP/Mgmt/ItemInterface.php similarity index 100% rename from inc/SP/Mgmt/ItemInterface.class.php rename to inc/SP/Mgmt/ItemInterface.php diff --git a/inc/SP/Mgmt/ItemSearchInterface.class.php b/inc/SP/Mgmt/ItemSearchInterface.php similarity index 100% rename from inc/SP/Mgmt/ItemSearchInterface.class.php rename to inc/SP/Mgmt/ItemSearchInterface.php diff --git a/inc/SP/Mgmt/ItemSelectInterface.class.php b/inc/SP/Mgmt/ItemSelectInterface.php similarity index 100% rename from inc/SP/Mgmt/ItemSelectInterface.class.php rename to inc/SP/Mgmt/ItemSelectInterface.php diff --git a/inc/SP/Mgmt/ItemTrait.class.php b/inc/SP/Mgmt/ItemTrait.php similarity index 100% rename from inc/SP/Mgmt/ItemTrait.class.php rename to inc/SP/Mgmt/ItemTrait.php diff --git a/inc/SP/Mgmt/Notices/Notice.class.php b/inc/SP/Mgmt/Notices/Notice.php similarity index 100% rename from inc/SP/Mgmt/Notices/Notice.class.php rename to inc/SP/Mgmt/Notices/Notice.php diff --git a/inc/SP/Mgmt/Notices/NoticeBase.class.php b/inc/SP/Mgmt/Notices/NoticeBase.php similarity index 100% rename from inc/SP/Mgmt/Notices/NoticeBase.class.php rename to inc/SP/Mgmt/Notices/NoticeBase.php diff --git a/inc/SP/Mgmt/Notices/NoticeSearch.class.php b/inc/SP/Mgmt/Notices/NoticeSearch.php similarity index 100% rename from inc/SP/Mgmt/Notices/NoticeSearch.class.php rename to inc/SP/Mgmt/Notices/NoticeSearch.php diff --git a/inc/SP/Mgmt/Plugins/Plugin.class.php b/inc/SP/Mgmt/Plugins/Plugin.php similarity index 100% rename from inc/SP/Mgmt/Plugins/Plugin.class.php rename to inc/SP/Mgmt/Plugins/Plugin.php diff --git a/inc/SP/Mgmt/Plugins/PluginBase.class.php b/inc/SP/Mgmt/Plugins/PluginBase.php similarity index 100% rename from inc/SP/Mgmt/Plugins/PluginBase.class.php rename to inc/SP/Mgmt/Plugins/PluginBase.php diff --git a/inc/SP/Mgmt/Plugins/PluginSearch.class.php b/inc/SP/Mgmt/Plugins/PluginSearch.php similarity index 100% rename from inc/SP/Mgmt/Plugins/PluginSearch.class.php rename to inc/SP/Mgmt/Plugins/PluginSearch.php diff --git a/inc/SP/Mgmt/Profiles/Profile.class.php b/inc/SP/Mgmt/Profiles/Profile.php similarity index 100% rename from inc/SP/Mgmt/Profiles/Profile.class.php rename to inc/SP/Mgmt/Profiles/Profile.php diff --git a/inc/SP/Mgmt/Profiles/ProfileBase.class.php b/inc/SP/Mgmt/Profiles/ProfileBase.php similarity index 100% rename from inc/SP/Mgmt/Profiles/ProfileBase.class.php rename to inc/SP/Mgmt/Profiles/ProfileBase.php diff --git a/inc/SP/Mgmt/Profiles/ProfileSearch.class.php b/inc/SP/Mgmt/Profiles/ProfileSearch.php similarity index 100% rename from inc/SP/Mgmt/Profiles/ProfileSearch.class.php rename to inc/SP/Mgmt/Profiles/ProfileSearch.php diff --git a/inc/SP/Mgmt/Profiles/ProfileUtil.class.php b/inc/SP/Mgmt/Profiles/ProfileUtil.php similarity index 100% rename from inc/SP/Mgmt/Profiles/ProfileUtil.class.php rename to inc/SP/Mgmt/Profiles/ProfileUtil.php diff --git a/inc/SP/Mgmt/PublicLinks/PublicLink.class.php b/inc/SP/Mgmt/PublicLinks/PublicLink.php similarity index 100% rename from inc/SP/Mgmt/PublicLinks/PublicLink.class.php rename to inc/SP/Mgmt/PublicLinks/PublicLink.php diff --git a/inc/SP/Mgmt/PublicLinks/PublicLinkBase.class.php b/inc/SP/Mgmt/PublicLinks/PublicLinkBase.php similarity index 100% rename from inc/SP/Mgmt/PublicLinks/PublicLinkBase.class.php rename to inc/SP/Mgmt/PublicLinks/PublicLinkBase.php diff --git a/inc/SP/Mgmt/PublicLinks/PublicLinkSearch.class.php b/inc/SP/Mgmt/PublicLinks/PublicLinkSearch.php similarity index 100% rename from inc/SP/Mgmt/PublicLinks/PublicLinkSearch.class.php rename to inc/SP/Mgmt/PublicLinks/PublicLinkSearch.php diff --git a/inc/SP/Mgmt/Tags/Tag.class.php b/inc/SP/Mgmt/Tags/Tag.php similarity index 100% rename from inc/SP/Mgmt/Tags/Tag.class.php rename to inc/SP/Mgmt/Tags/Tag.php diff --git a/inc/SP/Mgmt/Tags/TagBase.class.php b/inc/SP/Mgmt/Tags/TagBase.php similarity index 100% rename from inc/SP/Mgmt/Tags/TagBase.class.php rename to inc/SP/Mgmt/Tags/TagBase.php diff --git a/inc/SP/Mgmt/Tags/TagSearch.class.php b/inc/SP/Mgmt/Tags/TagSearch.php similarity index 100% rename from inc/SP/Mgmt/Tags/TagSearch.class.php rename to inc/SP/Mgmt/Tags/TagSearch.php diff --git a/inc/SP/Mgmt/Tracks/Track.class.php b/inc/SP/Mgmt/Tracks/Track.php similarity index 100% rename from inc/SP/Mgmt/Tracks/Track.class.php rename to inc/SP/Mgmt/Tracks/Track.php diff --git a/inc/SP/Mgmt/Tracks/TrackBase.class.php b/inc/SP/Mgmt/Tracks/TrackBase.php similarity index 100% rename from inc/SP/Mgmt/Tracks/TrackBase.class.php rename to inc/SP/Mgmt/Tracks/TrackBase.php diff --git a/inc/SP/Mgmt/Users/User.class.php b/inc/SP/Mgmt/Users/User.php similarity index 100% rename from inc/SP/Mgmt/Users/User.class.php rename to inc/SP/Mgmt/Users/User.php diff --git a/inc/SP/Mgmt/Users/UserBase.class.php b/inc/SP/Mgmt/Users/UserBase.php similarity index 100% rename from inc/SP/Mgmt/Users/UserBase.class.php rename to inc/SP/Mgmt/Users/UserBase.php diff --git a/inc/SP/Mgmt/Users/UserLdap.class.php b/inc/SP/Mgmt/Users/UserLdap.php similarity index 100% rename from inc/SP/Mgmt/Users/UserLdap.class.php rename to inc/SP/Mgmt/Users/UserLdap.php diff --git a/inc/SP/Mgmt/Users/UserLdapSync.class.php b/inc/SP/Mgmt/Users/UserLdapSync.php similarity index 100% rename from inc/SP/Mgmt/Users/UserLdapSync.class.php rename to inc/SP/Mgmt/Users/UserLdapSync.php diff --git a/inc/SP/Mgmt/Users/UserMigrate.class.php b/inc/SP/Mgmt/Users/UserMigrate.php similarity index 100% rename from inc/SP/Mgmt/Users/UserMigrate.class.php rename to inc/SP/Mgmt/Users/UserMigrate.php diff --git a/inc/SP/Mgmt/Users/UserPass.class.php b/inc/SP/Mgmt/Users/UserPass.php similarity index 100% rename from inc/SP/Mgmt/Users/UserPass.class.php rename to inc/SP/Mgmt/Users/UserPass.php diff --git a/inc/SP/Mgmt/Users/UserPassRecover.class.php b/inc/SP/Mgmt/Users/UserPassRecover.php similarity index 100% rename from inc/SP/Mgmt/Users/UserPassRecover.class.php rename to inc/SP/Mgmt/Users/UserPassRecover.php diff --git a/inc/SP/Mgmt/Users/UserPassRecoverBase.class.php b/inc/SP/Mgmt/Users/UserPassRecoverBase.php similarity index 100% rename from inc/SP/Mgmt/Users/UserPassRecoverBase.class.php rename to inc/SP/Mgmt/Users/UserPassRecoverBase.php diff --git a/inc/SP/Mgmt/Users/UserPreferences.class.php b/inc/SP/Mgmt/Users/UserPreferences.php similarity index 100% rename from inc/SP/Mgmt/Users/UserPreferences.class.php rename to inc/SP/Mgmt/Users/UserPreferences.php diff --git a/inc/SP/Mgmt/Users/UserPreferencesBase.class.php b/inc/SP/Mgmt/Users/UserPreferencesBase.php similarity index 100% rename from inc/SP/Mgmt/Users/UserPreferencesBase.class.php rename to inc/SP/Mgmt/Users/UserPreferencesBase.php diff --git a/inc/SP/Mgmt/Users/UserPreferencesUtil.class.php b/inc/SP/Mgmt/Users/UserPreferencesUtil.php similarity index 100% rename from inc/SP/Mgmt/Users/UserPreferencesUtil.class.php rename to inc/SP/Mgmt/Users/UserPreferencesUtil.php diff --git a/inc/SP/Mgmt/Users/UserSearch.class.php b/inc/SP/Mgmt/Users/UserSearch.php similarity index 100% rename from inc/SP/Mgmt/Users/UserSearch.class.php rename to inc/SP/Mgmt/Users/UserSearch.php diff --git a/inc/SP/Mgmt/Users/UserUtil.class.php b/inc/SP/Mgmt/Users/UserUtil.php similarity index 100% rename from inc/SP/Mgmt/Users/UserUtil.class.php rename to inc/SP/Mgmt/Users/UserUtil.php diff --git a/inc/SP/Storage/DB.class.php b/inc/SP/Storage/DB.php similarity index 100% rename from inc/SP/Storage/DB.class.php rename to inc/SP/Storage/DB.php diff --git a/inc/SP/Storage/DBStorageInterface.class.php b/inc/SP/Storage/DBStorageInterface.php similarity index 100% rename from inc/SP/Storage/DBStorageInterface.class.php rename to inc/SP/Storage/DBStorageInterface.php diff --git a/inc/SP/Storage/DBUtil.class.php b/inc/SP/Storage/DBUtil.php similarity index 100% rename from inc/SP/Storage/DBUtil.class.php rename to inc/SP/Storage/DBUtil.php diff --git a/inc/SP/Storage/FileStorageInterface.class.php b/inc/SP/Storage/FileStorageInterface.php similarity index 100% rename from inc/SP/Storage/FileStorageInterface.class.php rename to inc/SP/Storage/FileStorageInterface.php diff --git a/inc/SP/Storage/MySQLHandler.class.php b/inc/SP/Storage/MySQLHandler.php similarity index 100% rename from inc/SP/Storage/MySQLHandler.class.php rename to inc/SP/Storage/MySQLHandler.php diff --git a/inc/SP/Storage/QueryData.class.php b/inc/SP/Storage/QueryData.php similarity index 100% rename from inc/SP/Storage/QueryData.class.php rename to inc/SP/Storage/QueryData.php diff --git a/inc/SP/Storage/XmlHandler.class.php b/inc/SP/Storage/XmlHandler.php similarity index 100% rename from inc/SP/Storage/XmlHandler.class.php rename to inc/SP/Storage/XmlHandler.php diff --git a/inc/SP/Util/ArrayUtil.class.php b/inc/SP/Util/ArrayUtil.php similarity index 100% rename from inc/SP/Util/ArrayUtil.class.php rename to inc/SP/Util/ArrayUtil.php diff --git a/inc/SP/Util/Checks.class.php b/inc/SP/Util/Checks.php similarity index 100% rename from inc/SP/Util/Checks.class.php rename to inc/SP/Util/Checks.php diff --git a/inc/SP/Util/Connection.class.php b/inc/SP/Util/Connection.php similarity index 100% rename from inc/SP/Util/Connection.class.php rename to inc/SP/Util/Connection.php diff --git a/inc/SP/Util/ConnectionInterface.class.php b/inc/SP/Util/ConnectionInterface.php similarity index 100% rename from inc/SP/Util/ConnectionInterface.class.php rename to inc/SP/Util/ConnectionInterface.php diff --git a/inc/SP/Util/Filter.class.php b/inc/SP/Util/Filter.php similarity index 100% rename from inc/SP/Util/Filter.class.php rename to inc/SP/Util/Filter.php diff --git a/inc/SP/Util/HttpUtil.class.php b/inc/SP/Util/HttpUtil.php similarity index 100% rename from inc/SP/Util/HttpUtil.class.php rename to inc/SP/Util/HttpUtil.php diff --git a/inc/SP/Util/ImageUtil.class.php b/inc/SP/Util/ImageUtil.php similarity index 100% rename from inc/SP/Util/ImageUtil.class.php rename to inc/SP/Util/ImageUtil.php diff --git a/inc/SP/Util/Json.class.php b/inc/SP/Util/Json.php similarity index 100% rename from inc/SP/Util/Json.class.php rename to inc/SP/Util/Json.php diff --git a/inc/SP/Util/Util.class.php b/inc/SP/Util/Util.php similarity index 100% rename from inc/SP/Util/Util.class.php rename to inc/SP/Util/Util.php diff --git a/inc/SP/Util/Wiki/DokuWikiApi.class.php b/inc/SP/Util/Wiki/DokuWikiApi.php similarity index 100% rename from inc/SP/Util/Wiki/DokuWikiApi.class.php rename to inc/SP/Util/Wiki/DokuWikiApi.php diff --git a/inc/SP/Util/Wiki/DokuWikiApiBase.class.php b/inc/SP/Util/Wiki/DokuWikiApiBase.php similarity index 100% rename from inc/SP/Util/Wiki/DokuWikiApiBase.class.php rename to inc/SP/Util/Wiki/DokuWikiApiBase.php diff --git a/inc/SP/Util/Wiki/DokuWikiApiParse.class.php b/inc/SP/Util/Wiki/DokuWikiApiParse.php similarity index 100% rename from inc/SP/Util/Wiki/DokuWikiApiParse.class.php rename to inc/SP/Util/Wiki/DokuWikiApiParse.php diff --git a/inc/themes/material-blue/inc/Icons.class.php b/inc/themes/material-blue/inc/Icons.php similarity index 100% rename from inc/themes/material-blue/inc/Icons.class.php rename to inc/themes/material-blue/inc/Icons.php diff --git a/index.php b/index.php index 53fbcdd4..8625b831 100644 --- a/index.php +++ b/index.php @@ -26,7 +26,7 @@ use SP\Controller\MainController; use SP\Core\Init; use SP\Core\Session; -define('APP_ROOT', '.'); +define('APP_ROOT', __DIR__); require APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; diff --git a/js/js.php b/js/js.php index 5bca4c11..3396b15b 100644 --- a/js/js.php +++ b/js/js.php @@ -25,7 +25,7 @@ use SP\Html\Minify; use SP\Http\Request; -define('APP_ROOT', '..'); +define('APP_ROOT', dirname(__DIR__)); require APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; diff --git a/vendor/ademarre/binary-to-text-php b/vendor/ademarre/binary-to-text-php new file mode 160000 index 00000000..5d98d17b --- /dev/null +++ b/vendor/ademarre/binary-to-text-php @@ -0,0 +1 @@ +Subproject commit 5d98d17be16d65e03851654a717293a4317bb947 diff --git a/vendor/autoload.php b/vendor/autoload.php new file mode 100644 index 00000000..c87f6a0c --- /dev/null +++ b/vendor/autoload.php @@ -0,0 +1,7 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see http://www.php-fig.org/psr/psr-0/ + * @see http://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + + private $useIncludePath = false; + private $classMap = array(); + private $classMapAuthoritative = false; + private $missingClasses = array(); + private $apcuPrefix; + + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', $this->prefixesPsr0); + } + + return array(); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return bool|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath.'\\'; + if (isset($this->prefixDirsPsr4[$search])) { + foreach ($this->prefixDirsPsr4[$search] as $dir) { + $length = $this->prefixLengthsPsr4[$first][$search]; + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; +} diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE new file mode 100644 index 00000000..f27399a0 --- /dev/null +++ b/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php new file mode 100644 index 00000000..24cb1e66 --- /dev/null +++ b/vendor/composer/autoload_classmap.php @@ -0,0 +1,366 @@ + $vendorDir . '/ademarre/binary-to-text-php/Base2n.php', + 'Defuse\\Crypto\\Core' => $vendorDir . '/defuse/php-encryption/src/Core.php', + 'Defuse\\Crypto\\Crypto' => $vendorDir . '/defuse/php-encryption/src/Crypto.php', + 'Defuse\\Crypto\\DerivedKeys' => $vendorDir . '/defuse/php-encryption/src/DerivedKeys.php', + 'Defuse\\Crypto\\Encoding' => $vendorDir . '/defuse/php-encryption/src/Encoding.php', + 'Defuse\\Crypto\\Exception\\BadFormatException' => $vendorDir . '/defuse/php-encryption/src/Exception/BadFormatException.php', + 'Defuse\\Crypto\\Exception\\CryptoException' => $vendorDir . '/defuse/php-encryption/src/Exception/CryptoException.php', + 'Defuse\\Crypto\\Exception\\EnvironmentIsBrokenException' => $vendorDir . '/defuse/php-encryption/src/Exception/EnvironmentIsBrokenException.php', + 'Defuse\\Crypto\\Exception\\IOException' => $vendorDir . '/defuse/php-encryption/src/Exception/IOException.php', + 'Defuse\\Crypto\\Exception\\WrongKeyOrModifiedCiphertextException' => $vendorDir . '/defuse/php-encryption/src/Exception/WrongKeyOrModifiedCiphertextException.php', + 'Defuse\\Crypto\\File' => $vendorDir . '/defuse/php-encryption/src/File.php', + 'Defuse\\Crypto\\Key' => $vendorDir . '/defuse/php-encryption/src/Key.php', + 'Defuse\\Crypto\\KeyOrPassword' => $vendorDir . '/defuse/php-encryption/src/KeyOrPassword.php', + 'Defuse\\Crypto\\KeyProtectedByPassword' => $vendorDir . '/defuse/php-encryption/src/KeyProtectedByPassword.php', + 'Defuse\\Crypto\\RuntimeTests' => $vendorDir . '/defuse/php-encryption/src/RuntimeTests.php', + 'PHPMailer\\PHPMailer\\Exception' => $vendorDir . '/phpmailer/phpmailer/src/Exception.php', + 'PHPMailer\\PHPMailer\\OAuth' => $vendorDir . '/phpmailer/phpmailer/src/OAuth.php', + 'PHPMailer\\PHPMailer\\PHPMailer' => $vendorDir . '/phpmailer/phpmailer/src/PHPMailer.php', + 'PHPMailer\\PHPMailer\\POP3' => $vendorDir . '/phpmailer/phpmailer/src/POP3.php', + 'PHPMailer\\PHPMailer\\SMTP' => $vendorDir . '/phpmailer/phpmailer/src/SMTP.php', + 'SP\\Account\\Account' => $baseDir . '/inc/SP/Account/Account.php', + 'SP\\Account\\AccountAcl' => $baseDir . '/inc/SP/Account/AccountAcl.php', + 'SP\\Account\\AccountBase' => $baseDir . '/inc/SP/Account/AccountBase.php', + 'SP\\Account\\AccountCrypt' => $baseDir . '/inc/SP/Account/AccountCrypt.php', + 'SP\\Account\\AccountFavorites' => $baseDir . '/inc/SP/Account/AccountFavorites.php', + 'SP\\Account\\AccountHistory' => $baseDir . '/inc/SP/Account/AccountHistory.php', + 'SP\\Account\\AccountHistoryCrypt' => $baseDir . '/inc/SP/Account/AccountHistoryCrypt.php', + 'SP\\Account\\AccountHistoryUtil' => $baseDir . '/inc/SP/Account/AccountHistoryUtil.php', + 'SP\\Account\\AccountInterface' => $baseDir . '/inc/SP/Account/AccountInterface.php', + 'SP\\Account\\AccountSearch' => $baseDir . '/inc/SP/Account/AccountSearch.php', + 'SP\\Account\\AccountTags' => $baseDir . '/inc/SP/Account/AccountTags.php', + 'SP\\Account\\AccountUtil' => $baseDir . '/inc/SP/Account/AccountUtil.php', + 'SP\\Account\\AccountsSearchItem' => $baseDir . '/inc/SP/Account/AccountsSearchItem.php', + 'SP\\Account\\UserAccounts' => $baseDir . '/inc/SP/Account/UserAccounts.php', + 'SP\\Api\\ApiBase' => $baseDir . '/inc/SP/Api/ApiBase.php', + 'SP\\Api\\ApiInterface' => $baseDir . '/inc/SP/Api/ApiInterface.php', + 'SP\\Api\\ApiRequest' => $baseDir . '/inc/SP/Api/ApiRequest.php', + 'SP\\Api\\ApiUtil' => $baseDir . '/inc/SP/Api/ApiUtil.php', + 'SP\\Api\\SyspassApi' => $baseDir . '/inc/SP/Api/SyspassApi.php', + 'SP\\Auth\\Auth' => $baseDir . '/inc/SP/Auth/Auth.php', + 'SP\\Auth\\AuthDataBase' => $baseDir . '/inc/SP/Auth/AuthDataBase.php', + 'SP\\Auth\\AuthInterface' => $baseDir . '/inc/SP/Auth/AuthInterface.php', + 'SP\\Auth\\AuthResult' => $baseDir . '/inc/SP/Auth/AuthResult.php', + 'SP\\Auth\\AuthUtil' => $baseDir . '/inc/SP/Auth/AuthUtil.php', + 'SP\\Auth\\Browser\\Browser' => $baseDir . '/inc/SP/Auth/Browser/Browser.php', + 'SP\\Auth\\Browser\\BrowserAuthData' => $baseDir . '/inc/SP/Auth/Browser/BrowserAuthData.php', + 'SP\\Auth\\Database\\Database' => $baseDir . '/inc/SP/Auth/Database/Database.php', + 'SP\\Auth\\Database\\DatabaseAuthData' => $baseDir . '/inc/SP/Auth/Database/DatabaseAuthData.php', + 'SP\\Auth\\Ldap\\LdapAuthData' => $baseDir . '/inc/SP/Auth/Ldap/LdapAuthData.php', + 'SP\\Auth\\Ldap\\LdapBase' => $baseDir . '/inc/SP/Auth/Ldap/LdapBase.php', + 'SP\\Auth\\Ldap\\LdapInterface' => $baseDir . '/inc/SP/Auth/Ldap/LdapInterface.php', + 'SP\\Auth\\Ldap\\LdapMsAds' => $baseDir . '/inc/SP/Auth/Ldap/LdapMsAds.php', + 'SP\\Auth\\Ldap\\LdapStd' => $baseDir . '/inc/SP/Auth/Ldap/LdapStd.php', + 'SP\\Auth\\Ldap\\LdapUtil' => $baseDir . '/inc/SP/Auth/Ldap/LdapUtil.php', + 'SP\\Config\\Config' => $baseDir . '/inc/SP/Config/Config.php', + 'SP\\Config\\ConfigDB' => $baseDir . '/inc/SP/Config/ConfigDB.php', + 'SP\\Config\\ConfigData' => $baseDir . '/inc/SP/Config/ConfigData.php', + 'SP\\Config\\ConfigInterface' => $baseDir . '/inc/SP/Config/ConfigInterface.php', + 'SP\\Config\\ConfigUtil' => $baseDir . '/inc/SP/Config/ConfigUtil.php', + 'SP\\Controller\\AccountController' => $baseDir . '/inc/SP/Controller/AccountController.php', + 'SP\\Controller\\AccountSearchController' => $baseDir . '/inc/SP/Controller/AccountSearchController.php', + 'SP\\Controller\\ChecksController' => $baseDir . '/inc/SP/Controller/ChecksController.php', + 'SP\\Controller\\ConfigActionController' => $baseDir . '/inc/SP/Controller/ConfigActionController.php', + 'SP\\Controller\\ConfigController' => $baseDir . '/inc/SP/Controller/ConfigController.php', + 'SP\\Controller\\ControllerBase' => $baseDir . '/inc/SP/Controller/ControllerBase.php', + 'SP\\Controller\\EventlogController' => $baseDir . '/inc/SP/Controller/EventlogController.php', + 'SP\\Controller\\GridItemsSearchController' => $baseDir . '/inc/SP/Controller/GridItemsSearchController.php', + 'SP\\Controller\\GridTabControllerBase' => $baseDir . '/inc/SP/Controller/GridTabControllerBase.php', + 'SP\\Controller\\Grids\\GridBase' => $baseDir . '/inc/SP/Controller/Grids/GridBase.php', + 'SP\\Controller\\Grids\\Items' => $baseDir . '/inc/SP/Controller/Grids/Items.php', + 'SP\\Controller\\Grids\\Notices' => $baseDir . '/inc/SP/Controller/Grids/Notices.php', + 'SP\\Controller\\ItemActionController' => $baseDir . '/inc/SP/Controller/ItemActionController.php', + 'SP\\Controller\\ItemControllerInterface' => $baseDir . '/inc/SP/Controller/ItemControllerInterface.php', + 'SP\\Controller\\ItemListController' => $baseDir . '/inc/SP/Controller/ItemListController.php', + 'SP\\Controller\\ItemSearchController' => $baseDir . '/inc/SP/Controller/ItemSearchController.php', + 'SP\\Controller\\ItemShowController' => $baseDir . '/inc/SP/Controller/ItemShowController.php', + 'SP\\Controller\\ItemsController' => $baseDir . '/inc/SP/Controller/ItemsController.php', + 'SP\\Controller\\LoginController' => $baseDir . '/inc/SP/Controller/LoginController.php', + 'SP\\Controller\\MainActionController' => $baseDir . '/inc/SP/Controller/MainActionController.php', + 'SP\\Controller\\MainController' => $baseDir . '/inc/SP/Controller/MainController.php', + 'SP\\Controller\\NoticeShowController' => $baseDir . '/inc/SP/Controller/NoticeShowController.php', + 'SP\\Controller\\NoticesController' => $baseDir . '/inc/SP/Controller/NoticesController.php', + 'SP\\Controller\\NoticesSearchController' => $baseDir . '/inc/SP/Controller/NoticesSearchController.php', + 'SP\\Controller\\RequestControllerTrait' => $baseDir . '/inc/SP/Controller/RequestControllerTrait.php', + 'SP\\Controller\\TabControllerBase' => $baseDir . '/inc/SP/Controller/TabControllerBase.php', + 'SP\\Controller\\TabsInterface' => $baseDir . '/inc/SP/Controller/TabsInterface.php', + 'SP\\Controller\\TaskController' => $baseDir . '/inc/SP/Controller/TaskController.php', + 'SP\\Controller\\UserPreferencesController' => $baseDir . '/inc/SP/Controller/UserPreferencesController.php', + 'SP\\Controller\\WikiController' => $baseDir . '/inc/SP/Controller/WikiController.php', + 'SP\\Core\\Acl' => $baseDir . '/inc/SP/Core/Acl.php', + 'SP\\Core\\ActionsInterface' => $baseDir . '/inc/SP/Core/ActionsInterface.php', + 'SP\\Core\\Backup' => $baseDir . '/inc/SP/Core/Backup.php', + 'SP\\Core\\CryptMasterPass' => $baseDir . '/inc/SP/Core/CryptMasterPass.php', + 'SP\\Core\\CryptPKI' => $baseDir . '/inc/SP/Core/CryptPKI.php', + 'SP\\Core\\Crypt\\Cookie' => $baseDir . '/inc/SP/Core/Crypt/Cookie.php', + 'SP\\Core\\Crypt\\Crypt' => $baseDir . '/inc/SP/Core/Crypt/Crypt.php', + 'SP\\Core\\Crypt\\CryptSessionHandler' => $baseDir . '/inc/SP/Core/Crypt/CryptSessionHandler.php', + 'SP\\Core\\Crypt\\Hash' => $baseDir . '/inc/SP/Core/Crypt/Hash.php', + 'SP\\Core\\Crypt\\SecureKeyCookie' => $baseDir . '/inc/SP/Core/Crypt/SecureKeyCookie.php', + 'SP\\Core\\Crypt\\Session' => $baseDir . '/inc/SP/Core/Crypt/Session.php', + 'SP\\Core\\Crypt\\Vault' => $baseDir . '/inc/SP/Core/Crypt/Vault.php', + 'SP\\Core\\DiFactory' => $baseDir . '/inc/SP/Core/DiFactory.php', + 'SP\\Core\\Events\\EventDispatcher' => $baseDir . '/inc/SP/Core/Events/EventDispatcher.php', + 'SP\\Core\\Events\\EventDispatcherBase' => $baseDir . '/inc/SP/Core/Events/EventDispatcherBase.php', + 'SP\\Core\\Events\\EventDispatcherInterface' => $baseDir . '/inc/SP/Core/Events/EventDispatcherInterface.php', + 'SP\\Core\\Events\\EventReceiver' => $baseDir . '/inc/SP/Core/Events/EventReceiver.php', + 'SP\\Core\\Exceptions\\AuthException' => $baseDir . '/inc/SP/Core/Exceptions/AuthException.php', + 'SP\\Core\\Exceptions\\ConstraintException' => $baseDir . '/inc/SP/Core/Exceptions/ConstraintException.php', + 'SP\\Core\\Exceptions\\FileNotFoundException' => $baseDir . '/inc/SP/Core/Exceptions/FileNotFoundException.php', + 'SP\\Core\\Exceptions\\InvalidArgumentException' => $baseDir . '/inc/SP/Core/Exceptions/InvalidArgumentException.php', + 'SP\\Core\\Exceptions\\InvalidClassException' => $baseDir . '/inc/SP/Core/Exceptions/InvalidClassException.php', + 'SP\\Core\\Exceptions\\ItemException' => $baseDir . '/inc/SP/Core/Exceptions/ItemException.php', + 'SP\\Core\\Exceptions\\QueryException' => $baseDir . '/inc/SP/Core/Exceptions/QueryException.php', + 'SP\\Core\\Exceptions\\SPException' => $baseDir . '/inc/SP/Core/Exceptions/SPException.php', + 'SP\\Core\\Exceptions\\ValidationException' => $baseDir . '/inc/SP/Core/Exceptions/ValidationException.php', + 'SP\\Core\\Init' => $baseDir . '/inc/SP/Core/Init.php', + 'SP\\Core\\Installer' => $baseDir . '/inc/SP/Core/Installer.php', + 'SP\\Core\\ItemsTypeInterface' => $baseDir . '/inc/SP/Core/ItemsTypeInterface.php', + 'SP\\Core\\Language' => $baseDir . '/inc/SP/Core/Language.php', + 'SP\\Core\\Messages\\LogMessage' => $baseDir . '/inc/SP/Core/Messages/LogMessage.php', + 'SP\\Core\\Messages\\MessageBase' => $baseDir . '/inc/SP/Core/Messages/MessageBase.php', + 'SP\\Core\\Messages\\MessageInterface' => $baseDir . '/inc/SP/Core/Messages/MessageInterface.php', + 'SP\\Core\\Messages\\NoticeMessage' => $baseDir . '/inc/SP/Core/Messages/NoticeMessage.php', + 'SP\\Core\\Messages\\TaskMessage' => $baseDir . '/inc/SP/Core/Messages/TaskMessage.php', + 'SP\\Core\\OldCrypt' => $baseDir . '/inc/SP/Core/OldCrypt.php', + 'SP\\Core\\Plugin\\PluginBase' => $baseDir . '/inc/SP/Core/Plugin/PluginBase.php', + 'SP\\Core\\Plugin\\PluginDataStore' => $baseDir . '/inc/SP/Core/Plugin/PluginDataStore.php', + 'SP\\Core\\Plugin\\PluginInterface' => $baseDir . '/inc/SP/Core/Plugin/PluginInterface.php', + 'SP\\Core\\Plugin\\PluginUtil' => $baseDir . '/inc/SP/Core/Plugin/PluginUtil.php', + 'SP\\Core\\Session' => $baseDir . '/inc/SP/Core/Session.php', + 'SP\\Core\\SessionUtil' => $baseDir . '/inc/SP/Core/SessionUtil.php', + 'SP\\Core\\Task' => $baseDir . '/inc/SP/Core/Task.php', + 'SP\\Core\\TaskFactory' => $baseDir . '/inc/SP/Core/TaskFactory.php', + 'SP\\Core\\Template' => $baseDir . '/inc/SP/Core/Template.php', + 'SP\\Core\\UI\\Theme' => $baseDir . '/inc/SP/Core/UI/Theme.php', + 'SP\\Core\\UI\\ThemeIconsBase' => $baseDir . '/inc/SP/Core/UI/ThemeIconsBase.php', + 'SP\\Core\\UI\\ThemeIconsInterface' => $baseDir . '/inc/SP/Core/UI/ThemeIconsInterface.php', + 'SP\\Core\\UI\\ThemeInterface' => $baseDir . '/inc/SP/Core/UI/ThemeInterface.php', + 'SP\\Core\\Upgrade\\Account' => $baseDir . '/inc/SP/Core/Upgrade/Account.php', + 'SP\\Core\\Upgrade\\Category' => $baseDir . '/inc/SP/Core/Upgrade/Category.php', + 'SP\\Core\\Upgrade\\Check' => $baseDir . '/inc/SP/Core/Upgrade/Check.php', + 'SP\\Core\\Upgrade\\Crypt' => $baseDir . '/inc/SP/Core/Upgrade/Crypt.php', + 'SP\\Core\\Upgrade\\Customer' => $baseDir . '/inc/SP/Core/Upgrade/Customer.php', + 'SP\\Core\\Upgrade\\Group' => $baseDir . '/inc/SP/Core/Upgrade/Group.php', + 'SP\\Core\\Upgrade\\Profile' => $baseDir . '/inc/SP/Core/Upgrade/Profile.php', + 'SP\\Core\\Upgrade\\Upgrade' => $baseDir . '/inc/SP/Core/Upgrade/Upgrade.php', + 'SP\\Core\\Upgrade\\User' => $baseDir . '/inc/SP/Core/Upgrade/User.php', + 'SP\\Core\\XmlExport' => $baseDir . '/inc/SP/Core/XmlExport.php', + 'SP\\DataModel\\AccountData' => $baseDir . '/inc/SP/DataModel/AccountData.php', + 'SP\\DataModel\\AccountExtData' => $baseDir . '/inc/SP/DataModel/AccountExtData.php', + 'SP\\DataModel\\AccountHistoryData' => $baseDir . '/inc/SP/DataModel/AccountHistoryData.php', + 'SP\\DataModel\\AccountSearchData' => $baseDir . '/inc/SP/DataModel/AccountSearchData.php', + 'SP\\DataModel\\ApiTokenData' => $baseDir . '/inc/SP/DataModel/ApiTokenData.php', + 'SP\\DataModel\\CategoryData' => $baseDir . '/inc/SP/DataModel/CategoryData.php', + 'SP\\DataModel\\CustomFieldBaseData' => $baseDir . '/inc/SP/DataModel/CustomFieldBaseData.php', + 'SP\\DataModel\\CustomFieldData' => $baseDir . '/inc/SP/DataModel/CustomFieldData.php', + 'SP\\DataModel\\CustomFieldDefData' => $baseDir . '/inc/SP/DataModel/CustomFieldDefData.php', + 'SP\\DataModel\\CustomerData' => $baseDir . '/inc/SP/DataModel/CustomerData.php', + 'SP\\DataModel\\DataModelBase' => $baseDir . '/inc/SP/DataModel/DataModelBase.php', + 'SP\\DataModel\\DataModelInterface' => $baseDir . '/inc/SP/DataModel/DataModelInterface.php', + 'SP\\DataModel\\FileData' => $baseDir . '/inc/SP/DataModel/FileData.php', + 'SP\\DataModel\\FileExtData' => $baseDir . '/inc/SP/DataModel/FileExtData.php', + 'SP\\DataModel\\GroupAccountsData' => $baseDir . '/inc/SP/DataModel/GroupAccountsData.php', + 'SP\\DataModel\\GroupData' => $baseDir . '/inc/SP/DataModel/GroupData.php', + 'SP\\DataModel\\GroupUsersData' => $baseDir . '/inc/SP/DataModel/GroupUsersData.php', + 'SP\\DataModel\\InstallData' => $baseDir . '/inc/SP/DataModel/InstallData.php', + 'SP\\DataModel\\ItemSearchData' => $baseDir . '/inc/SP/DataModel/ItemSearchData.php', + 'SP\\DataModel\\NoticeData' => $baseDir . '/inc/SP/DataModel/NoticeData.php', + 'SP\\DataModel\\PluginData' => $baseDir . '/inc/SP/DataModel/PluginData.php', + 'SP\\DataModel\\ProfileBaseData' => $baseDir . '/inc/SP/DataModel/ProfileBaseData.php', + 'SP\\DataModel\\ProfileData' => $baseDir . '/inc/SP/DataModel/ProfileData.php', + 'SP\\DataModel\\PublicLinkBaseData' => $baseDir . '/inc/SP/DataModel/PublicLinkBaseData.php', + 'SP\\DataModel\\PublicLinkData' => $baseDir . '/inc/SP/DataModel/PublicLinkData.php', + 'SP\\DataModel\\PublicLinkListData' => $baseDir . '/inc/SP/DataModel/PublicLinkListData.php', + 'SP\\DataModel\\TagData' => $baseDir . '/inc/SP/DataModel/TagData.php', + 'SP\\DataModel\\TrackData' => $baseDir . '/inc/SP/DataModel/TrackData.php', + 'SP\\DataModel\\UserData' => $baseDir . '/inc/SP/DataModel/UserData.php', + 'SP\\DataModel\\UserLoginData' => $baseDir . '/inc/SP/DataModel/UserLoginData.php', + 'SP\\DataModel\\UserPassData' => $baseDir . '/inc/SP/DataModel/UserPassData.php', + 'SP\\DataModel\\UserPassRecoverData' => $baseDir . '/inc/SP/DataModel/UserPassRecoverData.php', + 'SP\\DataModel\\UserPreferencesData' => $baseDir . '/inc/SP/DataModel/UserPreferencesData.php', + 'SP\\Forms\\AccountForm' => $baseDir . '/inc/SP/Forms/AccountForm.php', + 'SP\\Forms\\ApiTokenForm' => $baseDir . '/inc/SP/Forms/ApiTokenForm.php', + 'SP\\Forms\\CategoryForm' => $baseDir . '/inc/SP/Forms/CategoryForm.php', + 'SP\\Forms\\CustomFieldDefForm' => $baseDir . '/inc/SP/Forms/CustomFieldDefForm.php', + 'SP\\Forms\\CustomerForm' => $baseDir . '/inc/SP/Forms/CustomerForm.php', + 'SP\\Forms\\FormBase' => $baseDir . '/inc/SP/Forms/FormBase.php', + 'SP\\Forms\\FormInterface' => $baseDir . '/inc/SP/Forms/FormInterface.php', + 'SP\\Forms\\GroupForm' => $baseDir . '/inc/SP/Forms/GroupForm.php', + 'SP\\Forms\\NoticeForm' => $baseDir . '/inc/SP/Forms/NoticeForm.php', + 'SP\\Forms\\ProfileForm' => $baseDir . '/inc/SP/Forms/ProfileForm.php', + 'SP\\Forms\\PublicLinkForm' => $baseDir . '/inc/SP/Forms/PublicLinkForm.php', + 'SP\\Forms\\TagForm' => $baseDir . '/inc/SP/Forms/TagForm.php', + 'SP\\Forms\\UserForm' => $baseDir . '/inc/SP/Forms/UserForm.php', + 'SP\\Html\\Assets\\FontIcon' => $baseDir . '/inc/SP/Html/Assets/FontIcon.php', + 'SP\\Html\\Assets\\IconBase' => $baseDir . '/inc/SP/Html/Assets/IconBase.php', + 'SP\\Html\\Assets\\IconInterface' => $baseDir . '/inc/SP/Html/Assets/IconInterface.php', + 'SP\\Html\\Assets\\ImageIcon' => $baseDir . '/inc/SP/Html/Assets/ImageIcon.php', + 'SP\\Html\\DataGrid\\DataGrid' => $baseDir . '/inc/SP/Html/DataGrid/DataGrid.php', + 'SP\\Html\\DataGrid\\DataGridAction' => $baseDir . '/inc/SP/Html/DataGrid/DataGridAction.php', + 'SP\\Html\\DataGrid\\DataGridActionBase' => $baseDir . '/inc/SP/Html/DataGrid/DataGridActionBase.php', + 'SP\\Html\\DataGrid\\DataGridActionInterface' => $baseDir . '/inc/SP/Html/DataGrid/DataGridActionInterface.php', + 'SP\\Html\\DataGrid\\DataGridActionSearch' => $baseDir . '/inc/SP/Html/DataGrid/DataGridActionSearch.php', + 'SP\\Html\\DataGrid\\DataGridActionType' => $baseDir . '/inc/SP/Html/DataGrid/DataGridActionType.php', + 'SP\\Html\\DataGrid\\DataGridBase' => $baseDir . '/inc/SP/Html/DataGrid/DataGridBase.php', + 'SP\\Html\\DataGrid\\DataGridData' => $baseDir . '/inc/SP/Html/DataGrid/DataGridData.php', + 'SP\\Html\\DataGrid\\DataGridDataBase' => $baseDir . '/inc/SP/Html/DataGrid/DataGridDataBase.php', + 'SP\\Html\\DataGrid\\DataGridDataInterface' => $baseDir . '/inc/SP/Html/DataGrid/DataGridDataInterface.php', + 'SP\\Html\\DataGrid\\DataGridHeader' => $baseDir . '/inc/SP/Html/DataGrid/DataGridHeader.php', + 'SP\\Html\\DataGrid\\DataGridHeaderBase' => $baseDir . '/inc/SP/Html/DataGrid/DataGridHeaderBase.php', + 'SP\\Html\\DataGrid\\DataGridHeaderInterface' => $baseDir . '/inc/SP/Html/DataGrid/DataGridHeaderInterface.php', + 'SP\\Html\\DataGrid\\DataGridHeaderSort' => $baseDir . '/inc/SP/Html/DataGrid/DataGridHeaderSort.php', + 'SP\\Html\\DataGrid\\DataGridInterface' => $baseDir . '/inc/SP/Html/DataGrid/DataGridInterface.php', + 'SP\\Html\\DataGrid\\DataGridPager' => $baseDir . '/inc/SP/Html/DataGrid/DataGridPager.php', + 'SP\\Html\\DataGrid\\DataGridPagerBase' => $baseDir . '/inc/SP/Html/DataGrid/DataGridPagerBase.php', + 'SP\\Html\\DataGrid\\DataGridPagerInterface' => $baseDir . '/inc/SP/Html/DataGrid/DataGridPagerInterface.php', + 'SP\\Html\\DataGrid\\DataGridSort' => $baseDir . '/inc/SP/Html/DataGrid/DataGridSort.php', + 'SP\\Html\\DataGrid\\DataGridSortInterface' => $baseDir . '/inc/SP/Html/DataGrid/DataGridSortInterface.php', + 'SP\\Html\\DataGrid\\DataGridTab' => $baseDir . '/inc/SP/Html/DataGrid/DataGridTab.php', + 'SP\\Html\\Html' => $baseDir . '/inc/SP/Html/Html.php', + 'SP\\Html\\Minify' => $baseDir . '/inc/SP/Html/Minify.php', + 'SP\\Http\\Cookies' => $baseDir . '/inc/SP/Http/Cookies.php', + 'SP\\Http\\JsonResponse' => $baseDir . '/inc/SP/Http/JsonResponse.php', + 'SP\\Http\\Message' => $baseDir . '/inc/SP/Http/Message.php', + 'SP\\Http\\Request' => $baseDir . '/inc/SP/Http/Request.php', + 'SP\\Http\\Response' => $baseDir . '/inc/SP/Http/Response.php', + 'SP\\Http\\XMLRPCResponseParse' => $baseDir . '/inc/SP/Http/XMLRPCResponseParse.php', + 'SP\\Import\\CsvImport' => $baseDir . '/inc/SP/Import/CsvImport.php', + 'SP\\Import\\CsvImportBase' => $baseDir . '/inc/SP/Import/CsvImportBase.php', + 'SP\\Import\\FileImport' => $baseDir . '/inc/SP/Import/FileImport.php', + 'SP\\Import\\Import' => $baseDir . '/inc/SP/Import/Import.php', + 'SP\\Import\\ImportBase' => $baseDir . '/inc/SP/Import/ImportBase.php', + 'SP\\Import\\ImportInterface' => $baseDir . '/inc/SP/Import/ImportInterface.php', + 'SP\\Import\\ImportParams' => $baseDir . '/inc/SP/Import/ImportParams.php', + 'SP\\Import\\KeepassImport' => $baseDir . '/inc/SP/Import/KeepassImport.php', + 'SP\\Import\\KeepassXImport' => $baseDir . '/inc/SP/Import/KeepassXImport.php', + 'SP\\Import\\SyspassImport' => $baseDir . '/inc/SP/Import/SyspassImport.php', + 'SP\\Import\\XmlFileImport' => $baseDir . '/inc/SP/Import/XmlFileImport.php', + 'SP\\Import\\XmlImport' => $baseDir . '/inc/SP/Import/XmlImport.php', + 'SP\\Import\\XmlImportTrait' => $baseDir . '/inc/SP/Import/XmlImportTrait.php', + 'SP\\Log\\AbstractLogger' => $baseDir . '/inc/SP/Log/AbstractLogger.php', + 'SP\\Log\\ActionLog' => $baseDir . '/inc/SP/Log/ActionLog.php', + 'SP\\Log\\Email' => $baseDir . '/inc/SP/Log/Email.php', + 'SP\\Log\\Log' => $baseDir . '/inc/SP/Log/Log.php', + 'SP\\Log\\LogLevel' => $baseDir . '/inc/SP/Log/LogLevel.php', + 'SP\\Log\\LogUtil' => $baseDir . '/inc/SP/Log/LogUtil.php', + 'SP\\Log\\LoggerInterface' => $baseDir . '/inc/SP/Log/LoggerInterface.php', + 'SP\\Log\\Syslog' => $baseDir . '/inc/SP/Log/Syslog.php', + 'SP\\Mgmt\\ApiTokens\\ApiToken' => $baseDir . '/inc/SP/Mgmt/ApiTokens/ApiToken.php', + 'SP\\Mgmt\\ApiTokens\\ApiTokenBase' => $baseDir . '/inc/SP/Mgmt/ApiTokens/ApiTokenBase.php', + 'SP\\Mgmt\\ApiTokens\\ApiTokenSearch' => $baseDir . '/inc/SP/Mgmt/ApiTokens/ApiTokenSearch.php', + 'SP\\Mgmt\\ApiTokens\\ApiTokensUtil' => $baseDir . '/inc/SP/Mgmt/ApiTokens/ApiTokensUtil.php', + 'SP\\Mgmt\\Categories\\Category' => $baseDir . '/inc/SP/Mgmt/Categories/Category.php', + 'SP\\Mgmt\\Categories\\CategoryBase' => $baseDir . '/inc/SP/Mgmt/Categories/CategoryBase.php', + 'SP\\Mgmt\\Categories\\CategorySearch' => $baseDir . '/inc/SP/Mgmt/Categories/CategorySearch.php', + 'SP\\Mgmt\\CustomFields\\CustomField' => $baseDir . '/inc/SP/Mgmt/CustomFields/CustomField.php', + 'SP\\Mgmt\\CustomFields\\CustomFieldBase' => $baseDir . '/inc/SP/Mgmt/CustomFields/CustomFieldBase.php', + 'SP\\Mgmt\\CustomFields\\CustomFieldDef' => $baseDir . '/inc/SP/Mgmt/CustomFields/CustomFieldDef.php', + 'SP\\Mgmt\\CustomFields\\CustomFieldDefSearch' => $baseDir . '/inc/SP/Mgmt/CustomFields/CustomFieldDefSearch.php', + 'SP\\Mgmt\\CustomFields\\CustomFieldTypes' => $baseDir . '/inc/SP/Mgmt/CustomFields/CustomFieldTypes.php', + 'SP\\Mgmt\\CustomFields\\CustomFieldsUtil' => $baseDir . '/inc/SP/Mgmt/CustomFields/CustomFieldsUtil.php', + 'SP\\Mgmt\\Customers\\Customer' => $baseDir . '/inc/SP/Mgmt/Customers/Customer.php', + 'SP\\Mgmt\\Customers\\CustomerBase' => $baseDir . '/inc/SP/Mgmt/Customers/CustomerBase.php', + 'SP\\Mgmt\\Customers\\CustomerSearch' => $baseDir . '/inc/SP/Mgmt/Customers/CustomerSearch.php', + 'SP\\Mgmt\\Files\\File' => $baseDir . '/inc/SP/Mgmt/Files/File.php', + 'SP\\Mgmt\\Files\\FileBase' => $baseDir . '/inc/SP/Mgmt/Files/FileBase.php', + 'SP\\Mgmt\\Files\\FileSearch' => $baseDir . '/inc/SP/Mgmt/Files/FileSearch.php', + 'SP\\Mgmt\\Files\\FileUtil' => $baseDir . '/inc/SP/Mgmt/Files/FileUtil.php', + 'SP\\Mgmt\\Groups\\Group' => $baseDir . '/inc/SP/Mgmt/Groups/Group.php', + 'SP\\Mgmt\\Groups\\GroupAccounts' => $baseDir . '/inc/SP/Mgmt/Groups/GroupAccounts.php', + 'SP\\Mgmt\\Groups\\GroupAccountsBase' => $baseDir . '/inc/SP/Mgmt/Groups/GroupAccountsBase.php', + 'SP\\Mgmt\\Groups\\GroupAccountsUtil' => $baseDir . '/inc/SP/Mgmt/Groups/GroupAccountsUtil.php', + 'SP\\Mgmt\\Groups\\GroupBase' => $baseDir . '/inc/SP/Mgmt/Groups/GroupBase.php', + 'SP\\Mgmt\\Groups\\GroupSearch' => $baseDir . '/inc/SP/Mgmt/Groups/GroupSearch.php', + 'SP\\Mgmt\\Groups\\GroupUsers' => $baseDir . '/inc/SP/Mgmt/Groups/GroupUsers.php', + 'SP\\Mgmt\\Groups\\GroupUsersBase' => $baseDir . '/inc/SP/Mgmt/Groups/GroupUsersBase.php', + 'SP\\Mgmt\\Groups\\GroupUtil' => $baseDir . '/inc/SP/Mgmt/Groups/GroupUtil.php', + 'SP\\Mgmt\\ItemBaseInterface' => $baseDir . '/inc/SP/Mgmt/ItemBaseInterface.php', + 'SP\\Mgmt\\ItemBaseTrait' => $baseDir . '/inc/SP/Mgmt/ItemBaseTrait.php', + 'SP\\Mgmt\\ItemInterface' => $baseDir . '/inc/SP/Mgmt/ItemInterface.php', + 'SP\\Mgmt\\ItemSearchInterface' => $baseDir . '/inc/SP/Mgmt/ItemSearchInterface.php', + 'SP\\Mgmt\\ItemSelectInterface' => $baseDir . '/inc/SP/Mgmt/ItemSelectInterface.php', + 'SP\\Mgmt\\ItemTrait' => $baseDir . '/inc/SP/Mgmt/ItemTrait.php', + 'SP\\Mgmt\\Notices\\Notice' => $baseDir . '/inc/SP/Mgmt/Notices/Notice.php', + 'SP\\Mgmt\\Notices\\NoticeBase' => $baseDir . '/inc/SP/Mgmt/Notices/NoticeBase.php', + 'SP\\Mgmt\\Notices\\NoticeSearch' => $baseDir . '/inc/SP/Mgmt/Notices/NoticeSearch.php', + 'SP\\Mgmt\\Plugins\\Plugin' => $baseDir . '/inc/SP/Mgmt/Plugins/Plugin.php', + 'SP\\Mgmt\\Plugins\\PluginBase' => $baseDir . '/inc/SP/Mgmt/Plugins/PluginBase.php', + 'SP\\Mgmt\\Plugins\\PluginSearch' => $baseDir . '/inc/SP/Mgmt/Plugins/PluginSearch.php', + 'SP\\Mgmt\\Profiles\\Profile' => $baseDir . '/inc/SP/Mgmt/Profiles/Profile.php', + 'SP\\Mgmt\\Profiles\\ProfileBase' => $baseDir . '/inc/SP/Mgmt/Profiles/ProfileBase.php', + 'SP\\Mgmt\\Profiles\\ProfileSearch' => $baseDir . '/inc/SP/Mgmt/Profiles/ProfileSearch.php', + 'SP\\Mgmt\\Profiles\\ProfileUtil' => $baseDir . '/inc/SP/Mgmt/Profiles/ProfileUtil.php', + 'SP\\Mgmt\\PublicLinks\\PublicLink' => $baseDir . '/inc/SP/Mgmt/PublicLinks/PublicLink.php', + 'SP\\Mgmt\\PublicLinks\\PublicLinkBase' => $baseDir . '/inc/SP/Mgmt/PublicLinks/PublicLinkBase.php', + 'SP\\Mgmt\\PublicLinks\\PublicLinkSearch' => $baseDir . '/inc/SP/Mgmt/PublicLinks/PublicLinkSearch.php', + 'SP\\Mgmt\\Tags\\Tag' => $baseDir . '/inc/SP/Mgmt/Tags/Tag.php', + 'SP\\Mgmt\\Tags\\TagBase' => $baseDir . '/inc/SP/Mgmt/Tags/TagBase.php', + 'SP\\Mgmt\\Tags\\TagSearch' => $baseDir . '/inc/SP/Mgmt/Tags/TagSearch.php', + 'SP\\Mgmt\\Tracks\\Track' => $baseDir . '/inc/SP/Mgmt/Tracks/Track.php', + 'SP\\Mgmt\\Tracks\\TrackBase' => $baseDir . '/inc/SP/Mgmt/Tracks/TrackBase.php', + 'SP\\Mgmt\\Users\\User' => $baseDir . '/inc/SP/Mgmt/Users/User.php', + 'SP\\Mgmt\\Users\\UserBase' => $baseDir . '/inc/SP/Mgmt/Users/UserBase.php', + 'SP\\Mgmt\\Users\\UserLdap' => $baseDir . '/inc/SP/Mgmt/Users/UserLdap.php', + 'SP\\Mgmt\\Users\\UserLdapSync' => $baseDir . '/inc/SP/Mgmt/Users/UserLdapSync.php', + 'SP\\Mgmt\\Users\\UserMigrate' => $baseDir . '/inc/SP/Mgmt/Users/UserMigrate.php', + 'SP\\Mgmt\\Users\\UserPass' => $baseDir . '/inc/SP/Mgmt/Users/UserPass.php', + 'SP\\Mgmt\\Users\\UserPassRecover' => $baseDir . '/inc/SP/Mgmt/Users/UserPassRecover.php', + 'SP\\Mgmt\\Users\\UserPassRecoverBase' => $baseDir . '/inc/SP/Mgmt/Users/UserPassRecoverBase.php', + 'SP\\Mgmt\\Users\\UserPreferences' => $baseDir . '/inc/SP/Mgmt/Users/UserPreferences.php', + 'SP\\Mgmt\\Users\\UserPreferencesBase' => $baseDir . '/inc/SP/Mgmt/Users/UserPreferencesBase.php', + 'SP\\Mgmt\\Users\\UserPreferencesUtil' => $baseDir . '/inc/SP/Mgmt/Users/UserPreferencesUtil.php', + 'SP\\Mgmt\\Users\\UserSearch' => $baseDir . '/inc/SP/Mgmt/Users/UserSearch.php', + 'SP\\Mgmt\\Users\\UserUtil' => $baseDir . '/inc/SP/Mgmt/Users/UserUtil.php', + 'SP\\Storage\\DB' => $baseDir . '/inc/SP/Storage/DB.php', + 'SP\\Storage\\DBStorageInterface' => $baseDir . '/inc/SP/Storage/DBStorageInterface.php', + 'SP\\Storage\\DBUtil' => $baseDir . '/inc/SP/Storage/DBUtil.php', + 'SP\\Storage\\FileStorageInterface' => $baseDir . '/inc/SP/Storage/FileStorageInterface.php', + 'SP\\Storage\\MySQLHandler' => $baseDir . '/inc/SP/Storage/MySQLHandler.php', + 'SP\\Storage\\QueryData' => $baseDir . '/inc/SP/Storage/QueryData.php', + 'SP\\Storage\\XmlHandler' => $baseDir . '/inc/SP/Storage/XmlHandler.php', + 'SP\\Util\\ArrayUtil' => $baseDir . '/inc/SP/Util/ArrayUtil.php', + 'SP\\Util\\Checks' => $baseDir . '/inc/SP/Util/Checks.php', + 'SP\\Util\\Connection' => $baseDir . '/inc/SP/Util/Connection.php', + 'SP\\Util\\ConnectionInterface' => $baseDir . '/inc/SP/Util/ConnectionInterface.php', + 'SP\\Util\\Filter' => $baseDir . '/inc/SP/Util/Filter.php', + 'SP\\Util\\HttpUtil' => $baseDir . '/inc/SP/Util/HttpUtil.php', + 'SP\\Util\\ImageUtil' => $baseDir . '/inc/SP/Util/ImageUtil.php', + 'SP\\Util\\Json' => $baseDir . '/inc/SP/Util/Json.php', + 'SP\\Util\\Util' => $baseDir . '/inc/SP/Util/Util.php', + 'SP\\Util\\Wiki\\DokuWikiApi' => $baseDir . '/inc/SP/Util/Wiki/DokuWikiApi.php', + 'SP\\Util\\Wiki\\DokuWikiApiBase' => $baseDir . '/inc/SP/Util/Wiki/DokuWikiApiBase.php', + 'SP\\Util\\Wiki\\DokuWikiApiParse' => $baseDir . '/inc/SP/Util/Wiki/DokuWikiApiParse.php', + 'phpseclib\\Crypt\\AES' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/AES.php', + 'phpseclib\\Crypt\\Base' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/Base.php', + 'phpseclib\\Crypt\\Blowfish' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php', + 'phpseclib\\Crypt\\DES' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/DES.php', + 'phpseclib\\Crypt\\Hash' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/Hash.php', + 'phpseclib\\Crypt\\RC2' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/RC2.php', + 'phpseclib\\Crypt\\RC4' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/RC4.php', + 'phpseclib\\Crypt\\RSA' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/RSA.php', + 'phpseclib\\Crypt\\Random' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/Random.php', + 'phpseclib\\Crypt\\Rijndael' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php', + 'phpseclib\\Crypt\\TripleDES' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/TripleDES.php', + 'phpseclib\\Crypt\\Twofish' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Crypt/Twofish.php', + 'phpseclib\\File\\ANSI' => $vendorDir . '/phpseclib/phpseclib/phpseclib/File/ANSI.php', + 'phpseclib\\File\\ASN1' => $vendorDir . '/phpseclib/phpseclib/phpseclib/File/ASN1.php', + 'phpseclib\\File\\ASN1\\Element' => $vendorDir . '/phpseclib/phpseclib/phpseclib/File/ASN1/Element.php', + 'phpseclib\\File\\X509' => $vendorDir . '/phpseclib/phpseclib/phpseclib/File/X509.php', + 'phpseclib\\Math\\BigInteger' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Math/BigInteger.php', + 'phpseclib\\Net\\SCP' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Net/SCP.php', + 'phpseclib\\Net\\SFTP' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Net/SFTP.php', + 'phpseclib\\Net\\SFTP\\Stream' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Net/SFTP/Stream.php', + 'phpseclib\\Net\\SSH1' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Net/SSH1.php', + 'phpseclib\\Net\\SSH2' => $vendorDir . '/phpseclib/phpseclib/phpseclib/Net/SSH2.php', + 'phpseclib\\System\\SSH\\Agent' => $vendorDir . '/phpseclib/phpseclib/phpseclib/System/SSH/Agent.php', + 'phpseclib\\System\\SSH\\Agent\\Identity' => $vendorDir . '/phpseclib/phpseclib/phpseclib/System/SSH/Agent/Identity.php', +); diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php new file mode 100644 index 00000000..55787b61 --- /dev/null +++ b/vendor/composer/autoload_files.php @@ -0,0 +1,11 @@ + $vendorDir . '/paragonie/random_compat/lib/random.php', + 'decc78cc4436b1292c6c0d151b19445c' => $vendorDir . '/phpseclib/phpseclib/phpseclib/bootstrap.php', +); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php new file mode 100644 index 00000000..4e1048fb --- /dev/null +++ b/vendor/composer/autoload_namespaces.php @@ -0,0 +1,10 @@ + array($vendorDir . '/ademarre/binary-to-text-php'), +); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php new file mode 100644 index 00000000..cf808e43 --- /dev/null +++ b/vendor/composer/autoload_psr4.php @@ -0,0 +1,13 @@ + array($vendorDir . '/phpseclib/phpseclib/phpseclib'), + 'SP\\' => array($baseDir . '/inc'), + 'PHPMailer\\PHPMailer\\' => array($vendorDir . '/phpmailer/phpmailer/src'), + 'Defuse\\Crypto\\' => array($vendorDir . '/defuse/php-encryption/src'), +); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php new file mode 100644 index 00000000..96bdcae7 --- /dev/null +++ b/vendor/composer/autoload_real.php @@ -0,0 +1,61 @@ += 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require_once __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInit1701764f82c629b16cc164189600cb41::getInitializer($loader)); + } else { + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->setClassMapAuthoritative(true); + $loader->register(true); + + if ($useStaticLoader) { + $includeFiles = Composer\Autoload\ComposerStaticInit1701764f82c629b16cc164189600cb41::$files; + } else { + $includeFiles = require __DIR__ . '/autoload_files.php'; + } + foreach ($includeFiles as $fileIdentifier => $file) { + composerRequire1701764f82c629b16cc164189600cb41($fileIdentifier, $file); + } + + return $loader; + } +} + +function composerRequire1701764f82c629b16cc164189600cb41($fileIdentifier, $file) +{ + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + require $file; + + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + } +} diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php new file mode 100644 index 00000000..a2812db6 --- /dev/null +++ b/vendor/composer/autoload_static.php @@ -0,0 +1,432 @@ + __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php', + 'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php', + ); + + public static $prefixLengthsPsr4 = array ( + 'p' => + array ( + 'phpseclib\\' => 10, + ), + 'S' => + array ( + 'SP\\' => 3, + ), + 'P' => + array ( + 'PHPMailer\\PHPMailer\\' => 20, + ), + 'D' => + array ( + 'Defuse\\Crypto\\' => 14, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'phpseclib\\' => + array ( + 0 => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib', + ), + 'SP\\' => + array ( + 0 => __DIR__ . '/../..' . '/inc', + ), + 'PHPMailer\\PHPMailer\\' => + array ( + 0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src', + ), + 'Defuse\\Crypto\\' => + array ( + 0 => __DIR__ . '/..' . '/defuse/php-encryption/src', + ), + ); + + public static $prefixesPsr0 = array ( + 'B' => + array ( + 'Base2n' => + array ( + 0 => __DIR__ . '/..' . '/ademarre/binary-to-text-php', + ), + ), + ); + + public static $classMap = array ( + 'Base2n' => __DIR__ . '/..' . '/ademarre/binary-to-text-php/Base2n.php', + 'Defuse\\Crypto\\Core' => __DIR__ . '/..' . '/defuse/php-encryption/src/Core.php', + 'Defuse\\Crypto\\Crypto' => __DIR__ . '/..' . '/defuse/php-encryption/src/Crypto.php', + 'Defuse\\Crypto\\DerivedKeys' => __DIR__ . '/..' . '/defuse/php-encryption/src/DerivedKeys.php', + 'Defuse\\Crypto\\Encoding' => __DIR__ . '/..' . '/defuse/php-encryption/src/Encoding.php', + 'Defuse\\Crypto\\Exception\\BadFormatException' => __DIR__ . '/..' . '/defuse/php-encryption/src/Exception/BadFormatException.php', + 'Defuse\\Crypto\\Exception\\CryptoException' => __DIR__ . '/..' . '/defuse/php-encryption/src/Exception/CryptoException.php', + 'Defuse\\Crypto\\Exception\\EnvironmentIsBrokenException' => __DIR__ . '/..' . '/defuse/php-encryption/src/Exception/EnvironmentIsBrokenException.php', + 'Defuse\\Crypto\\Exception\\IOException' => __DIR__ . '/..' . '/defuse/php-encryption/src/Exception/IOException.php', + 'Defuse\\Crypto\\Exception\\WrongKeyOrModifiedCiphertextException' => __DIR__ . '/..' . '/defuse/php-encryption/src/Exception/WrongKeyOrModifiedCiphertextException.php', + 'Defuse\\Crypto\\File' => __DIR__ . '/..' . '/defuse/php-encryption/src/File.php', + 'Defuse\\Crypto\\Key' => __DIR__ . '/..' . '/defuse/php-encryption/src/Key.php', + 'Defuse\\Crypto\\KeyOrPassword' => __DIR__ . '/..' . '/defuse/php-encryption/src/KeyOrPassword.php', + 'Defuse\\Crypto\\KeyProtectedByPassword' => __DIR__ . '/..' . '/defuse/php-encryption/src/KeyProtectedByPassword.php', + 'Defuse\\Crypto\\RuntimeTests' => __DIR__ . '/..' . '/defuse/php-encryption/src/RuntimeTests.php', + 'PHPMailer\\PHPMailer\\Exception' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/Exception.php', + 'PHPMailer\\PHPMailer\\OAuth' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/OAuth.php', + 'PHPMailer\\PHPMailer\\PHPMailer' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/PHPMailer.php', + 'PHPMailer\\PHPMailer\\POP3' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/POP3.php', + 'PHPMailer\\PHPMailer\\SMTP' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/SMTP.php', + 'SP\\Account\\Account' => __DIR__ . '/../..' . '/inc/SP/Account/Account.php', + 'SP\\Account\\AccountAcl' => __DIR__ . '/../..' . '/inc/SP/Account/AccountAcl.php', + 'SP\\Account\\AccountBase' => __DIR__ . '/../..' . '/inc/SP/Account/AccountBase.php', + 'SP\\Account\\AccountCrypt' => __DIR__ . '/../..' . '/inc/SP/Account/AccountCrypt.php', + 'SP\\Account\\AccountFavorites' => __DIR__ . '/../..' . '/inc/SP/Account/AccountFavorites.php', + 'SP\\Account\\AccountHistory' => __DIR__ . '/../..' . '/inc/SP/Account/AccountHistory.php', + 'SP\\Account\\AccountHistoryCrypt' => __DIR__ . '/../..' . '/inc/SP/Account/AccountHistoryCrypt.php', + 'SP\\Account\\AccountHistoryUtil' => __DIR__ . '/../..' . '/inc/SP/Account/AccountHistoryUtil.php', + 'SP\\Account\\AccountInterface' => __DIR__ . '/../..' . '/inc/SP/Account/AccountInterface.php', + 'SP\\Account\\AccountSearch' => __DIR__ . '/../..' . '/inc/SP/Account/AccountSearch.php', + 'SP\\Account\\AccountTags' => __DIR__ . '/../..' . '/inc/SP/Account/AccountTags.php', + 'SP\\Account\\AccountUtil' => __DIR__ . '/../..' . '/inc/SP/Account/AccountUtil.php', + 'SP\\Account\\AccountsSearchItem' => __DIR__ . '/../..' . '/inc/SP/Account/AccountsSearchItem.php', + 'SP\\Account\\UserAccounts' => __DIR__ . '/../..' . '/inc/SP/Account/UserAccounts.php', + 'SP\\Api\\ApiBase' => __DIR__ . '/../..' . '/inc/SP/Api/ApiBase.php', + 'SP\\Api\\ApiInterface' => __DIR__ . '/../..' . '/inc/SP/Api/ApiInterface.php', + 'SP\\Api\\ApiRequest' => __DIR__ . '/../..' . '/inc/SP/Api/ApiRequest.php', + 'SP\\Api\\ApiUtil' => __DIR__ . '/../..' . '/inc/SP/Api/ApiUtil.php', + 'SP\\Api\\SyspassApi' => __DIR__ . '/../..' . '/inc/SP/Api/SyspassApi.php', + 'SP\\Auth\\Auth' => __DIR__ . '/../..' . '/inc/SP/Auth/Auth.php', + 'SP\\Auth\\AuthDataBase' => __DIR__ . '/../..' . '/inc/SP/Auth/AuthDataBase.php', + 'SP\\Auth\\AuthInterface' => __DIR__ . '/../..' . '/inc/SP/Auth/AuthInterface.php', + 'SP\\Auth\\AuthResult' => __DIR__ . '/../..' . '/inc/SP/Auth/AuthResult.php', + 'SP\\Auth\\AuthUtil' => __DIR__ . '/../..' . '/inc/SP/Auth/AuthUtil.php', + 'SP\\Auth\\Browser\\Browser' => __DIR__ . '/../..' . '/inc/SP/Auth/Browser/Browser.php', + 'SP\\Auth\\Browser\\BrowserAuthData' => __DIR__ . '/../..' . '/inc/SP/Auth/Browser/BrowserAuthData.php', + 'SP\\Auth\\Database\\Database' => __DIR__ . '/../..' . '/inc/SP/Auth/Database/Database.php', + 'SP\\Auth\\Database\\DatabaseAuthData' => __DIR__ . '/../..' . '/inc/SP/Auth/Database/DatabaseAuthData.php', + 'SP\\Auth\\Ldap\\LdapAuthData' => __DIR__ . '/../..' . '/inc/SP/Auth/Ldap/LdapAuthData.php', + 'SP\\Auth\\Ldap\\LdapBase' => __DIR__ . '/../..' . '/inc/SP/Auth/Ldap/LdapBase.php', + 'SP\\Auth\\Ldap\\LdapInterface' => __DIR__ . '/../..' . '/inc/SP/Auth/Ldap/LdapInterface.php', + 'SP\\Auth\\Ldap\\LdapMsAds' => __DIR__ . '/../..' . '/inc/SP/Auth/Ldap/LdapMsAds.php', + 'SP\\Auth\\Ldap\\LdapStd' => __DIR__ . '/../..' . '/inc/SP/Auth/Ldap/LdapStd.php', + 'SP\\Auth\\Ldap\\LdapUtil' => __DIR__ . '/../..' . '/inc/SP/Auth/Ldap/LdapUtil.php', + 'SP\\Config\\Config' => __DIR__ . '/../..' . '/inc/SP/Config/Config.php', + 'SP\\Config\\ConfigDB' => __DIR__ . '/../..' . '/inc/SP/Config/ConfigDB.php', + 'SP\\Config\\ConfigData' => __DIR__ . '/../..' . '/inc/SP/Config/ConfigData.php', + 'SP\\Config\\ConfigInterface' => __DIR__ . '/../..' . '/inc/SP/Config/ConfigInterface.php', + 'SP\\Config\\ConfigUtil' => __DIR__ . '/../..' . '/inc/SP/Config/ConfigUtil.php', + 'SP\\Controller\\AccountController' => __DIR__ . '/../..' . '/inc/SP/Controller/AccountController.php', + 'SP\\Controller\\AccountSearchController' => __DIR__ . '/../..' . '/inc/SP/Controller/AccountSearchController.php', + 'SP\\Controller\\ChecksController' => __DIR__ . '/../..' . '/inc/SP/Controller/ChecksController.php', + 'SP\\Controller\\ConfigActionController' => __DIR__ . '/../..' . '/inc/SP/Controller/ConfigActionController.php', + 'SP\\Controller\\ConfigController' => __DIR__ . '/../..' . '/inc/SP/Controller/ConfigController.php', + 'SP\\Controller\\ControllerBase' => __DIR__ . '/../..' . '/inc/SP/Controller/ControllerBase.php', + 'SP\\Controller\\EventlogController' => __DIR__ . '/../..' . '/inc/SP/Controller/EventlogController.php', + 'SP\\Controller\\GridItemsSearchController' => __DIR__ . '/../..' . '/inc/SP/Controller/GridItemsSearchController.php', + 'SP\\Controller\\GridTabControllerBase' => __DIR__ . '/../..' . '/inc/SP/Controller/GridTabControllerBase.php', + 'SP\\Controller\\Grids\\GridBase' => __DIR__ . '/../..' . '/inc/SP/Controller/Grids/GridBase.php', + 'SP\\Controller\\Grids\\Items' => __DIR__ . '/../..' . '/inc/SP/Controller/Grids/Items.php', + 'SP\\Controller\\Grids\\Notices' => __DIR__ . '/../..' . '/inc/SP/Controller/Grids/Notices.php', + 'SP\\Controller\\ItemActionController' => __DIR__ . '/../..' . '/inc/SP/Controller/ItemActionController.php', + 'SP\\Controller\\ItemControllerInterface' => __DIR__ . '/../..' . '/inc/SP/Controller/ItemControllerInterface.php', + 'SP\\Controller\\ItemListController' => __DIR__ . '/../..' . '/inc/SP/Controller/ItemListController.php', + 'SP\\Controller\\ItemSearchController' => __DIR__ . '/../..' . '/inc/SP/Controller/ItemSearchController.php', + 'SP\\Controller\\ItemShowController' => __DIR__ . '/../..' . '/inc/SP/Controller/ItemShowController.php', + 'SP\\Controller\\ItemsController' => __DIR__ . '/../..' . '/inc/SP/Controller/ItemsController.php', + 'SP\\Controller\\LoginController' => __DIR__ . '/../..' . '/inc/SP/Controller/LoginController.php', + 'SP\\Controller\\MainActionController' => __DIR__ . '/../..' . '/inc/SP/Controller/MainActionController.php', + 'SP\\Controller\\MainController' => __DIR__ . '/../..' . '/inc/SP/Controller/MainController.php', + 'SP\\Controller\\NoticeShowController' => __DIR__ . '/../..' . '/inc/SP/Controller/NoticeShowController.php', + 'SP\\Controller\\NoticesController' => __DIR__ . '/../..' . '/inc/SP/Controller/NoticesController.php', + 'SP\\Controller\\NoticesSearchController' => __DIR__ . '/../..' . '/inc/SP/Controller/NoticesSearchController.php', + 'SP\\Controller\\RequestControllerTrait' => __DIR__ . '/../..' . '/inc/SP/Controller/RequestControllerTrait.php', + 'SP\\Controller\\TabControllerBase' => __DIR__ . '/../..' . '/inc/SP/Controller/TabControllerBase.php', + 'SP\\Controller\\TabsInterface' => __DIR__ . '/../..' . '/inc/SP/Controller/TabsInterface.php', + 'SP\\Controller\\TaskController' => __DIR__ . '/../..' . '/inc/SP/Controller/TaskController.php', + 'SP\\Controller\\UserPreferencesController' => __DIR__ . '/../..' . '/inc/SP/Controller/UserPreferencesController.php', + 'SP\\Controller\\WikiController' => __DIR__ . '/../..' . '/inc/SP/Controller/WikiController.php', + 'SP\\Core\\Acl' => __DIR__ . '/../..' . '/inc/SP/Core/Acl.php', + 'SP\\Core\\ActionsInterface' => __DIR__ . '/../..' . '/inc/SP/Core/ActionsInterface.php', + 'SP\\Core\\Backup' => __DIR__ . '/../..' . '/inc/SP/Core/Backup.php', + 'SP\\Core\\CryptMasterPass' => __DIR__ . '/../..' . '/inc/SP/Core/CryptMasterPass.php', + 'SP\\Core\\CryptPKI' => __DIR__ . '/../..' . '/inc/SP/Core/CryptPKI.php', + 'SP\\Core\\Crypt\\Cookie' => __DIR__ . '/../..' . '/inc/SP/Core/Crypt/Cookie.php', + 'SP\\Core\\Crypt\\Crypt' => __DIR__ . '/../..' . '/inc/SP/Core/Crypt/Crypt.php', + 'SP\\Core\\Crypt\\CryptSessionHandler' => __DIR__ . '/../..' . '/inc/SP/Core/Crypt/CryptSessionHandler.php', + 'SP\\Core\\Crypt\\Hash' => __DIR__ . '/../..' . '/inc/SP/Core/Crypt/Hash.php', + 'SP\\Core\\Crypt\\SecureKeyCookie' => __DIR__ . '/../..' . '/inc/SP/Core/Crypt/SecureKeyCookie.php', + 'SP\\Core\\Crypt\\Session' => __DIR__ . '/../..' . '/inc/SP/Core/Crypt/Session.php', + 'SP\\Core\\Crypt\\Vault' => __DIR__ . '/../..' . '/inc/SP/Core/Crypt/Vault.php', + 'SP\\Core\\DiFactory' => __DIR__ . '/../..' . '/inc/SP/Core/DiFactory.php', + 'SP\\Core\\Events\\EventDispatcher' => __DIR__ . '/../..' . '/inc/SP/Core/Events/EventDispatcher.php', + 'SP\\Core\\Events\\EventDispatcherBase' => __DIR__ . '/../..' . '/inc/SP/Core/Events/EventDispatcherBase.php', + 'SP\\Core\\Events\\EventDispatcherInterface' => __DIR__ . '/../..' . '/inc/SP/Core/Events/EventDispatcherInterface.php', + 'SP\\Core\\Events\\EventReceiver' => __DIR__ . '/../..' . '/inc/SP/Core/Events/EventReceiver.php', + 'SP\\Core\\Exceptions\\AuthException' => __DIR__ . '/../..' . '/inc/SP/Core/Exceptions/AuthException.php', + 'SP\\Core\\Exceptions\\ConstraintException' => __DIR__ . '/../..' . '/inc/SP/Core/Exceptions/ConstraintException.php', + 'SP\\Core\\Exceptions\\FileNotFoundException' => __DIR__ . '/../..' . '/inc/SP/Core/Exceptions/FileNotFoundException.php', + 'SP\\Core\\Exceptions\\InvalidArgumentException' => __DIR__ . '/../..' . '/inc/SP/Core/Exceptions/InvalidArgumentException.php', + 'SP\\Core\\Exceptions\\InvalidClassException' => __DIR__ . '/../..' . '/inc/SP/Core/Exceptions/InvalidClassException.php', + 'SP\\Core\\Exceptions\\ItemException' => __DIR__ . '/../..' . '/inc/SP/Core/Exceptions/ItemException.php', + 'SP\\Core\\Exceptions\\QueryException' => __DIR__ . '/../..' . '/inc/SP/Core/Exceptions/QueryException.php', + 'SP\\Core\\Exceptions\\SPException' => __DIR__ . '/../..' . '/inc/SP/Core/Exceptions/SPException.php', + 'SP\\Core\\Exceptions\\ValidationException' => __DIR__ . '/../..' . '/inc/SP/Core/Exceptions/ValidationException.php', + 'SP\\Core\\Init' => __DIR__ . '/../..' . '/inc/SP/Core/Init.php', + 'SP\\Core\\Installer' => __DIR__ . '/../..' . '/inc/SP/Core/Installer.php', + 'SP\\Core\\ItemsTypeInterface' => __DIR__ . '/../..' . '/inc/SP/Core/ItemsTypeInterface.php', + 'SP\\Core\\Language' => __DIR__ . '/../..' . '/inc/SP/Core/Language.php', + 'SP\\Core\\Messages\\LogMessage' => __DIR__ . '/../..' . '/inc/SP/Core/Messages/LogMessage.php', + 'SP\\Core\\Messages\\MessageBase' => __DIR__ . '/../..' . '/inc/SP/Core/Messages/MessageBase.php', + 'SP\\Core\\Messages\\MessageInterface' => __DIR__ . '/../..' . '/inc/SP/Core/Messages/MessageInterface.php', + 'SP\\Core\\Messages\\NoticeMessage' => __DIR__ . '/../..' . '/inc/SP/Core/Messages/NoticeMessage.php', + 'SP\\Core\\Messages\\TaskMessage' => __DIR__ . '/../..' . '/inc/SP/Core/Messages/TaskMessage.php', + 'SP\\Core\\OldCrypt' => __DIR__ . '/../..' . '/inc/SP/Core/OldCrypt.php', + 'SP\\Core\\Plugin\\PluginBase' => __DIR__ . '/../..' . '/inc/SP/Core/Plugin/PluginBase.php', + 'SP\\Core\\Plugin\\PluginDataStore' => __DIR__ . '/../..' . '/inc/SP/Core/Plugin/PluginDataStore.php', + 'SP\\Core\\Plugin\\PluginInterface' => __DIR__ . '/../..' . '/inc/SP/Core/Plugin/PluginInterface.php', + 'SP\\Core\\Plugin\\PluginUtil' => __DIR__ . '/../..' . '/inc/SP/Core/Plugin/PluginUtil.php', + 'SP\\Core\\Session' => __DIR__ . '/../..' . '/inc/SP/Core/Session.php', + 'SP\\Core\\SessionUtil' => __DIR__ . '/../..' . '/inc/SP/Core/SessionUtil.php', + 'SP\\Core\\Task' => __DIR__ . '/../..' . '/inc/SP/Core/Task.php', + 'SP\\Core\\TaskFactory' => __DIR__ . '/../..' . '/inc/SP/Core/TaskFactory.php', + 'SP\\Core\\Template' => __DIR__ . '/../..' . '/inc/SP/Core/Template.php', + 'SP\\Core\\UI\\Theme' => __DIR__ . '/../..' . '/inc/SP/Core/UI/Theme.php', + 'SP\\Core\\UI\\ThemeIconsBase' => __DIR__ . '/../..' . '/inc/SP/Core/UI/ThemeIconsBase.php', + 'SP\\Core\\UI\\ThemeIconsInterface' => __DIR__ . '/../..' . '/inc/SP/Core/UI/ThemeIconsInterface.php', + 'SP\\Core\\UI\\ThemeInterface' => __DIR__ . '/../..' . '/inc/SP/Core/UI/ThemeInterface.php', + 'SP\\Core\\Upgrade\\Account' => __DIR__ . '/../..' . '/inc/SP/Core/Upgrade/Account.php', + 'SP\\Core\\Upgrade\\Category' => __DIR__ . '/../..' . '/inc/SP/Core/Upgrade/Category.php', + 'SP\\Core\\Upgrade\\Check' => __DIR__ . '/../..' . '/inc/SP/Core/Upgrade/Check.php', + 'SP\\Core\\Upgrade\\Crypt' => __DIR__ . '/../..' . '/inc/SP/Core/Upgrade/Crypt.php', + 'SP\\Core\\Upgrade\\Customer' => __DIR__ . '/../..' . '/inc/SP/Core/Upgrade/Customer.php', + 'SP\\Core\\Upgrade\\Group' => __DIR__ . '/../..' . '/inc/SP/Core/Upgrade/Group.php', + 'SP\\Core\\Upgrade\\Profile' => __DIR__ . '/../..' . '/inc/SP/Core/Upgrade/Profile.php', + 'SP\\Core\\Upgrade\\Upgrade' => __DIR__ . '/../..' . '/inc/SP/Core/Upgrade/Upgrade.php', + 'SP\\Core\\Upgrade\\User' => __DIR__ . '/../..' . '/inc/SP/Core/Upgrade/User.php', + 'SP\\Core\\XmlExport' => __DIR__ . '/../..' . '/inc/SP/Core/XmlExport.php', + 'SP\\DataModel\\AccountData' => __DIR__ . '/../..' . '/inc/SP/DataModel/AccountData.php', + 'SP\\DataModel\\AccountExtData' => __DIR__ . '/../..' . '/inc/SP/DataModel/AccountExtData.php', + 'SP\\DataModel\\AccountHistoryData' => __DIR__ . '/../..' . '/inc/SP/DataModel/AccountHistoryData.php', + 'SP\\DataModel\\AccountSearchData' => __DIR__ . '/../..' . '/inc/SP/DataModel/AccountSearchData.php', + 'SP\\DataModel\\ApiTokenData' => __DIR__ . '/../..' . '/inc/SP/DataModel/ApiTokenData.php', + 'SP\\DataModel\\CategoryData' => __DIR__ . '/../..' . '/inc/SP/DataModel/CategoryData.php', + 'SP\\DataModel\\CustomFieldBaseData' => __DIR__ . '/../..' . '/inc/SP/DataModel/CustomFieldBaseData.php', + 'SP\\DataModel\\CustomFieldData' => __DIR__ . '/../..' . '/inc/SP/DataModel/CustomFieldData.php', + 'SP\\DataModel\\CustomFieldDefData' => __DIR__ . '/../..' . '/inc/SP/DataModel/CustomFieldDefData.php', + 'SP\\DataModel\\CustomerData' => __DIR__ . '/../..' . '/inc/SP/DataModel/CustomerData.php', + 'SP\\DataModel\\DataModelBase' => __DIR__ . '/../..' . '/inc/SP/DataModel/DataModelBase.php', + 'SP\\DataModel\\DataModelInterface' => __DIR__ . '/../..' . '/inc/SP/DataModel/DataModelInterface.php', + 'SP\\DataModel\\FileData' => __DIR__ . '/../..' . '/inc/SP/DataModel/FileData.php', + 'SP\\DataModel\\FileExtData' => __DIR__ . '/../..' . '/inc/SP/DataModel/FileExtData.php', + 'SP\\DataModel\\GroupAccountsData' => __DIR__ . '/../..' . '/inc/SP/DataModel/GroupAccountsData.php', + 'SP\\DataModel\\GroupData' => __DIR__ . '/../..' . '/inc/SP/DataModel/GroupData.php', + 'SP\\DataModel\\GroupUsersData' => __DIR__ . '/../..' . '/inc/SP/DataModel/GroupUsersData.php', + 'SP\\DataModel\\InstallData' => __DIR__ . '/../..' . '/inc/SP/DataModel/InstallData.php', + 'SP\\DataModel\\ItemSearchData' => __DIR__ . '/../..' . '/inc/SP/DataModel/ItemSearchData.php', + 'SP\\DataModel\\NoticeData' => __DIR__ . '/../..' . '/inc/SP/DataModel/NoticeData.php', + 'SP\\DataModel\\PluginData' => __DIR__ . '/../..' . '/inc/SP/DataModel/PluginData.php', + 'SP\\DataModel\\ProfileBaseData' => __DIR__ . '/../..' . '/inc/SP/DataModel/ProfileBaseData.php', + 'SP\\DataModel\\ProfileData' => __DIR__ . '/../..' . '/inc/SP/DataModel/ProfileData.php', + 'SP\\DataModel\\PublicLinkBaseData' => __DIR__ . '/../..' . '/inc/SP/DataModel/PublicLinkBaseData.php', + 'SP\\DataModel\\PublicLinkData' => __DIR__ . '/../..' . '/inc/SP/DataModel/PublicLinkData.php', + 'SP\\DataModel\\PublicLinkListData' => __DIR__ . '/../..' . '/inc/SP/DataModel/PublicLinkListData.php', + 'SP\\DataModel\\TagData' => __DIR__ . '/../..' . '/inc/SP/DataModel/TagData.php', + 'SP\\DataModel\\TrackData' => __DIR__ . '/../..' . '/inc/SP/DataModel/TrackData.php', + 'SP\\DataModel\\UserData' => __DIR__ . '/../..' . '/inc/SP/DataModel/UserData.php', + 'SP\\DataModel\\UserLoginData' => __DIR__ . '/../..' . '/inc/SP/DataModel/UserLoginData.php', + 'SP\\DataModel\\UserPassData' => __DIR__ . '/../..' . '/inc/SP/DataModel/UserPassData.php', + 'SP\\DataModel\\UserPassRecoverData' => __DIR__ . '/../..' . '/inc/SP/DataModel/UserPassRecoverData.php', + 'SP\\DataModel\\UserPreferencesData' => __DIR__ . '/../..' . '/inc/SP/DataModel/UserPreferencesData.php', + 'SP\\Forms\\AccountForm' => __DIR__ . '/../..' . '/inc/SP/Forms/AccountForm.php', + 'SP\\Forms\\ApiTokenForm' => __DIR__ . '/../..' . '/inc/SP/Forms/ApiTokenForm.php', + 'SP\\Forms\\CategoryForm' => __DIR__ . '/../..' . '/inc/SP/Forms/CategoryForm.php', + 'SP\\Forms\\CustomFieldDefForm' => __DIR__ . '/../..' . '/inc/SP/Forms/CustomFieldDefForm.php', + 'SP\\Forms\\CustomerForm' => __DIR__ . '/../..' . '/inc/SP/Forms/CustomerForm.php', + 'SP\\Forms\\FormBase' => __DIR__ . '/../..' . '/inc/SP/Forms/FormBase.php', + 'SP\\Forms\\FormInterface' => __DIR__ . '/../..' . '/inc/SP/Forms/FormInterface.php', + 'SP\\Forms\\GroupForm' => __DIR__ . '/../..' . '/inc/SP/Forms/GroupForm.php', + 'SP\\Forms\\NoticeForm' => __DIR__ . '/../..' . '/inc/SP/Forms/NoticeForm.php', + 'SP\\Forms\\ProfileForm' => __DIR__ . '/../..' . '/inc/SP/Forms/ProfileForm.php', + 'SP\\Forms\\PublicLinkForm' => __DIR__ . '/../..' . '/inc/SP/Forms/PublicLinkForm.php', + 'SP\\Forms\\TagForm' => __DIR__ . '/../..' . '/inc/SP/Forms/TagForm.php', + 'SP\\Forms\\UserForm' => __DIR__ . '/../..' . '/inc/SP/Forms/UserForm.php', + 'SP\\Html\\Assets\\FontIcon' => __DIR__ . '/../..' . '/inc/SP/Html/Assets/FontIcon.php', + 'SP\\Html\\Assets\\IconBase' => __DIR__ . '/../..' . '/inc/SP/Html/Assets/IconBase.php', + 'SP\\Html\\Assets\\IconInterface' => __DIR__ . '/../..' . '/inc/SP/Html/Assets/IconInterface.php', + 'SP\\Html\\Assets\\ImageIcon' => __DIR__ . '/../..' . '/inc/SP/Html/Assets/ImageIcon.php', + 'SP\\Html\\DataGrid\\DataGrid' => __DIR__ . '/../..' . '/inc/SP/Html/DataGrid/DataGrid.php', + 'SP\\Html\\DataGrid\\DataGridAction' => __DIR__ . '/../..' . '/inc/SP/Html/DataGrid/DataGridAction.php', + 'SP\\Html\\DataGrid\\DataGridActionBase' => __DIR__ . '/../..' . '/inc/SP/Html/DataGrid/DataGridActionBase.php', + 'SP\\Html\\DataGrid\\DataGridActionInterface' => __DIR__ . '/../..' . '/inc/SP/Html/DataGrid/DataGridActionInterface.php', + 'SP\\Html\\DataGrid\\DataGridActionSearch' => __DIR__ . '/../..' . '/inc/SP/Html/DataGrid/DataGridActionSearch.php', + 'SP\\Html\\DataGrid\\DataGridActionType' => __DIR__ . '/../..' . '/inc/SP/Html/DataGrid/DataGridActionType.php', + 'SP\\Html\\DataGrid\\DataGridBase' => __DIR__ . '/../..' . '/inc/SP/Html/DataGrid/DataGridBase.php', + 'SP\\Html\\DataGrid\\DataGridData' => __DIR__ . '/../..' . '/inc/SP/Html/DataGrid/DataGridData.php', + 'SP\\Html\\DataGrid\\DataGridDataBase' => __DIR__ . '/../..' . '/inc/SP/Html/DataGrid/DataGridDataBase.php', + 'SP\\Html\\DataGrid\\DataGridDataInterface' => __DIR__ . '/../..' . '/inc/SP/Html/DataGrid/DataGridDataInterface.php', + 'SP\\Html\\DataGrid\\DataGridHeader' => __DIR__ . '/../..' . '/inc/SP/Html/DataGrid/DataGridHeader.php', + 'SP\\Html\\DataGrid\\DataGridHeaderBase' => __DIR__ . '/../..' . '/inc/SP/Html/DataGrid/DataGridHeaderBase.php', + 'SP\\Html\\DataGrid\\DataGridHeaderInterface' => __DIR__ . '/../..' . '/inc/SP/Html/DataGrid/DataGridHeaderInterface.php', + 'SP\\Html\\DataGrid\\DataGridHeaderSort' => __DIR__ . '/../..' . '/inc/SP/Html/DataGrid/DataGridHeaderSort.php', + 'SP\\Html\\DataGrid\\DataGridInterface' => __DIR__ . '/../..' . '/inc/SP/Html/DataGrid/DataGridInterface.php', + 'SP\\Html\\DataGrid\\DataGridPager' => __DIR__ . '/../..' . '/inc/SP/Html/DataGrid/DataGridPager.php', + 'SP\\Html\\DataGrid\\DataGridPagerBase' => __DIR__ . '/../..' . '/inc/SP/Html/DataGrid/DataGridPagerBase.php', + 'SP\\Html\\DataGrid\\DataGridPagerInterface' => __DIR__ . '/../..' . '/inc/SP/Html/DataGrid/DataGridPagerInterface.php', + 'SP\\Html\\DataGrid\\DataGridSort' => __DIR__ . '/../..' . '/inc/SP/Html/DataGrid/DataGridSort.php', + 'SP\\Html\\DataGrid\\DataGridSortInterface' => __DIR__ . '/../..' . '/inc/SP/Html/DataGrid/DataGridSortInterface.php', + 'SP\\Html\\DataGrid\\DataGridTab' => __DIR__ . '/../..' . '/inc/SP/Html/DataGrid/DataGridTab.php', + 'SP\\Html\\Html' => __DIR__ . '/../..' . '/inc/SP/Html/Html.php', + 'SP\\Html\\Minify' => __DIR__ . '/../..' . '/inc/SP/Html/Minify.php', + 'SP\\Http\\Cookies' => __DIR__ . '/../..' . '/inc/SP/Http/Cookies.php', + 'SP\\Http\\JsonResponse' => __DIR__ . '/../..' . '/inc/SP/Http/JsonResponse.php', + 'SP\\Http\\Message' => __DIR__ . '/../..' . '/inc/SP/Http/Message.php', + 'SP\\Http\\Request' => __DIR__ . '/../..' . '/inc/SP/Http/Request.php', + 'SP\\Http\\Response' => __DIR__ . '/../..' . '/inc/SP/Http/Response.php', + 'SP\\Http\\XMLRPCResponseParse' => __DIR__ . '/../..' . '/inc/SP/Http/XMLRPCResponseParse.php', + 'SP\\Import\\CsvImport' => __DIR__ . '/../..' . '/inc/SP/Import/CsvImport.php', + 'SP\\Import\\CsvImportBase' => __DIR__ . '/../..' . '/inc/SP/Import/CsvImportBase.php', + 'SP\\Import\\FileImport' => __DIR__ . '/../..' . '/inc/SP/Import/FileImport.php', + 'SP\\Import\\Import' => __DIR__ . '/../..' . '/inc/SP/Import/Import.php', + 'SP\\Import\\ImportBase' => __DIR__ . '/../..' . '/inc/SP/Import/ImportBase.php', + 'SP\\Import\\ImportInterface' => __DIR__ . '/../..' . '/inc/SP/Import/ImportInterface.php', + 'SP\\Import\\ImportParams' => __DIR__ . '/../..' . '/inc/SP/Import/ImportParams.php', + 'SP\\Import\\KeepassImport' => __DIR__ . '/../..' . '/inc/SP/Import/KeepassImport.php', + 'SP\\Import\\KeepassXImport' => __DIR__ . '/../..' . '/inc/SP/Import/KeepassXImport.php', + 'SP\\Import\\SyspassImport' => __DIR__ . '/../..' . '/inc/SP/Import/SyspassImport.php', + 'SP\\Import\\XmlFileImport' => __DIR__ . '/../..' . '/inc/SP/Import/XmlFileImport.php', + 'SP\\Import\\XmlImport' => __DIR__ . '/../..' . '/inc/SP/Import/XmlImport.php', + 'SP\\Import\\XmlImportTrait' => __DIR__ . '/../..' . '/inc/SP/Import/XmlImportTrait.php', + 'SP\\Log\\AbstractLogger' => __DIR__ . '/../..' . '/inc/SP/Log/AbstractLogger.php', + 'SP\\Log\\ActionLog' => __DIR__ . '/../..' . '/inc/SP/Log/ActionLog.php', + 'SP\\Log\\Email' => __DIR__ . '/../..' . '/inc/SP/Log/Email.php', + 'SP\\Log\\Log' => __DIR__ . '/../..' . '/inc/SP/Log/Log.php', + 'SP\\Log\\LogLevel' => __DIR__ . '/../..' . '/inc/SP/Log/LogLevel.php', + 'SP\\Log\\LogUtil' => __DIR__ . '/../..' . '/inc/SP/Log/LogUtil.php', + 'SP\\Log\\LoggerInterface' => __DIR__ . '/../..' . '/inc/SP/Log/LoggerInterface.php', + 'SP\\Log\\Syslog' => __DIR__ . '/../..' . '/inc/SP/Log/Syslog.php', + 'SP\\Mgmt\\ApiTokens\\ApiToken' => __DIR__ . '/../..' . '/inc/SP/Mgmt/ApiTokens/ApiToken.php', + 'SP\\Mgmt\\ApiTokens\\ApiTokenBase' => __DIR__ . '/../..' . '/inc/SP/Mgmt/ApiTokens/ApiTokenBase.php', + 'SP\\Mgmt\\ApiTokens\\ApiTokenSearch' => __DIR__ . '/../..' . '/inc/SP/Mgmt/ApiTokens/ApiTokenSearch.php', + 'SP\\Mgmt\\ApiTokens\\ApiTokensUtil' => __DIR__ . '/../..' . '/inc/SP/Mgmt/ApiTokens/ApiTokensUtil.php', + 'SP\\Mgmt\\Categories\\Category' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Categories/Category.php', + 'SP\\Mgmt\\Categories\\CategoryBase' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Categories/CategoryBase.php', + 'SP\\Mgmt\\Categories\\CategorySearch' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Categories/CategorySearch.php', + 'SP\\Mgmt\\CustomFields\\CustomField' => __DIR__ . '/../..' . '/inc/SP/Mgmt/CustomFields/CustomField.php', + 'SP\\Mgmt\\CustomFields\\CustomFieldBase' => __DIR__ . '/../..' . '/inc/SP/Mgmt/CustomFields/CustomFieldBase.php', + 'SP\\Mgmt\\CustomFields\\CustomFieldDef' => __DIR__ . '/../..' . '/inc/SP/Mgmt/CustomFields/CustomFieldDef.php', + 'SP\\Mgmt\\CustomFields\\CustomFieldDefSearch' => __DIR__ . '/../..' . '/inc/SP/Mgmt/CustomFields/CustomFieldDefSearch.php', + 'SP\\Mgmt\\CustomFields\\CustomFieldTypes' => __DIR__ . '/../..' . '/inc/SP/Mgmt/CustomFields/CustomFieldTypes.php', + 'SP\\Mgmt\\CustomFields\\CustomFieldsUtil' => __DIR__ . '/../..' . '/inc/SP/Mgmt/CustomFields/CustomFieldsUtil.php', + 'SP\\Mgmt\\Customers\\Customer' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Customers/Customer.php', + 'SP\\Mgmt\\Customers\\CustomerBase' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Customers/CustomerBase.php', + 'SP\\Mgmt\\Customers\\CustomerSearch' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Customers/CustomerSearch.php', + 'SP\\Mgmt\\Files\\File' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Files/File.php', + 'SP\\Mgmt\\Files\\FileBase' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Files/FileBase.php', + 'SP\\Mgmt\\Files\\FileSearch' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Files/FileSearch.php', + 'SP\\Mgmt\\Files\\FileUtil' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Files/FileUtil.php', + 'SP\\Mgmt\\Groups\\Group' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Groups/Group.php', + 'SP\\Mgmt\\Groups\\GroupAccounts' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Groups/GroupAccounts.php', + 'SP\\Mgmt\\Groups\\GroupAccountsBase' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Groups/GroupAccountsBase.php', + 'SP\\Mgmt\\Groups\\GroupAccountsUtil' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Groups/GroupAccountsUtil.php', + 'SP\\Mgmt\\Groups\\GroupBase' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Groups/GroupBase.php', + 'SP\\Mgmt\\Groups\\GroupSearch' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Groups/GroupSearch.php', + 'SP\\Mgmt\\Groups\\GroupUsers' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Groups/GroupUsers.php', + 'SP\\Mgmt\\Groups\\GroupUsersBase' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Groups/GroupUsersBase.php', + 'SP\\Mgmt\\Groups\\GroupUtil' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Groups/GroupUtil.php', + 'SP\\Mgmt\\ItemBaseInterface' => __DIR__ . '/../..' . '/inc/SP/Mgmt/ItemBaseInterface.php', + 'SP\\Mgmt\\ItemBaseTrait' => __DIR__ . '/../..' . '/inc/SP/Mgmt/ItemBaseTrait.php', + 'SP\\Mgmt\\ItemInterface' => __DIR__ . '/../..' . '/inc/SP/Mgmt/ItemInterface.php', + 'SP\\Mgmt\\ItemSearchInterface' => __DIR__ . '/../..' . '/inc/SP/Mgmt/ItemSearchInterface.php', + 'SP\\Mgmt\\ItemSelectInterface' => __DIR__ . '/../..' . '/inc/SP/Mgmt/ItemSelectInterface.php', + 'SP\\Mgmt\\ItemTrait' => __DIR__ . '/../..' . '/inc/SP/Mgmt/ItemTrait.php', + 'SP\\Mgmt\\Notices\\Notice' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Notices/Notice.php', + 'SP\\Mgmt\\Notices\\NoticeBase' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Notices/NoticeBase.php', + 'SP\\Mgmt\\Notices\\NoticeSearch' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Notices/NoticeSearch.php', + 'SP\\Mgmt\\Plugins\\Plugin' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Plugins/Plugin.php', + 'SP\\Mgmt\\Plugins\\PluginBase' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Plugins/PluginBase.php', + 'SP\\Mgmt\\Plugins\\PluginSearch' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Plugins/PluginSearch.php', + 'SP\\Mgmt\\Profiles\\Profile' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Profiles/Profile.php', + 'SP\\Mgmt\\Profiles\\ProfileBase' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Profiles/ProfileBase.php', + 'SP\\Mgmt\\Profiles\\ProfileSearch' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Profiles/ProfileSearch.php', + 'SP\\Mgmt\\Profiles\\ProfileUtil' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Profiles/ProfileUtil.php', + 'SP\\Mgmt\\PublicLinks\\PublicLink' => __DIR__ . '/../..' . '/inc/SP/Mgmt/PublicLinks/PublicLink.php', + 'SP\\Mgmt\\PublicLinks\\PublicLinkBase' => __DIR__ . '/../..' . '/inc/SP/Mgmt/PublicLinks/PublicLinkBase.php', + 'SP\\Mgmt\\PublicLinks\\PublicLinkSearch' => __DIR__ . '/../..' . '/inc/SP/Mgmt/PublicLinks/PublicLinkSearch.php', + 'SP\\Mgmt\\Tags\\Tag' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Tags/Tag.php', + 'SP\\Mgmt\\Tags\\TagBase' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Tags/TagBase.php', + 'SP\\Mgmt\\Tags\\TagSearch' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Tags/TagSearch.php', + 'SP\\Mgmt\\Tracks\\Track' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Tracks/Track.php', + 'SP\\Mgmt\\Tracks\\TrackBase' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Tracks/TrackBase.php', + 'SP\\Mgmt\\Users\\User' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Users/User.php', + 'SP\\Mgmt\\Users\\UserBase' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Users/UserBase.php', + 'SP\\Mgmt\\Users\\UserLdap' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Users/UserLdap.php', + 'SP\\Mgmt\\Users\\UserLdapSync' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Users/UserLdapSync.php', + 'SP\\Mgmt\\Users\\UserMigrate' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Users/UserMigrate.php', + 'SP\\Mgmt\\Users\\UserPass' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Users/UserPass.php', + 'SP\\Mgmt\\Users\\UserPassRecover' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Users/UserPassRecover.php', + 'SP\\Mgmt\\Users\\UserPassRecoverBase' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Users/UserPassRecoverBase.php', + 'SP\\Mgmt\\Users\\UserPreferences' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Users/UserPreferences.php', + 'SP\\Mgmt\\Users\\UserPreferencesBase' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Users/UserPreferencesBase.php', + 'SP\\Mgmt\\Users\\UserPreferencesUtil' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Users/UserPreferencesUtil.php', + 'SP\\Mgmt\\Users\\UserSearch' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Users/UserSearch.php', + 'SP\\Mgmt\\Users\\UserUtil' => __DIR__ . '/../..' . '/inc/SP/Mgmt/Users/UserUtil.php', + 'SP\\Storage\\DB' => __DIR__ . '/../..' . '/inc/SP/Storage/DB.php', + 'SP\\Storage\\DBStorageInterface' => __DIR__ . '/../..' . '/inc/SP/Storage/DBStorageInterface.php', + 'SP\\Storage\\DBUtil' => __DIR__ . '/../..' . '/inc/SP/Storage/DBUtil.php', + 'SP\\Storage\\FileStorageInterface' => __DIR__ . '/../..' . '/inc/SP/Storage/FileStorageInterface.php', + 'SP\\Storage\\MySQLHandler' => __DIR__ . '/../..' . '/inc/SP/Storage/MySQLHandler.php', + 'SP\\Storage\\QueryData' => __DIR__ . '/../..' . '/inc/SP/Storage/QueryData.php', + 'SP\\Storage\\XmlHandler' => __DIR__ . '/../..' . '/inc/SP/Storage/XmlHandler.php', + 'SP\\Util\\ArrayUtil' => __DIR__ . '/../..' . '/inc/SP/Util/ArrayUtil.php', + 'SP\\Util\\Checks' => __DIR__ . '/../..' . '/inc/SP/Util/Checks.php', + 'SP\\Util\\Connection' => __DIR__ . '/../..' . '/inc/SP/Util/Connection.php', + 'SP\\Util\\ConnectionInterface' => __DIR__ . '/../..' . '/inc/SP/Util/ConnectionInterface.php', + 'SP\\Util\\Filter' => __DIR__ . '/../..' . '/inc/SP/Util/Filter.php', + 'SP\\Util\\HttpUtil' => __DIR__ . '/../..' . '/inc/SP/Util/HttpUtil.php', + 'SP\\Util\\ImageUtil' => __DIR__ . '/../..' . '/inc/SP/Util/ImageUtil.php', + 'SP\\Util\\Json' => __DIR__ . '/../..' . '/inc/SP/Util/Json.php', + 'SP\\Util\\Util' => __DIR__ . '/../..' . '/inc/SP/Util/Util.php', + 'SP\\Util\\Wiki\\DokuWikiApi' => __DIR__ . '/../..' . '/inc/SP/Util/Wiki/DokuWikiApi.php', + 'SP\\Util\\Wiki\\DokuWikiApiBase' => __DIR__ . '/../..' . '/inc/SP/Util/Wiki/DokuWikiApiBase.php', + 'SP\\Util\\Wiki\\DokuWikiApiParse' => __DIR__ . '/../..' . '/inc/SP/Util/Wiki/DokuWikiApiParse.php', + 'phpseclib\\Crypt\\AES' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Crypt/AES.php', + 'phpseclib\\Crypt\\Base' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Crypt/Base.php', + 'phpseclib\\Crypt\\Blowfish' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php', + 'phpseclib\\Crypt\\DES' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Crypt/DES.php', + 'phpseclib\\Crypt\\Hash' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Crypt/Hash.php', + 'phpseclib\\Crypt\\RC2' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Crypt/RC2.php', + 'phpseclib\\Crypt\\RC4' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Crypt/RC4.php', + 'phpseclib\\Crypt\\RSA' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Crypt/RSA.php', + 'phpseclib\\Crypt\\Random' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Crypt/Random.php', + 'phpseclib\\Crypt\\Rijndael' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php', + 'phpseclib\\Crypt\\TripleDES' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Crypt/TripleDES.php', + 'phpseclib\\Crypt\\Twofish' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Crypt/Twofish.php', + 'phpseclib\\File\\ANSI' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/File/ANSI.php', + 'phpseclib\\File\\ASN1' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/File/ASN1.php', + 'phpseclib\\File\\ASN1\\Element' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/File/ASN1/Element.php', + 'phpseclib\\File\\X509' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/File/X509.php', + 'phpseclib\\Math\\BigInteger' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Math/BigInteger.php', + 'phpseclib\\Net\\SCP' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Net/SCP.php', + 'phpseclib\\Net\\SFTP' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Net/SFTP.php', + 'phpseclib\\Net\\SFTP\\Stream' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Net/SFTP/Stream.php', + 'phpseclib\\Net\\SSH1' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Net/SSH1.php', + 'phpseclib\\Net\\SSH2' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/Net/SSH2.php', + 'phpseclib\\System\\SSH\\Agent' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/System/SSH/Agent.php', + 'phpseclib\\System\\SSH\\Agent\\Identity' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/System/SSH/Agent/Identity.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInit1701764f82c629b16cc164189600cb41::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit1701764f82c629b16cc164189600cb41::$prefixDirsPsr4; + $loader->prefixesPsr0 = ComposerStaticInit1701764f82c629b16cc164189600cb41::$prefixesPsr0; + $loader->classMap = ComposerStaticInit1701764f82c629b16cc164189600cb41::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json new file mode 100644 index 00000000..a7f09538 --- /dev/null +++ b/vendor/composer/installed.json @@ -0,0 +1,325 @@ +[ + { + "name": "paragonie/random_compat", + "version": "v2.0.10", + "version_normalized": "2.0.10.0", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/634bae8e911eefa89c1abfbf1b66da679ac8f54d", + "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "time": "2017-03-13T16:27:32+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "lib/random.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "pseudorandom", + "random" + ] + }, + { + "name": "phpmailer/phpmailer", + "version": "v6.0.1", + "version_normalized": "6.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/PHPMailer/PHPMailer.git", + "reference": "992392437c2e2784e0dc41446024fe411d293c96" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/992392437c2e2784e0dc41446024fe411d293c96", + "reference": "992392437c2e2784e0dc41446024fe411d293c96", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": ">=5.5.0" + }, + "require-dev": { + "doctrine/annotations": "1.2.*", + "friendsofphp/php-cs-fixer": "^2.2", + "phpdocumentor/phpdocumentor": "2.*", + "phpunit/phpunit": "^4.8 || ^5.7", + "zendframework/zend-eventmanager": "3.0.*", + "zendframework/zend-i18n": "2.7.3", + "zendframework/zend-serializer": "2.7.*" + }, + "suggest": { + "ext-mbstring": "Needed to send email in multibyte encoding charset", + "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", + "league/oauth2-google": "Needed for Google XOAUTH2 authentication", + "psr/log": "For optional PSR-3 debug logging", + "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" + }, + "time": "2017-09-14T16:47:12+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1" + ], + "authors": [ + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "description": "PHPMailer is a full-featured email creation and transfer class for PHP" + }, + { + "name": "ademarre/binary-to-text-php", + "version": "dev-master", + "version_normalized": "9999999-dev", + "source": { + "type": "git", + "url": "https://github.com/ademarre/binary-to-text-php.git", + "reference": "5d98d17be16d65e03851654a717293a4317bb947" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ademarre/binary-to-text-php/zipball/5d98d17be16d65e03851654a717293a4317bb947", + "reference": "5d98d17be16d65e03851654a717293a4317bb947", + "shasum": "" + }, + "require": { + "php": ">=5.2.14" + }, + "time": "2015-02-27T05:11:22+00:00", + "type": "library", + "installation-source": "source", + "autoload": { + "psr-0": { + "Base2n": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andre DeMarre", + "role": "Developer" + } + ], + "description": "Collection of binary-to-text encoding utilities for PHP. Includes Base32 support and much more.", + "homepage": "https://github.com/ademarre/binary-to-text-php", + "keywords": [ + "base-4", + "base-8", + "base32", + "binary", + "octal", + "rfc4648" + ] + }, + { + "name": "phpseclib/phpseclib", + "version": "2.0.6", + "version_normalized": "2.0.6.0", + "source": { + "type": "git", + "url": "https://github.com/phpseclib/phpseclib.git", + "reference": "34a7699e6f31b1ef4035ee36444407cecf9f56aa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/34a7699e6f31b1ef4035ee36444407cecf9f56aa", + "reference": "34a7699e6f31b1ef4035ee36444407cecf9f56aa", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phing/phing": "~2.7", + "phpunit/phpunit": "~4.0", + "sami/sami": "~2.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "suggest": { + "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", + "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", + "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", + "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." + }, + "time": "2017-06-05T06:31:10+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "phpseclib/bootstrap.php" + ], + "psr-4": { + "phpseclib\\": "phpseclib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jim Wigginton", + "email": "terrafrost@php.net", + "role": "Lead Developer" + }, + { + "name": "Patrick Monnerat", + "email": "pm@datasphere.ch", + "role": "Developer" + }, + { + "name": "Andreas Fischer", + "email": "bantu@phpbb.com", + "role": "Developer" + }, + { + "name": "Hans-Jürgen Petrich", + "email": "petrich@tronic-media.com", + "role": "Developer" + }, + { + "name": "Graham Campbell", + "email": "graham@alt-three.com", + "role": "Developer" + } + ], + "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", + "homepage": "http://phpseclib.sourceforge.net", + "keywords": [ + "BigInteger", + "aes", + "asn.1", + "asn1", + "blowfish", + "crypto", + "cryptography", + "encryption", + "rsa", + "security", + "sftp", + "signature", + "signing", + "ssh", + "twofish", + "x.509", + "x509" + ] + }, + { + "name": "defuse/php-encryption", + "version": "v2.1.0", + "version_normalized": "2.1.0.0", + "source": { + "type": "git", + "url": "https://github.com/defuse/php-encryption.git", + "reference": "5176f5abb38d3ea8a6e3ac6cd3bbb54d8185a689" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/defuse/php-encryption/zipball/5176f5abb38d3ea8a6e3ac6cd3bbb54d8185a689", + "reference": "5176f5abb38d3ea8a6e3ac6cd3bbb54d8185a689", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "paragonie/random_compat": "~2.0", + "php": ">=5.4.0" + }, + "require-dev": { + "nikic/php-parser": "^2.0|^3.0", + "phpunit/phpunit": "^4|^5" + }, + "time": "2017-05-18T21:28:48+00:00", + "bin": [ + "bin/generate-defuse-key" + ], + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Defuse\\Crypto\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Hornby", + "email": "taylor@defuse.ca", + "homepage": "https://defuse.ca/" + }, + { + "name": "Scott Arciszewski", + "email": "info@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "Secure PHP Encryption Library", + "keywords": [ + "aes", + "authenticated encryption", + "cipher", + "crypto", + "cryptography", + "encrypt", + "encryption", + "openssl", + "security", + "symmetric key cryptography" + ] + } +] diff --git a/vendor/defuse/php-encryption/.gitignore b/vendor/defuse/php-encryption/.gitignore new file mode 100644 index 00000000..987c5164 --- /dev/null +++ b/vendor/defuse/php-encryption/.gitignore @@ -0,0 +1,11 @@ +*~ +/test/unit/File/big-generated-file +/composer.lock +/vendor +defuse-crypto.phar +defuse-crypto.phar.sig +composer.phar +box.phar +phpunit.phar +phpunit.phar.asc +test/unit/File/tmp diff --git a/vendor/defuse/php-encryption/.php_cs b/vendor/defuse/php-encryption/.php_cs new file mode 100644 index 00000000..e317732d --- /dev/null +++ b/vendor/defuse/php-encryption/.php_cs @@ -0,0 +1,60 @@ +level(Symfony\CS\FixerInterface::PSR2_LEVEL) + ->fixers([ + 'blankline_after_open_tag', + 'empty_return', + 'extra_empty_lines', + 'function_typehint_space', + 'join_function', + 'method_argument_default_value', + 'multiline_array_trailing_comma', + 'no_blank_lines_after_class_opening', + 'no_empty_lines_after_phpdocs', + 'phpdoc_indent', + 'phpdoc_no_access', + 'phpdoc_no_empty_return', + 'phpdoc_no_package', + 'phpdoc_params', + 'phpdoc_scalar', + 'phpdoc_separation', + 'phpdoc_trim', + 'phpdoc_type_to_var', + 'phpdoc_types', + 'phpdoc_var_without_name', + 'remove_leading_slash_use', + 'remove_lines_between_uses', + 'short_bool_cast', + 'single_quote', + 'spaces_after_semicolon', + 'spaces_before_semicolon', + 'spaces_cast', + 'standardize_not_equal', + 'ternary_spaces', + 'trim_array_spaces', + 'unneeded_control_parentheses', + 'unused_use', + 'whitespacy_lines', + 'align_double_arrow', + 'concat_with_spaces', + 'logical_not_operators_with_successor_space', + 'multiline_spaces_before_semicolon', + 'newline_after_open_tag', + 'ordered_use', + 'php_unit_construct', + 'phpdoc_order', + 'short_array_syntax', + ]); + +if (null === $input->getArgument('path')) { + $config + ->finder( + Symfony\CS\Finder\DefaultFinder::create() + ->in('src') + ->in('test') + ->exclude('vendor') + ); +} + +return $config; diff --git a/inc/Exts/Defuse/LICENSE b/vendor/defuse/php-encryption/LICENSE similarity index 100% rename from inc/Exts/Defuse/LICENSE rename to vendor/defuse/php-encryption/LICENSE diff --git a/inc/Exts/Defuse/README.md b/vendor/defuse/php-encryption/README.md similarity index 98% rename from inc/Exts/Defuse/README.md rename to vendor/defuse/php-encryption/README.md index cd101a2c..a8f29258 100644 --- a/inc/Exts/Defuse/README.md +++ b/vendor/defuse/php-encryption/README.md @@ -60,6 +60,7 @@ If the documentation is not enough for you to understand how to use this library, then you can look at an example project that uses this library: - [encutil](https://github.com/defuse/encutil) +- [fileencrypt](https://github.com/tsusanka/fileencrypt) Security Audit Status --------------------- diff --git a/vendor/defuse/php-encryption/composer.json b/vendor/defuse/php-encryption/composer.json new file mode 100644 index 00000000..866b4975 --- /dev/null +++ b/vendor/defuse/php-encryption/composer.json @@ -0,0 +1,35 @@ +{ + "name": "defuse/php-encryption", + "description": "Secure PHP Encryption Library", + "license": "MIT", + "keywords": ["security", "encryption", "AES", "openssl", "cipher", "cryptography", "symmetric key cryptography", "crypto", "encrypt", "authenticated encryption"], + "authors": [ + { + "name": "Taylor Hornby", + "email": "taylor@defuse.ca", + "homepage": "https://defuse.ca/" + }, + { + "name": "Scott Arciszewski", + "email": "info@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "autoload": { + "psr-4": { + "Defuse\\Crypto\\": "src" + } + }, + "require": { + "paragonie/random_compat": "~2.0", + "ext-openssl": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4|^5", + "nikic/php-parser": "^2.0|^3.0" + }, + "bin": [ + "bin/generate-defuse-key" + ] +} diff --git a/vendor/defuse/php-encryption/dist/Makefile b/vendor/defuse/php-encryption/dist/Makefile new file mode 100644 index 00000000..4b65c9ec --- /dev/null +++ b/vendor/defuse/php-encryption/dist/Makefile @@ -0,0 +1,37 @@ +# This builds defuse-crypto.phar. To run this Makefile, `box` and `composer` +# must be installed and in your $PATH. Run it from inside the dist/ directory. + +box := $(shell which box) +composer := "composer" + +.PHONY: all +all: build-phar + +.PHONY: sign-phar +sign-phar: + gpg -u 7B4B2D98 --armor --output defuse-crypto.phar.sig --detach-sig defuse-crypto.phar + +# ensure we run in clean tree. export git tree and run there. +.PHONY: build-phar +build-phar: + @echo "Creating .phar from revision $(shell git rev-parse HEAD)." + rm -rf worktree + install -d worktree + (cd $(CURDIR)/..; git archive HEAD) | tar -x -C worktree + $(MAKE) -f $(CURDIR)/Makefile -C worktree defuse-crypto.phar + mv worktree/*.phar . + rm -rf worktree + +.PHONY: clean +clean: + rm -vf defuse-crypto.phar defuse-crypto.phar.sig + +# Inside workdir/: + +defuse-crypto.phar: dist/box.json composer.lock + cp dist/box.json . + php -d phar.readonly=0 $(box) build -c box.json -v + +composer.lock: + $(composer) install --no-dev + diff --git a/vendor/defuse/php-encryption/dist/box.json b/vendor/defuse/php-encryption/dist/box.json new file mode 100644 index 00000000..f225f781 --- /dev/null +++ b/vendor/defuse/php-encryption/dist/box.json @@ -0,0 +1,25 @@ +{ + "chmod": "0755", + "finder": [ + { + "in": "src", + "name": "*.php" + }, + { + "in": "vendor/composer", + "name": "*.php" + }, + { + "in": "vendor/paragonie", + "name": "*.php", + "exclude": "other" + } + ], + "compactors": [ + "Herrera\\Box\\Compactor\\Php" + ], + "main": "vendor/autoload.php", + "output": "defuse-crypto.phar", + "shebang": false, + "stub": true +} diff --git a/vendor/defuse/php-encryption/dist/signingkey.asc b/vendor/defuse/php-encryption/dist/signingkey.asc new file mode 100644 index 00000000..63b6aa3d --- /dev/null +++ b/vendor/defuse/php-encryption/dist/signingkey.asc @@ -0,0 +1,52 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v2 + +mQINBFarvO4BEACdQBaLt6SUBx1cB5liUu1qo+YwVLh9bxTregQtmEREMdTVqXYt +e5b79uL4pQp2GlKHcEyRURS+6rIIruM0oh9ZYGTJYPAkCDzJxaU2awZeFbfBvpCm +iF66/O4ZJI4mlT8dFKmxBJxDhfeOR2UmmhDiEsJK9FxBKUzvo/dWrX2pBzf8Y122 +iIaVraSo+tymaf7vriaIf/NnSKhDw8dtQYGM4NMrxxsPTfbCF8XiboDgTkoD2A+6 +NpOJYxA4Veedsf2TP9YLhljH4m5yYlfjjqBzbBCPWuE6Hhy5Xze9mncgDr7LKenm +Ctf2NxW6y4O3RCI+9eLlBfFWB+KuGV87/b5daetX7NNLbjID8z2rqEa+d6wu5xA5 +Ta2uiVkAOEovr3XnkayZ9zth+Za7w7Ai0ln0N/LVMkM+Gu4z/pJv6HjmTGDM2wJb +fs+UOM0TFdg+N81Do67XT2M4o0MeHyUqsIiWpYa2Qf1PNmqTQNJnRk8uZZ9I96Nh +eCgNuCbhsQiYBMicox+xmuWAlGAfA06y0kCtmqGhiBGArdJlWvUqPqGiZ4Hln9z0 +FJmXDOh0Q/FIPxcDg8mKRRbx+lOP389PLsPpj4b2B/4PEgfpCCOwuKpLotATZxC1 +9JwFk0Y/cvUUkq4a+nAJBNtBbtRJkEesuuUnRq6XexmnE3uUucDcV0XCSwARAQAB +tCBUYXlsb3IgSG9ybmJ5IDx0YXlsb3JAZGVmdXNlLmNhPokCPQQTAQgAJwUCVqu8 +7gIbAwUJB4TOAAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRA4XuBVoSkVOJbx +EACG0F9blPMAsK05EWyNnnS4mw25zPfbaqqEvYbquAeM0nBpRDm7sRn2MNR0AL4g +7XrtxE/4qYkdEl6f2wFCQeRhZgxE3w22llredzLme11Hic8hn4i7ysdIw0r9dMMR +kjgR5UcWpv8iU847czyK09PkKW2EaLRbX2qbA7rNU5qCFKeD4Sy4bBTteISeVsHo +Vr9o1/bRrMhgZ++ts8hYf0LmujIf5cxp+qcdKwCXSnS/gmmXaKRMCPv/Wdlq9bt6 +LX9jZB9lXBdGxcBJeFOsTG+QRDiVjg3d6i3o3TAKV87ALBI4v2ADEYtN8lviHo3/ +SovVKv6zrUsZHxhoGiLTiksNrYsKMmiMxdJCoOazmtUPnZ4UOtT8NdqMPoKvdoRz +f4rhZ+f5jSVD9OuX2PDmfyq21Rdiym7Vcgr+uTIFJ3ShRHjWb/ytCwoB2FeGY6+G +AKY58bTQvUIqEJvSov/+TAqZ4BfOuSdTLcHglV1OdUu2SFZvU2gmyVp0l5elGv5t +FyUlBJUkQT9MtvsdLOR7vQi8QapV+9LWpqwvaj9hyEJz848DQ2sdYTphUytFHv7H +k58DAtVhTrVjHyeefjiYtMl6vSAgTjy5LWAUpo5TfhdGrAi0Tdd/GD7amHoWoDy8 +EKXKq2xPLo3JOdkWYQUi5NErzEskfsSzpCOgyDJmGetWK7kCDQRWq7zuARAAu7/i +cm8cjgLhHEX/bgfwOT2hLOLSjjve0O8YFSuJO9XqIHXqmfVOrqWtfG0Mh4bwlfqc +MAvBfF5NSSPfAE4ftBAQ1e5jEv8hJeqICpq3IHTFX4etBs49NfNkyveQl/amVTu1 ++/O5J4CuIcsEf3y0Xuu38n7EB3SfMQCWLcOR1NyZoX3bI+CGRpOVVoFse3ljSWL4 +LhLVl0WiEMXULsussEoN+c6x9KCyAi/jFOrxrTrFC//sZesKj6KucoqKGfwMWrrv +IeRT9Ga8Wn5MJnQu0aWg+zVVYqTedXZLNLODgQIInFnXO0seBXy15yDok1y5bkx2 +sinKg4+mueYaGUpoUti0hM3J3yaC34i6Cwa8MQoLNw1JIS/oNtKjpMxyV10w8aoc +PHRK3n7UYp10mJHx7aM+lldSKvVS1NTQmI4vloNLwMp324H5ANDFAlRUz7mysVnu +DEEvigPSPxs5ZYENu/i7pCQC5qHfhrlBrQwTjhegr0pQPcumy2fO5SGC9l/5B7ev +bqQSZmDeWWoTvh2w2wl5/RWAsgZKx6rDtkCqYx7sSBY17uorrxP24LP4zhq7NxRV +nfdsLogbCFNVQ66u7qvq5zFccdFtg9h1HQWdS7wbnKSBGZoo5gl6js7GGtxfGbb0 +oQ9kp6eciF4U92r6POhVgbRe4CfPo50nqgZBddkAEQEAAYkCJQQYAQgADwUCVqu8 +7gIbDAUJB4TOAAAKCRA4XuBVoSkVOFJ8D/9J8IJ4XWUU3FYIaHJ3XeSoxDmTi7d5 +WmNdf1lmwz82MQjG4uw17oCbvQzmj4/a/CM1Ly4v0WwBhUf9aiNErD0ByHASFnuc +tlQBLVJdk0vRyD0fZakGg64qCA76hiySjMhlGHkQFyP2mDORc2GNu/OqFGm79pXT +ZUplXxd431E603/agM5xJrweutMMpP1nBFTSEMJvbMNzDVN8I1A1CH4zVmAVxOUk +sQ5L5rXW+KeXWyiMF24+l2CMnkQ2CxfHpkcpfPJs1Cbt+TIBSSofIqK8QJXrb/2f +Zpl/ftqW7Xe86rJFrB/Y/77LDWx10rqWEvfCqrBxrMj7ONAQfbKQF/IjAwDN17Wf +1K74rqKnRu+KHCyNM89s1iDbQC9kzZfzYt4AEOvAH/ZQDMZffzPSbnfkBerExFpa +93XMuiR66jiBsf9IXIQeydpJD4Ogl2sSUSxFEJxJ/bBSxPxC5w7/BVMA7Am1y8Zo +3hrpqnX2PBzxG7L0FZ6fYkfR3p8JS7vI6nByBf2IDv8W32wn43olPf+u6uobHLvt +ttapOjwPAhPDalRuxs9U6WSg06QJkT/0F8TFUPWpsFmKTl+G4Ty7PHWsjeeNHJCL +7/5RQboFY3k8Jy3/sIofABO6Un9LJivDuu9PxqA0IgvaS6Mja8JdCCk9Nyk4vHB7 +IEgAL/CYqrk38w== +=lmD7 +-----END PGP PUBLIC KEY BLOCK----- diff --git a/vendor/defuse/php-encryption/docs/CryptoDetails.md b/vendor/defuse/php-encryption/docs/CryptoDetails.md new file mode 100644 index 00000000..43abd72a --- /dev/null +++ b/vendor/defuse/php-encryption/docs/CryptoDetails.md @@ -0,0 +1,64 @@ +Cryptography Details +===================== + +Here is a high-level description of how this library works. Any discrepancy +between this documentation and the actual implementation will be considered +a security bug. + +Let's start with the following definitions: + +- HKDF-SHA256(*k*, *n*, *info*, *s*) is the key derivation function specified in + RFC 5869 (using the SHA256 hash function). The parameters are: + - *k*: The initial keying material. + - *n*: The number of output bytes. + - *info*: The info string. + - *s*: The salt. +- AES-256-CTR(*m*, *k*, *iv*) is AES-256 encryption in CTR mode. The parameters + are: + - *m*: An arbitrary-length (possibly zero-length) message. + - *k*: A 32-byte key. + - *iv*: A 16-byte initialization vector (nonce). +- PBKDF2-SHA256(*p*, *s*, *i*, *n*) is the password-based key derivation + function defined in RFC 2898 (using the SHA256 hash function). The parameters + are: + - *p*: The password string. + - *s*: The salt string. + - *i*: The iteration count. + - *n*: The output length in bytes. +- VERSION is the string `"\xDE\xF5\x02\x00"`. +- AUTHINFO is the string `"DefusePHP|V2|KeyForAuthentication"`. +- ENCRINFO is the string `"DefusePHP|V2|KeyForEncryption"`. + +To encrypt a message *m* using a 32-byte key *k*, the following steps are taken: + +1. Generate a random 32-byte string *salt*. +2. Derive the 32-byte authentication key *akey* = HKDF-SHA256(*k*, 32, AUTHINFO, *salt*). +3. Derive the 32-byte encryption key *ekey* = HKDF-SHA256(*k*, 32, ENCRINFO, *salt*). +4. Generate a random 16-byte initialization vector *iv*. +5. Compute *c* = AES-256-CTR(*m*, *ekey*, *iv*). +6. Combine *ctxt* = VERSION || *salt* || *iv* || *c*. +7. Compute *h* = HMAC-SHA256(*ctxt*, *akey*). +8. Output *ctxt* || *h*. + +Decryption is roughly the reverse process (see the code for details, since the +security of the decryption routine is highly implementation-dependent). + +For encryption using a password *p*, steps 1-3 above are replaced by: + +1. Generate a random 32-byte string *salt*. +2. Compute *k* = PBKDF2-SHA256(SHA256(*p*), *salt*, 100000, 32). +3. Derive the 32-byte authentication key *akey* = HKDF-SHA256(*k*, 32, AUTHINFO, *salt*) +4. Derive the 32-byte encryption key *ekey* = HKDF-SHA256(*k*, 32, ENCRINFO, *salt*) + +The remainder of the process is the same. Notice the reuse of the same *salt* +for PBKDF2-SHA256 and HKDF-SHA256. The prehashing of the password in step 2 is +done to prevent a [DoS attack using long +passwords](https://github.com/defuse/php-encryption/issues/230). + +For `KeyProtectedByPassword`, the serialized key is encrypted according to the +password encryption defined above. However, the actual password used for +encryption is the SHA256 hash of the password the user provided. This is done in +order to provide domain separation between the message encryption in the user's +application and the internal key encryption done by this library. It fixes +a [key replacement chosen-protocol +attack](https://github.com/defuse/php-encryption/issues/240). diff --git a/vendor/defuse/php-encryption/docs/FAQ.md b/vendor/defuse/php-encryption/docs/FAQ.md new file mode 100644 index 00000000..135e235c --- /dev/null +++ b/vendor/defuse/php-encryption/docs/FAQ.md @@ -0,0 +1,39 @@ +Frequently Asked Questions +=========================== + +How do I use this library to encrypt passwords? +------------------------------------------------ + +Passwords should not be encrypted, they should be hashed with a *slow* password +hashing function that's designed to slow down password guessing attacks. See +[How to Safely Store Your Users' Passwords in +2016](https://paragonie.com/blog/2016/02/how-safely-store-password-in-2016). + +How do I give it the same key every time instead of a new random key? +---------------------------------------------------------------------- + +A `Key` object can be saved to a string by calling its `saveToAsciiSafeString()` +method. You will have to save that string somewhere safe, and then load it back +into a `Key` object using `Key`'s `loadFromAsciiSafeString` static method. + +Where you store the string depends on your application. For example if you are +using `KeyProtectedByPassword` to encrypt files with a user's login password, +then you should not store the `Key` at all. If you are protecting sensitive data +on a server that may be compromised, then you should store it in a hardware +security module. When in doubt, consult a security expert. + +Why is an EnvironmentIsBrokenException getting thrown? +------------------------------------------------------- + +Either you've encountered a bug in this library, or your system doesn't support +the use of this library. For example, if your system does not have a secure +random number generator, this library will refuse to run, by throwing that +exception, instead of falling back to an insecure random number generator. + +Why am I getting a BadFormatException when loading a Key from a string? +------------------------------------------------------------------------ + +If you're getting this exception, then the string you're giving to +`loadFromAsciiSafeString()` is *not* the same as the string you got from +`saveToAsciiSafeString()`. Perhaps your database column isn't wide enough and +it's truncating the string as you insert it? diff --git a/vendor/defuse/php-encryption/docs/InstallingAndVerifying.md b/vendor/defuse/php-encryption/docs/InstallingAndVerifying.md new file mode 100644 index 00000000..12b5fee4 --- /dev/null +++ b/vendor/defuse/php-encryption/docs/InstallingAndVerifying.md @@ -0,0 +1,53 @@ +Getting The Code +================= + +There are two ways to use this library in your applications. You can either: + +1. Use [Composer](https://getcomposer.org/), or +2. `require_once` a single `.phar` file in your application. + +If you are not using either option (for example, because you're using Git submodules), you may need to write your own autoloader ([example](https://gist.github.com/paragonie-scott/949daee819bb7f19c50e5e103170b400)). + +Option 1: Using Composer +------------------------- + +Run this inside the directory of your composer-enabled project: + +```sh +composer require defuse/php-encryption +``` + +Unfortunately, composer doesn't provide a way for you to verify that the code +you're getting was signed by this library's authors. If you want a more secure +option, use the `.phar` method described below. + +Option 2: Including a PHAR +---------------------------- + +The `.phar` option lets you include this library into your project simply by +calling `require_once` on a single file. Download `defuse-crypto.phar` and +`defuse-crypto.phar.sig` from this project's +[releases](https://github.com/defuse/php-encryption/releases) page. + +You should verify the integrity of the `.phar`. The `defuse-crypto.phar.sig` +contains the signature of `defuse-crypto.phar`. It is signed with Taylor +Hornby's PGP key. You can find Taylor's public key in `dist/signingkey.asc`. You +can verify the public key's fingerprint against the Taylor Hornby's [contact +page](https://defuse.ca/contact.htm) and +[twitter](https://twitter.com/DefuseSec/status/723741424253059074). + +Once you have verified the signature, it is safe to use the `.phar`. Place it +somewhere in your file system, e.g. `/var/www/lib/defuse-crypto.phar`, and then +pass that path to `require_once`. + +```php + Whenever there is a conflict between security and some other property, + > security will be favored. For example, the library has runtime tests, + > which make it slower, but will hopefully stop it from encrypting stuff + > if the platform it's running on is broken. + +- Rule #2: It should be difficult to misuse the library. + + > We assume the developers using this library have no experience with + > cryptography. We only assume that they know that the "key" is something + > you need to encrypt and decrypt the messages, and that it must be kept + > secret. Whenever possible, the library should refuse to encrypt or decrypt + > messages when it is not being used correctly. + +- Rule #3: The library aims only to be compatible with itself. + + > Other PHP encryption libraries try to support every possible type of + > encryption, even the insecure ones (e.g. ECB mode). Because there are so + > many options, inexperienced developers must decide whether to use "CBC + > mode" or "ECB mode" when both are meaningless terms to them. This + > inevitably leads to vulnerabilities. + + > This library will only support one secure mode. A developer using this + > library will call "encrypt" and "decrypt" methods without worrying about + > how they are implemented. + +- Rule #4: The library should require no special installation. + + > Some PHP encryption libraries, like libsodium-php, are not straightforward + > to install and cannot packaged with "just download and extract" + > applications. This library will always be just a handful of PHP files that + > you can copy to your source tree and require(). + +Publishing Releases +-------------------- + +To make a release, you will need to install [composer](https://getcomposer.org/) +and [box](https://github.com/box-project/box2) on your system. They will need to +be available in your `$PATH` so that running the commands `composer` and `box` +in your terminal run them, respectively. You will also need the private key for +signing (ID: 7B4B2D98) available. + +Once you have those tools installed and the key available follow these steps: + +**Remember to set the version number in `composer.json`!** + +Make a fresh clone of the repository: + +``` +git clone +``` + +Check out the branch you want to release: + +``` +git checkout +``` + +Check that the version number in composer.json is correct: + +``` +cat composer.json +``` + +Run the tests: + +``` +composer install +./test.sh +``` + +Generate the `.phar`: + +``` +cd dist +make build-phar +``` + +Test the `.phar`: + +``` +cd ../ +./test.sh dist/defuse-crypto.phar +``` + +Sign the `.phar`: + +``` +cd dist +make sign-phar +``` + +Tag the release: + +``` +git -c user.signingkey=7B4B2D98 tag -s "" -m "" +``` + +`` should be in the format `v2.0.0` and `` should look +like "Release of v2.0.0." + +Push the tag to github, then use the +[releases](https://github.com/defuse/php-encryption/releases) page to draft +a new release for that tag. Upload the `.phar` and the `.phar.sig` file to be +included as part of that release. diff --git a/vendor/defuse/php-encryption/docs/Tutorial.md b/vendor/defuse/php-encryption/docs/Tutorial.md new file mode 100644 index 00000000..40285cc3 --- /dev/null +++ b/vendor/defuse/php-encryption/docs/Tutorial.md @@ -0,0 +1,298 @@ +Tutorial +========= + +Hello! If you're reading this file, it's because you want to add encryption to +one of your PHP projects. My job, as the person writing this documentation, is +to help you make sure you're doing the right thing and then show you how to use +this library to do it. To help me help you, please read the documentation +*carefully* and *deliberately*. + +A Word of Caution +------------------ + +Encryption is not magic dust you can sprinkle on a system to make it more +secure. The way encryption is integrated into a system's design needs to be +carefully thought out. Sometimes, encryption is the wrong thing to use. Other +times, encryption needs to be used in a very specific way in order for it to +work as intended. Even if you are sure of what you are doing, we strongly +recommend seeking advice from an expert. + +The first step is to think about your application's threat model. Ask yourself +the following questions. Who will want to attack my application, and what will +they get out of it? Are they trying to steal some information? Trying to alter +or destroy some information? Or just trying to make the system go down so people +can't access it? Then ask yourself how encryption can help combat those threats. +If you're going to add encryption to your application, you should have a very +clear idea of exactly which kinds of attacks it's helping to secure your +application against. Once you have your threat model, think about what kinds of +attacks it *does not* cover, and whether or not you should improve your threat +model to include those attacks. + +**This isn't for storing user login passwords:** The most common use of +cryptography in web applications is to protect the users' login passwords. If +you're trying to use this library to "encrypt" your users' passwords, you're in +the wrong place. Passwords shouldn't be *encrypted*, they should be *hashed* +with a slow computation-heavy function that makes password guessing attacks more +expensive. See [How to Safely Store Your Users' Passwords in +2016](https://paragonie.com/blog/2016/02/how-safely-store-password-in-2016). + +**This isn't for encrypting network communication:** Likewise, if you're trying +to encrypt messages sent between two parties over the Internet, you don't want +to be using this library. For that, set up a TLS connection between the two +points, or, if it's a chat app, use the [Signal +Protocol](https://whispersystems.org/blog/advanced-ratcheting/). + +What this library provides is symmetric encryption for "data at rest." This +means it is not suitable for use in building protocols where "data is in motion" +(i.e. moving over a network) except in limited set of cases. + +Getting the Code +----------------- + +There are several different ways to obtain this library's code and to add it to +your project. Even if you've already cloned the code from GitHub, you should +take steps to verify the cryptographic signatures to make sure the code you got +was not intercepted and modified by an attacker. + +Please head over to the [**Installing and +Verifying**](InstallingAndVerifying.md) documentation to get the code, and then +come back here to continue the tutorial. + +Using the Library +------------------ + +I'm going to assume you know what symmetric encryption is, and the difference +between symmetric and asymmetric encryption. If you don't, I recommend taking +[Dan Boneh's Cryptography I course](https://www.coursera.org/learn/crypto/) on +Coursera. + +To give you a quick introduction to the library, I'm going to explain how it +would be used in two sterotypical scenarios. Hopefully, one of these sterotypes +is close enough to what you want to do that you'll be able to figure out what +needs to be different on your own. + +### Formal Documentation + +While this tutorial should get you up and running fast, it's important to +understand how this library behaves. Please make sure to read the formal +documentation of all of the functions you're using, since there are some +important security warnings there. + +The following classes are available for you to use: + +- [Crypto](classes/Crypto.md): Encrypting and decrypting strings. +- [File](classes/File.md): Encrypting and decrypting files. +- [Key](classes/Key.md): Represents a secret encryption key. +- [KeyProtectedByPassword](classes/KeyProtectedByPassword.md): Represents + a secret encryption key that needs to be "unlocked" by a password before it + can be used. + +### Scenario #1: Keep data secret from the database administrator + +In this scenario, our threat model is as follows. Alice is a server +administrator responsible for managing a trusted web server. Eve is a database +administrator responsible for managing a database server. Dave is a web +developer working on code that will eventually run on the trusted web server. + +Let's say Alice and Dave trust each other, and Alice is going to host Dave's +application on her server. But both Alice and Dave don't trust Eve. They know +Eve is a good database administrator, but she might have incentive to steal the +data from the database. They want to keep some of the web application's data +secret from Eve. + +In order to do that, Alice will use the included `generate-defuse-key` script +which generates a random encryption key and prints it to standard output: + +```sh +$ composer require defuse/php-encryption +$ vendor/bin/generate-defuse-key +``` + +Alice will run this script once and save the output to a configuration file, say +in `/etc/daveapp-secret-key.txt` and set the file permissions so that only the +user that the website PHP scripts run as can access it. + +Dave will write his code to load the key from the configuration file: + +```php +saveToAsciiSafeString(); + // ... save $protected_key_encoded into the user's account record +} +``` + +Then, when the user logs in, Dave's code will load the protected key from the +user's account record, unlock it to get a `Key` object, and save the `Key` +object somewhere safe (like temporary memory-backed session storage). Note that +wherever Dave's code saves the key, it must be destroyed once the user logs out, +or else the attacker might be able to find users' keys even if they were never +logged in during the attack. + +```php +unlockKey($password); +$user_key_encoded = $user_key->saveToAsciiSafeString(); +// ... save $user_key_encoded in the session +``` + +```php +> 8 ) & 1; + $length -= $sub; + $last -= $sub; + + /* Horizontal Tab (0x09) a.k.a. \t */ + $chr = \ord($string[$last]); + // if ($chr === 0x09) $length -= 1; + $sub = (((0x08 - $chr) & ($chr - 0x0a)) >> 8) & 1; + $length -= $sub; + $last -= $sub; + + /* New Line (0x0a), a.k.a. \n */ + $chr = \ord($string[$last]); + // if ($chr === 0x0a) $length -= 1; + $sub = (((0x09 - $chr) & ($chr - 0x0b)) >> 8) & 1; + $length -= $sub; + $last -= $sub; + + /* Carriage Return (0x0D), a.k.a. \r */ + $chr = \ord($string[$last]); + // if ($chr === 0x0d) $length -= 1; + $sub = (((0x0c - $chr) & ($chr - 0x0e)) >> 8) & 1; + $length -= $sub; + $last -= $sub; + + /* Space */ + $chr = \ord($string[$last]); + // if ($chr === 0x20) $length -= 1; + $sub = (((0x1f - $chr) & ($chr - 0x21)) >> 8) & 1; + $length -= $sub; + } while ($prevLength !== $length && $length > 0); + return (string) Core::ourSubstr($string, 0, $length); + } /* * SECURITY NOTE ON APPLYING CHECKSUMS TO SECRETS: @@ -161,6 +217,8 @@ final class Encoding ); } + /* If you get an exception here when attempting to load from a file, first pass your + key to Encoding::trimTrailingWhitespace() to remove newline characters, etc. */ $bytes = Encoding::hexToBin($string); /* Make sure we have enough bytes to get the version header and checksum. */ @@ -171,7 +229,7 @@ final class Encoding } /* Grab the version header. */ - $actual_header = Core::ourSubstr($bytes, 0, self::SERIALIZE_HEADER_BYTES); + $actual_header = (string) Core::ourSubstr($bytes, 0, self::SERIALIZE_HEADER_BYTES); if ($actual_header !== $expected_header) { throw new Ex\BadFormatException( @@ -180,14 +238,14 @@ final class Encoding } /* Grab the bytes that are part of the checksum. */ - $checked_bytes = Core::ourSubstr( + $checked_bytes = (string) Core::ourSubstr( $bytes, 0, Core::ourStrlen($bytes) - self::CHECKSUM_BYTE_SIZE ); /* Grab the included checksum. */ - $checksum_a = Core::ourSubstr( + $checksum_a = (string) Core::ourSubstr( $bytes, Core::ourStrlen($bytes) - self::CHECKSUM_BYTE_SIZE, self::CHECKSUM_BYTE_SIZE @@ -203,7 +261,7 @@ final class Encoding ); } - return Core::ourSubstr( + return (string) Core::ourSubstr( $bytes, self::SERIALIZE_HEADER_BYTES, Core::ourStrlen($bytes) - self::SERIALIZE_HEADER_BYTES - self::CHECKSUM_BYTE_SIZE diff --git a/inc/Exts/Defuse/Crypto/Exception/BadFormatException.php b/vendor/defuse/php-encryption/src/Exception/BadFormatException.php similarity index 100% rename from inc/Exts/Defuse/Crypto/Exception/BadFormatException.php rename to vendor/defuse/php-encryption/src/Exception/BadFormatException.php diff --git a/inc/Exts/Defuse/Crypto/Exception/CryptoException.php b/vendor/defuse/php-encryption/src/Exception/CryptoException.php similarity index 100% rename from inc/Exts/Defuse/Crypto/Exception/CryptoException.php rename to vendor/defuse/php-encryption/src/Exception/CryptoException.php diff --git a/inc/Exts/Defuse/Crypto/Exception/EnvironmentIsBrokenException.php b/vendor/defuse/php-encryption/src/Exception/EnvironmentIsBrokenException.php similarity index 100% rename from inc/Exts/Defuse/Crypto/Exception/EnvironmentIsBrokenException.php rename to vendor/defuse/php-encryption/src/Exception/EnvironmentIsBrokenException.php diff --git a/inc/Exts/Defuse/Crypto/Exception/IOException.php b/vendor/defuse/php-encryption/src/Exception/IOException.php similarity index 100% rename from inc/Exts/Defuse/Crypto/Exception/IOException.php rename to vendor/defuse/php-encryption/src/Exception/IOException.php diff --git a/inc/Exts/Defuse/Crypto/Exception/WrongKeyOrModifiedCiphertextException.php b/vendor/defuse/php-encryption/src/Exception/WrongKeyOrModifiedCiphertextException.php similarity index 100% rename from inc/Exts/Defuse/Crypto/Exception/WrongKeyOrModifiedCiphertextException.php rename to vendor/defuse/php-encryption/src/Exception/WrongKeyOrModifiedCiphertextException.php diff --git a/inc/Exts/Defuse/Crypto/File.php b/vendor/defuse/php-encryption/src/File.php similarity index 93% rename from inc/Exts/Defuse/Crypto/File.php rename to vendor/defuse/php-encryption/src/File.php index d7390777..78e39d6f 100644 --- a/inc/Exts/Defuse/Crypto/File.php +++ b/vendor/defuse/php-encryption/src/File.php @@ -12,6 +12,7 @@ final class File * @param string $inputFilename * @param string $outputFilename * @param Key $key + * @return void * * @throws Ex\EnvironmentIsBrokenException * @throws Ex\IOException @@ -32,6 +33,7 @@ final class File * @param string $inputFilename * @param string $outputFilename * @param string $password + * @return void * * @throws Ex\EnvironmentIsBrokenException * @throws Ex\IOException @@ -51,6 +53,7 @@ final class File * @param string $inputFilename * @param string $outputFilename * @param Key $key + * @return void * * @throws Ex\EnvironmentIsBrokenException * @throws Ex\IOException @@ -72,6 +75,7 @@ final class File * @param string $inputFilename * @param string $outputFilename * @param string $password + * @return void * * @throws Ex\EnvironmentIsBrokenException * @throws Ex\IOException @@ -93,6 +97,7 @@ final class File * @param resource $inputHandle * @param resource $outputHandle * @param Key $key + * @return void * * @throws Ex\EnvironmentIsBrokenException * @throws Ex\WrongKeyOrModifiedCiphertextException @@ -114,6 +119,7 @@ final class File * @param resource $inputHandle * @param resource $outputHandle * @param string $password + * @return void * * @throws Ex\EnvironmentIsBrokenException * @throws Ex\IOException @@ -135,6 +141,7 @@ final class File * @param resource $inputHandle * @param resource $outputHandle * @param Key $key + * @return void * * @throws Ex\EnvironmentIsBrokenException * @throws Ex\IOException @@ -156,6 +163,7 @@ final class File * @param resource $inputHandle * @param resource $outputHandle * @param string $password + * @return void * * @throws Ex\EnvironmentIsBrokenException * @throws Ex\IOException @@ -176,6 +184,7 @@ final class File * @param string $inputFilename * @param string $outputFilename * @param KeyOrPassword $secret + * @return void * * @throws Ex\CryptoException * @throws Ex\IOException @@ -240,6 +249,7 @@ final class File * @param string $inputFilename * @param string $outputFilename * @param KeyOrPassword $secret + * @return void * * @throws Ex\CryptoException * @throws Ex\IOException @@ -254,7 +264,7 @@ final class File self::getLastErrorMessage() ); } - + if (\is_callable('\\stream_set_read_buffer')) { /* This call can fail, but the only consequence is performance. */ \stream_set_read_buffer($if, 0); @@ -269,7 +279,7 @@ final class File self::getLastErrorMessage() ); } - + if (\is_callable('\\stream_set_write_buffer')) { /* This call can fail, but the only consequence is performance. */ \stream_set_write_buffer($of, 0); @@ -306,6 +316,7 @@ final class File * @param resource $inputHandle * @param resource $outputHandle * @param KeyOrPassword $secret + * @return void * * @throws Ex\EnvironmentIsBrokenException * @throws Ex\IOException @@ -335,8 +346,9 @@ final class File $iv = Core::secureRandom($ivsize); /* Initialize a streaming HMAC state. */ + /** @var resource $hmac */ $hmac = \hash_init(Core::HASH_FUNCTION_NAME, HASH_HMAC, $akey); - if ($hmac === false) { + if (!\is_resource($hmac)) { throw new Ex\EnvironmentIsBrokenException( 'Cannot initialize a hash context' ); @@ -358,14 +370,15 @@ final class File $thisIv = $iv; /* How many blocks do we encrypt at a time? We increment by this value. */ - $inc = Core::BUFFER_BYTE_SIZE / Core::BLOCK_BYTE_SIZE; + $inc = (int) (Core::BUFFER_BYTE_SIZE / Core::BLOCK_BYTE_SIZE); /* Loop until we reach the end of the input file. */ $at_file_end = false; while (! (\feof($inputHandle) || $at_file_end)) { /* Find out if we can read a full buffer, or only a partial one. */ + /** @var int */ $pos = \ftell($inputHandle); - if ($pos === false) { + if (!\is_int($pos)) { throw new Ex\IOException( 'Could not get current position in input file during encryption' ); @@ -385,6 +398,7 @@ final class File } /* Encrypt this buffer. */ + /** @var string */ $encrypted = \openssl_encrypt( $read, Core::CIPHER_METHOD, @@ -393,7 +407,7 @@ final class File $thisIv ); - if ($encrypted === false) { + if (!\is_string($encrypted)) { throw new Ex\EnvironmentIsBrokenException( 'OpenSSL encryption error' ); @@ -422,6 +436,7 @@ final class File * @param resource $inputHandle * @param resource $outputHandle * @param KeyOrPassword $secret + * @return void * * @throws Ex\EnvironmentIsBrokenException * @throws Ex\IOException @@ -476,7 +491,7 @@ final class File $thisIv = $iv; /* How many blocks do we encrypt at a time? We increment by this value. */ - $inc = Core::BUFFER_BYTE_SIZE / Core::BLOCK_BYTE_SIZE; + $inc = (int) (Core::BUFFER_BYTE_SIZE / Core::BLOCK_BYTE_SIZE); /* Get the HMAC. */ if (\fseek($inputHandle, (-1 * Core::MAC_BYTE_SIZE), SEEK_END) === false) { @@ -486,8 +501,9 @@ final class File } /* Get the position of the last byte in the actual ciphertext. */ + /** @var int $cipher_end */ $cipher_end = \ftell($inputHandle); - if ($cipher_end === false) { + if (!\is_int($cipher_end)) { throw new Ex\IOException( 'Cannot read input file' ); @@ -496,11 +512,13 @@ final class File --$cipher_end; /* Read the HMAC. */ + /** @var string $stored_mac */ $stored_mac = self::readBytes($inputHandle, Core::MAC_BYTE_SIZE); /* Initialize a streaming HMAC state. */ + /** @var resource $hmac */ $hmac = \hash_init(Core::HASH_FUNCTION_NAME, HASH_HMAC, $akey); - if ($hmac === false) { + if (!\is_resource($hmac)) { throw new Ex\EnvironmentIsBrokenException( 'Cannot initialize a hash context' ); @@ -525,12 +543,14 @@ final class File \hash_update($hmac, $header); \hash_update($hmac, $file_salt); \hash_update($hmac, $iv); + /** @var resource $hmac2 */ $hmac2 = \hash_copy($hmac); $break = false; while (! $break) { + /** @var int $pos */ $pos = \ftell($inputHandle); - if ($pos === false) { + if (!\is_int($pos)) { throw new Ex\IOException( 'Could not get current position in input file during decryption' ); @@ -554,8 +574,9 @@ final class File \hash_update($hmac, $read); /* Remember this buffer-sized chunk's HMAC. */ + /** @var resource $chunk_mac */ $chunk_mac = \hash_copy($hmac); - if ($chunk_mac === false) { + if (!\is_resource($chunk_mac)) { throw new Ex\EnvironmentIsBrokenException( 'Cannot duplicate a hash context' ); @@ -564,6 +585,7 @@ final class File } /* Get the final HMAC, which should match the stored one. */ + /** @var string $final_mac */ $final_mac = \hash_final($hmac, true); /* Verify the HMAC. */ @@ -584,8 +606,9 @@ final class File $at_file_end = false; while (! $at_file_end) { + /** @var int $pos */ $pos = \ftell($inputHandle); - if ($pos === false) { + if (!\is_int($pos)) { throw new Ex\IOException( 'Could not get current position in input file during decryption' ); @@ -609,8 +632,9 @@ final class File * remembered from pass #1 to ensure attackers didn't change the * ciphertext after MAC verification. */ \hash_update($hmac2, $read); + /** @var resource $calc_mac */ $calc_mac = \hash_copy($hmac2); - if ($calc_mac === false) { + if (!\is_resource($calc_mac)) { throw new Ex\EnvironmentIsBrokenException( 'Cannot duplicate a hash context' ); @@ -628,6 +652,7 @@ final class File } /* Decrypt this buffer-sized chunk. */ + /** @var string $decrypted */ $decrypted = \openssl_decrypt( $read, Core::CIPHER_METHOD, @@ -635,7 +660,7 @@ final class File OPENSSL_RAW_DATA, $thisIv ); - if ($decrypted === false) { + if (!\is_string($decrypted)) { throw new Ex\EnvironmentIsBrokenException( 'OpenSSL decryption error' ); @@ -649,6 +674,7 @@ final class File ); /* Increment the IV by the amount of blocks in a buffer. */ + /** @var string $thisIv */ $thisIv = Core::incrementCounter($thisIv, $inc); /* WARNING: Usually, unless the file is a multiple of the buffer * size, $thisIv will contain an incorrect value here on the last @@ -661,6 +687,7 @@ final class File * * @param resource $stream * @param int $num_bytes + * @return string * * @throws Ex\IOException * @throws Ex\EnvironmentIsBrokenException @@ -679,9 +706,9 @@ final class File $buf = ''; $remaining = $num_bytes; while ($remaining > 0 && ! \feof($stream)) { + /** @var string $read */ $read = \fread($stream, $remaining); - - if ($read === false) { + if (!\is_string($read)) { throw new Ex\IOException( 'Could not read from the file' ); @@ -703,6 +730,7 @@ final class File * @param resource $stream * @param string $buf * @param int $num_bytes + * @return int * * @throws Ex\IOException * @@ -726,13 +754,14 @@ final class File } $remaining = $num_bytes; while ($remaining > 0) { + /** @var int $written */ $written = \fwrite($stream, $buf, $remaining); - if ($written === false) { + if (!\is_int($written)) { throw new Ex\IOException( 'Could not write to the file' ); } - $buf = Core::ourSubstr($buf, $written, null); + $buf = (string) Core::ourSubstr($buf, $written, null); $remaining -= $written; } return $num_bytes; diff --git a/inc/Exts/Defuse/Crypto/Key.php b/vendor/defuse/php-encryption/src/Key.php similarity index 79% rename from inc/Exts/Defuse/Crypto/Key.php rename to vendor/defuse/php-encryption/src/Key.php index ca7b9b2e..fe4bf7d5 100644 --- a/inc/Exts/Defuse/Crypto/Key.php +++ b/vendor/defuse/php-encryption/src/Key.php @@ -9,7 +9,10 @@ final class Key const KEY_CURRENT_VERSION = "\xDE\xF0\x00\x00"; const KEY_BYTE_SIZE = 32; - private $key_bytes = null; + /** + * @var string + */ + private $key_bytes; /** * Creates new random key. @@ -26,15 +29,23 @@ final class Key /** * Loads a Key from its encoded form. * + * By default, this function will call Encoding::trimTrailingWhitespace() + * to remove trailing CR, LF, NUL, TAB, and SPACE characters, which are + * commonly appended to files when working with text editors. + * * @param string $saved_key_string + * @param bool $do_not_trim (default: false) * * @throws Ex\BadFormatException * @throws Ex\EnvironmentIsBrokenException * * @return Key */ - public static function loadFromAsciiSafeString($saved_key_string) + public static function loadFromAsciiSafeString($saved_key_string, $do_not_trim = false) { + if (!$do_not_trim) { + $saved_key_string = Encoding::trimTrailingWhitespace($saved_key_string); + } $key_bytes = Encoding::loadBytesFromChecksummedAsciiSafeString(self::KEY_CURRENT_VERSION, $saved_key_string); return new Key($key_bytes); } diff --git a/inc/Exts/Defuse/Crypto/KeyOrPassword.php b/vendor/defuse/php-encryption/src/KeyOrPassword.php similarity index 89% rename from inc/Exts/Defuse/Crypto/KeyOrPassword.php rename to vendor/defuse/php-encryption/src/KeyOrPassword.php index 2a46b711..4a810d3f 100644 --- a/inc/Exts/Defuse/Crypto/KeyOrPassword.php +++ b/vendor/defuse/php-encryption/src/KeyOrPassword.php @@ -10,8 +10,15 @@ final class KeyOrPassword const SECRET_TYPE_KEY = 1; const SECRET_TYPE_PASSWORD = 2; - private $secret_type = null; - private $secret = null; + /** + * @var int + */ + private $secret_type = 0; + + /** + * @var Key|string + */ + private $secret; /** * Initializes an instance of KeyOrPassword from a key. @@ -43,6 +50,7 @@ final class KeyOrPassword * * @param string $salt * + * @throws Ex\CryptoException * @throws Ex\EnvironmentIsBrokenException * * @return DerivedKeys @@ -54,6 +62,9 @@ final class KeyOrPassword } if ($this->secret_type === self::SECRET_TYPE_KEY) { + if (!($this->secret instanceof Key)) { + throw new Ex\CryptoException('Expected a Key object'); + } $akey = Core::HKDF( Core::HASH_FUNCTION_NAME, $this->secret->getRawBytes(), @@ -70,6 +81,9 @@ final class KeyOrPassword ); return new DerivedKeys($akey, $ekey); } elseif ($this->secret_type === self::SECRET_TYPE_PASSWORD) { + if (!\is_string($this->secret)) { + throw new Ex\CryptoException('Expected a string'); + } /* Our PBKDF2 polyfill is vulnerable to a DoS attack documented in * GitHub issue #230. The fix is to pre-hash the password to ensure * it is short. We do the prehashing here instead of in pbkdf2() so diff --git a/inc/Exts/Defuse/Crypto/KeyProtectedByPassword.php b/vendor/defuse/php-encryption/src/KeyProtectedByPassword.php similarity index 98% rename from inc/Exts/Defuse/Crypto/KeyProtectedByPassword.php rename to vendor/defuse/php-encryption/src/KeyProtectedByPassword.php index b9a40f15..9d32e762 100644 --- a/inc/Exts/Defuse/Crypto/KeyProtectedByPassword.php +++ b/vendor/defuse/php-encryption/src/KeyProtectedByPassword.php @@ -8,7 +8,10 @@ final class KeyProtectedByPassword { const PASSWORD_KEY_CURRENT_VERSION = "\xDE\xF1\x00\x00"; - private $encrypted_key = null; + /** + * @var string + */ + private $encrypted_key = ''; /** * Creates a random key protected by the provided password. diff --git a/inc/Exts/Defuse/Crypto/RuntimeTests.php b/vendor/defuse/php-encryption/src/RuntimeTests.php similarity index 98% rename from inc/Exts/Defuse/Crypto/RuntimeTests.php rename to vendor/defuse/php-encryption/src/RuntimeTests.php index 9c0ba339..9f00a97a 100644 --- a/inc/Exts/Defuse/Crypto/RuntimeTests.php +++ b/vendor/defuse/php-encryption/src/RuntimeTests.php @@ -17,6 +17,7 @@ class RuntimeTests extends Crypto * Runs the runtime tests. * * @throws Ex\EnvironmentIsBrokenException + * @return void */ public static function runtimeTest() { @@ -79,6 +80,7 @@ class RuntimeTests extends Crypto * High-level tests of Crypto operations. * * @throws Ex\EnvironmentIsBrokenException + * @return void */ private static function testEncryptDecrypt() { @@ -148,6 +150,7 @@ class RuntimeTests extends Crypto * Test HKDF against test vectors. * * @throws Ex\EnvironmentIsBrokenException + * @return void */ private static function HKDFTestVector() { @@ -186,6 +189,7 @@ class RuntimeTests extends Crypto * Test HMAC against test vectors. * * @throws Ex\EnvironmentIsBrokenException + * @return void */ private static function HMACTestVector() { @@ -202,6 +206,7 @@ class RuntimeTests extends Crypto * Test AES against test vectors. * * @throws Ex\EnvironmentIsBrokenException + * @return void */ private static function AESTestVector() { diff --git a/vendor/paragonie/random_compat/LICENSE b/vendor/paragonie/random_compat/LICENSE new file mode 100644 index 00000000..45c7017d --- /dev/null +++ b/vendor/paragonie/random_compat/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Paragon Initiative Enterprises + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/vendor/paragonie/random_compat/build-phar.sh b/vendor/paragonie/random_compat/build-phar.sh new file mode 100755 index 00000000..b4a5ba31 --- /dev/null +++ b/vendor/paragonie/random_compat/build-phar.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +basedir=$( dirname $( readlink -f ${BASH_SOURCE[0]} ) ) + +php -dphar.readonly=0 "$basedir/other/build_phar.php" $* \ No newline at end of file diff --git a/vendor/paragonie/random_compat/composer.json b/vendor/paragonie/random_compat/composer.json new file mode 100644 index 00000000..1c5978c6 --- /dev/null +++ b/vendor/paragonie/random_compat/composer.json @@ -0,0 +1,37 @@ +{ + "name": "paragonie/random_compat", + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "random", + "pseudorandom" + ], + "license": "MIT", + "type": "library", + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "support": { + "issues": "https://github.com/paragonie/random_compat/issues", + "email": "info@paragonie.com", + "source": "https://github.com/paragonie/random_compat" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "autoload": { + "files": [ + "lib/random.php" + ] + } +} diff --git a/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey b/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey new file mode 100644 index 00000000..eb50ebfc --- /dev/null +++ b/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey @@ -0,0 +1,5 @@ +-----BEGIN PUBLIC KEY----- +MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEEd+wCqJDrx5B4OldM0dQE0ZMX+lx1ZWm +pui0SUqD4G29L3NGsz9UhJ/0HjBdbnkhIK5xviT0X5vtjacF6ajgcCArbTB+ds+p ++h7Q084NuSuIpNb6YPfoUFgC/CL9kAoc +-----END PUBLIC KEY----- diff --git a/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc b/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc new file mode 100644 index 00000000..6a1d7f30 --- /dev/null +++ b/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc @@ -0,0 +1,11 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.22 (MingW32) + +iQEcBAABAgAGBQJWtW1hAAoJEGuXocKCZATaJf0H+wbZGgskK1dcRTsuVJl9IWip +QwGw/qIKI280SD6/ckoUMxKDCJiFuPR14zmqnS36k7N5UNPnpdTJTS8T11jttSpg +1LCmgpbEIpgaTah+cELDqFCav99fS+bEiAL5lWDAHBTE/XPjGVCqeehyPYref4IW +NDBIEsvnHPHPLsn6X5jq4+Yj5oUixgxaMPiR+bcO4Sh+RzOVB6i2D0upWfRXBFXA +NNnsg9/zjvoC7ZW73y9uSH+dPJTt/Vgfeiv52/v41XliyzbUyLalf02GNPY+9goV +JHG1ulEEBJOCiUD9cE1PUIJwHA/HqyhHIvV350YoEFiHl8iSwm7SiZu5kPjaq74= +=B6+8 +-----END PGP SIGNATURE----- diff --git a/inc/Exts/random_compat/lib/byte_safe_strings.php b/vendor/paragonie/random_compat/lib/byte_safe_strings.php similarity index 91% rename from inc/Exts/random_compat/lib/byte_safe_strings.php rename to vendor/paragonie/random_compat/lib/byte_safe_strings.php index dd03690c..3de86b22 100644 --- a/inc/Exts/random_compat/lib/byte_safe_strings.php +++ b/vendor/paragonie/random_compat/lib/byte_safe_strings.php @@ -5,7 +5,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2015 - 2016 Paragon Initiative Enterprises + * Copyright (c) 2015 - 2017 Paragon Initiative Enterprises * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -51,7 +51,7 @@ if (!is_callable('RandomCompat_strlen')) { ); } - return mb_strlen($binary_string, '8bit'); + return (int) mb_strlen($binary_string, '8bit'); } } else { @@ -73,7 +73,7 @@ if (!is_callable('RandomCompat_strlen')) { 'RandomCompat_strlen() expects a string' ); } - return strlen($binary_string); + return (int) strlen($binary_string); } } } @@ -118,7 +118,7 @@ if (!is_callable('RandomCompat_substr')) { * mb_substr($str, 0, NULL, '8bit') returns an empty string on * PHP 5.3, so we have to find the length ourselves. */ - $length = RandomCompat_strlen($length) - $start; + $length = RandomCompat_strlen($binary_string) - $start; } elseif (!is_int($length)) { throw new TypeError( 'RandomCompat_substr(): Third argument should be an integer, or omitted' @@ -130,10 +130,10 @@ if (!is_callable('RandomCompat_substr')) { return ''; } if ($start > RandomCompat_strlen($binary_string)) { - return false; + return ''; } - return mb_substr($binary_string, $start, $length, '8bit'); + return (string) mb_substr($binary_string, $start, $length, '8bit'); } } else { @@ -172,10 +172,10 @@ if (!is_callable('RandomCompat_substr')) { ); } - return substr($binary_string, $start, $length); + return (string) substr($binary_string, $start, $length); } - return substr($binary_string, $start); + return (string) substr($binary_string, $start); } } } diff --git a/inc/Exts/random_compat/lib/cast_to_int.php b/vendor/paragonie/random_compat/lib/cast_to_int.php similarity index 84% rename from inc/Exts/random_compat/lib/cast_to_int.php rename to vendor/paragonie/random_compat/lib/cast_to_int.php index 65e9d218..be7388df 100644 --- a/inc/Exts/random_compat/lib/cast_to_int.php +++ b/vendor/paragonie/random_compat/lib/cast_to_int.php @@ -5,7 +5,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2015 - 2016 Paragon Initiative Enterprises + * Copyright (c) 2015 - 2017 Paragon Initiative Enterprises * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -40,13 +40,15 @@ if (!is_callable('RandomCompat_intval')) { * @param int|float $number The number we want to convert to an int * @param boolean $fail_open Set to true to not throw an exception * - * @return int (or float if $fail_open) + * @return float|int * * @throws TypeError */ function RandomCompat_intval($number, $fail_open = false) { - if (is_numeric($number)) { + if (is_int($number) || is_float($number)) { + $number += 0; + } elseif (is_numeric($number)) { $number += 0; } @@ -60,12 +62,13 @@ if (!is_callable('RandomCompat_intval')) { $number = (int) $number; } - if (is_int($number) || $fail_open) { - return $number; + if (is_int($number)) { + return (int) $number; + } elseif (!$fail_open) { + throw new TypeError( + 'Expected an integer.' + ); } - - throw new TypeError( - 'Expected an integer.' - ); + return $number; } } diff --git a/inc/Exts/random_compat/lib/error_polyfill.php b/vendor/paragonie/random_compat/lib/error_polyfill.php similarity index 96% rename from inc/Exts/random_compat/lib/error_polyfill.php rename to vendor/paragonie/random_compat/lib/error_polyfill.php index 69ee3794..6a91990c 100644 --- a/inc/Exts/random_compat/lib/error_polyfill.php +++ b/vendor/paragonie/random_compat/lib/error_polyfill.php @@ -5,7 +5,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2015 - 2016 Paragon Initiative Enterprises + * Copyright (c) 2015 - 2017 Paragon Initiative Enterprises * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/paragonie/random_compat/lib/random.php b/vendor/paragonie/random_compat/lib/random.php new file mode 100644 index 00000000..df74c8a4 --- /dev/null +++ b/vendor/paragonie/random_compat/lib/random.php @@ -0,0 +1,223 @@ += 70000) { + return; +} + +if (!defined('RANDOM_COMPAT_READ_BUFFER')) { + define('RANDOM_COMPAT_READ_BUFFER', 8); +} + +$RandomCompatDIR = dirname(__FILE__); + +require_once $RandomCompatDIR . '/byte_safe_strings.php'; +require_once $RandomCompatDIR . '/cast_to_int.php'; +require_once $RandomCompatDIR . '/error_polyfill.php'; + +if (!is_callable('random_bytes')) { + /** + * PHP 5.2.0 - 5.6.x way to implement random_bytes() + * + * We use conditional statements here to define the function in accordance + * to the operating environment. It's a micro-optimization. + * + * In order of preference: + * 1. Use libsodium if available. + * 2. fread() /dev/urandom if available (never on Windows) + * 3. mcrypt_create_iv($bytes, MCRYPT_DEV_URANDOM) + * 4. COM('CAPICOM.Utilities.1')->GetRandom() + * + * See RATIONALE.md for our reasoning behind this particular order + */ + if (extension_loaded('libsodium')) { + // See random_bytes_libsodium.php + if (PHP_VERSION_ID >= 50300 && is_callable('\\Sodium\\randombytes_buf')) { + require_once $RandomCompatDIR . '/random_bytes_libsodium.php'; + } elseif (method_exists('Sodium', 'randombytes_buf')) { + require_once $RandomCompatDIR . '/random_bytes_libsodium_legacy.php'; + } + } + + /** + * Reading directly from /dev/urandom: + */ + if (DIRECTORY_SEPARATOR === '/') { + // DIRECTORY_SEPARATOR === '/' on Unix-like OSes -- this is a fast + // way to exclude Windows. + $RandomCompatUrandom = true; + $RandomCompat_basedir = ini_get('open_basedir'); + + if (!empty($RandomCompat_basedir)) { + $RandomCompat_open_basedir = explode( + PATH_SEPARATOR, + strtolower($RandomCompat_basedir) + ); + $RandomCompatUrandom = (array() !== array_intersect( + array('/dev', '/dev/', '/dev/urandom'), + $RandomCompat_open_basedir + )); + $RandomCompat_open_basedir = null; + } + + if ( + !is_callable('random_bytes') + && + $RandomCompatUrandom + && + @is_readable('/dev/urandom') + ) { + // Error suppression on is_readable() in case of an open_basedir + // or safe_mode failure. All we care about is whether or not we + // can read it at this point. If the PHP environment is going to + // panic over trying to see if the file can be read in the first + // place, that is not helpful to us here. + + // See random_bytes_dev_urandom.php + require_once $RandomCompatDIR . '/random_bytes_dev_urandom.php'; + } + // Unset variables after use + $RandomCompat_basedir = null; + } else { + $RandomCompatUrandom = false; + } + + /** + * mcrypt_create_iv() + * + * We only want to use mcypt_create_iv() if: + * + * - random_bytes() hasn't already been defined + * - the mcrypt extensions is loaded + * - One of these two conditions is true: + * - We're on Windows (DIRECTORY_SEPARATOR !== '/') + * - We're not on Windows and /dev/urandom is readabale + * (i.e. we're not in a chroot jail) + * - Special case: + * - If we're not on Windows, but the PHP version is between + * 5.6.10 and 5.6.12, we don't want to use mcrypt. It will + * hang indefinitely. This is bad. + * - If we're on Windows, we want to use PHP >= 5.3.7 or else + * we get insufficient entropy errors. + */ + if ( + !is_callable('random_bytes') + && + // Windows on PHP < 5.3.7 is broken, but non-Windows is not known to be. + (DIRECTORY_SEPARATOR === '/' || PHP_VERSION_ID >= 50307) + && + // Prevent this code from hanging indefinitely on non-Windows; + // see https://bugs.php.net/bug.php?id=69833 + ( + DIRECTORY_SEPARATOR !== '/' || + (PHP_VERSION_ID <= 50609 || PHP_VERSION_ID >= 50613) + ) + && + extension_loaded('mcrypt') + ) { + // See random_bytes_mcrypt.php + require_once $RandomCompatDIR . '/random_bytes_mcrypt.php'; + } + $RandomCompatUrandom = null; + + /** + * This is a Windows-specific fallback, for when the mcrypt extension + * isn't loaded. + */ + if ( + !is_callable('random_bytes') + && + extension_loaded('com_dotnet') + && + class_exists('COM') + ) { + $RandomCompat_disabled_classes = preg_split( + '#\s*,\s*#', + strtolower(ini_get('disable_classes')) + ); + + if (!in_array('com', $RandomCompat_disabled_classes)) { + try { + $RandomCompatCOMtest = new COM('CAPICOM.Utilities.1'); + if (method_exists($RandomCompatCOMtest, 'GetRandom')) { + // See random_bytes_com_dotnet.php + require_once $RandomCompatDIR . '/random_bytes_com_dotnet.php'; + } + } catch (com_exception $e) { + // Don't try to use it. + } + } + $RandomCompat_disabled_classes = null; + $RandomCompatCOMtest = null; + } + + /** + * throw new Exception + */ + if (!is_callable('random_bytes')) { + /** + * We don't have any more options, so let's throw an exception right now + * and hope the developer won't let it fail silently. + * + * @param mixed $length + * @return void + * @throws Exception + */ + function random_bytes($length) + { + unset($length); // Suppress "variable not used" warnings. + throw new Exception( + 'There is no suitable CSPRNG installed on your system' + ); + } + } +} + +if (!is_callable('random_int')) { + require_once $RandomCompatDIR . '/random_int.php'; +} + +$RandomCompatDIR = null; diff --git a/inc/Exts/random_compat/lib/random_bytes_com_dotnet.php b/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php similarity index 93% rename from inc/Exts/random_compat/lib/random_bytes_com_dotnet.php rename to vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php index f068b6c0..fc1926e5 100644 --- a/inc/Exts/random_compat/lib/random_bytes_com_dotnet.php +++ b/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php @@ -5,7 +5,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2015 - 2016 Paragon Initiative Enterprises + * Copyright (c) 2015 - 2017 Paragon Initiative Enterprises * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -55,6 +55,11 @@ if (!is_callable('random_bytes')) { } $buf = ''; + if (!class_exists('COM')) { + throw new Error( + 'COM does not exist' + ); + } $util = new COM('CAPICOM.Utilities.1'); $execCount = 0; diff --git a/inc/Exts/random_compat/lib/random_bytes_dev_urandom.php b/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php similarity index 84% rename from inc/Exts/random_compat/lib/random_bytes_dev_urandom.php rename to vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php index aaccd5ad..df5b9152 100644 --- a/inc/Exts/random_compat/lib/random_bytes_dev_urandom.php +++ b/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php @@ -5,7 +5,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2015 - 2016 Paragon Initiative Enterprises + * Copyright (c) 2015 - 2017 Paragon Initiative Enterprises * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -104,33 +104,50 @@ if (!is_callable('random_bytes')) { * page load. */ if (!empty($fp)) { + /** + * @var int + */ $remaining = $bytes; + + /** + * @var string|bool + */ $buf = ''; /** * We use fread() in a loop to protect against partial reads */ do { + /** + * @var string|bool + */ $read = fread($fp, $remaining); - if ($read === false) { - /** - * We cannot safely read from the file. Exit the - * do-while loop and trigger the exception condition - */ - $buf = false; - break; + if (!is_string($read)) { + if ($read === false) { + /** + * We cannot safely read from the file. Exit the + * do-while loop and trigger the exception condition + * + * @var string|bool + */ + $buf = false; + break; + } } /** * Decrease the number of bytes returned from remaining */ $remaining -= RandomCompat_strlen($read); - $buf .= $read; + /** + * @var string|bool + */ + $buf = $buf . $read; } while ($remaining > 0); /** * Is our result valid? */ - if ($buf !== false) { + if (is_string($buf)) { if (RandomCompat_strlen($buf) === $bytes) { /** * Return our random entropy buffer here: diff --git a/inc/Exts/random_compat/lib/random_bytes_libsodium.php b/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php similarity index 97% rename from inc/Exts/random_compat/lib/random_bytes_libsodium.php rename to vendor/paragonie/random_compat/lib/random_bytes_libsodium.php index 025b9007..4af1a242 100644 --- a/inc/Exts/random_compat/lib/random_bytes_libsodium.php +++ b/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php @@ -5,7 +5,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2015 - 2016 Paragon Initiative Enterprises + * Copyright (c) 2015 - 2017 Paragon Initiative Enterprises * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/inc/Exts/random_compat/lib/random_bytes_libsodium_legacy.php b/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php similarity index 92% rename from inc/Exts/random_compat/lib/random_bytes_libsodium_legacy.php rename to vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php index f8d6a7fc..02160b91 100644 --- a/inc/Exts/random_compat/lib/random_bytes_libsodium_legacy.php +++ b/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php @@ -5,7 +5,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2015 - 2016 Paragon Initiative Enterprises + * Copyright (c) 2015 - 2017 Paragon Initiative Enterprises * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -56,12 +56,16 @@ if (!is_callable('random_bytes')) { ); } + /** + * @var string + */ + $buf = ''; + /** * \Sodium\randombytes_buf() doesn't allow more than 2147483647 bytes to be * generated in one invocation. */ if ($bytes > 2147483647) { - $buf = ''; for ($i = 0; $i < $bytes; $i += 1073741824) { $n = ($bytes - $i) > 1073741824 ? 1073741824 @@ -69,10 +73,10 @@ if (!is_callable('random_bytes')) { $buf .= Sodium::randombytes_buf($n); } } else { - $buf = Sodium::randombytes_buf($bytes); + $buf .= Sodium::randombytes_buf($bytes); } - if ($buf !== false) { + if (is_string($buf)) { if (RandomCompat_strlen($buf) === $bytes) { return $buf; } diff --git a/inc/Exts/random_compat/lib/random_bytes_mcrypt.php b/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php similarity index 97% rename from inc/Exts/random_compat/lib/random_bytes_mcrypt.php rename to vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php index f18736dc..aac9c013 100644 --- a/inc/Exts/random_compat/lib/random_bytes_mcrypt.php +++ b/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php @@ -5,7 +5,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2015 - 2016 Paragon Initiative Enterprises + * Copyright (c) 2015 - 2017 Paragon Initiative Enterprises * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/paragonie/random_compat/lib/random_int.php b/vendor/paragonie/random_compat/lib/random_int.php new file mode 100644 index 00000000..b2ea02d1 --- /dev/null +++ b/vendor/paragonie/random_compat/lib/random_int.php @@ -0,0 +1,190 @@ + operators might accidentally let a float + * through. + */ + + try { + $min = RandomCompat_intval($min); + } catch (TypeError $ex) { + throw new TypeError( + 'random_int(): $min must be an integer' + ); + } + + try { + $max = RandomCompat_intval($max); + } catch (TypeError $ex) { + throw new TypeError( + 'random_int(): $max must be an integer' + ); + } + + /** + * Now that we've verified our weak typing system has given us an integer, + * let's validate the logic then we can move forward with generating random + * integers along a given range. + */ + if ($min > $max) { + throw new Error( + 'Minimum value must be less than or equal to the maximum value' + ); + } + + if ($max === $min) { + return $min; + } + + /** + * Initialize variables to 0 + * + * We want to store: + * $bytes => the number of random bytes we need + * $mask => an integer bitmask (for use with the &) operator + * so we can minimize the number of discards + */ + $attempts = $bits = $bytes = $mask = $valueShift = 0; + + /** + * At this point, $range is a positive number greater than 0. It might + * overflow, however, if $max - $min > PHP_INT_MAX. PHP will cast it to + * a float and we will lose some precision. + */ + $range = $max - $min; + + /** + * Test for integer overflow: + */ + if (!is_int($range)) { + + /** + * Still safely calculate wider ranges. + * Provided by @CodesInChaos, @oittaa + * + * @ref https://gist.github.com/CodesInChaos/03f9ea0b58e8b2b8d435 + * + * We use ~0 as a mask in this case because it generates all 1s + * + * @ref https://eval.in/400356 (32-bit) + * @ref http://3v4l.org/XX9r5 (64-bit) + */ + $bytes = PHP_INT_SIZE; + $mask = ~0; + + } else { + + /** + * $bits is effectively ceil(log($range, 2)) without dealing with + * type juggling + */ + while ($range > 0) { + if ($bits % 8 === 0) { + ++$bytes; + } + ++$bits; + $range >>= 1; + $mask = $mask << 1 | 1; + } + $valueShift = $min; + } + + $val = 0; + /** + * Now that we have our parameters set up, let's begin generating + * random integers until one falls between $min and $max + */ + do { + /** + * The rejection probability is at most 0.5, so this corresponds + * to a failure probability of 2^-128 for a working RNG + */ + if ($attempts > 128) { + throw new Exception( + 'random_int: RNG is broken - too many rejections' + ); + } + + /** + * Let's grab the necessary number of random bytes + */ + $randomByteString = random_bytes($bytes); + + /** + * Let's turn $randomByteString into an integer + * + * This uses bitwise operators (<< and |) to build an integer + * out of the values extracted from ord() + * + * Example: [9F] | [6D] | [32] | [0C] => + * 159 + 27904 + 3276800 + 201326592 => + * 204631455 + */ + $val &= 0; + for ($i = 0; $i < $bytes; ++$i) { + $val |= ord($randomByteString[$i]) << ($i * 8); + } + + /** + * Apply mask + */ + $val &= $mask; + $val += $valueShift; + + ++$attempts; + /** + * If $val overflows to a floating point number, + * ... or is larger than $max, + * ... or smaller than $min, + * then try again. + */ + } while (!is_int($val) || $val > $max || $val < $min); + + return (int)$val; + } +} diff --git a/vendor/paragonie/random_compat/other/build_phar.php b/vendor/paragonie/random_compat/other/build_phar.php new file mode 100644 index 00000000..70ef4b2e --- /dev/null +++ b/vendor/paragonie/random_compat/other/build_phar.php @@ -0,0 +1,57 @@ +buildFromDirectory(dirname(__DIR__).'/lib'); +rename( + dirname(__DIR__).'/lib/index.php', + dirname(__DIR__).'/lib/random.php' +); + +/** + * If we pass an (optional) path to a private key as a second argument, we will + * sign the Phar with OpenSSL. + * + * If you leave this out, it will produce an unsigned .phar! + */ +if ($argc > 1) { + if (!@is_readable($argv[1])) { + echo 'Could not read the private key file:', $argv[1], "\n"; + exit(255); + } + $pkeyFile = file_get_contents($argv[1]); + + $private = openssl_get_privatekey($pkeyFile); + if ($private !== false) { + $pkey = ''; + openssl_pkey_export($private, $pkey); + $phar->setSignatureAlgorithm(Phar::OPENSSL, $pkey); + + /** + * Save the corresponding public key to the file + */ + if (!@is_readable($dist.'/random_compat.phar.pubkey')) { + $details = openssl_pkey_get_details($private); + file_put_contents( + $dist.'/random_compat.phar.pubkey', + $details['key'] + ); + } + } else { + echo 'An error occurred reading the private key from OpenSSL.', "\n"; + exit(255); + } +} diff --git a/vendor/paragonie/random_compat/psalm-autoload.php b/vendor/paragonie/random_compat/psalm-autoload.php new file mode 100644 index 00000000..d71d1b81 --- /dev/null +++ b/vendor/paragonie/random_compat/psalm-autoload.php @@ -0,0 +1,9 @@ + + + + + + + + + + + diff --git a/vendor/phpmailer/phpmailer/.github/ISSUE_TEMPLATE.md b/vendor/phpmailer/phpmailer/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..f970c10b --- /dev/null +++ b/vendor/phpmailer/phpmailer/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,13 @@ +Please check these things before submitting your issue: + +- [ ] Make sure you're using the latest version of PHPMailer +- [ ] Check that your problem is not dealt with in [the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting), especially if you're having problems connecting to Gmail or GoDaddy +- [ ] Include sufficient code to reproduce your problem +- [ ] If you're having an SMTP issue, include the debug output generated with `SMTPDebug = 2` set +- [ ] If you have a question about how to use PHPMailer (rather than reporting a bug in it), tag a question on Stack Overflow with `phpmailer`, but [**search first**](http://stackoverflow.com/questions/tagged/phpmailer)! + +# Problem description + +# Code to reproduce + +# Debug output diff --git a/vendor/phpmailer/phpmailer/.phan/config.php b/vendor/phpmailer/phpmailer/.phan/config.php new file mode 100644 index 00000000..785e9df7 --- /dev/null +++ b/vendor/phpmailer/phpmailer/.phan/config.php @@ -0,0 +1,41 @@ + [ + 'src', + 'vendor', + 'examples' + ], + + // A directory list that defines files that will be excluded + // from static analysis, but whose class and method + // information should be included. + // + // Generally, you'll want to include the directories for + // third-party code (such as "vendor/") in this list. + // + // n.b.: If you'd like to parse but not analyze 3rd + // party code, directories containing that code + // should be added to the `directory_list` as + // to `exclude_analysis_directory_list`. + "exclude_analysis_directory_list" => [ + 'vendor/' + ], + + 'skip_slow_php_options_warning' => true, + + 'exclude_file_regex' => '@^vendor/.*/(tests|Tests)/@', +]; diff --git a/vendor/phpmailer/phpmailer/.php_cs b/vendor/phpmailer/phpmailer/.php_cs new file mode 100644 index 00000000..460a1462 --- /dev/null +++ b/vendor/phpmailer/phpmailer/.php_cs @@ -0,0 +1,31 @@ +setRiskyAllowed(true) + ->setRules([ + '@Symfony' => true, + '@Symfony:risky' => true, + 'array_syntax' => ['syntax' => 'short'], + 'binary_operator_spaces' => false, + 'concat_space' => ['spacing' => 'one'], + 'heredoc_to_nowdoc' => true, + 'method_argument_space' => true, + 'no_extra_consecutive_blank_lines' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block'], + 'no_php4_constructor' => true, + 'no_short_echo_tag' => true, + 'no_unreachable_default_argument_value' => true, + 'no_useless_else' => true, + 'no_useless_return' => true, + 'ordered_imports' => true, + 'php_unit_fqcn_annotation' => false, + 'phpdoc_add_missing_param_annotation' => true, + 'phpdoc_order' => true, + 'phpdoc_summary' => false, + 'semicolon_after_instruction' => true, + 'simplified_null_return' => true, + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->in(__DIR__ . '/src') + ->in(__DIR__ . '/test') + ) +; diff --git a/inc/Exts/phpmailer/LICENSE b/vendor/phpmailer/phpmailer/LICENSE similarity index 100% rename from inc/Exts/phpmailer/LICENSE rename to vendor/phpmailer/phpmailer/LICENSE diff --git a/vendor/phpmailer/phpmailer/UPGRADING.md b/vendor/phpmailer/phpmailer/UPGRADING.md new file mode 100644 index 00000000..97bf0dc5 --- /dev/null +++ b/vendor/phpmailer/phpmailer/UPGRADING.md @@ -0,0 +1,125 @@ +# Upgrading from PHPMailer 5.2 to 6.0 + +PHPMailer 6.0 is a major update, breaking backward compatibility. + +If you're in doubt about how you should be using PHPMailer 6, take a look at the examples as they have all been updated to work in a PHPMailer 6.0 style. + +## PHP Version + +PHPMailer 6.0 requires PHP 5.5 or later, and is fully compatible with PHP 7.0. PHPMailer 5.2 supported PHP 5.0 and upwards, so if you need to run on a legacy PHP version, see the [PHPMailer 5.2-stable branch on Github](https://github.com/PHPMailer/PHPMailer/tree/5.2-stable). + +## Loading PHPMailer + +The single biggest change will be in the way that you load PHPMailer. In earlier versions you may have done this: + +```php +require 'PHPMailerAutoload.php'; +``` + +or + +```php +require 'class.phpmailer.php'; +require 'class.smtp.php'; +``` + +We recommend that you load PHPMailer via composer, using its standard autoloader, which you probably won't need to load if you're using it already, but in case you're not, you will need to do this instead: + +```php +require 'vendor/autoload.php'; +``` + +If you're not using composer, you can still load the classes manually, depending on what you're using: + +```php +require 'src/PHPMailer.php'; +require 'src/SMTP.php'; +require 'src/Exception.php'; +``` + +## Namespace +PHPMailer 6 uses a [namespace](http://php.net/manual/en/language.namespaces.rationale.php) of `PHPMailer\PHPMailer`, because it's the PHPMailer project within the PHPMailer organisation. You **must** import (with a `use` statement) classes you're using explicitly into your own namespace, or reference them absolutely in the global namespace - all the examples do this. This means the fully-qualified name of the main PHPMailer class is `PHPMailer\PHPMailer\PHPMailer`, which is a bit of a mouthful, but there's no harm in it! If you are using other PHPMailer classes explicitly (such as `SMTP` or `Exception`), you will need to import them into your namespace too. + +For example you might create an instance like this: + +```php +errorMessage(); +} catch (Exception $e) { + echo $e->getMessage(); +} +``` + +Convert it to: + +```php +use PHPMailer\PHPMailer\Exception; +... +try { +... +} catch (Exception $e) { + echo $e->errorMessage(); +} catch (\Exception $e) { + echo $e->getMessage(); +} +``` + +## OAuth2 Support +The OAuth2 implementation has been completely redesigned using the [OAuth2 packages](http://oauth2-client.thephpleague.com) from the [League of of extraordinary packages](http://thephpleague.com), providing support for many more OAuth services, and you'll need to update your code if you were using OAuth in 5.2. See [the examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples) and documentation in the [PHPMailer wiki](https://github.com/PHPMailer/PHPMailer/wiki). + +## Extras +* Additional classes previously bundled in the `Extras` folder (such as htmlfilter and EasyPeasyICS) have been removed - use equivalent packages from [packagist.org](https://packagist.org) instead. + +## Other upgrade changes +See the changelog for full details. +* File structure simplified, classes live in the `src/` folder +* Most statically called functions now use the `static` keyword instead of `self`, so it's possible to override static internal functions in subclasses, for example `validateAddress()` +* Complete RFC standardisation on CRLF (`\r\n`) line breaks by default: + * `PHPMailer:$LE` removed + * `PHPMailer::CRLF` line ending constant renamed to `PHPMailer::LE`, defaults to "\r\n", used everywhere + * All uses of `PHPMailer::$LE` property converted to use `static:LE` constant for consistency and ease of overriding + * Similar changes to line break handling in SMTP and POP3 classes. +* All elements previously marked as deprecated have been removed: + * `PHPMailer->Version` + * `PHPMailer->ReturnPath` + * `PHPMailer->PluginDir` + * `PHPMailer->encodeQPphp()` + * `SMTP->CRLF` + * `SMTP->Version` + * `SMTP->SMTP_PORT` + * `POP3->CRLF` + * `POP3->Version` +* NTLM authentication has been removed - it never worked anyway! + * `PHPMailer->Workstation` + * `PHPMailer->Realm` +* `SMTP::authenticate` method signature changed +* `parseAddresses()` is now static +* `validateAddress()` is now called statically from `parseAddresses()` +* `idnSupported()` is now static and is called statically from `punyencodeAddress()` +* `PHPMailer->SingleToArray` is now protected diff --git a/vendor/phpmailer/phpmailer/VERSION b/vendor/phpmailer/phpmailer/VERSION new file mode 100644 index 00000000..6d54bbd7 --- /dev/null +++ b/vendor/phpmailer/phpmailer/VERSION @@ -0,0 +1 @@ +6.0.1 \ No newline at end of file diff --git a/vendor/phpmailer/phpmailer/composer.json b/vendor/phpmailer/phpmailer/composer.json new file mode 100644 index 00000000..9bff7565 --- /dev/null +++ b/vendor/phpmailer/phpmailer/composer.json @@ -0,0 +1,54 @@ +{ + "name": "phpmailer/phpmailer", + "type": "library", + "description": "PHPMailer is a full-featured email creation and transfer class for PHP", + "authors": [ + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "require": { + "php": ">=5.5.0", + "ext-ctype": "*" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.2", + "phpdocumentor/phpdocumentor": "2.*", + "phpunit/phpunit": "^4.8 || ^5.7", + "zendframework/zend-serializer": "2.7.*", + "doctrine/annotations": "1.2.*", + "zendframework/zend-eventmanager": "3.0.*", + "zendframework/zend-i18n": "2.7.3" + }, + "suggest": { + "psr/log": "For optional PSR-3 debug logging", + "league/oauth2-google": "Needed for Google XOAUTH2 authentication", + "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", + "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", + "ext-mbstring": "Needed to send email in multibyte encoding charset", + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" + }, + "autoload": { + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "PHPMailer\\Test\\": "test/" + } + }, + "license": "LGPL-2.1" +} diff --git a/vendor/phpmailer/phpmailer/get_oauth_token.php b/vendor/phpmailer/phpmailer/get_oauth_token.php new file mode 100644 index 00000000..1237b57b --- /dev/null +++ b/vendor/phpmailer/phpmailer/get_oauth_token.php @@ -0,0 +1,144 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2017 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ +/** + * Get an OAuth2 token from an OAuth2 provider. + * * Install this script on your server so that it's accessible + * as [https/http]:////get_oauth_token.php + * e.g.: http://localhost/phpmailer/get_oauth_token.php + * * Ensure dependencies are installed with 'composer install' + * * Set up an app in your Google/Yahoo/Microsoft account + * * Set the script address as the app's redirect URL + * If no refresh token is obtained when running this file, + * revoke access to your app and run the script again. + */ + +namespace PHPMailer\PHPMailer; + +/** + * Aliases for League Provider Classes + * Make sure you have added these to your composer.json and run `composer install` + * Plenty to choose from here: + * @see http://oauth2-client.thephpleague.com/providers/thirdparty/ + */ +// @see https://github.com/thephpleague/oauth2-google +use League\OAuth2\Client\Provider\Google; +// @see https://packagist.org/packages/hayageek/oauth2-yahoo +use Hayageek\OAuth2\Client\Provider\Yahoo; +// @see https://github.com/stevenmaguire/oauth2-microsoft +use Stevenmaguire\OAuth2\Client\Provider\Microsoft; + +if (!isset($_GET['code']) && !isset($_GET['provider'])) { +?> + +Select Provider:
+Google
+Yahoo
+Microsoft/Outlook/Hotmail/Live/Office365
+ + + $clientId, + 'clientSecret' => $clientSecret, + 'redirectUri' => $redirectUri, + 'accessType' => 'offline' +]; + +$options = []; +$provider = null; + +switch ($providerName) { + case 'Google': + $provider = new Google($params); + $options = [ + 'scope' => [ + 'https://mail.google.com/' + ] + ]; + break; + case 'Yahoo': + $provider = new Yahoo($params); + break; + case 'Microsoft': + $provider = new Microsoft($params); + $options = [ + 'scope' => [ + 'wl.imap', + 'wl.offline_access' + ] + ]; + break; +} + +if (null === $provider) { + exit('Provider missing'); +} + +if (!isset($_GET['code'])) { + // If we don't have an authorization code then get one + $authUrl = $provider->getAuthorizationUrl($options); + $_SESSION['oauth2state'] = $provider->getState(); + header('Location: ' . $authUrl); + exit; +// Check given state against previously stored one to mitigate CSRF attack +} elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) { + unset($_SESSION['oauth2state']); + unset($_SESSION['provider']); + exit('Invalid state'); +} else { + unset($_SESSION['provider']); + // Try to get an access token (using the authorization code grant) + $token = $provider->getAccessToken( + 'authorization_code', + [ + 'code' => $_GET['code'] + ] + ); + // Use this to interact with an API on the users behalf + // Use this to get a new access token if the old one expires + echo 'Refresh Token: ', $token->getRefreshToken(); +} diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-am.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-am.php new file mode 100644 index 00000000..ff2a9695 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-am.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP -ի սխալ: չհաջողվեց ստուգել իսկությունը.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP -ի սխալ: չհաջողվեց կապ հաստատել SMTP սերվերի հետ.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP -ի սխալ: տվյալները ընդունված չեն.'; +$PHPMAILER_LANG['empty_message'] = 'Հաղորդագրությունը դատարկ է'; +$PHPMAILER_LANG['encoding'] = 'Կոդավորման անհայտ տեսակ: '; +$PHPMAILER_LANG['execute'] = 'Չհաջողվեց իրականացնել հրամանը: '; +$PHPMAILER_LANG['file_access'] = 'Ֆայլը հասանելի չէ: '; +$PHPMAILER_LANG['file_open'] = 'Ֆայլի սխալ: ֆայլը չհաջողվեց բացել: '; +$PHPMAILER_LANG['from_failed'] = 'Ուղարկողի հետևյալ հասցեն սխալ է: '; +$PHPMAILER_LANG['instantiate'] = 'Հնարավոր չէ կանչել mail ֆունկցիան.'; +$PHPMAILER_LANG['invalid_address'] = 'Հասցեն սխալ է: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' փոստային սերվերի հետ չի աշխատում.'; +$PHPMAILER_LANG['provide_address'] = 'Անհրաժեշտ է տրամադրել գոնե մեկ ստացողի e-mail հասցե.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP -ի սխալ: չի հաջողվել ուղարկել հետևյալ ստացողների հասցեներին: '; +$PHPMAILER_LANG['signing'] = 'Ստորագրման սխալ: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP -ի connect() ֆունկցիան չի հաջողվել'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP սերվերի սխալ: '; +$PHPMAILER_LANG['variable_set'] = 'Չի հաջողվում ստեղծել կամ վերափոխել փոփոխականը: '; +$PHPMAILER_LANG['extension_missing'] = 'Հավելվածը բացակայում է: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php new file mode 100644 index 00000000..790e2a5e --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'خطأ SMTP : لا يمكن تأكيد الهوية.'; +$PHPMAILER_LANG['connect_host'] = 'خطأ SMTP: لا يمكن الاتصال بالخادم SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'خطأ SMTP: لم يتم قبول المعلومات .'; +$PHPMAILER_LANG['empty_message'] = 'نص الرسالة فارغ'; +$PHPMAILER_LANG['encoding'] = 'ترميز غير معروف: '; +$PHPMAILER_LANG['execute'] = 'لا يمكن تنفيذ : '; +$PHPMAILER_LANG['file_access'] = 'لا يمكن الوصول للملف: '; +$PHPMAILER_LANG['file_open'] = 'خطأ في الملف: لا يمكن فتحه: '; +$PHPMAILER_LANG['from_failed'] = 'خطأ على مستوى عنوان المرسل : '; +$PHPMAILER_LANG['instantiate'] = 'لا يمكن توفير خدمة البريد.'; +$PHPMAILER_LANG['invalid_address'] = 'الإرسال غير ممكن لأن عنوان البريد الإلكتروني غير صالح: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' برنامج الإرسال غير مدعوم.'; +$PHPMAILER_LANG['provide_address'] = 'يجب توفير عنوان البريد الإلكتروني لمستلم واحد على الأقل.'; +$PHPMAILER_LANG['recipients_failed'] = 'خطأ SMTP: الأخطاء التالية ' . + 'فشل في الارسال لكل من : '; +$PHPMAILER_LANG['signing'] = 'خطأ في التوقيع: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() غير ممكن.'; +$PHPMAILER_LANG['smtp_error'] = 'خطأ على مستوى الخادم SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'لا يمكن تعيين أو إعادة تعيين متغير: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-az.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-az.php new file mode 100644 index 00000000..3749d83d --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-az.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Greška: Neuspjela prijava.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Greška: Nije moguće spojiti se sa SMTP serverom.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Greška: Podatci nisu prihvaćeni.'; +$PHPMAILER_LANG['empty_message'] = 'Sadržaj poruke je prazan.'; +$PHPMAILER_LANG['encoding'] = 'Nepoznata kriptografija: '; +$PHPMAILER_LANG['execute'] = 'Nije moguće izvršiti naredbu: '; +$PHPMAILER_LANG['file_access'] = 'Nije moguće pristupiti datoteci: '; +$PHPMAILER_LANG['file_open'] = 'Nije moguće otvoriti datoteku: '; +$PHPMAILER_LANG['from_failed'] = 'SMTP Greška: Slanje sa navedenih e-mail adresa nije uspjelo: '; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Greška: Slanje na navedene e-mail adrese nije uspjelo: '; +$PHPMAILER_LANG['instantiate'] = 'Ne mogu pokrenuti mail funkcionalnost.'; +$PHPMAILER_LANG['invalid_address'] = 'E-mail nije poslan. Neispravna e-mail adresa: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nije podržan.'; +$PHPMAILER_LANG['provide_address'] = 'Definišite barem jednu adresu primaoca.'; +$PHPMAILER_LANG['signing'] = 'Greška prilikom prijave: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Spajanje na SMTP server nije uspjelo.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP greška: '; +$PHPMAILER_LANG['variable_set'] = 'Nije moguće postaviti varijablu ili je vratiti nazad: '; +$PHPMAILER_LANG['extension_missing'] = 'Nedostaje ekstenzija: '; \ No newline at end of file diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-be.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-be.php new file mode 100644 index 00000000..e2f98f0f --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-be.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Памылка SMTP: памылка ідэнтыфікацыі.'; +$PHPMAILER_LANG['connect_host'] = 'Памылка SMTP: нельга ўстанавіць сувязь з SMTP-серверам.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Памылка SMTP: звесткі непрынятыя.'; +$PHPMAILER_LANG['empty_message'] = 'Пустое паведамленне.'; +$PHPMAILER_LANG['encoding'] = 'Невядомая кадыроўка тэксту: '; +$PHPMAILER_LANG['execute'] = 'Нельга выканаць каманду: '; +$PHPMAILER_LANG['file_access'] = 'Няма доступу да файла: '; +$PHPMAILER_LANG['file_open'] = 'Нельга адкрыць файл: '; +$PHPMAILER_LANG['from_failed'] = 'Няправільны адрас адпраўніка: '; +$PHPMAILER_LANG['instantiate'] = 'Нельга прымяніць функцыю mail().'; +$PHPMAILER_LANG['invalid_address'] = 'Нельга даслаць паведамленне, няправільны email атрымальніка: '; +$PHPMAILER_LANG['provide_address'] = 'Запоўніце, калі ласка, правільны email атрымальніка.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' - паштовы сервер не падтрымліваецца.'; +$PHPMAILER_LANG['recipients_failed'] = 'Памылка SMTP: няправільныя атрымальнікі: '; +$PHPMAILER_LANG['signing'] = 'Памылка подпісу паведамлення: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Памылка сувязі з SMTP-серверам.'; +$PHPMAILER_LANG['smtp_error'] = 'Памылка SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Нельга ўстанавіць або перамяніць значэнне пераменнай: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-bg.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-bg.php new file mode 100644 index 00000000..b22941f6 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-bg.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP грешка: Не може да се удостовери пред сървъра.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP грешка: Не може да се свърже с SMTP хоста.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP грешка: данните не са приети.'; +$PHPMAILER_LANG['empty_message'] = 'Съдържанието на съобщението е празно'; +$PHPMAILER_LANG['encoding'] = 'Неизвестно кодиране: '; +$PHPMAILER_LANG['execute'] = 'Не може да се изпълни: '; +$PHPMAILER_LANG['file_access'] = 'Няма достъп до файл: '; +$PHPMAILER_LANG['file_open'] = 'Файлова грешка: Не може да се отвори файл: '; +$PHPMAILER_LANG['from_failed'] = 'Следните адреси за подател са невалидни: '; +$PHPMAILER_LANG['instantiate'] = 'Не може да се инстанцира функцията mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Невалиден адрес: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' - пощенски сървър не се поддържа.'; +$PHPMAILER_LANG['provide_address'] = 'Трябва да предоставите поне един email адрес за получател.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP грешка: Следните адреси за Получател са невалидни: '; +$PHPMAILER_LANG['signing'] = 'Грешка при подписване: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP провален connect().'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP сървърна грешка: '; +$PHPMAILER_LANG['variable_set'] = 'Не може да се установи или възстанови променлива: '; +$PHPMAILER_LANG['extension_missing'] = 'Липсва разширение: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php new file mode 100644 index 00000000..4117596c --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Error SMTP: No s’ha pogut autenticar.'; +$PHPMAILER_LANG['connect_host'] = 'Error SMTP: No es pot connectar al servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Dades no acceptades.'; +$PHPMAILER_LANG['empty_message'] = 'El cos del missatge està buit.'; +$PHPMAILER_LANG['encoding'] = 'Codificació desconeguda: '; +$PHPMAILER_LANG['execute'] = 'No es pot executar: '; +$PHPMAILER_LANG['file_access'] = 'No es pot accedir a l’arxiu: '; +$PHPMAILER_LANG['file_open'] = 'Error d’Arxiu: No es pot obrir l’arxiu: '; +$PHPMAILER_LANG['from_failed'] = 'La(s) següent(s) adreces de remitent han fallat: '; +$PHPMAILER_LANG['instantiate'] = 'No s’ha pogut crear una instància de la funció Mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Adreça d’email invalida: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no està suportat'; +$PHPMAILER_LANG['provide_address'] = 'S’ha de proveir almenys una adreça d’email com a destinatari.'; +$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Els següents destinataris han fallat: '; +$PHPMAILER_LANG['signing'] = 'Error al signar: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Ha fallat el SMTP Connect().'; +$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'No s’ha pogut establir o restablir la variable: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php new file mode 100644 index 00000000..4fda6b85 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。'; +$PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。'; +//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['encoding'] = '未知编码:'; +$PHPMAILER_LANG['execute'] = '不能执行: '; +$PHPMAILER_LANG['file_access'] = '不能访问文件:'; +$PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:'; +$PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: '; +$PHPMAILER_LANG['instantiate'] = '不能实现mail方法。'; +//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。'; +$PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: '; +//$PHPMAILER_LANG['signing'] = 'Signing Error: '; +//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; +//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; +//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-cs.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-cs.php new file mode 100644 index 00000000..1160cf0c --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-cs.php @@ -0,0 +1,25 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Kunne ikke logge på.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Kunne ikke tilslutte SMTP serveren.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data kunne ikke accepteres.'; +//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['encoding'] = 'Ukendt encode-format: '; +$PHPMAILER_LANG['execute'] = 'Kunne ikke køre: '; +$PHPMAILER_LANG['file_access'] = 'Ingen adgang til fil: '; +$PHPMAILER_LANG['file_open'] = 'Fil fejl: Kunne ikke åbne filen: '; +$PHPMAILER_LANG['from_failed'] = 'Følgende afsenderadresse er forkert: '; +$PHPMAILER_LANG['instantiate'] = 'Kunne ikke initialisere email funktionen.'; +//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer understøttes ikke.'; +$PHPMAILER_LANG['provide_address'] = 'Du skal indtaste mindst en modtagers emailadresse.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP fejl: Følgende modtagere er forkerte: '; +//$PHPMAILER_LANG['signing'] = 'Signing Error: '; +//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; +//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; +//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php new file mode 100644 index 00000000..aa987a9c --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php @@ -0,0 +1,25 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Error SMTP: Imposible autentificar.'; +$PHPMAILER_LANG['connect_host'] = 'Error SMTP: Imposible conectar al servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Datos no aceptados.'; +$PHPMAILER_LANG['empty_message'] = 'El cuerpo del mensaje está vacío'; +$PHPMAILER_LANG['encoding'] = 'Codificación desconocida: '; +$PHPMAILER_LANG['execute'] = 'Imposible ejecutar: '; +$PHPMAILER_LANG['file_access'] = 'Imposible acceder al archivo: '; +$PHPMAILER_LANG['file_open'] = 'Error de Archivo: Imposible abrir el archivo: '; +$PHPMAILER_LANG['from_failed'] = 'La(s) siguiente(s) direcciones de remitente fallaron: '; +$PHPMAILER_LANG['instantiate'] = 'Imposible crear una instancia de la función Mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Imposible enviar: dirección de email inválido: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no está soportado.'; +$PHPMAILER_LANG['provide_address'] = 'Debe proporcionar al menos una dirección de email de destino.'; +$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Los siguientes destinos fallaron: '; +$PHPMAILER_LANG['signing'] = 'Error al firmar: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falló.'; +$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'No se pudo configurar la variable: '; +$PHPMAILER_LANG['extension_missing'] = 'Extensión faltante: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php new file mode 100644 index 00000000..7e06da13 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Viga: Autoriseerimise viga.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Viga: Ei õnnestunud luua ühendust SMTP serveriga.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Viga: Vigased andmed.'; +$PHPMAILER_LANG['empty_message'] = 'Tühi kirja sisu'; +$PHPMAILER_LANG["encoding"] = 'Tundmatu kodeering: '; +$PHPMAILER_LANG['execute'] = 'Tegevus ebaõnnestus: '; +$PHPMAILER_LANG['file_access'] = 'Pole piisavalt õiguseid järgneva faili avamiseks: '; +$PHPMAILER_LANG['file_open'] = 'Faili Viga: Faili avamine ebaõnnestus: '; +$PHPMAILER_LANG['from_failed'] = 'Järgnev saatja e-posti aadress on vigane: '; +$PHPMAILER_LANG['instantiate'] = 'mail funktiooni käivitamine ebaõnnestus.'; +$PHPMAILER_LANG['invalid_address'] = 'Saatmine peatatud, e-posti address vigane: '; +$PHPMAILER_LANG['provide_address'] = 'Te peate määrama vähemalt ühe saaja e-posti aadressi.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' maileri tugi puudub.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Viga: Järgnevate saajate e-posti aadressid on vigased: '; +$PHPMAILER_LANG["signing"] = 'Viga allkirjastamisel: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() ebaõnnestus.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP serveri viga: '; +$PHPMAILER_LANG['variable_set'] = 'Ei õnnestunud määrata või lähtestada muutujat: '; +$PHPMAILER_LANG['extension_missing'] = 'Nõutud laiendus on puudu: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-fa.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fa.php new file mode 100644 index 00000000..ad0745c5 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fa.php @@ -0,0 +1,27 @@ + + * @author Mohammad Hossein Mojtahedi + */ + +$PHPMAILER_LANG['authenticate'] = 'خطای SMTP: احراز هویت با شکست مواجه شد.'; +$PHPMAILER_LANG['connect_host'] = 'خطای SMTP: اتصال به سرور SMTP برقرار نشد.'; +$PHPMAILER_LANG['data_not_accepted'] = 'خطای SMTP: داده‌ها نا‌درست هستند.'; +$PHPMAILER_LANG['empty_message'] = 'بخش متن پیام خالی است.'; +$PHPMAILER_LANG['encoding'] = 'کد‌گذاری نا‌شناخته: '; +$PHPMAILER_LANG['execute'] = 'امکان اجرا وجود ندارد: '; +$PHPMAILER_LANG['file_access'] = 'امکان دسترسی به فایل وجود ندارد: '; +$PHPMAILER_LANG['file_open'] = 'خطای File: امکان بازکردن فایل وجود ندارد: '; +$PHPMAILER_LANG['from_failed'] = 'آدرس فرستنده اشتباه است: '; +$PHPMAILER_LANG['instantiate'] = 'امکان معرفی تابع ایمیل وجود ندارد.'; +$PHPMAILER_LANG['invalid_address'] = 'آدرس ایمیل معتبر نیست: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer پشتیبانی نمی‌شود.'; +$PHPMAILER_LANG['provide_address'] = 'باید حداقل یک آدرس گیرنده وارد کنید.'; +$PHPMAILER_LANG['recipients_failed'] = 'خطای SMTP: ارسال به آدرس گیرنده با خطا مواجه شد: '; +$PHPMAILER_LANG['signing'] = 'خطا در امضا: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'خطا در اتصال به SMTP.'; +$PHPMAILER_LANG['smtp_error'] = 'خطا در SMTP Server: '; +$PHPMAILER_LANG['variable_set'] = 'امکان ارسال یا ارسال مجدد متغیر‌ها وجود ندارد: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php new file mode 100644 index 00000000..ec4e7523 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP feilur: Kundi ikki góðkenna.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP feilur: Kundi ikki knýta samband við SMTP vert.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP feilur: Data ikki góðkent.'; +//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['encoding'] = 'Ókend encoding: '; +$PHPMAILER_LANG['execute'] = 'Kundi ikki útføra: '; +$PHPMAILER_LANG['file_access'] = 'Kundi ikki tilganga fílu: '; +$PHPMAILER_LANG['file_open'] = 'Fílu feilur: Kundi ikki opna fílu: '; +$PHPMAILER_LANG['from_failed'] = 'fylgjandi Frá/From adressa miseydnaðist: '; +$PHPMAILER_LANG['instantiate'] = 'Kuni ikki instantiera mail funktión.'; +//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' er ikki supporterað.'; +$PHPMAILER_LANG['provide_address'] = 'Tú skal uppgeva minst móttakara-emailadressu(r).'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Feilur: Fylgjandi móttakarar miseydnaðust: '; +//$PHPMAILER_LANG['signing'] = 'Signing Error: '; +//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; +//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; +//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php new file mode 100644 index 00000000..af68c923 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php @@ -0,0 +1,29 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Erro SMTP: Non puido ser autentificado.'; +$PHPMAILER_LANG['connect_host'] = 'Erro SMTP: Non puido conectar co servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Erro SMTP: Datos non aceptados.'; +$PHPMAILER_LANG['empty_message'] = 'Corpo da mensaxe vacía'; +$PHPMAILER_LANG['encoding'] = 'Codificación descoñecida: '; +$PHPMAILER_LANG['execute'] = 'Non puido ser executado: '; +$PHPMAILER_LANG['file_access'] = 'Nob puido acceder ó arquivo: '; +$PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: No puido abrir o arquivo: '; +$PHPMAILER_LANG['from_failed'] = 'A(s) seguinte(s) dirección(s) de remitente(s) deron erro: '; +$PHPMAILER_LANG['instantiate'] = 'Non puido crear unha instancia da función Mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Non puido envia-lo correo: dirección de email inválida: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer non está soportado.'; +$PHPMAILER_LANG['provide_address'] = 'Debe engadir polo menos unha dirección de email coma destino.'; +$PHPMAILER_LANG['recipients_failed'] = 'Erro SMTP: Os seguintes destinos fallaron: '; +$PHPMAILER_LANG['signing'] = 'Erro ó firmar: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fallou.'; +$PHPMAILER_LANG['smtp_error'] = 'Erro do servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Non puidemos axustar ou reaxustar a variábel: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-he.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-he.php new file mode 100644 index 00000000..70eb7175 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-he.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'שגיאת SMTP: פעולת האימות נכשלה.'; +$PHPMAILER_LANG['connect_host'] = 'שגיאת SMTP: לא הצלחתי להתחבר לשרת SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'שגיאת SMTP: מידע לא התקבל.'; +$PHPMAILER_LANG['empty_message'] = 'גוף ההודעה ריק'; +$PHPMAILER_LANG['invalid_address'] = 'כתובת שגויה: '; +$PHPMAILER_LANG['encoding'] = 'קידוד לא מוכר: '; +$PHPMAILER_LANG['execute'] = 'לא הצלחתי להפעיל את: '; +$PHPMAILER_LANG['file_access'] = 'לא ניתן לגשת לקובץ: '; +$PHPMAILER_LANG['file_open'] = 'שגיאת קובץ: לא ניתן לגשת לקובץ: '; +$PHPMAILER_LANG['from_failed'] = 'כתובות הנמענים הבאות נכשלו: '; +$PHPMAILER_LANG['instantiate'] = 'לא הצלחתי להפעיל את פונקציית המייל.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' אינה נתמכת.'; +$PHPMAILER_LANG['provide_address'] = 'חובה לספק לפחות כתובת אחת של מקבל המייל.'; +$PHPMAILER_LANG['recipients_failed'] = 'שגיאת SMTP: הנמענים הבאים נכשלו: '; +$PHPMAILER_LANG['signing'] = 'שגיאת חתימה: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; +$PHPMAILER_LANG['smtp_error'] = 'שגיאת שרת SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'לא ניתן לקבוע או לשנות את המשתנה: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-hr.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-hr.php new file mode 100644 index 00000000..3822920a --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-hr.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Greška: Neuspjela autentikacija.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Greška: Ne mogu se spojiti na SMTP poslužitelj.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Greška: Podatci nisu prihvaćeni.'; +$PHPMAILER_LANG['empty_message'] = 'Sadržaj poruke je prazan.'; +$PHPMAILER_LANG['encoding'] = 'Nepoznati encoding: '; +$PHPMAILER_LANG['execute'] = 'Nije moguće izvršiti naredbu: '; +$PHPMAILER_LANG['file_access'] = 'Nije moguće pristupiti datoteci: '; +$PHPMAILER_LANG['file_open'] = 'Nije moguće otvoriti datoteku: '; +$PHPMAILER_LANG['from_failed'] = 'SMTP Greška: Slanje s navedenih e-mail adresa nije uspjelo: '; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Greška: Slanje na navedenih e-mail adresa nije uspjelo: '; +$PHPMAILER_LANG['instantiate'] = 'Ne mogu pokrenuti mail funkcionalnost.'; +$PHPMAILER_LANG['invalid_address'] = 'E-mail nije poslan. Neispravna e-mail adresa: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nije podržan.'; +$PHPMAILER_LANG['provide_address'] = 'Definirajte barem jednu adresu primatelja.'; +$PHPMAILER_LANG['signing'] = 'Greška prilikom prijave: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Spajanje na SMTP poslužitelj nije uspjelo.'; +$PHPMAILER_LANG['smtp_error'] = 'Greška SMTP poslužitelja: '; +$PHPMAILER_LANG['variable_set'] = 'Ne mogu postaviti varijablu niti ju vratiti nazad: '; +$PHPMAILER_LANG['extension_missing'] = 'Nedostaje proširenje: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php new file mode 100644 index 00000000..d7ca8887 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Kesalahan SMTP: Tidak dapat mengautentikasi.'; +$PHPMAILER_LANG['connect_host'] = 'Kesalahan SMTP: Tidak dapat terhubung ke host SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Kesalahan SMTP: Data tidak diterima peladen.'; +$PHPMAILER_LANG['empty_message'] = 'Isi pesan kosong'; +$PHPMAILER_LANG['encoding'] = 'Pengkodean karakter tidak dikenali: '; +$PHPMAILER_LANG['execute'] = 'Tidak dapat menjalankan proses : '; +$PHPMAILER_LANG['file_access'] = 'Tidak dapat mengakses berkas : '; +$PHPMAILER_LANG['file_open'] = 'Kesalahan File: Berkas tidak bisa dibuka : '; +$PHPMAILER_LANG['from_failed'] = 'Alamat pengirim berikut mengakibatkan error : '; +$PHPMAILER_LANG['instantiate'] = 'Tidak dapat menginisialisasi fungsi email'; +$PHPMAILER_LANG['invalid_address'] = 'Gagal terkirim, alamat email tidak valid : '; +$PHPMAILER_LANG['provide_address'] = 'Harus disediakan minimal satu alamat tujuan'; +$PHPMAILER_LANG['mailer_not_supported'] = 'Mailer tidak didukung'; +$PHPMAILER_LANG['recipients_failed'] = 'Kesalahan SMTP: Alamat tujuan berikut menghasilkan error : '; +$PHPMAILER_LANG['signing'] = 'Kesalahan dalam tanda tangan : '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() gagal.'; +$PHPMAILER_LANG['smtp_error'] = 'Kesalahan peladen SMTP : '; +$PHPMAILER_LANG['variable_set'] = 'Tidak berhasil mengatur atau mengatur ulang variable : '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php new file mode 100644 index 00000000..d2f4643e --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php @@ -0,0 +1,27 @@ + + * @author Stefano Sabatini + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Impossibile autenticarsi.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Impossibile connettersi all\'host SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Dati non accettati dal server.'; +$PHPMAILER_LANG['empty_message'] = 'Il corpo del messaggio è vuoto'; +$PHPMAILER_LANG['encoding'] = 'Codifica dei caratteri sconosciuta: '; +$PHPMAILER_LANG['execute'] = 'Impossibile eseguire l\'operazione: '; +$PHPMAILER_LANG['file_access'] = 'Impossibile accedere al file: '; +$PHPMAILER_LANG['file_open'] = 'File Error: Impossibile aprire il file: '; +$PHPMAILER_LANG['from_failed'] = 'I seguenti indirizzi mittenti hanno generato errore: '; +$PHPMAILER_LANG['instantiate'] = 'Impossibile istanziare la funzione mail'; +$PHPMAILER_LANG['invalid_address'] = 'Impossibile inviare, l\'indirizzo email non è valido: '; +$PHPMAILER_LANG['provide_address'] = 'Deve essere fornito almeno un indirizzo ricevente'; +$PHPMAILER_LANG['mailer_not_supported'] = 'Mailer non supportato'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: I seguenti indirizzi destinatari hanno generato un errore: '; +$PHPMAILER_LANG['signing'] = 'Errore nella firma: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fallita.'; +$PHPMAILER_LANG['smtp_error'] = 'Errore del server SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Impossibile impostare o resettare la variabile: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php new file mode 100644 index 00000000..2d778728 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php @@ -0,0 +1,27 @@ + + * @author Yoshi Sakai + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。'; +$PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。'; +//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['encoding'] = '不明なエンコーディング: '; +$PHPMAILER_LANG['execute'] = '実行できませんでした: '; +$PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: '; +$PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: '; +$PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: '; +$PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。'; +//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; +$PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。'; +$PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: '; +//$PHPMAILER_LANG['signing'] = 'Signing Error: '; +//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; +//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; +//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ka.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ka.php new file mode 100644 index 00000000..dd1af8ab --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ka.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP შეცდომა: ავტორიზაცია შეუძლებელია.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP შეცდომა: SMTP სერვერთან დაკავშირება შეუძლებელია.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP შეცდომა: მონაცემები არ იქნა მიღებული.'; +$PHPMAILER_LANG['encoding'] = 'კოდირების უცნობი ტიპი: '; +$PHPMAILER_LANG['execute'] = 'შეუძლებელია შემდეგი ბრძანების შესრულება: '; +$PHPMAILER_LANG['file_access'] = 'შეუძლებელია წვდომა ფაილთან: '; +$PHPMAILER_LANG['file_open'] = 'ფაილური სისტემის შეცდომა: არ იხსნება ფაილი: '; +$PHPMAILER_LANG['from_failed'] = 'გამგზავნის არასწორი მისამართი: '; +$PHPMAILER_LANG['instantiate'] = 'mail ფუნქციის გაშვება ვერ ხერხდება.'; +$PHPMAILER_LANG['provide_address'] = 'გთხოვთ მიუთითოთ ერთი ადრესატის e-mail მისამართი მაინც.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' - საფოსტო სერვერის მხარდაჭერა არ არის.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP შეცდომა: შემდეგ მისამართებზე გაგზავნა ვერ მოხერხდა: '; +$PHPMAILER_LANG['empty_message'] = 'შეტყობინება ცარიელია'; +$PHPMAILER_LANG['invalid_address'] = 'არ გაიგზავნა, e-mail მისამართის არასწორი ფორმატი: '; +$PHPMAILER_LANG['signing'] = 'ხელმოწერის შეცდომა: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'შეცდომა SMTP სერვერთან დაკავშირებისას'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP სერვერის შეცდომა: '; +$PHPMAILER_LANG['variable_set'] = 'შეუძლებელია შემდეგი ცვლადის შექმნა ან შეცვლა: '; +$PHPMAILER_LANG['extension_missing'] = 'ბიბლიოთეკა არ არსებობს: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ko.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ko.php new file mode 100644 index 00000000..9599fa68 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ko.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP 오류: 인증할 수 없습니다.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP 오류: SMTP 호스트에 접속할 수 없습니다.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 오류: 데이터가 받아들여지지 않았습니다.'; +$PHPMAILER_LANG['empty_message'] = '메세지 내용이 없습니다'; +$PHPMAILER_LANG['encoding'] = '알 수 없는 인코딩: '; +$PHPMAILER_LANG['execute'] = '실행 불가: '; +$PHPMAILER_LANG['file_access'] = '파일 접근 불가: '; +$PHPMAILER_LANG['file_open'] = '파일 오류: 파일을 열 수 없습니다: '; +$PHPMAILER_LANG['from_failed'] = '다음 From 주소에서 오류가 발생했습니다: '; +$PHPMAILER_LANG['instantiate'] = 'mail 함수를 인스턴스화할 수 없습니다'; +$PHPMAILER_LANG['invalid_address'] = '잘못된 주소: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' 메일러는 지원되지 않습니다.'; +$PHPMAILER_LANG['provide_address'] = '적어도 한 개 이상의 수신자 메일 주소를 제공해야 합니다.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP 오류: 다음 수신자에서 오류가 발생했습니다: '; +$PHPMAILER_LANG['signing'] = '서명 오류: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 연결을 실패하였습니다.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP 서버 오류: '; +$PHPMAILER_LANG['variable_set'] = '변수 설정 및 초기화 불가: '; +$PHPMAILER_LANG['extension_missing'] = '확장자 없음: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-lt.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-lt.php new file mode 100644 index 00000000..1253a4fd --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-lt.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP klaida: autentifikacija nepavyko.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP klaida: nepavyksta prisijungti prie SMTP stoties.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP klaida: duomenys nepriimti.'; +$PHPMAILER_LANG['empty_message'] = 'Laiško turinys tuščias'; +$PHPMAILER_LANG['encoding'] = 'Neatpažinta koduotė: '; +$PHPMAILER_LANG['execute'] = 'Nepavyko įvykdyti komandos: '; +$PHPMAILER_LANG['file_access'] = 'Byla nepasiekiama: '; +$PHPMAILER_LANG['file_open'] = 'Bylos klaida: Nepavyksta atidaryti: '; +$PHPMAILER_LANG['from_failed'] = 'Neteisingas siuntėjo adresas: '; +$PHPMAILER_LANG['instantiate'] = 'Nepavyko paleisti mail funkcijos.'; +$PHPMAILER_LANG['invalid_address'] = 'Neteisingas adresas: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' pašto stotis nepalaikoma.'; +$PHPMAILER_LANG['provide_address'] = 'Nurodykite bent vieną gavėjo adresą.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP klaida: nepavyko išsiųsti šiems gavėjams: '; +$PHPMAILER_LANG['signing'] = 'Prisijungimo klaida: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP susijungimo klaida'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP stoties klaida: '; +$PHPMAILER_LANG['variable_set'] = 'Nepavyko priskirti reikšmės kintamajam: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-lv.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-lv.php new file mode 100644 index 00000000..39bf9a19 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-lv.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP kļūda: Autorizācija neizdevās.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Kļūda: Nevar izveidot savienojumu ar SMTP serveri.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Kļūda: Nepieņem informāciju.'; +$PHPMAILER_LANG['empty_message'] = 'Ziņojuma teksts ir tukšs'; +$PHPMAILER_LANG['encoding'] = 'Neatpazīts kodējums: '; +$PHPMAILER_LANG['execute'] = 'Neizdevās izpildīt komandu: '; +$PHPMAILER_LANG['file_access'] = 'Fails nav pieejams: '; +$PHPMAILER_LANG['file_open'] = 'Faila kļūda: Nevar atvērt failu: '; +$PHPMAILER_LANG['from_failed'] = 'Nepareiza sūtītāja adrese: '; +$PHPMAILER_LANG['instantiate'] = 'Nevar palaist sūtīšanas funkciju.'; +$PHPMAILER_LANG['invalid_address'] = 'Nepareiza adrese: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' sūtītājs netiek atbalstīts.'; +$PHPMAILER_LANG['provide_address'] = 'Lūdzu, norādiet vismaz vienu adresātu.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP kļūda: neizdevās nosūtīt šādiem saņēmējiem: '; +$PHPMAILER_LANG['signing'] = 'Autorizācijas kļūda: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP savienojuma kļūda'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP servera kļūda: '; +$PHPMAILER_LANG['variable_set'] = 'Nevar piešķirt mainīgā vērtību: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ms.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ms.php new file mode 100644 index 00000000..4e2c3408 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ms.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Ralat SMTP: Tidak dapat pengesahan.'; +$PHPMAILER_LANG['connect_host'] = 'Ralat SMTP: Tidak dapat menghubungi hos pelayan SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Ralat SMTP: Data tidak diterima oleh pelayan.'; +$PHPMAILER_LANG['empty_message'] = 'Tiada isi untuk mesej'; +$PHPMAILER_LANG['encoding'] = 'Pengekodan tidak diketahui: '; +$PHPMAILER_LANG['execute'] = 'Tidak dapat melaksanakan: '; +$PHPMAILER_LANG['file_access'] = 'Tidak dapat mengakses fail: '; +$PHPMAILER_LANG['file_open'] = 'Ralat Fail: Tidak dapat membuka fail: '; +$PHPMAILER_LANG['from_failed'] = 'Berikut merupakan ralat dari alamat e-mel: '; +$PHPMAILER_LANG['instantiate'] = 'Tidak dapat memberi contoh fungsi e-mel.'; +$PHPMAILER_LANG['invalid_address'] = 'Alamat emel tidak sah: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' jenis penghantar emel tidak disokong.'; +$PHPMAILER_LANG['provide_address'] = 'Anda perlu menyediakan sekurang-kurangnya satu alamat e-mel penerima.'; +$PHPMAILER_LANG['recipients_failed'] = 'Ralat SMTP: Penerima e-mel berikut telah gagal: '; +$PHPMAILER_LANG['signing'] = 'Ralat pada tanda tangan: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() telah gagal.'; +$PHPMAILER_LANG['smtp_error'] = 'Ralat pada pelayan SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Tidak boleh menetapkan atau menetapkan semula pembolehubah: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-nb.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-nb.php new file mode 100644 index 00000000..44610542 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-nb.php @@ -0,0 +1,25 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP-fout: authenticatie mislukt.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP-fout: kon niet verbinden met SMTP-host.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-fout: data niet geaccepteerd.'; +$PHPMAILER_LANG['empty_message'] = 'Berichttekst is leeg'; +$PHPMAILER_LANG['encoding'] = 'Onbekende codering: '; +$PHPMAILER_LANG['execute'] = 'Kon niet uitvoeren: '; +$PHPMAILER_LANG['file_access'] = 'Kreeg geen toegang tot bestand: '; +$PHPMAILER_LANG['file_open'] = 'Bestandsfout: kon bestand niet openen: '; +$PHPMAILER_LANG['from_failed'] = 'Het volgende afzendersadres is mislukt: '; +$PHPMAILER_LANG['instantiate'] = 'Kon mailfunctie niet initialiseren.'; +$PHPMAILER_LANG['invalid_address'] = 'Ongeldig adres: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wordt niet ondersteund.'; +$PHPMAILER_LANG['provide_address'] = 'Er moet minstens één ontvanger worden opgegeven.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: de volgende ontvangers zijn mislukt: '; +$PHPMAILER_LANG['signing'] = 'Signeerfout: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Verbinding mislukt.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfout: '; +$PHPMAILER_LANG['variable_set'] = 'Kan de volgende variabele niet instellen of resetten: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php new file mode 100644 index 00000000..3da0dee9 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Erro do SMTP: Não foi possível realizar a autenticação.'; +$PHPMAILER_LANG['connect_host'] = 'Erro do SMTP: Não foi possível realizar ligação com o servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Erro do SMTP: Os dados foram rejeitados.'; +$PHPMAILER_LANG['empty_message'] = 'A mensagem no e-mail está vazia.'; +$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: '; +$PHPMAILER_LANG['execute'] = 'Não foi possível executar: '; +$PHPMAILER_LANG['file_access'] = 'Não foi possível aceder o ficheiro: '; +$PHPMAILER_LANG['file_open'] = 'Abertura do ficheiro: Não foi possível abrir o ficheiro: '; +$PHPMAILER_LANG['from_failed'] = 'Ocorreram falhas nos endereços dos seguintes remententes: '; +$PHPMAILER_LANG['instantiate'] = 'Não foi possível iniciar uma instância da função mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Não foi enviado nenhum e-mail para o endereço de e-mail inválido: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.'; +$PHPMAILER_LANG['provide_address'] = 'Tem de fornecer pelo menos um endereço como destinatário do e-mail.'; +$PHPMAILER_LANG['recipients_failed'] = 'Erro do SMTP: O endereço do seguinte destinatário falhou: '; +$PHPMAILER_LANG['signing'] = 'Erro ao assinar: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.'; +$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: '; +$PHPMAILER_LANG['extension_missing'] = 'Extensão em falta: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php new file mode 100644 index 00000000..4ec10f77 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php @@ -0,0 +1,29 @@ + + * @author Lucas Guimarães + * @author Phelipe Alves + * @author Fabio Beneditto + */ + +$PHPMAILER_LANG['authenticate'] = 'Erro de SMTP: Não foi possível autenticar.'; +$PHPMAILER_LANG['connect_host'] = 'Erro de SMTP: Não foi possível conectar ao servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Erro de SMTP: Dados rejeitados.'; +$PHPMAILER_LANG['empty_message'] = 'Mensagem vazia'; +$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: '; +$PHPMAILER_LANG['execute'] = 'Não foi possível executar: '; +$PHPMAILER_LANG['file_access'] = 'Não foi possível acessar o arquivo: '; +$PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: Não foi possível abrir o arquivo: '; +$PHPMAILER_LANG['from_failed'] = 'Os seguintes remetentes falharam: '; +$PHPMAILER_LANG['instantiate'] = 'Não foi possível instanciar a função mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Endereço de e-mail inválido: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.'; +$PHPMAILER_LANG['provide_address'] = 'Você deve informar pelo menos um destinatário.'; +$PHPMAILER_LANG['recipients_failed'] = 'Erro de SMTP: Os seguintes destinatários falharam: '; +$PHPMAILER_LANG['signing'] = 'Erro de Assinatura: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.'; +$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: '; +$PHPMAILER_LANG['extension_missing'] = 'Extensão ausente: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php new file mode 100644 index 00000000..fa100eaa --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Eroare SMTP: Autentificarea a eșuat.'; +$PHPMAILER_LANG['connect_host'] = 'Eroare SMTP: Conectarea la serverul SMTP a eșuat.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Eroare SMTP: Datele nu au fost acceptate.'; +$PHPMAILER_LANG['empty_message'] = 'Mesajul este gol.'; +$PHPMAILER_LANG['encoding'] = 'Encodare necunoscută: '; +$PHPMAILER_LANG['execute'] = 'Nu se poate executa următoarea comandă: '; +$PHPMAILER_LANG['file_access'] = 'Nu se poate accesa următorul fișier: '; +$PHPMAILER_LANG['file_open'] = 'Eroare fișier: Nu se poate deschide următorul fișier: '; +$PHPMAILER_LANG['from_failed'] = 'Următoarele adrese From au dat eroare: '; +$PHPMAILER_LANG['instantiate'] = 'Funcția mail nu a putut fi inițializată.'; +$PHPMAILER_LANG['invalid_address'] = 'Adresa de email nu este validă: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nu este suportat.'; +$PHPMAILER_LANG['provide_address'] = 'Trebuie să adăugați cel puțin o adresă de email.'; +$PHPMAILER_LANG['recipients_failed'] = 'Eroare SMTP: Următoarele adrese de email au eșuat: '; +$PHPMAILER_LANG['signing'] = 'A aparut o problemă la semnarea emailului. '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Conectarea la serverul SMTP a eșuat.'; +$PHPMAILER_LANG['smtp_error'] = 'Eroare server SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Nu se poate seta/reseta variabila. '; +$PHPMAILER_LANG['extension_missing'] = 'Lipsește extensia: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-rs.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-rs.php new file mode 100644 index 00000000..0502f021 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-rs.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP грешка: аутентификација није успела.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP грешка: није могуће повезивање са SMTP сервером.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP грешка: подаци нису прихваћени.'; +$PHPMAILER_LANG['empty_message'] = 'Садржај поруке је празан.'; +$PHPMAILER_LANG['encoding'] = 'Непознато кодовање: '; +$PHPMAILER_LANG['execute'] = 'Није могуће извршити наредбу: '; +$PHPMAILER_LANG['file_access'] = 'Није могуће приступити датотеци: '; +$PHPMAILER_LANG['file_open'] = 'Није могуће отворити датотеку: '; +$PHPMAILER_LANG['from_failed'] = 'SMTP грешка: слање са следећих адреса није успело: '; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP грешка: слање на следеће адресе није успело: '; +$PHPMAILER_LANG['instantiate'] = 'Није могуће покренути mail функцију.'; +$PHPMAILER_LANG['invalid_address'] = 'Порука није послата због неисправне адресе: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' мејлер није подржан.'; +$PHPMAILER_LANG['provide_address'] = 'Потребно је задати најмање једну адресу.'; +$PHPMAILER_LANG['signing'] = 'Грешка приликом пријављивања: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Повезивање са SMTP сервером није успело.'; +$PHPMAILER_LANG['smtp_error'] = 'Грешка SMTP сервера: '; +$PHPMAILER_LANG['variable_set'] = 'Није могуће задати променљиву, нити је вратити уназад: '; +$PHPMAILER_LANG['extension_missing'] = 'Недостаје проширење: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php new file mode 100644 index 00000000..4066f6b4 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php @@ -0,0 +1,27 @@ + + * @author Foster Snowhill + */ + +$PHPMAILER_LANG['authenticate'] = 'Ошибка SMTP: ошибка авторизации.'; +$PHPMAILER_LANG['connect_host'] = 'Ошибка SMTP: не удается подключиться к серверу SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Ошибка SMTP: данные не приняты.'; +$PHPMAILER_LANG['encoding'] = 'Неизвестный вид кодировки: '; +$PHPMAILER_LANG['execute'] = 'Невозможно выполнить команду: '; +$PHPMAILER_LANG['file_access'] = 'Нет доступа к файлу: '; +$PHPMAILER_LANG['file_open'] = 'Файловая ошибка: не удается открыть файл: '; +$PHPMAILER_LANG['from_failed'] = 'Неверный адрес отправителя: '; +$PHPMAILER_LANG['instantiate'] = 'Невозможно запустить функцию mail.'; +$PHPMAILER_LANG['provide_address'] = 'Пожалуйста, введите хотя бы один адрес e-mail получателя.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' — почтовый сервер не поддерживается.'; +$PHPMAILER_LANG['recipients_failed'] = 'Ошибка SMTP: отправка по следующим адресам получателей не удалась: '; +$PHPMAILER_LANG['empty_message'] = 'Пустое сообщение'; +$PHPMAILER_LANG['invalid_address'] = 'Не отослано, неправильный формат email адреса: '; +$PHPMAILER_LANG['signing'] = 'Ошибка подписи: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Ошибка соединения с SMTP-сервером'; +$PHPMAILER_LANG['smtp_error'] = 'Ошибка SMTP-сервера: '; +$PHPMAILER_LANG['variable_set'] = 'Невозможно установить или переустановить переменную: '; +$PHPMAILER_LANG['extension_missing'] = 'Расширение отсутствует: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php new file mode 100644 index 00000000..a38f4e52 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Chyba autentifikácie.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Nebolo možné nadviazať spojenie so SMTP serverom.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Dáta neboli prijaté'; +$PHPMAILER_LANG['empty_message'] = 'Prázdne telo správy.'; +$PHPMAILER_LANG['encoding'] = 'Neznáme kódovanie: '; +$PHPMAILER_LANG['execute'] = 'Nedá sa vykonať: '; +$PHPMAILER_LANG['file_access'] = 'Súbor nebol nájdený: '; +$PHPMAILER_LANG['file_open'] = 'File Error: Súbor sa otvoriť pre čítanie: '; +$PHPMAILER_LANG['from_failed'] = 'Následujúca adresa From je nesprávna: '; +$PHPMAILER_LANG['instantiate'] = 'Nedá sa vytvoriť inštancia emailovej funkcie.'; +$PHPMAILER_LANG['invalid_address'] = 'Neodoslané, emailová adresa je nesprávna: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' emailový klient nieje podporovaný.'; +$PHPMAILER_LANG['provide_address'] = 'Musíte zadať aspoň jednu emailovú adresu príjemcu.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Adresy príjemcov niesu správne '; +$PHPMAILER_LANG['signing'] = 'Chyba prihlasovania: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() zlyhalo.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP chyba serveru: '; +$PHPMAILER_LANG['variable_set'] = 'Nemožno nastaviť alebo resetovať premennú: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php new file mode 100644 index 00000000..54c95725 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP napaka: Avtentikacija ni uspela.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP napaka: Ne morem vzpostaviti povezave s SMTP gostiteljem.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP napaka: Strežnik zavrača podatke.'; +$PHPMAILER_LANG['empty_message'] = 'E-poštno sporočilo nima vsebine.'; +$PHPMAILER_LANG['encoding'] = 'Nepoznan tip kodiranja: '; +$PHPMAILER_LANG['execute'] = 'Operacija ni uspela: '; +$PHPMAILER_LANG['file_access'] = 'Nimam dostopa do datoteke: '; +$PHPMAILER_LANG['file_open'] = 'Ne morem odpreti datoteke: '; +$PHPMAILER_LANG['from_failed'] = 'Neveljaven e-naslov pošiljatelja: '; +$PHPMAILER_LANG['instantiate'] = 'Ne morem inicializirati mail funkcije.'; +$PHPMAILER_LANG['invalid_address'] = 'E-poštno sporočilo ni bilo poslano. E-naslov je neveljaven: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer ni podprt.'; +$PHPMAILER_LANG['provide_address'] = 'Prosim vnesite vsaj enega naslovnika.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP napaka: Sledeči naslovniki so neveljavni: '; +$PHPMAILER_LANG['signing'] = 'Napaka pri podpisovanju: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Ne morem vzpostaviti povezave s SMTP strežnikom.'; +$PHPMAILER_LANG['smtp_error'] = 'Napaka SMTP strežnika: '; +$PHPMAILER_LANG['variable_set'] = 'Ne morem nastaviti oz. ponastaviti spremenljivke: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-sv.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-sv.php new file mode 100644 index 00000000..4408e63e --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-sv.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP fel: Kunde inte autentisera.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP fel: Kunde inte ansluta till SMTP-server.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fel: Data accepterades inte.'; +//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['encoding'] = 'Okänt encode-format: '; +$PHPMAILER_LANG['execute'] = 'Kunde inte köra: '; +$PHPMAILER_LANG['file_access'] = 'Ingen åtkomst till fil: '; +$PHPMAILER_LANG['file_open'] = 'Fil fel: Kunde inte öppna fil: '; +$PHPMAILER_LANG['from_failed'] = 'Följande avsändaradress är felaktig: '; +$PHPMAILER_LANG['instantiate'] = 'Kunde inte initiera e-postfunktion.'; +$PHPMAILER_LANG['invalid_address'] = 'Felaktig adress: '; +$PHPMAILER_LANG['provide_address'] = 'Du måste ange minst en mottagares e-postadress.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer stöds inte.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP fel: Följande mottagare är felaktig: '; +$PHPMAILER_LANG['signing'] = 'Signerings fel: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() misslyckades.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP server fel: '; +$PHPMAILER_LANG['variable_set'] = 'Kunde inte definiera eller återställa variabel: '; +$PHPMAILER_LANG['extension_missing'] = 'Tillägg ej tillgängligt: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php new file mode 100644 index 00000000..cfe8eaae --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php @@ -0,0 +1,30 @@ + + * @fixed by Boris Yurchenko + */ + +$PHPMAILER_LANG['authenticate'] = 'Помилка SMTP: помилка авторизації.'; +$PHPMAILER_LANG['connect_host'] = 'Помилка SMTP: не вдається під\'єднатися до серверу SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Помилка SMTP: дані не прийняті.'; +$PHPMAILER_LANG['encoding'] = 'Невідомий тип кодування: '; +$PHPMAILER_LANG['execute'] = 'Неможливо виконати команду: '; +$PHPMAILER_LANG['file_access'] = 'Немає доступу до файлу: '; +$PHPMAILER_LANG['file_open'] = 'Помилка файлової системи: не вдається відкрити файл: '; +$PHPMAILER_LANG['from_failed'] = 'Невірна адреса відправника: '; +$PHPMAILER_LANG['instantiate'] = 'Неможливо запустити функцію mail.'; +$PHPMAILER_LANG['provide_address'] = 'Будь-ласка, введіть хоча б одну адресу e-mail отримувача.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' - поштовий сервер не підтримується.'; +$PHPMAILER_LANG['recipients_failed'] = 'Помилка SMTP: відправлення наступним отримувачам не вдалося: '; +$PHPMAILER_LANG['empty_message'] = 'Пусте тіло повідомлення'; +$PHPMAILER_LANG['invalid_address'] = 'Не відправлено, невірний формат адреси e-mail: '; +$PHPMAILER_LANG['signing'] = 'Помилка підпису: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Помилка з\'єднання із SMTP-сервером'; +$PHPMAILER_LANG['smtp_error'] = 'Помилка SMTP-сервера: '; +$PHPMAILER_LANG['variable_set'] = 'Неможливо встановити або перевстановити змінну: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-vi.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-vi.php new file mode 100644 index 00000000..c60dadeb --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-vi.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Lỗi SMTP: Không thể xác thực.'; +$PHPMAILER_LANG['connect_host'] = 'Lỗi SMTP: Không thể kết nối máy chủ SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Lỗi SMTP: Dữ liệu không được chấp nhận.'; +$PHPMAILER_LANG['empty_message'] = 'Không có nội dung'; +$PHPMAILER_LANG['encoding'] = 'Mã hóa không xác định: '; +$PHPMAILER_LANG['execute'] = 'Không thực hiện được: '; +$PHPMAILER_LANG['file_access'] = 'Không thể truy cập tệp tin '; +$PHPMAILER_LANG['file_open'] = 'Lỗi Tập tin: Không thể mở tệp tin: '; +$PHPMAILER_LANG['from_failed'] = 'Lỗi địa chỉ gửi đi: '; +$PHPMAILER_LANG['instantiate'] = 'Không dùng được các hàm gửi thư.'; +$PHPMAILER_LANG['invalid_address'] = 'Đại chỉ emai không đúng: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' trình gửi thư không được hỗ trợ.'; +$PHPMAILER_LANG['provide_address'] = 'Bạn phải cung cấp ít nhất một địa chỉ người nhận.'; +$PHPMAILER_LANG['recipients_failed'] = 'Lỗi SMTP: lỗi địa chỉ người nhận: '; +$PHPMAILER_LANG['signing'] = 'Lỗi đăng nhập: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Lỗi kết nối với SMTP'; +$PHPMAILER_LANG['smtp_error'] = 'Lỗi máy chủ smtp '; +$PHPMAILER_LANG['variable_set'] = 'Không thể thiết lập hoặc thiết lập lại biến: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php new file mode 100644 index 00000000..3e9e358c --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php @@ -0,0 +1,28 @@ + + * @author Peter Dave Hello <@PeterDaveHello/> + * @author Jason Chiang + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP 錯誤:登入失敗。'; +$PHPMAILER_LANG['connect_host'] = 'SMTP 錯誤:無法連線到 SMTP 主機。'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 錯誤:無法接受的資料。'; +$PHPMAILER_LANG['empty_message'] = '郵件內容為空'; +$PHPMAILER_LANG['encoding'] = '未知編碼: '; +$PHPMAILER_LANG['execute'] = '無法執行:'; +$PHPMAILER_LANG['file_access'] = '無法存取檔案:'; +$PHPMAILER_LANG['file_open'] = '檔案錯誤:無法開啟檔案:'; +$PHPMAILER_LANG['from_failed'] = '發送地址錯誤:'; +$PHPMAILER_LANG['instantiate'] = '未知函數呼叫。'; +$PHPMAILER_LANG['invalid_address'] = '因為電子郵件地址無效,無法傳送: '; +$PHPMAILER_LANG['mailer_not_supported'] = '不支援的發信客戶端。'; +$PHPMAILER_LANG['provide_address'] = '必須提供至少一個收件人地址。'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP 錯誤:以下收件人地址錯誤:'; +$PHPMAILER_LANG['signing'] = '電子簽章錯誤: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 連線失敗'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP 伺服器錯誤: '; +$PHPMAILER_LANG['variable_set'] = '無法設定或重設變數: '; +$PHPMAILER_LANG['extension_missing'] = '遺失模組 Extension: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php new file mode 100644 index 00000000..37537802 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php @@ -0,0 +1,28 @@ + + * @author young + * @author Teddysun + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。'; +$PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。'; +$PHPMAILER_LANG['empty_message'] = '邮件正文为空。'; +$PHPMAILER_LANG['encoding'] = '未知编码:'; +$PHPMAILER_LANG['execute'] = '无法执行:'; +$PHPMAILER_LANG['file_access'] = '无法访问文件:'; +$PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:'; +$PHPMAILER_LANG['from_failed'] = '发送地址错误:'; +$PHPMAILER_LANG['instantiate'] = '未知函数调用。'; +$PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是无效的:'; +$PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。'; +$PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:'; +$PHPMAILER_LANG['signing'] = '登录失败:'; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP服务器连接失败。'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP服务器出错:'; +$PHPMAILER_LANG['variable_set'] = '无法设置或重置变量:'; +$PHPMAILER_LANG['extension_missing'] = '丢失模块 Extension:'; diff --git a/vendor/phpmailer/phpmailer/phpdoc.dist.xml b/vendor/phpmailer/phpmailer/phpdoc.dist.xml new file mode 100644 index 00000000..a9d582a3 --- /dev/null +++ b/vendor/phpmailer/phpmailer/phpdoc.dist.xml @@ -0,0 +1,20 @@ + + + PHPMailer + + docs + utf8 + + TODO + + + + docs + + +