diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 97b3726..0000000 --- a/.gitattributes +++ /dev/null @@ -1,12 +0,0 @@ -############################################################################### -# Set default behavior to automatically normalize line endings. -############################################################################### -* text=auto - -tests/ export-ignore -travis/ export-ignore -.travis.yml export-ignore -.gitignore export-ignore -.gitattributes export-ignore -phpunit.xml.* export-ignore -composer.lock export-ignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index b25c15b..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*~ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 11a05ee..0000000 --- a/.travis.yml +++ /dev/null @@ -1,75 +0,0 @@ -language: php -dist: xenial - -matrix: - include: - - php: 5.3 - env: PHPBB_BRANCH="3.1.x";DB=mysqli - - php: 5.4 - env: PHPBB_BRANCH="3.2.x";DB=mysqli - - php: 5.5 - env: PHPBB_BRANCH="3.2.x";DB=mysqli - - php: 5.6 - env: PHPBB_BRANCH="3.2.x";DB=mysqli - - php: 7.1 - env: DB=none;NOTESTS=1 - - php: 7.1 - env: DB=mariadb - - php: 7.1 - env: DB=postgres - - php: 7.1 - env: DB=sqlite3 - - php: 7.1 - env: DB=mysqli # MyISAM - - php: 7.2 - env: DB=mysqli - - php: 7.2 - env: PHPBB_BRANCH="master";DB=mysqli - - php: 7.3 - env: DB=mysqli - - php: 7.3 - env: PHPBB_BRANCH="master";DB=mysqli - - php: 7.4 - env: DB=mysqli - - php: 7.4 - env: PHPBB_BRANCH="master";DB=mysqli - - php: nightly - env: PHPBB_BRANCH="master";DB=mysqli - allow_failures: - - php: nightly - fast_finish: true - -env: - global: - - EXTNAME="boardtools/upload" # CHANGE name of the extension HERE - - SNIFF="1" # Should we run code sniffer on your code? - - IMAGE_ICC="1" # Should we run icc profile sniffer on your images? - - EPV="1" # Should we run EPV (Extension Pre Validator) on your code? - - PHPBB_BRANCH="3.3.x" - -services: - - postgresql - - mysql - -before_install: - - sudo mkdir travis - - git clone "https://github.com/phpbb/phpbb-ext-acme-demo.git" - - sudo cp phpbb-ext-acme-demo/phpunit.xml.dist ./ - - sudo cp phpbb-ext-acme-demo/travis/prepare-phpbb.sh travis - - sudo rm -rf phpbb-ext-acme-demo - -install: - - travis/prepare-phpbb.sh $EXTNAME $PHPBB_BRANCH - - cd ../../phpBB3 - - travis/prepare-extension.sh $EXTNAME $PHPBB_BRANCH - - travis/setup-phpbb.sh $DB $TRAVIS_PHP_VERSION $NOTESTS - - sh -c "if [ '$EPV' = '1' -a '$NOTESTS' = '1' ]; then cd phpBB; composer remove sami/sami --update-with-dependencies --no-interaction; composer require phpbb/epv:dev-master --no-interaction --ignore-platform-reqs; cd ../; fi" - -before_script: - - travis/setup-database.sh $DB $TRAVIS_PHP_VERSION $NOTESTS - -script: - - sh -c "if [ '$SNIFF' != '0' ]; then travis/ext-sniff.sh $DB $TRAVIS_PHP_VERSION $EXTNAME $NOTESTS; fi" - - sh -c "if [ '$IMAGE_ICC' != '0' ]; then travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION $NOTESTS; fi" - - sh -c "if [ '$EPV' != '0' ] && [ '$NOTESTS' = '1' ]; then phpBB/vendor/bin/EPV.php run --dir='phpBB/ext/$EXTNAME/'; fi" - - sh -c "if [ '$NOTESTS' != '1' ]; then phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/travis/phpunit-$DB-travis.xml --bootstrap ./tests/bootstrap.php; fi" diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 2cc0163..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,81 +0,0 @@ -Upload Extensions - Changelog -============================= -This file contains the list of changes between different versions of Upload Extensions. - -# Version 3.2.0 -## Changes since 3.1.2 -### Bug fixes -* Add support for phpBB 3.2. -* Fix update tooltip for mobile devices. -* Fix updating extensions with removed `ext.php`. -* Fix code selection functionality in file trees. -* Fix version check functionality. - -# Version 3.1.2 -## Changes since 3.1.2-RC2 -### Bug fixes -* Add support for the new types of download links from the CDB on phpbb.com. -* JavaScript fixes and improvements. - -## Changes since 3.1.2-RC1 -### Bug fixes -* JavaScript fixes and improvements. - -## Changes since 3.1.2-beta2 -### New features -* [FEATURE] Extension's description and requirements can be shown for suggested extensions. -* [FEATURE] Full downloadable list of uploaded extensions. -* [FEATURE] Integration with browser's history. - -### Improvements -* [LIST] List of suggested extensions is now taken directly from phpbb.com. -* [CODE] Errors are now shown in the special modal box. -* [DESIGN] Small design improvements: status icons and current file in file tree. - -### Bug fixes -* JavaScript fixes and improvements. - -## Changes since 3.1.2-beta -### New features -* [FEATURE] Language packages management page for each extension. -* [FEATURE] Uploads of language packages for extensions. -* [FEATURE] Integration with Upload Extensions Updater. - -### Improvements -* [SECURITY] Checksums are now checked for uploaded zip packages. -* [ZIP] File dates and file sizes are now displayed on ZIP files management page. -* [INTERFACE] A link to reload pages by JavaScript. - -### Bug fixes -* The received data for valid extensions is now sanitized. -* The list of suggested extensions from phpbb.com is now obtained from extension's repository. -* JavaScript fixes and improvements. - -## Changes since 3.1.1 -### New features -* [FEATURE] Full Ajax support. -* [FEATURE] Full noscript support. -* [FEATURE] Built-in Extensions Manager. -* [FEATURE] Loading status in JavaScript. -* [FEATURE] Navigation and menu bars. -* [FEATURE] Downloads of properly packaged extensions. -* [FEATURE] Built-in FAQ for Upload Extensions. -* [FEATURE] User-friendly status messages. - -### Improvements -* [DETAILS] Now details page is a **separate section** that is not displayed in a small popup window. -* [DETAILS] Now **file tree** is showed on the details page and can be used even when JavaScript is disabled. -* [DETAILS] Now `Changelog.md` and `Readme.md` files can be viewed on details page. -* [ZIP] Now it is possible to delete **2 or more** zip packages at once. -* [CLEANER] Now it is possible to delete **2 or more** extensions at once. -* [CODE] The extension's code was restructured. -* [CODE] Proper error handling. - -### Bug fixes -Already included in 3.1.1. - -# Version 3.1.1 - -Initial stable release (changes can be found in the commits of our [repository on GitHub](https://github.com/BoardTools/upload)). - -© 2014 - 2019 Igor Lavrov (https://github.com/LavIgor) and John Peskens (http://ForumHulp.com) \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index d9e3b2a..0000000 --- a/README.md +++ /dev/null @@ -1,124 +0,0 @@ -Upload Extensions -================= -Upload Extensions enables you to upload extensions' zip files or delete extensions' folders from the server. -With this extension you can install/update/delete extensions without using FTP. If the uploaded extension already exists, it will be updated with the uploaded files. - -[![Build Status](https://travis-ci.org/BoardTools/upload.svg?branch=master)](https://travis-ci.org/BoardTools/upload) - -## Requirements -* phpBB 3.1.0 or higher (phpBB 3.2 is also supported) -* PHP 5.3.3 or higher - -## Sources -You can get Upload Extensions from one of the following sources: - -* phpbb.com: https://www.phpbb.com/customise/db/extension/upload/ -* github.com: https://github.com/BoardTools/upload - -The support from the authors is given only for the packages uploaded from the sources listed above. - -## Website -Find the information about Upload Extensions and its features on the special website: -http://boardtools.github.io/upload/ - -## Installation, update, uninstallation -The information about the installation/update/uninstallation process can be found in FAQ and Wiki: - -* For the packages uploaded from phpbb.com: https://www.phpbb.com/customise/db/extension/upload/faq -* For the packages uploaded from github.com: https://github.com/BoardTools/upload/wiki - -## Language packages -Available language packages and the information about translations can be found here: -https://github.com/BoardTools/upload/wiki/Translations - -### General installation information (for the case if you don't have access to the resources listed above) -In general you'll need to copy the contents of the uploaded zip package to `ext/boardtools/upload`. -As a result the path to the `composer.json` file should become `ext/boardtools/upload/composer.json`. -Then navigate in the ACP to `Customise -> Extension Management -> Manage extensions -> Upload Extensions` and click `Enable`. - -### General information about standard updates -To update Upload Extensions in standard way navigate in the ACP to `Customise -> Extension Management -> Manage extensions -> Upload Extensions` and click `Disable`. -Then you can install the updated version of the extension. - -### General uninstallation information -Navigate in the ACP to `Customise -> Extension Management -> Manage extensions -> Upload Extensions` and click `Disable`. -For permanent uninstallation click also `Delete data` and then you can safely remove the `ext/boardtools/upload` folder. - -## Usage - -### User-friendly interface -The brand new Ajax functionality and colourful design add new improvements to extension's features. -You do not need to refresh the page every time: if you want to return to the main page of Upload Extensions, simply click on its logo on the top of its pages. -You can also read the built-in FAQ if you click on the question mark button hidden behind the logo. -In some places useful tooltips can be found, they can help you in making the right decisions in extension management. -Most actions end with appearance of styled message boxes that tell you the result status. - -Even if JavaScript is not enabled in your browser, the extension's features can still be accessed in a slightly different but still effective way. - -### Upload extensions -To upload extensions navigate in the ACP to `Customise -> Extension Management -> Upload extensions`. -Choose your extension zip file and click the upload button. The extension will unpack your file in the folder mentioned in composer.json. After that you can enable the uploaded extension by clicking on a red toggle. Some tooltips will help you in this process. - -#### Supported sources -You can upload extensions from different types of sources: - -* Customisation database on phpbb.com: choose the extension in the special list and click `Upload`. -* Remote sources: you can also perform uploads from other resources, e.g. GitHub. The link from those resources (not from phpbb.com database) should end with `.zip`. Copy the download link of the extension that you want to install on your board and paste it into the text field in the form "Upload an extension". -* Local PC: simply click `Browse...` button in Upload Extensions and choose a file to upload. - -**You can upload only `zip` formatted files of extensions.** - -### Update extensions -You can update any of already installed extensions by uploading a zip file with the new version of the extension that you want to update. -Note: that extension will be disabled automatically. The previous version will be saved in a zip file. - -If the link to the new version of the extension is provided by its developers in the version check file, then you can easily update the extension by clicking on the `Update` button that will appear if you click on a cogwheel near the version number on the extension details page. - -**You need to revise the uploaded files and enable the updated extension again if you still want to use it on your board.** - -### Extensions management -Now it is possible to do the standard actions with extensions faster than before. - -You can perform the following actions using new Extensions Manager: - -* Enable uploaded extensions: click on a red toggle; it will be grey during the process and it will turn green after the successful result. -* Disable installed extensions: click on a green toggle; it will be grey during the process and it will turn red after the successful result. -* Delete extensions' data: click on a trash bin button displayed near the red toggle; it will be grey during the process and it will disappear after the successful result. -* Check updates for the current versions of extensions: click `Re-Check all versions` link in Extensions Manager of Upload Extensions. -* View the full list of extensions sorted alphabetically (no matter if they are enabled or disabled): it is displayed in Extensions Manager of Upload Extensions. -* View the details of any uploaded extension: choose the extension in the list and click on its row. - -The actions are performed faster because of the new Ajax functionality and improved design. - -Upload Extensions broadens the list of possibilities and it has some other features: - -* You can view Readme and Changelog files of extensions as well as look at their file trees. -* You can view installed language packages for extensions and delete them. -* You can upload new language packages for each of the uploaded extensions. -* You can disable broken extensions and purge their data. -* You can download proper zip packages of extensions (for example, to prepare them for the CDB on phpbb.com). - -Those actions can be done on the details page of your chosen extension. - -### Delete extensions -To delete extensions' folders from the server (to perform complete uninstallation) make sure that your extension is disabled and its data is deleted. The toggle of that extension should be red without trash bin button nearby. -Then navigate to Extension Cleaner tool: `Upload Extensions -> Delete extensions (button with a brush)`. -Choose the extension that you want to delete and click `Delete extension`. -If you want to delete several extensions at once, mark those extensions by ticking the flags and click `Delete marked` button. - -### Managing zip files -You can do the following actions with zip files uploaded with Upload Extensions: - -* Save them in the directory of your choice. To do that tick the flag `Save uploaded zip file` near the upload button. -* To change the directory for saving zip files of uploaded extensions navigate in the ACP to `General -> Server configuration -> Server settings -> Path settings -> Extensions' zip packages storage path`. -* Unpack previously saved zip files of extensions. The unpacked extension will be ready for installation immediately. -* Download saved zip files of extensions on your PC. -* Delete zip files of extensions. You can delete a single zip file or several zip files at once. - -All uploaded zip files will contain the version numbers of the uploaded extensions. -If you have uploaded different zip files with the same name, they will be renamed properly so that they all will be saved. - -## License -[GNU General Public License v2](http://opensource.org/licenses/GPL-2.0) - -© 2014 - 2019 Igor Lavrov (https://github.com/LavIgor) and John Peskens (http://ForumHulp.com) \ No newline at end of file diff --git a/acp/upload_info.php b/acp/upload_info.php deleted file mode 100644 index 13a1291..0000000 --- a/acp/upload_info.php +++ /dev/null @@ -1,37 +0,0 @@ - 'boardtools\upload\acp\upload_module', - 'title' => 'ACP_UPLOAD_EXT_TITLE', - 'version' => '1.0.0', - 'modes' => array( - 'main' => array( - 'title' => 'ACP_UPLOAD_EXT_CONFIG_TITLE', - 'auth' => 'ext_boardtools/upload && acl_a_extensions', - 'cat' => array('ACP_EXTENSION_MANAGEMENT') - ), - ), - ); - } - - function install() - { - } - - function uninstall() - { - } -} diff --git a/acp/upload_module.php b/acp/upload_module.php deleted file mode 100644 index e7649ac..0000000 --- a/acp/upload_module.php +++ /dev/null @@ -1,707 +0,0 @@ -page_title = $user->lang['ACP_UPLOAD_EXT_TITLE']; - $this->tpl_name = 'acp_upload'; - $user->add_lang(array('install', 'acp/extensions', 'migrator')); - $user->add_lang_ext('boardtools/upload', 'upload'); - - // Instead of using new pages we do it here. - $file = $request->variable('file', ''); - if ($file != '') - { - filetree::get_file($file); - } - - // This is the dir where we will store zip files of extensions. - $this->zip_dir = $phpbb_root_path . $config['upload_ext_dir']; - - // get any url vars - $action = $request->variable('action', 'main'); - - $this->main_link = $this->u_action; - $this->back_link = ($request->is_ajax()) ? '' : adm_back_link($this->u_action); - $template->assign_var('U_ACTION', $this->u_action); - - // The links from phpbb.com does not contain .zip suffix. We need to handle this case. - $phpbb_link_template = '#^(https://)www.phpbb.com/customise/db/download/([0-9]*?)(/composer|/manual)?/?(\?sid\=[a-zA-Z0-9]*?)?$#i'; - - // Work with objects class instead of $this. - objects::$cache = &$cache; - objects::$config = &$config; - objects::$log = &$phpbb_log; - objects::$phpEx = $phpEx; - objects::$phpbb_container = &$phpbb_container; - objects::$phpbb_extension_manager = &$phpbb_extension_manager; - objects::$phpbb_link_template = $phpbb_link_template; - objects::$phpbb_root_path = $phpbb_root_path; - objects::$request = &$request; - objects::$template = &$template; - objects::$tpl_name = &$this->tpl_name; - objects::$u_action = $this->u_action; - objects::$user = &$user; - objects::$zip_dir = &$this->zip_dir; - - // Add support for different phpBB branches. - objects::set_compatibility_class(); - - // Detect whether this is an Ajax request - START - $ajax_action = $request->variable('ajax_action', ''); - objects::$is_ajax = false; - - if ($request->is_ajax() && !empty($ajax_action)) - { - $template->assign_vars(array( - 'HAS_AJAX' => true, - 'IS_AJAX' => true, - )); - objects::$is_ajax = true; - - switch ($ajax_action) - { - case 'list_from_cdb': - case 'main': - $this->tpl_name = 'acp_upload_main'; - break; - case 'set_config_force_unstable': - $ajax_action = 'set_config_version_check_force_unstable'; - // no break - case 'list': - $this->tpl_name = 'acp_upload_list'; - break; - case 'local_upload': - $ajax_action = 'upload'; - // no break - case 'upload_language': - case 'upload': - case 'force_update': - case 'enable': - case 'disable': - case 'purge': - case 'restore_languages': - case 'faq': - case 'details': - $this->tpl_name = 'acp_upload_details'; - break; - case 'zip_packages': - $this->tpl_name = 'acp_upload_zip_packages'; - break; - case 'uninstalled': - $this->tpl_name = 'acp_upload_uninstalled'; - break; - case 'versioncheck_force': - extensions::ajax_versioncheck($request->variable('ext_name', '')); - break; - } - $action = $ajax_action; - - /* - * Do not output anything (including errors) besides the result object. - * Errors can still be shown in nice box. - * Do it here - page-specific actions go below. - */ - ob_start(); - } - else - { - $template->assign_vars(array( - 'S_LOAD_ACTION' => $action, - 'U_MAIN_PAGE_URL' => build_url( - array('action', 'ajax', 'ajax_time', 'archive', 'ext_name', 'ext_show', 'lang', 'local_upload', 'result') - ), - )); - - if ($request->variable('ajax', 0) === 1) - { - // Only needed to correctly load the template. - $template->assign_var('HAS_AJAX', true); - } - } - // Detect whether this is an Ajax request - END - - // Get the information about Upload Extensions - START - objects::$upload_ext_name = 'boardtools/upload'; - - // Do not check for updates on every Ajax request. - if (!objects::$is_ajax) - { - updater::get_manager(); - updater::check_updates(); - } - // Get the information about Upload Extensions - END - - $original_action = $action; - - switch ($action) - { - case 'details': - $ext_name = $request->variable('ext_name', objects::$upload_ext_name); - $ext_show = $request->variable('ext_show', ''); - load::details($ext_name, $ext_show); - break; - - case 'faq': - load::details(objects::$upload_ext_name, 'faq'); - break; - - case 'enable': - $ext_name = $request->variable('ext_name', ''); - extensions::enable($ext_name); - break; - - case 'disable': - $ext_name = $request->variable('ext_name', ''); - extensions::disable($ext_name); - break; - - case 'purge': - $ext_name = $request->variable('ext_name', ''); - // Check the link hash for the case of forced updates. An additional safety layer. - $check_link_hash = check_link_hash($request->variable('hash', ''), 'purge.' . $ext_name); - if ((objects::$is_ajax && load::ajax_confirm_box(true)) || ($check_link_hash) || confirm_box(true)) - { - extensions::purge($ext_name); - } - else - { - if (objects::$is_ajax) - { - $md_manager = objects::$compatibility->create_metadata_manager($ext_name); - load::ajax_confirm_box(false, $user->lang('EXTENSION_DELETE_DATA_CONFIRM', $md_manager->get_metadata('display-name')), build_hidden_fields(array( - 'i' => $id, - 'mode' => $mode, - 'action' => $action, - 'ext_name' => $ext_name, - ))); - } - else - { - $md_manager = objects::$compatibility->create_metadata_manager($ext_name); - confirm_box(false, $user->lang('EXTENSION_DELETE_DATA_CONFIRM', $md_manager->get_metadata('display-name')), build_hidden_fields(array( - 'i' => $id, - 'mode' => $mode, - 'action' => $action, - 'ext_name' => $ext_name, - ))); - } - } - break; - - case 'restore_languages': - $ext_name = $request->variable('ext_name', ''); - $zip_file = $request->variable('archive', ''); - extensions::restore_languages($ext_name, $zip_file); - load::details($ext_name, 'details'); - break; - - case 'upload_language': - $lang_action = 'upload'; - /* If we unpack a zip file - ensure that we work locally */ - if (($request->variable('local_upload', '')) != '') - { - $lang_action = 'upload_local'; - } - else - { - if (strpos($request->variable('remote_upload', ''), 'http://') === 0 || strpos($request->variable('remote_upload', ''), 'https://') === 0) - { - $lang_action = 'upload_remote'; - } - } - $ext_name = $request->variable('ext_name', ''); - $lang_name = $request->variable('ext_lang_name', ''); - $lang = new lang(); - if ($lang->upload($lang_action, $ext_name, $lang_name)) - { - load::details($ext_name, 'languages'); - } - break; - - case 'upload': - /* If we unpack a zip file - ensure that we work locally */ - if (($request->variable('local_upload', '')) != '') - { - $action = 'upload_local'; - } - else - { - if (strpos($request->variable('remote_upload', ''), 'http://') === 0 || strpos($request->variable('remote_upload', ''), 'https://') === 0) - { - $action = 'upload_remote'; - } - } - // no break - - case 'force_update': - $extension = new extension(); - $extension->upload($action); - $template->assign_vars(array( - 'U_UPLOAD' => $this->main_link . '&action=upload', - 'S_FORM_ENCTYPE' => ' enctype="multipart/form-data"', - )); - break; - - case 'zip_packages': - if (($result = $request->variable('result', '')) == 'deleted' || $result == 'deleted1') - { - $template->assign_var('EXT_ZIPS_DELETED', $user->lang('EXT_ZIP' . (($result == 'deleted') ? 'S' : '') . '_DELETE_SUCCESS')); - } - load::zip_files(); - $template->assign_vars(array( - 'S_ZIP_PACKAGES' => true, - 'U_DELETE_ACTION' => objects::$u_action . "&action=delete_zip", - )); - break; - - case 'uninstalled': - if (($result = $request->variable('result', '')) == 'deleted' || $result == 'deleted1') - { - $template->assign_var('EXTS_DELETED', $user->lang('EXT' . (($result == 'deleted') ? 'S' : '') . '_DELETE_SUCCESS')); - } - extensions::list_uninstalled_exts(); - $template->assign_vars(array( - 'S_UNINSTALLED' => true, - 'U_DELETE_ACTION' => objects::$u_action . "&action=delete_ext", - )); - break; - - case 'download': - $zip_name = $request->variable('zip_name', ''); - $ext_name = $request->variable('ext_name', ''); - if ($zip_name != '') - { - $download_name = substr($zip_name, 0, -4); - // Ensure that downloads can be done only from the $zip_dir directory. - $download_name = str_replace('../', '', $download_name); - $filename = objects::$zip_dir . '/' . $download_name; - - $mimetype = 'application/zip'; - - if (!(filedownload::download_file($filename, $download_name, $mimetype))) - { - redirect($this->main_link); - } - } - else - { - if ($ext_name != '') - { - if (!extensions::download_extension($ext_name)) - { - files::catch_errors($user->lang('EXT_DOWNLOAD_ERROR', $ext_name)); - } - } - else - { - redirect($this->main_link); - } - } - break; - - case 'set_config_version_check_force_unstable': - if ((objects::$is_ajax && load::ajax_confirm_box(true)) || confirm_box(true)) - { - objects::$config->set('extension_force_unstable', true); - if (objects::$is_ajax) - { - $output = new \phpbb\json_response(); - $output->send(array( - 'status' => 'success' - )); - } - else - { - objects::$template->assign_var('FORCE_UNSTABLE_UPDATED', true); - } - } - else - { - $force_unstable = objects::$request->variable('force_unstable', 0); - - if ($force_unstable) - { - $s_hidden_fields = build_hidden_fields(array( - 'i' => $id, - 'mode' => $mode, - 'action' => $action, - 'force_unstable' => $force_unstable, - )); - - if (objects::$is_ajax) - { - load::ajax_confirm_box(false, objects::$user->lang('EXTENSION_FORCE_UNSTABLE_CONFIRM'), $s_hidden_fields); - } - else - { - confirm_box(false, objects::$user->lang('EXTENSION_FORCE_UNSTABLE_CONFIRM'), $s_hidden_fields); - } - break; - } - else - { - objects::$config->set('extension_force_unstable', false); - if (objects::$is_ajax) - { - $output = new \phpbb\json_response(); - $output->send(array( - 'status' => 'success' - )); - } - else - { - objects::$template->assign_var('FORCE_UNSTABLE_UPDATED', true); - } - } - } - // no break - - case 'list': - extensions::list_all_exts(); - - objects::$template->assign_vars(array( - 'S_EXT_LIST' => true, - 'U_VERSIONCHECK_FORCE' => objects::$u_action . '&action=list&versioncheck_force=1', - 'FORCE_UNSTABLE' => $config['extension_force_unstable'], - 'SET_FORCE_UNSTABLE' => objects::$request->variable('set_force_unstable', false), - 'U_ACTION_LIST' => objects::$u_action . '&action=list', - )); - - add_form_key('version_check_settings'); - break; - - case 'delete_ext': - case 'delete_zip': - $ext_name = $request->variable('ext_name', '', true); - $zip_name = $request->variable('zip_name', '', true); - $marked = $request->variable('mark', array(''), true); - $deletemark = $request->variable('delmarked', false, false, \phpbb\request\request_interface::POST); - - if ($action == 'delete_ext' && $ext_name != '') - { - $marked = array(0 => $ext_name); - } - else - { - if ($action == 'delete_zip' && $zip_name != '') - { - $marked = array(0 => $zip_name); - } - } - - if (sizeof($marked)) - { - if ($action == 'delete_ext') - { - if (confirm_box(true)) - { - $no_errors = true; - foreach ($marked as $ext_number => $ext_name) - { - // Ensure that we can delete extensions only in ext/ directory. - $ext_name = str_replace('.', '', $ext_name); - if (substr_count($ext_name, '/') === 1 && is_dir($phpbb_root_path . 'ext/' . $ext_name)) - { - $dir = substr($ext_name, 0, strpos($ext_name, '/')); - $extensions = sizeof(glob($phpbb_root_path . 'ext/' . $dir . '/*')); - $dir = ($extensions === 1) ? $dir : $ext_name; - $no_errors = files::rrmdir($phpbb_root_path . 'ext/' . $dir, true); // No catching here. - } - } - if ($no_errors) - { - if ($request->is_ajax()) - { - trigger_error($user->lang('EXT' . ((sizeof($marked) > 1) ? 'S' : '') . '_DELETE_SUCCESS')); - } - else - { - redirect(objects::$u_action . '&action=uninstalled&result=deleted' . ((sizeof($marked) > 1) ? '' : '1')); - } - } - else - { - trigger_error($user->lang['EXT_DELETE_ERROR'] . $this->back_link, E_USER_WARNING); - } - } - else - { - $confirm_text = (sizeof($marked) > 1) ? $user->lang('EXTENSIONS_DELETE_CONFIRM', sizeof($marked)) : $user->lang('EXTENSION_DELETE_CONFIRM', $marked[0]); - confirm_box(false, $confirm_text, build_hidden_fields(array( - 'i' => $id, - 'mode' => $mode, - 'action' => $action, - 'mark' => $marked, - 'delmarked' => $deletemark, - ))); - } - } - else - { - if ($action == 'delete_zip') - { - if (confirm_box(true)) - { - $no_errors = true; - foreach ($marked as $zip_number => $zip_name) - { - // No catching here. - $no_errors = files::rrmdir(objects::$zip_dir . '/' . substr($zip_name, 0, -4) . '.zip', true); - } - if ($no_errors) - { - if ($request->is_ajax()) - { - trigger_error($user->lang('EXT_ZIP' . ((sizeof($marked) > 1) ? 'S' : '') . '_DELETE_SUCCESS')); - } - else - { - redirect(objects::$u_action . '&action=zip_packages&result=deleted' . ((sizeof($marked) > 1) ? '' : '1')); - } - } - else - { - trigger_error($user->lang['EXT_ZIP_DELETE_ERROR'] . $this->back_link, E_USER_WARNING); - } - } - else - { - $confirm_text = (sizeof($marked) > 1) ? $user->lang('EXTENSIONS_ZIP_DELETE_CONFIRM', sizeof($marked)) : $user->lang('EXTENSION_ZIP_DELETE_CONFIRM', $marked[0]); - confirm_box(false, $confirm_text, build_hidden_fields(array( - 'i' => $id, - 'mode' => $mode, - 'action' => $action, - 'mark' => $marked, - 'delmarked' => $deletemark, - ))); - } - } - } - } - else - { - files::catch_errors($user->lang['EXT_DELETE_NO_FILE']); - } - break; - - case 'delete_language': - $ext_name = $request->variable('ext_name', '', true); - $marked = $request->variable('mark', array(''), true); - $deletemark = $request->variable('delmarked', false, false, \phpbb\request\request_interface::POST); - - if (sizeof($marked) && !empty($ext_name)) - { - if (confirm_box(true)) - { - $no_errors = false; - foreach ($marked as $lang_number => $lang_name) - { - // Ensure that we can delete extensions only in ext/ directory. - $ext_name = str_replace('.', '', $ext_name); - $lang_name = str_replace('.', '', $lang_name); - $lang_dir = $phpbb_root_path . 'ext/' . $ext_name . '/language/' . $lang_name; - if (substr_count($ext_name, '/') === 1 && !empty($lang_name) && is_dir($lang_dir)) - { - $no_errors = files::rrmdir($lang_dir, true); // No catching here. - } - } - if ($no_errors) - { - if ($request->is_ajax()) - { - $result_text = $user->lang('EXT_LANGUAGE' . ((sizeof($marked) > 1) ? 'S' : '') . '_DELETE_SUCCESS'); - if ($ext_name === objects::$upload_ext_name && in_array(objects::$user->lang_name, $marked)) - { - $json_response = new \phpbb\json_response; - $json_response->send(array( - 'MESSAGE_TITLE' => $user->lang['INFORMATION'], - 'MESSAGE_TEXT' => $result_text, - 'REFRESH_DATA' => array( - 'time' => 3, - 'url' => redirect(objects::$u_action . '&action=details&ext_show=languages&ajax=1', true) - ) - )); - } - else - { - trigger_error($result_text); - } - } - else - { - redirect(objects::$u_action . '&action=details&ext_name=' . urlencode($ext_name) . '&ext_show=languages&result=deleted' . ((sizeof($marked) > 1) ? '' : '1')); - } - } - else - { - trigger_error($user->lang['EXT_LANGUAGE_DELETE_ERROR'] . $this->back_link, E_USER_WARNING); - } - } - else - { - $confirm_text = (sizeof($marked) > 1) ? $user->lang('EXT_LANGUAGES_DELETE_CONFIRM', sizeof($marked)) : $user->lang('EXT_LANGUAGE_DELETE_CONFIRM', $marked[0]); - confirm_box(false, $confirm_text, build_hidden_fields(array( - 'i' => $id, - 'mode' => $mode, - 'action' => $action, - 'ext_name' => $ext_name, - 'mark' => $marked, - 'delmarked' => $deletemark, - ))); - } - } - else - { - files::catch_errors($user->lang['EXT_DELETE_NO_FILE']); - } - break; - - case 'list_from_cdb': - objects::$template->assign_var('S_SHOW_VALID_PHPBB_EXTENSIONS', true); - $this->get_valid_extensions(); - // no break - - case 'main': - default: - $template->assign_vars(array( - 'U_UPLOAD' => $this->main_link . '&action=upload', - 'S_FORM_ENCTYPE' => ' enctype="multipart/form-data"', - )); - break; - } - - if ($this->catch_errors() && objects::$is_ajax) - { - $this->output_response('error', $original_action); - } - else - { - if (objects::$is_ajax) - { - $this->output_response('success', $original_action); - } - } - } - - public function get_valid_extensions() - { - $packages = extensions_list::getPackages(); - if (sizeof($packages)) - { - // Sanitize any data we retrieve from a server - $packages = objects::$compatibility->escape($packages, true); - foreach ($packages as $ext => $value) - { - $latest_release = reset($value); - - if (isset($latest_release['dist']) && isset($latest_release['dist']['url'])) - { - $download_link = $latest_release['dist']['url']; - } - else - { - continue; - } - - $display_name = $latest_release['display_name']; - $description = (isset($latest_release['description'])) ? $latest_release['description'] : ''; - $homepage_link = (isset($latest_release['homepage'])) ? $latest_release['homepage'] : ''; - $shasum = (isset($latest_release['dist']['shasum'])) ? $latest_release['dist']['shasum'] : ''; - - $require_phpbb = (isset($latest_release['extra']['soft-require']['phpbb/phpbb'])) ? $latest_release['extra']['soft-require']['phpbb/phpbb'] : ''; - $require_php = (isset($latest_release['require']['php'])) ? $latest_release['require']['php'] : ''; - - objects::$template->assign_block_vars("phpbb_cdb", array( - 'EXT_NAME' => $display_name, - 'EXT_VERSION' => key($value), - 'EXT_DOWNLOAD' => $download_link, - 'EXT_DOWNLOAD_ENCODED' => urlencode($download_link), - 'EXT_DESCRIPTION' => $description, - 'EXT_HOMEPAGE' => $homepage_link, - 'EXT_CHECKSUM' => $shasum, - 'REQUIRE_PHPBB' => $require_phpbb, - 'REQUIRE_PHPBB_STATUS' => !empty($require_phpbb), - 'REQUIRE_PHP' => $require_php, - 'REQUIRE_PHP_STATUS' => !empty($require_php), - )); - } - } - } - - /** - * Displays the special template in a case of errors. - * - * @return bool Whether there are any errors. - */ - protected function catch_errors() - { - if (files::$catched_errors) - { - if (objects::$request->is_ajax()) - { - $this->tpl_name = 'acp_upload_error'; - } - else - { - objects::$template->assign_vars(array( - 'S_EXT_ERROR' => true, - 'S_LOAD_ACTION' => 'error', - )); - } - objects::$template->assign_var('S_ACTION_BACK', objects::$u_action); - return true; - } - return false; - } - - /** - * Outputs the page as Ajax response. - * - * @param string $status Page status. - * @param string $action Page action. - */ - protected function output_response($status, $action) - { - adm_page_header(''); - $output = ob_get_contents(); - @ob_end_clean(); - $json_response = new \phpbb\json_response(); - $json_response->send(array( - 'status' => $status, - 'action' => $action, - 'result' => objects::$template->assign_display($this->tpl_name . '.html', '', true), - 'output' => $output, - )); - } -} diff --git a/adm/style/acp_ext_details.html b/adm/style/acp_ext_details.html deleted file mode 100644 index 7d50c1c..0000000 --- a/adm/style/acp_ext_details.html +++ /dev/null @@ -1,312 +0,0 @@ -{L_ACP_UPLOAD_EXT_TITLE} » {L_EXTENSIONS_ADMIN} » {META_DISPLAY_NAME} - data-ext-lang="{EXT_LOAD_LANG}" data-upload-ext="true" title="{L_EXT_RELOAD_PAGE}"> -
-

{META_DISPLAY_NAME}

- -
- {L_VERSION} - {META_VERSION} -
- -
- {L_VERSION} - {META_VERSION} -
- -
- {L_VERSION} - {META_VERSION} -
- - - -
-

{L_VERSIONCHECK_FAIL}

-

{UPLOAD_VERSIONCHECK_FAIL_REASON}

-

{L_VERSIONCHECK_FORCE_UPDATE}

-
- -
-

{UPLOAD_VERSIONCHECK_FAIL_REASON}

-
- - -
-

{EXT_LANGUAGE_UPLOADED}

-
- - -
-

{L_ACP_UPLOAD_EXT_NO_CHECKSUM_TITLE}

-

{L_ACP_UPLOAD_EXT_NO_CHECKSUM}

-
- -
-
- -
-
- -
{EXT_DETAILS_MARKDOWN}
- - -
{EXT_DETAILS_README}
-
{EXT_DETAILS_CHANGELOG}
- - -
style="display:block;"> -

{L_ACP_UPLOAD_EXT_HELP}

- -
- {upload_ext_faq_block.BLOCK_TITLE} - -
- {upload_ext_faq_block.faq_row.FAQ_QUESTION} -
{upload_ext_faq_block.faq_row.FAQ_ANSWER}
-
- -
-
- -
- - -
style="display:block;"> - -
-
- {L_EXT_LANGUAGES} - -
- {ext_languages.NAME} -
- -
-
-
- -
-

{L_MARK_ALL}{L_UNMARK_ALL}

- -
-
-
- -
-
-
- {L_EXT_LANGUAGES_UPLOAD} -

{L_EXT_LANGUAGES_UPLOAD_EXPLAIN}

- - - - {S_FORM_TOKEN} - {S_HIDDEN_FIELDS} - - - - - - - - - - - -
- -
-
-
- - -
style="display:block;"> -
{FILETREE}
-
-
{FILENAME}
{CONTENT}
- {L_SELECT_ALL_CODE} -
-
- - -
style="display:block;"> -
- {L_EXT_TOOLS_DOWNLOAD_TITLE} -
- {L_EXT_TOOLS_DOWNLOAD} - - - -
-
-
- - -
- - -
-

{L_EXT_UPDATE_METHODS_TITLE}

- {L_EXT_UPLOAD_UPDATE_METHODS} -
- -
-
{L_EXTENSION_UPLOAD_UPDATE}
- - - - {L_SOURCE}{L_COLON} {upload_updates_available.download} - - {L_EXTENSION_UPDATE_NO_LINK} - -
- {L_LATEST_VERSION} -
- {upload_updates_available.current} - - {L_ANNOUNCEMENT_TOPIC} - - - -
- - -
- - - - -
-
- - - {L_EXTENSION_TO_BE_ENABLED} -
- - - -
- {L_DESCRIPTION} -
-
-

{L_UPLOAD_DESCRIPTION_UPLOAD}

-

- {L_UPLOAD_DESCRIPTION_UPLOAD_CDB} - {L_UPLOAD_DESCRIPTION_UPLOAD_LOCAL} - {L_UPLOAD_DESCRIPTION_UPLOAD_REMOTE} -

-
-
-
-
-

{L_UPLOAD_DESCRIPTION_UPDATE}

-

{L_UPLOAD_DESCRIPTION_UPDATE_ABOUT}

-
-
-
-
-
-

{L_UPLOAD_DESCRIPTION_MANAGE}

-

- {L_UPLOAD_DESCRIPTION_MANAGE_ACTIONS} - {L_UPLOAD_DESCRIPTION_MANAGE_LANG} - {L_UPLOAD_DESCRIPTION_MANAGE_DETAILS} -

-
-
-
-
-

{L_UPLOAD_DESCRIPTION_DESIGN}

-

{L_UPLOAD_DESCRIPTION_DESIGN_ABOUT}

-
-
-
-
-
-

{L_UPLOAD_DESCRIPTION_ZIP}

-

- {L_UPLOAD_DESCRIPTION_ZIP_SAVE} - {L_UPLOAD_DESCRIPTION_ZIP_UNPACK} - {L_UPLOAD_DESCRIPTION_ZIP_DOWNLOAD} -

-
-
-
-
-

{L_UPLOAD_DESCRIPTION_CLEANER}

-

{L_UPLOAD_DESCRIPTION_CLEANER_ABOUT}

-
-
-
- -
-
- {L_CLEAN_NAME} - {META_NAME} -
- -
- {L_HOMEPAGE} - -
- - -
- {L_TIME} - {META_TIME} -
- -
- {L_LICENSE} - {META_LICENSE} -
-
- -
- {L_REQUIREMENTS} - -
- {L_PHPBB_VERSION} - {META_REQUIRE_PHPBB} -
- - -
- {L_PHP_VERSION} - {META_REQUIRE_PHP} -
- -
- -
- - - - {L_DEVELOPER} - - {L_DEVELOPERS} - - -
- {meta_authors.AUTHOR_NAME} - - - - - - -
- -
-
- -
-
diff --git a/adm/style/acp_upload.html b/adm/style/acp_upload.html deleted file mode 100644 index 729e669..0000000 --- a/adm/style/acp_upload.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - -
- -
{L_ACP_UPLOAD_EXT_TITLE}
- - {L_EXT_UPDATES_AVAILABLE} -

{L_ACP_UPLOAD_EXT_DESCRIPTION}

-
{L_LOADING}
-
{L_EXT_LOAD_ERROR}{L_EXT_LOAD_TIMEOUT}
-
-
- -
-

{S_NEXT_STEP}

-
- - - - - - - - - - - - - - - -
-
-
-
-
-
-
{L_EXT_REFRESH_NOTICE} {L_EXT_REFRESH_PAGE}×
- - - - - - - diff --git a/adm/style/acp_upload_cdb.html b/adm/style/acp_upload_cdb.html deleted file mode 100644 index 28140e2..0000000 --- a/adm/style/acp_upload_cdb.html +++ /dev/null @@ -1,43 +0,0 @@ - -
{L_VALID_PHPBB_EXTENSIONS_TITLE}
- -
- - - - - {phpbb_cdb.EXT_NAME} -
- {L_VERSION} - {phpbb_cdb.EXT_VERSION} -
-
- -
-

- -

- -
- {L_VERSION} - -
-
- {L_DESCRIPTION} -

-
-
- {L_REQUIREMENTS} -
- {L_PHPBB_VERSION} - -
-
- {L_PHP_VERSION} - -
-
-
- -
{L_VALID_PHPBB_EXTENSIONS_EMPTY_LIST}
- diff --git a/adm/style/acp_upload_details.html b/adm/style/acp_upload_details.html deleted file mode 100644 index 99c69bc..0000000 --- a/adm/style/acp_upload_details.html +++ /dev/null @@ -1,320 +0,0 @@ - - -{L_ACP_UPLOAD_EXT_TITLE} » {L_EXTENSIONS_ADMIN} » {$EXTENSION_NAME} - -
-
-

- {$EXTENSION_NAME} - - - - -

- - -
- {L_VERSION} - {META_VERSION} -
- -
- {L_VERSION} - {META_VERSION} - - -
- - {L_LATEST_VERSION} - {updates_available.current} - - {L_UPDATE} - - - {L_ANNOUNCEMENT_TOPIC} - -
-
- {L_EXTENSION_UPLOAD_UPDATE} -

{L_EXTENSION_UPLOAD_UPDATE_EXPLAIN}

- - {S_FORM_TOKEN} - {S_HIDDEN_FIELDS} - - -

{L_CHECKSUM}{L_COLON} {updates_available.checksum}

- - - - - - -
-
- -
- -
- -
- {L_VERSION} - {META_VERSION} -
- - -
- -
style="display:block;"> -

style="display:block;">{L_VERSIONCHECK_FAIL}

-

{VERSIONCHECK_FAIL_REASON}

- -
- - -
-

{EXT_ENABLE_STATUS}

-
- - -
-

{L_EXT_LANGUAGES_RESTORED}{EXT_LANGUAGE_UPLOADED}{L_EXT_UPDATED}{L_EXT_UPLOADED}

-

{EXT_OLD_ZIP_SAVED}
{EXT_RESTORE_DIRECTORIES} {L_RESTORE}.

-
- - -
-

{L_ACP_UPLOAD_EXT_UPDATED}

-

{L_ACP_UPLOAD_EXT_UPDATED_EXPLAIN}

-
- - -
-

{L_ACP_UPLOAD_EXT_NO_CHECKSUM_TITLE}

-

{L_ACP_UPLOAD_EXT_NO_CHECKSUM}

-
- - -
-

{L_EXTENSION_BROKEN_TITLE}

- {L_EXTENSION_BROKEN_EXPLAIN} -
- -
-
- -
-
- -
{EXT_DETAILS_MARKDOWN}
- - -
{EXT_DETAILS_README}
-
{EXT_DETAILS_CHANGELOG}
- - -
style="display:block;"> - -
-
- {L_EXT_LANGUAGES} - -
- {ext_languages.NAME} -
- -
-
-
- -
-

{L_MARK_ALL}{L_UNMARK_ALL}

- -
-
-
- -
-
-
- {L_EXT_LANGUAGES_UPLOAD} -

{L_EXT_LANGUAGES_UPLOAD_EXPLAIN}

- - - - {S_FORM_TOKEN} - {S_HIDDEN_FIELDS} - - - - - - - - - - - -
- -
-
-
- - -
style="display:block;"> -
{FILETREE}
-
-
{FILENAME}
{CONTENT}
- {L_SELECT_ALL_CODE} -
-
- - -
style="display:block;"> -
- {L_EXT_TOOLS_DOWNLOAD_TITLE} -
- {L_EXT_TOOLS_DOWNLOAD} - - - -
-
-
- - -
- - -
- {L_LATEST_VERSION} -
- {updates_available.current} - - {L_ANNOUNCEMENT_TOPIC} - -
-
- -
- {L_EXTENSION_UPLOAD_UPDATE} -
- {L_EXTENSION_UPLOAD_UPDATE_EXPLAIN} - - {S_FORM_TOKEN} - {S_HIDDEN_FIELDS} - - - {L_CHECKSUM}{L_COLON} {updates_available.checksum} - - - - - - -
-
- - - -
- - -
- -
{NOT_AVAILABLE}
- - -
- {L_DESCRIPTION} -

{META_DESCRIPTION}

-
- - - -
- {L_LATEST_VERSION} -
- {updates_available.current} - - {L_ANNOUNCEMENT_TOPIC} - - - {L_UPDATE} - -
-
- - -
-
- {L_CLEAN_NAME} - {META_NAME} -
- -
- {L_HOMEPAGE} - -
- - -
- {L_TIME} - {META_TIME} -
- -
- {L_LICENSE} - {META_LICENSE} -
-
- -
- {L_REQUIREMENTS} - -
- {L_PHPBB_VERSION} - {META_REQUIRE_PHPBB} -
- - -
- {L_PHP_VERSION} - {META_REQUIRE_PHP} -
- -
- -
- - - - {L_DEVELOPER} - - {L_DEVELOPERS} - - -
- {meta_authors.AUTHOR_NAME} - - - - - - -
- -
- -
- -
-
diff --git a/adm/style/acp_upload_error.html b/adm/style/acp_upload_error.html deleted file mode 100644 index 6ffe120..0000000 --- a/adm/style/acp_upload_error.html +++ /dev/null @@ -1,17 +0,0 @@ - - {L_BACK_TO_PREV} - -{L_EXT_UPLOAD_BACK} - - -
-

{L_ERROR}

- {UPLOAD_ERROR} -
- - -
-

{L_POSSIBLE_SOLUTIONS}

- {UPLOAD_ERROR_SOLUTIONS} -
- diff --git a/adm/style/acp_upload_list.html b/adm/style/acp_upload_list.html deleted file mode 100644 index ee4f38b..0000000 --- a/adm/style/acp_upload_list.html +++ /dev/null @@ -1,105 +0,0 @@ -{L_ACP_UPLOAD_EXT_TITLE} » {L_EXTENSIONS_ADMIN} - -
-

{L_ACP_UPLOAD_EXT_MANAGER_EXPLAIN}

-
style="display:none"> -

{L_CONFIG_UPDATED}

-
-
- {L_EXT_LIST_DOWNLOAD}{L_VERSIONCHECK_FORCE_UPDATE_ALL}{L_SETTINGS} -
-
style="display:none"> -
- {L_EXTENSIONS_VERSION_CHECK_SETTINGS} -
-
-
- - -
-
-

-   - - - {S_FORM_TOKEN} -

-
-
-
- -
{L_EXTENSIONS_UPLOADED}
- -
- - - - {available.META_DISPLAY_NAME} - -
- {L_VERSION} - {available.META_VERSION} -
- -
- {L_VERSION} - {available.META_VERSION} -
- -
- {L_VERSION} - {available.META_VERSION} -
- -
-
-
-
- - - -
{L_EXTENSIONS_UNAVAILABLE}
-
{L_EXTENSIONS_UNAVAILABLE_EXPLAIN}
-
- - - {unavailable.META_NAME} - -
-

{L_EXTENSION_BROKEN_ENABLED}{L_EXTENSION_BROKEN_DISABLED}

-

{L_EXTENSION_BROKEN_DETAILS}

-
- -
{unavailable.NOT_AVAILABLE}
-
- -
- -
-
-

- {L_EXT_LIST_DOWNLOAD} -

-
- - -
- - -
- - -
- - {L_SELECT_ALL_CODE} - -
-
diff --git a/adm/style/acp_upload_main.html b/adm/style/acp_upload_main.html deleted file mode 100644 index cff2c05..0000000 --- a/adm/style/acp_upload_main.html +++ /dev/null @@ -1,51 +0,0 @@ - -
{UPLOAD_ERROR}
- - -
-

{S_UPDATED_SELF} - {L_EXT_UPDATED_LATEST_VERSION}

-
- -
-
-
-
-
- {L_EXTENSION_UPLOAD} -

{L_EXTENSION_UPLOAD_EXPLAIN}

- - - - {S_FORM_TOKEN} - {S_HIDDEN_FIELDS} - - - - - - - - - -
- -
- - - {L_SHOW_VALID_PHPBB_EXTENSIONS} - - -
- - -
-
{L_VALID_PHPBB_EXTENSIONS}
- -
- -
-
\ No newline at end of file diff --git a/adm/style/acp_upload_pagination.html b/adm/style/acp_upload_pagination.html deleted file mode 100644 index d8e64a8..0000000 --- a/adm/style/acp_upload_pagination.html +++ /dev/null @@ -1,12 +0,0 @@ - - {PAGE_NUMBER} • - diff --git a/adm/style/acp_upload_uninstalled.html b/adm/style/acp_upload_uninstalled.html deleted file mode 100644 index d53a6d2..0000000 --- a/adm/style/acp_upload_uninstalled.html +++ /dev/null @@ -1,36 +0,0 @@ -{L_ACP_UPLOAD_EXT_TITLE} » {L_ACP_UPLOAD_UNINSTALLED_TITLE} - -
- -
-

{EXTS_DELETED}

-
- - -
- - - - - - - - - - - - - - - -
{L_EXTENSIONS_AVAILABLE}{L_MARK}
{disabled.META_DISPLAY_NAME}{disabled.META_VERSION} - - {L_EXTENSION_DELETE} - -
-
-
-

{L_MARK_ALL}{L_UNMARK_ALL}

-
-
- diff --git a/adm/style/acp_upload_zip_packages.html b/adm/style/acp_upload_zip_packages.html deleted file mode 100644 index 5d7b6e0..0000000 --- a/adm/style/acp_upload_zip_packages.html +++ /dev/null @@ -1,39 +0,0 @@ -{L_ACP_UPLOAD_EXT_TITLE} » {L_ACP_UPLOAD_ZIP_TITLE} - -
- -
-

{EXT_ZIPS_DELETED}

-
- - -
- - - - - - - - - - - - - - - -
{L_ZIP_UPLOADED} (1 {L_KB} = 1000 {L_BYTES}){L_MARK}
{zip.META_DISPLAY_NAME}
{zip.FILE_SIZE_KB} {L_KB}
{zip.FILE_DATE} - {L_ACP_UPLOAD_EXT_UNPACK} | {L_DOWNLOAD} | {L_EXTENSION_ZIP_DELETE} -
- - - -
-
-

{L_MARK_ALL}{L_UNMARK_ALL}

-
-
- diff --git a/adm/style/css/images/application.png b/adm/style/css/images/application.png deleted file mode 100644 index 1dee9e3..0000000 Binary files a/adm/style/css/images/application.png and /dev/null differ diff --git a/adm/style/css/images/code.png b/adm/style/css/images/code.png deleted file mode 100644 index 0c76bd1..0000000 Binary files a/adm/style/css/images/code.png and /dev/null differ diff --git a/adm/style/css/images/css.png b/adm/style/css/images/css.png deleted file mode 100644 index f907e44..0000000 Binary files a/adm/style/css/images/css.png and /dev/null differ diff --git a/adm/style/css/images/db.png b/adm/style/css/images/db.png deleted file mode 100644 index bddba1f..0000000 Binary files a/adm/style/css/images/db.png and /dev/null differ diff --git a/adm/style/css/images/directory.png b/adm/style/css/images/directory.png deleted file mode 100644 index 784e8fa..0000000 Binary files a/adm/style/css/images/directory.png and /dev/null differ diff --git a/adm/style/css/images/doc.png b/adm/style/css/images/doc.png deleted file mode 100644 index ae8ecbf..0000000 Binary files a/adm/style/css/images/doc.png and /dev/null differ diff --git a/adm/style/css/images/file.png b/adm/style/css/images/file.png deleted file mode 100644 index 8b8b1ca..0000000 Binary files a/adm/style/css/images/file.png and /dev/null differ diff --git a/adm/style/css/images/film.png b/adm/style/css/images/film.png deleted file mode 100644 index b0ce7bb..0000000 Binary files a/adm/style/css/images/film.png and /dev/null differ diff --git a/adm/style/css/images/flash.png b/adm/style/css/images/flash.png deleted file mode 100644 index 5769120..0000000 Binary files a/adm/style/css/images/flash.png and /dev/null differ diff --git a/adm/style/css/images/html.png b/adm/style/css/images/html.png deleted file mode 100644 index 6ed2490..0000000 Binary files a/adm/style/css/images/html.png and /dev/null differ diff --git a/adm/style/css/images/indicator.gif b/adm/style/css/images/indicator.gif deleted file mode 100644 index 3288d10..0000000 Binary files a/adm/style/css/images/indicator.gif and /dev/null differ diff --git a/adm/style/css/images/java.png b/adm/style/css/images/java.png deleted file mode 100644 index b7bfcd1..0000000 Binary files a/adm/style/css/images/java.png and /dev/null differ diff --git a/adm/style/css/images/linux.png b/adm/style/css/images/linux.png deleted file mode 100644 index 52699bf..0000000 Binary files a/adm/style/css/images/linux.png and /dev/null differ diff --git a/adm/style/css/images/music.png b/adm/style/css/images/music.png deleted file mode 100644 index a8b3ede..0000000 Binary files a/adm/style/css/images/music.png and /dev/null differ diff --git a/adm/style/css/images/pdf.png b/adm/style/css/images/pdf.png deleted file mode 100644 index 8f8095e..0000000 Binary files a/adm/style/css/images/pdf.png and /dev/null differ diff --git a/adm/style/css/images/php.png b/adm/style/css/images/php.png deleted file mode 100644 index 7868a25..0000000 Binary files a/adm/style/css/images/php.png and /dev/null differ diff --git a/adm/style/css/images/picture.png b/adm/style/css/images/picture.png deleted file mode 100644 index 4a158fe..0000000 Binary files a/adm/style/css/images/picture.png and /dev/null differ diff --git a/adm/style/css/images/ppt.png b/adm/style/css/images/ppt.png deleted file mode 100644 index c4eff03..0000000 Binary files a/adm/style/css/images/ppt.png and /dev/null differ diff --git a/adm/style/css/images/psd.png b/adm/style/css/images/psd.png deleted file mode 100644 index 73c5b3f..0000000 Binary files a/adm/style/css/images/psd.png and /dev/null differ diff --git a/adm/style/css/images/ruby.png b/adm/style/css/images/ruby.png deleted file mode 100644 index f59b7c4..0000000 Binary files a/adm/style/css/images/ruby.png and /dev/null differ diff --git a/adm/style/css/images/script.png b/adm/style/css/images/script.png deleted file mode 100644 index 63fe6ce..0000000 Binary files a/adm/style/css/images/script.png and /dev/null differ diff --git a/adm/style/css/images/txt.png b/adm/style/css/images/txt.png deleted file mode 100644 index 813f712..0000000 Binary files a/adm/style/css/images/txt.png and /dev/null differ diff --git a/adm/style/css/images/xls.png b/adm/style/css/images/xls.png deleted file mode 100644 index b977d7e..0000000 Binary files a/adm/style/css/images/xls.png and /dev/null differ diff --git a/adm/style/css/images/zip.png b/adm/style/css/images/zip.png deleted file mode 100644 index fd4bbcc..0000000 Binary files a/adm/style/css/images/zip.png and /dev/null differ diff --git a/adm/style/css/jquery.qtip.min.css b/adm/style/css/jquery.qtip.min.css deleted file mode 100644 index 385f063..0000000 --- a/adm/style/css/jquery.qtip.min.css +++ /dev/null @@ -1,3 +0,0 @@ -/* qTip2 v2.2.1 | Plugins: tips viewport modal | Styles: core basic css3 | qtip2.com | Licensed MIT | Mon Sep 08 2014 03:32:32 */ - -.qtip{position:absolute;left:-28000px;top:-28000px;display:none;max-width:280px;min-width:50px;font-size:10.5px;line-height:12px;direction:ltr;box-shadow:none;padding:0}.qtip-content{position:relative;padding:5px 9px;overflow:hidden;text-align:left;word-wrap:break-word}.qtip-titlebar{position:relative;padding:5px 35px 5px 10px;overflow:hidden;border-width:0 0 1px;font-weight:700}.qtip-titlebar+.qtip-content{border-top-width:0!important}.qtip-close{position:absolute;right:-9px;top:-9px;z-index:11;cursor:pointer;outline:0;border:1px solid transparent}.qtip-titlebar .qtip-close{right:4px;top:50%;margin-top:-9px}* html .qtip-titlebar .qtip-close{top:16px}.qtip-icon .ui-icon,.qtip-titlebar .ui-icon{display:block;text-indent:-1000em;direction:ltr}.qtip-icon,.qtip-icon .ui-icon{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;text-decoration:none}.qtip-icon .ui-icon{width:18px;height:14px;line-height:14px;text-align:center;text-indent:0;font:400 bold 10px/13px Tahoma,sans-serif;color:inherit;background:-100em -100em no-repeat}.qtip-default{border:1px solid #F1D031;background-color:#FFFFA3;color:#555}.qtip-default .qtip-titlebar{background-color:#FFEF93}.qtip-default .qtip-icon{border-color:#CCC;background:#F1F1F1;color:#777}.qtip-default .qtip-titlebar .qtip-close{border-color:#AAA;color:#111}.qtip-light{background-color:#fff;border-color:#E2E2E2;color:#454545}.qtip-light .qtip-titlebar{background-color:#f1f1f1}.qtip-dark{background-color:#505050;border-color:#303030;color:#f3f3f3}.qtip-dark .qtip-titlebar{background-color:#404040}.qtip-dark .qtip-icon{border-color:#444}.qtip-dark .qtip-titlebar .ui-state-hover{border-color:#303030}.qtip-cream{background-color:#FBF7AA;border-color:#F9E98E;color:#A27D35}.qtip-cream .qtip-titlebar{background-color:#F0DE7D}.qtip-cream .qtip-close .qtip-icon{background-position:-82px 0}.qtip-red{background-color:#F78B83;border-color:#D95252;color:#912323}.qtip-red .qtip-titlebar{background-color:#F06D65}.qtip-red .qtip-close .qtip-icon{background-position:-102px 0}.qtip-red .qtip-icon,.qtip-red .qtip-titlebar .ui-state-hover{border-color:#D95252}.qtip-green{background-color:#CAED9E;border-color:#90D93F;color:#3F6219}.qtip-green .qtip-titlebar{background-color:#B0DE78}.qtip-green .qtip-close .qtip-icon{background-position:-42px 0}.qtip-blue{background-color:#E5F6FE;border-color:#ADD9ED;color:#5E99BD}.qtip-blue .qtip-titlebar{background-color:#D0E9F5}.qtip-blue .qtip-close .qtip-icon{background-position:-2px 0}.qtip-shadow{-webkit-box-shadow:1px 1px 3px 1px rgba(0,0,0,.15);-moz-box-shadow:1px 1px 3px 1px rgba(0,0,0,.15);box-shadow:1px 1px 3px 1px rgba(0,0,0,.15)}.qtip-bootstrap,.qtip-rounded,.qtip-tipsy{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.qtip-rounded .qtip-titlebar{-moz-border-radius:4px 4px 0 0;-webkit-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.qtip-youtube{-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 0 3px #333;-moz-box-shadow:0 0 3px #333;box-shadow:0 0 3px #333;color:#fff;border:0 solid transparent;background:#4A4A4A;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#4A4A4A),color-stop(100%,#000));background-image:-webkit-linear-gradient(top,#4A4A4A 0,#000 100%);background-image:-moz-linear-gradient(top,#4A4A4A 0,#000 100%);background-image:-ms-linear-gradient(top,#4A4A4A 0,#000 100%);background-image:-o-linear-gradient(top,#4A4A4A 0,#000 100%)}.qtip-youtube .qtip-titlebar{background-color:transparent}.qtip-youtube .qtip-content{padding:.75em;font:12px arial,sans-serif;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#4a4a4a, EndColorStr=#000000);-ms-filter:"progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#4a4a4a,EndColorStr=#000000);"}.qtip-youtube .qtip-icon{border-color:#222}.qtip-youtube .qtip-titlebar .ui-state-hover{border-color:#303030}.qtip-jtools{background:#232323;background:rgba(0,0,0,.7);background-image:-webkit-gradient(linear,left top,left bottom,from(#717171),to(#232323));background-image:-moz-linear-gradient(top,#717171,#232323);background-image:-webkit-linear-gradient(top,#717171,#232323);background-image:-ms-linear-gradient(top,#717171,#232323);background-image:-o-linear-gradient(top,#717171,#232323);border:2px solid #ddd;border:2px solid rgba(241,241,241,1);-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 0 12px #333;-moz-box-shadow:0 0 12px #333;box-shadow:0 0 12px #333}.qtip-jtools .qtip-titlebar{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171, endColorstr=#4A4A4A);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171,endColorstr=#4A4A4A)"}.qtip-jtools .qtip-content{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A, endColorstr=#232323);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A,endColorstr=#232323)"}.qtip-jtools .qtip-content,.qtip-jtools .qtip-titlebar{background:0 0;color:#fff;border:0 dashed transparent}.qtip-jtools .qtip-icon{border-color:#555}.qtip-jtools .qtip-titlebar .ui-state-hover{border-color:#333}.qtip-cluetip{-webkit-box-shadow:4px 4px 5px rgba(0,0,0,.4);-moz-box-shadow:4px 4px 5px rgba(0,0,0,.4);box-shadow:4px 4px 5px rgba(0,0,0,.4);background-color:#D9D9C2;color:#111;border:0 dashed transparent}.qtip-cluetip .qtip-titlebar{background-color:#87876A;color:#fff;border:0 dashed transparent}.qtip-cluetip .qtip-icon{border-color:#808064}.qtip-cluetip .qtip-titlebar .ui-state-hover{border-color:#696952;color:#696952}.qtip-tipsy{background:#000;background:rgba(0,0,0,.87);color:#fff;border:0 solid transparent;font-size:11px;font-family:'Lucida Grande',sans-serif;font-weight:700;line-height:16px;text-shadow:0 1px #000}.qtip-tipsy .qtip-titlebar{padding:6px 35px 0 10px;background-color:transparent}.qtip-tipsy .qtip-content{padding:6px 10px}.qtip-tipsy .qtip-icon{border-color:#222;text-shadow:none}.qtip-tipsy .qtip-titlebar .ui-state-hover{border-color:#303030}.qtip-tipped{border:3px solid #959FA9;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:#F9F9F9;color:#454545;font-weight:400;font-family:serif}.qtip-tipped .qtip-titlebar{border-bottom-width:0;color:#fff;background:#3A79B8;background-image:-webkit-gradient(linear,left top,left bottom,from(#3A79B8),to(#2E629D));background-image:-webkit-linear-gradient(top,#3A79B8,#2E629D);background-image:-moz-linear-gradient(top,#3A79B8,#2E629D);background-image:-ms-linear-gradient(top,#3A79B8,#2E629D);background-image:-o-linear-gradient(top,#3A79B8,#2E629D);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8, endColorstr=#2E629D);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8,endColorstr=#2E629D)"}.qtip-tipped .qtip-icon{border:2px solid #285589;background:#285589}.qtip-tipped .qtip-icon .ui-icon{background-color:#FBFBFB;color:#555}.qtip-bootstrap{font-size:14px;line-height:20px;color:#333;padding:1px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.qtip-bootstrap .qtip-titlebar{padding:8px 14px;margin:0;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.qtip-bootstrap .qtip-titlebar .qtip-close{right:11px;top:45%;border-style:none}.qtip-bootstrap .qtip-content{padding:9px 14px}.qtip-bootstrap .qtip-icon{background:0 0}.qtip-bootstrap .qtip-icon .ui-icon{width:auto;height:auto;float:right;font-size:20px;font-weight:700;line-height:18px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.qtip-bootstrap .qtip-icon .ui-icon:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}.qtip:not(.ie9haxors) div.qtip-content,.qtip:not(.ie9haxors) div.qtip-titlebar{filter:none;-ms-filter:none}.qtip .qtip-tip{margin:0 auto;overflow:hidden;z-index:10}.qtip .qtip-tip,x:-o-prefocus{visibility:hidden}.qtip .qtip-tip,.qtip .qtip-tip .qtip-vml,.qtip .qtip-tip canvas{position:absolute;color:#123456;background:0 0;border:0 dashed transparent}.qtip .qtip-tip canvas{top:0;left:0}.qtip .qtip-tip .qtip-vml{behavior:url(#default#VML);display:inline-block;visibility:visible}#qtip-overlay{position:fixed;left:0;top:0;width:100%;height:100%}#qtip-overlay.blurs{cursor:pointer}#qtip-overlay div{position:absolute;left:0;top:0;width:100%;height:100%;background-color:#000;opacity:.7;filter:alpha(opacity=70);-ms-filter:"alpha(Opacity=70)"} \ No newline at end of file diff --git a/adm/style/css/upload.css b/adm/style/css/upload.css deleted file mode 100644 index f64680b..0000000 --- a/adm/style/css/upload.css +++ /dev/null @@ -1,2178 +0,0 @@ -/* CSS Document */ - -h1 {position: relative;} - -.ext_upload_wrapper { - display: block; - width: 100%; - box-sizing: border-box; - padding: 0 0 0 80px; - margin: 0; -} -.ext_upload_form_name { - display: block; - font-weight: bold; - margin-bottom: 10px; -} -.ext_upload_form_explain { - display: block; - clear: none; -} -#ext_upload {width:100%; margin:0;} -#remote_upload {width:80%; margin:0; clear:none;} - -#extupload { - width:100%; - margin-top:5px; -} - -#ext_upload fieldset {border-radius:0; padding:10px;} - -#br_form_upload, .br_form_upload {display:block; width:100%; height:10px;} - -.upload_ext_upload_button { - position: relative; - display: inline-block; - float: right; - right: -10px; - bottom: -10px; - margin: -5px 0 0 0; - border-top-left-radius: 10px; - background: #105289; - padding: 5px 15px; - font-size: 14px; - color: #fff; - font-weight: bold; - cursor: pointer; - border: none; - box-shadow: -1px -1px 1px 1px #78cef7; - -webkit-transition: all 0.7s ease; - -moz-transition: all 0.7s ease; - -o-transition: all 0.7s ease; - transition: all 0.7s ease; -} - -.upload_ext_upload_button:hover { - background: #2a70bf; -} - -#ext_upload input[type="radio"] { - background: none; -} - -#ext_upload input[type="radio"], -#ext_upload input[type="checkbox"], -#ext_upload input[type="button"] { - cursor: pointer; -} - -#ext_language_code, #ext_checksum { - margin-right: 10px; -} - -.upload_ext_save_zip { - display: inline-block; -} - -.upload_ext_save_zip label { - margin-left: 5px; -} - -.upload_ext_navigation {margin-top:12px; padding:0;} - -#ext_table {width:100%; margin-top:16px;} - -#upload_main_wrapper, #upload_main {width: 100%; padding: 0; margin: 0;} - -#upload_temp_container, #upload_valid_ext_description, #download_ext_list_link, #download_ext_list_wrapper {display: none;} - -.upload-main-content { - width: 100%; - padding: 0; - margin: 0; - position: relative; -} - -.main_transformation -{ - -moz-transform: rotateX(180deg); - -ms-transform: rotateX(180deg); - -o-transform: rotate(180deg); - -webkit-transform: rotateX(180deg); - transform: rotateX(180deg); -} - -#upload_main_wrapper {border-top: 1px dashed #999999; padding-top: 10px; margin: 0;} -#upload_main_wrapper.main_transformation {border-top: 0; padding-top: 5px; padding-bottom: 5px;} - -.upload-menu { - position: absolute; - top: 0; - left: 0; - display: block; - -webkit-transition: all 0.7s ease; - -moz-transition: all 0.7s ease; - -o-transition: all 0.7s ease; - transition: all 0.7s ease; - border-radius: 20px; - margin: 0 10px; -} - -.upload-menu .upload_ext_menu_name { - display: inline-block; - padding: 10px 5px; - overflow: hidden; -} - -.upload-menu:hover { - background-color: rgba(17, 80, 152, 0.50); - box-shadow: 0 0 10px #115098; -} - -.upload_main_link { - display: block; - background-color: #fff; - border-radius: 15px; - border: 1px solid #115098; - margin: 10px 5px; - padding: 10px 15px; - text-decoration: none; - font-weight: bold; - overflow: hidden; - width: auto; - height: 15px; - -webkit-transition: all 1.0s ease; - -moz-transition: all 1.0s ease; - -o-transition: all 1.0s ease; - transition: all 1.0s ease; -} - -.upload_main_link i.fa { - float: left; - margin-top: 2px; -} - -.upload_main_link span { - display: block; - float: left; - margin: 0 -1000px 0 50px; - -webkit-transition: all 1.0s ease; - -moz-transition: all 1.0s ease; - -o-transition: all 1.0s ease; - transition: all 1.0s ease; -} - -.upload-menu:hover .upload_main_link span { - margin: 0 0 0 8px; -} - -#upload_load_main, #upload_load_main_list, #upload_link_back { - display: inline-block; - border-radius: 15px; - border: 1px solid transparent; - margin: 0; - padding: 5px 0; - text-decoration: none; - font-weight: bold; -} - -#upload_load_main { - padding-left: 5px; -} - -.upload_main_link, .upload_main_link:hover, #upload_load_main, #upload_load_main:hover, #upload_load_main_list, #upload_load_main_list:hover, #upload_link_back, #upload_link_back:hover, .ext_reload_link, .ext_reload_link:hover { - -webkit-transition: all 0.7s ease; - -moz-transition: all 0.7s ease; - -o-transition: all 0.7s ease; - transition: all 0.7s ease; - text-decoration: none; -} - -.upload_load_list.upload_main_link:hover { - background-color: #fdfcd3; - border: 1px solid #706e25; - color: #706e25; - box-shadow: 0 0 15px #706e25; -} - -.upload_load_zip.upload_main_link:hover { - background-color: #e0f5fe; - border: 1px solid #115098; - color: #115098; - box-shadow: 0 0 15px #115098; -} - -.upload_load_uninstalled.upload_main_link:hover { - background-color: #fcdff2; - border: 1px solid #5e1043; - color: #5e1043; - box-shadow: 0 0 15px #5e1043; -} - -#upload_load_main:hover, #upload_link_back:hover { - background-color: #d7fdd3; - border: 1px solid #1e5c18; - color: #1e5c18; - margin: 0 5px 0 15px; - padding: 5px 10px; - box-shadow: 0 0 15px #1e5c18; -} - -#upload_load_main_list:hover { - background-color: #fdfcd3; - border: 1px solid #706e25; - color: #706e25; - margin: 0 5px; - padding: 5px 10px; - box-shadow: 0 0 15px #706e25; -} - -.ext_reload_link { - display: inline-block; - float: right; - border-radius: 15px; - border: 1px solid transparent; - margin: 0 5px 0 15px; - padding: 5px 10px; - text-decoration: none; - font-size: 14px; - font-weight: bold; -} - -.ext_reload_link:hover { - background-color: #d7fdd3; - border: 1px solid #1e5c18; - color: #1e5c18; - box-shadow: 0 0 15px #1e5c18; -} - -#upload {display: none; margin: 50px 0; padding: 0; width: 100%; text-align: center;} - -#uploaded_ok { - display: inline-block; - padding: 5px 5px; - margin-right: 15px; - border-radius: 100%; - color: #edfbf7; - font-weight: bold; - font-size: 1em; - background: #75a875; - background: -moz-linear-gradient(top, #92d992 0%, #228822 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #92d992), color-stop(100%, #228822)); - background: -webkit-linear-gradient(top, #92d992 0%, #228822 100%); - background: -o-linear-gradient(top, #92d992 0%, #228822 100%); - background: -ms-linear-gradient(top, #92d992 0%, #228822 100%); - background: linear-gradient(to bottom, #92d992 0%, #228822 100%); -} - -a.upload_ext_update_button { - display: inline-block; - float: right; - padding: 6px 15px; - border-radius: 15px; - color: #edfbf7; - font-weight: bold; - font-size: 1.1em; - text-decoration: none; - background: #75a875; - background: -moz-linear-gradient(top, #92d992 0%, #228822 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #92d992), color-stop(100%, #228822)); - background: -webkit-linear-gradient(top, #92d992 0%, #228822 100%); - background: -o-linear-gradient(top, #92d992 0%, #228822 100%); - background: -ms-linear-gradient(top, #92d992 0%, #228822 100%); - background: linear-gradient(to bottom, #92d992 0%, #228822 100%); - -webkit-transition: all 0.5s ease; - -moz-transition: all 0.5s ease; - -o-transition: all 0.5s ease; - transition: all 0.5s ease; -} - -.upload_ext_update_button:hover { - background: #228822; - background: -moz-linear-gradient(top, #228822 0%, #58b15f 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #228822), color-stop(100%, #58b15f)); - background: -webkit-linear-gradient(top, #228822 0%, #58b15f 100%); - background: -o-linear-gradient(top, #228822 0%, #58b15f 100%); - background: -ms-linear-gradient(top, #228822 0%, #58b15f 100%); - background: linear-gradient(to bottom, #228822 0%, #58b15f 100%); -} - -.upload_ext_updates_info_link { - margin-top: 7px; -} - -.upload_ext_error_show { - display: none; - float: right; - padding: 8px 12px; - border-radius: 100%; - color: #edfbf7; - font-weight: bold; - font-size: 1.3em; - text-decoration: none; - background: #e0683f; - background: -moz-linear-gradient(top, #e0683f 0%, #BC2A4D 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #e0683f), color-stop(100%, #BC2A4D)); - background: -webkit-linear-gradient(top, #e0683f 0%, #BC2A4D 100%); - background: -o-linear-gradient(top, #e0683f 0%, #BC2A4D 100%); - background: -ms-linear-gradient(top, #e0683f 0%, #BC2A4D 100%); - background: linear-gradient(to bottom, #e0683f 0%, #BC2A4D 100%); - -webkit-transition: all 0.5s ease; - -moz-transition: all 0.5s ease; - -o-transition: all 0.5s ease; - transition: all 0.5s ease; - cursor: pointer; -} - -.upload_ext_error_show:hover { - background: #BC2A4D; - background: -moz-linear-gradient(top, #BC2A4D 0%, #e0683f 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #BC2A4D), color-stop(100%, #e0683f)); - background: -webkit-linear-gradient(top, #BC2A4D 0%, #e0683f 100%); - background: -o-linear-gradient(top, #BC2A4D 0%, #e0683f 100%); - background: -ms-linear-gradient(top, #BC2A4D 0%, #e0683f 100%); - background: linear-gradient(to bottom, #BC2A4D 0%, #e0683f 100%); -} - -#upload_ext_wrapper > p:before { - content: ''; - clear: both; - display: block; -} - -.upload_ext_update_notice { - margin-top: 0 !important; -} - -.upload_ext_update_notice ul { - margin-top: 5px; - margin-bottom: 0; -} - -.back_to_upload {display:block; margin-bottom:15px;} - -.ext_uploaded_notice { - width: 100%; - border: 1px solid #D7D7D7; - border-radius: 15px; - position: relative; - margin: 15px 0; - padding: 10px 15px; - background-color: #d7fdd3; - box-sizing: border-box; - color: #1e5c18; - display: block; -} -.ext_uploaded_notice h1 {color: #1e5c18 !important;} -.ext_uploaded_notice p {margin: 5px 0 5px 0;} - -.ext_updated_notice { - width: 100%; - border: 1px solid #D7D7D7; - border-radius: 15px; - position: relative; - margin: 15px 0; - padding: 10px 15px; - background-color: #fdfcd3; - box-sizing: border-box; - color: #706e25; - display: block; -} -.ext_updated_notice h1 {color: #706e25 !important;} -.ext_updated_notice p {margin: 5px 0 5px 0;} - -.ext_broken_notice { - width: 100%; - border: 1px solid #BC2A4D; - border-radius: 15px; - position: relative; - margin: 15px 0; - padding: 10px 15px; - background-color: #fadedf; - box-sizing: border-box; - color: #BC2A4D; - display: block; -} -.ext_broken_notice h1 {color: #BC2A4D !important;} -.ext_broken_notice p {margin: 5px 0 5px 0;} - -.ext_error_notice, .ext_solution_notice { - width: 100%; - border-radius: 15px; - position: relative; - margin: 15px 0; - padding: 0; - box-sizing: border-box; - display: block; -} -.ext_error_notice h1, .ext_solution_notice h1 { - margin: 0; - padding: 5px 15px; - border-top-left-radius: 15px; - border-top-right-radius: 15px; -} -.ext_error_notice { - border: 1px solid #BC2A4D; - background-color: #fadedf; - color: #BC2A4D; -} -.ext_error_notice h1 { - color: #fff !important; - background-color: #BC2A4D; -} -.ext_solution_notice { - border: 1px solid #865908; - background-color: #fdfcd3; - color: #865908; - margin-top: 35px; -} -.ext_solution_notice h1 { - color: #fff !important; - background-color: #865908; -} -.ext_error_notice i, .ext_solution_notice i { - margin-right: 5px; -} -.ext_error_notice span, .ext_solution_notice span { - display: block; - padding: 10px 15px; -} - -.ext_self_updated_notice { - width: 100%; - background-color: #d7fdd3; - box-sizing: border-box; - color: #1e5c18; - display: block; -} -.ext_self_updated_notice h1 {color: #1e5c18 !important;} - -#upload_ext_wrapper { - display: block; - position: relative; -} - -#upload_extensions_title_block { - display: inline-block; - position: relative; - margin: 0 0 5px 0; -} -#upload_extensions_title { - position: relative; - display: inline-block; - font-size: 1.7em; - z-index: 1; - padding: 7px 12px; - background-color: #edf4f8; - color: #516993; - border-radius: 10px; - text-align: center; - text-decoration: none; - box-shadow: 0 0 25px -5px #105289 inset; -} -#upload_extensions_title_links { - display: inline-block; - padding: 0 0 0 20px; - margin: 0 0 0 -100px; - border-top-right-radius: 15px; - border-bottom-right-radius: 15px; - background-color: #fefed5; - box-shadow: 0 0 25px -5px #977c1e inset; - -webkit-transition: all 0.7s ease; - -moz-transition: all 0.7s ease; - -o-transition: all 0.7s ease; - transition: all 0.7s ease; -} -#upload_extensions_title_block:hover #upload_extensions_title_links { - margin-left: -15px; -} -#upload_extensions_links_show_slider { - display: inline-block; - border-top-right-radius: 15px; - border-bottom-right-radius: 15px; - padding: 7px 10px; - font-size: 1.5em; - color: #977c1e; -} -#upload_extensions_title_links a { - display: inline-block; - padding: 7px 10px; - margin: 0; - font-size: 1.7em; - color: #977c1e; - cursor: pointer; - -webkit-transition: all 0.7s ease; - -moz-transition: all 0.7s ease; - -o-transition: all 0.7s ease; - transition: all 0.7s ease; -} -#upload_extensions_title_links a:hover { - background-color: #fefed5; -} - -#upload_loading { - display: none; - position: relative; - padding: 0; - border-radius: 10px; - color: #edfbf7; - font-weight: bold; - font-size: 18px; - height: 35px; - background: #228822; - background: -moz-linear-gradient(top, #228822 0%, #5ac55a 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #228822), color-stop(100%, #5ac55a)); - background: -webkit-linear-gradient(top, #228822 0%, #5ac55a 100%); - background: -o-linear-gradient(top, #228822 0%, #5ac55a 100%); - background: -ms-linear-gradient(top, #228822 0%, #5ac55a 100%); - background: linear-gradient(to bottom, #228822 0%, #5ac55a 100%); - overflow: hidden; -} - -.upload_loading_element { - display: block; - position: absolute; - background-color: #92d992; - width: 30px; - height: 50px; - top: -8px; - -moz-transform: rotateY(15deg); - -ms-transform: rotateZ(15deg); - -o-transform: rotateY(15deg); - -webkit-transform: rotateY(15deg); - transform: rotateZ(15deg); - z-index: 1; -} - -#upload_loading_text { - display: block; - position: absolute; - top: 5px; - left: 15px; - z-index: 2; -} - -#upload_loading_status { - display: inline-block; - position: absolute; - top: 5px; - right: 15px; - z-index: 2; -} - -#upload_loading_error_wrapper { - display: none; - position: relative; - padding: 0; - border-radius: 10px; - color: #edfbf7; - font-weight: bold; - font-size: 18px; - height: 35px; - text-align: center; - background: #BC2A4D; - background: -moz-linear-gradient(top, #BC2A4D 0%, #e0683f 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #BC2A4D), color-stop(100%, #e0683f)); - background: -webkit-linear-gradient(top, #BC2A4D 0%, #e0683f 100%); - background: -o-linear-gradient(top, #BC2A4D 0%, #e0683f 100%); - background: -ms-linear-gradient(top, #BC2A4D 0%, #e0683f 100%); - background: linear-gradient(to bottom, #BC2A4D 0%, #e0683f 100%); - overflow: hidden; -} - -#upload_loading_error, #upload_loading_timeout, #upload_loading_error_status { - display: none; - padding: 5px 0 0 0; - margin: 0; -} - -#upload_modal_box_wrapper { - position: fixed; - display: none; - top: 0; - left: 0; - right: 0; - overflow-y: auto; - z-index: 50; - width: 100%; - height: 100%; -} - -#upload_modal_box { - background-color: #FFFFFF; - border: 1px solid #999999; - border-radius: 15px; - width: 620px; - margin: 150px auto 0 auto; - padding: 20px; -} - -#upload_modal_box iframe { - width: 100%; - min-height: 450px; - border: 1px #115098 dotted; -} - -#upload_modal_box.big_modal_box { - margin-top: 25px; -} - -#upload_modal_box.huge_modal_box { - width: 85%; - margin-top: 50px; - min-height: 450px; -} - -@media only screen and (max-height: 500px), only screen and (max-device-width: 500px) -{ - #upload_modal_box { - margin-top: 25px; - } -} - -@media only screen and (max-width: 700px), only screen and (max-device-width: 700px) -{ - #upload_modal_box { - width: auto; - margin-left: 25px; - margin-right: 25px; - } -} - -#upload_modal_box .upload_modal_title { - display: inline-block; - color: #115098; - line-height: 31px; - vertical-align: middle; -} - -#upload_modal_box .alert_close { - display: block; - float: right; - width: 20px; - height: 20px; - overflow: hidden; - margin-top: -35px; - margin-right: -35px; - text-align: center; - background-color: #f17878; - border-radius: 100%; - font-weight: bold; - color: #fff; - padding: 5px; - text-decoration: none; - font-size: 16px; -} - -#upload_refresh_notice_wrapper { - display: none; - margin: -10px -15px 15px -15px; - background-color: #fdfcd3; - color: #977C1E; - box-shadow: 0 0 15px #977C1E; - text-align: center; - font-weight: bold; -} - -#upload_refresh_notice { - display: none; - padding: 10px 0; -} - -#upload_refresh_notice a { - font-size: 1em; -} - -#upload_refresh_notice > i { - font-size: 1.5em; -} - -#upload_refresh_notice > span { - font-size: 1.3em; - margin: 0 5px; -} - -#upload_refresh_notice .upload_refresh_notice_close { - float: right; - cursor: pointer; - margin: 5px 15px 0 15px; -} - -#markdown { - border: 1px solid #CCCFD3; - background-color: #F9F9F9; - border-radius: 5px; - padding: 10px 30px; - margin-top: 15px; -} - -.select_all_code, .select_all_content { - font-size: 10px; - color: #105289; - cursor: pointer; -} - -.select_all_code { - display: none; - position: absolute; - bottom: 5px; - right: 15px; -} - -.select_all_content { - display: inline-block; - float: right; -} - -.select_all_code:hover, .select_all_content:hover { - color: #bc2a4d; - text-decoration: underline; -} - -a.upload_main_page_link_block { - display: block; - box-sizing: border-box; - margin: 15px 0 0 0; - padding: 10px; - border: 1px solid #D7D7D7; - background-color: #FFFFFF; - border-radius: 3px; - text-decoration: none; - width: 100%; - cursor: pointer; - font-weight: bold; -} - -.upload_main_page_link_block i.fa { - margin-right: 10px; -} - -#valid_phpbb_extensions_title { - display: block; - margin: 10px 0; - padding: 10px 15px; - font-size: 1.1em; - font-weight: bold; - background: #386897; - color: #fff; - border-radius: 15px; - text-decoration: none; - box-shadow: 0 0 15px #4f99e8 inset; -} - -.upload_valid_ext_list_title { - margin: 15px; -} - -.upload_valid_ext_row { - display: block; - position: relative; - background-color: #fff; - border-radius: 15px; - text-decoration: none; - box-shadow: 0 0 10px #a8a8a8; - padding: 0 0 0 100px; - margin: 10px 10px 0 10px; -} - -.hasjs .upload_valid_ext_row { - cursor: pointer; -} - -.ext_details_actions { - display: inline-block; - padding-top: 5px; -} - -.upload_valid_ext_row, .upload_valid_ext_row a { - -webkit-transition: all 0.5s ease; - -moz-transition: all 0.5s ease; - -o-transition: all 0.5s ease; - transition: all 0.5s ease; -} - -a.upload_valid_ext_download_link { - display: inline-block; - border-radius: 15px; - background: #115098; - color: #fff; - border: none; - cursor: pointer; - padding: 5px 12px; - font-size: 1.5em; - text-decoration: none; -} - -.upload_valid_ext_row a.upload_valid_ext_download_link { - position: absolute; - top: 0; - left: 0; - z-index: 1; -} - -.ext_details_actions a.upload_valid_ext_download_link { - margin: 0 10px; -} - -a.upload_valid_ext_download_link:hover { - color: #fff; - background-color: #2a70bf; -} - -a.upload_valid_ext_announcement_link { - display: inline-block; - border-radius: 15px; - background: none; - color: #115098; - border: 1px solid #115098; - padding: 5px 10px; - font-size: 1.3em; - text-decoration: none; -} - -.upload_valid_ext_row a.upload_valid_ext_announcement_link { - position: absolute; - top: 0; - left: 50px; - z-index: 1; -} - -a.upload_valid_ext_announcement_link:hover { - color: #fff; - background-color: #2a70bf; - border: 1px solid #2a70bf; -} - -.upload_valid_ext_row:hover { - background-color: #fffae5; - box-shadow: 0 0 10px #eed3a9; -} - -.upload_valid_ext_row span.upload_valid_ext_name { - display: inline-block; - font-weight: bold; - font-size: 16px; - padding: 1px 0; - margin: 5px 5px 5px 0; -} - -.upload_valid_ext_row .ext_version_bubble { - margin: 0; -} - -.upload_valid_ext_row:after { - content: ''; - clear: both; - display: block; -} - -.ext_zips_table { - width: 100%; - table-layout: fixed; - margin-top: 16px; -} - -.zip_name { - width: 50%; -} - -div.ext_zip_name { - display: inline-block; - box-sizing: border-box; - width: 100%; - padding-right: 58px; - margin-right: -58px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - font-size: 100%; -} - -/* Extensions list */ -.upload_ext_list { - display: block; - padding: 0 10px; -} - -.upload_ext_list .upload_ext_list_title { - display: block; - font-weight: bold; - font-size: 18px; - border-bottom: 1px solid #536482; - margin-bottom: 10px; -} - -.upload_ext_list .upload_ext_list_title_unavailable { - margin-top: 30px; -} - -.upload_ext_list .upload_ext_list_unavailable { - display: block; - background-color: #fff; - border-radius: 15px; - padding: 0 15px 10px 15px; - margin: 30px 0 0 0; - box-shadow: 0 0 10px #a8a8a8; - position: relative; -} - -.upload_ext_list .upload_ext_list_unavailable_wrapper { - margin: 0 0 15px 0; -} - -.upload_ext_list .upload_ext_unavailable_name { - display: inline-block; - position: relative; - top: -10px; - left: 0; - font-weight: bold; - font-size: 16px; - line-height: 20px; - color: #fff; - background-color: #c74564; - border-radius: 15px; - padding: 3px 15px; - margin: 0; - box-shadow: 0 -5px 5px -3.5px #a8a8a8; - border-top: none; - vertical-align: middle; -} - -.upload_ext_list a.upload_ext_list_unavailable:hover .upload_ext_unavailable_name { - box-shadow: 0 -5px 5px -3.5px #eea2a7; -} - -.upload_ext_list .upload_ext_list_unavailable .ext_broken_notice { - margin: 5px 0 10px 0; -} - -.upload_ext_list .upload_ext_unavailable_reason { - padding: 0 0 0 15px; -} - -.upload_ext_list .ext_version_bubble { - margin: 0; -} - -.upload_ext_list .upload_ext_list_content { - display: block; - border-radius: 15px; - position: relative; - padding: 0; - margin-bottom: 10px; - -webkit-transition: all 0.5s ease; - -moz-transition: all 0.5s ease; - -o-transition: all 0.5s ease; - transition: all 0.5s ease; -} - -.upload_ext_list a.upload_get_details_link { - display: block; - background-color: #fff; - border-radius: 15px; - text-decoration: none; - box-shadow: 0 0 10px #a8a8a8; - -webkit-transition: all 0.5s ease; - -moz-transition: all 0.5s ease; - -o-transition: all 0.5s ease; - transition: all 0.5s ease; -} - -.upload_ext_list .upload_ext_list_content a.upload_get_details_link { - padding: 0 0 0 100px; - margin: 0; -} - -.upload_ext_list a.upload_get_details_link:hover { - background-color: #fdfcd3; - box-shadow: 0 0 10px #eea2a7; -} - -.upload_ext_list .upload_ext_list_content a.upload_get_details_link span.upload_ext_list_name { - display: inline-block; - font-weight: bold; - font-size: 16px; - padding: 1px 0; - margin: 5px 5px 5px 0; -} - -#upload_main .upload_ext_list .extension_toggle_wrapper { - position: absolute; - top: 5px; - left: 5px; - z-index: 1; -} - -#upload_main .upload_ext_list .extension_remove_data_button { - position: absolute; - top: 6px; - left: 65px; - z-index: 1; -} - -#upload_main .upload_ext_list .upload_ext_list_update_success_wrapper, -#upload_main .upload_ext_list .upload_ext_list_update_error_wrapper { - display: none; - color: #fff; - margin: 0; - padding: 7px 15px; - font-size: 14px; - line-height: 16px; - box-sizing: border-box; -} - -#upload_main .upload_ext_list .upload_ext_list_update_success_wrapper i, -#upload_main .upload_ext_list .upload_ext_list_update_error_wrapper i { - margin: 1px 5px 0 0; - vertical-align: top; -} - -#upload_main .upload_ext_list .upload_ext_update_success { - background-color: #228822; - box-shadow: 0 -2px 3px #373737 inset; -} - -#upload_main .upload_ext_list .upload_ext_update_error { - background-color: #e0683f; - box-shadow: 0 -2px 3px #373737 inset; -} - -.upload_get_details_link:after { - content: ''; - clear: both; - display: block; -} - -#download_ext_list_form label { - display: inline-block; - margin-top: 15px; - font-size: 1.1em; -} - -#download_ext_list_form .select_all_content { - margin-top: 15px; -} - -#download_ext_list { - display: block; - width: 100%; - resize: none; - height: 300px; - background: none; - border: 1px #115098 dotted; -} - -/* File tree */ -#filetree { - display: none; - min-height: 480px; - border: 1px solid #CCCFD3; - background-color: #F9F9F9; - border-radius: 5px; - padding: 10px; - margin-top: 15px; -} - -.filetree_package { - margin-bottom: 15px; -} - -#filetreenames { - width: 45%; -} - -#filecontent_wrapper { - float: right; - position: relative; - box-sizing: border-box; - width: 55%; - min-height: 450px; - border: 1px solid #CCCFD3; - padding: 0 0 15px 0; - margin: 30px 0 0 0; - white-space: nowrap; - background-color:#F7F7F7; - border-radius: 15px; -} - -@media only screen and (max-width: 700px), only screen and (max-device-width: 700px) { - #filetreenames { - float: none !important; - width: auto !important; - } - - #filecontent_wrapper { - float: none !important; - width: auto !important; - min-height: 30px; - } -} - -div.filecontent { - box-sizing: border-box; - width: 100%; - height: 400px; - padding: 10px; - font-size: 11px; - overflow: auto; - text-align: left; - direction: ltr; -} - -div.filename { - display: block; - box-sizing: border-box; - width: 100%; - height: 28px; - padding: 5px 0; - overflow: hidden; - margin: 0; - text-align: center; - font-size: 12px; - font-weight: bold; - background: #a9acae; - background: -moz-linear-gradient(top, #DBDFE2 0%, #a9acae 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #DBDFE2), color-stop(100%, #a9acae)); - background: -webkit-linear-gradient(top, #DBDFE2 0%, #a9acae 100%); - background: -o-linear-gradient(top, #DBDFE2 0%, #a9acae 100%); - background: -ms-linear-gradient(top, #DBDFE2 0%, #a9acae 100%); - background: linear-gradient(to bottom, #DBDFE2 0%, #a9acae 100%); - color: #f8f9fe; - border-top-left-radius: 15px; - border-top-right-radius: 15px; -} - -.php-file-tree { - font-size: 1em; - margin: 0; -} - -.php-file-tree ul { - margin: 0; - padding: 0 0 0 15px; -} - -.php-file-tree li { - vertical-align: middle; - padding: 0; - margin-bottom: 3px; -} - -.php-file-tree li span, .php-file-tree li a { - display: inline-block; - vertical-align: top; - padding: 0; - margin: 0; -} - -.php-file-tree li.pft-file, .php-file-tree li.pft-directory span, .php-file-tree li.pft-file a { - color: #000000; - text-decoration: none; - cursor: pointer; -} - -.php-file-tree li.pft-directory span, .php-file-tree li.pft-directory a { - display: inline-block; - padding: 0 0 0 30px; - margin: 0 0 0 -30px; -} - -.php-file-tree li.pft-directory span:hover, .php-file-tree li.pft-file:hover a { - color: #115098; -} - -.php-file-tree .open { - font-style: italic; -} - -.php-file-tree .closed { - font-style: normal; -} - -.php-file-tree .pft-active { - font-style: italic; - font-weight: bold; -} - -.php-file-tree li.pft-active a { - color: #115098; -} - -.php-file-tree .pft-directory { - list-style: inside url(images/directory.png); -} -/* Default file */ -.php-file-tree li.pft-file { - list-style: inside url(images/file.png); - text-overflow: ellipsis; - white-space: nowrap; - max-width: 280px; - -webkit-transition: all 0.5s ease; - -moz-transition: all 0.5s ease; - -o-transition: all 0.5s ease; - transition: all 0.5s ease; -} - -/* Additional file types */ -.php-file-tree LI.ext-3gp { list-style-image: url(images/film.png); } -.php-file-tree LI.ext-afp { list-style-image: url(images/code.png); } -.php-file-tree LI.ext-afpa { list-style-image: url(images/code.png); } -.php-file-tree LI.ext-asp { list-style-image: url(images/code.png); } -.php-file-tree LI.ext-aspx { list-style-image: url(images/code.png); } -.php-file-tree LI.ext-avi { list-style-image: url(images/film.png); } -.php-file-tree LI.ext-bat { list-style-image: url(images/application.png); } -.php-file-tree LI.ext-bmp { list-style-image: url(images/picture.png); } -.php-file-tree LI.ext-c { list-style-image: url(images/code.png); } -.php-file-tree LI.ext-cfm { list-style-image: url(images/code.png); } -.php-file-tree LI.ext-cgi { list-style-image: url(images/code.png); } -.php-file-tree LI.ext-com { list-style-image: url(images/application.png); } -.php-file-tree LI.ext-cpp { list-style-image: url(images/code.png); } -.php-file-tree LI.ext-css { list-style-image: url(images/css.png); } -.php-file-tree LI.ext-doc { list-style-image: url(images/doc.png); } -.php-file-tree LI.ext-exe { list-style-image: url(images/application.png); } -.php-file-tree LI.ext-gif { list-style-image: url(images/picture.png); } -.php-file-tree LI.ext-fla { list-style-image: url(images/flash.png); } -.php-file-tree LI.ext-h { list-style-image: url(images/code.png); } -.php-file-tree LI.ext-htm { list-style-image: url(images/html.png); } -.php-file-tree LI.ext-html { list-style-image: url(images/html.png); } -.php-file-tree LI.ext-jar { list-style-image: url(images/java.png); } -.php-file-tree LI.ext-jpg { list-style-image: url(images/picture.png); } -.php-file-tree LI.ext-jpeg { list-style-image: url(images/picture.png); } -.php-file-tree LI.ext-js { list-style-image: url(images/script.png); } -.php-file-tree LI.ext-lasso { list-style-image: url(images/code.png); } -.php-file-tree LI.ext-log { list-style-image: url(images/txt.png); } -.php-file-tree LI.ext-m4p { list-style-image: url(images/music.png); } -.php-file-tree LI.ext-mov { list-style-image: url(images/film.png); } -.php-file-tree LI.ext-mp3 { list-style-image: url(images/music.png); } -.php-file-tree LI.ext-mp4 { list-style-image: url(images/film.png); } -.php-file-tree LI.ext-mpg { list-style-image: url(images/film.png); } -.php-file-tree LI.ext-mpeg { list-style-image: url(images/film.png); } -.php-file-tree LI.ext-ogg { list-style-image: url(images/music.png); } -.php-file-tree LI.ext-pcx { list-style-image: url(images/picture.png); } -.php-file-tree LI.ext-pdf { list-style-image: url(images/pdf.png); } -.php-file-tree LI.ext-php { list-style-image: url(images/php.png); } -.php-file-tree LI.ext-png { list-style-image: url(images/picture.png); } -.php-file-tree LI.ext-ppt { list-style-image: url(images/ppt.png); } -.php-file-tree LI.ext-psd { list-style-image: url(images/psd.png); } -.php-file-tree LI.ext-pl { list-style-image: url(images/script.png); } -.php-file-tree LI.ext-py { list-style-image: url(images/script.png); } -.php-file-tree LI.ext-rb { list-style-image: url(images/ruby.png); } -.php-file-tree LI.ext-rbx { list-style-image: url(images/ruby.png); } -.php-file-tree LI.ext-rhtml { list-style-image: url(images/ruby.png); } -.php-file-tree LI.ext-rpm { list-style-image: url(images/linux.png); } -.php-file-tree LI.ext-ruby { list-style-image: url(images/ruby.png); } -.php-file-tree LI.ext-sql { list-style-image: url(images/db.png); } -.php-file-tree LI.ext-swf { list-style-image: url(images/flash.png); } -.php-file-tree LI.ext-tif { list-style-image: url(images/picture.png); } -.php-file-tree LI.ext-tiff { list-style-image: url(images/picture.png); } -.php-file-tree LI.ext-txt { list-style-image: url(images/txt.png); } -.php-file-tree LI.ext-vb { list-style-image: url(images/code.png); } -.php-file-tree LI.ext-wav { list-style-image: url(images/music.png); } -.php-file-tree LI.ext-wmv { list-style-image: url(images/film.png); } -.php-file-tree LI.ext-xls { list-style-image: url(images/xls.png); } -.php-file-tree LI.ext-xml { list-style-image: url(images/code.png); } -.php-file-tree LI.ext-zip { list-style-image: url(images/zip.png); } - - -/* Extension details */ -.description_title { - display: block; - color: #115098; - font-weight: bold; - vertical-align: top; - margin: 0; - font-size: 1.1em; -} -.description_fieldset { - display: block; - box-sizing: border-box; - width: 100%; -} -.description_fieldset fieldset { - box-sizing: border-box; - display: inline-block; - padding: 0; - margin: 10px 0 0 0; -} -.description_fieldset h1 { - box-sizing: border-box; - display: block; - border-radius: 15px; - padding: 5px 15px; - font-size: 1.2em; -} -.description_fieldset p { - display: block; - padding: 5px 10px; - font-size: 0.9em; -} -.description_fieldset p.description_list { - padding: 10px 15px 0 15px; -} -.description_fieldset span { - box-sizing: border-box; - display: block; - font-size: 1.1em; - margin-bottom: 5px; -} -.requirements_title { - display: inline-block; - color: #115098; - font-weight: bold; - vertical-align: top; - margin-top: 8px; - font-size: 1.1em; -} -#upload_modal_box .requirements_title { - display: block; - margin: 0 0 10px 0; -} -.requirements_bubble { - display: inline-block; - overflow: hidden; - border-radius: 15px; - border: 1px solid #D7D7D7; - margin-left: 20px; -} -.requirements_name { - display: inline-block; - padding: 7px 15px; -} -.requirements_value { - display: inline-block; - padding: 6px 15px; - border-radius: 15px; - color: #edfbf7; - font-weight: bold; - font-size: 1.1em; - background: #75a875; - background: -moz-linear-gradient(top, #92d992 0%, #228822 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #92d992), color-stop(100%, #228822)); - background: -webkit-linear-gradient(top, #92d992 0%, #228822 100%); - background: -o-linear-gradient(top, #92d992 0%, #228822 100%); - background: -ms-linear-gradient(top, #92d992 0%, #228822 100%); - background: linear-gradient(to bottom, #92d992 0%, #228822 100%); -} -.requirements_value_not_met { - display: inline-block; - padding: 6px 15px; - border-radius: 15px; - color: #edfbf7; - font-weight: bold; - font-size: 1.1em; - background: #BC2A4D; - background: -moz-linear-gradient(top, #e08389 0%, #BC2A4D 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #e08389), color-stop(100%, #BC2A4D)); - background: -webkit-linear-gradient(top, #e08389 0%, #BC2A4D 100%); - background: -o-linear-gradient(top, #e08389 0%, #BC2A4D 100%); - background: -ms-linear-gradient(top, #e08389 0%, #BC2A4D 100%); - background: linear-gradient(to bottom, #e08389 0%, #BC2A4D 100%); -} -.description_bubble { - display: inline-block; - overflow: hidden; - border-radius: 15px; - border: 1px solid #D7D7D7; - margin-right: 20px; - text-align: center; -} -.description_name { - display: inline-block; - padding: 7px 15px; -} -.description_value { - display: inline-block; - padding: 6px 15px; - background: inherit; - border-left: 1px solid #D7D7D7; - font-weight: bold; - font-size: 1.1em; -} -.description_value_ok { - display: inline-block; - padding: 6px 15px; - border: 0; - border-radius: 15px; - color: #edfbf7; - font-weight: bold; - font-size: 1.1em; - background: #228822; - background: -moz-linear-gradient(top, #92d992 0%, #228822 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #92d992), color-stop(100%, #228822)); - background: -webkit-linear-gradient(top, #92d992 0%, #228822 100%); - background: -o-linear-gradient(top, #92d992 0%, #228822 100%); - background: -ms-linear-gradient(top, #92d992 0%, #228822 100%); - background: linear-gradient(to bottom, #92d992 0%, #228822 100%); -} -.requirements_value:before, .description_value_ok:before { - display: inline-block; - font-family: "FontAwesome"; - content: "\f058"; - margin-right: 5px; -} -.description_value_old { - display: inline-block; - padding: 6px 15px; - border: 0; - border-radius: 15px; - color: #edfbf7; - font-weight: bold; - font-size: 1.1em; - background: #BC2A4D; - background: -moz-linear-gradient(top, #e08389 0%, #BC2A4D 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #e08389), color-stop(100%, #BC2A4D)); - background: -webkit-linear-gradient(top, #e08389 0%, #BC2A4D 100%); - background: -o-linear-gradient(top, #e08389 0%, #BC2A4D 100%); - background: -ms-linear-gradient(top, #e08389 0%, #BC2A4D 100%); - background: linear-gradient(to bottom, #e08389 0%, #BC2A4D 100%); -} -.requirements_value_not_met:before, .description_value_old:before { - display: inline-block; - font-family: "FontAwesome"; - content: "\f057"; - margin-right: 5px; -} - -fieldset { - border-radius: 15px; -} - -h1.ExtensionName { - display: inline-block; - margin: 5px 5px 5px 15px; - color: #115098; - line-height: 31px; - vertical-align: middle; -} - -#upload_modal_box h1.ExtensionName { - vertical-align: top; -} - -#upload_main .extension_toggle_wrapper { - display: inline-block; - position: relative; - background-color: #35a035; - border: 1px solid #115098; - border-radius: 15px; - width: 55px; - height: 20px; - line-height: 24px; - margin-left: 5px; - vertical-align: middle; - box-shadow: 0 1px 2px #373737 inset; - cursor: pointer; - -webkit-transition: all 0.5s ease; - -moz-transition: all 0.5s ease; - -o-transition: all 0.5s ease; - transition: all 0.5s ease; -} - -#upload_main .extension_toggle_enabled { - background-color: #35a035; -} - -#upload_main .extension_toggle_disabled { - background-color: #c74564; -} - -#upload_main .extension_toggle { - display: block; - position: absolute; - top: 0; - border-radius: inherit; - background-color: #fff; - width: 22px; - height: 20px; - -webkit-transition: all 0.3s ease; - -moz-transition: all 0.3s ease; - -o-transition: all 0.3s ease; - transition: all 0.3s ease; -} - -#upload_main .extension_toggle_wrapper:hover .extension_toggle { - background-color: #fdfcd3; -} - -#upload_main .extension_toggle_wrapper.locked_toggle .extension_toggle { - background-color: #a8a8a8; -} - -#upload_main .ext_not_available .extension_toggle_disabled, -#upload_main .ext_not_available .extension_toggle_purged { - display: none; -} - -#upload_main .extension_toggle_enabled .extension_toggle { - left: 33px; -} - -#upload_main .extension_toggle_disabled .extension_toggle { - left: 0; -} - -#upload_main .extension_toggle i { - display: block; - color: #115098; - padding: 3px 0 0 5px; - font-size: 14px; -} - -#upload_main .locked_toggle .extension_toggle i { - color: #fff; -} - -#upload_main .extension_remove_data_button { - display: inline-block; - border-radius: 1em; - background-color: #BC2A4D; - box-shadow: 0 1px 2px #fff inset; - width: 22px; - height: 20px; - cursor: pointer; - margin-left: 5px; -} - -#upload_main .extension_remove_data_button:hover { - background-color: #e0683f; -} - -#upload_main .locked_toggle ~ .extension_remove_data_button { - background-color: #a8a8a8; -} - -#upload_main .extension_toggle_enabled ~ .extension_remove_data_button, -#upload_main .extension_toggle_purged ~ .extension_remove_data_button { - display: none; -} - -#upload_main .extension_remove_data_button i { - display: block; - color: #fff; - padding: 3px 0 0 5.5px; - font-size: 14px; -} - -#ext_purge_confirm, -#ext_force_unstable_confirm { - display: none; - text-align: center; -} - -#ext_purge_text .loading_spinner, -#ext_force_unstable_text .loading_spinner { - display: block; - color: #536482; - padding: 30px 50px; - width: 100%; - box-sizing: border-box; - text-align: center; -} - -#ext_purge_confirm .ext_update_ok, #ext_purge_confirm .ext_update_cancel, -#ext_force_unstable_confirm .ext_update_ok, #ext_force_unstable_confirm .ext_update_cancel { - -webkit-transition: all 0.3s ease; - -moz-transition: all 0.3s ease; - -o-transition: all 0.3s ease; - transition: all 0.3s ease; -} - -#ext_purge_confirm .ext_update_ok, -#ext_force_unstable_confirm .ext_update_ok { - display: inline-block; - border-radius: 5px; - color: #fff; - font-weight: bold; - padding: 5px 15px; - margin-top: 10px; - margin-right: 25px; - background-color: #5dcc45; - box-shadow: 0 -2px 3px #228822 inset; - cursor: pointer; -} - -#ext_purge_confirm .ext_update_cancel, -#ext_force_unstable_confirm .ext_update_cancel { - display: inline-block; - border-radius: 5px; - color: #fff; - font-weight: bold; - padding: 5px 15px; - margin-top: 10px; - background-color: #ab320e; - box-shadow: 0 -2px 3px #BC2A4D inset; - cursor: pointer; -} - -#ext_purge_confirm .ext_update_ok:hover, -#ext_purge_confirm .ext_update_cancel:hover, -#ext_force_unstable_confirm .ext_update_ok:hover, -#ext_force_unstable_confirm .ext_update_cancel:hover { - background-color: #2a70bf; - box-shadow: 0 -2px 3px #115098 inset; -} - -.ext_details_container { - position: relative; - width: 100%; -} - -.ext_details_tabs { - display: block; - width: 100%; - font-family: Arial, Helvetica, sans-serif; - line-height: normal; - padding: 5px 15px 0 15px; - position: relative; - box-sizing: border-box; - z-index: 2; -} - -.ext_details_container:before, -.ext_details_tabs:after, -.ext_details_tabs > ul:after, -.ext_details_tabs li:after { - content: ''; - height: 0; - clear: both; - display: block; -} - -.ext_details_tabs::after { - content: ''; - clear: both; - display: block; -} - -.ext_details_tabs > ul { - list-style: none; - margin: 0; - padding: 0; -} - -.ext_details_tabs .tab { - display: inline-block; - float: left; - font-size: 0.95em; - font-weight: bold; -} - -.ext_details_tabs .tab > a { - background: #fefeef; - background: -moz-linear-gradient(top, #fefed5 0%, #fefeef 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fefed5), color-stop(100%, #fefeef)); - background: -webkit-linear-gradient(top, #fefed5 0%, #fefeef 100%); - background: -o-linear-gradient(top, #fefed5 0%, #fefeef 100%); - background: -ms-linear-gradient(top, #fefed5 0%, #fefeef 100%); - background: linear-gradient(to bottom, #fefed5 0%, #fefeef 100%); - border: 1px solid #d7d7d7; - border-bottom-width: 0; - border-radius: 5px 5px 0 0; - color: #706e25; - display: block; - font-weight: bold; - line-height: 15px; - margin: 1px 1px 2px 0; - padding: 6px 9px 4px; - position: relative; - text-decoration: none; - text-transform: uppercase; - white-space: nowrap; - cursor: pointer; -} - -.ext_details_tabs .tab > a:hover { - background: #fefeef; - background: -moz-linear-gradient(top, #ffffef 0%, #fefeef 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffef), color-stop(100%, #fefeef)); - background: -webkit-linear-gradient(top, #ffffef 0%, #fefeef 100%); - background: -o-linear-gradient(top, #ffffef 0%, #fefeef 100%); - background: -ms-linear-gradient(top, #ffffef 0%, #fefeef 100%); - background: linear-gradient(to bottom, #ffffef 0%, #fefeef 100%); - border-color: #ccc; - box-shadow: 0 1px 1px #FFF inset; - color: #BC2A4D; -} - -.ext_details_tabs .activetab > a, -.ext_details_tabs .activetab > a:hover { - background: #fefeef; - background: -moz-linear-gradient(top, #ffffef 0%, #fefeef 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffef), color-stop(100%, #fefeef)); - background: -webkit-linear-gradient(top, #ffffef 0%, #fefeef 100%); - background: -o-linear-gradient(top, #ffffef 0%, #fefeef 100%); - background: -ms-linear-gradient(top, #ffffef 0%, #fefeef 100%); - background: linear-gradient(to bottom, #ffffef 0%, #fefeef 100%); - border-color: #ccc; - border-bottom: 2px solid #fefeef; - box-shadow: 0 1px 1px #FFF inset; - color: #115098; - margin: 0 1px 0 0; - padding: 7px 10px 4px; -} - -.ext_details_tabs .activetab > a:hover { - color: #23649F; -} - -.ext_details_block { - display: block; - border: 1px solid #D7D7D7; - border-radius: 15px; - position: relative; - top: -2px; - margin: 0; - padding: 10px; - width: 100%; - box-sizing: border-box; - background-color: #fefeef; -} - -.ext_details_block::after { - content: ''; - clear: both; - display: block; -} - -.ext_details_markdown { - display: none; - border: 1px solid #D7D7D7; - border-radius: 15px; - position: relative; - font-size: 1em; - margin: 0; - padding: 15px 20px; - background-color: #fff; -} - -#ext_details_faq { - display: none; -} - -#ext_details_faq h1 { - margin: 10px 0 0 15px; -} - -.upload_ext_faq_title { - display: block; - margin: 20px -10px 10px -10px; - color: #fff; - padding: 10px 0 10px 25px; - font-size: 18px; - font-weight: bold; - background: #888; -} - -.upload_ext_faq { - display: block; - position: relative; - box-sizing: border-box; - margin: 20px 0; - width: 100%; - padding: 0 15px; -} - -.upload_ext_faq_question { - display: block; - position: relative; - border-radius: 15px; - color: #fff; - padding: 10px 15px; - font-size: 16px; - font-weight: bold; - background: #888; - margin: 0 -15px; - z-index: 1; - box-shadow: 0 0 5px #888; -} - -.upload_ext_faq_answer { - display: block; - box-sizing: border-box; - border-bottom-left-radius: 15px; - border-bottom-right-radius: 15px; - color: #536482; - padding: 10px 15px; - font-size: 1em; - background: #e7f3ff; - width: 100%; - box-shadow: 0 0 10px -5px #115098 inset; -} - -#upload_ext_faq_item_1 .upload_ext_faq_title {background: #a3791a;} -#upload_ext_faq_item_1 .upload_ext_faq_question {background: #c4911a; box-shadow: 0 0 5px #c4911a;} -#upload_ext_faq_item_2 .upload_ext_faq_title {background: #0ea349;} -#upload_ext_faq_item_2 .upload_ext_faq_question {background: #16a142; box-shadow: 0 0 5px #16a142;} -#upload_ext_faq_item_3 .upload_ext_faq_title {background: #a0a331;} -#upload_ext_faq_item_3 .upload_ext_faq_question {background: #b4b91a; box-shadow: 0 0 5px #b4b91a;} -#upload_ext_faq_item_4 .upload_ext_faq_title {background: #a31f48;} -#upload_ext_faq_item_4 .upload_ext_faq_question {background: #c04965; box-shadow: 0 0 5px #c04965;} -#upload_ext_faq_item_5 .upload_ext_faq_title {background: #12668b;} -#upload_ext_faq_item_5 .upload_ext_faq_question {background: #1385af; box-shadow: 0 0 5px #1385af;} -#upload_ext_faq_item_6 .upload_ext_faq_title {background: #8b1116;} -#upload_ext_faq_item_6 .upload_ext_faq_question {background: #ae4649; box-shadow: 0 0 5px #ae4649;} -#upload_ext_faq_item_7 .upload_ext_faq_title {background: #114080;} -#upload_ext_faq_item_7 .upload_ext_faq_question {background: #367ab2; box-shadow: 0 0 5px #367ab2;} - -.upload_ext_faq_question.grey_question { - background: #888 !important; - box-shadow: 0 0 5px #888 !important; -} - -.upload_ext_faq ul, .upload_ext_faq ol { - margin: 5px 0 0 15px; - padding: 0; -} - -#ext_languages { - display: none; -} - -.ext_languages_title { - margin-bottom: 15px; -} - -.ext_language_row { - display: block; - background-color: #fff; - border: 1px solid #D7D7D7; - border-radius: 15px; - margin-bottom: 10px; -} - -.ext_language_row::after { - content: ''; - clear: both; - display: block; -} - -.ext_language_name { - display: inline-block; - color: #115098; - font-weight: bold; - border-right: 1px solid #D7D7D7; - padding: 5px 15px; -} - -.ext_language_actions { - display: inline-block; - float: right; -} - -a.ext_language_edit { - display: inline-block; - border: 1px solid #D7D7D7; - border-radius: 15px; - padding: 5px 15px; - font-weight: bold; - text-decoration: none; - -webkit-transition: all 0.3s ease; - -moz-transition: all 0.3s ease; - -o-transition: all 0.3s ease; - transition: all 0.3s ease; -} - -.ext_language_edit:hover { - background-color: #115098; - color: #fff; -} - -.ext_check_box { - display: inline-block; - margin: 6px 10px 0 10px; -} - -.ext_mark_check { - display: inline-block; - margin: 0 10px; -} - -.ext_language_delete { - display: inline-block; - border: 1px solid #D7D7D7; - border-radius: 15px; - padding: 5px 15px; - font-weight: bold; - text-decoration: none; - color: #c74564; - background: none; - cursor: pointer; - -webkit-transition: all 0.3s ease; - -moz-transition: all 0.3s ease; - -o-transition: all 0.3s ease; - transition: all 0.3s ease; -} - -.ext_language_delete:hover { - background-color: #c74564; - color: #fff; -} - -.ext_details_block #filetree { - display: none; - position: relative; - width: 100%; - margin: 0; - background-color: #fff; - min-height: 500px; /* We include padding here */ - box-sizing: border-box; -} - -.ext_details_block #filetreenames { - display: inline-block; -} - -.ext_details_block #filecontent_wrapper { - background-color: #fff; -} - -#ext_details_tools { - display: none; -} - -.big_bubble .description_name, -.big_bubble .description_value, -.small_bubble .description_name, -.small_bubble .description_value { - width: auto; -} -.qtip { - max-width: none; -} -.qtip-modal { - max-width: 300px; -} -.qtip div { - font-size: 14px; - line-height: 16px; -} -.qtip-modal .qtip-content { - font-size: 12px; -} -.ext_version_bubble { - float: right; - position: relative; - margin: 5px 15px 5px 0; - background-color: #fff; -} -.ext_version_bubble .description_value { - position: relative; - z-index: 1; -} -.ext_version_bubble .show_ext_updates { - display: none; - border-top-right-radius: 15px; - border-bottom-right-radius: 15px; - padding: 7px 10px 8px 25px; - margin: 0 0 0 -20px; - font-size: 1.2em; - color: #115098; - cursor: pointer; -} -.ext_version_bubble .show_ext_updates:hover { - background-color: #fdfcd3; -} -#extension_details_name_wrapper::after, .ext_version_bubble::after { - content: ''; - clear: both; - display: block; -} -#description_updates { - display: none; -} -#description_updates .extension_update_link { - display: block; - margin: 5px -9px; - padding: 10px 9px 10px 0; - color: #fff; - background-color: #115098; - font-weight: bold; - text-decoration: none; - cursor: pointer; - -webkit-transition: all 0.3s ease; - -moz-transition: all 0.3s ease; - -o-transition: all 0.3s ease; - transition: all 0.3s ease; -} -#description_updates .extension_update_link i { - margin: 0 5px 0 9px; -} -#description_updates .extension_update_link:hover { - color: #fff; - background-color: #2a70bf; -} -#description_updates .extension_announcement_link { - display: block; - margin: 0 -9px; - padding: 10px 9px 10px 0; - text-decoration: none; - cursor: pointer; - -webkit-transition: all 0.3s ease; - -moz-transition: all 0.3s ease; - -o-transition: all 0.3s ease; - transition: all 0.3s ease; -} -#description_updates .extension_announcement_link i { - margin: 0 5px 0 9px; -} -#description_updates .extension_announcement_link:hover { - color: #fff; - background-color: #2a70bf; -} -.description_updates_latest_version { - display: inline-block; - font-size: 1em; - font-weight: bold; - color: #115098; - margin: 5px 5px 5px 0; -} -.description_updates_extension_latest_version { - display: inline-block; - font-size: 1.05em; - font-weight: bold; - color: #536482; - margin: 5px 0; -} -#update_ext_confirm, #update_ext_confirm_title { - display: none; -} -#update_confirm_address, #update_get_confirm_address { - border: 0; - background: 0; - padding: 0; - margin: 0; - font-family: "Courier New", Courier, monospace; - width: 100%; - resize: none; - height: auto; -} -#ext_versioncheck_error_box, -#ext_versioncheck_error_box .ext_versioncheck_error_box_title, -#ext_versioncheck_error_box .ext_versioncheck_error_box_link { - display: none; -} -.extension_author { - display: inline-block; - overflow: hidden; - border-radius: 15px; - margin-left: 25px; - text-align: center; - font-size: 1.1em; -} -.extension_author_name { - display: inline-block; - padding: 5px 15px; -} -#upload_main .extension_author_link { - display: inline-block; - padding: 6px 15px; - border-radius: 15px; - font-weight: bold; - font-size: 1.1em; - border: 1px solid #D7D7D7; - text-decoration: none; -} -#upload_main .extension_author_link:hover { - background-color: #115098; - color: #edfbf7; - border: 1px solid #115098; -} -#upload_main .extension_author_link span { - font-size: 0.9em; - margin-left: 10px; -} -#ext_details_content .description_fieldset .ext_description_column1 { - width: 48%; -} -#ext_details_content .description_fieldset .ext_description_column2 { - width: 48%; - float: right; -} -.updater_link_source { - display: block; - margin: 10px 11px 0 11px; -} -.updater_link_explain { - display: block; - margin: 0 11px 5px 11px; -} -#ext_details_content a.extension_announcement_link { - display: inline-block; - padding: 6px 15px; - border-radius: 15px; - font-weight: bold; - font-size: 1.1em; - border: 1px solid #D7D7D7; - text-decoration: none; - -webkit-transition: all 0.3s ease; - -moz-transition: all 0.3s ease; - -o-transition: all 0.3s ease; - transition: all 0.3s ease; -} -#ext_details_content .extension_announcement_link:hover { - background-color: #115098; - color: #edfbf7; - border: 1px solid #115098; -} -#ext_details_content .extension_announcement_link span { - font-size: 0.9em; - margin-left: 10px; -} -.upload_update_form { - display: inline-block; -} -#ext_details_content .extension_get_update_link, -#upload_refresh_notice .page_refresh_link { - display: inline-block; - border: 0; - font-size: 1.1em; - border-radius: 15px; - padding: 6px 15px 6px 0; - color: #fff; - background-color: #115098; - font-weight: bold; - text-decoration: none; - cursor: pointer; - -webkit-transition: all 0.3s ease; - -moz-transition: all 0.3s ease; - -o-transition: all 0.3s ease; - transition: all 0.3s ease; -} -#ext_details_content .extension_get_update_link i, -#upload_refresh_notice .page_refresh_link i { - margin: 0 5px 0 15px; -} -#ext_details_content .extension_get_update_link:hover, -#upload_refresh_notice .page_refresh_link:hover { - color: #fff; - background-color: #2a70bf; -} -.description_update_form form { - display: block; - padding: 0 20px; -} -.description_update_form .description_update_form_explain { - display: block; - padding: 5px 0; - font-size: 0.9em; -} -.extension_latest_version_wrapper { - display: inline-block; - border-radius: 15px; - margin-left: 5px; - text-align: center; - font-size: 1.1em; -} -.extension_latest_version_title { - display: inline-block; - color: #115098; - font-weight: bold; - vertical-align: top; - margin-top: 8px; - margin-bottom: 8px; - font-size: 1.1em; -} -.extension_latest_version { - display: inline-block; - padding: 8px 15px; -} diff --git a/adm/style/css/upload.rtl.css b/adm/style/css/upload.rtl.css deleted file mode 100644 index 2fa3270..0000000 --- a/adm/style/css/upload.rtl.css +++ /dev/null @@ -1,289 +0,0 @@ -/* RTL adjustments by LavIgor for Upload Extensions */ -.rtl .ext_upload_wrapper { - padding: 0 80px 0 0; -} -.rtl .upload_ext_upload_button { - float: left; - left: -10px; - right: auto; - border-top-left-radius: 0; - border-top-right-radius: 10px; - box-shadow: 1px -1px 1px 1px #78cef7; -} -/*.rtl #ext_language_code, .rtl #ext_checksum { - margin-right: 0; - margin-left: 10px; -}*/ -.rtl .upload_ext_save_zip label { - margin-left: 0; - margin-right: 5px; -} -.rtl .upload-menu { - left: auto; - right: 0; -} -.rtl .upload_main_link i.fa { - float: right; -} -.rtl .upload_main_link span { - float: right; - margin: 0 50px 0 -1000px; -} -.rtl .upload-menu:hover .upload_main_link span { - margin: 0 8px 0 0; -} -.rtl #upload_load_main { - padding-left: 0; - padding-right: 5px; -} -.rtl #upload_load_main:hover { - margin: 0 15px 0 5px; - padding: 5px 10px; -} -.rtl .ext_reload_link { - float: left; - margin: 0 15px 0 5px; -} -.rtl #uploaded_ok { - margin-right: 0; - margin-left: 15px; -} -.rtl .upload_ext_update_button, .rtl .upload_ext_error_show { - float: left; -} -.rtl .ext_error_notice i, .rtl .ext_solution_notice i { - margin-right: 0; - margin-left: 5px; -} -.rtl #upload_extensions_title_links { - padding: 0 20px 0 0; - margin: 0 -100px 0 0; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-top-left-radius: 15px; - border-bottom-left-radius: 15px; -} -.rtl #upload_extensions_title_block:hover #upload_extensions_title_links { - margin-left: 0; - margin-right: -15px; -} -.rtl #upload_extensions_links_show_slider { - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-top-left-radius: 15px; - border-bottom-left-radius: 15px; -} -.rtl .upload_loading_element { - -moz-transform: rotateY(-15deg); - -ms-transform: rotateZ(-15deg); - -o-transform: rotateY(-15deg); - -webkit-transform: rotateY(-15deg); - transform: rotateZ(-15deg); -} -.rtl #upload_loading_text { - left: auto; - right: 15px; -} -.rtl #upload_loading_status { - right: auto; - left: 15px; -} -.rtl #upload_modal_box .alert_close { - float: left; - margin-right: 0; - margin-left: -35px; -} -.rtl #upload_refresh_notice .upload_refresh_notice_close { - float: left; -} -.rtl .select_all_code { - right: auto; - left: 15px; -} -.rtl .select_all_content { - float: left; -} -.rtl .upload_main_page_link_block i.fa { - margin-right: 0; - margin-left: 10px; -} -.rtl .upload_valid_ext_row { - padding: 0 100px 0 0; -} -.rtl .upload_valid_ext_row a.upload_valid_ext_download_link { - left: auto; - right: 0; -} -.rtl .upload_valid_ext_row a.upload_valid_ext_announcement_link { - left: auto; - right: 50px; -} -.rtl .upload_valid_ext_row span.upload_valid_ext_name { - margin: 5px 0 5px 5px; -} -.rtl .upload_valid_ext_row .ext_version_bubble { - margin: 0; -} -.rtl .upload_ext_list .upload_ext_unavailable_name { - left: auto; - right: 0; -} -.rtl .upload_ext_list .upload_ext_unavailable_reason { - padding: 0 15px 0 0; -} -.rtl .upload_ext_list .ext_version_bubble { - margin: 0; -} -.rtl .upload_ext_list .upload_ext_list_content a.upload_get_details_link { - padding: 0 100px 0 0; -} -.rtl .upload_ext_list .upload_ext_list_content a.upload_get_details_link span.upload_ext_list_name { - margin: 5px 0 5px 5px; -} -.rtl #upload_main .upload_ext_list .extension_toggle_wrapper { - left: auto; - right: 5px; -} -.rtl #upload_main .upload_ext_list .extension_remove_data_button { - left: auto; - right: 65px; -} -.rtl #upload_main .upload_ext_list .upload_ext_list_update_success_wrapper i, -.rtl #upload_main .upload_ext_list .upload_ext_list_update_error_wrapper i { - margin: 1px 0 0 5px; -} -.rtl #filecontent_wrapper { - float: left; -} -.rtl .php-file-tree ul { - padding: 0 15px 0 0; -} -.rtl .php-file-tree li { - direction: rtl; -} -.rtl .php-file-tree li.pft-directory span, .rtl .php-file-tree li.pft-directory a { - padding: 0 30px 0 0; - margin: 0 -30px 0 0; -} -.rtl .requirements_bubble { - margin-left: 0; - margin-right: 20px; -} -.rtl .requirements_value { - direction: ltr; -} -.rtl .description_bubble { - margin-right: 0; - margin-left: 20px; -} -.rtl .description_value { - direction: ltr; - border-left: none; - border-right: 1px solid #D7D7D7; -} -.rtl .requirements_value:before, .description_value_ok:before, -.rtl .requirements_value_not_met:before, .description_value_old:before { - margin-right: 0; - margin-left: 5px; -} -.rtl h1.ExtensionName { - margin: 5px 15px 5px 5px; -} -.rtl #upload_main .extension_toggle_wrapper { - margin-left: 0; - margin-right: 5px; -} -.rtl #upload_main .extension_toggle_disabled .extension_toggle { - left: 33px; -} -.rtl #upload_main .extension_toggle_enabled .extension_toggle { - left: 0; -} -.rtl #upload_main .extension_toggle i { - padding: 3px 5px 0 0; -} -.rtl #upload_main .extension_remove_data_button { - margin-left: 0; - margin-right: 5px; -} -.rtl #upload_main .extension_remove_data_button i { - padding: 3px 5.5px 0 0; -} -.rtl #ext_purge_confirm .ext_update_ok, -.rtl #ext_force_unstable_confirm .ext_update_ok { - margin-right: 0; - margin-left: 25px; -} -.rtl .ext_details_tabs .tab { - float: right; -} -.rtl .ext_details_tabs .tab > a { - margin: 1px 0 2px 1px; -} -.rtl .ext_details_tabs .activetab > a, -.rtl .ext_details_tabs .activetab > a:hover { - margin: 0 0 0 1px; -} -.rtl #ext_details_faq h1 { - margin: 10px 15px 0 0; -} -.rtl .upload_ext_faq_title { - padding: 10px 25px 10px 0; -} -.rtl .upload_ext_faq ul, .upload_ext_faq ol { - margin: 5px 15px 0 0; -} -.rtl .ext_language_actions { - float: left; -} -.rtl .ext_version_bubble { - float: left; - margin: 5px 0 5px 15px; -} -.rtl .ext_version_bubble .show_ext_updates { - border-top-left-radius: 15px; - border-bottom-left-radius: 15px; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - padding: 7px 25px 8px 10px; - margin: 0 -20px 0 0; -} -.rtl #description_updates .extension_update_link, -.rtl #description_updates .extension_announcement_link { - padding: 10px 0 10px 9px; -} -.rtl #description_updates .extension_update_link i, -.rtl #description_updates .extension_announcement_link i { - margin: 0 9px 0 5px; -} -.rtl .description_updates_latest_version { - margin: 5px 0 5px 5px; -} -.rtl .extension_author { - margin-left: 0; - margin-right: 25px; -} -.rtl #upload_main .extension_author_link span { - margin-left: 0; - margin-right: 10px; -} -.rtl #ext_details_content .description_fieldset .ext_description_column2 { - float: left; -} -.rtl #ext_details_content .extension_announcement_link span { - margin-left: 0; - margin-right: 10px; -} -.rtl #ext_details_content .extension_get_update_link, -.rtl #upload_refresh_notice .page_refresh_link { - padding: 6px 0 6px 15px; -} -.rtl #ext_details_content .extension_get_update_link i, -.rtl #upload_refresh_notice .page_refresh_link i { - margin: 0 15px 0 5px; -} -.rtl .extension_latest_version_wrapper { - margin-left: 0; - margin-right: 5px; -} -.rtl .qtip{direction:rtl}.rtl .qtip-content{text-align:right}.rtl .qtip-titlebar{padding:5px 10px 5px 35px}.rtl .qtip-close{left:-9px}.rtl .qtip-titlebar .qtip-close{left:4px}.rtl .qtip-icon .ui-icon,.qtip-titlebar .ui-icon{direction:rtl}.rtl .qtip-cream .qtip-close .qtip-icon{background-position:-82px 0}.rtl .qtip-red .qtip-close .qtip-icon{background-position:-102px 0}.rtl .qtip-green .qtip-close .qtip-icon{background-position:-42px 0}.rtl .qtip-blue .qtip-close .qtip-icon{background-position:-2px 0}.rtl .qtip-tipsy .qtip-titlebar{padding:6px 10px 0 35px}.rtl .qtip-bootstrap .qtip-titlebar .qtip-close{right:auto;left:11px}.rtl .qtip-bootstrap .qtip-icon .ui-icon{float:left}.rtl .qtip .qtip-tip canvas{left:auto;right:0} \ No newline at end of file diff --git a/adm/style/js/jquery.form.min.js b/adm/style/js/jquery.form.min.js deleted file mode 100644 index 0684ed7..0000000 --- a/adm/style/js/jquery.form.min.js +++ /dev/null @@ -1,22 +0,0 @@ -/*! - * jQuery Form Plugin - * version: 4.2.2 - * Requires jQuery v1.7.2 or later - * Project repository: https://github.com/jquery-form/form - - * Copyright 2017 Kevin Morris - * Copyright 2006 M. Alsup - - * Dual licensed under the LGPL-2.1+ or MIT licenses - * https://github.com/jquery-form/form#license - - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ -!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,r){return void 0===r&&(r="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(r),r}:e(jQuery)}(function(e){"use strict";function t(t){var r=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(t.target).closest("form").ajaxSubmit(r))}function r(t){var r=t.target,a=e(r);if(!a.is("[type=submit],[type=image]")){var n=a.closest("[type=submit]");if(0===n.length)return;r=n[0]}var i=r.form;if(i.clk=r,"image"===r.type)if(void 0!==t.offsetX)i.clk_x=t.offsetX,i.clk_y=t.offsetY;else if("function"==typeof e.fn.offset){var o=a.offset();i.clk_x=t.pageX-o.left,i.clk_y=t.pageY-o.top}else i.clk_x=t.pageX-r.offsetLeft,i.clk_y=t.pageY-r.offsetTop;setTimeout(function(){i.clk=i.clk_x=i.clk_y=null},100)}function a(){if(e.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}var n=/\r?\n/g,i={};i.fileapi=void 0!==e('').get(0).files,i.formdata=void 0!==window.FormData;var o=!!e.fn.prop;e.fn.attr2=function(){if(!o)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t,r,n,s){function u(r){var a,n,i=e.param(r,t.traditional).split("&"),o=i.length,s=[];for(a=0;a',k).val(f.extraData[c].value).appendTo(w)[0]):u.push(e('',k).val(f.extraData[c]).appendTo(w)[0]));f.iframeTarget||h.appendTo(D),v.attachEvent?v.attachEvent("onload",s):v.addEventListener("load",s,!1),setTimeout(t,15);try{w.submit()}catch(e){document.createElement("form").submit.apply(w)}}finally{w.setAttribute("action",i),w.setAttribute("enctype",o),r?w.setAttribute("target",r):p.removeAttr("target"),e(u).remove()}}function s(t){if(!x.aborted&&!X){if((O=n(v))||(a("cannot access response document"),t=L),t===A&&x)return x.abort("timeout"),void S.reject(x,"timeout");if(t===L&&x)return x.abort("server abort"),void S.reject(x,"error","server abort");if(O&&O.location.href!==f.iframeSrc||T){v.detachEvent?v.detachEvent("onload",s):v.removeEventListener("load",s,!1);var r,i="success";try{if(T)throw"timeout";var o="xml"===f.dataType||O.XMLDocument||e.isXMLDoc(O);if(a("isXml="+o),!o&&window.opera&&(null===O.body||!O.body.innerHTML)&&--C)return a("requeing onLoad callback, DOM not available"),void setTimeout(s,250);var u=O.body?O.body:O.documentElement;x.responseText=u?u.innerHTML:null,x.responseXML=O.XMLDocument?O.XMLDocument:O,o&&(f.dataType="xml"),x.getResponseHeader=function(e){return{"content-type":f.dataType}[e.toLowerCase()]},u&&(x.status=Number(u.getAttribute("status"))||x.status,x.statusText=u.getAttribute("statusText")||x.statusText);var c=(f.dataType||"").toLowerCase(),l=/(json|script|text)/.test(c);if(l||f.textarea){var p=O.getElementsByTagName("textarea")[0];if(p)x.responseText=p.value,x.status=Number(p.getAttribute("status"))||x.status,x.statusText=p.getAttribute("statusText")||x.statusText;else if(l){var m=O.getElementsByTagName("pre")[0],g=O.getElementsByTagName("body")[0];m?x.responseText=m.textContent?m.textContent:m.innerText:g&&(x.responseText=g.textContent?g.textContent:g.innerText)}}else"xml"===c&&!x.responseXML&&x.responseText&&(x.responseXML=q(x.responseText));try{M=N(x,c,f)}catch(e){i="parsererror",x.error=r=e||i}}catch(e){a("error caught: ",e),i="error",x.error=r=e||i}x.aborted&&(a("upload aborted"),i=null),x.status&&(i=x.status>=200&&x.status<300||304===x.status?"success":"error"),"success"===i?(f.success&&f.success.call(f.context,M,"success",x),S.resolve(x.responseText,"success",x),d&&e.event.trigger("ajaxSuccess",[x,f])):i&&(void 0===r&&(r=x.statusText),f.error&&f.error.call(f.context,x,i,r),S.reject(x,"error",r),d&&e.event.trigger("ajaxError",[x,f,r])),d&&e.event.trigger("ajaxComplete",[x,f]),d&&!--e.active&&e.event.trigger("ajaxStop"),f.complete&&f.complete.call(f.context,x,i),X=!0,f.timeout&&clearTimeout(j),setTimeout(function(){f.iframeTarget?h.attr("src",f.iframeSrc):h.remove(),x.responseXML=null},100)}}}var u,c,f,d,m,h,v,x,y,b,T,j,w=p[0],S=e.Deferred();if(S.abort=function(e){x.abort(e)},r)for(c=0;c',k)).css({position:"absolute",top:"-1000px",left:"-1000px"}),v=h[0],x={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var r="timeout"===t?"timeout":"aborted";a("aborting upload... "+r),this.aborted=1;try{v.contentWindow.document.execCommand&&v.contentWindow.document.execCommand("Stop")}catch(e){}h.attr("src",f.iframeSrc),x.error=r,f.error&&f.error.call(f.context,x,r,t),d&&e.event.trigger("ajaxError",[x,f,r]),f.complete&&f.complete.call(f.context,x,r)}},(d=f.global)&&0==e.active++&&e.event.trigger("ajaxStart"),d&&e.event.trigger("ajaxSend",[x,f]),f.beforeSend&&!1===f.beforeSend.call(f.context,x,f))return f.global&&e.active--,S.reject(),S;if(x.aborted)return S.reject(),S;(y=w.clk)&&(b=y.name)&&!y.disabled&&(f.extraData=f.extraData||{},f.extraData[b]=y.value,"image"===y.type&&(f.extraData[b+".x"]=w.clk_x,f.extraData[b+".y"]=w.clk_y));var A=1,L=2,F=e("meta[name=csrf-token]").attr("content"),E=e("meta[name=csrf-param]").attr("content");E&&F&&(f.extraData=f.extraData||{},f.extraData[E]=F),f.forceSync?i():setTimeout(i,10);var M,O,X,C=50,q=e.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!==t.documentElement.nodeName?t:null},_=e.parseJSON||function(e){return window.eval("("+e+")")},N=function(t,r,a){var n=t.getResponseHeader("content-type")||"",i=("xml"===r||!r)&&n.indexOf("xml")>=0,o=i?t.responseXML:t.responseText;return i&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),a&&a.dataFilter&&(o=a.dataFilter(o,r)),"string"==typeof o&&(("json"===r||!r)&&n.indexOf("json")>=0?o=_(o):("script"===r||!r)&&n.indexOf("javascript")>=0&&e.globalEval(o)),o};return S}if(!this.length)return a("ajaxSubmit: skipping submit process - no element selected"),this;var l,f,d,p=this;"function"==typeof t?t={success:t}:"string"==typeof t||!1===t&&arguments.length>0?(t={url:t,data:r,dataType:n},"function"==typeof s&&(t.success=s)):void 0===t&&(t={}),l=t.method||t.type||this.attr2("method"),(d=(d="string"==typeof(f=t.url||this.attr2("action"))?e.trim(f):"")||window.location.href||"")&&(d=(d.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:d,success:e.ajaxSettings.success,type:l||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var m={};if(this.trigger("form-pre-serialize",[this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&!1===t.beforeSerialize(this,t))return a("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var h=t.traditional;void 0===h&&(h=e.ajaxSettings.traditional);var v,g=[],x=this.formToArray(t.semantic,g,t.filtering);if(t.data){var y=e.isFunction(t.data)?t.data(x):t.data;t.extraData=y,v=e.param(y,h)}if(t.beforeSubmit&&!1===t.beforeSubmit(x,this,t))return a("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[x,this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var b=e.param(x,h);v&&(b=b?b+"&"+v:v),"GET"===t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+b,t.data=null):t.data=b;var T=[];if(t.resetForm&&T.push(function(){p.resetForm()}),t.clearForm&&T.push(function(){p.clearForm(t.includeHidden)}),!t.dataType&&t.target){var j=t.success||function(){};T.push(function(r,a,n){var i=arguments,o=t.replaceTarget?"replaceWith":"html";e(t.target)[o](r).each(function(){j.apply(this,i)})})}else t.success&&(e.isArray(t.success)?e.merge(T,t.success):T.push(t.success));if(t.success=function(e,r,a){for(var n=t.context||this,i=0,o=T.length;i0,D="multipart/form-data",A=p.attr("enctype")===D||p.attr("encoding")===D,L=i.fileapi&&i.formdata;a("fileAPI :"+L);var F,E=(k||A)&&!L;!1!==t.iframe&&(t.iframe||E)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){F=c(x)}):F=c(x):F=(k||A)&&L?function(r){for(var a=new FormData,n=0;n0)&&(n={url:n,data:i,dataType:o},"function"==typeof s&&(n.success=s)),n=n||{},n.delegation=n.delegation&&e.isFunction(e.fn.on),!n.delegation&&0===this.length){var u={s:this.selector,c:this.context};return!e.isReady&&u.s?(a("DOM not ready, queuing ajaxForm"),e(function(){e(u.s,u.c).ajaxForm(n)}),this):(a("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)")),this)}return n.delegation?(e(document).off("submit.form-plugin",this.selector,t).off("click.form-plugin",this.selector,r).on("submit.form-plugin",this.selector,n,t).on("click.form-plugin",this.selector,n,r),this):this.ajaxFormUnbind().on("submit.form-plugin",n,t).on("click.form-plugin",n,r)},e.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},e.fn.formToArray=function(t,r,a){var n=[];if(0===this.length)return n;var o,s=this[0],u=this.attr("id"),c=t||void 0===s.elements?s.getElementsByTagName("*"):s.elements;if(c&&(c=e.makeArray(c)),u&&(t||/(Edge|Trident)\//.test(navigator.userAgent))&&(o=e(':input[form="'+u+'"]').get()).length&&(c=(c||[]).concat(o)),!c||!c.length)return n;e.isFunction(a)&&(c=e.map(c,a));var l,f,d,p,m,h,v;for(l=0,h=c.length;l0?setTimeout(d.proxy(a,this),b):void a.call(this)}function m(a){this.tooltip.hasClass(_)||(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this.timers.show=l.call(this,function(){this.toggle(C,a)},this.options.show.delay))}function n(a){if(!this.tooltip.hasClass(_)&&!this.destroyed){var b=d(a.relatedTarget),c=b.closest(V)[0]===this.tooltip[0],e=b[0]===this.options.show.target[0];if(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this!==b[0]&&"mouse"===this.options.position.target&&c||this.options.hide.fixed&&/mouse(out|leave|move)/.test(a.type)&&(c||e))try{a.preventDefault(),a.stopImmediatePropagation()}catch(f){}else this.timers.hide=l.call(this,function(){this.toggle(D,a)},this.options.hide.delay,this)}}function o(a){!this.tooltip.hasClass(_)&&this.options.hide.inactive&&(clearTimeout(this.timers.inactive),this.timers.inactive=l.call(this,function(){this.hide(a)},this.options.hide.inactive))}function p(a){this.rendered&&this.tooltip[0].offsetWidth>0&&this.reposition(a)}function q(a,c,e){d(b.body).delegate(a,(c.split?c:c.join("."+R+" "))+"."+R,function(){var a=x.api[d.attr(this,T)];a&&!a.disabled&&e.apply(a,arguments)})}function r(a,c,f){var g,i,j,k,l,m=d(b.body),n=a[0]===b?m:a,o=a.metadata?a.metadata(f.metadata):E,p="html5"===f.metadata.type&&o?o[f.metadata.name]:E,q=a.data(f.metadata.name||"qtipopts");try{q="string"==typeof q?d.parseJSON(q):q}catch(r){}if(k=d.extend(C,{},x.defaults,f,"object"==typeof q?h(q):E,h(p||o)),i=k.position,k.id=c,"boolean"==typeof k.content.text){if(j=a.attr(k.content.attr),k.content.attr===D||!j)return D;k.content.text=j}if(i.container.length||(i.container=m),i.target===D&&(i.target=n),k.show.target===D&&(k.show.target=n),k.show.solo===C&&(k.show.solo=i.container.closest("body")),k.hide.target===D&&(k.hide.target=n),k.position.viewport===C&&(k.position.viewport=i.container),i.container=i.container.eq(0),i.at=new z(i.at,C),i.my=new z(i.my),a.data(R))if(k.overwrite)a.qtip("destroy",!0);else if(k.overwrite===D)return D;return a.attr(S,c),k.suppress&&(l=a.attr("title"))&&a.removeAttr("title").attr(bb,l).attr("title",""),g=new e(a,k,c,!!j),a.data(R,g),g}function s(a){return a.charAt(0).toUpperCase()+a.slice(1)}function t(a,b){var d,e,f=b.charAt(0).toUpperCase()+b.slice(1),g=(b+" "+qb.join(f+" ")+f).split(" "),h=0;if(pb[b])return a.css(pb[b]);for(;d=g[h++];)if((e=a.css(d))!==c)return pb[b]=d,e}function u(a,b){return Math.ceil(parseFloat(t(a,b)))}function v(a,b){this._ns="tip",this.options=b,this.offset=b.offset,this.size=[b.width,b.height],this.init(this.qtip=a)}function w(a,b){this.options=b,this._ns="-modal",this.init(this.qtip=a)}var x,y,z,A,B,C=!0,D=!1,E=null,F="x",G="y",H="width",I="height",J="top",K="left",L="bottom",M="right",N="center",O="flipinvert",P="shift",Q={},R="qtip",S="data-hasqtip",T="data-qtip-id",U=["ui-widget","ui-tooltip"],V="."+R,W="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),X=R+"-fixed",Y=R+"-default",Z=R+"-focus",$=R+"-hover",_=R+"-disabled",ab="_replacedByqTip",bb="oldtitle",cb={ie:function(){for(var a=4,c=b.createElement("div");(c.innerHTML="")&&c.getElementsByTagName("i")[0];a+=1);return a>4?a:0/0}(),iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||D};y=e.prototype,y._when=function(a){return d.when.apply(d,a)},y.render=function(a){if(this.rendered||this.destroyed)return this;var b,c=this,e=this.options,f=this.cache,g=this.elements,h=e.content.text,i=e.content.title,j=e.content.button,k=e.position,l=("."+this._id+" ",[]);return d.attr(this.target[0],"aria-describedby",this._id),f.posClass=this._createPosClass((this.position={my:k.my,at:k.at}).my),this.tooltip=g.tooltip=b=d("
",{id:this._id,"class":[R,Y,e.style.classes,f.posClass].join(" "),width:e.style.width||"",height:e.style.height||"",tracking:"mouse"===k.target&&k.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":D,"aria-describedby":this._id+"-content","aria-hidden":C}).toggleClass(_,this.disabled).attr(T,this.id).data(R,this).appendTo(k.container).append(g.content=d("
",{"class":R+"-content",id:this._id+"-content","aria-atomic":C})),this.rendered=-1,this.positioning=C,i&&(this._createTitle(),d.isFunction(i)||l.push(this._updateTitle(i,D))),j&&this._createButton(),d.isFunction(h)||l.push(this._updateContent(h,D)),this.rendered=C,this._setWidget(),d.each(Q,function(a){var b;"render"===this.initialize&&(b=this(c))&&(c.plugins[a]=b)}),this._unassignEvents(),this._assignEvents(),this._when(l).then(function(){c._trigger("render"),c.positioning=D,c.hiddenDuringWait||!e.show.ready&&!a||c.toggle(C,f.event,D),c.hiddenDuringWait=D}),x.api[this.id]=this,this},y.destroy=function(a){function b(){if(!this.destroyed){this.destroyed=C;var a,b=this.target,c=b.attr(bb);this.rendered&&this.tooltip.stop(1,0).find("*").remove().end().remove(),d.each(this.plugins,function(){this.destroy&&this.destroy()});for(a in this.timers)clearTimeout(this.timers[a]);b.removeData(R).removeAttr(T).removeAttr(S).removeAttr("aria-describedby"),this.options.suppress&&c&&b.attr("title",c).removeAttr(bb),this._unassignEvents(),this.options=this.elements=this.cache=this.timers=this.plugins=this.mouse=E,delete x.api[this.id]}}return this.destroyed?this.target:(a===C&&"hide"!==this.triggering||!this.rendered?b.call(this):(this.tooltip.one("tooltiphidden",d.proxy(b,this)),!this.triggering&&this.hide()),this.target)},A=y.checks={builtin:{"^id$":function(a,b,c,e){var f=c===C?x.nextid:c,g=R+"-"+f;f!==D&&f.length>0&&!d("#"+g).length?(this._id=g,this.rendered&&(this.tooltip[0].id=this._id,this.elements.content[0].id=this._id+"-content",this.elements.title[0].id=this._id+"-title")):a[b]=e},"^prerender":function(a,b,c){c&&!this.rendered&&this.render(this.options.show.ready)},"^content.text$":function(a,b,c){this._updateContent(c)},"^content.attr$":function(a,b,c,d){this.options.content.text===this.target.attr(d)&&this._updateContent(this.target.attr(c))},"^content.title$":function(a,b,c){return c?(c&&!this.elements.title&&this._createTitle(),void this._updateTitle(c)):this._removeTitle()},"^content.button$":function(a,b,c){this._updateButton(c)},"^content.title.(text|button)$":function(a,b,c){this.set("content."+b,c)},"^position.(my|at)$":function(a,b,c){"string"==typeof c&&(this.position[b]=a[b]=new z(c,"at"===b))},"^position.container$":function(a,b,c){this.rendered&&this.tooltip.appendTo(c)},"^show.ready$":function(a,b,c){c&&(!this.rendered&&this.render(C)||this.toggle(C))},"^style.classes$":function(a,b,c,d){this.rendered&&this.tooltip.removeClass(d).addClass(c)},"^style.(width|height)":function(a,b,c){this.rendered&&this.tooltip.css(b,c)},"^style.widget|content.title":function(){this.rendered&&this._setWidget()},"^style.def":function(a,b,c){this.rendered&&this.tooltip.toggleClass(Y,!!c)},"^events.(render|show|move|hide|focus|blur)$":function(a,b,c){this.rendered&&this.tooltip[(d.isFunction(c)?"":"un")+"bind"]("tooltip"+b,c)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){if(this.rendered){var a=this.options.position;this.tooltip.attr("tracking","mouse"===a.target&&a.adjust.mouse),this._unassignEvents(),this._assignEvents()}}}},y.get=function(a){if(this.destroyed)return this;var b=i(this.options,a.toLowerCase()),c=b[0][b[1]];return c.precedance?c.string():c};var db=/^position\.(my|at|adjust|target|container|viewport)|style|content|show\.ready/i,eb=/^prerender|show\.ready/i;y.set=function(a,b){if(this.destroyed)return this;{var c,e=this.rendered,f=D,g=this.options;this.checks}return"string"==typeof a?(c=a,a={},a[c]=b):a=d.extend({},a),d.each(a,function(b,c){if(e&&eb.test(b))return void delete a[b];var h,j=i(g,b.toLowerCase());h=j[0][j[1]],j[0][j[1]]=c&&c.nodeType?d(c):c,f=db.test(b)||f,a[b]=[j[0],j[1],c,h]}),h(g),this.positioning=C,d.each(a,d.proxy(j,this)),this.positioning=D,this.rendered&&this.tooltip[0].offsetWidth>0&&f&&this.reposition("mouse"===g.position.target?E:this.cache.event),this},y._update=function(a,b){var c=this,e=this.cache;return this.rendered&&a?(d.isFunction(a)&&(a=a.call(this.elements.target,e.event,this)||""),d.isFunction(a.then)?(e.waiting=C,a.then(function(a){return e.waiting=D,c._update(a,b)},E,function(a){return c._update(a,b)})):a===D||!a&&""!==a?D:(a.jquery&&a.length>0?b.empty().append(a.css({display:"block",visibility:"visible"})):b.html(a),this._waitForContent(b).then(function(a){c.rendered&&c.tooltip[0].offsetWidth>0&&c.reposition(e.event,!a.length)}))):D},y._waitForContent=function(a){var b=this.cache;return b.waiting=C,(d.fn.imagesLoaded?a.imagesLoaded():d.Deferred().resolve([])).done(function(){b.waiting=D}).promise()},y._updateContent=function(a,b){this._update(a,this.elements.content,b)},y._updateTitle=function(a,b){this._update(a,this.elements.title,b)===D&&this._removeTitle(D)},y._createTitle=function(){var a=this.elements,b=this._id+"-title";a.titlebar&&this._removeTitle(),a.titlebar=d("
",{"class":R+"-titlebar "+(this.options.style.widget?k("header"):"")}).append(a.title=d("
",{id:b,"class":R+"-title","aria-atomic":C})).insertBefore(a.content).delegate(".qtip-close","mousedown keydown mouseup keyup mouseout",function(a){d(this).toggleClass("ui-state-active ui-state-focus","down"===a.type.substr(-4))}).delegate(".qtip-close","mouseover mouseout",function(a){d(this).toggleClass("ui-state-hover","mouseover"===a.type)}),this.options.content.button&&this._createButton()},y._removeTitle=function(a){var b=this.elements;b.title&&(b.titlebar.remove(),b.titlebar=b.title=b.button=E,a!==D&&this.reposition())},y._createPosClass=function(a){return R+"-pos-"+(a||this.options.position.my).abbrev()},y.reposition=function(c,e){if(!this.rendered||this.positioning||this.destroyed)return this;this.positioning=C;var f,g,h,i,j=this.cache,k=this.tooltip,l=this.options.position,m=l.target,n=l.my,o=l.at,p=l.viewport,q=l.container,r=l.adjust,s=r.method.split(" "),t=k.outerWidth(D),u=k.outerHeight(D),v=0,w=0,x=k.css("position"),y={left:0,top:0},z=k[0].offsetWidth>0,A=c&&"scroll"===c.type,B=d(a),E=q[0].ownerDocument,F=this.mouse;if(d.isArray(m)&&2===m.length)o={x:K,y:J},y={left:m[0],top:m[1]};else if("mouse"===m)o={x:K,y:J},(!r.mouse||this.options.hide.distance)&&j.origin&&j.origin.pageX?c=j.origin:!c||c&&("resize"===c.type||"scroll"===c.type)?c=j.event:F&&F.pageX&&(c=F),"static"!==x&&(y=q.offset()),E.body.offsetWidth!==(a.innerWidth||E.documentElement.clientWidth)&&(g=d(b.body).offset()),y={left:c.pageX-y.left+(g&&g.left||0),top:c.pageY-y.top+(g&&g.top||0)},r.mouse&&A&&F&&(y.left-=(F.scrollX||0)-B.scrollLeft(),y.top-=(F.scrollY||0)-B.scrollTop());else{if("event"===m?c&&c.target&&"scroll"!==c.type&&"resize"!==c.type?j.target=d(c.target):c.target||(j.target=this.elements.target):"event"!==m&&(j.target=d(m.jquery?m:this.elements.target)),m=j.target,m=d(m).eq(0),0===m.length)return this;m[0]===b||m[0]===a?(v=cb.iOS?a.innerWidth:m.width(),w=cb.iOS?a.innerHeight:m.height(),m[0]===a&&(y={top:(p||m).scrollTop(),left:(p||m).scrollLeft()})):Q.imagemap&&m.is("area")?f=Q.imagemap(this,m,o,Q.viewport?s:D):Q.svg&&m&&m[0].ownerSVGElement?f=Q.svg(this,m,o,Q.viewport?s:D):(v=m.outerWidth(D),w=m.outerHeight(D),y=m.offset()),f&&(v=f.width,w=f.height,g=f.offset,y=f.position),y=this.reposition.offset(m,y,q),(cb.iOS>3.1&&cb.iOS<4.1||cb.iOS>=4.3&&cb.iOS<4.33||!cb.iOS&&"fixed"===x)&&(y.left-=B.scrollLeft(),y.top-=B.scrollTop()),(!f||f&&f.adjustable!==D)&&(y.left+=o.x===M?v:o.x===N?v/2:0,y.top+=o.y===L?w:o.y===N?w/2:0)}return y.left+=r.x+(n.x===M?-t:n.x===N?-t/2:0),y.top+=r.y+(n.y===L?-u:n.y===N?-u/2:0),Q.viewport?(h=y.adjusted=Q.viewport(this,y,l,v,w,t,u),g&&h.left&&(y.left+=g.left),g&&h.top&&(y.top+=g.top),h.my&&(this.position.my=h.my)):y.adjusted={left:0,top:0},j.posClass!==(i=this._createPosClass(this.position.my))&&k.removeClass(j.posClass).addClass(j.posClass=i),this._trigger("move",[y,p.elem||p],c)?(delete y.adjusted,e===D||!z||isNaN(y.left)||isNaN(y.top)||"mouse"===m||!d.isFunction(l.effect)?k.css(y):d.isFunction(l.effect)&&(l.effect.call(k,this,d.extend({},y)),k.queue(function(a){d(this).css({opacity:"",height:""}),cb.ie&&this.style.removeAttribute("filter"),a()})),this.positioning=D,this):this},y.reposition.offset=function(a,c,e){function f(a,b){c.left+=b*a.scrollLeft(),c.top+=b*a.scrollTop()}if(!e[0])return c;var g,h,i,j,k=d(a[0].ownerDocument),l=!!cb.ie&&"CSS1Compat"!==b.compatMode,m=e[0];do"static"!==(h=d.css(m,"position"))&&("fixed"===h?(i=m.getBoundingClientRect(),f(k,-1)):(i=d(m).position(),i.left+=parseFloat(d.css(m,"borderLeftWidth"))||0,i.top+=parseFloat(d.css(m,"borderTopWidth"))||0),c.left-=i.left+(parseFloat(d.css(m,"marginLeft"))||0),c.top-=i.top+(parseFloat(d.css(m,"marginTop"))||0),g||"hidden"===(j=d.css(m,"overflow"))||"visible"===j||(g=d(m)));while(m=m.offsetParent);return g&&(g[0]!==k[0]||l)&&f(g,1),c};var fb=(z=y.reposition.Corner=function(a,b){a=(""+a).replace(/([A-Z])/," $1").replace(/middle/gi,N).toLowerCase(),this.x=(a.match(/left|right/i)||a.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(a.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase(),this.forceY=!!b;var c=a.charAt(0);this.precedance="t"===c||"b"===c?G:F}).prototype;fb.invert=function(a,b){this[a]=this[a]===K?M:this[a]===M?K:b||this[a]},fb.string=function(a){var b=this.x,c=this.y,d=b!==c?"center"===b||"center"!==c&&(this.precedance===G||this.forceY)?[c,b]:[b,c]:[b];return a!==!1?d.join(" "):d},fb.abbrev=function(){var a=this.string(!1);return a[0].charAt(0)+(a[1]&&a[1].charAt(0)||"")},fb.clone=function(){return new z(this.string(),this.forceY)},y.toggle=function(a,c){var e=this.cache,f=this.options,g=this.tooltip;if(c){if(/over|enter/.test(c.type)&&e.event&&/out|leave/.test(e.event.type)&&f.show.target.add(c.target).length===f.show.target.length&&g.has(c.relatedTarget).length)return this;e.event=d.event.fix(c)}if(this.waiting&&!a&&(this.hiddenDuringWait=C),!this.rendered)return a?this.render(1):this;if(this.destroyed||this.disabled)return this;var h,i,j,k=a?"show":"hide",l=this.options[k],m=(this.options[a?"hide":"show"],this.options.position),n=this.options.content,o=this.tooltip.css("width"),p=this.tooltip.is(":visible"),q=a||1===l.target.length,r=!c||l.target.length<2||e.target[0]===c.target;return(typeof a).search("boolean|number")&&(a=!p),h=!g.is(":animated")&&p===a&&r,i=h?E:!!this._trigger(k,[90]),this.destroyed?this:(i!==D&&a&&this.focus(c),!i||h?this:(d.attr(g[0],"aria-hidden",!a),a?(this.mouse&&(e.origin=d.event.fix(this.mouse)),d.isFunction(n.text)&&this._updateContent(n.text,D),d.isFunction(n.title)&&this._updateTitle(n.title,D),!B&&"mouse"===m.target&&m.adjust.mouse&&(d(b).bind("mousemove."+R,this._storeMouse),B=C),o||g.css("width",g.outerWidth(D)),this.reposition(c,arguments[2]),o||g.css("width",""),l.solo&&("string"==typeof l.solo?d(l.solo):d(V,l.solo)).not(g).not(l.target).qtip("hide",d.Event("tooltipsolo"))):(clearTimeout(this.timers.show),delete e.origin,B&&!d(V+'[tracking="true"]:visible',l.solo).not(g).length&&(d(b).unbind("mousemove."+R),B=D),this.blur(c)),j=d.proxy(function(){a?(cb.ie&&g[0].style.removeAttribute("filter"),g.css("overflow",""),"string"==typeof l.autofocus&&d(this.options.show.autofocus,g).focus(),this.options.show.target.trigger("qtip-"+this.id+"-inactive")):g.css({display:"",visibility:"",opacity:"",left:"",top:""}),this._trigger(a?"visible":"hidden")},this),l.effect===D||q===D?(g[k](),j()):d.isFunction(l.effect)?(g.stop(1,1),l.effect.call(g,this),g.queue("fx",function(a){j(),a()})):g.fadeTo(90,a?1:0,j),a&&l.target.trigger("qtip-"+this.id+"-inactive"),this))},y.show=function(a){return this.toggle(C,a)},y.hide=function(a){return this.toggle(D,a)},y.focus=function(a){if(!this.rendered||this.destroyed)return this;var b=d(V),c=this.tooltip,e=parseInt(c[0].style.zIndex,10),f=x.zindex+b.length;return c.hasClass(Z)||this._trigger("focus",[f],a)&&(e!==f&&(b.each(function(){this.style.zIndex>e&&(this.style.zIndex=this.style.zIndex-1)}),b.filter("."+Z).qtip("blur",a)),c.addClass(Z)[0].style.zIndex=f),this},y.blur=function(a){return!this.rendered||this.destroyed?this:(this.tooltip.removeClass(Z),this._trigger("blur",[this.tooltip.css("zIndex")],a),this)},y.disable=function(a){return this.destroyed?this:("toggle"===a?a=!(this.rendered?this.tooltip.hasClass(_):this.disabled):"boolean"!=typeof a&&(a=C),this.rendered&&this.tooltip.toggleClass(_,a).attr("aria-disabled",a),this.disabled=!!a,this)},y.enable=function(){return this.disable(D)},y._createButton=function(){var a=this,b=this.elements,c=b.tooltip,e=this.options.content.button,f="string"==typeof e,g=f?e:"Close tooltip";b.button&&b.button.remove(),b.button=e.jquery?e:d("",{"class":"qtip-close "+(this.options.style.widget?"":R+"-icon"),title:g,"aria-label":g}).prepend(d("",{"class":"ui-icon ui-icon-close",html:"×"})),b.button.appendTo(b.titlebar||c).attr("role","button").click(function(b){return c.hasClass(_)||a.hide(b),D})},y._updateButton=function(a){if(!this.rendered)return D;var b=this.elements.button;a?this._createButton():b.remove()},y._setWidget=function(){var a=this.options.style.widget,b=this.elements,c=b.tooltip,d=c.hasClass(_);c.removeClass(_),_=a?"ui-state-disabled":"qtip-disabled",c.toggleClass(_,d),c.toggleClass("ui-helper-reset "+k(),a).toggleClass(Y,this.options.style.def&&!a),b.content&&b.content.toggleClass(k("content"),a),b.titlebar&&b.titlebar.toggleClass(k("header"),a),b.button&&b.button.toggleClass(R+"-icon",!a)},y._storeMouse=function(a){return(this.mouse=d.event.fix(a)).type="mousemove",this},y._bind=function(a,b,c,e,f){if(a&&c&&b.length){var g="."+this._id+(e?"-"+e:"");return d(a).bind((b.split?b:b.join(g+" "))+g,d.proxy(c,f||this)),this}},y._unbind=function(a,b){return a&&d(a).unbind("."+this._id+(b?"-"+b:"")),this},y._trigger=function(a,b,c){var e=d.Event("tooltip"+a);return e.originalEvent=c&&d.extend({},c)||this.cache.event||E,this.triggering=a,this.tooltip.trigger(e,[this].concat(b||[])),this.triggering=D,!e.isDefaultPrevented()},y._bindEvents=function(a,b,c,e,f,g){var h=c.filter(e).add(e.filter(c)),i=[];h.length&&(d.each(b,function(b,c){var e=d.inArray(c,a);e>-1&&i.push(a.splice(e,1)[0])}),i.length&&(this._bind(h,i,function(a){var b=this.rendered?this.tooltip[0].offsetWidth>0:!1;(b?g:f).call(this,a)}),c=c.not(h),e=e.not(h))),this._bind(c,a,f),this._bind(e,b,g)},y._assignInitialEvents=function(a){function b(a){return this.disabled||this.destroyed?D:(this.cache.event=a&&d.event.fix(a),this.cache.target=a&&d(a.target),clearTimeout(this.timers.show),void(this.timers.show=l.call(this,function(){this.render("object"==typeof a||c.show.ready)},c.prerender?0:c.show.delay)))}var c=this.options,e=c.show.target,f=c.hide.target,g=c.show.event?d.trim(""+c.show.event).split(" "):[],h=c.hide.event?d.trim(""+c.hide.event).split(" "):[];this._bind(this.elements.target,["remove","removeqtip"],function(){this.destroy(!0)},"destroy"),/mouse(over|enter)/i.test(c.show.event)&&!/mouse(out|leave)/i.test(c.hide.event)&&h.push("mouseleave"),this._bind(e,"mousemove",function(a){this._storeMouse(a),this.cache.onTarget=C}),this._bindEvents(g,h,e,f,b,function(){return this.timers?void clearTimeout(this.timers.show):D}),(c.show.ready||c.prerender)&&b.call(this,a)},y._assignEvents=function(){var c=this,e=this.options,f=e.position,g=this.tooltip,h=e.show.target,i=e.hide.target,j=f.container,k=f.viewport,l=d(b),q=(d(b.body),d(a)),r=e.show.event?d.trim(""+e.show.event).split(" "):[],s=e.hide.event?d.trim(""+e.hide.event).split(" "):[];d.each(e.events,function(a,b){c._bind(g,"toggle"===a?["tooltipshow","tooltiphide"]:["tooltip"+a],b,null,g)}),/mouse(out|leave)/i.test(e.hide.event)&&"window"===e.hide.leave&&this._bind(l,["mouseout","blur"],function(a){/select|option/.test(a.target.nodeName)||a.relatedTarget||this.hide(a)}),e.hide.fixed?i=i.add(g.addClass(X)):/mouse(over|enter)/i.test(e.show.event)&&this._bind(i,"mouseleave",function(){clearTimeout(this.timers.show)}),(""+e.hide.event).indexOf("unfocus")>-1&&this._bind(j.closest("html"),["mousedown","touchstart"],function(a){var b=d(a.target),c=this.rendered&&!this.tooltip.hasClass(_)&&this.tooltip[0].offsetWidth>0,e=b.parents(V).filter(this.tooltip[0]).length>0;b[0]===this.target[0]||b[0]===this.tooltip[0]||e||this.target.has(b[0]).length||!c||this.hide(a)}),"number"==typeof e.hide.inactive&&(this._bind(h,"qtip-"+this.id+"-inactive",o,"inactive"),this._bind(i.add(g),x.inactiveEvents,o)),this._bindEvents(r,s,h,i,m,n),this._bind(h.add(g),"mousemove",function(a){if("number"==typeof e.hide.distance){var b=this.cache.origin||{},c=this.options.hide.distance,d=Math.abs;(d(a.pageX-b.pageX)>=c||d(a.pageY-b.pageY)>=c)&&this.hide(a)}this._storeMouse(a)}),"mouse"===f.target&&f.adjust.mouse&&(e.hide.event&&this._bind(h,["mouseenter","mouseleave"],function(a){return this.cache?void(this.cache.onTarget="mouseenter"===a.type):D}),this._bind(l,"mousemove",function(a){this.rendered&&this.cache.onTarget&&!this.tooltip.hasClass(_)&&this.tooltip[0].offsetWidth>0&&this.reposition(a)})),(f.adjust.resize||k.length)&&this._bind(d.event.special.resize?k:q,"resize",p),f.adjust.scroll&&this._bind(q.add(f.container),"scroll",p)},y._unassignEvents=function(){var c=this.options,e=c.show.target,f=c.hide.target,g=d.grep([this.elements.target[0],this.rendered&&this.tooltip[0],c.position.container[0],c.position.viewport[0],c.position.container.closest("html")[0],a,b],function(a){return"object"==typeof a});e&&e.toArray&&(g=g.concat(e.toArray())),f&&f.toArray&&(g=g.concat(f.toArray())),this._unbind(g)._unbind(g,"destroy")._unbind(g,"inactive")},d(function(){q(V,["mouseenter","mouseleave"],function(a){var b="mouseenter"===a.type,c=d(a.currentTarget),e=d(a.relatedTarget||a.target),f=this.options;b?(this.focus(a),c.hasClass(X)&&!c.hasClass(_)&&clearTimeout(this.timers.hide)):"mouse"===f.position.target&&f.position.adjust.mouse&&f.hide.event&&f.show.target&&!e.closest(f.show.target[0]).length&&this.hide(a),c.toggleClass($,b)}),q("["+T+"]",W,o)}),x=d.fn.qtip=function(a,b,e){var f=(""+a).toLowerCase(),g=E,i=d.makeArray(arguments).slice(1),j=i[i.length-1],k=this[0]?d.data(this[0],R):E;return!arguments.length&&k||"api"===f?k:"string"==typeof a?(this.each(function(){var a=d.data(this,R);if(!a)return C;if(j&&j.timeStamp&&(a.cache.event=j),!b||"option"!==f&&"options"!==f)a[f]&&a[f].apply(a,i);else{if(e===c&&!d.isPlainObject(b))return g=a.get(b),D;a.set(b,e)}}),g!==E?g:this):"object"!=typeof a&&arguments.length?void 0:(k=h(d.extend(C,{},a)),this.each(function(a){var b,c;return c=d.isArray(k.id)?k.id[a]:k.id,c=!c||c===D||c.length<1||x.api[c]?x.nextid++:c,b=r(d(this),c,k),b===D?C:(x.api[c]=b,d.each(Q,function(){"initialize"===this.initialize&&this(b)}),void b._assignInitialEvents(j))}))},d.qtip=e,x.api={},d.each({attr:function(a,b){if(this.length){var c=this[0],e="title",f=d.data(c,"qtip");if(a===e&&f&&"object"==typeof f&&f.options.suppress)return arguments.length<2?d.attr(c,bb):(f&&f.options.content.attr===e&&f.cache.attr&&f.set("content.text",b),this.attr(bb,b))}return d.fn["attr"+ab].apply(this,arguments)},clone:function(a){var b=(d([]),d.fn["clone"+ab].apply(this,arguments));return a||b.filter("["+bb+"]").attr("title",function(){return d.attr(this,bb)}).removeAttr(bb),b}},function(a,b){if(!b||d.fn[a+ab])return C;var c=d.fn[a+ab]=d.fn[a];d.fn[a]=function(){return b.apply(this,arguments)||c.apply(this,arguments)}}),d.ui||(d["cleanData"+ab]=d.cleanData,d.cleanData=function(a){for(var b,c=0;(b=d(a[c])).length;c++)if(b.attr(S))try{b.triggerHandler("removeqtip")}catch(e){}d["cleanData"+ab].apply(this,arguments)}),x.version="2.2.1",x.nextid=0,x.inactiveEvents=W,x.zindex=15e3,x.defaults={prerender:D,id:D,overwrite:C,suppress:C,content:{text:C,attr:"title",title:D,button:D},position:{my:"top left",at:"bottom right",target:D,container:D,viewport:D,adjust:{x:0,y:0,mouse:C,scroll:C,resize:C,method:"flipinvert flipinvert"},effect:function(a,b){d(this).animate(b,{duration:200,queue:D})}},show:{target:D,event:"mouseenter",effect:C,delay:90,solo:D,ready:D,autofocus:D},hide:{target:D,event:"mouseleave",effect:C,delay:0,fixed:D,inactive:D,leave:"window",distance:D},style:{classes:"",widget:D,width:D,height:D,def:C},events:{render:E,move:E,show:E,hide:E,toggle:E,visible:E,hidden:E,focus:E,blur:E}};var gb,hb="margin",ib="border",jb="color",kb="background-color",lb="transparent",mb=" !important",nb=!!b.createElement("canvas").getContext,ob=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i,pb={},qb=["Webkit","O","Moz","ms"];if(nb)var rb=a.devicePixelRatio||1,sb=function(){var a=b.createElement("canvas").getContext("2d");return a.backingStorePixelRatio||a.webkitBackingStorePixelRatio||a.mozBackingStorePixelRatio||a.msBackingStorePixelRatio||a.oBackingStorePixelRatio||1}(),tb=rb/sb;else var ub=function(a,b,c){return"'};d.extend(v.prototype,{init:function(a){var b,c;c=this.element=a.elements.tip=d("
",{"class":R+"-tip"}).prependTo(a.tooltip),nb?(b=d("").appendTo(this.element)[0].getContext("2d"),b.lineJoin="miter",b.miterLimit=1e5,b.save()):(b=ub("shape",'coordorigin="0,0"',"position:absolute;"),this.element.html(b+b),a._bind(d("*",c).add(c),["click","mousedown"],function(a){a.stopPropagation()},this._ns)),a._bind(a.tooltip,"tooltipmove",this.reposition,this._ns,this),this.create()},_swapDimensions:function(){this.size[0]=this.options.height,this.size[1]=this.options.width},_resetDimensions:function(){this.size[0]=this.options.width,this.size[1]=this.options.height},_useTitle:function(a){var b=this.qtip.elements.titlebar;return b&&(a.y===J||a.y===N&&this.element.position().top+this.size[1]/2+this.options.offsetl&&!ob.test(e[1])&&(e[0]=e[1]),this.border=l=p.border!==C?p.border:l):this.border=l=0,k=this.size=this._calculateSize(b),n.css({width:k[0],height:k[1],lineHeight:k[1]+"px"}),j=b.precedance===G?[s(r.x===K?l:r.x===M?k[0]-q[0]-l:(k[0]-q[0])/2),s(r.y===J?k[1]-q[1]:0)]:[s(r.x===K?k[0]-q[0]:0),s(r.y===J?l:r.y===L?k[1]-q[1]-l:(k[1]-q[1])/2)],nb?(g=o[0].getContext("2d"),g.restore(),g.save(),g.clearRect(0,0,6e3,6e3),h=this._calculateTip(r,q,tb),i=this._calculateTip(r,this.size,tb),o.attr(H,k[0]*tb).attr(I,k[1]*tb),o.css(H,k[0]).css(I,k[1]),this._drawCoords(g,i),g.fillStyle=e[1],g.fill(),g.translate(j[0]*tb,j[1]*tb),this._drawCoords(g,h),g.fillStyle=e[0],g.fill()):(h=this._calculateTip(r),h="m"+h[0]+","+h[1]+" l"+h[2]+","+h[3]+" "+h[4]+","+h[5]+" xe",j[2]=l&&/^(r|b)/i.test(b.string())?8===cb.ie?2:1:0,o.css({coordsize:k[0]+l+" "+(k[1]+l),antialias:""+(r.string().indexOf(N)>-1),left:j[0]-j[2]*Number(f===F),top:j[1]-j[2]*Number(f===G),width:k[0]+l,height:k[1]+l}).each(function(a){var b=d(this);b[b.prop?"prop":"attr"]({coordsize:k[0]+l+" "+(k[1]+l),path:h,fillcolor:e[0],filled:!!a,stroked:!a}).toggle(!(!l&&!a)),!a&&b.html(ub("stroke",'weight="'+2*l+'px" color="'+e[1]+'" miterlimit="1000" joinstyle="miter"'))})),a.opera&&setTimeout(function(){m.tip.css({display:"inline-block",visibility:"visible"})},1),c!==D&&this.calculate(b,k)},calculate:function(a,b){if(!this.enabled)return D;var c,e,f=this,g=this.qtip.elements,h=this.element,i=this.options.offset,j=(g.tooltip.hasClass("ui-widget"),{});return a=a||this.corner,c=a.precedance,b=b||this._calculateSize(a),e=[a.x,a.y],c===F&&e.reverse(),d.each(e,function(d,e){var h,k,l; -e===N?(h=c===G?K:J,j[h]="50%",j[hb+"-"+h]=-Math.round(b[c===G?0:1]/2)+i):(h=f._parseWidth(a,e,g.tooltip),k=f._parseWidth(a,e,g.content),l=f._parseRadius(a),j[e]=Math.max(-f.border,d?k:i+(l>h?l:-h)))}),j[a[c]]-=b[c===F?0:1],h.css({margin:"",top:"",bottom:"",left:"",right:""}).css(j),j},reposition:function(a,b,d){function e(a,b,c,d,e){a===P&&j.precedance===b&&k[d]&&j[c]!==N?j.precedance=j.precedance===F?G:F:a!==P&&k[d]&&(j[b]=j[b]===N?k[d]>0?d:e:j[b]===d?e:d)}function f(a,b,e){j[a]===N?p[hb+"-"+b]=o[a]=g[hb+"-"+b]-k[b]:(h=g[e]!==c?[k[b],-g[b]]:[-k[b],g[b]],(o[a]=Math.max(h[0],h[1]))>h[0]&&(d[b]-=k[b],o[b]=D),p[g[e]!==c?e:b]=o[a])}if(this.enabled){var g,h,i=b.cache,j=this.corner.clone(),k=d.adjusted,l=b.options.position.adjust.method.split(" "),m=l[0],n=l[1]||l[0],o={left:D,top:D,x:0,y:0},p={};this.corner.fixed!==C&&(e(m,F,G,K,M),e(n,G,F,J,L),(j.string()!==i.corner.string()||i.cornerTop!==k.top||i.cornerLeft!==k.left)&&this.update(j,D)),g=this.calculate(j),g.right!==c&&(g.left=-g.right),g.bottom!==c&&(g.top=-g.bottom),g.user=this.offset,(o.left=m===P&&!!k.left)&&f(F,K,M),(o.top=n===P&&!!k.top)&&f(G,J,L),this.element.css(p).toggle(!(o.x&&o.y||j.x===N&&o.y||j.y===N&&o.x)),d.left-=g.left.charAt?g.user:m!==P||o.top||!o.left&&!o.top?g.left+this.border:0,d.top-=g.top.charAt?g.user:n!==P||o.left||!o.left&&!o.top?g.top+this.border:0,i.cornerLeft=k.left,i.cornerTop=k.top,i.corner=j.clone()}},destroy:function(){this.qtip._unbind(this.qtip.tooltip,this._ns),this.qtip.elements.tip&&this.qtip.elements.tip.find("*").remove().end().remove()}}),gb=Q.tip=function(a){return new v(a,a.options.style.tip)},gb.initialize="render",gb.sanitize=function(a){if(a.style&&"tip"in a.style){var b=a.style.tip;"object"!=typeof b&&(b=a.style.tip={corner:b}),/string|boolean/i.test(typeof b.corner)||(b.corner=C)}},A.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){this.create(),this.qtip.reposition()},"^style.tip.(height|width)$":function(a){this.size=[a.width,a.height],this.update(),this.qtip.reposition()},"^content.title|style.(classes|widget)$":function(){this.update()}},d.extend(C,x.defaults,{style:{tip:{corner:C,mimic:D,width:6,height:6,border:C,offset:0}}}),Q.viewport=function(c,d,e,f,g,h,i){function j(a,b,c,e,f,g,h,i,j){var k=d[f],s=u[a],t=v[a],w=c===P,x=s===f?j:s===g?-j:-j/2,y=t===f?i:t===g?-i:-i/2,z=q[f]+r[f]-(n?0:m[f]),A=z-k,B=k+j-(h===H?o:p)-z,C=x-(u.precedance===a||s===u[b]?y:0)-(t===N?i/2:0);return w?(C=(s===f?1:-1)*x,d[f]+=A>0?A:B>0?-B:0,d[f]=Math.max(-m[f]+r[f],k-C,Math.min(Math.max(-m[f]+r[f]+(h===H?o:p),k+C),d[f],"center"===s?k-x:1e9))):(e*=c===O?2:0,A>0&&(s!==f||B>0)?(d[f]-=C+e,l.invert(a,f)):B>0&&(s!==g||A>0)&&(d[f]-=(s===N?-C:C)+e,l.invert(a,g)),d[f]B&&(d[f]=k,l=u.clone())),d[f]-k}var k,l,m,n,o,p,q,r,s=e.target,t=c.elements.tooltip,u=e.my,v=e.at,w=e.adjust,x=w.method.split(" "),y=x[0],z=x[1]||x[0],A=e.viewport,B=e.container,C=(c.cache,{left:0,top:0});return A.jquery&&s[0]!==a&&s[0]!==b.body&&"none"!==w.method?(m=B.offset()||C,n="static"===B.css("position"),k="fixed"===t.css("position"),o=A[0]===a?A.width():A.outerWidth(D),p=A[0]===a?A.height():A.outerHeight(D),q={left:k?0:A.scrollLeft(),top:k?0:A.scrollTop()},r=A.offset()||C,("shift"!==y||"shift"!==z)&&(l=u.clone()),C={left:"none"!==y?j(F,G,y,w.x,K,M,H,f,h):0,top:"none"!==z?j(G,F,z,w.y,J,L,I,g,i):0,my:l}):C};var vb,wb,xb="qtip-modal",yb="."+xb;wb=function(){function a(a){if(d.expr[":"].focusable)return d.expr[":"].focusable;var b,c,e,f=!isNaN(d.attr(a,"tabindex")),g=a.nodeName&&a.nodeName.toLowerCase();return"area"===g?(b=a.parentNode,c=b.name,a.href&&c&&"map"===b.nodeName.toLowerCase()?(e=d("img[usemap=#"+c+"]")[0],!!e&&e.is(":visible")):!1):/input|select|textarea|button|object/.test(g)?!a.disabled:"a"===g?a.href||f:f}function c(a){k.length<1&&a.length?a.not("body").blur():k.first().focus()}function e(a){if(i.is(":visible")){var b,e=d(a.target),h=f.tooltip,j=e.closest(V);b=j.length<1?D:parseInt(j[0].style.zIndex,10)>parseInt(h[0].style.zIndex,10),b||e.closest(V)[0]===h[0]||c(e),g=a.target===k[k.length-1]}}var f,g,h,i,j=this,k={};d.extend(j,{init:function(){return i=j.elem=d("
",{id:"qtip-overlay",html:"
",mousedown:function(){return D}}).hide(),d(b.body).bind("focusin"+yb,e),d(b).bind("keydown"+yb,function(a){f&&f.options.show.modal.escape&&27===a.keyCode&&f.hide(a)}),i.bind("click"+yb,function(a){f&&f.options.show.modal.blur&&f.hide(a)}),j},update:function(b){f=b,k=b.options.show.modal.stealfocus!==D?b.tooltip.find("*").filter(function(){return a(this)}):[]},toggle:function(a,e,g){var k=(d(b.body),a.tooltip),l=a.options.show.modal,m=l.effect,n=e?"show":"hide",o=i.is(":visible"),p=d(yb).filter(":visible:not(:animated)").not(k);return j.update(a),e&&l.stealfocus!==D&&c(d(":focus")),i.toggleClass("blurs",l.blur),e&&i.appendTo(b.body),i.is(":animated")&&o===e&&h!==D||!e&&p.length?j:(i.stop(C,D),d.isFunction(m)?m.call(i,e):m===D?i[n]():i.fadeTo(parseInt(g,10)||90,e?1:0,function(){e||i.hide()}),e||i.queue(function(a){i.css({left:"",top:""}),d(yb).length||i.detach(),a()}),h=e,f.destroyed&&(f=E),j)}}),j.init()},wb=new wb,d.extend(w.prototype,{init:function(a){var b=a.tooltip;return this.options.on?(a.elements.overlay=wb.elem,b.addClass(xb).css("z-index",x.modal_zindex+d(yb).length),a._bind(b,["tooltipshow","tooltiphide"],function(a,c,e){var f=a.originalEvent;if(a.target===b[0])if(f&&"tooltiphide"===a.type&&/mouse(leave|enter)/.test(f.type)&&d(f.relatedTarget).closest(wb.elem[0]).length)try{a.preventDefault()}catch(g){}else(!f||f&&"tooltipsolo"!==f.type)&&this.toggle(a,"tooltipshow"===a.type,e)},this._ns,this),a._bind(b,"tooltipfocus",function(a,c){if(!a.isDefaultPrevented()&&a.target===b[0]){var e=d(yb),f=x.modal_zindex+e.length,g=parseInt(b[0].style.zIndex,10);wb.elem[0].style.zIndex=f-1,e.each(function(){this.style.zIndex>g&&(this.style.zIndex-=1)}),e.filter("."+Z).qtip("blur",a.originalEvent),b.addClass(Z)[0].style.zIndex=f,wb.update(c);try{a.preventDefault()}catch(h){}}},this._ns,this),void a._bind(b,"tooltiphide",function(a){a.target===b[0]&&d(yb).filter(":visible").not(b).last().qtip("focus",a)},this._ns,this)):this},toggle:function(a,b,c){return a&&a.isDefaultPrevented()?this:void wb.toggle(this.qtip,!!b,c)},destroy:function(){this.qtip.tooltip.removeClass(xb),this.qtip._unbind(this.qtip.tooltip,this._ns),wb.toggle(this.qtip,D),delete this.qtip.elements.overlay}}),vb=Q.modal=function(a){return new w(a,a.options.show.modal)},vb.sanitize=function(a){a.show&&("object"!=typeof a.show.modal?a.show.modal={on:!!a.show.modal}:"undefined"==typeof a.show.modal.on&&(a.show.modal.on=C))},x.modal_zindex=x.zindex-200,vb.initialize="render",A.modal={"^show.modal.(on|blur)$":function(){this.destroy(),this.init(),this.qtip.elems.overlay.toggle(this.qtip.tooltip[0].offsetWidth>0)}},d.extend(C,x.defaults,{show:{modal:{on:D,effect:C,blur:C,stealfocus:C,escape:C}}})})}(window,document); diff --git a/adm/style/js/loading_progress.js b/adm/style/js/loading_progress.js deleted file mode 100644 index 300db81..0000000 --- a/adm/style/js/loading_progress.js +++ /dev/null @@ -1,47 +0,0 @@ -/*! - * Loading Progress Plugin - * A plugin originally designed for phpBB extension Upload Extensions. - * version: 1.1.0 - * Copyright (c) 2015 LavIgor - * Licensed under GPL license version 2 (license.txt file). - */ -; (function ($, window, document) { - // do stuff here and use $, window and document safely - // https://www.phpbb.com/community/viewtopic.php?p=13589106#p13589106 - $.upload_loading_interval = ""; - $.upload_loading_from = "left"; - - $.fn.upload_loading_process = function() { - $(".upload_loading_element").each(function () { - var pos = $(this).css($.upload_loading_from); - pos = pos.substr(0, pos.length - 2); - if (parseFloat(pos) >= $("#upload_loading").width() + 30) $(this).remove(); - else if (parseFloat(pos) === 30) { - $(this).css($.upload_loading_from, (parseFloat(pos) + 3) + "px"); - $("
").css($.upload_loading_from, "-30px").appendTo("#upload_loading"); - } else $(this).css($.upload_loading_from, (parseFloat(pos) + 3) + "px"); - }); - }; - - $.fn.upload_loading_start = function () { - if ($("#upload_loading").css("display") !== "none") return; - $.upload_loading_from = ($("body").hasClass("rtl")) ? "right" : "left"; - $("#upload_loading").slideDown(700); - $("
").css($.upload_loading_from, "-30px").appendTo("#upload_loading"); - $.upload_loading_interval = setInterval($.fn.upload_loading_process, 30); - }; - - $.fn.upload_loading_end = function() { - $("#upload_loading").slideUp(700, function () { - clearInterval($.upload_loading_interval); - $("#upload_loading_status").html(""); - $(".upload_loading_element").each(function () { - $(this).remove(); - }); - }); - }; - - $.fn.upload_loading_progress = function(percentComplete) { - $("#upload_loading_status").html(percentComplete + " %"); - }; -})(jQuery, window, document); diff --git a/adm/style/js/php_file_tree_jquery.js b/adm/style/js/php_file_tree_jquery.js deleted file mode 100644 index 510ea91..0000000 --- a/adm/style/js/php_file_tree_jquery.js +++ /dev/null @@ -1,83 +0,0 @@ -function setFileTree() { - // Hide all subfolders at startup - $(".php-file-tree").find("UL").hide(); - - // Expand/collapse on click - $(".pft-directory span").click(function() { - $(this).parent().find("UL:first").slideToggle("medium"); - if ($(this).parent().attr('className') == "pft-directory") { - return false; - } - }); - - $(".php-file-tree [data-file-link]").click(function(event) { - event.preventDefault(); - var $this = $(this); - $(".pft-active").removeClass("pft-active"); - $this.addClass("pft-active"); - $("#filecontent_wrapper").fadeOut(500, function() { - $("#filecontent").load($this.attr("data-file-link"), function() { - $("#filecontent_wrapper").fadeIn(500); - }); - }); - }); - - $(".php-file-tree > li[title='composer.json']").addClass("pft-active"); - - $(".select_all_code").css("display", "inline-block").click(function(event) { - event.preventDefault(); - selectCode(this); - }); -} - -// Source: board style's forum_fn.js -function selectCode(a) { - 'use strict'; - - // Get ID of code block - var e = a.parentNode.parentNode.getElementsByTagName('CODE')[0]; - var s, r; - - // Not IE and IE9+ - if (window.getSelection) { - s = window.getSelection(); - // Safari and Chrome - if (s.setBaseAndExtent) { - var l = (e.innerText.length > 1) ? e.innerText.length - 1 : 1; - try { - s.setBaseAndExtent(e, 0, e, l); - } catch (error) { - r = document.createRange(); - r.selectNodeContents(e); - s.removeAllRanges(); - s.addRange(r); - } - } - // Firefox and Opera - else { - // workaround for bug # 42885 - if (window.opera && e.innerHTML.substring(e.innerHTML.length - 4) === '
') { - e.innerHTML = e.innerHTML + ' '; - } - - r = document.createRange(); - r.selectNodeContents(e); - s.removeAllRanges(); - s.addRange(r); - } - } - // Some older browsers - else if (document.getSelection) { - s = document.getSelection(); - r = document.createRange(); - r.selectNodeContents(e); - s.removeAllRanges(); - s.addRange(r); - } - // IE - else if (document.selection) { - r = document.body.createTextRange(); - r.moveToElementText(e); - r.select(); - } -} diff --git a/adm/style/js/upload.js b/adm/style/js/upload.js deleted file mode 100644 index bdc0d7c..0000000 --- a/adm/style/js/upload.js +++ /dev/null @@ -1,1529 +0,0 @@ -/* global phpbb, setFileTree */ - -;var upload_ext = {}; - -(function($, window, document) { - // do stuff here and use $, window and document safely - // https://www.phpbb.com/community/viewtopic.php?p=13589106#p13589106 - /***************** - * Helper object * - *****************/ - // Main elements - upload_ext.elem = {}; - upload_ext.elem.main = $("#upload_main"); - upload_ext.elem.modal = $("#upload_modal_box"); - upload_ext.elem.modal_wrapper = $("#upload_modal_box_wrapper"); - upload_ext.elem.wrapper = $("#upload_main_wrapper"); - - // Global functions - upload_ext.fn = {}; - upload_ext.fn.main_attr = function(attr) { - return upload_ext.elem.main.attr(attr); - }; - - // qTips - upload_ext.qtip = {}; - upload_ext.qtip.done = function($element, attrText) { - $element.qtip({ - content: { - text: function(event, api) { - return $(this).attr(attrText); - } - }, - style: { - classes: 'qtip-green qtip-shadow qtip-rounded' - }, - position: { - my: direction_left + ' center', - at: direction_right + ' center', - viewport: true - }, - show: { - ready: true - }, - hide: { - event: 'click unfocus' - }, - events: { - hidden: function(event, api) { - api.destroy(true); - } - } - }); - }; - upload_ext.qtip.error = function($element, text) { - $element.qtip({ - content: { - text: text - }, - style: { - classes: 'qtip-red qtip-shadow qtip-rounded' - }, - position: { - my: direction_left + ' center', - at: direction_right + ' center', - viewport: true - }, - show: { - ready: true - }, - hide: { - event: 'click unfocus' - }, - events: { - hidden: function(event, api) { - api.destroy(true); - } - } - }); - }; - upload_ext.qtip.filetree = function() { - $("#ext_details_filetree_tab").qtip({ - content: { - text: function(event, api) { - return $(".extension_toggle_wrapper").parent().attr("data-ext-update-check-filetree"); - } - }, - style: { - classes: 'qtip-yellow qtip-shadow qtip-rounded' - }, - position: { - my: 'top center', - at: 'bottom center', - viewport: true - }, - show: { - ready: true - }, - hide: { - event: 'unfocus' - }, - events: { - hidden: function(event, api) { - api.destroy(true); - } - } - }); - }; - upload_ext.qtip.forceUnstableConfirm = function(forceUnstable) { - $(".upload_ext_list").qtip({ - content: { - text: function(event, api) { - load_page('set_config_force_unstable', forceUnstable, get_force_unstable_confirm, $(this)); - return "
"; - }, - title: function(event, api) { - return $("#version_check_settings_title").html(); - } - }, - style: { - classes: 'qtip-light qtip-shadow qtip-rounded' - }, - position: { - my: 'bottom center', - at: 'top center', - viewport: true - }, - show: { - modal: { - on: true - }, - ready: true - }, - hide: { - event: false - }, - events: { - hidden: function(event, api) { - api.destroy(true); - } - } - }); - }; - upload_ext.qtip.purgeConfirm = function($element) { - $element.qtip({ - content: { - text: function(event, api) { - load_page('purge', $(this).parent().attr("data-ext-name"), get_purge_confirm, $(this)); - return "
"; - }, - title: function(event, api) { - return $("#upload_loading_text").html(); - } - }, - style: { - classes: 'qtip-light qtip-shadow qtip-rounded' - }, - position: { - my: direction_left + ' center', - at: direction_right + ' center', - viewport: true - }, - show: { - modal: { - on: true - }, - ready: true - }, - hide: { - event: false - }, - events: { - hidden: function(event, api) { - api.destroy(true); - } - } - }); - }; - upload_ext.qtip.toggle = function() { - $(".extension_toggle_wrapper").qtip({ - content: { - text: function(event, api) { - return $(this).parent().attr("data-ext-update-enable"); - } - }, - style: { - classes: 'qtip-blue qtip-shadow qtip-rounded' - }, - position: { - my: 'bottom center', - at: 'top center', - viewport: true - }, - show: { - ready: true - }, - hide: { - event: 'unfocus' - }, - events: { - hidden: function(event, api) { - api.destroy(true); - } - } - }); - }; - upload_ext.qtip.updateActions = function() { - $(".ext_version_bubble .show_ext_updates").css("display", "inline-block").qtip({ - content: { - text: $("#description_updates") - }, - style: { - classes: 'qtip-light qtip-shadow qtip-rounded', - tip: { - corner: true, - mimic: 'center', - width: 10, - height: 10 - } - }, - position: { - at: 'bottom center', - my: 'top ' + direction_right, - adjust: { - x: (direction_rtl) ? -15 : 15 - } - }, - show: { - event: 'click', - effect: function(offset) { - $(this).fadeIn(500); // "this" refers to the tooltip - } - }, - hide: { - event: 'click unfocus', - effect: function(offset) { - $(this).fadeOut(500); // "this" refers to the tooltip - } - } - }); - $(".extension_update_link").bind("click", function() { - $(".ext_version_bubble .show_ext_updates").qtip().hide(); - }).qtip({ - content: { - text: $("#update_ext_confirm"), - title: $("#update_ext_confirm_title") - }, - style: { - classes: 'qtip-light qtip-shadow qtip-rounded', - tip: { - corner: true, - mimic: 'center', - width: 10, - height: 10 - } - }, - position: { - at: 'bottom center', - my: 'top ' + direction_right, - adjust: { - x: (direction_rtl) ? -15 : 15 - }, - target: $(".show_ext_updates") - }, - show: { - modal: { - on: true - }, - event: 'click', - effect: function(offset) { - $(this).fadeIn(500); // "this" refers to the tooltip - } - }, - hide: { - event: 'unfocus', - effect: function(offset) { - $(this).fadeOut(500); // "this" refers to the tooltip - } - } - }); - $("#upload_ext_update").bind("submit", function() { - $(".extension_update_link").qtip().hide(); - }); - }; - - /********************* - * General functions * - *********************/ - $(".upload_details_link").click(function(event) { - event.preventDefault(); - load_page("details", "boardtools/upload"); - }); - - $(".upload_faq_link").click(function(event) { - event.preventDefault(); - load_page("faq"); - }); - - $("#upload_extensions_title").click(function(event) { - event.preventDefault(); - load_page("main"); - }); - - $("#upload_extensions_links_show_slider").click(function() { - var $titleLinks = $("#upload_extensions_title_links"); - $titleLinks.css("margin-" + direction_left, ($titleLinks.css("margin-" + direction_left) == "-100px") ? "-15px" : ""); - }); - - upload_ext.elem.wrapper.css("overflow", "hidden"); - upload_ext.elem.modal.click(function(e) { - e.stopPropagation(); - }); - - var loading_errors = false; - - // Detect the direction. - // The RTL look is based upon swapping LTR style. - var direction_rtl = $("body").hasClass("rtl"), - direction_left = (direction_rtl) ? 'right' : 'left', - direction_right = (direction_rtl) ? 'left' : 'right'; - - /** - * The function that removes the marked rows of the form that triggered the callback. - */ - phpbb.addAjaxCallback('rows_delete', function(res) { - if (res.SUCCESS !== false) { - $("input[name='mark[]']:checkbox:checked").parents('tr').remove(); - } - }); - - /** - * The function that removes the marked rows of the language packages form that triggered the callback. - */ - phpbb.addAjaxCallback('language_rows_delete', function(res) { - if (res.SUCCESS !== false) { - $("input[name='mark[]']:checkbox:checked").parents('.ext_language_row').remove(); - } - }); - - // From ajax.js. We need to call this function after loading another page - function add_ajax() { - $('[data-ajax]').each(function() { - var $this = $(this), - ajax = $this.attr('data-ajax'); - - if (ajax !== 'false') { - var fn = (ajax !== 'true') ? ajax : null; - phpbb.ajaxify({ - selector: this, - refresh: $this.attr('data-refresh') !== undefined, - callback: fn - }); - } - }); - } - - // Source: http://stackoverflow.com/a/4835406 - function escape_html(text) { - var map = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' - }; - return text.replace(/[&<>"']/g, function(m) { - return map[m]; - }); - } - - /** - * http://stackoverflow.com/a/4373037 - * http://www.davekoelle.com/alphanum.html - * @copyright (C) Brian Huisman, based on the Alphanum Algorithm by David Koelle - * @license LGPL-2.1+ - * @param caseInsensitive - */ - Array.prototype.alphanumSort = function(caseInsensitive) { - for (var z = 0, t; t = this[z]; z++) { - this[z] = []; - var x = 0, y = -1, n = 0, i, j; - - while (i = (j = t.charAt(x++)).charCodeAt(0)) { - var m = (i == 46 || (i >=48 && i <= 57)); - if (m !== n) { - this[z][++y] = ""; - n = m; - } - this[z][y] += j; - } - } - - this.sort(function(a, b) { - for (var x = 0, aa, bb; (aa = a[x]) && (bb = b[x]); x++) { - if (caseInsensitive) { - aa = aa.toLowerCase(); - bb = bb.toLowerCase(); - } - if (aa !== bb) { - var c = Number(aa), d = Number(bb); - if (c == aa && d == bb) { - return c - d; - } else { - return (aa > bb) ? 1 : -1; - } - } - } - return a.length - b.length; - }); - - for (var z = 0; z < this.length; z++) { - this[z] = this[z].join(""); - } - }; - - function show_error_box(e, text, ee) { - prepare_error_wrapper(); - if (text == "timeout" || ee == "timeout") { - $("#upload_loading_timeout").css("display", "inline-block"); - } else { - if (typeof ee !== "undefined" && ee != "") { - var $errorbox = $("#upload_loading_error_status"), error_status = e.status || e || ''; - $errorbox.html(escape_html(error_status + " - " + ee)); - // Detect whether we need to show solutions. - if (typeof e.status !== "undefined") { - upload_ext.elem.main.html('

' + $errorbox.attr("data-load-error-solutions-title") + '

' + $errorbox.attr("data-load-error-solutions") + '
'); - upload_ext.elem.wrapper.stop().slideUp(100, function() { - upload_ext.elem.wrapper.attr("style", "display:none;").slideDown(700, "linear", function() { - $("#upload_main_wrapper, #upload_main").removeClass("main_transformation"); - }); - }); - } - $errorbox.css("display", "inline-block"); - } else { - $("#upload_loading_error").css("display", "inline-block"); - } - } - $("#upload_loading_error_wrapper").slideDown(700); - loading_errors = true; - } - - function show_refresh_notice() { - $("#upload_refresh_notice_wrapper").show(); - $("#upload_refresh_notice").slideDown(500, function() { - $("[data-hasqtip]").each(function() { - $(this).qtip('api').reposition(); - }); - }); - } - - $("#upload_refresh_notice_wrapper").prependTo("body"); - $(".page_refresh_link").click(function(e) { - e.preventDefault(); - window.location.reload(); - }); - $(".upload_refresh_notice_close").click(function() { - $("#upload_refresh_notice").slideUp(500, function() { - $("#upload_refresh_notice_wrapper").hide(); - }); - }); - - function enable_result_success($element, attrText) { - if ($element.parent(".upload_ext_list_content").length > 0) { - $element.parent(".upload_ext_list_content").addClass("upload_ext_update_success"); - var $wrapper = $element.siblings(".upload_ext_list_update_success_wrapper"); - $wrapper.children(".upload_ext_list_update_success").html( - $wrapper.attr(attrText)); - $wrapper.stop().slideDown(700); - setTimeout(function() { - $wrapper.slideUp(700, function() { - $element.parent(".upload_ext_list_content").removeClass("upload_ext_update_success"); - }); - }, 3000); - } else { - upload_ext.qtip.done($element.parent(), attrText); - } - } - - function enable_result_error($element, text) { - if ($element.parent(".upload_ext_list_content").length > 0) { - $element.parent(".upload_ext_list_content").addClass("upload_ext_update_error"); - var $wrapper = $element.siblings(".upload_ext_list_update_error_wrapper"); - $wrapper.children(".upload_ext_list_update_error").html(text); - $wrapper.stop().slideDown(700); - } else { - upload_ext.qtip.error($element.parent(), text); - } - } - - function get_enable_result(result, $element) { - $element.removeClass("locked_toggle"); - var isListPage = $element.parent(".upload_ext_list_content").length > 0, - $data_wrapper = (isListPage) ? $element.siblings(".upload_ext_list_update_error_wrapper") : $element.parent(); // Detect the list/details page. - if (typeof result.status !== "undefined") { - switch (result.status) { - case 'purged': - $element.addClass("extension_toggle_purged"); - enable_result_success($element, "data-ext-update-purged"); - break; - case 'enabled': - $element.removeClass("extension_toggle_purged"); - $element.toggleClass("extension_toggle_enabled extension_toggle_disabled"); - enable_result_success($element, "data-ext-update-enabled"); - break; - case 'disabled': - $element.toggleClass("extension_toggle_enabled extension_toggle_disabled"); - enable_result_success($element, "data-ext-update-disabled"); - break; - case 'error': - enable_result_error($element, result.error); - break; - case 'load_error': - if (result.error === "timeout" || result.message === "timeout") { - enable_result_error($element, $data_wrapper.attr("data-ext-update-timeout")); - } else { - var error_status = ''; - if (typeof result.message !== "undefined" && result.message != "") { - var status_divider = (isListPage) ? ' ' : '
'; - error_status = status_divider + escape_html(result.code + " - " + result.message); - } - enable_result_error($element, $data_wrapper.attr("data-ext-update-error") + error_status); - } - break; - } - if (result.refresh) { - show_refresh_notice(); - } - } else { - enable_result_error($element, $data_wrapper.attr("data-ext-update-error")); - } - } - - function get_purge_result(result, $element, hash) { - var data = $('
' + result.S_HIDDEN_FIELDS + '
').serialize(); - $.ajax({ - url: result.S_CONFIRM_ACTION, - type: 'POST', - data: data + "&confirm=" + result.YES_VALUE + ((typeof hash !== "undefined") ? "&hash=" + hash : ""), - error: function(e, text, ee) { - get_enable_result({ - ext_name: $element.parent().attr("data-ext-name"), - status: 'load_error', - error: text, - code: e.status, - message: ee - }, $element.siblings(".extension_toggle_wrapper")); - }, - success: function(s, x) { - if (typeof s.status !== "undefined" && s.status === "force_update") { - if (typeof s.hash !== "undefined") { - get_purge_result(result, $element, s.hash); // Repeat the request. - } else { // The hash is not specified - this is an error. - get_enable_result({ - ext_name: $element.parent().attr("data-ext-name"), - status: 'load_error', - error: '' // Display standard error message. - }, $element.siblings(".extension_toggle_wrapper")); - } - } else { - get_enable_result(s, $element.siblings(".extension_toggle_wrapper")); - } - }, - cache: false - }); - } - - function get_purge_confirm(result, $element) { - if (typeof result.S_CONFIRM_ACTION !== "undefined" && result.YES_VALUE) { - $element.qtip('api').set('content.title', result.MESSAGE_TITLE); - $("#ext_purge_confirm").children(".ext_update_ok").html(result.YES_VALUE).siblings(".ext_update_cancel").html(result.NO_VALUE).parent().show(); - $("#ext_purge_text").html(result.MESSAGE_TEXT); - $element.qtip('api').reposition(); - $("#ext_purge_confirm .ext_update_ok").bind("click", function() { - $element.siblings(".extension_toggle_wrapper").toggleClass("locked_toggle"); - $element.qtip('api').destroy(); - get_purge_result(result, $element); - }); - $("#ext_purge_confirm .ext_update_cancel").bind("click", function() { - $element.qtip('api').destroy(); - }); - } else { - $element.qtip('api').destroy(); - get_enable_result({ - ext_name: $element.parent().attr("data-ext-name"), - status: 'load_error', - error: result.error, - code: result.code, - message: result.message - }, $element.siblings(".extension_toggle_wrapper")); - } - } - - function add_enable_toggle() { - $("#upload_main .extension_toggle_wrapper").bind("click", function(event) { - event.preventDefault(); - event.stopPropagation(); - $(".extension_toggle_wrapper[data-hasqtip], [data-ext-name][data-hasqtip]").qtip('destroy'); - if ($(this).hasClass("locked_toggle")) { - return; - } - var process = ($(this).hasClass("extension_toggle_enabled")) ? "disable" : "enable"; - if ($(this).parent(".upload_ext_list_content").hasClass("upload_ext_update_error")) { - $(this).siblings(".upload_ext_list_update_error_wrapper").slideUp(300, function() { - $(this).parent(".upload_ext_list_content").removeClass("upload_ext_update_error"); - }); - } - $(this).toggleClass("locked_toggle"); - load_page(process, $(this).parent().attr("data-ext-name"), get_enable_result, $(this)); - }); - $(".extension_remove_data_button").bind("click", function(event) { - event.preventDefault(); - event.stopPropagation(); - $(".extension_toggle_wrapper[data-hasqtip], [data-ext-name][data-hasqtip]").qtip('destroy'); - if ($(this).siblings(".extension_toggle_wrapper").hasClass("locked_toggle")) { - return; - } - upload_ext.qtip.purgeConfirm($(this)); - }); - } - - function add_enable_tip() { - upload_ext.elem.main.one("loaded", function() { - upload_ext.qtip.toggle(); - upload_ext.qtip.filetree(); - }); - function hide_uploaded_message() { - $(".ext_uploaded_notice, .ext_updated_notice").slideUp(500); - $(".extension_toggle_wrapper").unbind("click", hide_uploaded_message); - } - - $(".extension_toggle_wrapper").bind("click", hide_uploaded_message); - } - - function add_language_tip() { - upload_ext.elem.main.one("loaded", function() { - upload_ext.qtip.filetree(); - }); - function hide_uploaded_message() { - $(".ext_uploaded_notice, .ext_updated_notice").slideUp(500); - $(".extension_toggle_wrapper").unbind("click", hide_uploaded_message); - } - - $(".extension_toggle_wrapper").bind("click", hide_uploaded_message); - } - - var $modalDataContainer = false; - - function restore_modal_data_container() { - var $modal = upload_ext.elem.modal; - if ($modalDataContainer) { - $modal.find(".alert_close").remove(); - $modalDataContainer.html($modal.contents()); - $modalDataContainer = false; - } - } - - function show_modal_box(content, bigModalBox, $dataContainer) { - var $modalBox = upload_ext.elem.modal_wrapper, $modal = upload_ext.elem.modal; - restore_modal_data_container(); - phpbb.clearLoadingTimeout(); - $(document).on('keydown.phpbb.alert', function(e) { - if (e.keyCode === 13 || e.keyCode === 27) { - phpbb.alert.close($modalBox, true); - e.preventDefault(); - e.stopPropagation(); - } - }); - $modalBox.one('click', function(e) { - phpbb.alert.close($modalBox, true); - e.preventDefault(); - e.stopPropagation(); - }); - $modal.html(content); - $modal.removeClass("big_modal_box huge_modal_box"); - if (bigModalBox === 2) { - $modal.addClass("huge_modal_box"); - } else if (bigModalBox) { - $modal.addClass("big_modal_box"); - } - if ($dataContainer) { - $modalDataContainer = $dataContainer; - } - $modal.prepend('
×'); - phpbb.alert.open($modalBox); - } - - function hide_modal_box() { - var $modalBox = upload_ext.elem.modal_wrapper; - phpbb.alert.close($modalBox, true); - restore_modal_data_container(); - } - - function show_error_modal_box(error) { - if (error.substr(0, 9) == "'); - $(".upload_ext_error_show").off("click").click(function() { - show_modal_box($frame, 2); - $frame[0].contentWindow.document.open(); - $frame[0].contentWindow.document.write(error); - $($frame[0].contentWindow.document).find("a").click(function(e) { - $(this).attr("target", "_blank"); - }); - $frame[0].contentWindow.document.close(); - }).show(); - } else { - $(".upload_ext_error_show").off("click").click(function() { - show_modal_box(error); - }).show(); - } - upload_ext.elem.main.one("loading", function() { - $(".upload_ext_error_show").hide(); - }); - } - - function prepare_error_wrapper() { - $("#upload_loading_error_wrapper").finish(); - $("#upload_loading_error, #upload_loading_timeout, #upload_loading_error_status").css("display", "none"); - } - - function close_error_wrapper() { - if (loading_errors) { - $("#upload_loading_error_wrapper").slideUp(700); - loading_errors = false; - } - } - - function set_ext_requirement($extRow, $requirementRow, $requireType) { - if ($extRow.attr('data-ext-require-' + $requireType + '-status') == "1") { - $requirementRow.removeClass("requirements_value_not_met"); - } else { - $requirementRow.addClass("requirements_value_not_met"); - } - $requirementRow.text($extRow.attr('data-ext-require-' + $requireType) || $('#upload_valid_ext_description').attr("data-not-available")); - } - - function display_ext_description($extRow) { - var $extDescContainer = $('#upload_valid_ext_description'); - $extDescContainer - .find('.ext_details_name') - .text($extRow.find('.upload_valid_ext_name').text()) - .end() - .find('.ext_details_version') - .text($extRow.find('.upload_valid_ext_version').text()) - .end() - .find('.ext_details_description') - .text($extRow.attr('data-ext-description') || $extDescContainer.attr("data-not-available")) - .end() - .find('.ext_details_actions') - .html($extRow.find('a').clone()) - .end(); - set_ext_requirement($extRow, $extDescContainer.find('.ext_details_require_phpbb'), 'phpbb'); - set_ext_requirement($extRow, $extDescContainer.find('.ext_details_require_php'), 'php'); - show_modal_box($extDescContainer.html()); - upload_ext.elem.modal.find('.upload_valid_ext_download_link').click(function(event) { - event.preventDefault(); - $extRow.find('.upload_valid_ext_download_link').click(); - hide_modal_box(); - }); - } - - function get_versioncheck_result(result, element) { - if (typeof result.status !== "undefined" && result.status === "success") { - switch (result.versioncheck) { - case "up_to_date": - $().upload_loading_end(); - $("#meta_version").addClass("description_value_ok").attr("title", result.message); - break; - case "not_up_to_date": - // Reload the details page to show an update button (if needed). - load_page("details", $("h1.ExtensionName span").attr("data-ext-name")); - break; - case "error_timeout": - case "error": - $().upload_loading_end(); - var $error_box = $("#ext_versioncheck_error_box"); - $error_box.stop().slideUp(100, function() { - if (result.versioncheck === "error_timeout") { - $error_box.children(".ext_versioncheck_error_box_title, .ext_versioncheck_error_box_link").show(); - } else { - $error_box.children(".ext_versioncheck_error_box_title, .ext_versioncheck_error_box_link").hide(); - } - $error_box.children(".ext_versioncheck_error_box_reason").html(result.reason); - $error_box.slideDown(700); - }); - break; - } - } - else { - $().upload_loading_end(); - show_error_box(result.code, result.error, result.message); - } - } - - function get_force_unstable_result(result) { - var data = $('
' + result.S_HIDDEN_FIELDS + '
').serialize(); - $.ajax({ - url: result.S_CONFIRM_ACTION, - type: 'POST', - data: data + "&confirm=" + result.YES_VALUE, - error: function(e, text, ee) { - $().upload_loading_end(); - show_error_box(e, text, ee); - }, - success: function(s, x) { - $().upload_loading_end(); - if (typeof s.status !== "undefined" && s.status === "success") { - $("#force_unstable_updated").stop().slideDown(700); - setTimeout(function() { - $("#force_unstable_updated").slideUp(700); - }, 3000); - } - else { - show_error_box(); - } - }, - cache: false - }); - } - - function get_force_unstable_confirm(result, $element) { - if (typeof result.S_CONFIRM_ACTION !== "undefined" && result.YES_VALUE) { - $("#ext_force_unstable_confirm").children(".ext_update_ok").html(result.YES_VALUE).siblings(".ext_update_cancel").html(result.NO_VALUE).parent().show(); - $("#ext_force_unstable_text").html(result.MESSAGE_TEXT); - $element.qtip('api').reposition(); - $("#ext_force_unstable_confirm .ext_update_ok").bind("click", function(event) { - $().upload_loading_start(); - close_error_wrapper(); - $element.qtip('api').destroy(); - get_force_unstable_result(result); - }); - $("#ext_force_unstable_confirm .ext_update_cancel").bind("click", function(event) { - $element.qtip('api').destroy(); - }); - } else if (typeof result.status !== "undefined" && result.status === "success") { - $().upload_loading_end(); - $("#force_unstable_updated").stop().slideDown(700); - setTimeout(function() { - $("#force_unstable_updated").slideUp(700); - }, 3000); - } else { - $element.qtip('api').destroy(); - $().upload_loading_end(); - show_error_box(result.code, result.error, result.message); - } - } - - function add_set_force_unstable_toggle() { - $("#set_force_unstable_link").click(function(event) { - event.preventDefault(); - $("#version_check_settings").slideToggle(700); - }); - $("#version_check_settings").bind("submit", function(event) { - event.preventDefault(); - $("#version_check_settings").slideToggle(700); - $(".extension_toggle_wrapper[data-hasqtip], [data-ext-name][data-hasqtip]").qtip('destroy'); - var forceUnstable = ($("#force_unstable").is(":checked")) ? 1 : 0; - if (forceUnstable) { - upload_ext.qtip.forceUnstableConfirm(forceUnstable); - } - else { - $().upload_loading_start(); - close_error_wrapper(); - load_page('set_config_force_unstable', forceUnstable, get_force_unstable_confirm, $(this)); - } - }); - } - - // Determine extension status - function get_ext_status($toggle, determinePurged) { - return ($toggle.hasClass("extension_toggle_enabled")) ? 'Enabled' : ((!determinePurged || !$toggle.hasClass("extension_toggle_purged")) ? 'Disabled' : 'Uninstalled'); - } - - function update_ext_list() { - var $downloadListWrapper = $("#download_ext_list_wrapper"), - fullList = [], resultList = '', - listShow = parseInt($("#download_ext_list_show").val(), 10), - listGroup = parseInt($("#download_ext_list_group").val(), 10), - useEnglish = $("#download_ext_list_english").is(':checked'), - statusTypes = (listGroup == 0) ? ['Uploaded', 'Broken'] : ( - (listGroup == 1) ? ['Enabled', 'Disabled', 'Broken'] : - ['Enabled', 'Disabled', 'Uninstalled', 'Broken'] - ); - var i = statusTypes.length; - while (i--) { - fullList[statusTypes[i]] = []; - } - $(".upload_ext_list_content").each(function() { - var $this = $(this), listRow = '', extStatus = get_ext_status($this.find(".extension_toggle_wrapper"), true).toLowerCase(); - // Include display name - if (listShow != 1) { - listRow += $this.find(".upload_ext_list_name").text() + ' '; - } - // Include clean name - if (listShow != 2) { - listRow += '[' + $this.attr("data-ext-name") + '] '; - } - listRow += $this.find(".ext_version_bubble .description_value").text(); - switch (listGroup) { - case 0: - fullList['Uploaded'].push(listRow + ' (' + - ((useEnglish) ? extStatus : $downloadListWrapper.attr("data-ext-" + extStatus)) - + ')'); - break; - case 1: - fullList[get_ext_status($this.find(".extension_toggle_wrapper"))].push(listRow + - ((extStatus == 'uninstalled') ? ' (' + ((useEnglish) ? extStatus : $downloadListWrapper.attr("data-ext-uninstalled")) + ')' : '') - ); - break; - case 2: - fullList[get_ext_status($this.find(".extension_toggle_wrapper"), true)].push(listRow); - break; - } - }); - $(".upload_ext_list_unavailable").each(function() { - var $this = $(this), extStatus = (useEnglish) ? $this.attr("data-ext-status") : $downloadListWrapper.attr("data-ext-" + $this.attr("data-ext-status")); - fullList['Broken'].push($this.attr("data-ext-name") + ' (' + extStatus + ')'); - }); - i = statusTypes.length; - while (i--) { - if (!fullList[statusTypes[i]].length) { - continue; - } - fullList[statusTypes[i]].alphanumSort(true); - resultList = ((useEnglish) ? statusTypes[i] + ':' : $downloadListWrapper.attr("data-exts-" + statusTypes[i].toLowerCase())) + '\r\n' + fullList[statusTypes[i]].join('\r\n') + '\r\n\r\n' + resultList; - } - resultList = $downloadListWrapper.attr("data-ext-list-title") + '\r\n\r\n' + resultList + $downloadListWrapper.attr("data-ext-list-footer"); - $("#download_ext_list").val(resultList); - } - - /************************** - * Page prepare functions * - **************************/ - function load_main_page() { - /* For noscript compatibility we do it here instead of css file */ - $("#extupload").css("display", "none"); - $("#button_upload").css("display", "inline-block"); - - function upload_loading_indicator() { - $("#ext_upload_content").css("display", "none"); - $("#upload").css("display", "block"); - upload_ext.elem.main.one("loading", function() { - $("#ext_upload_content").css("display", "block"); - $("#upload").css("display", "none"); - }); - } - - $("#submit, .unpack_zip").click(function() { - upload_loading_indicator(); - }); - - $("#load_valid_phpbb_extensions").click(function(event) { - event.preventDefault(); - load_page("list_from_cdb"); - }); - - $(".upload_valid_ext_download_link").click(function(event) { - event.preventDefault(); - upload_loading_indicator(); - $("#remote_upload").val($(this).attr("data-ext-source")); - $("#ext_checksum_type_sha1").prop("checked", true); - $("#ext_checksum").val($(this).attr("data-ext-checksum")); - load_page("upload"); - }); - } - - function load_cdb_list_page() { - $(".upload_valid_ext_row").click(function(event) { - event.preventDefault(); - display_ext_description($(this)); - }).attr("title", $("#upload_valid_ext_description").attr("data-show-description")); - - $(".upload_valid_ext_row a").click(function(event) { - event.stopPropagation(); - }); - } - - function load_list_page() { - if ($(".upload_ext_list_content").length > 0) { - var $download_ext_wrapper = $("#download_ext_list_wrapper"); - update_ext_list(); - $("#download_ext_list_link").click(function(event) { - event.preventDefault(); - restore_modal_data_container(); - update_ext_list(); - show_modal_box($download_ext_wrapper.contents(), true, $download_ext_wrapper); - }).show(); - $("#download_ext_list_form").change(function() { - update_ext_list(); - }).find(".select_all_content").click(function() { - $("#download_ext_list").select(); - }); - } - } - - function load_details_page() { - /* For noscript compatibility we do it here instead of css file */ - $("#extupload").css("display", "none"); - $("#button_upload").css("display", "inline-block"); - setFileTree(); - add_enable_toggle(); - if ($("#description_updates").length > 0) { - upload_ext.qtip.updateActions(); - upload_ext.elem.main.one("loading", function() { - $(".extension_update_link").qtip('hide').qtip('destroy', true); - $(".show_ext_updates[data-hasqtip]").qtip('hide').qtip('destroy', true); - }); - } - /* Responsive tabs */ - upload_ext.elem.main.find('.ext_details_tabs').not('[data-skip-responsive]').each(function() { - var $this = $(this), - $body = upload_ext.elem.main, - ul = $this.children(), - tabs = ul.children().not('[data-skip-responsive]'), - links = tabs.children('a'), - maxHeight = 29, - lastWidth = false, - responsive = false; - - links.each(function() { - var link = $(this); - link.attr("data-link-image", link.children("i").attr("class")); - link.attr("data-link-name", link.children("span").html()); - //maxHeight = Math.max(maxHeight, Math.max(link.outerHeight(true), link.parent().outerHeight(true))); - }); - - function check() { - var width = $body.width(), - height = $this.height(); - - if (arguments.length == 0 && (!responsive || width <= lastWidth) && height <= maxHeight) { - return; - } - - links.each(function() { - var link = $(this); - link.attr("title", ""); - link.html(' ' + link.attr("data-link-name") + ''); - }); - - lastWidth = width; - height = $this.height(); - if (height <= maxHeight) { - responsive = false; - return; - } - - responsive = true; - - var availableTabs = tabs.filter(':not(.activetab, .responsive-tab)'), - total = availableTabs.length, - i, tab, link; - - for (i = total - 1; i >= 0; i--) { - tab = availableTabs.eq(i); - link = tab.children('a'); - link.attr("title", link.attr("data-link-name")); - link.html(''); - if ($this.height() <= maxHeight) { - return; - } - } - // If the space is really short. - tab = tabs.filter('.activetab'); - link = tab.children('a'); - link.attr("title", link.attr("data-link-name")); - link.html(''); - } - - check(true); - $(window).resize(check); - upload_ext.elem.main.one("loaded", check); - $this.on("tab_changed", check); - }); - $(".ext_details_tabs .tab").click(function(event) { - var $currentTab = $(this), - $detailsBlock = $(".ext_details_block"); - event.preventDefault(); - $detailsBlock.finish(); - $detailsBlock.parent().stop().css("height", $detailsBlock.parent().height() + "px"); - $detailsBlock.slideUp(700, function() { - $(".ext_details_tabs .activetab").toggleClass("activetab"); - switch ($currentTab.attr("id")) { - case 'ext_details_main_tab': - $(".ext_details_markdown, #ext_details_faq, #filetree, #ext_languages, #ext_details_tools").css("display", "none"); - $("#ext_details_content").css("display", "block"); - break; - case 'ext_details_readme_tab': - $("#filetree, .ext_details_markdown, #ext_details_faq, #ext_details_content, #ext_languages, #ext_details_tools").css("display", "none"); - $("#ext_details_readme").css("display", "block"); - break; - case 'ext_details_changelog_tab': - $("#filetree, .ext_details_markdown, #ext_details_faq, #ext_details_content, #ext_languages, #ext_details_tools").css("display", "none"); - $("#ext_details_changelog").css("display", "block"); - break; - case 'ext_details_faq_tab': - $("#filetree, .ext_details_markdown, #ext_details_content, #ext_languages, #ext_details_tools").css("display", "none"); - $("#ext_details_faq").css("display", "block"); - break; - case 'ext_details_languages_tab': - $(".ext_details_markdown, #ext_details_faq, #filetree, #ext_details_content, #ext_details_tools").css("display", "none"); - $("#ext_languages").css("display", "block"); - break; - case 'ext_details_filetree_tab': - $(".ext_details_markdown, #ext_details_faq, #ext_details_content, #ext_languages, #ext_details_tools").css("display", "none"); - $("#filetree").css("display", "block"); - break; - case 'ext_details_tools_tab': - $(".ext_details_markdown, #ext_details_faq, #filetree, #ext_details_content, #ext_languages").css("display", "none"); - $("#ext_details_tools").css("display", "block"); - break; - } - $currentTab.toggleClass("activetab"); - var restored = false; - $detailsBlock.slideDown({ - duration: 700, - progress: function(an, progress, ms) { - if (!restored && $detailsBlock.height() >= $detailsBlock.parent().height()) { - $detailsBlock.parent().css("height", ""); - restored = true; - } - }, - complete: function() { - if (!restored) { - $detailsBlock.parent().animate({ - height: $detailsBlock.parent().children(".ext_details_tabs").outerHeight() + $detailsBlock.outerHeight() - }, 500, function() { - $detailsBlock.parent().css("height", ""); - }); - restored = true; - } - // We do it here because the scrollbar can be not displayed when the tab is not shown. - $currentTab.parent().trigger("tab_changed"); - } - }); - }); - }); - // Detect the request to load the languages tab. - if ($("#ext_languages").attr("data-ext-show-languages") === "true") { - $(".ext_details_tabs .activetab").toggleClass("activetab"); - $("#ext_details_languages_tab").addClass("activetab"); - $("#filetree, .ext_details_markdown, #ext_details_content, #ext_details_tools, #ext_details_faq").css("display", "none"); - $("#ext_languages").css("display", "block"); - } - if ($("#ext_details_faq").length) { - // Detect the request to load the FAQ tab. - if ($("#ext_details_faq").attr("data-ext-show-faq") === "true") { - $(".ext_details_tabs .activetab, #ext_details_faq_tab").toggleClass("activetab"); - $("#filetree, .ext_details_markdown, #ext_details_content, #ext_details_tools, #ext_languages").css("display", "none"); - $("#ext_details_faq").css("display", "block"); - } - $(".upload_ext_faq_answer").hide(); - var show_upload_ext_faq_element = function(event) { - var $element = $(this); - $(".upload_ext_faq_question").not(".grey_question").not(this).unbind("click").bind("click", show_upload_ext_faq_element).addClass("grey_question").next(".upload_ext_faq_answer").slideUp(); - $element.unbind("click", show_upload_ext_faq_element).removeClass("grey_question").next(".upload_ext_faq_answer").slideDown(function() { - $element.bind("click", hide_upload_ext_faq_element); - }); - }, - hide_upload_ext_faq_element = function(event) { - var $element = $(this); - $element.unbind("click", hide_upload_ext_faq_element).next(".upload_ext_faq_answer").slideUp(function() { - $element.bind("click", show_upload_ext_faq_element); - }); - $(".upload_ext_faq_question").not(this).removeClass("grey_question"); - }; - $(".upload_ext_faq_question").css("cursor", "pointer").bind("click", show_upload_ext_faq_element); - } - $(".ext_versioncheck_force_link").click(function(event) { - event.preventDefault(); - $().upload_loading_start(); - close_error_wrapper(); - $("#ext_versioncheck_error_box").slideUp(700); - $("#meta_version").removeClass("description_value_ok description_value_old").attr("title", ""); - load_page("versioncheck_force", $("h1.ExtensionName span").attr("data-ext-name"), get_versioncheck_result, $(this)); - }); - $(".ext_restore_languages").click(function(event) { - event.preventDefault(); - load_page("restore_languages", $(this).attr("data-ext-restore")); - }); - } - - function check_details_page() { - var $detailsBlock = $(".ext_details_block"), $reloadLink = $(".ext_reload_link"); - // Reload the details page if this was not an ajax request and if not the full page has been loaded (we do not need it if we load languages for Upload Extensions). - if (($detailsBlock.length > 0) && ($detailsBlock.attr("data-load-full-page") != "1") && (typeof $reloadLink.attr("data-upload-ext") === "undefined" || $("#ext_languages").attr("data-ext-show-languages") !== "true")) { // This is needed because filetree, readme and changelog are downloaded together if JavaScript is used. - load_page("details", $reloadLink.attr("data-ext-name")); - } - } - - function load_zip_packages_page() { - $(".unpack_zip").click(function(event) { - event.preventDefault(); - load_page("local_upload", $(this).attr("data-upload-link")); - }); - $("#upload_pagination li a").click(function(event) { - event.preventDefault(); - load_page("zip_packages", $(this).attr("href")); - }); - } - - /***************************** - * Server response functions * - *****************************/ - function check_response(res) { - if (typeof res.FORCE_UPDATE !== "undefined") { - load_page("force_update"); - return false; - } else if (typeof res !== "object") { - if (res.match(/ -1) { - action = s.action = "details"; - id = $("h1.ExtensionName span").attr("data-ext-name"); - } - } - if (upload_replace_history) { - upload_replace_history = false; - phpbb.history.replaceUrl(upload_ext.fn.main_attr("data-page-url") + "&action=" + s.action + generate_get_request() + "&ajax=1", document.title, { - action: action, - id: id, - replaced: true - }); - } else if (upload_stop_history) { - upload_stop_history = false; - } else { - phpbb.history.pushUrl(upload_ext.fn.main_attr("data-page-url") + "&action=" + s.action + generate_get_request() + "&ajax=1", document.title, { - action: action, - id: id - }); - } - $().upload_loading_end(); - upload_ext.elem.wrapper.finish().attr("style", "display:none;").slideDown(700, "linear", function() { - $("#upload_main_wrapper, #upload_main").removeClass("main_transformation"); - upload_ext.elem.main.trigger("loaded"); - }); - } - - function generate_get_request() { - if ($.inArray(action, getExtension) > -1) { - return "&ext_name=" + id; - } - switch (action) { - case "local_upload": - return "&local_upload=" + id; - case "set_config_force_unstable": - return "&force_unstable=" + id; - case "list": - return (typeof id !== "undefined" && id === "versioncheck_force") ? "&versioncheck_force=1" : ""; - } - return ""; - } - - if (typeof local === "undefined") { - $temp_container.append(upload_ext.elem.main.contents()); - } - - if (action === "upload" || action === "upload_update" || action === "upload_language") { - var $this = $("#ext_upload"); - if (action === "upload_update") { - $this = $("#upload_ext_update"); - action = "upload"; // The common action for the server. - } - data = $this.serializeArray(); - method = $this.attr('method') || 'GET'; - $this.ajaxSubmit({ - url: page_url + "&ajax_action=" + action, // window.location.href - target: upload_ext.elem.main, - uploadProgress: function(e, pos, total, percentComplete) { - if (percentComplete) { - $().upload_loading_progress(percentComplete); - } - }, - error: function(e, text, ee) { - show_error_modal_box(e.responseText); - if (upload_stop_history) { - upload_stop_history = false; - } - $().upload_loading_end(); - show_error_box(e, text, ee); - }, - success: function(s, x) { - if (action === "upload_language" && typeof s === "object" && typeof s.REFRESH !== "undefined") { - // Reload the page after installing current language package. - window.location.href = upload_ext.fn.main_attr("data-page-action") + "&action=details&ext_show=languages&result=language_uploaded&ajax=1&lang=" + s.LANGUAGE; - } - else if (check_response(s)) { - page_loaded($(this), s); - } - } - }); - } - else { - $.ajax({ - url: ((action === "zip_packages" && typeof id !== "undefined") ? id : page_url) + "&ajax_action=" + action + generate_get_request(), - context: upload_ext.elem.main, - error: function(e, text, ee) { - show_error_modal_box(e.responseText); - if (typeof local !== "undefined") { - local({ - ext_name: id, - status: 'load_error', - error: text, - code: e.status, - message: ee - }, element); - return; - } - if (upload_stop_history) { - upload_stop_history = false; - } - $().upload_loading_end(); - show_error_box(e, text, ee); - }, - success: function(s, x) { - if (typeof local !== "undefined") { - if (typeof s.status !== "undefined" && s.status === "force_update") { - load_page_process(action, id, local, element); // Repeat the request. - } else { - local(s, element); - } - return; - } - if (check_response(s)) { - page_loaded($(this), s); - } - }, - cache: false - }); - } - if (typeof local === "undefined") { - upload_ext.elem.main.trigger("loading"); - } - } - - // Bind load_page events - function bind_load_events(action) { - $(".upload_load_zip").click(function(event) { - event.preventDefault(); - load_page("zip_packages"); - }); - - $(".upload_load_uninstalled").click(function(event) { - event.preventDefault(); - load_page("uninstalled"); - }); - - $(".upload_load_list").click(function(event) { - event.preventDefault(); - load_page("list"); - }); - - $("#upload_load_main").click(function(event) { - event.preventDefault(); - load_page("main"); - }); - - $("#upload_load_main_list").click(function(event) { - event.preventDefault(); - load_page("list"); - }); - - $("#versioncheck_force_update_all").click(function(event) { - event.preventDefault(); - load_page("list", "versioncheck_force"); - }); - - $(".upload-main-content #ext_upload").submit(function(event) { - event.preventDefault(); - load_page("upload"); - }); - - $(".ext_details_block #ext_upload").submit(function(event) { - event.preventDefault(); - load_page("upload_language"); - }); - - $("#upload_ext_update").submit(function(event) { - event.preventDefault(); - load_page("upload_update"); - }); - - $(".upload_get_details_link").click(function(event) { - event.preventDefault(); - load_page("details", $(this).attr("data-ext-name")); - }); - - switch (action) { - case "list_from_cdb": - load_cdb_list_page(); - /* falls through */ - case "main": - load_main_page(); - break; - case "upload_language": - add_language_tip(); - load_details_page(); - break; - case "upload": - case "local_upload": - case "force_update": - case "restore_languages": - add_enable_tip(); - /* falls through */ - case "faq": - case "details": - load_details_page(); - break; - case "list": - add_enable_toggle(); - add_set_force_unstable_toggle(); - load_list_page(); - break; - case "zip_packages": - load_zip_packages_page(); - break; - } - } - - /* Work with browser's history. */ - var upload_stop_history = false, upload_replace_history = false; - $(window).on("popstate", function(e) { - var currentState = e.originalEvent.state; - if (currentState.first) { - window.location.reload(); - } else { - upload_stop_history = true; - $("[data-hasqtip]").qtip('destroy'); // Destroy all previously shown qTips. - load_page(currentState.action, currentState.id); - } - }); - - /* Workaround for browser's cache. */ - if (phpbb.history.isSupported("state")) { - $(window).on("unload", function() { - var currentState = history.state, d = new Date(); - if (currentState !== null) { - phpbb.history.replaceUrl(window.location.href + '&ajax_time=' + d.getTime(), document.title, currentState); - } - }); - - var currentState = history.state; - if (currentState !== null) { - phpbb.history.replaceUrl(window.location.href.replace(/&ajax_time=\d*/i, ''), document.title, currentState); - } else { - phpbb.history.replaceUrl(window.location.href, document.title, { - action: upload_ext.fn.main_attr("data-page-action"), - id: null, - first: true - }); - } - } - - /* Initialize loaded page. */ - bind_load_events(upload_ext.fn.main_attr("data-load-action")); - check_details_page(); -})(jQuery, window, document); - -function browseFile() { - document.getElementById('extupload').click(); -} - -function setFileName() { - document.getElementById('remote_upload').value = document.getElementById("extupload").files[0].name; -} diff --git a/composer.json b/composer.json deleted file mode 100644 index 3531daa..0000000 --- a/composer.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "boardtools/upload", - "type": "phpbb-extension", - "description": "Upload Extensions enables you to upload extensions' zip files or delete extensions' folders from the server. With this extension you can install/update/delete extensions without using FTP. If the uploaded extension already exists, it will be updated with the uploaded files. Upload Extensions also has other built-in features such as the manager for extensions' language packages and the manager for extensions' zip files.", - "homepage": "http://boardtools.github.io/upload/", - "version": "3.2.0-RC", - "keywords": ["boardtools", "forumhulp", "phpbb", "extension", "upload", "unzip", "zip", "delete", "unpack"], - "license": "GPL-2.0", - "authors": [ - { - "name": "Igor Lavrov", - "homepage": "https://github.com/lavigor", - "role": "Developer, maintainer" - }, - { - "name": "John Peskens", - "homepage": "http://forumhulp.com", - "email": "info@forumhulp.com", - "role": "Former developer" - } - ], - "require": { - "php": ">=5.3.3", - "michelf/php-markdown": "~1.4", - "fortawesome/font-awesome": "~4.3" - }, - "require-dev": { - "phpbb/epv": "dev-master" - }, - "autoload": { - "psr-4": { - "Michelf\\": "vendor/michelf/php-markdown/Michelf/" - } - }, - "extra": { - "display-name": "Upload Extensions", - "soft-require": { - "phpbb/phpbb": ">=3.1.0" - }, - "version-check": { - "host": "boardtools.github.io", - "directory": "/upload", - "filename": "upload.json" - } - } -} diff --git a/composer.lock b/composer.lock deleted file mode 100644 index f7c5c6b..0000000 --- a/composer.lock +++ /dev/null @@ -1,522 +0,0 @@ -{ - "_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" - ], - "hash": "c178ed24d5726a35839281e0696b7564", - "content-hash": "bcc598d50aedc2f76c6a4ee6032f7301", - "packages": [ - { - "name": "fortawesome/font-awesome", - "version": "v4.5.0", - "source": { - "type": "git", - "url": "https://github.com/FortAwesome/Font-Awesome.git", - "reference": "dbc8d1b9b67daaab357bcc41dbf549c3684cf5f1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/FortAwesome/Font-Awesome/zipball/dbc8d1b9b67daaab357bcc41dbf549c3684cf5f1", - "reference": "dbc8d1b9b67daaab357bcc41dbf549c3684cf5f1", - "shasum": "" - }, - "require-dev": { - "jekyll": "1.0.2", - "lessc": "1.4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "OFL-1.1", - "MIT" - ], - "authors": [ - { - "name": "Dave Gandy", - "email": "dave@fontawesome.io", - "homepage": "http://twitter.com/davegandy", - "role": "Developer" - } - ], - "description": "The iconic font and CSS framework", - "homepage": "http://fontawesome.io/", - "keywords": [ - "FontAwesome", - "awesome", - "bootstrap", - "font", - "icon" - ], - "time": "2015-11-23 14:42:32" - }, - { - "name": "michelf/php-markdown", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/michelf/php-markdown.git", - "reference": "e1aabe18173231ebcefc90e615565742fc1c7fd9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/michelf/php-markdown/zipball/e1aabe18173231ebcefc90e615565742fc1c7fd9", - "reference": "e1aabe18173231ebcefc90e615565742fc1c7fd9", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-lib": "1.4.x-dev" - } - }, - "autoload": { - "psr-0": { - "Michelf": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "John Gruber", - "homepage": "http://daringfireball.net/" - }, - { - "name": "Michel Fortin", - "email": "michel.fortin@michelf.ca", - "homepage": "https://michelf.ca/", - "role": "Developer" - } - ], - "description": "PHP Markdown", - "homepage": "https://michelf.ca/projects/php-markdown/", - "keywords": [ - "markdown" - ], - "time": "2015-03-01 12:03:08" - } - ], - "packages-dev": [ - { - "name": "gitonomy/gitlib", - "version": "v0.1.7", - "source": { - "type": "git", - "url": "https://github.com/gitonomy/gitlib.git", - "reference": "7a46107cfb8552b312101e0d5906e95d54d7ddc6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/gitonomy/gitlib/zipball/7a46107cfb8552b312101e0d5906e95d54d7ddc6", - "reference": "7a46107cfb8552b312101e0d5906e95d54d7ddc6", - "shasum": "" - }, - "require": { - "symfony/process": "~2.4" - }, - "require-dev": { - "psr/log": "~1" - }, - "suggest": { - "psr/log": "Add some log" - }, - "type": "library", - "autoload": { - "psr-0": { - "Gitonomy\\Git": [ - "src/", - "tests/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Alexandre Salom\u00e9", - "email": "alexandre.salome@gmail.com", - "homepage": "http://alexandre-salome.fr" - }, - { - "name": "Julien DIDIER", - "email": "genzo.wm@gmail.com", - "homepage": "http://www.jdidier.net" - } - ], - "description": "Library for accessing git", - "homepage": "http://gitonomy.com", - "time": "2014-07-13 19:02:31" - }, - { - "name": "nikic/php-parser", - "version": "v0.9.5", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "ef70767475434bdb3615b43c327e2cae17ef12eb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/ef70767475434bdb3615b43c327e2cae17ef12eb", - "reference": "ef70767475434bdb3615b43c327e2cae17ef12eb", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.9-dev" - } - }, - "autoload": { - "psr-0": { - "PHPParser": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "time": "2014-07-23 18:24:17" - }, - { - "name": "phpbb/epv", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/phpbb/epv.git", - "reference": "a054539914b0dd2c625c4694059730c517e59623" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpbb/epv/zipball/a054539914b0dd2c625c4694059730c517e59623", - "reference": "a054539914b0dd2c625c4694059730c517e59623", - "shasum": "" - }, - "require": { - "gitonomy/gitlib": "0.1.*@dev", - "nikic/php-parser": "0.9.*@dev", - "php": ">=5.3.3", - "sensiolabs/ansi-to-html": "~1.1", - "symfony/console": ">=2.3,<2.7", - "symfony/finder": ">=2.3,<2.7", - "symfony/process": ">=2.3,<2.7", - "symfony/yaml": ">=2.3,<2.7" - }, - "require-dev": { - "phpunit/phpunit": "4.4.*", - "phpunit/phpunit-mock-objects": "2.3.*" - }, - "bin": [ - "src/EPV.php" - ], - "type": "library", - "autoload": { - "psr-4": { - "Phpbb\\Epv\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0" - ], - "authors": [ - { - "name": "Paul Sohier", - "email": "paul@phpbb.com" - } - ], - "description": "A extension validator for phpBB extensions. Extensions are required to pass the validator when submitted to the extension database.", - "time": "2015-06-26 10:43:47" - }, - { - "name": "sensiolabs/ansi-to-html", - "version": "v1.1.2", - "source": { - "type": "git", - "url": "https://github.com/sensiolabs/ansi-to-html.git", - "reference": "02598b975c510e9e7d07d0be0a89c7a6b43464d6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/ansi-to-html/zipball/02598b975c510e9e7d07d0be0a89c7a6b43464d6", - "reference": "02598b975c510e9e7d07d0be0a89c7a6b43464d6", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "suggest": { - "twig/twig": "Provides nice templating features" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-0": { - "SensioLabs\\AnsiConverter": "." - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "A library to convert a text with ANSI codes to HTML", - "time": "2015-07-22 03:07:58" - }, - { - "name": "symfony/console", - "version": "v2.6.12", - "target-dir": "Symfony/Component/Console", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "0e5e18ae09d3f5c06367759be940e9ed3f568359" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0e5e18ae09d3f5c06367759be940e9ed3f568359", - "reference": "0e5e18ae09d3f5c06367759be940e9ed3f568359", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1", - "symfony/phpunit-bridge": "~2.7", - "symfony/process": "~2.1" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Console\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Console Component", - "homepage": "https://symfony.com", - "time": "2015-07-26 09:08:40" - }, - { - "name": "symfony/finder", - "version": "v2.6.12", - "target-dir": "Symfony/Component/Finder", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "203a10f928ae30176deeba33512999233181dd28" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/203a10f928ae30176deeba33512999233181dd28", - "reference": "203a10f928ae30176deeba33512999233181dd28", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Finder\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Finder Component", - "homepage": "https://symfony.com", - "time": "2015-07-09 16:02:48" - }, - { - "name": "symfony/process", - "version": "v2.6.12", - "target-dir": "Symfony/Component/Process", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "57f1e88bb5dafa449b83f9f265b11d52d517b3e9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/57f1e88bb5dafa449b83f9f265b11d52d517b3e9", - "reference": "57f1e88bb5dafa449b83f9f265b11d52d517b3e9", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Process\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Process Component", - "homepage": "https://symfony.com", - "time": "2015-06-30 16:10:16" - }, - { - "name": "symfony/yaml", - "version": "v2.6.12", - "target-dir": "Symfony/Component/Yaml", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "c044d1744b8e91aaaa0d9bac683ab87ec7cbf359" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/c044d1744b8e91aaaa0d9bac683ab87ec7cbf359", - "reference": "c044d1744b8e91aaaa0d9bac683ab87ec7cbf359", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Yaml\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2015-07-26 08:59:42" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": { - "phpbb/epv": 20 - }, - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=5.3.3" - }, - "platform-dev": [] -} diff --git a/config/services.yml b/config/services.yml deleted file mode 100644 index 7c33178..0000000 --- a/config/services.yml +++ /dev/null @@ -1,7 +0,0 @@ -services: - boardtools.upload.listener: - class: boardtools\upload\event\listener - arguments: - - '@user' - tags: - - { name: event.listener } diff --git a/event/listener.php b/event/listener.php deleted file mode 100644 index b922e33..0000000 --- a/event/listener.php +++ /dev/null @@ -1,54 +0,0 @@ -user = $user; - } - - static public function getSubscribedEvents() - { - return array( - 'core.acp_board_config_edit_add' => 'add_config', - ); - } - - public function add_config($event) - { - if ($event['mode'] == 'server') - { - $this->user->add_lang_ext('boardtools/upload', 'upload'); - $display_vars = $event['display_vars']; - $new_vars = array( - 'upload_ext_dir' => array('lang' => 'ACP_UPLOAD_EXT_DIR', 'validate' => 'path', 'type' => 'text:20:255', 'explain' => true), - ); - $display_vars['vars'] = phpbb_insert_config_array($display_vars['vars'], $new_vars, array('after' => 'ranks_path')); - $event['display_vars'] = $display_vars; - } - } -} diff --git a/includes/compatibility/base.php b/includes/compatibility/base.php deleted file mode 100644 index 334782e..0000000 --- a/includes/compatibility/base.php +++ /dev/null @@ -1,104 +0,0 @@ -assign_var('FONTAWESOME_NEEDED', true); - return; - } - - /** - * {@inheritdoc} - */ - public function get_exception_message($e) - { - return $e; - } - - /** - * {@inheritdoc} - */ - public function get_faq() - { - objects::$user->add_lang_ext('boardtools/upload', 'upload', false, true); - return objects::$user->help; - } - - /** - * {@inheritdoc} - */ - public function get_upload_object() - { - if (!class_exists('\fileupload')) - { - include(objects::$phpbb_root_path . 'includes/functions_upload.' . objects::$phpEx); - } - return new \fileupload(); - } - - /** - * {@inheritdoc} - */ - public function form_upload($upload) - { - return $upload->form_upload('extupload'); - } - - /** - * Remote upload method - * Uploads file from given url - * - * @param \fileupload $upload Files object - * @param string $remote_url URL pointing to file to upload, for example http://www.foobar.com/example.gif - * @param \phpbb\mimetype\guesser $mimetype_guesser Mimetype guesser - * @return object $file Object "filespec" is returned, all further operations can be done with this object - */ - public function remote_upload($upload, $remote_url, \phpbb\mimetype\guesser $mimetype_guesser = null) - { - $upload_ary = array(); - $upload_ary['local_mode'] = true; - - $upload_from_phpbb = preg_match(objects::$phpbb_link_template, $remote_url, $match_phpbb); - - if (!preg_match('#^(https?://).*?\.(' . implode('|', $upload->allowed_extensions) . ')$#i', $remote_url, $match) && !$upload_from_phpbb) - { - $file = new \fileerror(objects::$user->lang[$upload->error_prefix . 'URL_INVALID']); - return $file; - } - - if (empty($match[2]) && empty($match_phpbb[2])) - { - $file = new \fileerror(objects::$user->lang[$upload->error_prefix . 'URL_INVALID']); - return $file; - } - - $url = parse_url($remote_url); - - $host = $url['host']; - $path = $url['path']; - $port = (!empty($url['port'])) ? (int) $url['port'] : 80; - - $upload_ary['type'] = 'application/octet-stream'; - - $url['path'] = explode('.', $url['path']); - $ext = array_pop($url['path']); - - $url['path'] = implode('', $url['path']); - $upload_ary['name'] = utf8_basename($url['path']) . (($ext) ? '.' . $ext : ''); - $filename = $url['path']; - $filesize = 0; - - $remote_max_filesize = $upload->max_filesize; - if (!$remote_max_filesize) - { - $max_filesize = @ini_get('upload_max_filesize'); - - if (!empty($max_filesize)) - { - $unit = strtolower(substr($max_filesize, -1, 1)); - $remote_max_filesize = (int) $max_filesize; - - switch ($unit) - { - case 'g': - $remote_max_filesize *= 1024; - // no break - case 'm': - $remote_max_filesize *= 1024; - // no break - case 'k': - $remote_max_filesize *= 1024; - // no break - } - } - } - - $errno = 0; - $errstr = ''; - - if (!($fsock = @fopen($remote_url, "r"))) - { - $file = new \fileerror(objects::$user->lang[$upload->error_prefix . 'NOT_UPLOADED']); - return $file; - } - - // Make sure $path not beginning with / - if (strpos($path, '/') === 0) - { - $path = substr($path, 1); - } - - $get_info = false; - $data = ''; - $length = false; - $timer_stop = time() + $upload->upload_timeout; - - while (!@feof($fsock)) - { - if ($length) - { - // Don't attempt to read past end of file if server indicated length - $block = @fread($fsock, min($length - $filesize, 1024)); - } - else - { - $block = @fread($fsock, 1024); - } - - $filesize += strlen($block); - - if ($remote_max_filesize && $filesize > $remote_max_filesize) - { - $max_filesize = get_formatted_filesize($remote_max_filesize, false); - - $file = new \fileerror(sprintf(objects::$user->lang[$upload->error_prefix . 'WRONG_FILESIZE'], $max_filesize['value'], $max_filesize['unit'])); - return $file; - } - - $data .= $block; - - // Cancel upload if we exceed timeout - if (time() >= $timer_stop) - { - $file = new \fileerror(objects::$user->lang[$upload->error_prefix . 'REMOTE_UPLOAD_TIMEOUT']); - return $file; - } - } - @fclose($fsock); - - if (empty($data)) - { - $file = new \fileerror(objects::$user->lang[$upload->error_prefix . 'EMPTY_REMOTE_DATA']); - return $file; - } - - $tmp_path = (@is_writable('/tmp/')) ? '/tmp/' : objects::$phpbb_root_path . 'cache/'; - $filename = tempnam($tmp_path, unique_id() . '-'); - - if (!($fp = @fopen($filename, 'wb'))) - { - $file = new \fileerror(objects::$user->lang[$upload->error_prefix . 'NOT_UPLOADED']); - return $file; - } - - $upload_ary['size'] = fwrite($fp, $data); - fclose($fp); - unset($data); - - $upload_ary['tmp_name'] = $filename; - - $file = new \filespec($upload_ary, $upload, $mimetype_guesser); - if ($upload_from_phpbb) - { - $file->extension = 'zip'; - } - $upload->common_checks($file); - - return $file; - } - - /** - * {@inheritdoc} - */ - public function escape($var, $multibyte) - { - /* - * $request->escape() was added in phpBB 3.1.2, - * however there is no need to check the version because this is - * exactly the same method implementation. - * So we fall back to this method for the whole phpBB 3.1 branch. - */ - $type_cast_helper = new \phpbb\request\type_cast_helper(); - if (is_array($var)) - { - $result = array(); - foreach ($var as $key => $value) - { - $type_cast_helper->set_var($key, $key, gettype($key), $multibyte); - $result[$key] = $this->escape($value, $multibyte); - } - $var = $result; - } - else - { - $type_cast_helper->set_var($var, $var, 'string', $multibyte); - } - - return $var; - } - - /** - * Gets a parameter of filespec object. - * - * @param \filespec $file Filespec object - * @param string $param 'init_error' for checking if there are any errors, - * 'filename' or 'destination_file' for getting corresponding values - * @return mixed - */ - public function filespec_get($file, $param) - { - switch ($param) - { - case 'init_error': - return $file->init_error; - break; - case 'filename': - return $file->filename; - break; - case 'destination_file': - return $file->destination_file; - break; - } - return false; - } - - /** - * {@inheritdoc} - */ - public function create_metadata_manager($name) - { - return objects::$phpbb_extension_manager->create_extension_metadata_manager($name, objects::$template); - } - - /** - * {@inheritdoc} - */ - public function output_template_data(\phpbb\extension\metadata_manager $metadata_manager) - { - $metadata_manager->output_template_data(); - } - - /** - * Gets the latest extension update for the current extension branch the user is on - * Will suggest versions from newer branches when EoL has been reached - * and/or version from newer branch is needed for having all known security - * issues fixed. - * - * @param \phpbb\version_helper $version_helper Version helper object. - * @param string $current_version Current version of the extension. - * @param bool $force_update Ignores cached data. Defaults to false. - * @param bool $force_cache Force the use of the cache. Override $force_update. - * @return array Version info or empty array if there are no updates - * @throws \RuntimeException - */ - protected function get_ext_update_on_branch($version_helper, $current_version, $force_update = false, $force_cache = false) - { - $versions = $version_helper->get_versions_matching_stability($force_update, $force_cache); - - // Get current branch from version, e.g.: 3.2 - preg_match('/^(\d+\.\d+).*$/', objects::$config['version'], $matches); - $current_branch = $matches[1]; - - // Filter out any versions less than the current version - $versions = array_filter($versions, function($data) use ($version_helper, $current_version) { - return $version_helper->compare($data['current'], $current_version, '>='); - }); - - // Filter out any phpbb branches less than the current version - $branches = array_filter(array_keys($versions), function($branch) use ($version_helper, $current_branch) { - return $version_helper->compare($branch, $current_branch, '>='); - }); - if (!empty($branches)) - { - $versions = array_intersect_key($versions, array_flip($branches)); - } - else - { - // If branches are empty, it means the current phpBB branch is newer than any branch the - // extension was validated against. Reverse sort the versions array so we get the newest - // validated release available. - krsort($versions); - } - - // Get the first available version from the previous list. - $update_info = array_reduce($versions, function($value, $data) use ($version_helper, $current_version) { - if ($value === null && $version_helper->compare($data['current'], $current_version, '>=')) - { - if (!$data['eol'] && (!$data['security'] || $version_helper->compare($data['security'], $data['current'], '<='))) - { - return $version_helper->compare($data['current'], $current_version, '>') ? $data : array(); - } - else - { - return null; - } - } - - return $value; - }); - - return $update_info === null ? array() : $update_info; - } - - /** - * Check the version and return the available updates. - * - * @param \phpbb\extension\metadata_manager $md_manager The metadata manager for the version to check. - * @param bool $force_update Ignores cached data. Defaults to false. - * @param bool $force_cache Force the use of the cache. Override $force_update. - * @param string $stability Force the stability (null by default). - * @return array - * @throws \RuntimeException - */ - public function version_check(\phpbb\extension\metadata_manager $md_manager, $force_update = false, $force_cache = false, $stability = null) - { - $cache = objects::$cache; - $config = objects::$config; - $user = objects::$user; - $meta = $md_manager->get_metadata('all'); - - if (!isset($meta['extra']['version-check'])) - { - throw new \RuntimeException($user->lang('NO_VERSIONCHECK'), 1); - } - - $version_check = $meta['extra']['version-check']; - - if (version_compare($config['version'], '3.1.1', '>')) - { - $version_helper = new \phpbb\version_helper($cache, $config, new \phpbb\file_downloader(), $user); - } - else - { - $version_helper = new \phpbb\version_helper($cache, $config, $user); - } - $version_helper->set_current_version($meta['version']); - if (version_compare($config['version'], '3.1.7', '>')) - { - $version_helper->set_file_location($version_check['host'], $version_check['directory'], $version_check['filename'], isset($version_check['ssl']) ? $version_check['ssl'] : false); - } - else - { - $version_helper->set_file_location($version_check['host'], $version_check['directory'], $version_check['filename']); - } - $version_helper->force_stability($stability); - - return $this->get_ext_update_on_branch($version_helper, $meta['version'], $force_update, $force_cache); - } -} diff --git a/includes/compatibility/v_3_2_x.php b/includes/compatibility/v_3_2_x.php deleted file mode 100644 index c44f1e4..0000000 --- a/includes/compatibility/v_3_2_x.php +++ /dev/null @@ -1,287 +0,0 @@ -get('files.upload'); - } - - /** - * {@inheritdoc} - */ - public function get_exception_message($e) - { - return call_user_func_array(array(objects::$user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters())); - } - - /** - * Loads the FAQ language file. - * Old FAQ style is used for easier compatibility with previous phpBB versions. - * - * @param array $help Reference to the array of FAQ strings. - */ - protected function load_faq(&$help) - { - // Determine path to language directory - $path = objects::$phpbb_extension_manager->get_extension_path('boardtools/upload', true) . 'language/'; - $faq_file = '/help_upload.' . objects::$phpEx; - if (file_exists($path . objects::$user->data['user_lang'] . $faq_file)) - { - // Do not suppress error if in DEBUG mode - if (defined('DEBUG')) - { - include $path . objects::$user->data['user_lang'] . $faq_file; - } - else - { - @include $path . objects::$user->data['user_lang'] . $faq_file; - } - } - else if (file_exists($path . 'en' . $faq_file)) - { - // Do not suppress error if in DEBUG mode - if (defined('DEBUG')) - { - include $path . 'en' . $faq_file; - } - else - { - @include $path . 'en' . $faq_file; - } - } - } - - /** - * {@inheritdoc} - */ - public function get_faq() - { - $faq_help = array(); - $this->load_faq($faq_help); - return $faq_help; - } - - /** - * {@inheritdoc} - */ - public function get_upload_object() - { - return objects::$upload; - } - - /** - * {@inheritdoc} - */ - public function form_upload($upload) - { - return $upload->handle_upload('files.types.form', 'extupload'); - } - - /** - * {@inheritdoc} - */ - public function remote_upload($upload, $remote_url) - { - /** @var \boardtools\upload\includes\types\zip */ - $upload_zip = new \boardtools\upload\includes\types\zip( - objects::$phpbb_container->get('files.factory'), - objects::$phpbb_container->get('language'), - objects::$phpbb_container->get('php_ini'), - objects::$phpbb_container->get('request'), - objects::$phpbb_container->getParameter('core.root_path') - ); - $upload_zip->set_upload(objects::$upload); - - return $upload_zip->upload($remote_url); - } - - /** - * {@inheritdoc} - */ - public function escape($var, $multibyte) - { - return objects::$request->escape($var, $multibyte); - } - - /** - * {@inheritdoc} - */ - public function filespec_get($file, $param) - { - switch ($param) - { - case 'init_error': - return $file->init_error(); - break; - case 'filename': - case 'destination_file': - return $file->get($param); - break; - } - return false; - } - - /** - * {@inheritdoc} - */ - public function create_metadata_manager($name) - { - return objects::$phpbb_extension_manager->create_extension_metadata_manager($name); - } - - /** - * {@inheritdoc} - */ - public function output_template_data(\phpbb\extension\metadata_manager $metadata_manager) - { - if (phpbb_version_compare(objects::$config['version'], '3.2.0', '>')) - { - $metadata = $metadata_manager->get_metadata('all'); - $this->output_metadata_to_template($metadata); - } - else - { - $metadata_manager->output_template_data(objects::$template); - } - } - - /** - * Outputs extension metadata into the template - * - * @param array $metadata Array with all metadata for the extension - */ - public function output_metadata_to_template($metadata) - { - objects::$template->assign_vars(array( - 'META_NAME' => $metadata['name'], - 'META_TYPE' => $metadata['type'], - 'META_DESCRIPTION' => (isset($metadata['description'])) ? $metadata['description'] : '', - 'META_HOMEPAGE' => (isset($metadata['homepage'])) ? $metadata['homepage'] : '', - 'META_VERSION' => $metadata['version'], - 'META_TIME' => (isset($metadata['time'])) ? $metadata['time'] : '', - 'META_LICENSE' => $metadata['license'], - - 'META_REQUIRE_PHP' => (isset($metadata['require']['php'])) ? $metadata['require']['php'] : '', - 'META_REQUIRE_PHP_FAIL' => (isset($metadata['require']['php'])) ? false : true, - - 'META_REQUIRE_PHPBB' => (isset($metadata['extra']['soft-require']['phpbb/phpbb'])) ? $metadata['extra']['soft-require']['phpbb/phpbb'] : '', - 'META_REQUIRE_PHPBB_FAIL' => (isset($metadata['extra']['soft-require']['phpbb/phpbb'])) ? false : true, - - 'META_DISPLAY_NAME' => (isset($metadata['extra']['display-name'])) ? $metadata['extra']['display-name'] : '', - )); - - foreach ($metadata['authors'] as $author) - { - objects::$template->assign_block_vars('meta_authors', array( - 'AUTHOR_NAME' => $author['name'], - 'AUTHOR_EMAIL' => (isset($author['email'])) ? $author['email'] : '', - 'AUTHOR_HOMEPAGE' => (isset($author['homepage'])) ? $author['homepage'] : '', - 'AUTHOR_ROLE' => (isset($author['role'])) ? $author['role'] : '', - )); - } - } - - /** - * Gets the latest extension update for the current extension branch the user is on - * Will suggest versions from newer branches when EoL has been reached - * and/or version from newer branch is needed for having all known security - * issues fixed. - * - * @param \phpbb\version_helper $version_helper Version helper object. - * @param string $current_version Current version of the extension. - * @param bool $force_update Ignores cached data. Defaults to false. - * @param bool $force_cache Force the use of the cache. Override $force_update. - * @return array Version info or empty array if there are no updates - * @throws \RuntimeException - */ - protected function get_ext_update_on_branch($version_helper, $current_version, $force_update = false, $force_cache = false) - { - $versions = $version_helper->get_versions_matching_stability($force_update, $force_cache); - - // Get current branch from version, e.g.: 3.2 - preg_match('/^(\d+\.\d+).*$/', objects::$config['version'], $matches); - $current_branch = $matches[1]; - - // Filter out any versions less than the current version - $versions = array_filter($versions, function($data) use ($version_helper, $current_version) { - return $version_helper->compare($data['current'], $current_version, '>='); - }); - - // Filter out any phpbb branches less than the current version - $branches = array_filter(array_keys($versions), function($branch) use ($version_helper, $current_branch) { - return $version_helper->compare($branch, $current_branch, '>='); - }); - if (!empty($branches)) - { - $versions = array_intersect_key($versions, array_flip($branches)); - } - else - { - // If branches are empty, it means the current phpBB branch is newer than any branch the - // extension was validated against. Reverse sort the versions array so we get the newest - // validated release available. - krsort($versions); - } - - // Get the first available version from the previous list. - $update_info = array_reduce($versions, function($value, $data) use ($version_helper, $current_version) { - if ($value === null && $version_helper->compare($data['current'], $current_version, '>=')) - { - if (!$data['eol'] && (!$data['security'] || $version_helper->compare($data['security'], $data['current'], '<='))) - { - return $version_helper->compare($data['current'], $current_version, '>') ? $data : array(); - } - else - { - return null; - } - } - - return $value; - }); - - return $update_info === null ? array() : $update_info; - } - - /** - * {@inheritdoc} - */ - public function version_check(\phpbb\extension\metadata_manager $md_manager, $force_update = false, $force_cache = false, $stability = null) - { - if (phpbb_version_compare(objects::$config['version'], '3.2.0', '>')) - { - return objects::$phpbb_extension_manager->version_check($md_manager, $force_update, $force_cache, $stability); - } - - $meta = $md_manager->get_metadata('all'); - - if (!isset($meta['extra']['version-check'])) - { - throw new \phpbb\exception\runtime_exception('NO_VERSIONCHECK'); - } - - $version_check = $meta['extra']['version-check']; - - $version_helper = new \phpbb\version_helper(objects::$cache, objects::$config, new \phpbb\file_downloader()); - $version_helper->set_current_version($meta['version']); - $version_helper->set_file_location($version_check['host'], $version_check['directory'], $version_check['filename'], isset($version_check['ssl']) ? $version_check['ssl'] : false); - $version_helper->force_stability($stability); - - return $this->get_ext_update_on_branch($version_helper, $meta['version'], $force_update, $force_cache); - } -} diff --git a/includes/filetree/filedownload.php b/includes/filetree/filedownload.php deleted file mode 100644 index 2c20ede..0000000 --- a/includes/filetree/filedownload.php +++ /dev/null @@ -1,32 +0,0 @@ -' . substr($file, strrpos($file, '/') + 1) . '
' . highlight_string($string, true) . '
'; - exit(); - } - return false; - } - - public static function php_file_tree($directory, $display_name, $uaction, $extensions = array()) - { - $code = '
' . $display_name . '
'; - if (substr($directory, -1) == '/') - { - $directory = substr($directory, 0, strlen($directory) - 1); - } - $code .= self::php_file_tree_dir($directory, $uaction, $extensions); - return $code; - } - - public static function php_file_tree_dir($directory, $uaction, $extensions = array(), $first_call = true) - { - $file = @scandir($directory); - if (!$file) - { - return false; - } - natcasesort($file); - - // Make directories first - $files = $dirs = array(); - foreach ($file as $this_file) - { - if (is_dir($directory . '/' . $this_file)) - { - $dirs[] = $this_file; - } - else - { - $files[] = $this_file; - } - } - $file = array_merge($dirs, $files); - - // Filter unwanted extensions - if (!empty($extensions)) - { - foreach (array_keys($file) as $key) - { - if (!is_dir($directory . '/' . $file[$key])) - { - $ext = substr($file[$key], strrpos($file[$key], '.') + 1); - if (!in_array($ext, $extensions)) - { - unset($file[$key]); - } - } - } - } - - $php_file_tree = ''; - if (count($file) > 2) - { // Use 2 instead of 0 to account for . and .. directories - $php_file_tree = ''; - $php_file_tree .= self::php_file_tree_dir($directory . '/' . $this_file, $uaction, $extensions, false); - $php_file_tree .= ''; - } - else - { - // File - // Get extension (prepend 'ext-' to prevent invalid classes from extensions that begin with numbers) - $ext = 'ext-' . substr($this_file, strrpos($this_file, '.') + 1); - $link = $uaction . '&file=' . urlencode($directory . '/' . $this_file); - // Noscript support - $getlink = $uaction . '&action=details&ext_name=' . self::$ext_name . '&ext_show=filetree&ext_file=' . urlencode(substr($directory, strpos($directory, self::$ext_name) + strlen(self::$ext_name)) . '/' . $this_file); - $show_link = (in_array($ext, array('ext-gif', 'ext-jpg', 'ext-jpeg', 'ext-tif', 'ext-png'))) ? false : true; - $php_file_tree .= '
  • ' . htmlspecialchars($this_file) . '
  • '; - } - } - } - $php_file_tree .= ''; - } - return $php_file_tree; - } -} diff --git a/includes/functions/extensions.php b/includes/functions/extensions.php deleted file mode 100644 index fb28495..0000000 --- a/includes/functions/extensions.php +++ /dev/null @@ -1,644 +0,0 @@ -all_available(), objects::$phpbb_extension_manager->all_configured()); - - $available_extension_meta_data = array(); - - foreach ($uninstalled as $name => $location) - { - $md_manager = objects::$compatibility->create_metadata_manager($name); - - try - { - $display_ext_name = $md_manager->get_metadata('display-name'); - $meta = $md_manager->get_metadata('all'); - $available_extension_meta_data[$name] = array( - 'IS_BROKEN' => false, - 'META_DISPLAY_NAME' => $display_ext_name, - 'META_NAME' => $name, - 'META_VERSION' => $meta['version'], - 'U_DELETE' => objects::$u_action . '&action=delete_ext&ext_name=' . urlencode($name), - 'U_EXT_NAME' => $name - ); - } - catch (\phpbb\extension\exception $e) - { - $available_extension_meta_data[$name] = array( - 'IS_BROKEN' => true, - 'META_DISPLAY_NAME' => (isset($display_ext_name)) ? $display_ext_name : objects::$user->lang['EXTENSION_BROKEN'] . ' (' . $name . ')', - 'META_NAME' => $name, - 'META_VERSION' => (isset($meta['version'])) ? $meta['version'] : '0.0.0', - 'U_DELETE' => objects::$u_action . '&action=delete_ext&ext_name=' . urlencode($name), - 'U_EXT_NAME' => $name - ); - } - } - - uasort($available_extension_meta_data, array('self', 'sort_extension_meta_data_table')); - - foreach ($available_extension_meta_data as $name => $block_vars) - { - if (!$block_vars['IS_BROKEN']) - { - $block_vars['U_DETAILS'] = objects::$u_action . '&action=details&ext_name=' . urlencode($name); - } - - objects::$template->assign_block_vars('disabled', $block_vars); - - self::output_actions('disabled', array( - 'ENABLE' => objects::$u_action . '&action=enable_pre&ext_name=' . urlencode($name), - )); - } - } - - /** - * Lists all the extensions and dumps to the template - */ - public static function list_all_exts() - { - $extension_meta_data = array(); - - foreach (objects::$phpbb_extension_manager->all_available() as $name => $location) - { - $md_manager = objects::$compatibility->create_metadata_manager($name); - - try - { - $meta = $md_manager->get_metadata('all'); - $extension_meta_data[$name] = array( - 'META_DISPLAY_NAME' => $md_manager->get_metadata('display-name'), - 'META_NAME' => $name, - 'META_VERSION' => $meta['version'], - 'S_IS_ENABLED' => objects::$phpbb_extension_manager->is_enabled($name), - 'S_IS_DISABLED' => objects::$phpbb_extension_manager->is_disabled($name), - 'S_LOCKED_TOGGLE' => ($name === objects::$upload_ext_name), - ); - - $force_update = objects::$request->variable('versioncheck_force', false); - $updates = objects::$compatibility->version_check($md_manager, $force_update, !$force_update, objects::$config['extension_force_unstable'] ? 'unstable' : null); - - $extension_meta_data[$name]['S_UP_TO_DATE'] = empty($updates); - $extension_meta_data[$name]['S_VERSIONCHECK'] = true; - $extension_meta_data[$name]['U_VERSIONCHECK_FORCE'] = objects::$u_action . '&action=details&versioncheck_force=1&ext_name=' . urlencode($md_manager->get_metadata('name')); - } - catch (\phpbb\extension\exception $e) - { - $message = objects::$compatibility->get_exception_message($e); - objects::$template->assign_block_vars('unavailable', array( - 'META_NAME' => $name, - 'NOT_AVAILABLE' => $message, - 'S_IS_ENABLED' => objects::$phpbb_extension_manager->is_enabled($name), - 'S_IS_DISABLED' => objects::$phpbb_extension_manager->is_disabled($name), - 'S_LOCKED_TOGGLE' => ($name === objects::$upload_ext_name), - )); - } - catch (\RuntimeException $e) - { - $extension_meta_data[$name]['S_VERSIONCHECK'] = false; - } - } - - uasort($extension_meta_data, array('self', 'sort_extension_meta_data_table')); - - foreach ($extension_meta_data as $name => $block_vars) - { - $block_vars['U_DETAILS'] = objects::$u_action . '&action=details&ext_name=' . urlencode($name); - - objects::$template->assign_block_vars('available', $block_vars); - } - } - - /** - * Output actions to a block - * - * @param string $block - * @param array $actions - */ - private static function output_actions($block, $actions) - { - foreach ($actions as $lang => $url) - { - objects::$template->assign_block_vars($block . '.actions', array( - 'L_ACTION' => objects::$user->lang('EXTENSION_' . $lang), - 'L_ACTION_EXPLAIN' => (isset(objects::$user->lang['EXTENSION_' . $lang . '_EXPLAIN'])) ? objects::$user->lang('EXTENSION_' . $lang . '_EXPLAIN') : '', - 'U_ACTION' => $url, - )); - } - } - - /** - * Sort helper for the table containing the metadata about the extensions. - * @param array $val1 First metadata array - * @param array $val2 Second metadata array - * @return int - */ - protected static function sort_extension_meta_data_table($val1, $val2) - { - return strnatcasecmp($val1['META_DISPLAY_NAME'], $val2['META_DISPLAY_NAME']); - } - - /** - * The function that gets the manager for the specified extension. - * @param string $ext_name The name of the extension. - * @return \phpbb\extension\metadata_manager|bool - */ - public static function get_manager($ext_name) - { - // If they've specified an extension, let's load the metadata manager and validate it. - if ($ext_name && $ext_name !== objects::$upload_ext_name) - { - $md_manager = objects::$compatibility->create_metadata_manager($ext_name); - - try - { - $md_manager->get_metadata('all'); - } - catch (\phpbb\extension\exception $e) - { - $message = objects::$compatibility->get_exception_message($e); - self::response(array( - 'ext_name' => $ext_name, - 'status' => 'error', - 'error' => $message - )); - return false; - } - return $md_manager; - } - self::response(array( - 'ext_name' => $ext_name, - 'status' => 'error', - 'error' => objects::$user->lang['EXT_ACTION_ERROR'] - )); - return false; - } - - /** - * Output the response. - * @param array $data The name of the extension and the status of the process. - * The text of the error can also be provided if the status is 'error'. - */ - protected static function response(array $data) - { - if (objects::$is_ajax) - { - $output = new \phpbb\json_response(); - $output->send($data); - } - else if ($data['status'] !== 'error') - { - load::details($data['ext_name'], $data['status']); - } - else - { - files::catch_errors($data['error']); - } - } - - /** - * Generate the link for the refresh in JavaScript. - * @param string $ext_name The name of the extension. - * @return bool|string - */ - protected static function generate_refresh_link($ext_name) - { - if (files::check_acp_and_adm(objects::$phpbb_extension_manager->get_extension_path($ext_name, true))) - { - return str_replace('&', '&', objects::$u_action . '&action=details&ext_name=' . urlencode($ext_name)); - } - else - { - return false; - } - } - - /** - * The function that enables the specified extension. - * @param string $ext_name The name of the extension. - * @return bool - */ - public static function enable($ext_name) - { - // What is a safe limit of execution time? Half the max execution time should be safe. - $safe_time_limit = (ini_get('max_execution_time') / 2); - $start_time = time(); - - $md_manager = self::get_manager($ext_name); - - if ($md_manager === false) - { - return false; - } - - if (!$md_manager->validate_dir()) - { - self::response(array( - 'ext_name' => $ext_name, - 'status' => 'error', - 'error' => objects::$user->lang['EXTENSION_DIR_INVALID'] - )); - return false; - } - - if (!$md_manager->validate_enable()) - { - self::response(array( - 'ext_name' => $ext_name, - 'status' => 'error', - 'error' => objects::$user->lang['EXTENSION_NOT_AVAILABLE'] - )); - return false; - } - - $extension = objects::$phpbb_extension_manager->get_extension($ext_name); - if (!$extension->is_enableable()) - { - self::response(array( - 'ext_name' => $ext_name, - 'status' => 'error', - 'error' => objects::$user->lang['EXTENSION_NOT_ENABLEABLE'] - )); - return false; - } - - if (objects::$phpbb_extension_manager->is_enabled($ext_name)) - { - self::response(array( - 'ext_name' => $ext_name, - 'status' => 'enabled' - )); - return true; - } - - try - { - while (objects::$phpbb_extension_manager->enable_step($ext_name)) - { - // Are we approaching the time limit? If so we want to pause the update and continue after refreshing - if ((time() - $start_time) >= $safe_time_limit) - { - if (objects::$is_ajax) - { - self::response(array( - 'ext_name' => $ext_name, - 'status' => 'force_update' - )); - } - else - { - objects::$template->assign_var('S_NEXT_STEP', objects::$user->lang['EXTENSION_ENABLE_IN_PROGRESS']); - - meta_refresh(0, objects::$u_action . '&action=enable&ext_name=' . urlencode($ext_name)); - } - return false; - } - } - objects::$log->add('admin', objects::$user->data['user_id'], objects::$user->ip, 'LOG_EXT_ENABLE', time(), array($ext_name)); - } - catch (\phpbb\db\migration\exception $e) - { - self::response(array( - 'ext_name' => $ext_name, - 'status' => 'error', - 'error' => $e->getLocalisedMessage(objects::$user) - )); - return false; - } - self::response(array( - 'ext_name' => $ext_name, - 'status' => 'enabled', - 'refresh' => self::generate_refresh_link($ext_name) - )); - return true; - } - - /** - * The function that disables the specified extension. - * @param string $ext_name The name of the extension. - * @return bool - */ - public static function disable($ext_name) - { - // What is a safe limit of execution time? Half the max execution time should be safe. - $safe_time_limit = (ini_get('max_execution_time') / 2); - $start_time = time(); - - // We do not check the metadata to be able to disable broken extensions. - if (!$ext_name || $ext_name === objects::$upload_ext_name) - { - self::response(array( - 'ext_name' => $ext_name, - 'status' => 'error', - 'error' => objects::$user->lang['EXT_ACTION_ERROR'] - )); - return false; - } - - if (!objects::$phpbb_extension_manager->is_enabled($ext_name)) - { - self::response(array( - 'ext_name' => $ext_name, - 'status' => 'disabled' - )); - return true; - } - - while (objects::$phpbb_extension_manager->disable_step($ext_name)) - { - // Are we approaching the time limit? If so we want to pause the update and continue after refreshing - if ((time() - $start_time) >= $safe_time_limit) - { - if (objects::$is_ajax) - { - self::response(array( - 'ext_name' => $ext_name, - 'status' => 'force_update' - )); - } - else - { - objects::$template->assign_var('S_NEXT_STEP', objects::$user->lang['EXTENSION_DISABLE_IN_PROGRESS']); - - meta_refresh(0, objects::$u_action . '&action=disable&ext_name=' . urlencode($ext_name)); - } - return false; - } - } - objects::$log->add('admin', objects::$user->data['user_id'], objects::$user->ip, 'LOG_EXT_DISABLE', time(), array($ext_name)); - self::response(array( - 'ext_name' => $ext_name, - 'status' => 'disabled', - 'refresh' => self::generate_refresh_link($ext_name) - )); - return true; - } - - /** - * The function that purges data of the specified extension. - * @param string $ext_name The name of the extension. - * @return bool - */ - public static function purge($ext_name) - { - // What is a safe limit of execution time? Half the max execution time should be safe. - $safe_time_limit = (ini_get('max_execution_time') / 2); - $start_time = time(); - - // We do not check the metadata to be able to purge broken extensions. - if (!$ext_name || $ext_name === objects::$upload_ext_name) - { - self::response(array( - 'ext_name' => $ext_name, - 'status' => 'error', - 'error' => objects::$user->lang['EXT_ACTION_ERROR'] - )); - return false; - } - - if (objects::$phpbb_extension_manager->is_enabled($ext_name)) - { - self::response(array( - 'ext_name' => $ext_name, - 'status' => 'error', - 'error' => objects::$user->lang['EXT_CANNOT_BE_PURGED'] - )); - return false; - } - - try - { - while (objects::$phpbb_extension_manager->purge_step($ext_name)) - { - // Are we approaching the time limit? If so we want to pause the update and continue after refreshing - if ((time() - $start_time) >= $safe_time_limit) - { - if (objects::$is_ajax) - { - self::response(array( - 'ext_name' => $ext_name, - 'status' => 'force_update', - 'hash' => generate_link_hash('purge.' . $ext_name) - )); - } - else - { - objects::$template->assign_var('S_NEXT_STEP', objects::$user->lang['EXTENSION_DELETE_DATA_IN_PROGRESS']); - - meta_refresh(0, objects::$u_action . '&action=purge&hash=' . generate_link_hash('purge.' . $ext_name) . '&ext_name=' . urlencode($ext_name)); - } - return false; - } - } - objects::$log->add('admin', objects::$user->data['user_id'], objects::$user->ip, 'LOG_EXT_PURGE', time(), array($ext_name)); - } - catch (\phpbb\db\migration\exception $e) - { - self::response(array( - 'ext_name' => $ext_name, - 'status' => 'error', - 'error' => $e->getLocalisedMessage(objects::$user) - )); - return false; - } - self::response(array( - 'ext_name' => $ext_name, - 'status' => 'purged', - 'refresh' => self::generate_refresh_link($ext_name) - )); - return true; - } - - /** - * Checks availability of updates for the specified extension. - * @param string $ext_name The name of the extension. - */ - public static function ajax_versioncheck($ext_name) - { - $md_manager = objects::$compatibility->create_metadata_manager($ext_name); - - try - { - // Validate extension's metadata - $md_manager->get_metadata('all'); - - $force_update = true; - $updates_available = objects::$compatibility->version_check($md_manager, $force_update, !$force_update, objects::$config['extension_force_unstable'] ? 'unstable' : null); - - self::response(array( - 'ext_name' => $ext_name, - 'status' => 'success', - 'versioncheck' => (empty($updates_available)) ? "up_to_date" : "not_up_to_date", - 'message' => objects::$user->lang(empty($updates_available) ? 'UP_TO_DATE' : 'NOT_UP_TO_DATE', $md_manager->get_metadata('display-name')) - )); - } - catch (\phpbb\extension\exception $e) - { - $message = objects::$compatibility->get_exception_message($e); - self::response(array( - 'ext_name' => $ext_name, - 'status' => 'success', - 'versioncheck' => 'error', - 'reason' => $message - )); - } - catch (\RuntimeException $e) - { - self::response(array( - 'ext_name' => $ext_name, - 'status' => 'success', - 'versioncheck' => ($e->getCode()) ? 'error' : 'error_timeout', - 'reason' => ($e->getMessage() !== objects::$user->lang('VERSIONCHECK_FAIL')) ? $e->getMessage() : '' - )); - } - } - - /** - * Creates a ZIP package of the extension and prepares it for downloading. - * @param string $ext_name The name of the extension. - * @return bool - */ - public static function download_extension($ext_name) - { - $composery = files::getComposer(objects::$phpbb_root_path . 'ext/' . $ext_name); - if (!$composery) - { - return false; - } - $string = @file_get_contents($composery); - if ($string === false) - { - return false; - } - $json_a = json_decode($string, true); - $composer_ext_name = (isset($json_a['name'])) ? $json_a['name'] : ''; - $composer_ext_type = (isset($json_a['type'])) ? $json_a['type'] : ''; - if ($composer_ext_name !== $ext_name || $composer_ext_type !== "phpbb-extension") - { - return false; - } - $ext_version = (isset($json_a['version'])) ? $json_a['version'] : '0.0.0'; - - $ext_delete_suffix = objects::$request->variable('ext_delete_suffix', false); - if ($ext_delete_suffix) - { - $restore_composery = false; - if (isset($json_a['version']) && preg_match("/^([\d]+\.[\d]+\.[\d]+)(.+)$/u", $ext_version, $matches)) - { - $restore_composery = $string; - $fp = @fopen($composery, 'w'); - if ($fp) - { - $string = preg_replace("/\"version\"\:[\s]*\"".preg_quote($ext_version, "/")."\"/u", "\"version\": \"".$matches[1]."\"", $string); - fwrite($fp, $string); - fclose($fp); - $ext_version = $matches[1]; - } - } - } - - $download_name = str_replace('/', '_', $ext_name) . "_" . str_replace('.', '_', $ext_version); - - $ext_tmp = objects::$phpbb_root_path . 'ext/' . objects::$upload_ext_name . '/tmp/' . (int) objects::$user->data['user_id']; - // Ensure that we don't have any previous files in the working directory. - if (is_dir($ext_tmp)) - { - if (!(files::catch_errors(files::rrmdir($ext_tmp)))) - { - return false; - } - } - else - { - files::recursive_mkdir($ext_tmp); - } - $download_path = $ext_tmp . '/' . $download_name; - files::save_zip_archive('ext/' . $ext_name . '/', $download_name, $ext_tmp); - filedownload::download_file($download_path, $download_name, 'application/zip'); - files::rrmdir($ext_tmp); // No errors are printed here. - if ($ext_delete_suffix && $restore_composery) - { - $fp = @fopen($composery, 'w'); - if ($fp) - { - fwrite($fp, $restore_composery); - fclose($fp); - } - } - - return true; - } - - /** - * Gets missing language directories for an extension from a specified zip file. - * @param string $ext_name The name of the extension. - * @param string $zip_file The name of zip file. - * @return bool - */ - public static function restore_languages($ext_name, $zip_file) - { - $ext_tmp = objects::$phpbb_root_path . 'ext/' . objects::$upload_ext_name . '/tmp/' . (int) objects::$user->data['user_id']; - // Ensure that we don't have any previous files in the working directory. - if (is_dir($ext_tmp)) - { - if (!(files::catch_errors(files::rrmdir($ext_tmp)))) - { - files::catch_errors(objects::$user->lang['ERROR_DIRECTORIES_NOT_RESTORED']); - return false; - } - } - if (!class_exists('\compress_zip')) - { - include(objects::$phpbb_root_path . 'includes/functions_compress.' . objects::$phpEx); - } - $zip = new \compress_zip('r', objects::$zip_dir . '/' . $zip_file); - $zip->extract($ext_tmp . '/'); - $zip->close(); - - $composery = files::getComposer($ext_tmp); - if (!$composery) - { - files::catch_errors(files::rrmdir($ext_tmp)); - files::catch_errors(objects::$user->lang['ERROR_ZIP_NO_COMPOSER']); - files::catch_errors(objects::$user->lang['ERROR_DIRECTORIES_NOT_RESTORED']); - return false; - } - $source = substr($composery, 0, -14); - - // Check languages missing in the new version. - $ext_path = objects::$phpbb_root_path . 'ext/' . $ext_name; - $old_langs = files::get_languages($source . '/language'); - $new_langs = files::get_languages($ext_path . '/language'); - $old_langs = array_diff($old_langs, $new_langs); - if (sizeof($old_langs)) - { - foreach ($old_langs as $lang) - { - files::catch_errors(files::rcopy($source . '/language/' . $lang, $ext_path . '/language/' . $lang)); - } - objects::$template->assign_var('EXT_LANGUAGES_RESTORED', true); - } - - files::catch_errors(files::rrmdir($ext_tmp)); - - return true; - } -} diff --git a/includes/functions/files.php b/includes/functions/files.php deleted file mode 100644 index ef058b1..0000000 --- a/includes/functions/files.php +++ /dev/null @@ -1,271 +0,0 @@ - If my_function returns true, continue. - * Otherwise the result of my_function() is printed as an error string. - * USAGE 2: files::catch_errors('MY_ERROR', my_function()); => If my_function returns true, continue. - * If my_function returns false, print the string MY_ERROR. - * USAGE 3: files::catch_errors('MY_ERROR'); => Print the string MY_ERROR. - * @param bool|string $error The text to display in the case of an error. True if there were no errors. - * @param bool $result The result of the function what we need to catch errors of. True if there were no errors. - * @return bool $result - */ - public static function catch_errors($error, $result = false) - { - if ($error === true) - { - return true; - } - if (!$result) - { - // Catch solutions. - if (is_array($error) && isset($error['solution'])) - { - self::$catched_solutions = (isset(self::$catched_solutions)) ? self::$catched_solutions . "
    " . $error['solution'] : $error['solution']; - objects::$template->assign_var('UPLOAD_ERROR_SOLUTIONS', self::$catched_solutions); - $error = $error['error']; - } - self::$catched_errors = $error = (isset(self::$catched_errors)) ? self::$catched_errors . "
    " . $error : $error; - objects::$template->assign_var('UPLOAD_ERROR', $error); - } - return $result; - } - - /** - * The function that searches for composer.json file. - * @param string $dir The directory to search in. - * @return string/bool The path to composer.json file, false in case of an error. - */ - public static function getComposer($dir) - { - if (@is_file($dir . '/composer.json')) - { - return $dir . '/composer.json'; - } - $ffs = @scandir($dir); - if (!$ffs) - { - return false; - } - $composer = false; - foreach ($ffs as $ff) - { - if ($ff != '.' && $ff != '..') - { - if (@is_dir($dir . '/' . $ff)) - { - $composer = self::getComposer($dir . '/' . $ff); - } - if ($composer !== false) - { - return $composer; - } - } - } - return $composer; - } - - /** - * Function to remove folders and files. - * @param string $dir The directory for removal. - * @param bool $no_errors Whether there were errors before. - * @return bool|string True if there are no errors, error string otherwise. - */ - public static function rrmdir($dir, $no_errors = true) - { - if (@is_dir($dir)) - { - $files = @scandir($dir); - if ($files === false) - { - return objects::$user->lang('ERROR_REMOVE_DIRECTORY', str_replace(objects::$phpbb_root_path, 'PHPBB_ROOT/', $dir)); - } - foreach ($files as $file) - { - if ($file != '.' && $file != '..') - { - $no_errors = self::rrmdir($dir . '/' . $file, $no_errors); - } - } - if (!(@rmdir($dir))) - { - return objects::$user->lang('ERROR_REMOVE_DIRECTORY', str_replace(objects::$phpbb_root_path, 'PHPBB_ROOT/', $dir)); - } - } - else if (@file_exists($dir)) - { - if (!(@unlink($dir))) - { - return objects::$user->lang('ERROR_REMOVE_DIRECTORY', str_replace(objects::$phpbb_root_path, 'PHPBB_ROOT/', $dir)); - } - } - return $no_errors; - } - - /** - * Function to copy folders and files. - * @param string $src The path 'from'. - * @param string $dst The path 'to'. - * @return bool|string True if there are no errors, error string otherwise. - */ - public static function rcopy($src, $dst) - { - if (@file_exists($dst)) - { - if (self::rrmdir($dst) !== true) - { - return objects::$user->lang('ERROR_COPY_FILE', str_replace(objects::$phpbb_root_path, 'PHPBB_ROOT/', $src), str_replace(objects::$phpbb_root_path, 'PHPBB_ROOT/', $dst)); - } - } - if (@is_dir($src)) - { - if (self::recursive_mkdir($dst, 0755) !== true) - { - return objects::$user->lang('ERROR_COPY_FILE', str_replace(objects::$phpbb_root_path, 'PHPBB_ROOT/', $src), str_replace(objects::$phpbb_root_path, 'PHPBB_ROOT/', $dst)); - } - $files = @scandir($src); - if ($files === false) - { - return objects::$user->lang('ERROR_COPY_FILE', str_replace(objects::$phpbb_root_path, 'PHPBB_ROOT/', $src), str_replace(objects::$phpbb_root_path, 'PHPBB_ROOT/', $dst)); - } - foreach ($files as $file) - { - if ($file != '.' && $file != '..') - { - if (self::rcopy($src . '/' . $file, $dst . '/' . $file) !== true) - { - return objects::$user->lang('ERROR_COPY_FILE', str_replace(objects::$phpbb_root_path, 'PHPBB_ROOT/', $src), str_replace(objects::$phpbb_root_path, 'PHPBB_ROOT/', $dst)); - } - } - } - } - else if (@file_exists($src)) - { - if (!(@copy($src, $dst))) - { - return objects::$user->lang('ERROR_COPY_FILE', str_replace(objects::$phpbb_root_path, 'PHPBB_ROOT/', $src), str_replace(objects::$phpbb_root_path, 'PHPBB_ROOT/', $dst)); - } - } - return true; - } - - /** - * Saves the contents of a file or a directory in a zip archive file. - * @param string $dest_file The path to the contents for adding to the zip file. - * @param string $dest_name The name of the zip file. - * @param string $zip_dir The directory for saving zip files. - */ - public static function save_zip_archive($dest_file, $dest_name, $zip_dir) - { - if (!class_exists('\compress_zip')) - { - include(objects::$phpbb_root_path . 'includes/functions_compress.' . objects::$phpEx); - } - - // Remove additional ext/ prefix. - $src_rm_prefix = (strpos($dest_file, 'ext/') === 0) ? substr($dest_file, 0, 4) : ''; - $zip = new \compress_zip('w', $zip_dir . '/' . $dest_name . '.zip'); - $zip->add_file($dest_file, $src_rm_prefix); - $zip->close(); - } - - /** - * @author Michal Nazarewicz (from the php manual) - * Creates all non-existant directories in a path - * @param $path - path to create - * @param $mode - CHMOD the new dir to these permissions - * @return bool|string True if there are no errors, error string otherwise. - */ - public static function recursive_mkdir($path, $mode = 0755) - { - $dirs = explode('/', $path); - $count = sizeof($dirs); - $path = '.'; - for ($i = 0; $i < $count; $i++) - { - $path .= '/' . $dirs[$i]; - - if (!is_dir($path)) - { - @mkdir($path, $mode); - @chmod($path, $mode); - - if (!is_dir($path)) - { - return objects::$user->lang('ERROR_CREATE_DIRECTORY', str_replace(objects::$phpbb_root_path, 'PHPBB_ROOT/', $path)); - } - } - } - return true; - } - - /** - * Gets languages in the specified directory. - * @param string $path The path to the language directory without slash at the end. - * @return array - */ - public static function get_languages($path) - { - $return = array(); - if (@is_dir($path)) - { - $files = @scandir($path); - if ($files === false) - { - return $return; - } - $type_cast_helper = new \phpbb\request\type_cast_helper(); - foreach ($files as $file) - { - if ($file != '.' && $file != '..' && @is_dir($path . '/' . $file)) - { - $type_cast_helper->set_var($file, $file, gettype($file), true); - $return[] = $file; - } - } - } - return $return; - } - - /** - * Check whether acp/ and/or adm/ directories exist in the specified directory. - * @param string $path The path to the directory without slash at the end. - * @return bool - */ - public static function check_acp_and_adm($path) - { - if (@is_dir($path)) - { - $files = @scandir($path); - if ($files === false) - { - return false; - } - foreach ($files as $file) - { - if (($file == 'acp' || $file == 'adm') && @is_dir($path . '/' . $file)) - { - return true; - } - } - } - return false; - } -} diff --git a/includes/functions/languages.php b/includes/functions/languages.php deleted file mode 100644 index e8acd07..0000000 --- a/includes/functions/languages.php +++ /dev/null @@ -1,29 +0,0 @@ - $ff, - 'FILE_SIZE_KB' => ($file_size = @filesize(objects::$zip_dir . '/' . $ff)) ? round($file_size / 1000) : false, - 'FILE_DATE' => ($file_date = @filemtime(objects::$zip_dir . '/' . $ff)) ? objects::$user->format_date($file_date) : '', - 'U_UPLOAD' => objects::$u_action . '&action=upload&local_upload=' . urlencode($ff), - 'U_DOWNLOAD' => objects::$u_action . '&action=download&zip_name=' . urlencode($ff), - 'U_DELETE' => objects::$u_action . '&action=delete_zip&zip_name=' . urlencode($ff), - 'UPLOAD_LINK' => urlencode($ff), - ); - } - } - } - - $pagination = objects::$phpbb_container->get('pagination'); - $start = objects::$request->variable('start', 0); - $zip_count = sizeof($zip_array); - $per_page = 25; - $base_url = objects::$u_action . '&action=zip_packages'; - $pagination->generate_template_pagination($base_url, 'pagination', 'start', $zip_count, $per_page, $start); - - uasort($zip_array, array('self', 'sort_extension_meta_data_table')); - for ($i = $start; $i < $zip_count && $i < $start + $per_page; $i++) - { - objects::$template->assign_block_vars('zip', $zip_array[$i]); - } - } - - /** - * Sort helper for the table containing the metadata about the extensions. - * @param array $val1 First metadata array - * @param array $val2 Second metadata array - * @return int - */ - protected static function sort_extension_meta_data_table($val1, $val2) - { - return strnatcasecmp($val1['META_DISPLAY_NAME'], $val2['META_DISPLAY_NAME']); - } - - /** - * The function that displays the details page. - * @param string $ext_name The name of the extension. - * @param string $ext_show The section that we need to display. - */ - public static function details($ext_name, $ext_show) - { - if (!$ext_name) - { - redirect(objects::$u_action . '&action=list'); - } - - $show_lang_page = false; - $load_full_page = (objects::$request->variable('ajax', 0) === 1); - - // If they've specified an extension, let's load the metadata manager and validate it. - if ($ext_name !== objects::$upload_ext_name) - { - $ext_md_manager = objects::$compatibility->create_metadata_manager($ext_name); - - try - { - $ext_md_manager->get_metadata('all'); - $ext_name = $ext_md_manager->get_metadata('name'); // Just to be sure of the name. - $display_name = $ext_md_manager->get_metadata('display-name'); - - // Output it to the template - objects::$compatibility->output_template_data($ext_md_manager); - - try - { - $updates_available = objects::$compatibility->version_check($ext_md_manager, objects::$request->variable('versioncheck_force', false), false, objects::$config['extension_force_unstable'] ? 'unstable' : null); - - objects::$template->assign_vars(array( - 'S_UP_TO_DATE' => empty($updates_available), - 'S_VERSIONCHECK' => true, - 'UP_TO_DATE_MSG' => objects::$user->lang(empty($updates_available) ? 'UP_TO_DATE' : 'NOT_UP_TO_DATE', $ext_md_manager->get_metadata('display-name')), - )); - - objects::$template->assign_block_vars('updates_available', $updates_available); - } - catch (\RuntimeException $e) - { - objects::$template->assign_vars(array( - 'S_VERSIONCHECK_STATUS' => $e->getCode(), - 'VERSIONCHECK_FAIL_REASON' => ($e->getMessage() !== objects::$user->lang('VERSIONCHECK_FAIL')) ? $e->getMessage() : '', - )); - } - } - catch (\phpbb\extension\exception $e) - { - // Display errors in the details tab. - $message = objects::$compatibility->get_exception_message($e); - objects::$template->assign_vars(array( - 'META_NAME' => $ext_name, - 'NOT_AVAILABLE' => $message, - )); - $display_name = $ext_name; - } - - objects::$template->assign_vars(array( - 'S_IS_ENABLED' => objects::$phpbb_extension_manager->is_enabled($ext_name), - 'S_IS_DISABLED' => objects::$phpbb_extension_manager->is_disabled($ext_name), - )); - - if (!objects::$is_ajax) - { - objects::$template->assign_var('S_DETAILS', true); - - // We output everything if required. - if ($load_full_page) - { - $ext_show = 'readme'; - } - } - } - else - { - updater::get_manager(); - - $display_name = objects::$md_manager->get_metadata('display-name'); - objects::$compatibility->output_template_data(objects::$md_manager); - - // We output everything if this is an ajax request or if we load languages page for Upload Extensions. - if ($ext_show == 'languages' && $load_full_page) - { - objects::$template->assign_var('S_EXT_DETAILS_SHOW_LANGUAGES', "true"); // "true" is the specially handled text - $show_lang_page = true; - $ext_show = 'readme'; - } - - if (objects::$is_ajax || $ext_show == 'faq' || $load_full_page) - { - $faq_sections = 0; - $faq_help = objects::$compatibility->get_faq(); - foreach ($faq_help as $help_ary) - { - if ($help_ary[0] == '--') - { - $faq_sections++; - objects::$template->assign_block_vars('upload_ext_faq_block', array( - 'BLOCK_TITLE' => $help_ary[1], - 'SECTION_NUMBER' => $faq_sections, - )); - continue; - } - objects::$template->assign_block_vars('upload_ext_faq_block.faq_row', array( - 'FAQ_QUESTION' => $help_ary[0], - 'FAQ_ANSWER' => $help_ary[1]) - ); - } - if (!objects::$is_ajax && !$show_lang_page) - { - objects::$template->assign_vars(array( - 'SHOW_DETAILS_TAB' => 'faq', - )); - } - if ($ext_show == 'faq') - { - objects::$template->assign_var('S_EXT_DETAILS_SHOW_FAQ', "true"); // "true" is the specially handled text - } - } - - if (!objects::$is_ajax) - { - objects::$template->assign_var('S_UPLOAD_DETAILS', true); - - // We output everything if required. - if ($load_full_page) - { - $ext_show = 'readme'; - } - } - else - { - objects::$tpl_name = 'acp_ext_details'; - - // Updates are always checked for on standard (non-Ajax) page load. - updater::check_updates(); - } - - // Output update link to the template if Upload Extensions Updater is installed and updates are available. - updater::set_update_link(); - } - - if (file_exists(objects::$phpbb_root_path . 'ext/' . $ext_name . '/README.md') && !objects::$request->is_ajax()) - { - objects::$template->assign_var('EXT_DETAILS_README', true); - } - - if (file_exists(objects::$phpbb_root_path . 'ext/' . $ext_name . '/CHANGELOG.md') && !objects::$request->is_ajax()) - { - objects::$template->assign_var('EXT_DETAILS_CHANGELOG', true); - } - - switch ($ext_show) - { - case 'uploaded': - objects::$template->assign_var('EXT_UPLOADED', true); - break; - case 'updated': - objects::$template->assign_var('EXT_UPDATED', true); - break; - case 'enabled': - objects::$template->assign_var('EXT_ENABLE_STATUS', objects::$user->lang['EXT_ENABLED']); - break; - case 'disabled': - objects::$template->assign_var('EXT_ENABLE_STATUS', objects::$user->lang['EXT_DISABLED']); - break; - case 'purged': - objects::$template->assign_var('EXT_ENABLE_STATUS', objects::$user->lang['EXT_PURGED']); - break; - case 'update': - objects::$template->assign_vars(array( - 'EXT_DETAILS_UPDATE' => true, - 'SHOW_DETAILS_TAB' => 'update', - )); - break; - } - - // We output everything if this is an ajax request or if we load languages page for Upload Extensions. - if (objects::$is_ajax) - { - if ($ext_show == 'languages') - { - objects::$template->assign_var('S_EXT_DETAILS_SHOW_LANGUAGES', "true"); // "true" is the specially handled text - } - $ext_show = 'readme'; - } - - switch ($ext_show) - { - case 'faq': - case 'update': - break; - case 'readme': - $string = @file_get_contents(objects::$phpbb_root_path . 'ext/' . $ext_name . '/README.md'); - if ($string !== false) - { - $readme = MarkdownExtra::defaultTransform($string); - if (!objects::$is_ajax && !$load_full_page) - { - objects::$template->assign_vars(array( - 'SHOW_DETAILS_TAB' => 'readme', - 'EXT_DETAILS_MARKDOWN' => $readme, - )); - } - else - { - objects::$template->assign_var('EXT_DETAILS_README', $readme); - } - } - if (!objects::$is_ajax && !$load_full_page) - { - break; - } - case 'changelog': - $string = @file_get_contents(objects::$phpbb_root_path . 'ext/' . $ext_name . '/CHANGELOG.md'); - if ($string !== false) - { - $changelog = MarkdownExtra::defaultTransform($string); - if (!objects::$is_ajax && !$load_full_page) - { - objects::$template->assign_vars(array( - 'SHOW_DETAILS_TAB' => 'changelog', - 'EXT_DETAILS_MARKDOWN' => $changelog, - )); - } - else - { - objects::$template->assign_var('EXT_DETAILS_CHANGELOG', $changelog); - } - } - if (!objects::$is_ajax && !$load_full_page) - { - break; - } - case 'languages': - if (($result = objects::$request->variable('result', '')) == 'deleted' || $result == 'deleted1') - { - objects::$template->assign_var('EXT_LANGUAGE_UPLOADED', objects::$user->lang('EXT_LANGUAGE' . (($result == 'deleted') ? 'S' : '') . '_DELETE_SUCCESS')); - } - else if ($result == 'language_uploaded') - { - $load_lang = objects::$request->variable('lang', ''); - objects::$template->assign_vars(array( - 'EXT_LOAD_LANG' => $load_lang, - 'EXT_LANGUAGE_UPLOADED' => objects::$user->lang('EXT_LANGUAGE_UPLOADED', $load_lang), - )); - } - $language_directory = objects::$phpbb_root_path . 'ext/' . $ext_name . '/language'; - $langs = files::get_languages($language_directory); - $default_lang = (in_array(objects::$config['default_lang'], $langs)) ? objects::$config['default_lang'] : 'en'; - foreach ($langs as $lang) - { - $lang_info = languages::details($language_directory, $lang); - objects::$template->assign_block_vars('ext_languages', array( - 'NAME' => $lang_info['name'] . (($lang === $default_lang) ? ' (' . objects::$user->lang('DEFAULT') . ')' : ''), - )); - } - objects::$template->assign_vars(array( - 'EXT_DETAILS_LANGUAGES' => true, - )); - if (!objects::$is_ajax && (!$load_full_page || $show_lang_page)) - { - objects::$template->assign_var('SHOW_DETAILS_TAB', 'languages'); - if (!$load_full_page) - { - break; - } - } - case 'filetree': - filetree::$ext_name = $ext_name; - $ext_file = objects::$request->variable('ext_file', '/composer.json'); - objects::$template->assign_vars(array( - 'EXT_DETAILS_FILETREE' => true, - 'FILETREE' => filetree::php_file_tree(objects::$phpbb_root_path . 'ext/' . $ext_name, objects::$user->lang('ACP_UPLOAD_EXT_CONT', $display_name), objects::$u_action), - 'FILENAME' => substr($ext_file, strrpos($ext_file, '/') + 1), - 'CONTENT' => highlight_string(@file_get_contents(objects::$phpbb_root_path . 'ext/' . $ext_name . $ext_file), true) - )); - if (!objects::$is_ajax && !$load_full_page) - { - objects::$template->assign_var('SHOW_DETAILS_TAB', 'filetree'); - break; - } - case 'tools': - objects::$template->assign_vars(array( - 'EXT_DETAILS_TOOLS' => true, - )); - if (!objects::$is_ajax && !$load_full_page) - { - objects::$template->assign_var('SHOW_DETAILS_TAB', 'tools'); - break; - } - default: - if (!$show_lang_page) - { - objects::$template->assign_vars(array( - 'SHOW_DETAILS_TAB' => 'details', - )); - } - break; - } - - objects::$template->assign_vars(array( - 'U_ACTION_LIST' => objects::$u_action . '&action=list', - 'U_UPLOAD' => objects::$u_action . '&action=upload_language', - 'U_DELETE_ACTION' => objects::$u_action . '&action=delete_language&ext_name=' . urlencode($ext_name), - 'U_BACK' => objects::$u_action . '&action=list', - 'U_EXT_DETAILS' => objects::$u_action . '&action=details&ext_name=' . urlencode($ext_name), - 'U_VERSIONCHECK_FORCE' => objects::$u_action . '&action=details&versioncheck_force=1&ext_name=' . urlencode($ext_name), - 'UPDATE_EXT_PURGE_DATA' => objects::$user->lang('EXTENSION_DELETE_DATA_CONFIRM', $display_name), - 'S_FORM_ENCTYPE' => ' enctype="multipart/form-data"', - 'S_LOAD_FULL_PAGE' => $load_full_page, - )); - } - - /** - * Build Confirm box for Ajax requests - * @param boolean $check True for checking if confirmed (without any additional parameters) and false for displaying the confirm box - * @param string $title Title/Message used for confirm box. - * message text is _CONFIRM appended to title. - * If title cannot be found in user->lang a default one is displayed - * If title_CONFIRM cannot be found in user->lang the text given is used. - * @param string $hidden Hidden variables - * @param string $u_action Custom form action - * @return bool - */ - public static function ajax_confirm_box($check, $title = '', $hidden = '', $u_action = '') - { - global $user, $db, $request; - - if (!$request->is_ajax()) - { - return false; - } - - $confirm = ($user->lang['YES'] === $request->variable('confirm', '', true, \phpbb\request\request_interface::POST)); - - if ($check && $confirm) - { - $user_id = $request->variable('confirm_uid', 0); - $session_id = $request->variable('sess', ''); - $confirm_key = $request->variable('confirm_key', ''); - - if ($user_id != $user->data['user_id'] || $session_id != $user->session_id || !$confirm_key || !$user->data['user_last_confirm_key'] || $confirm_key != $user->data['user_last_confirm_key']) - { - return false; - } - - // Reset user_last_confirm_key - $sql = 'UPDATE ' . USERS_TABLE . " SET user_last_confirm_key = '' - WHERE user_id = " . $user->data['user_id']; - $db->sql_query($sql); - - return true; - } - else if ($check) - { - return false; - } - - $s_hidden_fields = build_hidden_fields(array( - 'confirm_uid' => $user->data['user_id'], - 'sess' => $user->session_id, - 'sid' => $user->session_id, - )); - - // generate activation key - $confirm_key = gen_rand_string(10); - - // If activation key already exist, we better do not re-use the key (something very strange is going on...) - if ($request->variable('confirm_key', '')) - { - // This should not occur, therefore we cancel the operation to safe the user - return false; - } - - $use_page = ($u_action) ? $u_action : objects::$phpbb_root_path . str_replace('&', '&', $user->page['page']); - $u_action = reapply_sid($use_page); - $u_action .= ((strpos($u_action, '?') === false) ? '?' : '&') . 'confirm_key=' . $confirm_key; - - $sql = 'UPDATE ' . USERS_TABLE . " SET user_last_confirm_key = '" . $db->sql_escape($confirm_key) . "' - WHERE user_id = " . $user->data['user_id']; - $db->sql_query($sql); - - $u_action .= '&confirm_uid=' . $user->data['user_id'] . '&sess=' . $user->session_id . '&sid=' . $user->session_id; - $json_response = new \phpbb\json_response; - $json_response->send(array( - 'MESSAGE_TITLE' => (!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang[$title], - 'MESSAGE_TEXT' => (!isset($user->lang[$title . '_CONFIRM'])) ? $title : $user->lang[$title . '_CONFIRM'], - - 'YES_VALUE' => $user->lang['YES'], - 'NO_VALUE' => $user->lang['NO'], - 'S_CONFIRM_ACTION' => str_replace('&', '&', $u_action), - 'S_HIDDEN_FIELDS' => $hidden . $s_hidden_fields - )); - - return true; - } -} diff --git a/includes/functions/updater.php b/includes/functions/updater.php deleted file mode 100644 index ff81a48..0000000 --- a/includes/functions/updater.php +++ /dev/null @@ -1,95 +0,0 @@ -create_metadata_manager(objects::$upload_ext_name); - try - { - // Validate extension's metadata - objects::$md_manager->get_metadata('all'); - } - catch (\phpbb\extension\exception $e) - { - $message = objects::$compatibility->get_exception_message($e); - files::catch_errors($message); - } - } - - /** - * Checks the availability of an update for Upload Extensions. - */ - public static function check_updates() - { - $upload_extensions_download = false; - try - { - $updates_available = objects::$compatibility->version_check(objects::$md_manager, objects::$request->variable('versioncheck_force', false), false, objects::$config['extension_force_unstable'] ? 'unstable' : null); - - objects::$template->assign_vars(array( - 'UPLOAD_EXT_NEW_UPDATE' => !empty($updates_available), - 'S_UPLOAD_UP_TO_DATE' => empty($updates_available), - 'S_UPLOAD_VERSIONCHECK' => true, - 'UPLOAD_UP_TO_DATE_MSG' => objects::$user->lang(empty($updates_available) ? 'UP_TO_DATE' : 'NOT_UP_TO_DATE', objects::$md_manager->get_metadata('display-name')), - )); - - objects::$template->assign_block_vars('upload_updates_available', $updates_available); - - if (isset($updates_available['download'])) - { - $upload_extensions_download = $updates_available['download']; - } - } - catch (\RuntimeException $e) - { - objects::$template->assign_vars(array( - 'S_UPLOAD_VERSIONCHECK_STATUS' => $e->getCode(), - 'UPLOAD_VERSIONCHECK_FAIL_REASON' => ($e->getMessage() !== objects::$user->lang('VERSIONCHECK_FAIL')) ? $e->getMessage() : '', - )); - } - objects::$self_update = $upload_extensions_download; - } - - /** - * Generates the link to Upload Extensions Updater. - * - * @return string Download link. - */ - public static function get_update_link() - { - global $phpbb_admin_path, $phpEx; - return append_sid("{$phpbb_admin_path}index.$phpEx", "i=-boardtools-updater-acp-updater_module&mode=main&action=upload"); - } - - /** - * Sets the link to Upload Extensions Updater. - */ - public static function set_update_link() - { - if (objects::$phpbb_extension_manager->is_enabled("boardtools/updater") && objects::$self_update != false) - { - objects::$template->assign_var('U_UPLOAD_EXT_UPDATE', self::get_update_link()); - } - } -} diff --git a/includes/objects.php b/includes/objects.php deleted file mode 100644 index accdd66..0000000 --- a/includes/objects.php +++ /dev/null @@ -1,102 +0,0 @@ -init(); - } -} diff --git a/includes/sources/cache.php b/includes/sources/cache.php deleted file mode 100644 index f603585..0000000 --- a/includes/sources/cache.php +++ /dev/null @@ -1,110 +0,0 @@ -get_driver()->cache_dir . self::$cache_prefix; - } - - public static function read($file) - { - $file = self::get_root() . preg_replace('{[^' . self::$whitelist . ']}i', '-', $file); - if (self::is_enabled() && file_exists($file)) - { - return file_get_contents($file); - } - - return false; - } - - public static function write($file, $data) - { - if (self::is_enabled()) - { - $file = self::get_root() . preg_replace('{[^' . self::$whitelist . ']}i', '-', $file); - - $lock = new \phpbb\lock\flock($file); - $lock->acquire(); - - if ($handle = @fopen($file, 'wb')) - { - fwrite($handle, $data); - fclose($handle); - - phpbb_chmod($file, CHMOD_READ | CHMOD_WRITE); - - $return_value = true; - } - else - { - $return_value = false; - } - - $lock->release(); - - return $return_value; - } - - return false; - } - - public static function sha1($file) - { - $file = self::get_root() . preg_replace('{[^' . self::$whitelist . ']}i', '-', $file); - if (self::is_enabled() && file_exists($file)) - { - return sha1_file($file); - } - - return false; - } - - public static function sha256($file) - { - $file = self::get_root() . preg_replace('{[^' . self::$whitelist . ']}i', '-', $file); - if (self::is_enabled() && file_exists($file)) - { - return hash_file('sha256', $file); - } - - return false; - } -} diff --git a/includes/sources/extensions_list.php b/includes/sources/extensions_list.php deleted file mode 100644 index 40d8e51..0000000 --- a/includes/sources/extensions_list.php +++ /dev/null @@ -1,226 +0,0 @@ - $versions) - { - foreach ($versions as $version => $metadata) - { - $packages[] = $metadata; - } - } - } - - if (isset($data['includes'])) - { - foreach ($data['includes'] as $include => $metadata) - { - if (cache::sha1($include) === $metadata['sha1']) - { - $includedData = json_decode(cache::read($include), true); - } - else - { - $includedData = self::fetchFile($include); - } - $packages = array_merge($packages, self::loadIncludes($includedData)); - } - } - - return $packages; - } - - protected static function fetchFile($filename, $cacheKey = null, $sha256 = null) - { - $file = $filename; - if (null === $cacheKey) - { - $cacheKey = $filename; - $file = self::$baseUrl . '/' . $filename; - } - - // url-encode $ signs in URLs as bad proxies choke on them - if (($pos = strpos($file, '$')) && preg_match('{^https?://.*}i', $file)) - { - $file = substr($file, 0, $pos) . '%24' . substr($file, $pos + 1); - } - - $json = @file_get_contents($file); - if ($sha256 && $sha256 !== hash('sha256', $json)) - { - return false; - } - $data = json_decode($json, true); - if ($cacheKey && !empty($json)) - { - cache::write($cacheKey, $json); - } - - return $data; - } -} diff --git a/includes/types/zip.php b/includes/types/zip.php deleted file mode 100644 index 38b6f5b..0000000 --- a/includes/types/zip.php +++ /dev/null @@ -1,220 +0,0 @@ -factory = $factory; - $this->language = $language; - $this->php_ini = $php_ini; - $this->request = $request; - $this->phpbb_root_path = $phpbb_root_path; - } - - /** - * {@inheritdoc} - */ - public function upload() - { - $args = func_get_args(); - return $this->remote_upload($args[0]); - } - - /** - * Remote upload method - * Uploads file from given url - * - * @param string $upload_url URL pointing to file to upload, for example http://www.foobar.com/example.gif - * @return filespec $file Object "filespec" is returned, all further operations can be done with this object - * @access public - */ - protected function remote_upload($upload_url) - { - $upload_ary = array(); - $upload_ary['local_mode'] = true; - - $upload_from_phpbb = preg_match(objects::$phpbb_link_template, $upload_url, $match_phpbb); - - if (!preg_match('#^(https?://).*?\.(' . implode('|', $this->upload->allowed_extensions) . ')$#i', $upload_url, $match) && !$upload_from_phpbb) - { - return $this->factory->get('filespec')->set_error($this->language->lang($this->upload->error_prefix . 'URL_INVALID')); - } - - $url = parse_url($upload_url); - - $host = $url['host']; - $path = $url['path']; - $port = (!empty($url['port'])) ? (int) $url['port'] : 80; - - $upload_ary['type'] = 'application/octet-stream'; - - $url['path'] = explode('.', $url['path']); - $ext = array_pop($url['path']); - - $url['path'] = implode('', $url['path']); - $upload_ary['name'] = utf8_basename($url['path']) . (($ext) ? '.' . $ext : ''); - $filename = $url['path']; - $filesize = 0; - - $remote_max_filesize = $this->get_max_file_size(); - - $errno = 0; - $errstr = ''; - - if (!($fsock = @fopen($upload_url, "r"))) - { - return $this->factory->get('filespec')->set_error($this->language->lang($this->upload->error_prefix . 'NOT_UPLOADED')); - } - - // Make sure $path not beginning with / - if (strpos($path, '/') === 0) - { - $path = substr($path, 1); - } - - $get_info = false; - $data = ''; - $length = false; - $timer_stop = time() + $this->upload->upload_timeout; - - while (!@feof($fsock)) - { - if ($length) - { - // Don't attempt to read past end of file if server indicated length - $block = @fread($fsock, min($length - $filesize, 1024)); - } - else - { - $block = @fread($fsock, 1024); - } - - $filesize += strlen($block); - - if ($remote_max_filesize && $filesize > $remote_max_filesize) - { - $max_filesize = get_formatted_filesize($remote_max_filesize, false); - - return $this->factory->get('filespec')->set_error($this->language->lang($this->upload->error_prefix . 'WRONG_FILESIZE', $max_filesize['value'], $max_filesize['unit'])); - } - - $data .= $block; - - // Cancel upload if we exceed timeout - if (time() >= $timer_stop) - { - return $this->factory->get('filespec')->set_error($this->upload->error_prefix . 'REMOTE_UPLOAD_TIMEOUT'); - } - } - @fclose($fsock); - - if (empty($data)) - { - return $this->factory->get('filespec')->set_error($this->upload->error_prefix . 'EMPTY_REMOTE_DATA'); - } - - $tmp_path = (@is_writable('/tmp/')) ? '/tmp/' : $this->phpbb_root_path . 'cache/'; - $filename = tempnam($tmp_path, unique_id() . '-'); - - if (!($fp = @fopen($filename, 'wb'))) - { - return $this->factory->get('filespec')->set_error($this->upload->error_prefix . 'NOT_UPLOADED'); - } - - $upload_ary['size'] = fwrite($fp, $data); - fclose($fp); - unset($data); - - $upload_ary['tmp_name'] = $filename; - if ($upload_from_phpbb) - { - $upload_ary['name'] .= '.zip'; - } - - /** @var filespec $file */ - $file = $this->factory->get('filespec') - ->set_upload_ary($upload_ary) - ->set_upload_namespace($this->upload); - $this->upload->common_checks($file); - - return $file; - } - - /** - * Get maximum file size for remote uploads - * - * @return int Maximum file size - */ - protected function get_max_file_size() - { - $max_file_size = $this->upload->max_filesize; - if (!$max_file_size) - { - $max_file_size = $this->php_ini->getString('upload_max_filesize'); - - if (!empty($max_file_size)) - { - $unit = strtolower(substr($max_file_size, -1, 1)); - $max_file_size = (int) $max_file_size; - - switch ($unit) - { - case 'g': - $max_file_size *= 1024; - // no break - case 'm': - $max_file_size *= 1024; - // no break - case 'k': - $max_file_size *= 1024; - // no break - } - } - } - - return $max_file_size; - } -} diff --git a/includes/upload/base.php b/includes/upload/base.php deleted file mode 100644 index cb38db1..0000000 --- a/includes/upload/base.php +++ /dev/null @@ -1,222 +0,0 @@ -data['user_id']; - } - - /** - * Sets the path to the temporary storage directory. - * - * @param bool $clean Whether we need to delete any previous contents of temporary directory - * @return bool Whether the path has been set correctly with no errors - */ - protected function set_temp_path($clean = true) - { - // We need to use the user ID and the time to escape from problems with simultaneous uploads. - // We suppose that one user can upload only one extension per session. - $this->ext_tmp = $this->get_temp_path(); - - // Ensure that we don't have any previous files in the working directory. - if ($clean && is_dir($this->ext_tmp)) - { - if (!(files::catch_errors(files::rrmdir($this->ext_tmp)))) - { - return false; - } - } - - return true; - } - - /** - * Extracts the specified ZIP file to the temporary storage directory. - * - * @param string $dest_file Path to ZIP file that we need to extract - */ - protected function extract_zip($dest_file) - { - if (!class_exists('\compress_zip')) - { - include(objects::$phpbb_root_path . 'includes/functions_compress.' . objects::$phpEx); - } - - $zip = new \compress_zip('r', $dest_file); - $zip->extract($this->ext_tmp . '/extracted/'); - $zip->close(); - } - - /** - * Original copyright information for the function from AutoMOD. - * The function was almost totally changed by the authors of Upload Extensions. - * @package automod - * @copyright (c) 2008 phpBB Group - * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License - * - * @param string $action Requested action. - * @return \phpbb\files\filespec|\filespec|bool - */ - public function proceed_upload($action) - { - //$can_upload = (@ini_get('file_uploads') == '0' || strtolower(@ini_get('file_uploads')) == 'off' || !@extension_loaded('zlib')) ? false : true; - - objects::$user->add_lang('posting'); // For error messages - $upload = objects::$compatibility->get_upload_object(); - $upload->set_allowed_extensions(array('zip')); // Only allow ZIP files - - // Make sure the ext/ directory exists and if it doesn't, create it - if (!is_dir(objects::$phpbb_root_path . 'ext')) - { - if (!files::catch_errors(files::recursive_mkdir(objects::$phpbb_root_path . 'ext'))) - { - return false; - } - } - - if (!is_writable(objects::$phpbb_root_path . 'ext')) - { - files::catch_errors(objects::$user->lang['EXT_NOT_WRITABLE']); - return false; - } - - if (!is_dir(objects::$zip_dir)) - { - if (!files::catch_errors(files::recursive_mkdir(objects::$zip_dir))) - { - return false; - } - } - - $tmp_dir = objects::$phpbb_root_path . 'ext/' . objects::$upload_ext_name . '/tmp'; - if (!is_writable($tmp_dir)) - { - if (!phpbb_chmod($tmp_dir, CHMOD_READ | CHMOD_WRITE)) - { - files::catch_errors(objects::$user->lang['EXT_TMP_NOT_WRITABLE']); - return false; - } - } - - $file = false; - - // Proceed with the upload - switch ($action) - { - case 'upload': - if (!objects::$request->is_set("extupload", \phpbb\request\request_interface::FILES)) - { - files::catch_errors(objects::$user->lang['NO_UPLOAD_FILE']); - return false; - } - $file = objects::$compatibility->form_upload($upload); - break; - case 'upload_remote': - $php_ini = new \phpbb\php\ini(); - if (!$php_ini->get_bool('allow_url_fopen')) - { - files::catch_errors(objects::$user->lang['EXT_ALLOW_URL_FOPEN_DISABLED']); - return false; - } - $remote_url = objects::$request->variable('remote_upload', ''); - if (!extension_loaded('openssl') && 'https' === substr($remote_url, 0, 5)) - { - files::catch_errors(objects::$user->lang['EXT_OPENSSL_DISABLED']); - return false; - } - $file = objects::$compatibility->remote_upload($upload, $remote_url); - break; - } - - return $file; - } - - /** - * The function that uploads the specified extension. - * - * @param string $action Requested action. - * @param \phpbb\files\filespec|\filespec $file Filespec object. - * @param string $upload_dir The directory for zip files storage. - * @return string|bool - */ - public function get_dest_file($action, $file, $upload_dir) - { - if ($action == 'upload_local') - { - return $upload_dir . '/' . objects::$request->variable('local_upload', ''); - } - - if (!objects::$compatibility->filespec_get($file, 'filename')) - { - files::catch_errors((sizeof($file->error) ? implode('
    ', $file->error) : objects::$user->lang['NO_UPLOAD_FILE'])); - return false; - } - - if (objects::$compatibility->filespec_get($file, 'init_error') || sizeof($file->error)) - { - $file->remove(); - files::catch_errors((sizeof($file->error) ? implode('
    ', $file->error) : objects::$user->lang['EXT_UPLOAD_INIT_FAIL'])); - return false; - } - - $file->clean_filename('real'); - $file->move_file(str_replace(objects::$phpbb_root_path, '', $upload_dir), true, true); - - if (sizeof($file->error)) - { - $file->remove(); - files::catch_errors(implode('
    ', $file->error)); - return false; - } - $dest_file = objects::$compatibility->filespec_get($file, 'destination_file'); - - // Make security checks if checksum is provided. - $checksum = objects::$request->variable('ext_checksum', ''); - if (!empty($checksum)) - { - $generated_hash = ''; - $checksum_type = objects::$request->variable('ext_checksum_type', 'md5'); - switch ($checksum_type) - { - case 'sha1': - $generated_hash = sha1_file($dest_file); - break; - case 'md5': - $generated_hash = md5_file($dest_file); - break; - } - if (strtolower($checksum) !== strtolower($generated_hash)) - { - $file->remove(); - files::catch_errors(objects::$user->lang('ERROR_CHECKSUM_MISMATCH', $checksum_type)); - return false; - } - } - objects::$template->assign_var('S_EXTENSION_CHECKSUM_NOT_PROVIDED', empty($checksum)); - - return $dest_file; - } -} diff --git a/includes/upload/extension.php b/includes/upload/extension.php deleted file mode 100644 index 2f85139..0000000 --- a/includes/upload/extension.php +++ /dev/null @@ -1,343 +0,0 @@ -proceed_upload($action); - if (!$file && $action != 'upload_local' && $action != 'force_update') - { - files::catch_errors(objects::$user->lang['EXT_UPLOAD_ERROR']); - return false; - } - - // What is a safe limit of execution time? Half the max execution time should be safe. - $safe_time_limit = (ini_get('max_execution_time') / 2); - $start_time = time(); - // We skip working with a zip file if we are enabling/restarting the extension. - if ($action != 'force_update') - { - $dest_file = $this->get_dest_file($action, $file, objects::$zip_dir); - if (!$dest_file) - { - files::catch_errors(objects::$user->lang['EXT_UPLOAD_ERROR']); - return false; - } - - if (!$this->set_temp_path()) - { - if ($action != 'upload_local') - { - $file->remove(); - } - return false; - } - - $this->extract_zip($dest_file); - - $composery = files::getComposer($this->ext_tmp); - if (!$composery) - { - files::catch_errors(files::rrmdir($this->ext_tmp)); - if ($action != 'upload_local') - { - $file->remove(); - } - files::catch_errors(objects::$user->lang['ACP_UPLOAD_EXT_ERROR_COMP']); - return false; - } - $string = @file_get_contents($composery); - if ($string === false) - { - files::catch_errors(files::rrmdir($this->ext_tmp)); - if ($action != 'upload_local') - { - $file->remove(); - } - files::catch_errors(objects::$user->lang['EXT_UPLOAD_ERROR']); - return false; - } - $json_a = json_decode($string, true); - $destination = (isset($json_a['name'])) ? $json_a['name'] : ''; - $destination = str_replace('.', '', $destination); - $ext_version = (isset($json_a['version'])) ? $json_a['version'] : '0.0.0'; - - if (!$this->check_ext_name($destination)) - { - if ($action != 'upload_local') - { - $file->remove(); - } - return false; - } - - $display_name = (isset($json_a['extra']['display-name'])) ? $json_a['extra']['display-name'] : $destination; - if (!isset($json_a['type']) || $json_a['type'] != "phpbb-extension") - { - files::catch_errors(files::rrmdir($this->ext_tmp)); - if ($action != 'upload_local') - { - $file->remove(); - } - files::catch_errors(objects::$user->lang['NOT_AN_EXTENSION']); - return false; - } - $source = substr($composery, 0, -14); - - // Try to use the extracted path if it contains the necessary directory structure. - $source_for_check = $this->get_temp_path(true) . '/extracted/' . $destination; - - // At first we need to change the directory structure to something like ext/tmp/vendor/extension. - // We need it to escape from problems with dots on validation. - if ($source != objects::$phpbb_root_path . 'ext/' . $source_for_check) - { - $source_for_check = $this->get_temp_path(true) . '/uploaded/' . $destination; - if (!(files::catch_errors(files::rcopy($source, objects::$phpbb_root_path . 'ext/' . $source_for_check)))) - { - files::catch_errors(files::rrmdir($this->ext_tmp)); - if ($action != 'upload_local') - { - $file->remove(); - } - return false; - } - $source = objects::$phpbb_root_path . 'ext/' . $source_for_check; - } - - // Validate the extension to check if it can be used on the board. - $md_manager = objects::$compatibility->create_metadata_manager($source_for_check); - try - { - if ($md_manager->get_metadata() === false || $md_manager->validate_require_phpbb() === false || $md_manager->validate_require_php() === false) - { - files::catch_errors(files::rrmdir($this->ext_tmp)); - if ($action != 'upload_local') - { - $file->remove(); - } - files::catch_errors(objects::$user->lang['EXTENSION_NOT_AVAILABLE']); - return false; - } - } - catch (\phpbb\extension\exception $e) - { - $message = objects::$compatibility->get_exception_message($e); - files::catch_errors(files::rrmdir($this->ext_tmp)); - if ($action != 'upload_local') - { - $file->remove(); - } - files::catch_errors($message . ' ' . objects::$user->lang['ACP_UPLOAD_EXT_ERROR_NOT_SAVED']); - return false; - } - - // Save/remove the uploaded archive file. - if ($action != 'upload_local') - { - if ((objects::$request->variable('keepext', false)) == false) - { - $file->remove(); - } - else - { - $display_name = str_replace(array('/', '\\'), '_', $display_name); - $ext_version = str_replace(array('/', '\\'), '_', $ext_version); - $file_base_name = substr($dest_file, 0, strrpos($dest_file, '/') + 1) . $display_name . "_" . $ext_version; - // Save this file and any other files that were uploaded with the same name. - if (@file_exists($file_base_name . ".zip")) - { - $finder = 1; - while (@file_exists($file_base_name . "(" . $finder . ").zip")) - { - $finder++; - } - @rename($dest_file, $file_base_name . "(" . $finder . ").zip"); - } - else - { - @rename($dest_file, $file_base_name . ".zip"); - } - } - } - // Here we can assume that all checks are done. - // Now we are able to install the uploaded extension to the correct path. - } - else - { - // All checks were done previously. Now we only need to restore the variables. - // We try to restore the data of the current upload. - $this->set_temp_path(false); - if (!is_dir($this->ext_tmp) || !($composery = files::getComposer($this->ext_tmp)) || !($string = @file_get_contents($composery))) - { - files::catch_errors(objects::$user->lang['ACP_UPLOAD_EXT_WRONG_RESTORE']); - return false; - } - $json_a = json_decode($string, true); - $destination = (isset($json_a['name'])) ? $json_a['name'] : ''; - $destination = str_replace('.', '', $destination); - if (strpos($destination, '/') === false) - { - files::catch_errors(objects::$user->lang['ACP_UPLOAD_EXT_WRONG_RESTORE']); - return false; - } - $source = substr($composery, 0, -14); - } - $made_update = false; - // Delete the previous version of extension files - we're able to update them. - if (is_dir(objects::$phpbb_root_path . 'ext/' . $destination)) - { - // At first we need to disable the extension if it is enabled. - if (objects::$phpbb_extension_manager->is_enabled($destination)) - { - while (objects::$phpbb_extension_manager->disable_step($destination)) - { - // Are we approaching the time limit? If so, we want to pause the update and continue after refreshing. - if ((time() - $start_time) >= $safe_time_limit) - { - objects::$template->assign_var('S_NEXT_STEP', objects::$user->lang['EXTENSION_DISABLE_IN_PROGRESS']); - - // No need to specify the name of the extension. We suppose that it is the one in ext/tmp/USER_ID folder. - if (objects::$request->is_ajax()) - { - $response_object = new \phpbb\json_response; - $response_object->send(array("FORCE_UPDATE" => true)); - } - else - { - meta_refresh(0, objects::$u_action . '&action=force_update'); - } - return false; - } - } - objects::$log->add('admin', objects::$user->data['user_id'], objects::$user->ip, 'LOG_EXT_DISABLE', time(), array($destination)); - $made_update = true; - } - - $saved_zip_file = $this->save_previous_version($destination); - - $this->check_missing_languages($source, $destination, $saved_zip_file); - - if (!(files::catch_errors(files::rrmdir(objects::$phpbb_root_path . 'ext/' . $destination)))) - { - return false; - } - } - if (!(files::catch_errors(files::rcopy($source, objects::$phpbb_root_path . 'ext/' . $destination)))) - { - files::catch_errors(files::rrmdir($this->ext_tmp)); - return false; - } - // No enabling at this stage. Admins should have a chance to revise the uploaded scripts. - if (!(files::catch_errors(files::rrmdir($this->ext_tmp)))) - { - return false; - } - - load::details($destination, (($made_update) ? 'updated' : 'uploaded')); - - // Clear phpBB cache after details page did its work. - // Needed because some files like ext.php can be deleted in the new version. - // Should be done at last because we need to remove class names from data_global cache file. - objects::$cache->purge(); - - return true; - } - - protected function check_ext_name($destination) - { - if (strpos($destination, '/') === false) - { - files::catch_errors(files::rrmdir($this->ext_tmp)); - files::catch_errors(objects::$user->lang['ACP_UPLOAD_EXT_ERROR_DEST']); - return false; - } - - if (strpos($destination, objects::$upload_ext_name) !== false) - { - files::catch_errors(files::rrmdir($this->ext_tmp)); - files::catch_errors(objects::$user->lang['ACP_UPLOAD_EXT_ERROR_TRY_SELF']); - return false; - } - - return true; - } - - protected function save_previous_version($destination) - { - $old_ext_name = $destination; - if ($old_composery = files::getComposer(objects::$phpbb_root_path . 'ext/' . $destination)) - { - if (!($old_string = @file_get_contents($old_composery))) - { - $old_ext_name = $old_ext_name . '_' . '0.0.0'; - } - else - { - $old_json_a = json_decode($old_string, true); - $old_display_name = (isset($old_json_a['extra']['display-name'])) ? $old_json_a['extra']['display-name'] : $old_ext_name; - $old_ext_version = (isset($old_json_a['version'])) ? $old_json_a['version'] : '0.0.0'; - $old_ext_name = $old_display_name . '_' . $old_ext_version; - } - } - $dest_name = str_replace(array('/', '\\'), '_', $old_ext_name) . '_old'; - $file_base_name = objects::$zip_dir . '/' . $dest_name; - // Save this file and any other files that were uploaded with the same name. - if (@file_exists($file_base_name . ".zip")) - { - $finder = 1; - while (@file_exists($file_base_name . "(" . $finder . ").zip")) - { - $finder++; - } - $dest_name .= "(" . $finder . ")"; - } - // Save the previous version of the extension that is being updated in a zip archive file. - files::save_zip_archive('ext/' . $destination . '/', $dest_name, objects::$zip_dir); - $saved_zip_file = $dest_name . ".zip"; - $saved_zip_file = objects::$compatibility->escape($saved_zip_file, true); - objects::$template->assign_var('EXT_OLD_ZIP_SAVED', objects::$user->lang('EXT_SAVED_OLD_ZIP', $saved_zip_file)); - - return $saved_zip_file; - } - - protected function check_missing_languages($source, $destination, $saved_zip_file) - { - // Check languages missing in the new version. - $old_langs = files::get_languages(objects::$phpbb_root_path . 'ext/' . $destination . '/language'); - $new_langs = files::get_languages($source . '/language'); - $old_langs = array_diff($old_langs, $new_langs); - if (sizeof($old_langs)) - { - $last_lang = array_pop($old_langs); - objects::$template->assign_vars(array( - 'S_EXT_LANGS_RESTORE_ZIP' => urlencode($saved_zip_file), - 'EXT_RESTORE_DIRECTORIES' => (sizeof($old_langs)) ? objects::$user->lang('EXT_RESTORE_LANGUAGES', '' . implode(', ', $old_langs) . '', "$last_lang") : objects::$user->lang('EXT_RESTORE_LANGUAGE', "$last_lang"), - )); - } - } -} diff --git a/includes/upload/lang.php b/includes/upload/lang.php deleted file mode 100644 index 2f1079f..0000000 --- a/includes/upload/lang.php +++ /dev/null @@ -1,127 +0,0 @@ -lang('ERROR_LANGUAGE_NO_EXTENSION')); - return false; - } - - if (empty($lang_name)) - { - files::catch_errors(objects::$user->lang('ERROR_LANGUAGE_NOT_DEFINED')); - return false; - } - - $file = $this->proceed_upload($action); - if (!$file) - { - return false; - } - - $dest_file = $this->get_dest_file($action, $file, objects::$zip_dir); - if (!$dest_file) - { - return false; - } - - if (!$this->set_temp_path()) - { - if ($action != 'upload_local') - { - $file->remove(); - } - return false; - } - - $this->extract_zip($dest_file); - - if ($action != 'upload_local') - { - $file->remove(); - } - - // The files can be stored inside the $this->ext_tmp directory or up to two levels lower in the file tree. - $lang_dir = ''; - - // First level (the highest one). - $files = @scandir($this->ext_tmp); - if ($files === false) - { - files::catch_errors(objects::$user->lang('ERROR_LANGUAGE_UNKNOWN_STRUCTURE')); - return false; - } - $files = array_diff($files, array('.', '..')); - $last_file = array_pop($files); - - // Continue searching if we have a single directory. - if (!sizeof($files) && !is_null($last_file) && @is_dir($this->ext_tmp . $lang_dir . '/' . $last_file)) - { - $lang_dir .= '/' . $last_file; - - // Second level. - $files = @scandir($this->ext_tmp . $lang_dir); - if ($files === false) - { - files::catch_errors(objects::$user->lang('ERROR_LANGUAGE_UNKNOWN_STRUCTURE')); - return false; - } - $files = array_diff($files, array('.', '..')); - - // Search for a directory with language ISO code (to escape from problems with unnecessary readme files). - if (array_search($lang_name, $files) !== false && @is_dir($this->ext_tmp . $lang_dir . '/' . $lang_name)) - { - $lang_dir .= '/' . $lang_name; - } - } - $source = $this->ext_tmp . $lang_dir; - - if (!(files::catch_errors(files::rcopy($source, objects::$phpbb_root_path . 'ext/' . $ext_name . '/language/' . $lang_name)))) - { - files::catch_errors(files::rrmdir($this->ext_tmp)); - return false; - } - if (!(files::catch_errors(files::rrmdir($this->ext_tmp)))) - { - return false; - } - if (objects::$is_ajax && $ext_name === objects::$upload_ext_name && $lang_name === objects::$user->lang_name) - { - /* - * Refresh the page if the uploaded language package - * is currently used by the user of Upload Extensions. - * Only for Ajax requests. - */ - $response_object = new \phpbb\json_response; - $response_object->send(array( - "LANGUAGE" => urlencode($lang_name), - "REFRESH" => true - )); - } - objects::$template->assign_var('EXT_LANGUAGE_UPLOADED', objects::$user->lang('EXT_LANGUAGE_UPLOADED', $lang_name)); - return true; - } -} diff --git a/language/README.md b/language/README.md deleted file mode 100644 index c4444ce..0000000 --- a/language/README.md +++ /dev/null @@ -1,3 +0,0 @@ -## Language packages -Available language packages and the information about translations can be found here: -https://github.com/BoardTools/upload/wiki/Translations \ No newline at end of file diff --git a/language/en/help_upload.php b/language/en/help_upload.php deleted file mode 100644 index 072a66a..0000000 --- a/language/en/help_upload.php +++ /dev/null @@ -1,135 +0,0 @@ - '--', - 1 => 'General modules' - ), - array( - 0 => 'What can I do with “Upload an extension” feature?', - 1 => 'You are able to upload extensions from different sources without the necessity of using an FTP client. When you upload an extension that already exists on your board, its old version will be automatically saved in the specified directory on your board - check out “ZIP files management” module. You can also save zip file of currently uploaded version of the extension - tick the flag “Save uploaded zip file” before the upload process. You can make sure that you upload the true extension’s zip package if you specify its checksum in the corresponding form field.' - ), - array( - 0 => 'What is the difference between “Extensions Manager of Upload Extensions” and standard “Extensions Manager”?', - 1 => 'Just like standard “Extensions Manager”, “Extensions Manager of Upload Extensions” is a tool in your phpBB Board that allows you to manage all of your extensions and view information about them. But it can be determined as an “upgraded version” of the standard module.

    Key benefits:
    • All uploaded extensions are sorted alphabetically, no matter if they are enabled, disabled or uninstalled. The exception: broken extensions.
    • Broken extensions are shown separately on the same page of “Extensions Manager” below the list of normal extensions. The reasons of unavailability are shown for each broken extension. Detailed warning message is added to those reasons when broken extension is installed or has some data saved in your database. You can click on the row of any broken extension to see its details just in the same way that is applicable for other extensions.
    • Any extension (if it is not a broken one) can be enabled with a single click on the toggle shown on the left of its name in the list.
    ' - ), - array( - 0 => 'Why do I need “ZIP files management” module?', - 1 => 'Sometimes you can find it useful if you can save archives of your extensions or share them. The archives can be old versions of uploaded extensions (that are packaged automatically for data safety), any packages that you have chosen to save by ticking the flag “Save uploaded zip file” before an upload process or any zip files of extensions that are stored in the specified directory (see question “Where can I specify the directory for saving zip files of extensions?” below). You have possibilities to unpack, to download and to delete those packages.' - ), - array( - 0 => 'How can I use “Delete extensions” module?', - 1 => '“Delete extensions” module lets you remove the files of uninstalled extensions from your server so that you can finish complete uninstallation without using FTP. When you do not need an extension anymore, you can remove it from your board completely. To do that you need to perform the following steps:
    • At first ensure that you really do not need a specific extension. It is recommended that you make some backups of the files and database before any removals.
    • Then navigate to “Extensions Manager of Upload Extensions”, find the extension that you want to delete and make sure that it is disabled: click on the toggle of that extension if the toggle is green.
    • Make sure that extension’s data is deleted: if the trash bin button of that extension is shown, click on it and confirm your action.
    • After that navigate to “Delete extensions” module, click on the link “Delete extension” shown in the row of your extension and confirm your action.
    ' - ), - array( - 0 => '--', - 1 => 'Uploading process' - ), - array( - 0 => 'How can I upload validated extensions from the CDB on phpbb.com?', - 1 => 'On the main page of Upload Extensions click on the link “Show validated extensions”. Select the extension that you want to upload and click on the “Download” button in the row of that extension. Note: wordplay here: the extension will be downloaded from the remote resource and uploaded to your server.' - ), - array( - 0 => 'How can I perform an upload from other remote resources?', - 1 => 'Copy the direct link to the extension’s zip package (if the link is not from the phpbb.com website, it should end with .zip) into the dedicated field of the form “Upload an extension” and click the “Upload” button.' - ), - array( - 0 => 'How can I upload an extension from my local PC?', - 1 => 'To do that click on the “Browse...” button in the form “Upload an extension”, select the extension’s zip file on your computer, then click the “Upload” button.' - ), - array( - 0 => 'I have copied the link to the extension’s zip package into the field and clicked the “Upload” button, but I see an error. What’s wrong with the link?', - 1 => 'To be able to upload the extension you should make sure that the following conditions are met:
    1. The link should be direct: for uploads from resources other than phpbb.com it should have .zip at the end.
    2. The link should lead to the zip file of the extension, not to its description page.
    ' - ), - array( - 0 => 'What is the checksum? Where can I take it?', - 1 => 'Checksum is used to verify the integrity of the uploaded file. It is checked to make sure that the file on the remote server and the file uploaded to your server are the same. Checksum can be usually obtained from the same resource where the original file is stored.' - ), - array( - 0 => '--', - 1 => 'Extensions Manager of Upload Extensions' - ), - array( - 0 => 'How to use “Extensions Manager of Upload Extensions”?', - 1 => 'The status of each extension is displayed as a toggle.
    • A green toggle means that the extension is enabled. When you click on a green toggle the extension will be disabled.
    • A red toggle means that the extension is disabled. When you click on a red toggle the extension will be enabled.
    • If the extension that has a red toggle is disabled but there is some extension’s data saved in the database, then you will have an option to delete its data by clicking on a trash bin near the toggle.
      Clicking on a trash bin is a way to uninstall the extension from the database. If you want to delete the files of the extension from the server, you will need to use Extension Cleaner tool.

    You can also re-check all versions of the extensions by clicking on the corresponding button or set up version check settings just like in standard “Extensions Manager”.' - ), - array( - 0 => 'What about broken extensions? Can I uninstall them?', - 1 => 'Yes, sure! Broken extensions are displayed in “Extensions Manager of Upload Extensions” below the list of normal extensions. You can see the reasons why those extensions are broken and whether they have some data saved in your database. Click on a row of a broken extension to see its details and to manage it.' - ), - array( - 0 => 'The toggle button of an extension is grey. Why?', - 1 => 'The grey toggle button means that you cannot perform any actions with that extension at the moment. Probably another action is already in progress. Also Upload Extensions cannot disable itself - that is why its button is also grey.' - ), - array( - 0 => '--', - 1 => 'Extension details page' - ), - array( - 0 => 'What information is shown for my extensions?', - 1 => 'Displayed information depends on several circumstances.
    • General description provided by extension developers in the composer.json file (or warning message if the extension is broken).
    • The version number of the extension (if it is not broken).
    • The contents of the README.md file (if it exists in the extension’s directory).
    • The contents of the CHANGELOG.md file (if it exists in the extension’s directory).
    • Uploaded language packages for the extension.
    • The file tree for the extension and contents of its files.
    ' - ), - array( - 0 => 'What can I do with the extension on the details page?', - 1 => 'You are able to:
    • Enable the extension if its toggle is red.
    • Disable the extension if its toggle is green.
    • Delete extension’s data from the database if the red trash bin button is shown.
    • Check out the status of the current version of the extension if the link to the version check file is provided by extension developers. If extension’s version is shown in a green bubble - the extension is up-to-date. If the bubble is red - the extension is not up-to-date. Otherwise - the version check information could not be obtained.
    • Receive an update for the extension if you see a cogwheel near the extension’s version bubble. Click on the cogwheel: if an “Update” button is shown - then you can click on it, confirm your action and Upload Extensions will update your extension. You can also see the release announcement by clicking on the corresponding button if the link is provided by extension developers. NOTE: if JavaScript is disabled in your browser, those buttons will be located inside the extension details section block.
    • Manage extension’s language packages. You can upload a new language package for the extension - see question “What language packages can I upload for an extension?” below. You can also delete some already installed language packages.
    • Download the extension’s package (see question “What is the purpose of the feature “Download packaged extension”?” below).
    ' - ), - array( - 0 => 'What language packages can I upload for an extension?', - 1 => 'You can upload any zip packages that contain language files for the extension if those packages have one of the following structures:
    • ZIP_FILE_ROOT/language_files, or
    • ZIP_FILE_ROOT/single_directory/language_files, or
    • ZIP_FILE_ROOT/single_directory/language_ISO_code/language_files.

    For more information about the uploading process see section “Uploading process” above.' - ), - array( - 0 => 'What is the purpose of the feature “Download packaged extension”?', - 1 => 'Upload Extensions lets you download proper zip packages of any uploaded extensions on your board to your local PC. You can also tick a flag to delete the suffix of the development version - this action can help you, for example, to shorten the time for preparing the extension for the CDB. Navigate to the extension details page and click on the “Tools” section button. Then the “Download” button will be shown.' - ), - array( - 0 => '--', - 1 => 'ZIP files management' - ), - array( - 0 => 'Where can I specify the directory for saving zip files of extensions?', - 1 => 'Navigate in the ACP to General -> Server configuration -> Server settings -> Path settings -> Extensions’ zip packages storage path.' - ), - array( - 0 => 'How can I delete several extensions’ zip packages at once?', - 1 => 'At first make sure that you really need to perform such action; it is recommended that you have made necessary backups. Then navigate to “ZIP files management” module, tick the flags in the rows of zip packages that you want to delete, click on the “Delete marked” button and confirm your action.' - ), - array( - 0 => '--', - 1 => 'Extension Cleaner tool' - ), - array( - 0 => 'What is “Extension Cleaner tool”?', - 1 => '“Extension Cleaner tool” is the name of “Delete extensions” module of Upload Extensions sometimes used in its documentation.' - ), - array( - 0 => 'An extension is installed on my board but I cannot delete it. Why?', - 1 => 'The extension that you want to remove should be disabled and its data should be deleted from the database before you use “Extension Cleaner tool”. See question “How can I use “Delete extensions” module?” above.' - ), - array( - 0 => 'How can I delete several extensions at once?', - 1 => 'At first make sure that you really need to perform such action; it is recommended that you have made necessary backups. Then navigate to “Delete extensions” module, tick the flags in the rows of the extensions that you want to delete, click on the “Delete marked” button and confirm your action. Those extensions will not be saved as zip files! Their directories will be removed from the server entirely.' - ), - array( - 0 => '--', - 1 => 'Interactive interface' - ), - array( - 0 => 'What are the benefits of the JavaScript functionality?', - 1 => 'Pages are loaded faster, design elements are changed quickly when you interact with them, tooltips are shown to help you. All these features save your time and they are available only if JavaScript is enabled in your browser.' - ), -); diff --git a/language/en/info_acp_upload.php b/language/en/info_acp_upload.php deleted file mode 100644 index 9709f96..0000000 --- a/language/en/info_acp_upload.php +++ /dev/null @@ -1,23 +0,0 @@ - 'Upload Extensions', - 'ACP_UPLOAD_EXT_CONFIG_TITLE' => 'Upload extensions', -)); diff --git a/language/en/upload.php b/language/en/upload.php deleted file mode 100644 index f6208e9..0000000 --- a/language/en/upload.php +++ /dev/null @@ -1,236 +0,0 @@ - 'Upload Extensions', - 'ACP_UPLOAD_EXT_CONFIG_TITLE' => 'Upload extensions', - 'ACP_UPLOAD_EXT_DESCRIPTION' => 'Install/update/delete extensions, manage their ZIP files and more without using FTP.', - 'ACP_UPLOAD_EXT_TITLE_EXPLAIN' => 'Upload Extensions enables you to upload extensions’ zip files or delete extensions’ folders from the server.
    With this extension you can install/update/delete extensions without using FTP. If the uploaded extension already exists, it will be updated with the uploaded files.', - 'ACP_UPLOAD_EXT_HELP' => 'Upload Extensions: Usage guide', - 'UPLOAD' => 'Upload', - 'BROWSE' => 'Browse...', - 'EXTENSION_UPLOAD' => 'Upload an extension', - 'EXTENSION_UPLOAD_EXPLAIN' => 'Here you can upload a zipped extension package containing the necessary files to perform installation from your local computer or a remote server. “Upload Extensions” will then attempt to unzip the file and have it ready for installation.
    Choose a file or type a link in the fields below.', - 'EXT_UPLOAD_ERROR' => 'The extension wasn’t uploaded.', - 'EXT_UPLOAD_INIT_FAIL' => 'There was an error when initialising the extension upload process.', - 'EXT_NOT_WRITABLE' => array( - 'error' => 'The ext/ directory is not writable. This is required for “Upload Extensions” to work properly.', - 'solution' => 'Please adjust your permissions or settings and try again.', - ), - 'EXT_TMP_NOT_WRITABLE' => array( - 'error' => 'The ext/boardtools/upload/tmp/ directory is not writable. This is required for “Upload Extensions” to work properly.', - 'solution' => 'Please adjust your permissions or settings and try again.', - ), - 'EXT_ALLOW_URL_FOPEN_DISABLED' => array( - 'error' => 'The allow_url_fopen setting should be enabled in order to load information from a remote resource.', - 'solution' => 'Please confirm that the allow_url_fopen setting is enabled in your php.ini and try again.', - ), - 'EXT_OPENSSL_DISABLED' => array( - 'error' => 'The openssl extension should be enabled in order to load information from an https resource.', - 'solution' => 'Please confirm that the openssl extension is enabled in your php.ini and try again.', - ), - 'NO_UPLOAD_FILE' => array( - 'error' => 'No file specified or there was an error during the upload process.', - 'solution' => 'Please confirm that you upload the true extension zip file and try again.', - ), - 'NOT_AN_EXTENSION' => 'The uploaded zip file is not a phpBB extension. The file was not saved on the server.', - 'EXT_ACTION_ERROR' => 'The requested action cannot be performed for the selected phpBB extension.
    Note: “Upload Extensions” can be managed only through the standard Extensions Manager.', - - 'SOURCE' => 'Source', - 'EXTENSION_UPDATE_NO_LINK' => 'Download link is not provided.', - 'EXTENSION_TO_BE_ENABLED' => 'Upload Extensions will be disabled during the update process and enabled again after the update.', - 'EXTENSION_UPLOAD_UPDATE' => 'Update the extension', - 'EXTENSION_UPLOAD_UPDATE_EXPLAIN' => '“Upload Extensions” will perform the upload from the link shown below.', - - 'EXTENSION_UPLOADED' => 'Extension “%s” was uploaded successfully.', - 'EXTENSIONS_AVAILABLE' => 'Uninstalled extensions', - 'EXTENSIONS_UPLOADED' => 'Uploaded extensions', - 'EXTENSIONS_UNAVAILABLE' => 'Broken extensions', - 'EXTENSIONS_UNAVAILABLE_EXPLAIN' => 'The extensions listed below are uploaded to your board but they are broken due to some reasons and that’s why they are unavailable and cannot be enabled on your board. Please check out the correct files and use Extension Cleaner tool if you want to delete the files of broken extensions from the server.', - 'EXTENSION_BROKEN' => 'Broken extension', - 'EXTENSION_BROKEN_ENABLED' => 'This broken extension is enabled!', - 'EXTENSION_BROKEN_DISABLED' => 'This broken extension is disabled!', - 'EXTENSION_BROKEN_TITLE' => 'This extension is broken!', - 'EXTENSION_BROKEN_DETAILS' => 'Click here to view the details.', - 'EXTENSION_BROKEN_EXPLAIN' => 'Some data of this extension is still saved on the server. Please check out why this extension is broken. You may need to ask the extension developers for help and use FTP to change some files (or you can upload a version with fixes). Then you will be able to manage the extension again.

    What you can do:


    Update the broken extension.
    • Make sure that the extension is disabled (click on the toggle if needed).
    • Find out whether a new version of the extension is available. Try to upload it.
    • If the problem is not solved, you can ask the developers of the extension for help.
    or

    Remove the broken extension entirely.
    • Make sure that the extension is disabled (click on the toggle if needed).
    • Make sure that the extension’s data is deleted (click on the trash bin button if needed).
    • Remove the files of the extension by using Extension Cleaner tool.
    ', - - 'EXTENSION_UPLOADED_ENABLE' => 'Enable the uploaded extension', - 'ACP_UPLOAD_EXT_UNPACK' => 'Unpack extension', - 'ACP_UPLOAD_EXT_CONT' => 'Content of the package “%s”', - - 'EXT_LIST_DOWNLOAD' => 'Download full list', - 'EXT_LIST_DOWNLOAD_ENGLISH' => 'Use English status names', - 'EXT_LIST_DOWNLOAD_GROUP' => 'Group by', - 'EXT_LIST_DOWNLOAD_GROUP_STANDARD' => 'uploaded/broken', - 'EXT_LIST_DOWNLOAD_GROUP_DISABLED' => 'enabled/disabled/broken', - 'EXT_LIST_DOWNLOAD_GROUP_PURGED' => 'enabled/disabled/uninstalled/broken', - 'EXT_LIST_DOWNLOAD_SHOW' => 'Include names', - 'EXT_LIST_DOWNLOAD_SHOW_FULL' => 'display names and clean names', - 'EXT_LIST_DOWNLOAD_SHOW_CLEAN' => 'only clean names', - 'EXT_LIST_DOWNLOAD_SHOW_NAME' => 'only display names', - 'EXT_LIST_DOWNLOAD_TITLE' => 'Full list of uploaded extensions', - 'EXT_LIST_DOWNLOAD_FOOTER' => 'Generated by Upload Extensions', - - 'EXT_ROW_ENABLED' => 'enabled', - 'EXT_ROW_DISABLED' => 'disabled', - 'EXT_ROW_UNINSTALLED' => 'uninstalled', - 'EXT_ROWS_ENABLED' => 'Enabled:', - 'EXT_ROWS_DISABLED' => 'Disabled:', - 'EXT_ROWS_UNINSTALLED' => 'Uninstalled:', - 'EXT_ROWS_UPLOADED' => 'Uploaded:', - 'EXT_ROWS_BROKEN' => 'Broken:', - - 'EXTENSION_DELETE' => 'Delete extension', - 'EXTENSION_DELETE_CONFIRM' => 'Are you sure that you want to delete the “%s” extension?', - 'EXTENSIONS_DELETE_CONFIRM' => array( - 2 => 'Are you sure that you want to delete %1$s extensions?', - ), - 'EXT_DELETE_SUCCESS' => 'Extension was deleted successfully.', - 'EXTS_DELETE_SUCCESS' => 'Extensions were deleted successfully.', - 'EXT_DELETE_ERROR' => 'No file specified or there was an error during the deletion.', - 'EXT_DELETE_NO_FILE' => 'No file was specified for the deletion.', - 'EXT_CANNOT_BE_PURGED' => 'The data of the enabled extension cannot be purged. Disable the extension to be able to purge its data.', - - 'EXTENSION_ZIP_DELETE' => 'Delete zip file', - 'EXTENSION_ZIP_DELETE_CONFIRM' => 'Are you sure that you want to delete the zip file “%s”?', - 'EXTENSIONS_ZIP_DELETE_CONFIRM' => array( - 2 => 'Are you sure that you want to delete %1$s zip files?', - ), - 'EXT_ZIP_DELETE_SUCCESS' => 'Extension’s zip file was deleted successfully.', - 'EXT_ZIPS_DELETE_SUCCESS' => 'Extensions’ zip files were deleted successfully.', - 'EXT_ZIP_DELETE_ERROR' => 'No file specified or there was an error during the deletion.', - - 'ACP_UPLOAD_EXT_ERROR_DEST' => 'No vendor or destination folder in the uploaded zip file. The file was not saved on the server.', - 'ACP_UPLOAD_EXT_ERROR_COMP' => 'composer.json wasn’t found in the uploaded zip file. The file was not saved on the server.', - 'ACP_UPLOAD_EXT_ERROR_NOT_SAVED' => 'The file was not saved on the server.', - 'ACP_UPLOAD_EXT_ERROR_TRY_SELF' => '“Upload Extensions” can be updated only by the special Updater or through FTP.', - 'ACP_UPLOAD_EXT_WRONG_RESTORE' => 'An error occurred during the update of an installed extension. Try to update it again.', - - 'DEVELOPER' => 'Developer', - 'DEVELOPERS' => 'Developers', - - 'EXT_UPLOAD_SAVE_ZIP' => 'Save uploaded zip file', - 'CHECKSUM' => 'Checksum', - 'RESTORE' => 'Restore', - 'ZIP_UPLOADED' => 'Uploaded zip packages of extensions', - 'EXT_ENABLE' => 'Enable', - 'EXT_ENABLE_DISABLE' => 'Enable/Disable the extension', - 'EXT_ENABLED' => 'The extension was enabled successfully.', - 'EXT_DISABLED' => 'The extension was disabled successfully.', - 'EXT_PURGE' => 'Purge extension’s data', - 'EXT_PURGED' => 'The extension’s data was purged successfully.', - 'EXT_UPLOADED' => 'The upload was successful.', - 'EXT_UPDATE_ENABLE' => 'Click on the toggle to enable the extension.', - 'EXT_UPDATE_CHECK_FILETREE' => 'Please verify the file tree of the extension.', - 'EXT_UPDATE_ERROR' => 'The update process errored.', - 'EXT_UPDATE_TIMEOUT' => 'The update process timed out.', - 'EXT_UPDATES_AVAILABLE' => 'Updates are available', - 'EXT_UPDATE_METHODS_TITLE' => 'Available update methods', - 'EXT_UPLOAD_UPDATE_METHODS' => 'You can update the extension by taking one of the possible actions:
    • Updater method. Upload Extensions can be updated with Upload Extensions Updater. Check out whether this tool is already available. Unless you have this tool, you will need to use the second method.
    • FTP method. Upload Extensions can be updated in a standard way. Download new files to your PC (click on the button below), disable the extension in standard Extensions Manager, copy new files using an FTP client and enable the extension in standard Extensions Manager.
    ', - 'EXT_UPDATED' => 'The update was successful.', - 'EXT_UPDATED_LATEST_VERSION' => 'updated to the latest version', - 'EXT_SAVED_OLD_ZIP' => 'NOTE: the previous version of the extension was saved in the file %s on your server. Check out “ZIP files management” module.', - 'EXT_RESTORE_LANGUAGE' => 'One language directory is absent in the uploaded version of the extension. You can restore the directory %s from the saved zip archive of the previous version. Then you may need to update the files of that directory for compatibility with the uploaded version of the extension.', - 'EXT_RESTORE_LANGUAGES' => 'Some language directories are absent in the uploaded version of the extension. You can restore the directories %1$s and %2$s from the saved zip archive of the previous version. Then you may need to update the files of those directories for compatibility with the uploaded version of the extension.', - 'EXT_LANGUAGES_RESTORED' => 'The restore process was completed successfully.', - 'EXT_SHOW_DESCRIPTION' => 'Show description of the extension', - 'EXT_UPLOAD_BACK' => '« Back to Upload Extensions', - 'EXT_RELOAD_PAGE' => 'Reload the page', - 'EXT_REFRESH_PAGE' => 'Refresh the page', - 'EXT_REFRESH_NOTICE' => 'Navigation menu can be outdated.', - - 'ERROR_COPY_FILE' => 'The attempt to copy the file “%1$s” to the location “%2$s” failed.', - 'ERROR_CREATE_DIRECTORY' => 'The attempt to create the directory “%s” failed.', - 'ERROR_REMOVE_DIRECTORY' => 'The attempt to remove the directory “%s” failed.', - 'ERROR_CHECKSUM_MISMATCH' => 'The %s-hash of the uploaded file differs from the provided checksum. The file was not saved on the server.', - 'ERROR_ZIP_NO_COMPOSER' => 'composer.json was not found in the requested zip package.', - 'ERROR_DIRECTORIES_NOT_RESTORED' => 'The restore process could not be completed due to errors.', - 'ERROR_LANGUAGE_UNKNOWN_STRUCTURE' => 'The structure of the uploaded language package is unrecognised. The file was not saved on the server.', - 'ERROR_LANGUAGE_NO_EXTENSION' => 'The name of the extension is not specified for the language package.', - 'ERROR_LANGUAGE_NOT_DEFINED' => 'The ISO code of the language should be defined for the proper upload of the language package. Please fill in the required field of the form and try again.', - - 'ACP_UPLOAD_EXT_DIR' => 'Extensions’ zip packages storage path', - 'ACP_UPLOAD_EXT_DIR_EXPLAIN' => 'Path under your phpBB root directory, e.g. ext.
    You can change this path to store zip packages in a special folder (for example, if you want to let users download those files, you can change it to downloads, and if you want to prohibit those downloads, you can change it to the path that is upper by one level than http root of your website (or you can create a folder with the appropriate .htaccess file)).', - - 'ACP_UPLOAD_EXT_UPDATED' => 'The installed extension was updated.', - 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'You have uploaded a zip file for an already installed extension. That extension was disabled automatically to make the update process safer. Now please check whether the uploaded files are correct and enable the extension if it still should be used on the board.', - - 'ACP_UPLOAD_EXT_NO_CHECKSUM_TITLE' => 'No checksum was provided for the uploaded file.', - 'ACP_UPLOAD_EXT_NO_CHECKSUM' => 'Upload Extensions was unable to perform security checks because the checksum was not provided for the uploaded zip file. Checksum is used to make sure that the uploaded file is not corrupted and not compromised.', - - 'VALID_PHPBB_EXTENSIONS' => 'Validated extensions', - 'SHOW_VALID_PHPBB_EXTENSIONS' => 'Show validated extensions', - 'VALID_PHPBB_EXTENSIONS_TITLE' => 'You can download validated extensions from the CDB on phpbb.com or check out their homepages.', - 'VALID_PHPBB_EXTENSIONS_EMPTY_LIST' => 'No extensions are being suggested at the moment. Please check out the updates for Upload Extensions.', - 'POSSIBLE_SOLUTIONS' => 'Possible solutions', - - 'ACP_UPLOAD_EXT_MANAGER_EXPLAIN' => 'The Extensions Manager of Upload Extensions is a tool in your phpBB Board that allows you to manage all of your extensions and view information about them.', - 'ACP_UPLOAD_ZIP_TITLE' => 'ZIP files management', - 'ACP_UPLOAD_UNINSTALLED_TITLE' => 'Delete extensions', - - 'EXT_DETAILS_README' => 'Readme', - 'EXT_DETAILS_CHANGELOG' => 'Changelog', - 'EXT_DETAILS_LANGUAGES' => 'Languages', - 'EXT_DETAILS_FILETREE' => 'File tree', - 'EXT_DETAILS_TOOLS' => 'Tools', - - 'DEFAULT' => 'default', - 'EXT_LANGUAGE_ISO_CODE' => 'ISO code', - 'EXT_LANGUAGES' => 'Uploaded language packages', - 'EXT_LANGUAGES_UPLOAD' => 'Upload a language package', - 'EXT_LANGUAGES_UPLOAD_EXPLAIN' => 'Here you can upload a zipped package containing the necessary language files for this extension from your local computer or a remote server. “Upload Extensions” will then attempt to unzip the files and move them to the right location.
    Choose a file or type a link in the fields below.
    Don’t forget to specify the language ISO code in the corresponding field below (example: en).
    IMPORTANT! Your current extension’s language directory with that ISO code will be deleted if it exists, no zip archive will be made for it.', - 'EXT_LANGUAGE_UPLOADED' => 'The language package “%s” was uploaded successfully.', - 'EXT_LANGUAGE_DELETE_CONFIRM' => 'Are you sure that you want to delete the language package “%s”?', - 'EXT_LANGUAGES_DELETE_CONFIRM' => array( - 2 => 'Are you sure that you want to delete %1$s language packages?', - ), - 'EXT_LANGUAGE_DELETE_SUCCESS' => 'Extension’s language package was deleted successfully.', - 'EXT_LANGUAGES_DELETE_SUCCESS' => 'Extension’s language packages were deleted successfully.', - 'EXT_LANGUAGE_DELETE_ERROR' => 'No file specified or there was an error during the deletion.', - - 'EXT_TOOLS_DOWNLOAD_TITLE' => 'Download packaged extension', - 'EXT_TOOLS_DOWNLOAD' => 'You can download a properly packaged ZIP file of the extension to your PC. You can also choose to delete the suffix of the development version (e.g. to shorten the time for preparing the extension for the CDB).', - 'EXT_TOOLS_DOWNLOAD_DELETE_SUFFIX' => 'Delete the development suffix if it does exist', - 'EXT_DOWNLOAD_ERROR' => 'The attempt to download the extension “%s” failed.', - - 'EXT_LOAD_ERROR' => 'Loading errored', - 'EXT_LOAD_TIMEOUT' => 'Loading timed out', - 'EXT_LOAD_ERROR_EXPLAIN' => 'An error occurred during the loading process.', - 'EXT_LOAD_ERROR_SHOW' => 'Show occurred errors', - 'EXT_LOAD_SOLUTIONS' => 'Please check out the error log files on your server, eliminate the problem and try again.', - - 'UPLOAD_DESCRIPTION_UPLOAD' => 'Upload phpBB extensions', - 'UPLOAD_DESCRIPTION_UPLOAD_CDB' => 'CDB on phpbb.com', - 'UPLOAD_DESCRIPTION_UPLOAD_LOCAL' => 'Local PC', - 'UPLOAD_DESCRIPTION_UPLOAD_REMOTE' => 'Remote server', - 'UPLOAD_DESCRIPTION_UPDATE' => 'Update phpBB extensions', - 'UPLOAD_DESCRIPTION_UPDATE_ABOUT' => 'You can update any of already uploaded extensions. The extension that you want to update will be disabled automatically so that any updates will be safe.', - 'UPLOAD_DESCRIPTION_MANAGE' => 'Manage phpBB extensions', - 'UPLOAD_DESCRIPTION_MANAGE_ACTIONS' => 'Install/uninstall any extensions', - 'UPLOAD_DESCRIPTION_MANAGE_LANG' => 'Upload and manage extensions’ language packages', - 'UPLOAD_DESCRIPTION_MANAGE_DETAILS' => 'View the details and file trees', - 'UPLOAD_DESCRIPTION_DESIGN' => 'Interactive interface', - 'UPLOAD_DESCRIPTION_DESIGN_ABOUT' => 'You can perform actions more quickly because of JavaScript functionality. Colourful messages and tooltips will help you in making right decisions.', - 'UPLOAD_DESCRIPTION_ZIP' => 'ZIP files management', - 'UPLOAD_DESCRIPTION_ZIP_SAVE' => 'Save zips in a directory of your choice', - 'UPLOAD_DESCRIPTION_ZIP_UNPACK' => 'Unpack a zip file to install an extension', - 'UPLOAD_DESCRIPTION_ZIP_DOWNLOAD' => 'Download proper zip packages of extensions', - 'UPLOAD_DESCRIPTION_CLEANER' => 'Extension Cleaner tool', - 'UPLOAD_DESCRIPTION_CLEANER_ABOUT' => 'You can delete extension directories or zip files of extensions from the server.', -)); diff --git a/license.txt b/license.txt deleted file mode 100644 index ce992b2..0000000 --- a/license.txt +++ /dev/null @@ -1,281 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - diff --git a/migrations/configuration/add_zip_config.php b/migrations/configuration/add_zip_config.php deleted file mode 100644 index f7a6ade..0000000 --- a/migrations/configuration/add_zip_config.php +++ /dev/null @@ -1,52 +0,0 @@ -config['upload_ext_dir']); - } - - static public function depends_on() - { - return array('\phpbb\db\migration\data\v310\dev'); - } - - public function update_data() - { - return array( - array('config.add', array('upload_ext_dir', $this->upload_directory())), - ); - } - - private function upload_directory() - { - $directory = 'store/ext'; - - if (!is_dir($this->phpbb_root_path . $directory)) - { - @mkdir($this->phpbb_root_path . $directory, 0755); - @chmod($this->phpbb_root_path . $directory, 0755); - - if (!is_dir($this->phpbb_root_path . $directory)) - { - $directory = 'ext'; - } - } - else if (!is_writable($this->phpbb_root_path . $directory)) - { - @chmod($this->phpbb_root_path . $directory, 0755); - } - - return $directory; - } -} diff --git a/migrations/install_upload.php b/migrations/install_upload.php deleted file mode 100644 index 1734021..0000000 --- a/migrations/install_upload.php +++ /dev/null @@ -1,37 +0,0 @@ -config['upload_version']) && version_compare($this->config['upload_version'], '3.1.1', '>='); - } - - static public function depends_on() - { - return array('\phpbb\db\migration\data\v310\dev'); - } - - public function update_data() - { - return array( - array('config.add', array('upload_version', '3.1.1')), - array('module.add', array( - 'acp', 'ACP_EXTENSION_MANAGEMENT', array( - 'module_basename' => '\boardtools\upload\acp\upload_module', - 'auth' => 'ext_boardtools/upload && acl_a_extensions', - 'modes' => array('main'), - ), - )), - ); - } -} diff --git a/tmp/.htaccess b/tmp/.htaccess deleted file mode 100644 index aa5afc1..0000000 --- a/tmp/.htaccess +++ /dev/null @@ -1,4 +0,0 @@ - - Order Allow,Deny - Deny from All - \ No newline at end of file diff --git a/tmp/index.htm b/tmp/index.htm deleted file mode 100644 index ee1f723..0000000 --- a/tmp/index.htm +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/upload_broken.png b/upload_broken.png new file mode 100644 index 0000000..c40fc15 Binary files /dev/null and b/upload_broken.png differ diff --git a/upload_broken_details.png b/upload_broken_details.png new file mode 100644 index 0000000..dfdde40 Binary files /dev/null and b/upload_broken_details.png differ diff --git a/upload_cdb.png b/upload_cdb.png new file mode 100644 index 0000000..6188055 Binary files /dev/null and b/upload_cdb.png differ diff --git a/upload_details.png b/upload_details.png new file mode 100644 index 0000000..dd97cc6 Binary files /dev/null and b/upload_details.png differ diff --git a/upload_faq.png b/upload_faq.png new file mode 100644 index 0000000..8ec36cd Binary files /dev/null and b/upload_faq.png differ diff --git a/upload_file_tree.png b/upload_file_tree.png new file mode 100644 index 0000000..8d4985e Binary files /dev/null and b/upload_file_tree.png differ diff --git a/upload_list.png b/upload_list.png new file mode 100644 index 0000000..dfae2e3 Binary files /dev/null and b/upload_list.png differ diff --git a/upload_main.png b/upload_main.png new file mode 100644 index 0000000..930d82a Binary files /dev/null and b/upload_main.png differ diff --git a/upload_status_icons.png b/upload_status_icons.png new file mode 100644 index 0000000..c8d3bae Binary files /dev/null and b/upload_status_icons.png differ diff --git a/upload_tools.png b/upload_tools.png new file mode 100644 index 0000000..478fbc7 Binary files /dev/null and b/upload_tools.png differ diff --git a/upload_update.png b/upload_update.png new file mode 100644 index 0000000..dd7e53e Binary files /dev/null and b/upload_update.png differ diff --git a/upload_upload.png b/upload_upload.png new file mode 100644 index 0000000..d4e69ba Binary files /dev/null and b/upload_upload.png differ diff --git a/vendor/autoload.php b/vendor/autoload.php deleted file mode 100644 index 58fb193..0000000 --- a/vendor/autoload.php +++ /dev/null @@ -1,7 +0,0 @@ - - * 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; - - 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-0 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; - } - - /** - * 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) - { - // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731 - if ('\\' == $class[0]) { - $class = substr($class, 1); - } - - // class map lookup - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - if ($this->classMapAuthoritative) { - return false; - } - - $file = $this->findFileWithExtension($class, '.php'); - - // Search for Hack files if we are running on HHVM - if ($file === null && defined('HHVM_VERSION')) { - $file = $this->findFileWithExtension($class, '.hh'); - } - - if ($file === null) { - // Remember that this class does not exist. - return $this->classMap[$class] = false; - } - - return $file; - } - - private function findFileWithExtension($class, $ext) - { - // PSR-4 lookup - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; - - $first = $class[0]; - if (isset($this->prefixLengthsPsr4[$first])) { - foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { - if (0 === strpos($class, $prefix)) { - foreach ($this->prefixDirsPsr4[$prefix] as $dir) { - 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; - } - } -} - -/** - * 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 deleted file mode 100644 index c8d57af..0000000 --- a/vendor/composer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - -Copyright (c) 2015 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 deleted file mode 100644 index 7a91153..0000000 --- a/vendor/composer/autoload_classmap.php +++ /dev/null @@ -1,9 +0,0 @@ - array($vendorDir . '/michelf/php-markdown'), -); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php deleted file mode 100644 index b01ab5b..0000000 --- a/vendor/composer/autoload_psr4.php +++ /dev/null @@ -1,10 +0,0 @@ - array($vendorDir . '/Markdown'), -); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php deleted file mode 100644 index 9fd1e9e..0000000 --- a/vendor/composer/autoload_real.php +++ /dev/null @@ -1,45 +0,0 @@ - $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - - $loader->register(true); - - return $loader; - } -} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json deleted file mode 100644 index c706438..0000000 --- a/vendor/composer/installed.json +++ /dev/null @@ -1,105 +0,0 @@ -[ - { - "name": "michelf/php-markdown", - "version": "1.5.0", - "version_normalized": "1.5.0.0", - "source": { - "type": "git", - "url": "https://github.com/michelf/php-markdown.git", - "reference": "e1aabe18173231ebcefc90e615565742fc1c7fd9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/michelf/php-markdown/zipball/e1aabe18173231ebcefc90e615565742fc1c7fd9", - "reference": "e1aabe18173231ebcefc90e615565742fc1c7fd9", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2015-03-01 12:03:08", - "type": "library", - "extra": { - "branch-alias": { - "dev-lib": "1.4.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Michelf": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "John Gruber", - "homepage": "http://daringfireball.net/" - }, - { - "name": "Michel Fortin", - "email": "michel.fortin@michelf.ca", - "homepage": "https://michelf.ca/", - "role": "Developer" - } - ], - "description": "PHP Markdown", - "homepage": "https://michelf.ca/projects/php-markdown/", - "keywords": [ - "markdown" - ] - }, - { - "name": "fortawesome/font-awesome", - "version": "v4.5.0", - "version_normalized": "4.5.0.0", - "source": { - "type": "git", - "url": "https://github.com/FortAwesome/Font-Awesome.git", - "reference": "dbc8d1b9b67daaab357bcc41dbf549c3684cf5f1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/FortAwesome/Font-Awesome/zipball/dbc8d1b9b67daaab357bcc41dbf549c3684cf5f1", - "reference": "dbc8d1b9b67daaab357bcc41dbf549c3684cf5f1", - "shasum": "" - }, - "require-dev": { - "jekyll": "1.0.2", - "lessc": "1.4.2" - }, - "time": "2015-11-23 14:42:32", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0.x-dev" - } - }, - "installation-source": "dist", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "OFL-1.1", - "MIT" - ], - "authors": [ - { - "name": "Dave Gandy", - "email": "dave@fontawesome.io", - "homepage": "http://twitter.com/davegandy", - "role": "Developer" - } - ], - "description": "The iconic font and CSS framework", - "homepage": "http://fontawesome.io/", - "keywords": [ - "FontAwesome", - "awesome", - "bootstrap", - "font", - "icon" - ] - } -] diff --git a/vendor/fortawesome/font-awesome/README.md b/vendor/fortawesome/font-awesome/README.md deleted file mode 100644 index abe2489..0000000 --- a/vendor/fortawesome/font-awesome/README.md +++ /dev/null @@ -1,100 +0,0 @@ -#[Font Awesome v4.5.0](http://fontawesome.io) -###The iconic font and CSS framework - -Font Awesome is a full suite of 605 pictographic icons for easy scalable vector graphics on websites, -created and maintained by [Dave Gandy](http://twitter.com/davegandy). -Stay up to date with the latest release and announcements on Twitter: -[@fontawesome](http://twitter.com/fontawesome). - -Get started at http://fontawesome.io! - -##License -- The Font Awesome font is licensed under the SIL OFL 1.1: - - http://scripts.sil.org/OFL -- Font Awesome CSS, LESS, and Sass files are licensed under the MIT License: - - http://opensource.org/licenses/mit-license.html -- The Font Awesome documentation is licensed under the CC BY 3.0 License: - - http://creativecommons.org/licenses/by/3.0/ -- Attribution is no longer required as of Font Awesome 3.0, but much appreciated: - - `Font Awesome by Dave Gandy - http://fontawesome.io` -- Full details: http://fontawesome.io/license - -##Changelog -- [v4.5.0 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?q=milestone%3A4.5.0+is%3Aclosed) -- [v4.4.0 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?q=milestone%3A4.4.0+is%3Aclosed) -- [v4.3.0 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?q=milestone%3A4.3.0+is%3Aclosed) -- [v4.2.0 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=12&page=1&state=closed) -- [v4.1.0 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=6&page=1&state=closed) -- [v4.0.3 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=9&page=1&state=closed) -- [v4.0.2 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=8&page=1&state=closed) -- [v4.0.1 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=7&page=1&state=closed) -- [v4.0.0 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=2&page=1&state=closed) -- [v3.2.1 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=5&page=1&state=closed) -- [v3.2.0 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=3&page=1&state=closed) -- [v3.1.1 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=4&page=1&state=closed) -- v3.1.0 - Added 54 icons, icon stacking styles, flipping and rotating icons, removed Sass support -- v3.0.2 - much improved rendering and alignment in IE7 -- v3.0.1 - much improved rendering in webkit, various bug fixes -- v3.0.0 - all icons redesigned from scratch, optimized for Bootstrap's 14px default - -## Contributing - -Please read through our [contributing guidelines](https://github.com/FortAwesome/Font-Awesome/blob/master/CONTRIBUTING.md). -Included are directions for opening issues, coding standards, and notes on development. - -##Versioning - -Font Awesome will be maintained under the Semantic Versioning guidelines as much as possible. Releases will be numbered -with the following format: - -`..` - -And constructed with the following guidelines: - -* Breaking backward compatibility bumps the major (and resets the minor and patch) -* New additions, including new icons, without breaking backward compatibility bumps the minor (and resets the patch) -* Bug fixes and misc changes bumps the patch - -For more information on SemVer, please visit http://semver.org. - -##Author -- Email: dave@fontawesome.io -- Twitter: http://twitter.com/davegandy -- GitHub: https://github.com/davegandy - -##Component -To include as a [component](http://github.com/component/component), just run - - $ component install FortAwesome/Font-Awesome - -Or add - - "FortAwesome/Font-Awesome": "*" - -to the `dependencies` in your `component.json`. - -## Hacking on Font Awesome - -**Before you can build the project**, you must first have the following installed: - -- [Ruby](https://www.ruby-lang.org/en/) -- Ruby Development Headers - - **Ubuntu:** `sudo apt-get install ruby-dev` *(Only if you're __NOT__ using `rbenv` or `rvm`)* - - **Windows:** [DevKit](http://rubyinstaller.org/) -- [Bundler](http://bundler.io/) (Run `gem install bundler` to install). -- [Node Package Manager (AKA NPM)](https://docs.npmjs.com/getting-started/installing-node) -- [Less](http://lesscss.org/) (Run `npm install -g less` to install). -- [Less Plugin: Clean CSS](https://github.com/less/less-plugin-clean-css) (Run `npm install -g less-plugin-clean-css` to install). - -From the root of the repository, install the tools used to develop. - - $ bundle install - $ npm install - -Build the project and documentation: - - $ bundle exec jekyll build - -Or serve it on a local server on http://localhost:7998/Font-Awesome/: - - $ bundle exec jekyll -w serve diff --git a/vendor/fortawesome/font-awesome/composer.json b/vendor/fortawesome/font-awesome/composer.json deleted file mode 100644 index f1b9f37..0000000 --- a/vendor/fortawesome/font-awesome/composer.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "fortawesome/font-awesome", - "description": "The iconic font and CSS framework", - "keywords": ["font", "awesome", "fontawesome", "icon", "font", "bootstrap"], - "homepage": "http://fontawesome.io/", - "authors": [ - { - "name": "Dave Gandy", - "email": "dave@fontawesome.io", - "role": "Developer", - "homepage": "http://twitter.com/davegandy" - } - ], - "extra": { - "branch-alias": { - "dev-master": "4.0.x-dev" - } - }, - "license": [ - "OFL-1.1", - "MIT" - ], - "require-dev": { - "jekyll": "1.0.2", - "lessc": "1.4.2" - } -} diff --git a/vendor/fortawesome/font-awesome/css/font-awesome.min.css b/vendor/fortawesome/font-awesome/css/font-awesome.min.css deleted file mode 100644 index d0603cb..0000000 --- a/vendor/fortawesome/font-awesome/css/font-awesome.min.css +++ /dev/null @@ -1,4 +0,0 @@ -/*! - * Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome - * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.5.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.5.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.5.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.5.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"} diff --git a/vendor/fortawesome/font-awesome/fonts/FontAwesome.otf b/vendor/fortawesome/font-awesome/fonts/FontAwesome.otf deleted file mode 100644 index 3ed7f8b..0000000 Binary files a/vendor/fortawesome/font-awesome/fonts/FontAwesome.otf and /dev/null differ diff --git a/vendor/fortawesome/font-awesome/fonts/fontawesome-webfont.eot b/vendor/fortawesome/font-awesome/fonts/fontawesome-webfont.eot deleted file mode 100644 index 9b6afae..0000000 Binary files a/vendor/fortawesome/font-awesome/fonts/fontawesome-webfont.eot and /dev/null differ diff --git a/vendor/fortawesome/font-awesome/fonts/fontawesome-webfont.svg b/vendor/fortawesome/font-awesome/fonts/fontawesome-webfont.svg deleted file mode 100644 index d05688e..0000000 --- a/vendor/fortawesome/font-awesome/fonts/fontawesome-webfont.svg +++ /dev/null @@ -1,655 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vendor/fortawesome/font-awesome/fonts/fontawesome-webfont.ttf b/vendor/fortawesome/font-awesome/fonts/fontawesome-webfont.ttf deleted file mode 100644 index 26dea79..0000000 Binary files a/vendor/fortawesome/font-awesome/fonts/fontawesome-webfont.ttf and /dev/null differ diff --git a/vendor/fortawesome/font-awesome/fonts/fontawesome-webfont.woff b/vendor/fortawesome/font-awesome/fonts/fontawesome-webfont.woff deleted file mode 100644 index dc35ce3..0000000 Binary files a/vendor/fortawesome/font-awesome/fonts/fontawesome-webfont.woff and /dev/null differ diff --git a/vendor/fortawesome/font-awesome/fonts/fontawesome-webfont.woff2 b/vendor/fortawesome/font-awesome/fonts/fontawesome-webfont.woff2 deleted file mode 100644 index 500e517..0000000 Binary files a/vendor/fortawesome/font-awesome/fonts/fontawesome-webfont.woff2 and /dev/null differ diff --git a/vendor/michelf/php-markdown/License.md b/vendor/michelf/php-markdown/License.md deleted file mode 100644 index bcb5f2a..0000000 --- a/vendor/michelf/php-markdown/License.md +++ /dev/null @@ -1,36 +0,0 @@ -PHP Markdown Lib -Copyright (c) 2004-2015 Michel Fortin - -All rights reserved. - -Based on Markdown -Copyright (c) 2003-2006 John Gruber - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -* Neither the name "Markdown" nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -This software is provided by the copyright holders and contributors "as -is" and any express or implied warranties, including, but not limited -to, the implied warranties of merchantability and fitness for a -particular purpose are disclaimed. In no event shall the copyright owner -or contributors be liable for any direct, indirect, incidental, special, -exemplary, or consequential damages (including, but not limited to, -procurement of substitute goods or services; loss of use, data, or -profits; or business interruption) however caused and on any theory of -liability, whether in contract, strict liability, or tort (including -negligence or otherwise) arising in any way out of the use of this -software, even if advised of the possibility of such damage. diff --git a/vendor/michelf/php-markdown/Michelf/Markdown.inc.php b/vendor/michelf/php-markdown/Michelf/Markdown.inc.php deleted file mode 100644 index 8c28109..0000000 --- a/vendor/michelf/php-markdown/Michelf/Markdown.inc.php +++ /dev/null @@ -1,10 +0,0 @@ - -# -# Original Markdown -# Copyright (c) 2004-2006 John Gruber -# -# -namespace Michelf; - - -# -# Markdown Parser Class -# - -class Markdown implements MarkdownInterface { - - ### Version ### - - const MARKDOWNLIB_VERSION = "1.5.0"; - - ### Simple Function Interface ### - - public static function defaultTransform($text) { - # - # Initialize the parser and return the result of its transform method. - # This will work fine for derived classes too. - # - # Take parser class on which this function was called. - $parser_class = \get_called_class(); - - # try to take parser from the static parser list - static $parser_list; - $parser =& $parser_list[$parser_class]; - - # create the parser it not already set - if (!$parser) - $parser = new $parser_class; - - # Transform text using parser. - return $parser->transform($text); - } - - ### Configuration Variables ### - - # Change to ">" for HTML output. - public $empty_element_suffix = " />"; - public $tab_width = 4; - - # Change to `true` to disallow markup or entities. - public $no_markup = false; - public $no_entities = false; - - # Predefined urls and titles for reference links and images. - public $predef_urls = array(); - public $predef_titles = array(); - - # Optional filter function for URLs - public $url_filter_func = null; - - # Optional header id="" generation callback function. - public $header_id_func = null; - - # Class attribute to toggle "enhanced ordered list" behaviour - # setting this to true will allow ordered lists to start from the index - # number that is defined first. For example: - # 2. List item two - # 3. List item three - # - # becomes - #
      - #
    1. List item two
    2. - #
    3. List item three
    4. - #
    - public $enhanced_ordered_list = false; - - ### Parser Implementation ### - - # Regex to match balanced [brackets]. - # Needed to insert a maximum bracked depth while converting to PHP. - protected $nested_brackets_depth = 6; - protected $nested_brackets_re; - - protected $nested_url_parenthesis_depth = 4; - protected $nested_url_parenthesis_re; - - # Table of hash values for escaped characters: - protected $escape_chars = '\`*_{}[]()>#+-.!'; - protected $escape_chars_re; - - - public function __construct() { - # - # Constructor function. Initialize appropriate member variables. - # - $this->_initDetab(); - $this->prepareItalicsAndBold(); - - $this->nested_brackets_re = - str_repeat('(?>[^\[\]]+|\[', $this->nested_brackets_depth). - str_repeat('\])*', $this->nested_brackets_depth); - - $this->nested_url_parenthesis_re = - str_repeat('(?>[^()\s]+|\(', $this->nested_url_parenthesis_depth). - str_repeat('(?>\)))*', $this->nested_url_parenthesis_depth); - - $this->escape_chars_re = '['.preg_quote($this->escape_chars).']'; - - # Sort document, block, and span gamut in ascendent priority order. - asort($this->document_gamut); - asort($this->block_gamut); - asort($this->span_gamut); - } - - - # Internal hashes used during transformation. - protected $urls = array(); - protected $titles = array(); - protected $html_hashes = array(); - - # Status flag to avoid invalid nesting. - protected $in_anchor = false; - - - protected function setup() { - # - # Called before the transformation process starts to setup parser - # states. - # - # Clear global hashes. - $this->urls = $this->predef_urls; - $this->titles = $this->predef_titles; - $this->html_hashes = array(); - - $this->in_anchor = false; - } - - protected function teardown() { - # - # Called after the transformation process to clear any variable - # which may be taking up memory unnecessarly. - # - $this->urls = array(); - $this->titles = array(); - $this->html_hashes = array(); - } - - - public function transform($text) { - # - # Main function. Performs some preprocessing on the input text - # and pass it through the document gamut. - # - $this->setup(); - - # Remove UTF-8 BOM and marker character in input, if present. - $text = preg_replace('{^\xEF\xBB\xBF|\x1A}', '', $text); - - # Standardize line endings: - # DOS to Unix and Mac to Unix - $text = preg_replace('{\r\n?}', "\n", $text); - - # Make sure $text ends with a couple of newlines: - $text .= "\n\n"; - - # Convert all tabs to spaces. - $text = $this->detab($text); - - # Turn block-level HTML blocks into hash entries - $text = $this->hashHTMLBlocks($text); - - # Strip any lines consisting only of spaces and tabs. - # This makes subsequent regexen easier to write, because we can - # match consecutive blank lines with /\n+/ instead of something - # contorted like /[ ]*\n+/ . - $text = preg_replace('/^[ ]+$/m', '', $text); - - # Run document gamut methods. - foreach ($this->document_gamut as $method => $priority) { - $text = $this->$method($text); - } - - $this->teardown(); - - return $text . "\n"; - } - - protected $document_gamut = array( - # Strip link definitions, store in hashes. - "stripLinkDefinitions" => 20, - - "runBasicBlockGamut" => 30, - ); - - - protected function stripLinkDefinitions($text) { - # - # Strips link definitions from text, stores the URLs and titles in - # hash references. - # - $less_than_tab = $this->tab_width - 1; - - # Link defs are in the form: ^[id]: url "optional title" - $text = preg_replace_callback('{ - ^[ ]{0,'.$less_than_tab.'}\[(.+)\][ ]?: # id = $1 - [ ]* - \n? # maybe *one* newline - [ ]* - (?: - <(.+?)> # url = $2 - | - (\S+?) # url = $3 - ) - [ ]* - \n? # maybe one newline - [ ]* - (?: - (?<=\s) # lookbehind for whitespace - ["(] - (.*?) # title = $4 - [")] - [ ]* - )? # title is optional - (?:\n+|\Z) - }xm', - array($this, '_stripLinkDefinitions_callback'), - $text); - return $text; - } - protected function _stripLinkDefinitions_callback($matches) { - $link_id = strtolower($matches[1]); - $url = $matches[2] == '' ? $matches[3] : $matches[2]; - $this->urls[$link_id] = $url; - $this->titles[$link_id] =& $matches[4]; - return ''; # String that will replace the block - } - - - protected function hashHTMLBlocks($text) { - if ($this->no_markup) return $text; - - $less_than_tab = $this->tab_width - 1; - - # Hashify HTML blocks: - # We only want to do this for block-level HTML tags, such as headers, - # lists, and tables. That's because we still want to wrap

    s around - # "paragraphs" that are wrapped in non-block-level tags, such as anchors, - # phrase emphasis, and spans. The list of tags we're looking for is - # hard-coded: - # - # * List "a" is made of tags which can be both inline or block-level. - # These will be treated block-level when the start tag is alone on - # its line, otherwise they're not matched here and will be taken as - # inline later. - # * List "b" is made of tags which are always block-level; - # - $block_tags_a_re = 'ins|del'; - $block_tags_b_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|'. - 'script|noscript|style|form|fieldset|iframe|math|svg|'. - 'article|section|nav|aside|hgroup|header|footer|'. - 'figure'; - - # Regular expression for the content of a block tag. - $nested_tags_level = 4; - $attr = ' - (?> # optional tag attributes - \s # starts with whitespace - (?> - [^>"/]+ # text outside quotes - | - /+(?!>) # slash not followed by ">" - | - "[^"]*" # text inside double quotes (tolerate ">") - | - \'[^\']*\' # text inside single quotes (tolerate ">") - )* - )? - '; - $content = - str_repeat(' - (?> - [^<]+ # content without tag - | - <\2 # nested opening tag - '.$attr.' # attributes - (?> - /> - | - >', $nested_tags_level). # end of opening tag - '.*?'. # last level nested tag content - str_repeat(' - # closing nested tag - ) - | - <(?!/\2\s*> # other tags with a different name - ) - )*', - $nested_tags_level); - $content2 = str_replace('\2', '\3', $content); - - # First, look for nested blocks, e.g.: - #

    - #
    - # tags for inner block must be indented. - #
    - #
    - # - # The outermost tags must start at the left margin for this to match, and - # the inner nested divs must be indented. - # We need to do this before the next, more liberal match, because the next - # match will start at the first `
    ` and stop at the first `
    `. - $text = preg_replace_callback('{(?> - (?> - (?<=\n) # Starting on its own line - | # or - \A\n? # the at beginning of the doc - ) - ( # save in $1 - - # Match from `\n` to `\n`, handling nested tags - # in between. - - [ ]{0,'.$less_than_tab.'} - <('.$block_tags_b_re.')# start tag = $2 - '.$attr.'> # attributes followed by > and \n - '.$content.' # content, support nesting - # the matching end tag - [ ]* # trailing spaces/tabs - (?=\n+|\Z) # followed by a newline or end of document - - | # Special version for tags of group a. - - [ ]{0,'.$less_than_tab.'} - <('.$block_tags_a_re.')# start tag = $3 - '.$attr.'>[ ]*\n # attributes followed by > - '.$content2.' # content, support nesting - # the matching end tag - [ ]* # trailing spaces/tabs - (?=\n+|\Z) # followed by a newline or end of document - - | # Special case just for
    . It was easier to make a special - # case than to make the other regex more complicated. - - [ ]{0,'.$less_than_tab.'} - <(hr) # start tag = $2 - '.$attr.' # attributes - /?> # the matching end tag - [ ]* - (?=\n{2,}|\Z) # followed by a blank line or end of document - - | # Special case for standalone HTML comments: - - [ ]{0,'.$less_than_tab.'} - (?s: - - ) - [ ]* - (?=\n{2,}|\Z) # followed by a blank line or end of document - - | # PHP and ASP-style processor instructions ( - ) - [ ]* - (?=\n{2,}|\Z) # followed by a blank line or end of document - - ) - )}Sxmi', - array($this, '_hashHTMLBlocks_callback'), - $text); - - return $text; - } - protected function _hashHTMLBlocks_callback($matches) { - $text = $matches[1]; - $key = $this->hashBlock($text); - return "\n\n$key\n\n"; - } - - - protected function hashPart($text, $boundary = 'X') { - # - # Called whenever a tag must be hashed when a function insert an atomic - # element in the text stream. Passing $text to through this function gives - # a unique text-token which will be reverted back when calling unhash. - # - # The $boundary argument specify what character should be used to surround - # the token. By convension, "B" is used for block elements that needs not - # to be wrapped into paragraph tags at the end, ":" is used for elements - # that are word separators and "X" is used in the general case. - # - # Swap back any tag hash found in $text so we do not have to `unhash` - # multiple times at the end. - $text = $this->unhash($text); - - # Then hash the block. - static $i = 0; - $key = "$boundary\x1A" . ++$i . $boundary; - $this->html_hashes[$key] = $text; - return $key; # String that will replace the tag. - } - - - protected function hashBlock($text) { - # - # Shortcut function for hashPart with block-level boundaries. - # - return $this->hashPart($text, 'B'); - } - - - protected $block_gamut = array( - # - # These are all the transformations that form block-level - # tags like paragraphs, headers, and list items. - # - "doHeaders" => 10, - "doHorizontalRules" => 20, - - "doLists" => 40, - "doCodeBlocks" => 50, - "doBlockQuotes" => 60, - ); - - protected function runBlockGamut($text) { - # - # Run block gamut tranformations. - # - # We need to escape raw HTML in Markdown source before doing anything - # else. This need to be done for each block, and not only at the - # begining in the Markdown function since hashed blocks can be part of - # list items and could have been indented. Indented blocks would have - # been seen as a code block in a previous pass of hashHTMLBlocks. - $text = $this->hashHTMLBlocks($text); - - return $this->runBasicBlockGamut($text); - } - - protected function runBasicBlockGamut($text) { - # - # Run block gamut tranformations, without hashing HTML blocks. This is - # useful when HTML blocks are known to be already hashed, like in the first - # whole-document pass. - # - foreach ($this->block_gamut as $method => $priority) { - $text = $this->$method($text); - } - - # Finally form paragraph and restore hashed blocks. - $text = $this->formParagraphs($text); - - return $text; - } - - - protected function doHorizontalRules($text) { - # Do Horizontal Rules: - return preg_replace( - '{ - ^[ ]{0,3} # Leading space - ([-*_]) # $1: First marker - (?> # Repeated marker group - [ ]{0,2} # Zero, one, or two spaces. - \1 # Marker character - ){2,} # Group repeated at least twice - [ ]* # Tailing spaces - $ # End of line. - }mx', - "\n".$this->hashBlock("empty_element_suffix")."\n", - $text); - } - - - protected $span_gamut = array( - # - # These are all the transformations that occur *within* block-level - # tags like paragraphs, headers, and list items. - # - # Process character escapes, code spans, and inline HTML - # in one shot. - "parseSpan" => -30, - - # Process anchor and image tags. Images must come first, - # because ![foo][f] looks like an anchor. - "doImages" => 10, - "doAnchors" => 20, - - # Make links out of things like `` - # Must come after doAnchors, because you can use < and > - # delimiters in inline links like [this](). - "doAutoLinks" => 30, - "encodeAmpsAndAngles" => 40, - - "doItalicsAndBold" => 50, - "doHardBreaks" => 60, - ); - - protected function runSpanGamut($text) { - # - # Run span gamut tranformations. - # - foreach ($this->span_gamut as $method => $priority) { - $text = $this->$method($text); - } - - return $text; - } - - - protected function doHardBreaks($text) { - # Do hard breaks: - return preg_replace_callback('/ {2,}\n/', - array($this, '_doHardBreaks_callback'), $text); - } - protected function _doHardBreaks_callback($matches) { - return $this->hashPart("empty_element_suffix\n"); - } - - - protected function doAnchors($text) { - # - # Turn Markdown link shortcuts into XHTML tags. - # - if ($this->in_anchor) return $text; - $this->in_anchor = true; - - # - # First, handle reference-style links: [link text] [id] - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - \[ - ('.$this->nested_brackets_re.') # link text = $2 - \] - - [ ]? # one optional space - (?:\n[ ]*)? # one optional newline followed by spaces - - \[ - (.*?) # id = $3 - \] - ) - }xs', - array($this, '_doAnchors_reference_callback'), $text); - - # - # Next, inline-style links: [link text](url "optional title") - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - \[ - ('.$this->nested_brackets_re.') # link text = $2 - \] - \( # literal paren - [ \n]* - (?: - <(.+?)> # href = $3 - | - ('.$this->nested_url_parenthesis_re.') # href = $4 - ) - [ \n]* - ( # $5 - ([\'"]) # quote char = $6 - (.*?) # Title = $7 - \6 # matching quote - [ \n]* # ignore any spaces/tabs between closing quote and ) - )? # title is optional - \) - ) - }xs', - array($this, '_doAnchors_inline_callback'), $text); - - # - # Last, handle reference-style shortcuts: [link text] - # These must come last in case you've also got [link text][1] - # or [link text](/foo) - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - \[ - ([^\[\]]+) # link text = $2; can\'t contain [ or ] - \] - ) - }xs', - array($this, '_doAnchors_reference_callback'), $text); - - $this->in_anchor = false; - return $text; - } - protected function _doAnchors_reference_callback($matches) { - $whole_match = $matches[1]; - $link_text = $matches[2]; - $link_id =& $matches[3]; - - if ($link_id == "") { - # for shortcut links like [this][] or [this]. - $link_id = $link_text; - } - - # lower-case and turn embedded newlines into spaces - $link_id = strtolower($link_id); - $link_id = preg_replace('{[ ]?\n}', ' ', $link_id); - - if (isset($this->urls[$link_id])) { - $url = $this->urls[$link_id]; - $url = $this->encodeURLAttribute($url); - - $result = "titles[$link_id] ) ) { - $title = $this->titles[$link_id]; - $title = $this->encodeAttribute($title); - $result .= " title=\"$title\""; - } - - $link_text = $this->runSpanGamut($link_text); - $result .= ">$link_text"; - $result = $this->hashPart($result); - } - else { - $result = $whole_match; - } - return $result; - } - protected function _doAnchors_inline_callback($matches) { - $whole_match = $matches[1]; - $link_text = $this->runSpanGamut($matches[2]); - $url = $matches[3] == '' ? $matches[4] : $matches[3]; - $title =& $matches[7]; - - // if the URL was of the form it got caught by the HTML - // tag parser and hashed. Need to reverse the process before using the URL. - $unhashed = $this->unhash($url); - if ($unhashed != $url) - $url = preg_replace('/^<(.*)>$/', '\1', $unhashed); - - $url = $this->encodeURLAttribute($url); - - $result = "encodeAttribute($title); - $result .= " title=\"$title\""; - } - - $link_text = $this->runSpanGamut($link_text); - $result .= ">$link_text"; - - return $this->hashPart($result); - } - - - protected function doImages($text) { - # - # Turn Markdown image shortcuts into tags. - # - # - # First, handle reference-style labeled images: ![alt text][id] - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - !\[ - ('.$this->nested_brackets_re.') # alt text = $2 - \] - - [ ]? # one optional space - (?:\n[ ]*)? # one optional newline followed by spaces - - \[ - (.*?) # id = $3 - \] - - ) - }xs', - array($this, '_doImages_reference_callback'), $text); - - # - # Next, handle inline images: ![alt text](url "optional title") - # Don't forget: encode * and _ - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - !\[ - ('.$this->nested_brackets_re.') # alt text = $2 - \] - \s? # One optional whitespace character - \( # literal paren - [ \n]* - (?: - <(\S*)> # src url = $3 - | - ('.$this->nested_url_parenthesis_re.') # src url = $4 - ) - [ \n]* - ( # $5 - ([\'"]) # quote char = $6 - (.*?) # title = $7 - \6 # matching quote - [ \n]* - )? # title is optional - \) - ) - }xs', - array($this, '_doImages_inline_callback'), $text); - - return $text; - } - protected function _doImages_reference_callback($matches) { - $whole_match = $matches[1]; - $alt_text = $matches[2]; - $link_id = strtolower($matches[3]); - - if ($link_id == "") { - $link_id = strtolower($alt_text); # for shortcut links like ![this][]. - } - - $alt_text = $this->encodeAttribute($alt_text); - if (isset($this->urls[$link_id])) { - $url = $this->encodeURLAttribute($this->urls[$link_id]); - $result = "\"$alt_text\"";titles[$link_id])) { - $title = $this->titles[$link_id]; - $title = $this->encodeAttribute($title); - $result .= " title=\"$title\""; - } - $result .= $this->empty_element_suffix; - $result = $this->hashPart($result); - } - else { - # If there's no such link ID, leave intact: - $result = $whole_match; - } - - return $result; - } - protected function _doImages_inline_callback($matches) { - $whole_match = $matches[1]; - $alt_text = $matches[2]; - $url = $matches[3] == '' ? $matches[4] : $matches[3]; - $title =& $matches[7]; - - $alt_text = $this->encodeAttribute($alt_text); - $url = $this->encodeURLAttribute($url); - $result = "\"$alt_text\"";encodeAttribute($title); - $result .= " title=\"$title\""; # $title already quoted - } - $result .= $this->empty_element_suffix; - - return $this->hashPart($result); - } - - - protected function doHeaders($text) { - # Setext-style headers: - # Header 1 - # ======== - # - # Header 2 - # -------- - # - $text = preg_replace_callback('{ ^(.+?)[ ]*\n(=+|-+)[ ]*\n+ }mx', - array($this, '_doHeaders_callback_setext'), $text); - - # atx-style headers: - # # Header 1 - # ## Header 2 - # ## Header 2 with closing hashes ## - # ... - # ###### Header 6 - # - $text = preg_replace_callback('{ - ^(\#{1,6}) # $1 = string of #\'s - [ ]* - (.+?) # $2 = Header text - [ ]* - \#* # optional closing #\'s (not counted) - \n+ - }xm', - array($this, '_doHeaders_callback_atx'), $text); - - return $text; - } - - protected function _doHeaders_callback_setext($matches) { - # Terrible hack to check we haven't found an empty list item. - if ($matches[2] == '-' && preg_match('{^-(?: |$)}', $matches[1])) - return $matches[0]; - - $level = $matches[2]{0} == '=' ? 1 : 2; - - # id attribute generation - $idAtt = $this->_generateIdFromHeaderValue($matches[1]); - - $block = "".$this->runSpanGamut($matches[1]).""; - return "\n" . $this->hashBlock($block) . "\n\n"; - } - protected function _doHeaders_callback_atx($matches) { - - # id attribute generation - $idAtt = $this->_generateIdFromHeaderValue($matches[2]); - - $level = strlen($matches[1]); - $block = "".$this->runSpanGamut($matches[2]).""; - return "\n" . $this->hashBlock($block) . "\n\n"; - } - - protected function _generateIdFromHeaderValue($headerValue) { - - # if a header_id_func property is set, we can use it to automatically - # generate an id attribute. - # - # This method returns a string in the form id="foo", or an empty string - # otherwise. - if (!is_callable($this->header_id_func)) { - return ""; - } - $idValue = call_user_func($this->header_id_func, $headerValue); - if (!$idValue) return ""; - - return ' id="' . $this->encodeAttribute($idValue) . '"'; - - } - - protected function doLists($text) { - # - # Form HTML ordered (numbered) and unordered (bulleted) lists. - # - $less_than_tab = $this->tab_width - 1; - - # Re-usable patterns to match list item bullets and number markers: - $marker_ul_re = '[*+-]'; - $marker_ol_re = '\d+[\.]'; - - $markers_relist = array( - $marker_ul_re => $marker_ol_re, - $marker_ol_re => $marker_ul_re, - ); - - foreach ($markers_relist as $marker_re => $other_marker_re) { - # Re-usable pattern to match any entirel ul or ol list: - $whole_list_re = ' - ( # $1 = whole list - ( # $2 - ([ ]{0,'.$less_than_tab.'}) # $3 = number of spaces - ('.$marker_re.') # $4 = first list item marker - [ ]+ - ) - (?s:.+?) - ( # $5 - \z - | - \n{2,} - (?=\S) - (?! # Negative lookahead for another list item marker - [ ]* - '.$marker_re.'[ ]+ - ) - | - (?= # Lookahead for another kind of list - \n - \3 # Must have the same indentation - '.$other_marker_re.'[ ]+ - ) - ) - ) - '; // mx - - # We use a different prefix before nested lists than top-level lists. - # See extended comment in _ProcessListItems(). - - if ($this->list_level) { - $text = preg_replace_callback('{ - ^ - '.$whole_list_re.' - }mx', - array($this, '_doLists_callback'), $text); - } - else { - $text = preg_replace_callback('{ - (?:(?<=\n)\n|\A\n?) # Must eat the newline - '.$whole_list_re.' - }mx', - array($this, '_doLists_callback'), $text); - } - } - - return $text; - } - protected function _doLists_callback($matches) { - # Re-usable patterns to match list item bullets and number markers: - $marker_ul_re = '[*+-]'; - $marker_ol_re = '\d+[\.]'; - $marker_any_re = "(?:$marker_ul_re|$marker_ol_re)"; - $marker_ol_start_re = '[0-9]+'; - - $list = $matches[1]; - $list_type = preg_match("/$marker_ul_re/", $matches[4]) ? "ul" : "ol"; - - $marker_any_re = ( $list_type == "ul" ? $marker_ul_re : $marker_ol_re ); - - $list .= "\n"; - $result = $this->processListItems($list, $marker_any_re); - - $ol_start = 1; - if ($this->enhanced_ordered_list) { - # Get the start number for ordered list. - if ($list_type == 'ol') { - $ol_start_array = array(); - $ol_start_check = preg_match("/$marker_ol_start_re/", $matches[4], $ol_start_array); - if ($ol_start_check){ - $ol_start = $ol_start_array[0]; - } - } - } - - if ($ol_start > 1 && $list_type == 'ol'){ - $result = $this->hashBlock("<$list_type start=\"$ol_start\">\n" . $result . ""); - } else { - $result = $this->hashBlock("<$list_type>\n" . $result . ""); - } - return "\n". $result ."\n\n"; - } - - protected $list_level = 0; - - protected function processListItems($list_str, $marker_any_re) { - # - # Process the contents of a single ordered or unordered list, splitting it - # into individual list items. - # - # The $this->list_level global keeps track of when we're inside a list. - # Each time we enter a list, we increment it; when we leave a list, - # we decrement. If it's zero, we're not in a list anymore. - # - # We do this because when we're not inside a list, we want to treat - # something like this: - # - # I recommend upgrading to version - # 8. Oops, now this line is treated - # as a sub-list. - # - # As a single paragraph, despite the fact that the second line starts - # with a digit-period-space sequence. - # - # Whereas when we're inside a list (or sub-list), that line will be - # treated as the start of a sub-list. What a kludge, huh? This is - # an aspect of Markdown's syntax that's hard to parse perfectly - # without resorting to mind-reading. Perhaps the solution is to - # change the syntax rules such that sub-lists must start with a - # starting cardinal number; e.g. "1." or "a.". - - $this->list_level++; - - # trim trailing blank lines: - $list_str = preg_replace("/\n{2,}\\z/", "\n", $list_str); - - $list_str = preg_replace_callback('{ - (\n)? # leading line = $1 - (^[ ]*) # leading whitespace = $2 - ('.$marker_any_re.' # list marker and space = $3 - (?:[ ]+|(?=\n)) # space only required if item is not empty - ) - ((?s:.*?)) # list item text = $4 - (?:(\n+(?=\n))|\n) # tailing blank line = $5 - (?= \n* (\z | \2 ('.$marker_any_re.') (?:[ ]+|(?=\n)))) - }xm', - array($this, '_processListItems_callback'), $list_str); - - $this->list_level--; - return $list_str; - } - protected function _processListItems_callback($matches) { - $item = $matches[4]; - $leading_line =& $matches[1]; - $leading_space =& $matches[2]; - $marker_space = $matches[3]; - $tailing_blank_line =& $matches[5]; - - if ($leading_line || $tailing_blank_line || - preg_match('/\n{2,}/', $item)) - { - # Replace marker with the appropriate whitespace indentation - $item = $leading_space . str_repeat(' ', strlen($marker_space)) . $item; - $item = $this->runBlockGamut($this->outdent($item)."\n"); - } - else { - # Recursion for sub-lists: - $item = $this->doLists($this->outdent($item)); - $item = preg_replace('/\n+$/', '', $item); - $item = $this->runSpanGamut($item); - } - - return "
  • " . $item . "
  • \n"; - } - - - protected function doCodeBlocks($text) { - # - # Process Markdown `
    ` blocks.
    -	#
    -		$text = preg_replace_callback('{
    -				(?:\n\n|\A\n?)
    -				(	            # $1 = the code block -- one or more lines, starting with a space/tab
    -				  (?>
    -					[ ]{'.$this->tab_width.'}  # Lines must start with a tab or a tab-width of spaces
    -					.*\n+
    -				  )+
    -				)
    -				((?=^[ ]{0,'.$this->tab_width.'}\S)|\Z)	# Lookahead for non-space at line-start, or end of doc
    -			}xm',
    -			array($this, '_doCodeBlocks_callback'), $text);
    -
    -		return $text;
    -	}
    -	protected function _doCodeBlocks_callback($matches) {
    -		$codeblock = $matches[1];
    -
    -		$codeblock = $this->outdent($codeblock);
    -		$codeblock = htmlspecialchars($codeblock, ENT_NOQUOTES);
    -
    -		# trim leading newlines and trailing newlines
    -		$codeblock = preg_replace('/\A\n+|\n+\z/', '', $codeblock);
    -
    -		$codeblock = "
    $codeblock\n
    "; - return "\n\n".$this->hashBlock($codeblock)."\n\n"; - } - - - protected function makeCodeSpan($code) { - # - # Create a code span markup for $code. Called from handleSpanToken. - # - $code = htmlspecialchars(trim($code), ENT_NOQUOTES); - return $this->hashPart("$code"); - } - - - protected $em_relist = array( - '' => '(?:(? '(? '(? '(?:(? '(? '(? '(?:(? '(? '(?em_relist as $em => $em_re) { - foreach ($this->strong_relist as $strong => $strong_re) { - # Construct list of allowed token expressions. - $token_relist = array(); - if (isset($this->em_strong_relist["$em$strong"])) { - $token_relist[] = $this->em_strong_relist["$em$strong"]; - } - $token_relist[] = $em_re; - $token_relist[] = $strong_re; - - # Construct master expression from list. - $token_re = '{('. implode('|', $token_relist) .')}'; - $this->em_strong_prepared_relist["$em$strong"] = $token_re; - } - } - } - - protected function doItalicsAndBold($text) { - $token_stack = array(''); - $text_stack = array(''); - $em = ''; - $strong = ''; - $tree_char_em = false; - - while (1) { - # - # Get prepared regular expression for seraching emphasis tokens - # in current context. - # - $token_re = $this->em_strong_prepared_relist["$em$strong"]; - - # - # Each loop iteration search for the next emphasis token. - # Each token is then passed to handleSpanToken. - # - $parts = preg_split($token_re, $text, 2, PREG_SPLIT_DELIM_CAPTURE); - $text_stack[0] .= $parts[0]; - $token =& $parts[1]; - $text =& $parts[2]; - - if (empty($token)) { - # Reached end of text span: empty stack without emitting. - # any more emphasis. - while ($token_stack[0]) { - $text_stack[1] .= array_shift($token_stack); - $text_stack[0] .= array_shift($text_stack); - } - break; - } - - $token_len = strlen($token); - if ($tree_char_em) { - # Reached closing marker while inside a three-char emphasis. - if ($token_len == 3) { - # Three-char closing marker, close em and strong. - array_shift($token_stack); - $span = array_shift($text_stack); - $span = $this->runSpanGamut($span); - $span = "$span"; - $text_stack[0] .= $this->hashPart($span); - $em = ''; - $strong = ''; - } else { - # Other closing marker: close one em or strong and - # change current token state to match the other - $token_stack[0] = str_repeat($token{0}, 3-$token_len); - $tag = $token_len == 2 ? "strong" : "em"; - $span = $text_stack[0]; - $span = $this->runSpanGamut($span); - $span = "<$tag>$span"; - $text_stack[0] = $this->hashPart($span); - $$tag = ''; # $$tag stands for $em or $strong - } - $tree_char_em = false; - } else if ($token_len == 3) { - if ($em) { - # Reached closing marker for both em and strong. - # Closing strong marker: - for ($i = 0; $i < 2; ++$i) { - $shifted_token = array_shift($token_stack); - $tag = strlen($shifted_token) == 2 ? "strong" : "em"; - $span = array_shift($text_stack); - $span = $this->runSpanGamut($span); - $span = "<$tag>$span"; - $text_stack[0] .= $this->hashPart($span); - $$tag = ''; # $$tag stands for $em or $strong - } - } else { - # Reached opening three-char emphasis marker. Push on token - # stack; will be handled by the special condition above. - $em = $token{0}; - $strong = "$em$em"; - array_unshift($token_stack, $token); - array_unshift($text_stack, ''); - $tree_char_em = true; - } - } else if ($token_len == 2) { - if ($strong) { - # Unwind any dangling emphasis marker: - if (strlen($token_stack[0]) == 1) { - $text_stack[1] .= array_shift($token_stack); - $text_stack[0] .= array_shift($text_stack); - } - # Closing strong marker: - array_shift($token_stack); - $span = array_shift($text_stack); - $span = $this->runSpanGamut($span); - $span = "$span"; - $text_stack[0] .= $this->hashPart($span); - $strong = ''; - } else { - array_unshift($token_stack, $token); - array_unshift($text_stack, ''); - $strong = $token; - } - } else { - # Here $token_len == 1 - if ($em) { - if (strlen($token_stack[0]) == 1) { - # Closing emphasis marker: - array_shift($token_stack); - $span = array_shift($text_stack); - $span = $this->runSpanGamut($span); - $span = "$span"; - $text_stack[0] .= $this->hashPart($span); - $em = ''; - } else { - $text_stack[0] .= $token; - } - } else { - array_unshift($token_stack, $token); - array_unshift($text_stack, ''); - $em = $token; - } - } - } - return $text_stack[0]; - } - - - protected function doBlockQuotes($text) { - $text = preg_replace_callback('/ - ( # Wrap whole match in $1 - (?> - ^[ ]*>[ ]? # ">" at the start of a line - .+\n # rest of the first line - (.+\n)* # subsequent consecutive lines - \n* # blanks - )+ - ) - /xm', - array($this, '_doBlockQuotes_callback'), $text); - - return $text; - } - protected function _doBlockQuotes_callback($matches) { - $bq = $matches[1]; - # trim one level of quoting - trim whitespace-only lines - $bq = preg_replace('/^[ ]*>[ ]?|^[ ]+$/m', '', $bq); - $bq = $this->runBlockGamut($bq); # recurse - - $bq = preg_replace('/^/m', " ", $bq); - # These leading spaces cause problem with
     content, 
    -		# so we need to fix that:
    -		$bq = preg_replace_callback('{(\s*
    .+?
    )}sx', - array($this, '_doBlockQuotes_callback2'), $bq); - - return "\n". $this->hashBlock("
    \n$bq\n
    ")."\n\n"; - } - protected function _doBlockQuotes_callback2($matches) { - $pre = $matches[1]; - $pre = preg_replace('/^ /m', '', $pre); - return $pre; - } - - - protected function formParagraphs($text) { - # - # Params: - # $text - string to process with html

    tags - # - # Strip leading and trailing lines: - $text = preg_replace('/\A\n+|\n+\z/', '', $text); - - $grafs = preg_split('/\n{2,}/', $text, -1, PREG_SPLIT_NO_EMPTY); - - # - # Wrap

    tags and unhashify HTML blocks - # - foreach ($grafs as $key => $value) { - if (!preg_match('/^B\x1A[0-9]+B$/', $value)) { - # Is a paragraph. - $value = $this->runSpanGamut($value); - $value = preg_replace('/^([ ]*)/', "

    ", $value); - $value .= "

    "; - $grafs[$key] = $this->unhash($value); - } - else { - # Is a block. - # Modify elements of @grafs in-place... - $graf = $value; - $block = $this->html_hashes[$graf]; - $graf = $block; -// if (preg_match('{ -// \A -// ( # $1 =
    tag -//
    ]* -// \b -// markdown\s*=\s* ([\'"]) # $2 = attr quote char -// 1 -// \2 -// [^>]* -// > -// ) -// ( # $3 = contents -// .* -// ) -// (
    ) # $4 = closing tag -// \z -// }xs', $block, $matches)) -// { -// list(, $div_open, , $div_content, $div_close) = $matches; -// -// # We can't call Markdown(), because that resets the hash; -// # that initialization code should be pulled into its own sub, though. -// $div_content = $this->hashHTMLBlocks($div_content); -// -// # Run document gamut methods on the content. -// foreach ($this->document_gamut as $method => $priority) { -// $div_content = $this->$method($div_content); -// } -// -// $div_open = preg_replace( -// '{\smarkdown\s*=\s*([\'"]).+?\1}', '', $div_open); -// -// $graf = $div_open . "\n" . $div_content . "\n" . $div_close; -// } - $grafs[$key] = $graf; - } - } - - return implode("\n\n", $grafs); - } - - - protected function encodeAttribute($text) { - # - # Encode text for a double-quoted HTML attribute. This function - # is *not* suitable for attributes enclosed in single quotes. - # - $text = $this->encodeAmpsAndAngles($text); - $text = str_replace('"', '"', $text); - return $text; - } - - - protected function encodeURLAttribute($url, &$text = null) { - # - # Encode text for a double-quoted HTML attribute containing a URL, - # applying the URL filter if set. Also generates the textual - # representation for the URL (removing mailto: or tel:) storing it in $text. - # This function is *not* suitable for attributes enclosed in single quotes. - # - if ($this->url_filter_func) - $url = call_user_func($this->url_filter_func, $url); - - if (preg_match('{^mailto:}i', $url)) - $url = $this->encodeEntityObfuscatedAttribute($url, $text, 7); - else if (preg_match('{^tel:}i', $url)) - { - $url = $this->encodeAttribute($url); - $text = substr($url, 4); - } - else - { - $url = $this->encodeAttribute($url); - $text = $url; - } - - return $url; - } - - - protected function encodeAmpsAndAngles($text) { - # - # Smart processing for ampersands and angle brackets that need to - # be encoded. Valid character entities are left alone unless the - # no-entities mode is set. - # - if ($this->no_entities) { - $text = str_replace('&', '&', $text); - } else { - # Ampersand-encoding based entirely on Nat Irons's Amputator - # MT plugin: - $text = preg_replace('/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/', - '&', $text); - } - # Encode remaining <'s - $text = str_replace('<', '<', $text); - - return $text; - } - - - protected function doAutoLinks($text) { - $text = preg_replace_callback('{<((https?|ftp|dict|tel):[^\'">\s]+)>}i', - array($this, '_doAutoLinks_url_callback'), $text); - - # Email addresses: - $text = preg_replace_callback('{ - < - (?:mailto:)? - ( - (?: - [-!#$%&\'*+/=?^_`.{|}~\w\x80-\xFF]+ - | - ".*?" - ) - \@ - (?: - [-a-z0-9\x80-\xFF]+(\.[-a-z0-9\x80-\xFF]+)*\.[a-z]+ - | - \[[\d.a-fA-F:]+\] # IPv4 & IPv6 - ) - ) - > - }xi', - array($this, '_doAutoLinks_email_callback'), $text); - - return $text; - } - protected function _doAutoLinks_url_callback($matches) { - $url = $this->encodeURLAttribute($matches[1], $text); - $link = "$text"; - return $this->hashPart($link); - } - protected function _doAutoLinks_email_callback($matches) { - $addr = $matches[1]; - $url = $this->encodeURLAttribute("mailto:$addr", $text); - $link = "$text"; - return $this->hashPart($link); - } - - - protected function encodeEntityObfuscatedAttribute($text, &$tail = null, $head_length = 0) { - # - # Input: some text to obfuscate, e.g. "mailto:foo@example.com" - # - # Output: the same text but with most characters encoded as either a - # decimal or hex entity, in the hopes of foiling most address - # harvesting spam bots. E.g.: - # - # mailto:foo - # @example.co - # m - # - # Note: the additional output $tail is assigned the same value as the - # ouput, minus the number of characters specified by $head_length. - # - # Based by a filter by Matthew Wickline, posted to BBEdit-Talk. - # With some optimizations by Milian Wolff. Forced encoding of HTML - # attribute special characters by Allan Odgaard. - # - if ($text == "") return $tail = ""; - - $chars = preg_split('/(? $char) { - $ord = ord($char); - # Ignore non-ascii chars. - if ($ord < 128) { - $r = ($seed * (1 + $key)) % 100; # Pseudo-random function. - # roughly 10% raw, 45% hex, 45% dec - # '@' *must* be encoded. I insist. - # '"' and '>' have to be encoded inside the attribute - if ($r > 90 && strpos('@"&>', $char) === false) /* do nothing */; - else if ($r < 45) $chars[$key] = '&#x'.dechex($ord).';'; - else $chars[$key] = '&#'.$ord.';'; - } - } - - $text = implode('', $chars); - $tail = $head_length ? implode('', array_slice($chars, $head_length)) : $text; - - return $text; - } - - - protected function parseSpan($str) { - # - # Take the string $str and parse it into tokens, hashing embeded HTML, - # escaped characters and handling code spans. - # - $output = ''; - - $span_re = '{ - ( - \\\\'.$this->escape_chars_re.' - | - (?no_markup ? '' : ' - | - # comment - | - <\?.*?\?> | <%.*?%> # processing instruction - | - <[!$]?[-a-zA-Z0-9:_]+ # regular tags - (?> - \s - (?>[^"\'>]+|"[^"]*"|\'[^\']*\')* - )? - > - | - <[-a-zA-Z0-9:_]+\s*/> # xml-style empty tag - | - # closing tag - ').' - ) - }xs'; - - while (1) { - # - # Each loop iteration seach for either the next tag, the next - # openning code span marker, or the next escaped character. - # Each token is then passed to handleSpanToken. - # - $parts = preg_split($span_re, $str, 2, PREG_SPLIT_DELIM_CAPTURE); - - # Create token from text preceding tag. - if ($parts[0] != "") { - $output .= $parts[0]; - } - - # Check if we reach the end. - if (isset($parts[1])) { - $output .= $this->handleSpanToken($parts[1], $parts[2]); - $str = $parts[2]; - } - else { - break; - } - } - - return $output; - } - - - protected function handleSpanToken($token, &$str) { - # - # Handle $token provided by parseSpan by determining its nature and - # returning the corresponding value that should replace it. - # - switch ($token{0}) { - case "\\": - return $this->hashPart("&#". ord($token{1}). ";"); - case "`": - # Search for end marker in remaining text. - if (preg_match('/^(.*?[^`])'.preg_quote($token).'(?!`)(.*)$/sm', - $str, $matches)) - { - $str = $matches[2]; - $codespan = $this->makeCodeSpan($matches[1]); - return $this->hashPart($codespan); - } - return $token; // return as text since no ending marker found. - default: - return $this->hashPart($token); - } - } - - - protected function outdent($text) { - # - # Remove one level of line-leading tabs or spaces - # - return preg_replace('/^(\t|[ ]{1,'.$this->tab_width.'})/m', '', $text); - } - - - # String length function for detab. `_initDetab` will create a function to - # hanlde UTF-8 if the default function does not exist. - protected $utf8_strlen = 'mb_strlen'; - - protected function detab($text) { - # - # Replace tabs with the appropriate amount of space. - # - # For each line we separate the line in blocks delemited by - # tab characters. Then we reconstruct every line by adding the - # appropriate number of space between each blocks. - - $text = preg_replace_callback('/^.*\t.*$/m', - array($this, '_detab_callback'), $text); - - return $text; - } - protected function _detab_callback($matches) { - $line = $matches[0]; - $strlen = $this->utf8_strlen; # strlen function for UTF-8. - - # Split in blocks. - $blocks = explode("\t", $line); - # Add each blocks to the line. - $line = $blocks[0]; - unset($blocks[0]); # Do not add first block twice. - foreach ($blocks as $block) { - # Calculate amount of space, insert spaces, insert block. - $amount = $this->tab_width - - $strlen($line, 'UTF-8') % $this->tab_width; - $line .= str_repeat(" ", $amount) . $block; - } - return $line; - } - protected function _initDetab() { - # - # Check for the availability of the function in the `utf8_strlen` property - # (initially `mb_strlen`). If the function is not available, create a - # function that will loosely count the number of UTF-8 characters with a - # regular expression. - # - if (function_exists($this->utf8_strlen)) return; - $this->utf8_strlen = create_function('$text', 'return preg_match_all( - "/[\\\\x00-\\\\xBF]|[\\\\xC0-\\\\xFF][\\\\x80-\\\\xBF]*/", - $text, $m);'); - } - - - protected function unhash($text) { - # - # Swap back in all the tags hashed by _HashHTMLBlocks. - # - return preg_replace_callback('/(.)\x1A[0-9]+\1/', - array($this, '_unhash_callback'), $text); - } - protected function _unhash_callback($matches) { - return $this->html_hashes[$matches[0]]; - } - -} diff --git a/vendor/michelf/php-markdown/Michelf/MarkdownExtra.inc.php b/vendor/michelf/php-markdown/Michelf/MarkdownExtra.inc.php deleted file mode 100644 index e11b1ef..0000000 --- a/vendor/michelf/php-markdown/Michelf/MarkdownExtra.inc.php +++ /dev/null @@ -1,11 +0,0 @@ - -# -# Original Markdown -# Copyright (c) 2004-2006 John Gruber -# -# -namespace Michelf; - - -# -# Markdown Extra Parser Class -# - -class MarkdownExtra extends \Michelf\Markdown { - - ### Configuration Variables ### - - # Prefix for footnote ids. - public $fn_id_prefix = ""; - - # Optional title attribute for footnote links and backlinks. - public $fn_link_title = ""; - public $fn_backlink_title = ""; - - # Optional class attribute for footnote links and backlinks. - public $fn_link_class = "footnote-ref"; - public $fn_backlink_class = "footnote-backref"; - - # Class name for table cell alignment (%% replaced left/center/right) - # For instance: 'go-%%' becomes 'go-left' or 'go-right' or 'go-center' - # If empty, the align attribute is used instead of a class name. - public $table_align_class_tmpl = ''; - - # Optional class prefix for fenced code block. - public $code_class_prefix = ""; - # Class attribute for code blocks goes on the `code` tag; - # setting this to true will put attributes on the `pre` tag instead. - public $code_attr_on_pre = false; - - # Predefined abbreviations. - public $predef_abbr = array(); - - ### Parser Implementation ### - - public function __construct() { - # - # Constructor function. Initialize the parser object. - # - # Add extra escapable characters before parent constructor - # initialize the table. - $this->escape_chars .= ':|'; - - # Insert extra document, block, and span transformations. - # Parent constructor will do the sorting. - $this->document_gamut += array( - "doFencedCodeBlocks" => 5, - "stripFootnotes" => 15, - "stripAbbreviations" => 25, - "appendFootnotes" => 50, - ); - $this->block_gamut += array( - "doFencedCodeBlocks" => 5, - "doTables" => 15, - "doDefLists" => 45, - ); - $this->span_gamut += array( - "doFootnotes" => 5, - "doAbbreviations" => 70, - ); - - $this->enhanced_ordered_list = true; - parent::__construct(); - } - - - # Extra variables used during extra transformations. - protected $footnotes = array(); - protected $footnotes_ordered = array(); - protected $footnotes_ref_count = array(); - protected $footnotes_numbers = array(); - protected $abbr_desciptions = array(); - protected $abbr_word_re = ''; - - # Give the current footnote number. - protected $footnote_counter = 1; - - - protected function setup() { - # - # Setting up Extra-specific variables. - # - parent::setup(); - - $this->footnotes = array(); - $this->footnotes_ordered = array(); - $this->footnotes_ref_count = array(); - $this->footnotes_numbers = array(); - $this->abbr_desciptions = array(); - $this->abbr_word_re = ''; - $this->footnote_counter = 1; - - foreach ($this->predef_abbr as $abbr_word => $abbr_desc) { - if ($this->abbr_word_re) - $this->abbr_word_re .= '|'; - $this->abbr_word_re .= preg_quote($abbr_word); - $this->abbr_desciptions[$abbr_word] = trim($abbr_desc); - } - } - - protected function teardown() { - # - # Clearing Extra-specific variables. - # - $this->footnotes = array(); - $this->footnotes_ordered = array(); - $this->footnotes_ref_count = array(); - $this->footnotes_numbers = array(); - $this->abbr_desciptions = array(); - $this->abbr_word_re = ''; - - parent::teardown(); - } - - - ### Extra Attribute Parser ### - - # Expression to use to catch attributes (includes the braces) - protected $id_class_attr_catch_re = '\{((?:[ ]*[#.a-z][-_:a-zA-Z0-9=]+){1,})[ ]*\}'; - # Expression to use when parsing in a context when no capture is desired - protected $id_class_attr_nocatch_re = '\{(?:[ ]*[#.a-z][-_:a-zA-Z0-9=]+){1,}[ ]*\}'; - - protected function doExtraAttributes($tag_name, $attr, $defaultIdValue = null) { - # - # Parse attributes caught by the $this->id_class_attr_catch_re expression - # and return the HTML-formatted list of attributes. - # - # Currently supported attributes are .class and #id. - # - # In addition, this method also supports supplying a default Id value, - # which will be used to populate the id attribute in case it was not - # overridden. - if (empty($attr) && !$defaultIdValue) return ""; - - # Split on components - preg_match_all('/[#.a-z][-_:a-zA-Z0-9=]+/', $attr, $matches); - $elements = $matches[0]; - - # handle classes and ids (only first id taken into account) - $classes = array(); - $attributes = array(); - $id = false; - foreach ($elements as $element) { - if ($element{0} == '.') { - $classes[] = substr($element, 1); - } else if ($element{0} == '#') { - if ($id === false) $id = substr($element, 1); - } else if (strpos($element, '=') > 0) { - $parts = explode('=', $element, 2); - $attributes[] = $parts[0] . '="' . $parts[1] . '"'; - } - } - - if (!$id) $id = $defaultIdValue; - - # compose attributes as string - $attr_str = ""; - if (!empty($id)) { - $attr_str .= ' id="'.$this->encodeAttribute($id) .'"'; - } - if (!empty($classes)) { - $attr_str .= ' class="'. implode(" ", $classes) . '"'; - } - if (!$this->no_markup && !empty($attributes)) { - $attr_str .= ' '.implode(" ", $attributes); - } - return $attr_str; - } - - - protected function stripLinkDefinitions($text) { - # - # Strips link definitions from text, stores the URLs and titles in - # hash references. - # - $less_than_tab = $this->tab_width - 1; - - # Link defs are in the form: ^[id]: url "optional title" - $text = preg_replace_callback('{ - ^[ ]{0,'.$less_than_tab.'}\[(.+)\][ ]?: # id = $1 - [ ]* - \n? # maybe *one* newline - [ ]* - (?: - <(.+?)> # url = $2 - | - (\S+?) # url = $3 - ) - [ ]* - \n? # maybe one newline - [ ]* - (?: - (?<=\s) # lookbehind for whitespace - ["(] - (.*?) # title = $4 - [")] - [ ]* - )? # title is optional - (?:[ ]* '.$this->id_class_attr_catch_re.' )? # $5 = extra id & class attr - (?:\n+|\Z) - }xm', - array($this, '_stripLinkDefinitions_callback'), - $text); - return $text; - } - protected function _stripLinkDefinitions_callback($matches) { - $link_id = strtolower($matches[1]); - $url = $matches[2] == '' ? $matches[3] : $matches[2]; - $this->urls[$link_id] = $url; - $this->titles[$link_id] =& $matches[4]; - $this->ref_attr[$link_id] = $this->doExtraAttributes("", $dummy =& $matches[5]); - return ''; # String that will replace the block - } - - - ### HTML Block Parser ### - - # Tags that are always treated as block tags: - protected $block_tags_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend|article|section|nav|aside|hgroup|header|footer|figcaption|figure'; - - # Tags treated as block tags only if the opening tag is alone on its line: - protected $context_block_tags_re = 'script|noscript|style|ins|del|iframe|object|source|track|param|math|svg|canvas|audio|video'; - - # Tags where markdown="1" default to span mode: - protected $contain_span_tags_re = 'p|h[1-6]|li|dd|dt|td|th|legend|address'; - - # Tags which must not have their contents modified, no matter where - # they appear: - protected $clean_tags_re = 'script|style|math|svg'; - - # Tags that do not need to be closed. - protected $auto_close_tags_re = 'hr|img|param|source|track'; - - - protected function hashHTMLBlocks($text) { - # - # Hashify HTML Blocks and "clean tags". - # - # We only want to do this for block-level HTML tags, such as headers, - # lists, and tables. That's because we still want to wrap

    s around - # "paragraphs" that are wrapped in non-block-level tags, such as anchors, - # phrase emphasis, and spans. The list of tags we're looking for is - # hard-coded. - # - # This works by calling _HashHTMLBlocks_InMarkdown, which then calls - # _HashHTMLBlocks_InHTML when it encounter block tags. When the markdown="1" - # attribute is found within a tag, _HashHTMLBlocks_InHTML calls back - # _HashHTMLBlocks_InMarkdown to handle the Markdown syntax within the tag. - # These two functions are calling each other. It's recursive! - # - if ($this->no_markup) return $text; - - # - # Call the HTML-in-Markdown hasher. - # - list($text, ) = $this->_hashHTMLBlocks_inMarkdown($text); - - return $text; - } - protected function _hashHTMLBlocks_inMarkdown($text, $indent = 0, - $enclosing_tag_re = '', $span = false) - { - # - # Parse markdown text, calling _HashHTMLBlocks_InHTML for block tags. - # - # * $indent is the number of space to be ignored when checking for code - # blocks. This is important because if we don't take the indent into - # account, something like this (which looks right) won't work as expected: - # - #

    - #
    - # Hello World. <-- Is this a Markdown code block or text? - #
    <-- Is this a Markdown code block or a real tag? - #
    - # - # If you don't like this, just don't indent the tag on which - # you apply the markdown="1" attribute. - # - # * If $enclosing_tag_re is not empty, stops at the first unmatched closing - # tag with that name. Nested tags supported. - # - # * If $span is true, text inside must treated as span. So any double - # newline will be replaced by a single newline so that it does not create - # paragraphs. - # - # Returns an array of that form: ( processed text , remaining text ) - # - if ($text === '') return array('', ''); - - # Regex to check for the presense of newlines around a block tag. - $newline_before_re = '/(?:^\n?|\n\n)*$/'; - $newline_after_re = - '{ - ^ # Start of text following the tag. - (?>[ ]*)? # Optional comment. - [ ]*\n # Must be followed by newline. - }xs'; - - # Regex to match any tag. - $block_tag_re = - '{ - ( # $2: Capture whole tag. - # Tag name. - '.$this->block_tags_re.' | - '.$this->context_block_tags_re.' | - '.$this->clean_tags_re.' | - (?!\s)'.$enclosing_tag_re.' - ) - (?: - (?=[\s"\'/a-zA-Z0-9]) # Allowed characters after tag name. - (?> - ".*?" | # Double quotes (can contain `>`) - \'.*?\' | # Single quotes (can contain `>`) - .+? # Anything but quotes and `>`. - )*? - )? - > # End of tag. - | - # HTML Comment - | - <\?.*?\?> | <%.*?%> # Processing instruction - | - # CData Block - '. ( !$span ? ' # If not in span. - | - # Indented code block - (?: ^[ ]*\n | ^ | \n[ ]*\n ) - [ ]{'.($indent+4).'}[^\n]* \n - (?> - (?: [ ]{'.($indent+4).'}[^\n]* | [ ]* ) \n - )* - | - # Fenced code block marker - (?<= ^ | \n ) - [ ]{0,'.($indent+3).'}(?:~{3,}|`{3,}) - [ ]* - (?: - \.?[-_:a-zA-Z0-9]+ # standalone class name - | - '.$this->id_class_attr_nocatch_re.' # extra attributes - )? - [ ]* - (?= \n ) - ' : '' ). ' # End (if not is span). - | - # Code span marker - # Note, this regex needs to go after backtick fenced - # code blocks but it should also be kept outside of the - # "if not in span" condition adding backticks to the parser - `+ - ) - }xs'; - - - $depth = 0; # Current depth inside the tag tree. - $parsed = ""; # Parsed text that will be returned. - - # - # Loop through every tag until we find the closing tag of the parent - # or loop until reaching the end of text if no parent tag specified. - # - do { - # - # Split the text using the first $tag_match pattern found. - # Text before pattern will be first in the array, text after - # pattern will be at the end, and between will be any catches made - # by the pattern. - # - $parts = preg_split($block_tag_re, $text, 2, - PREG_SPLIT_DELIM_CAPTURE); - - # If in Markdown span mode, add a empty-string span-level hash - # after each newline to prevent triggering any block element. - if ($span) { - $void = $this->hashPart("", ':'); - $newline = "$void\n"; - $parts[0] = $void . str_replace("\n", $newline, $parts[0]) . $void; - } - - $parsed .= $parts[0]; # Text before current tag. - - # If end of $text has been reached. Stop loop. - if (count($parts) < 3) { - $text = ""; - break; - } - - $tag = $parts[1]; # Tag to handle. - $text = $parts[2]; # Remaining text after current tag. - $tag_re = preg_quote($tag); # For use in a regular expression. - - # - # Check for: Fenced code block marker. - # Note: need to recheck the whole tag to disambiguate backtick - # fences from code spans - # - if (preg_match('{^\n?([ ]{0,'.($indent+3).'})(~{3,}|`{3,})[ ]*(?:\.?[-_:a-zA-Z0-9]+|'.$this->id_class_attr_nocatch_re.')?[ ]*\n?$}', $tag, $capture)) { - # Fenced code block marker: find matching end marker. - $fence_indent = strlen($capture[1]); # use captured indent in re - $fence_re = $capture[2]; # use captured fence in re - if (preg_match('{^(?>.*\n)*?[ ]{'.($fence_indent).'}'.$fence_re.'[ ]*(?:\n|$)}', $text, - $matches)) - { - # End marker found: pass text unchanged until marker. - $parsed .= $tag . $matches[0]; - $text = substr($text, strlen($matches[0])); - } - else { - # No end marker: just skip it. - $parsed .= $tag; - } - } - # - # Check for: Indented code block. - # - else if ($tag{0} == "\n" || $tag{0} == " ") { - # Indented code block: pass it unchanged, will be handled - # later. - $parsed .= $tag; - } - # - # Check for: Code span marker - # Note: need to check this after backtick fenced code blocks - # - else if ($tag{0} == "`") { - # Find corresponding end marker. - $tag_re = preg_quote($tag); - if (preg_match('{^(?>.+?|\n(?!\n))*?(?block_tags_re.')\b}', $tag) || - ( preg_match('{^<(?:'.$this->context_block_tags_re.')\b}', $tag) && - preg_match($newline_before_re, $parsed) && - preg_match($newline_after_re, $text) ) - ) - { - # Need to parse tag and following text using the HTML parser. - list($block_text, $text) = - $this->_hashHTMLBlocks_inHTML($tag . $text, "hashBlock", true); - - # Make sure it stays outside of any paragraph by adding newlines. - $parsed .= "\n\n$block_text\n\n"; - } - # - # Check for: Clean tag (like script, math) - # HTML Comments, processing instructions. - # - else if (preg_match('{^<(?:'.$this->clean_tags_re.')\b}', $tag) || - $tag{1} == '!' || $tag{1} == '?') - { - # Need to parse tag and following text using the HTML parser. - # (don't check for markdown attribute) - list($block_text, $text) = - $this->_hashHTMLBlocks_inHTML($tag . $text, "hashClean", false); - - $parsed .= $block_text; - } - # - # Check for: Tag with same name as enclosing tag. - # - else if ($enclosing_tag_re !== '' && - # Same name as enclosing tag. - preg_match('{^= 0); - - return array($parsed, $text); - } - protected function _hashHTMLBlocks_inHTML($text, $hash_method, $md_attr) { - # - # Parse HTML, calling _HashHTMLBlocks_InMarkdown for block tags. - # - # * Calls $hash_method to convert any blocks. - # * Stops when the first opening tag closes. - # * $md_attr indicate if the use of the `markdown="1"` attribute is allowed. - # (it is not inside clean tags) - # - # Returns an array of that form: ( processed text , remaining text ) - # - if ($text === '') return array('', ''); - - # Regex to match `markdown` attribute inside of a tag. - $markdown_attr_re = ' - { - \s* # Eat whitespace before the `markdown` attribute - markdown - \s*=\s* - (?> - (["\']) # $1: quote delimiter - (.*?) # $2: attribute value - \1 # matching delimiter - | - ([^\s>]*) # $3: unquoted attribute value - ) - () # $4: make $3 always defined (avoid warnings) - }xs'; - - # Regex to match any tag. - $tag_re = '{ - ( # $2: Capture whole tag. - - ".*?" | # Double quotes (can contain `>`) - \'.*?\' | # Single quotes (can contain `>`) - .+? # Anything but quotes and `>`. - )*? - )? - > # End of tag. - | - # HTML Comment - | - <\?.*?\?> | <%.*?%> # Processing instruction - | - # CData Block - ) - }xs'; - - $original_text = $text; # Save original text in case of faliure. - - $depth = 0; # Current depth inside the tag tree. - $block_text = ""; # Temporary text holder for current text. - $parsed = ""; # Parsed text that will be returned. - - # - # Get the name of the starting tag. - # (This pattern makes $base_tag_name_re safe without quoting.) - # - if (preg_match('/^<([\w:$]*)\b/', $text, $matches)) - $base_tag_name_re = $matches[1]; - - # - # Loop through every tag until we find the corresponding closing tag. - # - do { - # - # Split the text using the first $tag_match pattern found. - # Text before pattern will be first in the array, text after - # pattern will be at the end, and between will be any catches made - # by the pattern. - # - $parts = preg_split($tag_re, $text, 2, PREG_SPLIT_DELIM_CAPTURE); - - if (count($parts) < 3) { - # - # End of $text reached with unbalenced tag(s). - # In that case, we return original text unchanged and pass the - # first character as filtered to prevent an infinite loop in the - # parent function. - # - return array($original_text{0}, substr($original_text, 1)); - } - - $block_text .= $parts[0]; # Text before current tag. - $tag = $parts[1]; # Tag to handle. - $text = $parts[2]; # Remaining text after current tag. - - # - # Check for: Auto-close tag (like
    ) - # Comments and Processing Instructions. - # - if (preg_match('{^auto_close_tags_re.')\b}', $tag) || - $tag{1} == '!' || $tag{1} == '?') - { - # Just add the tag to the block as if it was text. - $block_text .= $tag; - } - else { - # - # Increase/decrease nested tag count. Only do so if - # the tag's name match base tag's. - # - if (preg_match('{^mode = $attr_m[2] . $attr_m[3]; - $span_mode = $this->mode == 'span' || $this->mode != 'block' && - preg_match('{^<(?:'.$this->contain_span_tags_re.')\b}', $tag); - - # Calculate indent before tag. - if (preg_match('/(?:^|\n)( *?)(?! ).*?$/', $block_text, $matches)) { - $strlen = $this->utf8_strlen; - $indent = $strlen($matches[1], 'UTF-8'); - } else { - $indent = 0; - } - - # End preceding block with this tag. - $block_text .= $tag; - $parsed .= $this->$hash_method($block_text); - - # Get enclosing tag name for the ParseMarkdown function. - # (This pattern makes $tag_name_re safe without quoting.) - preg_match('/^<([\w:$]*)\b/', $tag, $matches); - $tag_name_re = $matches[1]; - - # Parse the content using the HTML-in-Markdown parser. - list ($block_text, $text) - = $this->_hashHTMLBlocks_inMarkdown($text, $indent, - $tag_name_re, $span_mode); - - # Outdent markdown text. - if ($indent > 0) { - $block_text = preg_replace("/^[ ]{1,$indent}/m", "", - $block_text); - } - - # Append tag content to parsed text. - if (!$span_mode) $parsed .= "\n\n$block_text\n\n"; - else $parsed .= "$block_text"; - - # Start over with a new block. - $block_text = ""; - } - else $block_text .= $tag; - } - - } while ($depth > 0); - - # - # Hash last block text that wasn't processed inside the loop. - # - $parsed .= $this->$hash_method($block_text); - - return array($parsed, $text); - } - - - protected function hashClean($text) { - # - # Called whenever a tag must be hashed when a function inserts a "clean" tag - # in $text, it passes through this function and is automaticaly escaped, - # blocking invalid nested overlap. - # - return $this->hashPart($text, 'C'); - } - - - protected function doAnchors($text) { - # - # Turn Markdown link shortcuts into XHTML tags. - # - if ($this->in_anchor) return $text; - $this->in_anchor = true; - - # - # First, handle reference-style links: [link text] [id] - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - \[ - ('.$this->nested_brackets_re.') # link text = $2 - \] - - [ ]? # one optional space - (?:\n[ ]*)? # one optional newline followed by spaces - - \[ - (.*?) # id = $3 - \] - ) - }xs', - array($this, '_doAnchors_reference_callback'), $text); - - # - # Next, inline-style links: [link text](url "optional title") - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - \[ - ('.$this->nested_brackets_re.') # link text = $2 - \] - \( # literal paren - [ \n]* - (?: - <(.+?)> # href = $3 - | - ('.$this->nested_url_parenthesis_re.') # href = $4 - ) - [ \n]* - ( # $5 - ([\'"]) # quote char = $6 - (.*?) # Title = $7 - \6 # matching quote - [ \n]* # ignore any spaces/tabs between closing quote and ) - )? # title is optional - \) - (?:[ ]? '.$this->id_class_attr_catch_re.' )? # $8 = id/class attributes - ) - }xs', - array($this, '_doAnchors_inline_callback'), $text); - - # - # Last, handle reference-style shortcuts: [link text] - # These must come last in case you've also got [link text][1] - # or [link text](/foo) - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - \[ - ([^\[\]]+) # link text = $2; can\'t contain [ or ] - \] - ) - }xs', - array($this, '_doAnchors_reference_callback'), $text); - - $this->in_anchor = false; - return $text; - } - protected function _doAnchors_reference_callback($matches) { - $whole_match = $matches[1]; - $link_text = $matches[2]; - $link_id =& $matches[3]; - - if ($link_id == "") { - # for shortcut links like [this][] or [this]. - $link_id = $link_text; - } - - # lower-case and turn embedded newlines into spaces - $link_id = strtolower($link_id); - $link_id = preg_replace('{[ ]?\n}', ' ', $link_id); - - if (isset($this->urls[$link_id])) { - $url = $this->urls[$link_id]; - $url = $this->encodeURLAttribute($url); - - $result = "titles[$link_id] ) ) { - $title = $this->titles[$link_id]; - $title = $this->encodeAttribute($title); - $result .= " title=\"$title\""; - } - if (isset($this->ref_attr[$link_id])) - $result .= $this->ref_attr[$link_id]; - - $link_text = $this->runSpanGamut($link_text); - $result .= ">$link_text"; - $result = $this->hashPart($result); - } - else { - $result = $whole_match; - } - return $result; - } - protected function _doAnchors_inline_callback($matches) { - $whole_match = $matches[1]; - $link_text = $this->runSpanGamut($matches[2]); - $url = $matches[3] == '' ? $matches[4] : $matches[3]; - $title =& $matches[7]; - $attr = $this->doExtraAttributes("a", $dummy =& $matches[8]); - - // if the URL was of the form it got caught by the HTML - // tag parser and hashed. Need to reverse the process before using the URL. - $unhashed = $this->unhash($url); - if ($unhashed != $url) - $url = preg_replace('/^<(.*)>$/', '\1', $unhashed); - - $url = $this->encodeURLAttribute($url); - - $result = "encodeAttribute($title); - $result .= " title=\"$title\""; - } - $result .= $attr; - - $link_text = $this->runSpanGamut($link_text); - $result .= ">$link_text"; - - return $this->hashPart($result); - } - - - protected function doImages($text) { - # - # Turn Markdown image shortcuts into tags. - # - # - # First, handle reference-style labeled images: ![alt text][id] - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - !\[ - ('.$this->nested_brackets_re.') # alt text = $2 - \] - - [ ]? # one optional space - (?:\n[ ]*)? # one optional newline followed by spaces - - \[ - (.*?) # id = $3 - \] - - ) - }xs', - array($this, '_doImages_reference_callback'), $text); - - # - # Next, handle inline images: ![alt text](url "optional title") - # Don't forget: encode * and _ - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - !\[ - ('.$this->nested_brackets_re.') # alt text = $2 - \] - \s? # One optional whitespace character - \( # literal paren - [ \n]* - (?: - <(\S*)> # src url = $3 - | - ('.$this->nested_url_parenthesis_re.') # src url = $4 - ) - [ \n]* - ( # $5 - ([\'"]) # quote char = $6 - (.*?) # title = $7 - \6 # matching quote - [ \n]* - )? # title is optional - \) - (?:[ ]? '.$this->id_class_attr_catch_re.' )? # $8 = id/class attributes - ) - }xs', - array($this, '_doImages_inline_callback'), $text); - - return $text; - } - protected function _doImages_reference_callback($matches) { - $whole_match = $matches[1]; - $alt_text = $matches[2]; - $link_id = strtolower($matches[3]); - - if ($link_id == "") { - $link_id = strtolower($alt_text); # for shortcut links like ![this][]. - } - - $alt_text = $this->encodeAttribute($alt_text); - if (isset($this->urls[$link_id])) { - $url = $this->encodeURLAttribute($this->urls[$link_id]); - $result = "\"$alt_text\"";titles[$link_id])) { - $title = $this->titles[$link_id]; - $title = $this->encodeAttribute($title); - $result .= " title=\"$title\""; - } - if (isset($this->ref_attr[$link_id])) - $result .= $this->ref_attr[$link_id]; - $result .= $this->empty_element_suffix; - $result = $this->hashPart($result); - } - else { - # If there's no such link ID, leave intact: - $result = $whole_match; - } - - return $result; - } - protected function _doImages_inline_callback($matches) { - $whole_match = $matches[1]; - $alt_text = $matches[2]; - $url = $matches[3] == '' ? $matches[4] : $matches[3]; - $title =& $matches[7]; - $attr = $this->doExtraAttributes("img", $dummy =& $matches[8]); - - $alt_text = $this->encodeAttribute($alt_text); - $url = $this->encodeURLAttribute($url); - $result = "\"$alt_text\"";encodeAttribute($title); - $result .= " title=\"$title\""; # $title already quoted - } - $result .= $attr; - $result .= $this->empty_element_suffix; - - return $this->hashPart($result); - } - - - protected function doHeaders($text) { - # - # Redefined to add id and class attribute support. - # - # Setext-style headers: - # Header 1 {#header1} - # ======== - # - # Header 2 {#header2 .class1 .class2} - # -------- - # - $text = preg_replace_callback( - '{ - (^.+?) # $1: Header text - (?:[ ]+ '.$this->id_class_attr_catch_re.' )? # $3 = id/class attributes - [ ]*\n(=+|-+)[ ]*\n+ # $3: Header footer - }mx', - array($this, '_doHeaders_callback_setext'), $text); - - # atx-style headers: - # # Header 1 {#header1} - # ## Header 2 {#header2} - # ## Header 2 with closing hashes ## {#header3.class1.class2} - # ... - # ###### Header 6 {.class2} - # - $text = preg_replace_callback('{ - ^(\#{1,6}) # $1 = string of #\'s - [ ]* - (.+?) # $2 = Header text - [ ]* - \#* # optional closing #\'s (not counted) - (?:[ ]+ '.$this->id_class_attr_catch_re.' )? # $3 = id/class attributes - [ ]* - \n+ - }xm', - array($this, '_doHeaders_callback_atx'), $text); - - return $text; - } - protected function _doHeaders_callback_setext($matches) { - if ($matches[3] == '-' && preg_match('{^- }', $matches[1])) - return $matches[0]; - - $level = $matches[3]{0} == '=' ? 1 : 2; - - $defaultId = is_callable($this->header_id_func) ? call_user_func($this->header_id_func, $matches[1]) : null; - - $attr = $this->doExtraAttributes("h$level", $dummy =& $matches[2], $defaultId); - $block = "".$this->runSpanGamut($matches[1]).""; - return "\n" . $this->hashBlock($block) . "\n\n"; - } - protected function _doHeaders_callback_atx($matches) { - $level = strlen($matches[1]); - - $defaultId = is_callable($this->header_id_func) ? call_user_func($this->header_id_func, $matches[2]) : null; - $attr = $this->doExtraAttributes("h$level", $dummy =& $matches[3], $defaultId); - $block = "".$this->runSpanGamut($matches[2]).""; - return "\n" . $this->hashBlock($block) . "\n\n"; - } - - - protected function doTables($text) { - # - # Form HTML tables. - # - $less_than_tab = $this->tab_width - 1; - # - # Find tables with leading pipe. - # - # | Header 1 | Header 2 - # | -------- | -------- - # | Cell 1 | Cell 2 - # | Cell 3 | Cell 4 - # - $text = preg_replace_callback(' - { - ^ # Start of a line - [ ]{0,'.$less_than_tab.'} # Allowed whitespace. - [|] # Optional leading pipe (present) - (.+) \n # $1: Header row (at least one pipe) - - [ ]{0,'.$less_than_tab.'} # Allowed whitespace. - [|] ([ ]*[-:]+[-| :]*) \n # $2: Header underline - - ( # $3: Cells - (?> - [ ]* # Allowed whitespace. - [|] .* \n # Row content. - )* - ) - (?=\n|\Z) # Stop at final double newline. - }xm', - array($this, '_doTable_leadingPipe_callback'), $text); - - # - # Find tables without leading pipe. - # - # Header 1 | Header 2 - # -------- | -------- - # Cell 1 | Cell 2 - # Cell 3 | Cell 4 - # - $text = preg_replace_callback(' - { - ^ # Start of a line - [ ]{0,'.$less_than_tab.'} # Allowed whitespace. - (\S.*[|].*) \n # $1: Header row (at least one pipe) - - [ ]{0,'.$less_than_tab.'} # Allowed whitespace. - ([-:]+[ ]*[|][-| :]*) \n # $2: Header underline - - ( # $3: Cells - (?> - .* [|] .* \n # Row content - )* - ) - (?=\n|\Z) # Stop at final double newline. - }xm', - array($this, '_DoTable_callback'), $text); - - return $text; - } - protected function _doTable_leadingPipe_callback($matches) { - $head = $matches[1]; - $underline = $matches[2]; - $content = $matches[3]; - - # Remove leading pipe for each row. - $content = preg_replace('/^ *[|]/m', '', $content); - - return $this->_doTable_callback(array($matches[0], $head, $underline, $content)); - } - protected function _doTable_makeAlignAttr($alignname) - { - if (empty($this->table_align_class_tmpl)) - return " align=\"$alignname\""; - - $classname = str_replace('%%', $alignname, $this->table_align_class_tmpl); - return " class=\"$classname\""; - } - protected function _doTable_callback($matches) { - $head = $matches[1]; - $underline = $matches[2]; - $content = $matches[3]; - - # Remove any tailing pipes for each line. - $head = preg_replace('/[|] *$/m', '', $head); - $underline = preg_replace('/[|] *$/m', '', $underline); - $content = preg_replace('/[|] *$/m', '', $content); - - # Reading alignement from header underline. - $separators = preg_split('/ *[|] */', $underline); - foreach ($separators as $n => $s) { - if (preg_match('/^ *-+: *$/', $s)) - $attr[$n] = $this->_doTable_makeAlignAttr('right'); - else if (preg_match('/^ *:-+: *$/', $s)) - $attr[$n] = $this->_doTable_makeAlignAttr('center'); - else if (preg_match('/^ *:-+ *$/', $s)) - $attr[$n] = $this->_doTable_makeAlignAttr('left'); - else - $attr[$n] = ''; - } - - # Parsing span elements, including code spans, character escapes, - # and inline HTML tags, so that pipes inside those gets ignored. - $head = $this->parseSpan($head); - $headers = preg_split('/ *[|] */', $head); - $col_count = count($headers); - $attr = array_pad($attr, $col_count, ''); - - # Write column headers. - $text = "\n"; - $text .= "\n"; - $text .= "\n"; - foreach ($headers as $n => $header) - $text .= " ".$this->runSpanGamut(trim($header))."\n"; - $text .= "\n"; - $text .= "\n"; - - # Split content by row. - $rows = explode("\n", trim($content, "\n")); - - $text .= "\n"; - foreach ($rows as $row) { - # Parsing span elements, including code spans, character escapes, - # and inline HTML tags, so that pipes inside those gets ignored. - $row = $this->parseSpan($row); - - # Split row by cell. - $row_cells = preg_split('/ *[|] */', $row, $col_count); - $row_cells = array_pad($row_cells, $col_count, ''); - - $text .= "\n"; - foreach ($row_cells as $n => $cell) - $text .= " ".$this->runSpanGamut(trim($cell))."\n"; - $text .= "\n"; - } - $text .= "\n"; - $text .= "
    "; - - return $this->hashBlock($text) . "\n"; - } - - - protected function doDefLists($text) { - # - # Form HTML definition lists. - # - $less_than_tab = $this->tab_width - 1; - - # Re-usable pattern to match any entire dl list: - $whole_list_re = '(?> - ( # $1 = whole list - ( # $2 - [ ]{0,'.$less_than_tab.'} - ((?>.*\S.*\n)+) # $3 = defined term - \n? - [ ]{0,'.$less_than_tab.'}:[ ]+ # colon starting definition - ) - (?s:.+?) - ( # $4 - \z - | - \n{2,} - (?=\S) - (?! # Negative lookahead for another term - [ ]{0,'.$less_than_tab.'} - (?: \S.*\n )+? # defined term - \n? - [ ]{0,'.$less_than_tab.'}:[ ]+ # colon starting definition - ) - (?! # Negative lookahead for another definition - [ ]{0,'.$less_than_tab.'}:[ ]+ # colon starting definition - ) - ) - ) - )'; // mx - - $text = preg_replace_callback('{ - (?>\A\n?|(?<=\n\n)) - '.$whole_list_re.' - }mx', - array($this, '_doDefLists_callback'), $text); - - return $text; - } - protected function _doDefLists_callback($matches) { - # Re-usable patterns to match list item bullets and number markers: - $list = $matches[1]; - - # Turn double returns into triple returns, so that we can make a - # paragraph for the last item in a list, if necessary: - $result = trim($this->processDefListItems($list)); - $result = "
    \n" . $result . "\n
    "; - return $this->hashBlock($result) . "\n\n"; - } - - - protected function processDefListItems($list_str) { - # - # Process the contents of a single definition list, splitting it - # into individual term and definition list items. - # - $less_than_tab = $this->tab_width - 1; - - # trim trailing blank lines: - $list_str = preg_replace("/\n{2,}\\z/", "\n", $list_str); - - # Process definition terms. - $list_str = preg_replace_callback('{ - (?>\A\n?|\n\n+) # leading line - ( # definition terms = $1 - [ ]{0,'.$less_than_tab.'} # leading whitespace - (?!\:[ ]|[ ]) # negative lookahead for a definition - # mark (colon) or more whitespace. - (?> \S.* \n)+? # actual term (not whitespace). - ) - (?=\n?[ ]{0,3}:[ ]) # lookahead for following line feed - # with a definition mark. - }xm', - array($this, '_processDefListItems_callback_dt'), $list_str); - - # Process actual definitions. - $list_str = preg_replace_callback('{ - \n(\n+)? # leading line = $1 - ( # marker space = $2 - [ ]{0,'.$less_than_tab.'} # whitespace before colon - \:[ ]+ # definition mark (colon) - ) - ((?s:.+?)) # definition text = $3 - (?= \n+ # stop at next definition mark, - (?: # next term or end of text - [ ]{0,'.$less_than_tab.'} \:[ ] | -
    | \z - ) - ) - }xm', - array($this, '_processDefListItems_callback_dd'), $list_str); - - return $list_str; - } - protected function _processDefListItems_callback_dt($matches) { - $terms = explode("\n", trim($matches[1])); - $text = ''; - foreach ($terms as $term) { - $term = $this->runSpanGamut(trim($term)); - $text .= "\n
    " . $term . "
    "; - } - return $text . "\n"; - } - protected function _processDefListItems_callback_dd($matches) { - $leading_line = $matches[1]; - $marker_space = $matches[2]; - $def = $matches[3]; - - if ($leading_line || preg_match('/\n{2,}/', $def)) { - # Replace marker with the appropriate whitespace indentation - $def = str_repeat(' ', strlen($marker_space)) . $def; - $def = $this->runBlockGamut($this->outdent($def . "\n\n")); - $def = "\n". $def ."\n"; - } - else { - $def = rtrim($def); - $def = $this->runSpanGamut($this->outdent($def)); - } - - return "\n
    " . $def . "
    \n"; - } - - - protected function doFencedCodeBlocks($text) { - # - # Adding the fenced code block syntax to regular Markdown: - # - # ~~~ - # Code block - # ~~~ - # - $less_than_tab = $this->tab_width; - - $text = preg_replace_callback('{ - (?:\n|\A) - # 1: Opening marker - ( - (?:~{3,}|`{3,}) # 3 or more tildes/backticks. - ) - [ ]* - (?: - \.?([-_:a-zA-Z0-9]+) # 2: standalone class name - | - '.$this->id_class_attr_catch_re.' # 3: Extra attributes - )? - [ ]* \n # Whitespace and newline following marker. - - # 4: Content - ( - (?> - (?!\1 [ ]* \n) # Not a closing marker. - .*\n+ - )+ - ) - - # Closing marker. - \1 [ ]* (?= \n ) - }xm', - array($this, '_doFencedCodeBlocks_callback'), $text); - - return $text; - } - protected function _doFencedCodeBlocks_callback($matches) { - $classname =& $matches[2]; - $attrs =& $matches[3]; - $codeblock = $matches[4]; - $codeblock = htmlspecialchars($codeblock, ENT_NOQUOTES); - $codeblock = preg_replace_callback('/^\n+/', - array($this, '_doFencedCodeBlocks_newlines'), $codeblock); - - if ($classname != "") { - if ($classname{0} == '.') - $classname = substr($classname, 1); - $attr_str = ' class="'.$this->code_class_prefix.$classname.'"'; - } else { - $attr_str = $this->doExtraAttributes($this->code_attr_on_pre ? "pre" : "code", $attrs); - } - $pre_attr_str = $this->code_attr_on_pre ? $attr_str : ''; - $code_attr_str = $this->code_attr_on_pre ? '' : $attr_str; - $codeblock = "$codeblock
    "; - - return "\n\n".$this->hashBlock($codeblock)."\n\n"; - } - protected function _doFencedCodeBlocks_newlines($matches) { - return str_repeat("empty_element_suffix", - strlen($matches[0])); - } - - - # - # Redefining emphasis markers so that emphasis by underscore does not - # work in the middle of a word. - # - protected $em_relist = array( - '' => '(?:(? '(? '(? '(?:(? '(? '(? '(?:(? '(? '(? tags - # - # Strip leading and trailing lines: - $text = preg_replace('/\A\n+|\n+\z/', '', $text); - - $grafs = preg_split('/\n{2,}/', $text, -1, PREG_SPLIT_NO_EMPTY); - - # - # Wrap

    tags and unhashify HTML blocks - # - foreach ($grafs as $key => $value) { - $value = trim($this->runSpanGamut($value)); - - # Check if this should be enclosed in a paragraph. - # Clean tag hashes & block tag hashes are left alone. - $is_p = !preg_match('/^B\x1A[0-9]+B|^C\x1A[0-9]+C$/', $value); - - if ($is_p) { - $value = "

    $value

    "; - } - $grafs[$key] = $value; - } - - # Join grafs in one text, then unhash HTML tags. - $text = implode("\n\n", $grafs); - - # Finish by removing any tag hashes still present in $text. - $text = $this->unhash($text); - - return $text; - } - - - ### Footnotes - - protected function stripFootnotes($text) { - # - # Strips link definitions from text, stores the URLs and titles in - # hash references. - # - $less_than_tab = $this->tab_width - 1; - - # Link defs are in the form: [^id]: url "optional title" - $text = preg_replace_callback('{ - ^[ ]{0,'.$less_than_tab.'}\[\^(.+?)\][ ]?: # note_id = $1 - [ ]* - \n? # maybe *one* newline - ( # text = $2 (no blank lines allowed) - (?: - .+ # actual text - | - \n # newlines but - (?!\[.+?\][ ]?:\s)# negative lookahead for footnote or link definition marker. - (?!\n+[ ]{0,3}\S)# ensure line is not blank and followed - # by non-indented content - )* - ) - }xm', - array($this, '_stripFootnotes_callback'), - $text); - return $text; - } - protected function _stripFootnotes_callback($matches) { - $note_id = $this->fn_id_prefix . $matches[1]; - $this->footnotes[$note_id] = $this->outdent($matches[2]); - return ''; # String that will replace the block - } - - - protected function doFootnotes($text) { - # - # Replace footnote references in $text [^id] with a special text-token - # which will be replaced by the actual footnote marker in appendFootnotes. - # - if (!$this->in_anchor) { - $text = preg_replace('{\[\^(.+?)\]}', "F\x1Afn:\\1\x1A:", $text); - } - return $text; - } - - - protected function appendFootnotes($text) { - # - # Append footnote list to text. - # - $text = preg_replace_callback('{F\x1Afn:(.*?)\x1A:}', - array($this, '_appendFootnotes_callback'), $text); - - if (!empty($this->footnotes_ordered)) { - $text .= "\n\n"; - $text .= "
    \n"; - $text .= "empty_element_suffix ."\n"; - $text .= "
      \n\n"; - - $attr = ""; - if ($this->fn_backlink_class != "") { - $class = $this->fn_backlink_class; - $class = $this->encodeAttribute($class); - $attr .= " class=\"$class\""; - } - if ($this->fn_backlink_title != "") { - $title = $this->fn_backlink_title; - $title = $this->encodeAttribute($title); - $attr .= " title=\"$title\""; - } - $num = 0; - - while (!empty($this->footnotes_ordered)) { - $footnote = reset($this->footnotes_ordered); - $note_id = key($this->footnotes_ordered); - unset($this->footnotes_ordered[$note_id]); - $ref_count = $this->footnotes_ref_count[$note_id]; - unset($this->footnotes_ref_count[$note_id]); - unset($this->footnotes[$note_id]); - - $footnote .= "\n"; # Need to append newline before parsing. - $footnote = $this->runBlockGamut("$footnote\n"); - $footnote = preg_replace_callback('{F\x1Afn:(.*?)\x1A:}', - array($this, '_appendFootnotes_callback'), $footnote); - - $attr = str_replace("%%", ++$num, $attr); - $note_id = $this->encodeAttribute($note_id); - - # Prepare backlink, multiple backlinks if multiple references - $backlink = ""; - for ($ref_num = 2; $ref_num <= $ref_count; ++$ref_num) { - $backlink .= " "; - } - # Add backlink to last paragraph; create new paragraph if needed. - if (preg_match('{

      $}', $footnote)) { - $footnote = substr($footnote, 0, -4) . " $backlink

      "; - } else { - $footnote .= "\n\n

      $backlink

      "; - } - - $text .= "
    1. \n"; - $text .= $footnote . "\n"; - $text .= "
    2. \n\n"; - } - - $text .= "
    \n"; - $text .= "
    "; - } - return $text; - } - protected function _appendFootnotes_callback($matches) { - $node_id = $this->fn_id_prefix . $matches[1]; - - # Create footnote marker only if it has a corresponding footnote *and* - # the footnote hasn't been used by another marker. - if (isset($this->footnotes[$node_id])) { - $num =& $this->footnotes_numbers[$node_id]; - if (!isset($num)) { - # Transfer footnote content to the ordered list and give it its - # number - $this->footnotes_ordered[$node_id] = $this->footnotes[$node_id]; - $this->footnotes_ref_count[$node_id] = 1; - $num = $this->footnote_counter++; - $ref_count_mark = ''; - } else { - $ref_count_mark = $this->footnotes_ref_count[$node_id] += 1; - } - - $attr = ""; - if ($this->fn_link_class != "") { - $class = $this->fn_link_class; - $class = $this->encodeAttribute($class); - $attr .= " class=\"$class\""; - } - if ($this->fn_link_title != "") { - $title = $this->fn_link_title; - $title = $this->encodeAttribute($title); - $attr .= " title=\"$title\""; - } - - $attr = str_replace("%%", $num, $attr); - $node_id = $this->encodeAttribute($node_id); - - return - "". - "$num". - ""; - } - - return "[^".$matches[1]."]"; - } - - - ### Abbreviations ### - - protected function stripAbbreviations($text) { - # - # Strips abbreviations from text, stores titles in hash references. - # - $less_than_tab = $this->tab_width - 1; - - # Link defs are in the form: [id]*: url "optional title" - $text = preg_replace_callback('{ - ^[ ]{0,'.$less_than_tab.'}\*\[(.+?)\][ ]?: # abbr_id = $1 - (.*) # text = $2 (no blank lines allowed) - }xm', - array($this, '_stripAbbreviations_callback'), - $text); - return $text; - } - protected function _stripAbbreviations_callback($matches) { - $abbr_word = $matches[1]; - $abbr_desc = $matches[2]; - if ($this->abbr_word_re) - $this->abbr_word_re .= '|'; - $this->abbr_word_re .= preg_quote($abbr_word); - $this->abbr_desciptions[$abbr_word] = trim($abbr_desc); - return ''; # String that will replace the block - } - - - protected function doAbbreviations($text) { - # - # Find defined abbreviations in text and wrap them in elements. - # - if ($this->abbr_word_re) { - // cannot use the /x modifier because abbr_word_re may - // contain significant spaces: - $text = preg_replace_callback('{'. - '(?abbr_word_re.')'. - '(?![\w\x1A])'. - '}', - array($this, '_doAbbreviations_callback'), $text); - } - return $text; - } - protected function _doAbbreviations_callback($matches) { - $abbr = $matches[0]; - if (isset($this->abbr_desciptions[$abbr])) { - $desc = $this->abbr_desciptions[$abbr]; - if (empty($desc)) { - return $this->hashPart("$abbr"); - } else { - $desc = $this->encodeAttribute($desc); - return $this->hashPart("$abbr"); - } - } else { - return $matches[0]; - } - } -} diff --git a/vendor/michelf/php-markdown/Michelf/MarkdownInterface.inc.php b/vendor/michelf/php-markdown/Michelf/MarkdownInterface.inc.php deleted file mode 100644 index a023ed4..0000000 --- a/vendor/michelf/php-markdown/Michelf/MarkdownInterface.inc.php +++ /dev/null @@ -1,9 +0,0 @@ - -# -# Original Markdown -# Copyright (c) 2004-2006 John Gruber -# -# -namespace Michelf; - - -# -# Markdown Parser Interface -# - -interface MarkdownInterface { - - # - # Initialize the parser and return the result of its transform method. - # This will work fine for derived classes too. - # - public static function defaultTransform($text); - - # - # Main function. Performs some preprocessing on the input text - # and pass it through the document gamut. - # - public function transform($text); - -} diff --git a/vendor/michelf/php-markdown/Readme.md b/vendor/michelf/php-markdown/Readme.md deleted file mode 100644 index fa7fe58..0000000 --- a/vendor/michelf/php-markdown/Readme.md +++ /dev/null @@ -1,327 +0,0 @@ -PHP Markdown -============ - -PHP Markdown Lib 1.5.0 - 1 Mar 2015 - -by Michel Fortin - - -based on Markdown by John Gruber - - - -Introduction ------------- - -This is a library package that includes the PHP Markdown parser and its -sibling PHP Markdown Extra with additional features. - -Markdown is a text-to-HTML conversion tool for web writers. Markdown -allows you to write using an easy-to-read, easy-to-write plain text -format, then convert it to structurally valid XHTML (or HTML). - -"Markdown" is actually two things: a plain text markup syntax, and a -software tool, originally written in Perl, that converts the plain text -markup to HTML. PHP Markdown is a port to PHP of the original Markdown -program by John Gruber. - -* [Full documentation of the Markdown syntax]() - — Daring Fireball (John Gruber) -* [Markdown Extra syntax additions]() - — Michel Fortin - - -Requirement ------------ - -This library package requires PHP 5.3 or later. - -Note: The older plugin/library hybrid package for PHP Markdown and -PHP Markdown Extra is still maintained and will work with PHP 4.0.5 and later. - -Before PHP 5.3.7, pcre.backtrack_limit defaults to 100 000, which is too small -in many situations. You might need to set it to higher values. Later PHP -releases defaults to 1 000 000, which is usually fine. - - -Usage ------ - -This library package is meant to be used with class autoloading. For autoloading -to work, your project needs have setup a PSR-0-compatible autoloader. See the -included Readme.php file for a minimal autoloader setup. (If you cannot use -autoloading, see below.) - -With class autoloading in place, putting the 'Michelf' folder in your -include path should be enough for this to work: - - use \Michelf\Markdown; - $my_html = Markdown::defaultTransform($my_text); - -Markdown Extra syntax is also available the same way: - - use \Michelf\MarkdownExtra; - $my_html = MarkdownExtra::defaultTransform($my_text); - -If you wish to use PHP Markdown with another text filter function -built to parse HTML, you should filter the text *after* the `transform` -function call. This is an example with [PHP SmartyPants][psp]: - - use \Michelf\Markdown, \Michelf\SmartyPants; - $my_html = Markdown::defaultTransform($my_text); - $my_html = SmartyPants::defaultTransform($my_html); - -All these examples are using the static `defaultTransform` static function -found inside the parser class. If you want to customize the parser -configuration, you can also instantiate it directly and change some -configuration variables: - - use \Michelf\MarkdownExtra; - $parser = new MarkdownExtra; - $parser->fn_id_prefix = "post22-"; - $my_html = $parser->transform($my_text); - -To learn more, see the full list of [configuration variables]. - - [configuration variables]: https://michelf.ca/projects/php-markdown/configuration/ - - -### Usage without an autoloader - -If you cannot use class autoloading, you can still use `include` or `require` -to access the parser. To load the `\Michelf\Markdown` parser, do it this way: - - require_once 'Michelf/Markdown.inc.php'; - -Or, if you need the `\Michelf\MarkdownExtra` parser: - - require_once 'Michelf/MarkdownExtra.inc.php'; - -While the plain `.php` files depend on autoloading to work correctly, using the -`.inc.php` files instead will eagerly load the dependencies that would be -loaded on demand if you were using autoloading. - - -Public API and Versioning Policy ---------------------------------- - -Version numbers are of the form *major*.*minor*.*patch*. - -The public API of PHP Markdown consist of the two parser classes `Markdown` -and `MarkdownExtra`, their constructors, the `transform` and `defaultTransform` -functions and their configuration variables. The public API is stable for -a given major version number. It might get additions when the minor version -number increments. - -**Protected members are not considered public API.** This is unconventional -and deserves an explanation. Incrementing the major version number every time -the underlying implementation of something changes is going to give -nonessential version numbers for the vast majority of people who just use the -parser. Protected members are meant to create parser subclasses that behave in -different ways. Very few people create parser subclasses. I don't want to -discourage it by making everything private, but at the same time I can't -guarantee any stable hook between versions if you use protected members. - -**Syntax changes** will increment the minor number for new features, and the -patch number for small corrections. A *new feature* is something that needs a -change in the syntax documentation. Note that since PHP Markdown Lib includes -two parsers, a syntax change for either of them will increment the minor -number. Also note that there is nothing perfectly backward-compatible with the -Markdown syntax: all inputs are always valid, so new features always replace -something that was previously legal, although generally nonsensical to do. - - -Bugs ----- - -To file bug reports please send email to: - - -Please include with your report: (1) the example input; (2) the output you -expected; (3) the output PHP Markdown actually produced. - -If you have a problem where Markdown gives you an empty result, first check -that the backtrack limit is not too low by running `php --info | grep pcre`. -See Installation and Requirement above for details. - - -Development and Testing ------------------------ - -Pull requests for fixing bugs are welcome. Proposed new features are -going meticulously reviewed -- taking into account backward compatibility, -potential side effects, and future extensibility -- before deciding on -acceptance or rejection. - -If you make a pull request that includes changes to the parser please add -tests for what is being changed to [MDTest][] and make a pull request there -too. - - [MDTest]: https://github.com/michelf/mdtest/ - - -Donations ---------- - -If you wish to make a donation that will help me devote more time to -PHP Markdown, please visit [michelf.ca/donate] or send Bitcoin to -[1HiuX34czvVPPdhXbUAsAu7pZcesniDCGH]. - - [michelf.ca/donate]: https://michelf.ca/donate/#!Thanks%20for%20PHP%20Markdown - [1HiuX34czvVPPdhXbUAsAu7pZcesniDCGH]: bitcoin:1HiuX34czvVPPdhXbUAsAu7pZcesniDCGH - - -Version History ---------------- - -PHP Markdown Lib 1.5.0 (1 Mar 2015) - -* Added the ability start ordered lists with a number different from 1 and - and have that reflected in the HTML output. This can be enabled with - the `enhanced_ordered_lists` configuration variable for the Markdown - parser; it is enabled by default for Markdown Extra. - Credits to Matt Gorle for providing the implementation. - -* Added the ability to insert custom HTML attributes with simple values - everywhere an extra attribute block is allowed (links, images, headers). - The value must be unquoted, cannot contains spaces and is limited to - alphanumeric ASCII characters. - Credits to Peter Droogmans for providing the implementation. - -* Added a `header_id_func` configuration variable which takes a function - that can generate an `id` attribute value from the header text. - Credits to Evert Pot for providing the implementation. - -* Added a `url_filter_func` configuration variable which takes a function - that can rewrite any link or image URL to something different. - - -PHP Markdown Lib 1.4.1 (4 May 2014) - -* The HTML block parser will now treat `
    ` as a block-level element - (as it should) and no longer wrap it in `

    ` or parse it's content with - the as Markdown syntax (although with Extra you can use `markdown="1"` - if you wish to use the Markdown syntax inside it). - -* The content of `