From 98f84b44e6475dd348058e9136a0eeb854b93414 Mon Sep 17 00:00:00 2001 From: lavigor Date: Sat, 29 Nov 2014 17:56:47 +0300 Subject: [PATCH 01/22] tempnam() fix. --- acp/upload_module.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acp/upload_module.php b/acp/upload_module.php index 078eac8..4d85035 100644 --- a/acp/upload_module.php +++ b/acp/upload_module.php @@ -1029,7 +1029,7 @@ function remote_upload($files, $upload_url, \phpbb\mimetype\guesser $mimetype_gu return $file; } - $tmp_path = (!@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'off') ? false : $phpbb_root_path . 'cache'; + $tmp_path = (@is_writable('/tmp/')) ? '/tmp/' : $phpbb_root_path . 'cache/'; $filename = tempnam($tmp_path, unique_id() . '-'); if (!($fp = @fopen($filename, 'wb'))) From 3c8e9479185a77358f9259a507e097df04b97647 Mon Sep 17 00:00:00 2001 From: alhitary Date: Fri, 12 Dec 2014 17:35:37 +0300 Subject: [PATCH 02/22] Create info_acp_upload.php --- language/en/ar/info_acp_upload.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 language/en/ar/info_acp_upload.php diff --git a/language/en/ar/info_acp_upload.php b/language/en/ar/info_acp_upload.php new file mode 100644 index 0000000..e5531cd --- /dev/null +++ b/language/en/ar/info_acp_upload.php @@ -0,0 +1,24 @@ + 'رفع الإضافات', + 'ACP_UPLOAD_EXT_CONFIG_TITLE' => 'رفع الإضافات', +)); From 72f17ee71c683493ed9581c3ffa901e797270a21 Mon Sep 17 00:00:00 2001 From: alhitary Date: Fri, 12 Dec 2014 17:36:01 +0300 Subject: [PATCH 03/22] Create upload.php --- language/en/ar/upload.php | 77 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 language/en/ar/upload.php diff --git a/language/en/ar/upload.php b/language/en/ar/upload.php new file mode 100644 index 0000000..787b457 --- /dev/null +++ b/language/en/ar/upload.php @@ -0,0 +1,77 @@ + 'رفع الإضافات', + 'ACP_UPLOAD_EXT_CONFIG_TITLE' => 'رفع الإضافات', + 'ACP_UPLOAD_EXT_TITLE_EXPLAIN' => 'تستطيع من هنا رفع الإضافات المضغوطة بصيغة zip أو حذفها من السيرفر.
تستطيع أيضاً تنصيب / تحديث / حذف الإضافات بدون استخدام برنامج الFTP. ويتم تحديث الإضافة القديمة عندما تقوم برفع الإضافة الجديدة المُحدثة.', + 'UPLOAD' => 'رفع الإضافة', + 'BROWSE' => 'استعراض...', + 'EXTENSION_UPLOAD' => 'رفع الإضافة', + 'EXTENSION_UPLOAD_EXPLAIN' => 'من هنا تستطيع رفع ملف الإضافة المضغوط بصيغة zip من جهازك المحلي أو من سيرفر بعيد. وسيتم بعد ذلك فك ملف الإضافة المضغوط والتجهيز لعملية التنصيب.
اختار الملف المطلوب أو أكتب الرابط في الحقل أدناه.', + 'EXT_UPLOAD_INIT_FAIL' => 'هناك خطأ أثناء عملية رفع الإضافة.', + 'EXT_NOT_WRITABLE' => 'لا يمتلك المسار ext/ تراخيص الكتابة. نرجوا ضبط التراخيص أو الإعدادات لكي تعمل هذه الإضافة بصورة صحيحة والمحاولة مرة أخرى.', + 'EXT_UPLOAD_ERROR' => 'لم يتم رفع الإضافة. نرجوا التأكد من صحة الملف المضغوط والمحاولة مرة أخرى.', + 'NO_UPLOAD_FILE' => 'لم يتم تحديد أي ملف أو هناك خطأ أثناء عملية رفع الإضافة.', + 'NOT_AN_EXTENSION' => 'لم يتم التعرف على الملف المضغوط الذي رفعته. لم يتم حفظ هذا الملف على سيرفرك.', + + 'EXTENSION_UPLOADED' => 'تم رفع الإضافة “%s” بنجاح.', + 'EXTENSIONS_AVAILABLE' => 'الإضافات المتوفرة', + 'EXTENSION_INVALID_LIST' => 'قائمة الإضافة', + 'EXTENSION_UPLOADED_ENABLE' => 'تفعيل هذه الإضافة', + 'ACP_UPLOAD_EXT_UNPACK' => 'فك الضغط', + 'ACP_UPLOAD_EXT_CONT' => 'محتوى المجلد: %s', + + 'EXTENSION_DELETE' => 'حذف الإضافة', + 'EXTENSION_DELETE_CONFIRM' => 'هل تريد بالفعل حذف الإضافة “%s” ?', + 'EXT_DELETE_SUCCESS' => 'تم حذف الإضافة بنجاح.', + 'EXT_DELETE_ERROR' => 'لم يتم تحديد الملف أو حدثت مشكلة أثناء عملية الحذف.', + + 'EXTENSION_ZIP_DELETE' => 'حذف الملف المضغوط', + 'EXTENSION_ZIP_DELETE_CONFIRM' => 'هل تريد بالفعل حذف الملف المضغوط للإضافة “%s” ?', + 'EXT_ZIP_DELETE_SUCCESS' => 'تم حذف ملف الإضافة المضغوط بنجاح.', + 'EXT_ZIP_DELETE_ERROR' => 'لم يتم تحديد أي ملف أو هناك خطأ أثناء عملية الحذف.', + + 'ACP_UPLOAD_EXT_ERROR_DEST' => 'مجلد ال vendor أو مسار المجلد غير موجود في الملف المضغوط الذي رفعته. لم يتم حفظ هذا الملف على سيرفرك.', + 'ACP_UPLOAD_EXT_ERROR_COMP' => 'الملف composer.json غير موجود في الملف المضغوط الذي رفعته. لم يتم حفظ هذا الملف على سيرفرك.', + 'ACP_UPLOAD_EXT_ERROR_NOT_SAVED' => 'لم يتم حفظ الملف على سيرفرك.', + 'ACP_UPLOAD_EXT_WRONG_RESTORE' => 'حدثت مشكلة أثناء عملية تحديث الإضافة. نرجوا المحاولة مرة أخرى.', + + 'UPLOAD_EXTENSIONS_DEVELOPERS' => 'المطورين', + + 'SHOW_FILETREE' => '<< إظهار محتوى الملف >>', + 'HIDE_FILETREE' => '>> إخفاء محتوى الملف <<', + + 'EXT_UPLOAD_SAVE_ZIP' => 'حفظ هذا الملف المضغوط', + 'ZIP_UPLOADED' => 'الإضافات المضغوطة', + 'EXT_ENABLE' => 'تفعيل', + 'EXT_UPLOADED' => 'تم الرفع', + 'EXT_UPDATED' => 'تم التحديث', + 'EXT_UPDATED_LATEST_VERSION' => 'مُحدث إلى آخر إصدار', + 'EXT_UPLOAD_BACK' => '« العودة إلى الصفحة الرئيسية', + + 'ACP_UPLOAD_EXT_DIR' => 'مسار تخزين الإضافات المضغوطة', + 'ACP_UPLOAD_EXT_DIR_EXPLAIN' => 'المسار الموجود في مجلد المنتدى , على سبيل المثال : ext.
تستطيع تغيير هذا المسار إلى مجلد خاص لحفظ الملفات المضغوطة ( مثال : اذا تريد اتاحة تحميل هذه الملفات للأعضاء , تستطيع تغيير المسار إلى downloads, واذا تريد منعها , تستطيع تغييرها إلى المسار الذي يكون أعلى بمستوى واحد عن المسار الرئيسي http لموقعك ( أو تستطيع انشاء مجلد يحتوى على الملف .htaccess )).', + + 'ACP_UPLOAD_EXT_UPDATED' => 'تم تحديث الإضافة بنجاح.', + 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'لقد قمت برفع ملف مضغوط لإضافة موجودة مُسبقاً. تم تعطيل تلك الإضافة تلقائياً لتنفيذ عملية التحديث بصورة آمنة. نرجوا الآن التأكد من صحة عمل الإضافة و تفعيلها اذا تريد ذلك.', + + 'VALID_PHPBB_EXTENSIONS' => 'الإضافات المُعتمدة', +)); From 5f09a571e6e4df1cd5347c6c691402cd60228185 Mon Sep 17 00:00:00 2001 From: lavigor Date: Sat, 20 Dec 2014 09:58:56 +0300 Subject: [PATCH 04/22] Fix #17. --- language/{en => }/ar/info_acp_upload.php | 0 language/{en => }/ar/upload.php | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename language/{en => }/ar/info_acp_upload.php (100%) rename language/{en => }/ar/upload.php (100%) diff --git a/language/en/ar/info_acp_upload.php b/language/ar/info_acp_upload.php similarity index 100% rename from language/en/ar/info_acp_upload.php rename to language/ar/info_acp_upload.php diff --git a/language/en/ar/upload.php b/language/ar/upload.php similarity index 100% rename from language/en/ar/upload.php rename to language/ar/upload.php From 21e6a56cba4c9851166022ccf203c6f6ff361261 Mon Sep 17 00:00:00 2001 From: lavigor Date: Sun, 4 Jan 2015 16:25:14 +0300 Subject: [PATCH 05/22] Bug fixes: a new file and some issues. --- vendor/filetree/filedownload.php | 30 ++++++++++++++++++++++++++++++ vendor/filetree/filetree.php | 9 +++++---- 2 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 vendor/filetree/filedownload.php diff --git a/vendor/filetree/filedownload.php b/vendor/filetree/filedownload.php new file mode 100644 index 0000000..fb67152 --- /dev/null +++ b/vendor/filetree/filedownload.php @@ -0,0 +1,30 @@ +lang('ACP_UPLOAD_EXT_CONT', $display_name) . '

'; - if(substr($directory, -1) == '/' ) + if (substr($directory, -1) == '/') { $directory = substr($directory, 0, strlen($directory) - 1); } @@ -72,6 +72,7 @@ public static function php_file_tree_dir($directory, $uaction, $extensions = arr } } + $php_file_tree = ''; if (count($file) > 2) { // Use 2 instead of 0 to account for . and .. directories $php_file_tree = '' . htmlspecialchars($this_file) . ''; + $link = $uaction . '&file=' . urlencode($directory . '/' . $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) . '
  • '; } } } From 12d5b9b9bd4c8d8e1fd90610901ec6213e0a2d66 Mon Sep 17 00:00:00 2001 From: Mauron Date: Wed, 14 Jan 2015 05:08:32 +0100 Subject: [PATCH 06/22] Create info_acp_upload.php Italian translation for info_acp_upload.php --- language/it/info_acp_upload.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 language/it/info_acp_upload.php diff --git a/language/it/info_acp_upload.php b/language/it/info_acp_upload.php new file mode 100644 index 0000000..18bde3a --- /dev/null +++ b/language/it/info_acp_upload.php @@ -0,0 +1,23 @@ + 'Carica estensione', + 'ACP_UPLOAD_EXT_CONFIG_TITLE' => 'Carica estensione', +)); From be8a6a28b8dc34dde26b98d3307c59bd8c888ba7 Mon Sep 17 00:00:00 2001 From: Mauron Date: Wed, 14 Jan 2015 05:43:13 +0100 Subject: [PATCH 07/22] Create upload.php Italian translation for upload.php --- language/it/upload.php | 76 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 language/it/upload.php diff --git a/language/it/upload.php b/language/it/upload.php new file mode 100644 index 0000000..4ee41b9 --- /dev/null +++ b/language/it/upload.php @@ -0,0 +1,76 @@ + 'Carica estensione', + 'ACP_UPLOAD_EXT_CONFIG_TITLE' => 'Carica estensione', + 'ACP_UPLOAD_EXT_TITLE_EXPLAIN' => 'Carica estensione permette di caricare il file zip di un\'estensione o di cancellarle dal server.
    Con quest\'estensione, è possibile installare, aggiornare o rimuovere i file zip delle estensioni senza l\'uso del server FTP. Se l\'estensione da caricare è già installata, viene aggiornata coi file caricati.', + 'UPLOAD' => 'Carica', + 'BROWSE' => 'Apri', + 'EXTENSION_UPLOAD' => 'Carica estensione', + 'EXTENSION_UPLOAD_EXPLAIN' => 'Qui è possibile caricare il file zip di un\'estensione contenente i file necessari all\'installazione dal proprio computer o da un server remoto. “Carica estensione” proverà ad estrarre i file per l\'installazione.
    Scegli un file o specifica l\'indirizzo del file da installare qui in basso.', + 'EXT_UPLOAD_INIT_FAIL' => 'Errore nell\'inizializzazione del processo di caricamento.', + 'EXT_NOT_WRITABLE' => 'La cartella ext/ è di sola lettura. Perché “Carica estensione” funzioni, è necessario che sia scrivibile. Correggere i permessi o le impostazioni e riprovare.', + 'EXT_UPLOAD_ERROR' => 'Estensione non caricata. Assicurarsi di avere un file zip di estensione corretto e riprovare.', + 'NO_UPLOAD_FILE' => 'Nessun file specificato o errore di caricamento.', + 'NOT_AN_EXTENSION' => 'Il file zip caricato non è un\'estensione per phpBB. Il file non è stato salvato sul server.', + + 'EXTENSION_UPLOADED' => 'L\'estensione “%s” è stata caricata.', + 'EXTENSIONS_AVAILABLE' => 'Estensioni disponibili', + 'EXTENSION_INVALID_LIST' => 'Elenco estensioni', + 'EXTENSION_UPLOADED_ENABLE' => 'Abilita l\'estensione caricata', + 'ACP_UPLOAD_EXT_UNPACK' => 'Estrai estensione', + 'ACP_UPLOAD_EXT_CONT' => 'Contenuto del pacchetto: %s', + + 'EXTENSION_DELETE' => 'Rimuovi estensione', + 'EXTENSION_DELETE_CONFIRM' => 'Sei sicuro di voler rimuovere l\'estensione “%s”?', + 'EXT_DELETE_SUCCESS' => 'L\'estensione è stata rimossa.', + 'EXT_DELETE_ERROR' => 'Nessun file specificato o errore durante la rimozione.', + + 'EXTENSION_ZIP_DELETE' => 'Rimuovi file zip', + 'EXTENSION_ZIP_DELETE_CONFIRM' => 'Sei sicuro di voler rimuovere il file zip “%s”?', + 'EXT_ZIP_DELETE_SUCCESS' => 'Il file zip dell\'estensione è stato rimosso.', + 'EXT_ZIP_DELETE_ERROR' => 'Nessun file specificato o errore durante la rimozione.', + + 'ACP_UPLOAD_EXT_ERROR_DEST' => 'Nessuna cartella di destinazione o vendor specificata nel file zip caricato. Il file non è stato salvato.', + 'ACP_UPLOAD_EXT_ERROR_COMP' => 'File composer.json non trovato nel file zip caricato. Il file non è stato salvato.', + 'ACP_UPLOAD_EXT_ERROR_NOT_SAVED' => 'Il file non è stato salvato.', + 'ACP_UPLOAD_EXT_WRONG_RESTORE' => 'Si è verificato un errore durante l\'aggiornamento d un\'estensione installata. Si prega di riprovare.', + + 'UPLOAD_EXTENSIONS_DEVELOPERS' => 'Sviluppatori', + + 'SHOW_FILETREE' => '<< Mostra struttura file >>', + 'HIDE_FILETREE' => '>> Nascondi struttura file <<', + + 'EXT_UPLOAD_SAVE_ZIP' => 'Salva file zip caricato', + 'ZIP_UPLOADED' => 'File zip dell\'estensione caricato', + 'EXT_ENABLE' => 'Abilita', + 'EXT_UPLOADED' => 'caricata', + 'EXT_UPDATED' => 'aggiornata', + 'EXT_UPDATED_LATEST_VERSION' => 'aggiornata all\'ultima versione', + 'EXT_UPLOAD_BACK' => '« Torna a Carica estensione', + + 'ACP_UPLOAD_EXT_DIR' => 'Percorso di salvataggio dei file zip di estensione', + 'ACP_UPLOAD_EXT_DIR_EXPLAIN' => 'Percorso nella cartella principale di phpBB, per esempio ext.
    È possibile cambiare il percorso di salvataggio dei file zip di estensione specificando una cartella speciale (ad esempio, se si vuole permettere agli utenti di scaricare questi file, è possibile cambiarla in download; se invece si vuole impedire i download, è possibile specificare un percorso superiore di un livello rispetto alla cartella principale del proprio sito web (oppure creare una cartella con un apposito file .htaccess)).', + + 'ACP_UPLOAD_EXT_UPDATED' => 'L\'estensione installata è stata aggiornata.', + 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'È stata caricata un\'estensione già installata. Quest\'estensione è stata automaticamente disabilitata per la sicurezza del processo di aggiornamento. Controllare la correttezza dei file caricati e riabilitare l\'estensione qualora debba ancora essere usata.', + + 'VALID_PHPBB_EXTENSIONS' => 'Archivio ufficiale phpbb.com', +)); From 3a8c088b8982e607d963c3f1c27c886fb483afa0 Mon Sep 17 00:00:00 2001 From: lavigor Date: Thu, 15 Jan 2015 22:12:12 +0300 Subject: [PATCH 08/22] New fixes. The default directory for ZIP files changed. --- acp/upload_module.php | 110 ++++++++++++++++---- adm/style/acp_ext_details.html | 22 ++-- adm/style/acp_upload.html | 6 +- language/ar/upload.php | 12 +++ language/de/upload.php | 12 +++ language/en/upload.php | 12 +++ language/es/upload.php | 12 +++ language/et/upload.php | 12 +++ language/fa/upload.php | 12 +++ language/fr/upload.php | 12 +++ language/it/upload.php | 12 +++ language/nl/upload.php | 12 +++ language/ru/upload.php | 12 +++ language/sv/upload.php | 12 +++ migrations/configuration/add_zip_config.php | 20 +++- 15 files changed, 255 insertions(+), 35 deletions(-) diff --git a/acp/upload_module.php b/acp/upload_module.php index 4d85035..ba7b49d 100644 --- a/acp/upload_module.php +++ b/acp/upload_module.php @@ -16,6 +16,7 @@ class upload_module public $back_link; private $self_update; private $upload_ext_name; + private $phpbb_link_template; var $zip_dir = ''; var $error = ''; function main($id, $mode) @@ -37,6 +38,7 @@ function main($id, $mode) $id = $request->variable('i', $id); $this->main_link = $this->u_action; $this->back_link = ($request->is_ajax()) ? '' : adm_back_link($this->u_action); + $this->phpbb_link_template = '#^(https://)www.phpbb.com/customise/db/download/([0-9]*?)(\?sid\=[a-zA-Z0-9]*?)?$#i'; include($phpbb_root_path . 'ext/boardtools/upload/vendor/filetree/filetree.' . $phpEx); $file = $request->variable('file', ''); @@ -89,7 +91,7 @@ function main($id, $mode) $md_manager->output_template_data(); - if ($this->self_update !== false && (preg_match('#^(https://)www.phpbb.com/customise/db/download/([0-9]*?)$#i', $this->self_update))) + if ($this->self_update !== false && (preg_match($this->phpbb_link_template, $this->self_update))) { $template->assign_vars(array( 'U_UPLOAD_EXT_UPDATE' => $this->main_link . '&action=upload_self_confirm', @@ -266,7 +268,11 @@ function listzip() { global $phpbb_root_path, $template, $request, $phpbb_container; $zip_array = array(); - $ffs = scandir($this->zip_dir . '/'); + $ffs = @scandir($this->zip_dir . '/'); + if (!$ffs) + { + return false; + } foreach($ffs as $ff) { if ($ff != '.' && $ff != '..') @@ -300,7 +306,11 @@ function listzip() function getComposer($dir) { global $composer; - $ffs = scandir($dir); + $ffs = @scandir($dir); + if (!$ffs) + { + return false; + } $composer = false; foreach($ffs as $ff) { @@ -325,7 +335,12 @@ function rrmdir($dir, $no_errors = true) { if (is_dir($dir)) { - $files = scandir($dir); + $files = @scandir($dir); + if ($files === false) + { + $this->trigger_error($user->lang['NO_UPLOAD_FILE'], E_USER_WARNING); + return false; + } foreach ($files as $file) { if ($file != '.' && $file != '..') @@ -351,23 +366,41 @@ function rcopy($src, $dst) { if (file_exists($dst)) { - $this->rrmdir($dst); + if (!($this->rrmdir($dst))) + { + $this->trigger_error($user->lang['NO_UPLOAD_FILE'], E_USER_WARNING); + return false; + } } if (is_dir($src)) { $this->recursive_mkdir($dst, 0755); - $files = scandir($src); + $files = @scandir($src); + if ($files === false) + { + $this->trigger_error($user->lang['NO_UPLOAD_FILE'], E_USER_WARNING); + return false; + } foreach($files as $file) { if ($file != '.' && $file != '..') { - $this->rcopy($src . '/' . $file, $dst . '/' . $file); + if (!($this->rcopy($src . '/' . $file, $dst . '/' . $file))) + { + return false; + } } } - } else if (file_exists($src)) + } + else if (file_exists($src)) { - copy($src, $dst); + if (!(@copy($src, $dst))) + { + $this->trigger_error($user->lang['NO_UPLOAD_FILE'], E_USER_WARNING); + return false; + } } + return true; } /** @@ -540,7 +573,7 @@ function upload_ext($action) else if ($action == 'upload_self') { $this->self_update = $request->variable('self_update', ''); - if ($this->self_update !== false && (preg_match('#^(https://)www.phpbb.com/customise/db/download/([0-9]*?)$#i', $this->self_update))) + if ($this->self_update !== false && (preg_match($this->phpbb_link_template, $this->self_update))) { $file = $this->remote_upload($upload, $this->self_update); } @@ -598,7 +631,14 @@ function upload_ext($action) // Ensure that we don't have any previous files in the working directory. if (is_dir($phpbb_root_path . 'ext/' . $ext_tmp)) { - $this->rrmdir($phpbb_root_path . 'ext/' . $ext_tmp); + if (!($this->rrmdir($phpbb_root_path . 'ext/' . $ext_tmp))) + { + if($action != 'upload_local') + { + $file->remove(); + } + return false; + } } $zip = new \compress_zip('r', $dest_file); @@ -662,7 +702,15 @@ function upload_ext($action) // We need it to escape from problems with dots on validation. if ($source != $phpbb_root_path . 'ext/' . $source_for_check) { - $this->rcopy($source, $phpbb_root_path . 'ext/' . $source_for_check); + if (!($this->rcopy($source, $phpbb_root_path . 'ext/' . $source_for_check))) + { + $this->rrmdir($phpbb_root_path . 'ext/' . $ext_tmp); + if($action != 'upload_local') + { + $file->remove(); + } + return false; + } $source = $phpbb_root_path . 'ext/' . $source_for_check; } // Validate the extension to check if it can be used on the board. @@ -795,16 +843,29 @@ function upload_ext($action) $old_ext_name = $old_display_name . '_' . $old_ext_version; } $this->save_zip_archive('ext/' . $destination . '/', str_replace(array('/', '\\'), '_', $old_ext_name) . '_old'); - $this->rrmdir($phpbb_root_path . 'ext/' . $destination); + if (!($this->rrmdir($phpbb_root_path . 'ext/' . $destination))) + { + return false; + } + } + if (!($this->rcopy($source, $phpbb_root_path . 'ext/' . $destination))) + { + $this->rrmdir($phpbb_root_path . 'ext/' . $ext_tmp); + return false; } - $this->rcopy($source, $phpbb_root_path . 'ext/' . $destination); // No enabling at this stage. Admins should have a chance to revise the uploaded scripts. - $this->rrmdir($phpbb_root_path . 'ext/' . $ext_tmp); + if (!($this->rrmdir($phpbb_root_path . 'ext/' . $ext_tmp))) + { + return false; + } } else if ($action == 'upload_self') { // No enabling at this stage. Admins should have a chance to revise the uploaded scripts. - $this->rrmdir($phpbb_root_path . 'ext/' . $ext_tmp); + if (!($this->rrmdir($phpbb_root_path . 'ext/' . $ext_tmp))) + { + return false; + } $destination = 'boardtools/new_upload/' . $destination; } else @@ -812,9 +873,16 @@ function upload_ext($action) // Now Upload Extensions will update itself. We suppose that it will be fast and without errors. // Otherwise users will need to use FTP. $phpbb_extension_manager->disable($destination); - $this->rcopy($source, $phpbb_root_path . 'ext/' . $destination); + if (!($this->rcopy($source, $phpbb_root_path . 'ext/' . $destination))) + { + $this->rrmdir($phpbb_root_path . 'ext/' . $ext_tmp); + return false; + } $phpbb_extension_manager->enable($destination); - $this->rrmdir($phpbb_root_path . 'ext/' . $ext_tmp); + if (!($this->rrmdir($phpbb_root_path . 'ext/' . $ext_tmp))) + { + return false; + } $template->assign_vars(array( 'S_UPDATED_SELF' => $display_name, )); @@ -846,8 +914,8 @@ function upload_ext($action) 'S_ACTION_BACK' => $this->main_link, 'U_ACTION' => $this->u_action, 'README_MARKDOWN' => $readme, - 'FILENAME' => ($string !== false) ? 'README.md' : '', - 'CONTENT' => ($string !== false) ? highlight_string($string, true): '' + 'FILENAME' => ($string !== false) ? 'README.md' : 'composer.json', + 'CONTENT' => ($string !== false) ? highlight_string($string, true) : highlight_string(@file_get_contents($phpbb_root_path . 'ext/' . $destination . '/composer.json'), true) )); return true; @@ -915,7 +983,7 @@ function remote_upload($files, $upload_url, \phpbb\mimetype\guesser $mimetype_gu $upload_ary = array(); $upload_ary['local_mode'] = true; - $upload_from_phpbb = preg_match('#^(https://)www.phpbb.com/customise/db/download/([0-9]*?)$#i', $upload_url, $match_phpbb); + $upload_from_phpbb = preg_match($this->phpbb_link_template, $upload_url, $match_phpbb); if (!preg_match('#^(https?://).*?\.(' . implode('|', $files->allowed_extensions) . ')$#i', $upload_url, $match) && !$upload_from_phpbb) { diff --git a/adm/style/acp_ext_details.html b/adm/style/acp_ext_details.html index 18f4df6..05fd899 100644 --- a/adm/style/acp_ext_details.html +++ b/adm/style/acp_ext_details.html @@ -31,34 +31,34 @@

    {META_DISPLAY_NAME} - {L_DESCRIPTION}
    -

    Upload phpBB extensions

    +

    {L_UPLOAD_DESCRIPTION_UPLOAD}

    - CDB on phpbb.com - Local PC - Remote server + {L_UPLOAD_DESCRIPTION_UPLOAD_CDB} + {L_UPLOAD_DESCRIPTION_UPLOAD_LOCAL} + {L_UPLOAD_DESCRIPTION_UPLOAD_REMOTE}

    -

    Update phpBB extensions

    -

    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.

    +

    {L_UPLOAD_DESCRIPTION_UPDATE}

    +

    {L_UPLOAD_DESCRIPTION_UPDATE_ABOUT}


    -

    ZIP files management

    +

    {L_UPLOAD_DESCRIPTION_ZIP}

    - Save zips in a directory of your choice - Unpack a zip file to install an extension + {L_UPLOAD_DESCRIPTION_ZIP_SAVE} + {L_UPLOAD_DESCRIPTION_ZIP_UNPACK}

    -

    Extension Cleaner tool

    -

    You can delete extension directories or zip files of extensions from the server.

    +

    {L_UPLOAD_DESCRIPTION_CLEANER}

    +

    {L_UPLOAD_DESCRIPTION_CLEANER_ABOUT}

    diff --git a/adm/style/acp_upload.html b/adm/style/acp_upload.html index fa8825c..7dfe294 100644 --- a/adm/style/acp_upload.html +++ b/adm/style/acp_upload.html @@ -39,8 +39,10 @@

    {S_UPLOADED} - , - {L_SHOW_FILETREE} - {L_HIDE_FILETREE} + + {L_SHOW_FILETREE} + +
    style="display:block;">
    {FILETREE}
    diff --git a/language/ar/upload.php b/language/ar/upload.php index 787b457..fefb679 100644 --- a/language/ar/upload.php +++ b/language/ar/upload.php @@ -74,4 +74,16 @@ 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'لقد قمت برفع ملف مضغوط لإضافة موجودة مُسبقاً. تم تعطيل تلك الإضافة تلقائياً لتنفيذ عملية التحديث بصورة آمنة. نرجوا الآن التأكد من صحة عمل الإضافة و تفعيلها اذا تريد ذلك.', 'VALID_PHPBB_EXTENSIONS' => 'الإضافات المُعتمدة', + + '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_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_CLEANER' => 'Extension Cleaner tool', + 'UPLOAD_DESCRIPTION_CLEANER_ABOUT' => 'You can delete extension directories or zip files of extensions from the server.', )); diff --git a/language/de/upload.php b/language/de/upload.php index c44eb66..56a88fb 100644 --- a/language/de/upload.php +++ b/language/de/upload.php @@ -73,4 +73,16 @@ 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'Du hast ein Zip-Archiv zu einer bereits installierten Erweiterung hochgeladen. Diese Erweiterung wurde automatisch deaktiviert um eine sichere Aktualiserung zu gewährleisten. Bitte kontrolliere, daß die hochgeladenen Daten korrekt sind und aktiviere danach die Erweiterung.', 'VALID_PHPBB_EXTENSIONS' => 'phpbb.com CDB', + + '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_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_CLEANER' => 'Extension Cleaner tool', + 'UPLOAD_DESCRIPTION_CLEANER_ABOUT' => 'You can delete extension directories or zip files of extensions from the server.', )); diff --git a/language/en/upload.php b/language/en/upload.php index f5718ca..19ee35d 100644 --- a/language/en/upload.php +++ b/language/en/upload.php @@ -73,4 +73,16 @@ '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.', 'VALID_PHPBB_EXTENSIONS' => 'phpbb.com CDB', + + '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_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_CLEANER' => 'Extension Cleaner tool', + 'UPLOAD_DESCRIPTION_CLEANER_ABOUT' => 'You can delete extension directories or zip files of extensions from the server.', )); diff --git a/language/es/upload.php b/language/es/upload.php index 0ec3a1d..1b5d3e4 100644 --- a/language/es/upload.php +++ b/language/es/upload.php @@ -73,4 +73,16 @@ 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'Ha subido un archivo zip para una extensión ya instalada. La extensión ha sido deshabilitada automáticamente para hacer más seguro el proceso de actualización. Ahora por favor compruebe si los archivos subidos son correctos y haga clic en habilitar la extensión si todavía quiere utilizarla en el foro.', 'VALID_PHPBB_EXTENSIONS' => 'phpbb.com CDB', + + '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_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_CLEANER' => 'Extension Cleaner tool', + 'UPLOAD_DESCRIPTION_CLEANER_ABOUT' => 'You can delete extension directories or zip files of extensions from the server.', )); diff --git a/language/et/upload.php b/language/et/upload.php index 2340290..87bc91a 100644 --- a/language/et/upload.php +++ b/language/et/upload.php @@ -73,4 +73,16 @@ 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'Sa oled üles laadinud juba olemas oleva laienduse zip faili. Antud laiendus keelati automaatselt, et teha uuendamise protsess ohutumaks. Nüüd palun kontrolli kas üles laaditud failid oli õiged, ning luba laiendus, kui on see kasutusel foorumis.', 'VALID_PHPBB_EXTENSIONS' => 'phpbb.com CDB', + + '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_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_CLEANER' => 'Extension Cleaner tool', + 'UPLOAD_DESCRIPTION_CLEANER_ABOUT' => 'You can delete extension directories or zip files of extensions from the server.', )); diff --git a/language/fa/upload.php b/language/fa/upload.php index eff85de..8d6b74d 100644 --- a/language/fa/upload.php +++ b/language/fa/upload.php @@ -74,4 +74,16 @@ 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'شما فایل زیپ شده ای برای به روز رسانی افزونه مورد نظر آپلود کرده اید. افزونه به صورت خودکار غیر فعال شده تا به صورت امن به روز رسانی انجام شود. حالا لطفا بررسی کنید فایل آپلود شده صحیح می باشد و فعال کنید افزونه مورد نظر را جهت استفاده در انجمن', 'VALID_PHPBB_EXTENSIONS' => 'phpbb.com CDB', + + '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_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_CLEANER' => 'Extension Cleaner tool', + 'UPLOAD_DESCRIPTION_CLEANER_ABOUT' => 'You can delete extension directories or zip files of extensions from the server.', )); diff --git a/language/fr/upload.php b/language/fr/upload.php index 032305f..ba2cb2d 100644 --- a/language/fr/upload.php +++ b/language/fr/upload.php @@ -74,4 +74,16 @@ 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'Vous avez transféré une archive pour une extension déjà installée. Cette extension a été désactivée automatiquement pour assurer une mise à jour plus sûre. Veuillez maintenant vérifier si l’archive transférée est correcte puis activer l’extension si vous souhaitez toujours l’utiliser sur votre forum.', 'VALID_PHPBB_EXTENSIONS' => 'phpbb.com CDB', + + '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_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_CLEANER' => 'Extension Cleaner tool', + 'UPLOAD_DESCRIPTION_CLEANER_ABOUT' => 'You can delete extension directories or zip files of extensions from the server.', )); diff --git a/language/it/upload.php b/language/it/upload.php index 4ee41b9..3763ea9 100644 --- a/language/it/upload.php +++ b/language/it/upload.php @@ -73,4 +73,16 @@ 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'È stata caricata un\'estensione già installata. Quest\'estensione è stata automaticamente disabilitata per la sicurezza del processo di aggiornamento. Controllare la correttezza dei file caricati e riabilitare l\'estensione qualora debba ancora essere usata.', 'VALID_PHPBB_EXTENSIONS' => 'Archivio ufficiale phpbb.com', + + '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_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_CLEANER' => 'Extension Cleaner tool', + 'UPLOAD_DESCRIPTION_CLEANER_ABOUT' => 'You can delete extension directories or zip files of extensions from the server.', )); diff --git a/language/nl/upload.php b/language/nl/upload.php index 6aeaccd..2d0f35d 100644 --- a/language/nl/upload.php +++ b/language/nl/upload.php @@ -73,4 +73,16 @@ 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'Je hebt een zip bestand geüpload voor een extensie die al geïnstalleerd is. Deze extensie is automatisch uitgeschakeld om het update proces veiliger te maken. Controleer nu of de geüploade bestanden juist zijn en schakel de extensie in als het gebruikt wordt op het forum.', 'VALID_PHPBB_EXTENSIONS' => 'phpbb.com CDB', + + '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_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_CLEANER' => 'Extension Cleaner tool', + 'UPLOAD_DESCRIPTION_CLEANER_ABOUT' => 'You can delete extension directories or zip files of extensions from the server.', )); diff --git a/language/ru/upload.php b/language/ru/upload.php index 92343bc..1d29446 100644 --- a/language/ru/upload.php +++ b/language/ru/upload.php @@ -73,4 +73,16 @@ 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'Вы загрузили zip файл для установленного ранее расширения. Это расширение было автоматически отключено, чтобы сделать процесс обновления безопаснее. Теперь, пожалуйста, проверьте корректность загруженных файлов и включите расширение, если оно всё ещё должно использоваться на конференции.', 'VALID_PHPBB_EXTENSIONS' => 'phpbb.com CDB', + + '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_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_CLEANER' => 'Extension Cleaner tool', + 'UPLOAD_DESCRIPTION_CLEANER_ABOUT' => 'You can delete extension directories or zip files of extensions from the server.', )); diff --git a/language/sv/upload.php b/language/sv/upload.php index f6d4d65..459b40e 100644 --- a/language/sv/upload.php +++ b/language/sv/upload.php @@ -73,4 +73,16 @@ 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'Du har laddat upp en zip-fil för ett plugin som redan är istallerat. Detta plugin deaktiverades automatiskt för att säkerställa uppdateringsproceduren. Nu bör du kontrollera att de uppladdade filerna är korrekta och aktivera detta plugin om du fortfarande vill använda det i forumet.', 'VALID_PHPBB_EXTENSIONS' => 'phpbb.com CDB', + + '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_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_CLEANER' => 'Extension Cleaner tool', + 'UPLOAD_DESCRIPTION_CLEANER_ABOUT' => 'You can delete extension directories or zip files of extensions from the server.', )); diff --git a/migrations/configuration/add_zip_config.php b/migrations/configuration/add_zip_config.php index 0a3801d..a7de4e6 100644 --- a/migrations/configuration/add_zip_config.php +++ b/migrations/configuration/add_zip_config.php @@ -24,7 +24,25 @@ static public function depends_on() public function update_data() { return array( - array('config.add', array('upload_ext_dir', 'ext')), + 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'; + } + } + + return $directory; + } } From 96afa823bd1cfdfdc314fc64c1a52712c4c9bf61 Mon Sep 17 00:00:00 2001 From: lavigor Date: Thu, 15 Jan 2015 22:37:47 +0300 Subject: [PATCH 09/22] A fix for self-update feature. --- acp/upload_module.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/acp/upload_module.php b/acp/upload_module.php index ba7b49d..9555b7c 100644 --- a/acp/upload_module.php +++ b/acp/upload_module.php @@ -873,16 +873,9 @@ function upload_ext($action) // Now Upload Extensions will update itself. We suppose that it will be fast and without errors. // Otherwise users will need to use FTP. $phpbb_extension_manager->disable($destination); - if (!($this->rcopy($source, $phpbb_root_path . 'ext/' . $destination))) - { - $this->rrmdir($phpbb_root_path . 'ext/' . $ext_tmp); - return false; - } + $this->rcopy($source, $phpbb_root_path . 'ext/' . $destination); $phpbb_extension_manager->enable($destination); - if (!($this->rrmdir($phpbb_root_path . 'ext/' . $ext_tmp))) - { - return false; - } + $this->rrmdir($phpbb_root_path . 'ext/' . $ext_tmp); $template->assign_vars(array( 'S_UPDATED_SELF' => $display_name, )); From 66da35e31da43e3ea07ed2b410202e3d11ac7b5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?phpBB=20Espa=C3=B1a?= Date: Sat, 17 Jan 2015 12:51:25 +0100 Subject: [PATCH 10/22] Update upload.php Update new lines... ;) --- language/es/upload.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/language/es/upload.php b/language/es/upload.php index 1b5d3e4..4c7104b 100644 --- a/language/es/upload.php +++ b/language/es/upload.php @@ -20,11 +20,11 @@ $lang = array_merge($lang, array( 'ACP_UPLOAD_EXT_TITLE' => 'Subir Extensiones', 'ACP_UPLOAD_EXT_CONFIG_TITLE' => 'Subir Extensiones', - 'ACP_UPLOAD_EXT_TITLE_EXPLAIN' => 'Upload Extensions le permite subir archivos zip de extensiones o eliminar extensiones de carpetas del servidor.
    Con esta extensión puede instalar/actualizar/borras extensiones sin utilizar FTP. Si ya existe la extensión subida, se actualizará con los archivos subidos.', + 'ACP_UPLOAD_EXT_TITLE_EXPLAIN' => 'Subir Extensiones le permite subir archivos zip de extensiones o eliminar extensiones de carpetas del servidor.
    Con esta extensión puede instalar/actualizar/borras extensiones sin utilizar FTP. Si ya existe la extensión subida, se actualizará con los archivos subidos.', 'UPLOAD' => 'Subir', 'BROWSE' => 'Navegar...', 'EXTENSION_UPLOAD' => 'Subir Extensión', - 'EXTENSION_UPLOAD_EXPLAIN' => 'Aquí puede cargar un paquete de extensión zip que contiene los archivos necesarios para realizar la instalación desde el equipo local o en un servidor remoto. “Upload Extensions” luego intentará descomprimir el archivo y tenerlo listo para la instalación.
    Elija un archivo o escriba un enlace en los campos de abajo.', + 'EXTENSION_UPLOAD_EXPLAIN' => 'Aquí puede cargar un paquete de extensión zip que contiene los archivos necesarios para realizar la instalación desde el equipo local o en un servidor remoto. “Subir Extensiones” luego intentará descomprimir el archivo y tenerlo listo para la instalación.
    Elija un archivo o escriba un enlace en los campos de abajo.', 'EXT_UPLOAD_INIT_FAIL' => 'Se ha producido un error al inicializar el proceso de subida de la extensión.', 'EXT_NOT_WRITABLE' => 'En el directorio ext/ no se puede escribir. Esto es requerido para que “Upload extension” funcione correctamente. Por favor, ajuste sus permisos y/o la configuración y vuelva a intentarlo.', 'EXT_UPLOAD_ERROR' => 'La extensión no se ha subido. Por favor, confirma que cargue el archivo de extensión zip verdadera y vuelva a intentarlo.', @@ -64,7 +64,7 @@ 'EXT_UPLOADED' => 'subidas', 'EXT_UPDATED' => 'actualizadas', 'EXT_UPDATED_LATEST_VERSION' => 'actualizadas a la última versión', - 'EXT_UPLOAD_BACK' => '« Volver a Upload Extensions', + 'EXT_UPLOAD_BACK' => '« Volver a Subir Extensiones', 'ACP_UPLOAD_EXT_DIR' => 'Ruta de almacenamiento de paquetes zip de extensiones', 'ACP_UPLOAD_EXT_DIR_EXPLAIN' => 'Ruta desde el directorio phpBB, por ejemplo ext.
    Puede cambiar esta ruta para almacenar los paquetes zip en una carpeta especial (por ejemplo, si desea permitir que los usuarios descargan los archivos, puede cambiarlo a descargas, y si desea prohibir esas descargas, se puede cambiar a la ruta raíz del http a un ni9vel superior de su sitio web (o puede crear una carpeta con el archivo .htaccess apropiado)).', @@ -72,17 +72,17 @@ 'ACP_UPLOAD_EXT_UPDATED' => 'La extensión instalada se ha actualizado.', 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'Ha subido un archivo zip para una extensión ya instalada. La extensión ha sido deshabilitada automáticamente para hacer más seguro el proceso de actualización. Ahora por favor compruebe si los archivos subidos son correctos y haga clic en habilitar la extensión si todavía quiere utilizarla en el foro.', - 'VALID_PHPBB_EXTENSIONS' => 'phpbb.com CDB', + 'VALID_PHPBB_EXTENSIONS' => 'CDB de phpBB.com', - '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_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_CLEANER' => 'Extension Cleaner tool', - 'UPLOAD_DESCRIPTION_CLEANER_ABOUT' => 'You can delete extension directories or zip files of extensions from the server.', + 'UPLOAD_DESCRIPTION_UPLOAD' => 'Subir extensiones de phpBB', + 'UPLOAD_DESCRIPTION_UPLOAD_CDB' => 'CDB de phpBB.com', + 'UPLOAD_DESCRIPTION_UPLOAD_LOCAL' => 'PC local', + 'UPLOAD_DESCRIPTION_UPLOAD_REMOTE' => 'Servidor remoto', + 'UPLOAD_DESCRIPTION_UPDATE' => 'Subir extensiones phpBB', + 'UPLOAD_DESCRIPTION_UPDATE_ABOUT' => 'Puede actualizar cualquiera de las extensiones ya subidas. La extensión que desea actualizar se desactivará automáticamente para que las actualizaciones esten a salvo.', + 'UPLOAD_DESCRIPTION_ZIP' => 'Gestión de archivos ZIP', + 'UPLOAD_DESCRIPTION_ZIP_SAVE' => 'Guardar zips en un directorio que elija', + 'UPLOAD_DESCRIPTION_ZIP_UNPACK' => 'Descomprimir un archivo zip para instalar la extensión', + 'UPLOAD_DESCRIPTION_CLEANER' => 'Herramienta limpiadora de extensión', + 'UPLOAD_DESCRIPTION_CLEANER_ABOUT' => 'Puede eliminar los directorios de extensiones o archivos zip de extensiones del servidor.', )); From aa7de8b5f0783b050ee7ad1424b20dbbc9847906 Mon Sep 17 00:00:00 2001 From: lavigor Date: Sat, 17 Jan 2015 20:41:21 +0300 Subject: [PATCH 11/22] Structure fixes. Some new files added. Composer is used for dependencies now. A letter 'v' is translatable now. A fix for RTL languages. --- .gitattributes | 12 + .gitignore | 1 + acp/upload_module.php | 10 +- adm/style/acp_ext_details.html | 2 +- adm/style/acp_upload.html | 2 +- adm/style/css/upload.css | 12 +- composer.json | 4 +- composer.lock | 121 ++++++ .../filetree/filedownload.php | 3 + {vendor => includes}/filetree/filetree.php | 14 +- language/ar/upload.php | 1 + language/de/upload.php | 1 + language/en/upload.php | 1 + language/es/upload.php | 1 + language/et/upload.php | 1 + language/fa/upload.php | 1 + language/fr/upload.php | 1 + language/it/upload.php | 1 + language/nl/upload.php | 1 + language/ru/upload.php | 1 + language/sv/upload.php | 1 + vendor/autoload.php | 7 + vendor/composer/ClassLoader.php | 387 ++++++++++++++++++ vendor/composer/autoload_classmap.php | 9 + vendor/composer/autoload_namespaces.php | 10 + vendor/composer/autoload_psr4.php | 9 + vendor/composer/autoload_real.php | 50 +++ vendor/composer/installed.json | 105 +++++ vendor/fortawesome/font-awesome/README.md | 85 ++++ vendor/fortawesome/font-awesome/composer.json | 27 ++ .../font-awesome/css/font-awesome.min.css | 0 .../font-awesome/fonts/FontAwesome.otf | Bin .../fonts/fontawesome-webfont.eot | Bin .../fonts/fontawesome-webfont.svg | 0 .../fonts/fontawesome-webfont.ttf | Bin .../fonts/fontawesome-webfont.woff | Bin .../php-markdown}/License.md | 0 .../php-markdown}/Michelf/Markdown.inc.php | 0 .../php-markdown}/Michelf/Markdown.php | 0 .../Michelf/MarkdownExtra.inc.php | 0 .../php-markdown}/Michelf/MarkdownExtra.php | 0 .../Michelf/MarkdownInterface.inc.php | 0 .../Michelf/MarkdownInterface.php | 0 .../php-markdown}/Readme.md | 11 + .../php-markdown}/Readme.php | 0 .../php-markdown}/composer.json | 0 46 files changed, 874 insertions(+), 18 deletions(-) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 composer.lock rename {vendor => includes}/filetree/filedownload.php (96%) rename {vendor => includes}/filetree/filetree.php (97%) create mode 100644 vendor/autoload.php create mode 100644 vendor/composer/ClassLoader.php create mode 100644 vendor/composer/autoload_classmap.php create mode 100644 vendor/composer/autoload_namespaces.php create mode 100644 vendor/composer/autoload_psr4.php create mode 100644 vendor/composer/autoload_real.php create mode 100644 vendor/composer/installed.json create mode 100644 vendor/fortawesome/font-awesome/README.md create mode 100644 vendor/fortawesome/font-awesome/composer.json rename vendor/{ => fortawesome}/font-awesome/css/font-awesome.min.css (100%) rename vendor/{ => fortawesome}/font-awesome/fonts/FontAwesome.otf (100%) rename vendor/{ => fortawesome}/font-awesome/fonts/fontawesome-webfont.eot (100%) rename vendor/{ => fortawesome}/font-awesome/fonts/fontawesome-webfont.svg (100%) rename vendor/{ => fortawesome}/font-awesome/fonts/fontawesome-webfont.ttf (100%) rename vendor/{ => fortawesome}/font-awesome/fonts/fontawesome-webfont.woff (100%) rename vendor/{Markdown => michelf/php-markdown}/License.md (100%) rename vendor/{Markdown => michelf/php-markdown}/Michelf/Markdown.inc.php (100%) rename vendor/{Markdown => michelf/php-markdown}/Michelf/Markdown.php (100%) rename vendor/{Markdown => michelf/php-markdown}/Michelf/MarkdownExtra.inc.php (100%) rename vendor/{Markdown => michelf/php-markdown}/Michelf/MarkdownExtra.php (100%) rename vendor/{Markdown => michelf/php-markdown}/Michelf/MarkdownInterface.inc.php (100%) rename vendor/{Markdown => michelf/php-markdown}/Michelf/MarkdownInterface.php (100%) rename vendor/{Markdown => michelf/php-markdown}/Readme.md (96%) rename vendor/{Markdown => michelf/php-markdown}/Readme.php (100%) rename vendor/{Markdown => michelf/php-markdown}/composer.json (100%) diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..97b3726 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,12 @@ +############################################################################### +# 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 new file mode 100644 index 0000000..b25c15b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*~ diff --git a/acp/upload_module.php b/acp/upload_module.php index 9555b7c..2a200f4 100644 --- a/acp/upload_module.php +++ b/acp/upload_module.php @@ -8,6 +8,7 @@ */ namespace boardtools\upload\acp; +use \Michelf\MarkdownExtra; class upload_module { @@ -40,7 +41,7 @@ function main($id, $mode) $this->back_link = ($request->is_ajax()) ? '' : adm_back_link($this->u_action); $this->phpbb_link_template = '#^(https://)www.phpbb.com/customise/db/download/([0-9]*?)(\?sid\=[a-zA-Z0-9]*?)?$#i'; - include($phpbb_root_path . 'ext/boardtools/upload/vendor/filetree/filetree.' . $phpEx); + include($phpbb_root_path . 'ext/boardtools/upload/includes/filetree/filetree.' . $phpEx); $file = $request->variable('file', ''); if ($file != '') { @@ -165,7 +166,7 @@ function main($id, $mode) $mimetype = 'application/zip'; - include($phpbb_root_path . 'ext/boardtools/upload/vendor/filetree/filedownload.' . $phpEx); + include($phpbb_root_path . 'ext/boardtools/upload/includes/filetree/filedownload.' . $phpEx); if (!(\filedownload::download_file($filename, $download_name, $mimetype))) { @@ -458,14 +459,14 @@ protected function sort_extension_meta_data_table($val1, $val2) function get_valid_extensions() { - global $template; + global $template, $user; $valid_phpbb_ext = $file_contents = $metadata = ''; if (($file_contents = @file_get_contents('http://forumhulp.com/ext/phpbb.json')) && ($metadata = @json_decode($file_contents, true)) && is_array($metadata) && sizeof($metadata)) { foreach($metadata as $ext => $value) { - $valid_phpbb_ext .= ''; + $valid_phpbb_ext .= ''; } $template->assign_vars(array('VALID_PHPBB_EXT' => $valid_phpbb_ext)); } @@ -892,7 +893,6 @@ function upload_ext($action) $string = @file_get_contents($phpbb_root_path . 'ext/' . $destination . '/README.md'); if ($string !== false) { - include($phpbb_root_path . 'ext/boardtools/upload/vendor/Markdown/Michelf/MarkdownExtra.inc.' . $phpEx); $readme = \Michelf\MarkdownExtra::defaultTransform($string); } else { $readme = false; diff --git a/adm/style/acp_ext_details.html b/adm/style/acp_ext_details.html index 05fd899..7f4829d 100644 --- a/adm/style/acp_ext_details.html +++ b/adm/style/acp_ext_details.html @@ -2,7 +2,7 @@ - + diff --git a/adm/style/acp_upload.html b/adm/style/acp_upload.html index 7dfe294..b498c20 100644 --- a/adm/style/acp_upload.html +++ b/adm/style/acp_upload.html @@ -1,7 +1,7 @@ - + diff --git a/adm/style/css/upload.css b/adm/style/css/upload.css index 58f451a..5a4eb2a 100644 --- a/adm/style/css/upload.css +++ b/adm/style/css/upload.css @@ -50,14 +50,8 @@ h1 {position: relative;} background: -ms-linear-gradient(top, #92d992 0%, #228822 100%); background: linear-gradient(to bottom, #92d992 0%, #228822 100%); } + #enable_uploaded:hover { - display: inline-block; - float: right; - padding: 6px 15px; - border-radius: 15px; - color: #edfbf7; - font-weight: bold; - font-size: 1.1em; background: #228822; background: -moz-linear-gradient(top, #228822 0%, #92d992 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #228822), color-stop(100%, #92d992)); @@ -67,6 +61,10 @@ h1 {position: relative;} background: linear-gradient(to bottom, #228822 0%, #92d992 100%); } +.rtl #enable_uploaded { + float: left; +} + #back_to_upload {display:block; margin-bottom:15px;} .ext_updated_notice {width: 100%; background-color: #fdfcd3; box-sizing: border-box; color: #706e25; display: block;} diff --git a/composer.json b/composer.json index 176206f..c04b031 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,9 @@ } ], "require": { - "php": ">=5.3.3" + "php": ">=5.3.3", + "michelf/php-markdown": "~1.4", + "fortawesome/font-awesome": "~4.2" }, "require-dev": { "phpbb/epv": "dev-master" diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..8180013 --- /dev/null +++ b/composer.lock @@ -0,0 +1,121 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "hash": "5fc9db4b5fc7353dc86ef024b7682c3a", + "packages": [ + { + "name": "fortawesome/font-awesome", + "version": "v4.2.0", + "source": { + "type": "git", + "url": "https://github.com/FortAwesome/Font-Awesome.git", + "reference": "a65bd93d81e9e6bd5ebfa41757a4474960b973b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FortAwesome/Font-Awesome/zipball/a65bd93d81e9e6bd5ebfa41757a4474960b973b4", + "reference": "a65bd93d81e9e6bd5ebfa41757a4474960b973b4", + "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": "2014-08-26 16:36:44" + }, + { + "name": "michelf/php-markdown", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/michelf/php-markdown.git", + "reference": "de9a19c7bf352d41cc99ed86c3c0ef17e87394b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/michelf/php-markdown/zipball/de9a19c7bf352d41cc99ed86c3c0ef17e87394b6", + "reference": "de9a19c7bf352d41cc99ed86c3c0ef17e87394b6", + "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": "Michel Fortin", + "email": "michel.fortin@michelf.ca", + "homepage": "http://michelf.ca/", + "role": "Developer" + }, + { + "name": "John Gruber", + "homepage": "http://daringfireball.net/" + } + ], + "description": "PHP Markdown", + "homepage": "http://michelf.ca/projects/php-markdown/", + "keywords": [ + "markdown" + ], + "time": "2014-05-05 02:43:50" + } + ], + "packages-dev": null, + "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/vendor/filetree/filedownload.php b/includes/filetree/filedownload.php similarity index 96% rename from vendor/filetree/filedownload.php rename to includes/filetree/filedownload.php index fb67152..5d9c0fe 100644 --- a/vendor/filetree/filedownload.php +++ b/includes/filetree/filedownload.php @@ -20,6 +20,9 @@ public static function download_file($filename, $download_name, $mimetype) { while ($buffer = fread($fp, 1024)) { + /** + * @ignore + */ echo $buffer; } fclose($fp); diff --git a/vendor/filetree/filetree.php b/includes/filetree/filetree.php similarity index 97% rename from vendor/filetree/filetree.php rename to includes/filetree/filetree.php index bc257f2..0762d20 100644 --- a/vendor/filetree/filetree.php +++ b/includes/filetree/filetree.php @@ -14,7 +14,9 @@ public static function get_file($file) if ($file != '') { $string = file_get_contents($file); + /** @ignore */ echo '
    ' . substr($file, strrpos($file, '/') + 1) . '
    ' . highlight_string($string, true) . '
    '; + /** @ignore */ exit(); } return false; @@ -38,7 +40,9 @@ public static function php_file_tree_dir($directory, $uaction, $extensions = arr if (function_exists('scandir')) { $file = scandir($directory); - } else { + } + else + { $file = php4_scandir($directory); } natcasesort($file); @@ -50,7 +54,9 @@ public static function php_file_tree_dir($directory, $uaction, $extensions = arr if (is_dir($directory . '/' . $this_file)) { $dirs[] = $this_file; - } else { + } + else + { $files[] = $this_file; } } @@ -92,7 +98,9 @@ public static function php_file_tree_dir($directory, $uaction, $extensions = arr $php_file_tree .= '
  • ' . htmlspecialchars($this_file) . ''; $php_file_tree .= \filetree::php_file_tree_dir($directory . '/' . $this_file, $uaction, $extensions, false); $php_file_tree .= '
  • '; - } else { + } + 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); diff --git a/language/ar/upload.php b/language/ar/upload.php index fefb679..c0c0c2c 100644 --- a/language/ar/upload.php +++ b/language/ar/upload.php @@ -74,6 +74,7 @@ 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'لقد قمت برفع ملف مضغوط لإضافة موجودة مُسبقاً. تم تعطيل تلك الإضافة تلقائياً لتنفيذ عملية التحديث بصورة آمنة. نرجوا الآن التأكد من صحة عمل الإضافة و تفعيلها اذا تريد ذلك.', 'VALID_PHPBB_EXTENSIONS' => 'الإضافات المُعتمدة', + 'EXT_VERSION_LETTER' => 'v', 'UPLOAD_DESCRIPTION_UPLOAD' => 'Upload phpBB extensions', 'UPLOAD_DESCRIPTION_UPLOAD_CDB' => 'CDB on phpbb.com', diff --git a/language/de/upload.php b/language/de/upload.php index 56a88fb..0afbc5b 100644 --- a/language/de/upload.php +++ b/language/de/upload.php @@ -73,6 +73,7 @@ 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'Du hast ein Zip-Archiv zu einer bereits installierten Erweiterung hochgeladen. Diese Erweiterung wurde automatisch deaktiviert um eine sichere Aktualiserung zu gewährleisten. Bitte kontrolliere, daß die hochgeladenen Daten korrekt sind und aktiviere danach die Erweiterung.', 'VALID_PHPBB_EXTENSIONS' => 'phpbb.com CDB', + 'EXT_VERSION_LETTER' => 'v', 'UPLOAD_DESCRIPTION_UPLOAD' => 'Upload phpBB extensions', 'UPLOAD_DESCRIPTION_UPLOAD_CDB' => 'CDB on phpbb.com', diff --git a/language/en/upload.php b/language/en/upload.php index 19ee35d..fcfa473 100644 --- a/language/en/upload.php +++ b/language/en/upload.php @@ -73,6 +73,7 @@ '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.', 'VALID_PHPBB_EXTENSIONS' => 'phpbb.com CDB', + 'EXT_VERSION_LETTER' => 'v', 'UPLOAD_DESCRIPTION_UPLOAD' => 'Upload phpBB extensions', 'UPLOAD_DESCRIPTION_UPLOAD_CDB' => 'CDB on phpbb.com', diff --git a/language/es/upload.php b/language/es/upload.php index 4c7104b..b557433 100644 --- a/language/es/upload.php +++ b/language/es/upload.php @@ -73,6 +73,7 @@ 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'Ha subido un archivo zip para una extensión ya instalada. La extensión ha sido deshabilitada automáticamente para hacer más seguro el proceso de actualización. Ahora por favor compruebe si los archivos subidos son correctos y haga clic en habilitar la extensión si todavía quiere utilizarla en el foro.', 'VALID_PHPBB_EXTENSIONS' => 'CDB de phpBB.com', + 'EXT_VERSION_LETTER' => 'v', 'UPLOAD_DESCRIPTION_UPLOAD' => 'Subir extensiones de phpBB', 'UPLOAD_DESCRIPTION_UPLOAD_CDB' => 'CDB de phpBB.com', diff --git a/language/et/upload.php b/language/et/upload.php index 87bc91a..4f96db0 100644 --- a/language/et/upload.php +++ b/language/et/upload.php @@ -73,6 +73,7 @@ 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'Sa oled üles laadinud juba olemas oleva laienduse zip faili. Antud laiendus keelati automaatselt, et teha uuendamise protsess ohutumaks. Nüüd palun kontrolli kas üles laaditud failid oli õiged, ning luba laiendus, kui on see kasutusel foorumis.', 'VALID_PHPBB_EXTENSIONS' => 'phpbb.com CDB', + 'EXT_VERSION_LETTER' => 'v', 'UPLOAD_DESCRIPTION_UPLOAD' => 'Upload phpBB extensions', 'UPLOAD_DESCRIPTION_UPLOAD_CDB' => 'CDB on phpbb.com', diff --git a/language/fa/upload.php b/language/fa/upload.php index 8d6b74d..96410ed 100644 --- a/language/fa/upload.php +++ b/language/fa/upload.php @@ -74,6 +74,7 @@ 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'شما فایل زیپ شده ای برای به روز رسانی افزونه مورد نظر آپلود کرده اید. افزونه به صورت خودکار غیر فعال شده تا به صورت امن به روز رسانی انجام شود. حالا لطفا بررسی کنید فایل آپلود شده صحیح می باشد و فعال کنید افزونه مورد نظر را جهت استفاده در انجمن', 'VALID_PHPBB_EXTENSIONS' => 'phpbb.com CDB', + 'EXT_VERSION_LETTER' => 'v', 'UPLOAD_DESCRIPTION_UPLOAD' => 'Upload phpBB extensions', 'UPLOAD_DESCRIPTION_UPLOAD_CDB' => 'CDB on phpbb.com', diff --git a/language/fr/upload.php b/language/fr/upload.php index ba2cb2d..e629561 100644 --- a/language/fr/upload.php +++ b/language/fr/upload.php @@ -74,6 +74,7 @@ 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'Vous avez transféré une archive pour une extension déjà installée. Cette extension a été désactivée automatiquement pour assurer une mise à jour plus sûre. Veuillez maintenant vérifier si l’archive transférée est correcte puis activer l’extension si vous souhaitez toujours l’utiliser sur votre forum.', 'VALID_PHPBB_EXTENSIONS' => 'phpbb.com CDB', + 'EXT_VERSION_LETTER' => 'v', 'UPLOAD_DESCRIPTION_UPLOAD' => 'Upload phpBB extensions', 'UPLOAD_DESCRIPTION_UPLOAD_CDB' => 'CDB on phpbb.com', diff --git a/language/it/upload.php b/language/it/upload.php index 3763ea9..6245811 100644 --- a/language/it/upload.php +++ b/language/it/upload.php @@ -73,6 +73,7 @@ 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'È stata caricata un\'estensione già installata. Quest\'estensione è stata automaticamente disabilitata per la sicurezza del processo di aggiornamento. Controllare la correttezza dei file caricati e riabilitare l\'estensione qualora debba ancora essere usata.', 'VALID_PHPBB_EXTENSIONS' => 'Archivio ufficiale phpbb.com', + 'EXT_VERSION_LETTER' => 'v', 'UPLOAD_DESCRIPTION_UPLOAD' => 'Upload phpBB extensions', 'UPLOAD_DESCRIPTION_UPLOAD_CDB' => 'CDB on phpbb.com', diff --git a/language/nl/upload.php b/language/nl/upload.php index 2d0f35d..0e08cf5 100644 --- a/language/nl/upload.php +++ b/language/nl/upload.php @@ -73,6 +73,7 @@ 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'Je hebt een zip bestand geüpload voor een extensie die al geïnstalleerd is. Deze extensie is automatisch uitgeschakeld om het update proces veiliger te maken. Controleer nu of de geüploade bestanden juist zijn en schakel de extensie in als het gebruikt wordt op het forum.', 'VALID_PHPBB_EXTENSIONS' => 'phpbb.com CDB', + 'EXT_VERSION_LETTER' => 'v', 'UPLOAD_DESCRIPTION_UPLOAD' => 'Upload phpBB extensions', 'UPLOAD_DESCRIPTION_UPLOAD_CDB' => 'CDB on phpbb.com', diff --git a/language/ru/upload.php b/language/ru/upload.php index 1d29446..f8d0c34 100644 --- a/language/ru/upload.php +++ b/language/ru/upload.php @@ -73,6 +73,7 @@ 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'Вы загрузили zip файл для установленного ранее расширения. Это расширение было автоматически отключено, чтобы сделать процесс обновления безопаснее. Теперь, пожалуйста, проверьте корректность загруженных файлов и включите расширение, если оно всё ещё должно использоваться на конференции.', 'VALID_PHPBB_EXTENSIONS' => 'phpbb.com CDB', + 'EXT_VERSION_LETTER' => 'v', 'UPLOAD_DESCRIPTION_UPLOAD' => 'Upload phpBB extensions', 'UPLOAD_DESCRIPTION_UPLOAD_CDB' => 'CDB on phpbb.com', diff --git a/language/sv/upload.php b/language/sv/upload.php index 459b40e..4191d33 100644 --- a/language/sv/upload.php +++ b/language/sv/upload.php @@ -73,6 +73,7 @@ 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'Du har laddat upp en zip-fil för ett plugin som redan är istallerat. Detta plugin deaktiverades automatiskt för att säkerställa uppdateringsproceduren. Nu bör du kontrollera att de uppladdade filerna är korrekta och aktivera detta plugin om du fortfarande vill använda det i forumet.', 'VALID_PHPBB_EXTENSIONS' => 'phpbb.com CDB', + 'EXT_VERSION_LETTER' => 'v', 'UPLOAD_DESCRIPTION_UPLOAD' => 'Upload phpBB extensions', 'UPLOAD_DESCRIPTION_UPLOAD_CDB' => 'CDB on phpbb.com', diff --git a/vendor/autoload.php b/vendor/autoload.php new file mode 100644 index 0000000..cd0b0dd --- /dev/null +++ b/vendor/autoload.php @@ -0,0 +1,7 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0 class loader + * + * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md + * + * $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 + */ +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(); + + 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; + } + + /** + * 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]; + } + + $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/autoload_classmap.php b/vendor/composer/autoload_classmap.php new file mode 100644 index 0000000..7a91153 --- /dev/null +++ b/vendor/composer/autoload_classmap.php @@ -0,0 +1,9 @@ + array($vendorDir . '/michelf/php-markdown'), +); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php new file mode 100644 index 0000000..b265c64 --- /dev/null +++ b/vendor/composer/autoload_psr4.php @@ -0,0 +1,9 @@ + $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; + } +} + +function composerRequire42d6fa13eac80c5a74932e9288b4b9d9($file) +{ + require $file; +} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json new file mode 100644 index 0000000..96cbc30 --- /dev/null +++ b/vendor/composer/installed.json @@ -0,0 +1,105 @@ +[ + { + "name": "fortawesome/font-awesome", + "version": "v4.2.0", + "version_normalized": "4.2.0.0", + "source": { + "type": "git", + "url": "https://github.com/FortAwesome/Font-Awesome.git", + "reference": "a65bd93d81e9e6bd5ebfa41757a4474960b973b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FortAwesome/Font-Awesome/zipball/a65bd93d81e9e6bd5ebfa41757a4474960b973b4", + "reference": "a65bd93d81e9e6bd5ebfa41757a4474960b973b4", + "shasum": "" + }, + "require-dev": { + "jekyll": "1.0.2", + "lessc": "1.4.2" + }, + "time": "2014-08-26 16:36:44", + "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" + ] + }, + { + "name": "michelf/php-markdown", + "version": "1.4.1", + "version_normalized": "1.4.1.0", + "source": { + "type": "git", + "url": "https://github.com/michelf/php-markdown.git", + "reference": "de9a19c7bf352d41cc99ed86c3c0ef17e87394b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/michelf/php-markdown/zipball/de9a19c7bf352d41cc99ed86c3c0ef17e87394b6", + "reference": "de9a19c7bf352d41cc99ed86c3c0ef17e87394b6", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2014-05-05 02:43:50", + "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": "Michel Fortin", + "email": "michel.fortin@michelf.ca", + "homepage": "http://michelf.ca/", + "role": "Developer" + }, + { + "name": "John Gruber", + "homepage": "http://daringfireball.net/" + } + ], + "description": "PHP Markdown", + "homepage": "http://michelf.ca/projects/php-markdown/", + "keywords": [ + "markdown" + ] + } +] diff --git a/vendor/fortawesome/font-awesome/README.md b/vendor/fortawesome/font-awesome/README.md new file mode 100644 index 0000000..38a20b3 --- /dev/null +++ b/vendor/fortawesome/font-awesome/README.md @@ -0,0 +1,85 @@ +#[Font Awesome v4.2.0](http://fontawesome.io) +###The iconic font and CSS framework + +Font Awesome is a full suite of 479 pictographic icons for easy scalable vector graphics on websites, +created and maintained by [Dave Gandy](http://twitter.com/davegandy). +Stay up to date [@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 +- v3.0.0 - all icons redesigned from scratch, optimized for Bootstrap's 14px default +- v3.0.1 - much improved rendering in webkit, various bug fixes +- v3.0.2 - much improved rendering and alignment in IE7 +- v3.1.0 - Added 54 icons, icon stacking styles, flipping and rotating icons, removed SASS support +- [v3.1.1 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=4&page=1&state=closed) +- [v3.2.0 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=3&page=1&state=closed) +- [v3.2.1 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=5&page=1&state=closed) +- [v4.0.0 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=2&page=1&state=closed) +- [v4.0.1 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=7&page=1&state=closed) +- [v4.0.2 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=8&page=1&state=closed) +- [v4.0.3 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=9&page=1&state=closed) +- [v4.1.0 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=6&page=1&state=closed) +- [v4.2.0 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=12&page=1&state=closed) + +## 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 + +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 serve diff --git a/vendor/fortawesome/font-awesome/composer.json b/vendor/fortawesome/font-awesome/composer.json new file mode 100644 index 0000000..f1b9f37 --- /dev/null +++ b/vendor/fortawesome/font-awesome/composer.json @@ -0,0 +1,27 @@ +{ + "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/font-awesome/css/font-awesome.min.css b/vendor/fortawesome/font-awesome/css/font-awesome.min.css similarity index 100% rename from vendor/font-awesome/css/font-awesome.min.css rename to vendor/fortawesome/font-awesome/css/font-awesome.min.css diff --git a/vendor/font-awesome/fonts/FontAwesome.otf b/vendor/fortawesome/font-awesome/fonts/FontAwesome.otf similarity index 100% rename from vendor/font-awesome/fonts/FontAwesome.otf rename to vendor/fortawesome/font-awesome/fonts/FontAwesome.otf diff --git a/vendor/font-awesome/fonts/fontawesome-webfont.eot b/vendor/fortawesome/font-awesome/fonts/fontawesome-webfont.eot similarity index 100% rename from vendor/font-awesome/fonts/fontawesome-webfont.eot rename to vendor/fortawesome/font-awesome/fonts/fontawesome-webfont.eot diff --git a/vendor/font-awesome/fonts/fontawesome-webfont.svg b/vendor/fortawesome/font-awesome/fonts/fontawesome-webfont.svg similarity index 100% rename from vendor/font-awesome/fonts/fontawesome-webfont.svg rename to vendor/fortawesome/font-awesome/fonts/fontawesome-webfont.svg diff --git a/vendor/font-awesome/fonts/fontawesome-webfont.ttf b/vendor/fortawesome/font-awesome/fonts/fontawesome-webfont.ttf similarity index 100% rename from vendor/font-awesome/fonts/fontawesome-webfont.ttf rename to vendor/fortawesome/font-awesome/fonts/fontawesome-webfont.ttf diff --git a/vendor/font-awesome/fonts/fontawesome-webfont.woff b/vendor/fortawesome/font-awesome/fonts/fontawesome-webfont.woff similarity index 100% rename from vendor/font-awesome/fonts/fontawesome-webfont.woff rename to vendor/fortawesome/font-awesome/fonts/fontawesome-webfont.woff diff --git a/vendor/Markdown/License.md b/vendor/michelf/php-markdown/License.md similarity index 100% rename from vendor/Markdown/License.md rename to vendor/michelf/php-markdown/License.md diff --git a/vendor/Markdown/Michelf/Markdown.inc.php b/vendor/michelf/php-markdown/Michelf/Markdown.inc.php similarity index 100% rename from vendor/Markdown/Michelf/Markdown.inc.php rename to vendor/michelf/php-markdown/Michelf/Markdown.inc.php diff --git a/vendor/Markdown/Michelf/Markdown.php b/vendor/michelf/php-markdown/Michelf/Markdown.php similarity index 100% rename from vendor/Markdown/Michelf/Markdown.php rename to vendor/michelf/php-markdown/Michelf/Markdown.php diff --git a/vendor/Markdown/Michelf/MarkdownExtra.inc.php b/vendor/michelf/php-markdown/Michelf/MarkdownExtra.inc.php similarity index 100% rename from vendor/Markdown/Michelf/MarkdownExtra.inc.php rename to vendor/michelf/php-markdown/Michelf/MarkdownExtra.inc.php diff --git a/vendor/Markdown/Michelf/MarkdownExtra.php b/vendor/michelf/php-markdown/Michelf/MarkdownExtra.php similarity index 100% rename from vendor/Markdown/Michelf/MarkdownExtra.php rename to vendor/michelf/php-markdown/Michelf/MarkdownExtra.php diff --git a/vendor/Markdown/Michelf/MarkdownInterface.inc.php b/vendor/michelf/php-markdown/Michelf/MarkdownInterface.inc.php similarity index 100% rename from vendor/Markdown/Michelf/MarkdownInterface.inc.php rename to vendor/michelf/php-markdown/Michelf/MarkdownInterface.inc.php diff --git a/vendor/Markdown/Michelf/MarkdownInterface.php b/vendor/michelf/php-markdown/Michelf/MarkdownInterface.php similarity index 100% rename from vendor/Markdown/Michelf/MarkdownInterface.php rename to vendor/michelf/php-markdown/Michelf/MarkdownInterface.php diff --git a/vendor/Markdown/Readme.md b/vendor/michelf/php-markdown/Readme.md similarity index 96% rename from vendor/Markdown/Readme.md rename to vendor/michelf/php-markdown/Readme.md index 8f31978..0bccd69 100644 --- a/vendor/Markdown/Readme.md +++ b/vendor/michelf/php-markdown/Readme.md @@ -160,6 +160,17 @@ 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 --------------- diff --git a/vendor/Markdown/Readme.php b/vendor/michelf/php-markdown/Readme.php similarity index 100% rename from vendor/Markdown/Readme.php rename to vendor/michelf/php-markdown/Readme.php diff --git a/vendor/Markdown/composer.json b/vendor/michelf/php-markdown/composer.json similarity index 100% rename from vendor/Markdown/composer.json rename to vendor/michelf/php-markdown/composer.json From 9f5514e3b4b58b02a13cced3bc125a158be73266 Mon Sep 17 00:00:00 2001 From: lavigor Date: Sat, 17 Jan 2015 20:53:07 +0300 Subject: [PATCH 12/22] Fix #21. Estonian language updated. --- language/et/upload.php | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/language/et/upload.php b/language/et/upload.php index 4f96db0..a408b73 100644 --- a/language/et/upload.php +++ b/language/et/upload.php @@ -1,11 +1,11 @@ 'Üles laaditud zip fail ei ole phpBB laiendus. Faili ei salvestatud serverisse.', 'EXTENSION_UPLOADED' => 'Laiendus “%s” on edukalt üles laaditud.', - 'EXTENSIONS_AVAILABLE' => 'Saadaval laiendused', + 'EXTENSIONS_AVAILABLE' => 'Üleslaaditud, ning aktiveerimist ootavad laiendused', 'EXTENSION_INVALID_LIST' => 'Laienduste nimekiri', 'EXTENSION_UPLOADED_ENABLE' => 'Luba üles laaditud laiendused', 'ACP_UPLOAD_EXT_UNPACK' => 'Paki laiendus lahti', @@ -58,7 +58,7 @@ 'SHOW_FILETREE' => '<< Näita faili puud >>', 'HIDE_FILETREE' => '>> Peida faili puu <<', - 'EXT_UPLOAD_SAVE_ZIP' => 'Salvesta üles laaditud zip fail', + 'EXT_UPLOAD_SAVE_ZIP' => 'Salvestan üles laaditud zip faili serverisse?', 'ZIP_UPLOADED' => 'zip arhiiv on üles laaditud', 'EXT_ENABLE' => 'Luba', 'EXT_UPLOADED' => 'üles laaditud', @@ -72,18 +72,18 @@ 'ACP_UPLOAD_EXT_UPDATED' => 'Paigaldatud laiendus on uuendatud.', 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'Sa oled üles laadinud juba olemas oleva laienduse zip faili. Antud laiendus keelati automaatselt, et teha uuendamise protsess ohutumaks. Nüüd palun kontrolli kas üles laaditud failid oli õiged, ning luba laiendus, kui on see kasutusel foorumis.', - 'VALID_PHPBB_EXTENSIONS' => 'phpbb.com CDB', + 'VALID_PHPBB_EXTENSIONS' => 'Laadi laiendus üles otse phpbb.com laienduste andmebaasist', 'EXT_VERSION_LETTER' => 'v', - '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_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_CLEANER' => 'Extension Cleaner tool', - 'UPLOAD_DESCRIPTION_CLEANER_ABOUT' => 'You can delete extension directories or zip files of extensions from the server.', + 'UPLOAD_DESCRIPTION_UPLOAD' => 'Laadi üles phpBB laiendus', + 'UPLOAD_DESCRIPTION_UPLOAD_CDB' => 'phpBB.com laienduste andmebaas', + 'UPLOAD_DESCRIPTION_UPLOAD_LOCAL' => 'Kohalik arvuti', + 'UPLOAD_DESCRIPTION_UPLOAD_REMOTE' => 'Remote server', + 'UPLOAD_DESCRIPTION_UPDATE' => 'Uuenda phpBB laiendusi', + 'UPLOAD_DESCRIPTION_UPDATE_ABOUT' => 'Sa saad uuendada kõiki juba üleslaaditud laiendusi. Laiendust, mida sa soovid uuendada keelatakse automaatselt, et uuendamine oleks ohutum.', + 'UPLOAD_DESCRIPTION_ZIP' => 'ZIP failide haldus', + 'UPLOAD_DESCRIPTION_ZIP_SAVE' => 'Salvesta zip failid enda poolt valitud kausta', + 'UPLOAD_DESCRIPTION_ZIP_UNPACK' => 'Paki lahti zip fail, et paigaldada laiendus', + 'UPLOAD_DESCRIPTION_CLEANER' => 'Laienduse puhastaja', + 'UPLOAD_DESCRIPTION_CLEANER_ABOUT' => 'Sa saad kustutada laienduse või selle zip faile oma serverist.', )); From d5c7b1ad4ea45fcb3a418dff7025326ef715b8e6 Mon Sep 17 00:00:00 2001 From: lavigor Date: Sat, 17 Jan 2015 20:56:32 +0300 Subject: [PATCH 13/22] A small indentation fix. --- language/et/upload.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/language/et/upload.php b/language/et/upload.php index a408b73..c8daeac 100644 --- a/language/et/upload.php +++ b/language/et/upload.php @@ -1,11 +1,11 @@ Date: Sat, 17 Jan 2015 21:35:12 +0300 Subject: [PATCH 14/22] Russian language update. --- language/ru/upload.php | 52 +++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/language/ru/upload.php b/language/ru/upload.php index f8d0c34..dc4b927 100644 --- a/language/ru/upload.php +++ b/language/ru/upload.php @@ -20,16 +20,16 @@ $lang = array_merge($lang, array( 'ACP_UPLOAD_EXT_TITLE' => 'Загрузка Расширений', 'ACP_UPLOAD_EXT_CONFIG_TITLE' => 'Загрузка расширений', - 'ACP_UPLOAD_EXT_TITLE_EXPLAIN' => 'Загрузка Расширений позволяет вам загружать zip файлы расширений или удалять папки расширений с сервера.
    Имея это расширение, вы можете устанавливать/обновлять/удалять расширения без использования FTP. Если загруженное вами расширение уже существует, его файлы будут заменены на загруженные вами.', + 'ACP_UPLOAD_EXT_TITLE_EXPLAIN' => 'Загрузка Расширений позволяет вам загружать ZIP-файлы расширений или удалять папки расширений с сервера.
    Имея это расширение, вы можете устанавливать/обновлять/удалять расширения без использования FTP. Если загруженное вами расширение уже существует, его файлы будут заменены на загруженные вами.', 'UPLOAD' => 'Загрузить', 'BROWSE' => 'Обзор...', 'EXTENSION_UPLOAD' => 'Загрузить расширение', - 'EXTENSION_UPLOAD_EXPLAIN' => 'Здесь вы можете загрузить со своего компьютера или с удалённого сервера zip файл расширения, содержащий необходимые файлы для установки. “Загрузка Расширений” попытается распаковать архив и подготовить его для установки.
    Выберите файл или укажите ссылку на источник в полях внизу.', + 'EXTENSION_UPLOAD_EXPLAIN' => 'Здесь вы можете загрузить со своего компьютера или с удалённого сервера ZIP-файл расширения, содержащий необходимые файлы для установки. “Загрузка Расширений” попытается распаковать архив и подготовить его для установки.
    Выберите файл или укажите ссылку на источник в полях внизу.', 'EXT_UPLOAD_INIT_FAIL' => 'В процессе инициализации загрузки расширения возникла ошибка.', 'EXT_NOT_WRITABLE' => 'Отсутствуют права на запись для папки ext/. Данные права необходимы для правильной загрузки расширений. Пожалуйста, исправьте права доступа или настройки и попробуйте снова.', - 'EXT_UPLOAD_ERROR' => 'Расширение не было загружено. Пожалуйста, убедитеть, что вы загружаете правильный zip файл расширения и попробуйте снова.', + 'EXT_UPLOAD_ERROR' => 'Расширение не было загружено. Пожалуйста, убедитеть, что вы загружаете правильный ZIP-файл расширения и попробуйте снова.', 'NO_UPLOAD_FILE' => 'Файл не задан или в процессе загрузки произошла ошибка.', - 'NOT_AN_EXTENSION' => 'Загруженный zip файл не является расширением phpBB. Файл не был сохранён на сервере.', + 'NOT_AN_EXTENSION' => 'Загруженный ZIP-файл не является расширением phpBB. Файл не был сохранён на сервере.', 'EXTENSION_UPLOADED' => 'Расширение “%s” загружено успешно.', 'EXTENSIONS_AVAILABLE' => 'Доступные расширения', @@ -43,13 +43,13 @@ 'EXT_DELETE_SUCCESS' => 'Расширение удалено успешно.', 'EXT_DELETE_ERROR' => 'Файл не задан или в процессе удаления произошла ошибка.', - 'EXTENSION_ZIP_DELETE' => 'Удалить zip файл', - 'EXTENSION_ZIP_DELETE_CONFIRM' => 'Вы уверены, что хотите удалить zip файл “%s”?', - 'EXT_ZIP_DELETE_SUCCESS' => 'Zip файл расширения удалён успешно.', + 'EXTENSION_ZIP_DELETE' => 'Удалить ZIP-файл', + 'EXTENSION_ZIP_DELETE_CONFIRM' => 'Вы уверены, что хотите удалить ZIP-файл “%s”?', + 'EXT_ZIP_DELETE_SUCCESS' => 'ZIP-файл расширения удалён успешно.', 'EXT_ZIP_DELETE_ERROR' => 'Файл не задан или в процессе удаления произошла ошибка.', - 'ACP_UPLOAD_EXT_ERROR_DEST' => 'Настройки расширения (имя поставщика и название расширения) некорректно заданы или отсутствуют в загруженном zip файле. Файл не был сохранён на сервере.', - 'ACP_UPLOAD_EXT_ERROR_COMP' => 'Файл composer.json не был найден в загруженном zip файле. Файл не был сохранён на сервере.', + 'ACP_UPLOAD_EXT_ERROR_DEST' => 'Настройки расширения (имя поставщика и название расширения) некорректно заданы или отсутствуют в загруженном ZIP-файле. Файл не был сохранён на сервере.', + 'ACP_UPLOAD_EXT_ERROR_COMP' => 'Файл composer.json не был найден в загруженном ZIP-файле. Файл не был сохранён на сервере.', 'ACP_UPLOAD_EXT_ERROR_NOT_SAVED' => 'Файл не был сохранён на сервере.', 'ACP_UPLOAD_EXT_WRONG_RESTORE' => 'В процессе обновления установленного расширения произошла ошибка. Попробуйте обновить его ещё раз.', @@ -58,32 +58,32 @@ 'SHOW_FILETREE' => '<< Показать дерево файлов >>', 'HIDE_FILETREE' => '>> Скрыть дерево файлов <<', - 'EXT_UPLOAD_SAVE_ZIP' => 'Сохранить загруженный zip файл', - 'ZIP_UPLOADED' => 'Загруженные zip файлы расширений', + 'EXT_UPLOAD_SAVE_ZIP' => 'Сохранить загруженный ZIP-файл', + 'ZIP_UPLOADED' => 'Загруженные ZIP-файлы расширений', 'EXT_ENABLE' => 'Включить', 'EXT_UPLOADED' => 'загружено', 'EXT_UPDATED' => 'обновлено', 'EXT_UPDATED_LATEST_VERSION' => 'обновлено до последней версии', 'EXT_UPLOAD_BACK' => '« Вернуться в Загрузку Расширений', - 'ACP_UPLOAD_EXT_DIR' => 'Путь к zip файлам расширений', - 'ACP_UPLOAD_EXT_DIR_EXPLAIN' => 'Путь относительно корневой папки phpBB. Например, ext.
    Вы можете изменить этот путь, чтобы хранить zip файлы в специальной папке (например, если вы хотите разрешить пользователям загружать эти файлы, вы можете изменить путь на downloads, а если вы хотите запретить такие скачивания, вы можете изменить данный путь на путь к папке, расположенной на один уровень выше корня сайта (или вы можете создать папку с нужным файлом .htaccess)).', + 'ACP_UPLOAD_EXT_DIR' => 'Путь к ZIP-файлам расширений', + 'ACP_UPLOAD_EXT_DIR_EXPLAIN' => 'Путь относительно корневой папки phpBB. Например, ext.
    Вы можете изменить этот путь, чтобы хранить ZIP-файлы в специальной папке (например, если вы хотите разрешить пользователям загружать эти файлы, вы можете изменить путь на downloads, а если вы хотите запретить такие скачивания, вы можете изменить данный путь на путь к папке, расположенной на один уровень выше корня сайта (или вы можете создать папку с нужным файлом .htaccess)).', 'ACP_UPLOAD_EXT_UPDATED' => 'Установленное расширение было обновлено.', - 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'Вы загрузили zip файл для установленного ранее расширения. Это расширение было автоматически отключено, чтобы сделать процесс обновления безопаснее. Теперь, пожалуйста, проверьте корректность загруженных файлов и включите расширение, если оно всё ещё должно использоваться на конференции.', + 'ACP_UPLOAD_EXT_UPDATED_EXPLAIN' => 'Вы загрузили ZIP-файл для установленного ранее расширения. Это расширение было автоматически отключено, чтобы сделать процесс обновления безопаснее. Теперь, пожалуйста, проверьте корректность загруженных файлов и включите расширение, если оно всё ещё должно использоваться на конференции.', - 'VALID_PHPBB_EXTENSIONS' => 'phpbb.com CDB', + 'VALID_PHPBB_EXTENSIONS' => 'Расширения с официального сайта phpbb.com', 'EXT_VERSION_LETTER' => 'v', - '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_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_CLEANER' => 'Extension Cleaner tool', - 'UPLOAD_DESCRIPTION_CLEANER_ABOUT' => 'You can delete extension directories or zip files of extensions from the server.', + 'UPLOAD_DESCRIPTION_UPLOAD' => 'Загрузка расширений phpBB', + 'UPLOAD_DESCRIPTION_UPLOAD_CDB' => 'С официального сайта phpbb.com', + 'UPLOAD_DESCRIPTION_UPLOAD_LOCAL' => 'С локального компьютера', + 'UPLOAD_DESCRIPTION_UPLOAD_REMOTE' => 'С удалённого сервера', + 'UPLOAD_DESCRIPTION_UPDATE' => 'Обновление расширений phpBB', + 'UPLOAD_DESCRIPTION_UPDATE_ABOUT' => 'Вы можете обновлять любые установленные ранее расширения. Расширение, которое Вы захотите обновить, будет автоматически отключено, чтобы сделать процесс обновления безопаснее.', + 'UPLOAD_DESCRIPTION_ZIP' => 'Управление ZIP-файлами', + 'UPLOAD_DESCRIPTION_ZIP_SAVE' => 'Сохраняйте архивы в выбранной Вами папке', + 'UPLOAD_DESCRIPTION_ZIP_UNPACK' => 'Распакуйте ZIP-файл, чтобы установить расширение', + 'UPLOAD_DESCRIPTION_CLEANER' => 'Инструмент очистки расширений', + 'UPLOAD_DESCRIPTION_CLEANER_ABOUT' => 'Вы можете удалять папки расширений или ZIP-файлы расширений с сервера.', )); From 41d7fc2d1119bf0cbbfbb05597614f379b3fd2d0 Mon Sep 17 00:00:00 2001 From: lavigor Date: Sat, 17 Jan 2015 21:48:39 +0300 Subject: [PATCH 15/22] Travis fix. --- composer.lock | 390 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 389 insertions(+), 1 deletion(-) diff --git a/composer.lock b/composer.lock index 8180013..e196eaa 100644 --- a/composer.lock +++ b/composer.lock @@ -106,7 +106,395 @@ "time": "2014-05-05 02:43:50" } ], - "packages-dev": null, + "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é", + "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": "07e017ea9d92581d5b83066469eb33b4b2a8f6ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpbb/epv/zipball/07e017ea9d92581d5b83066469eb33b4b2a8f6ed", + "reference": "07e017ea9d92581d5b83066469eb33b4b2a8f6ed", + "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.0", + "symfony/finder": ">=2.3.0", + "symfony/yaml": ">=2.3.0|>=2.4.0|>=2.5.0" + }, + "require-dev": { + "phpunit/phpunit": "4.0.*" + }, + "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": "2014-12-13 10:15:27" + }, + { + "name": "sensiolabs/ansi-to-html", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/sensiolabs/ansi-to-html.git", + "reference": "92d2ef7ffba5418be060d8ba8adaf7223d741f93" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sensiolabs/ansi-to-html/zipball/92d2ef7ffba5418be060d8ba8adaf7223d741f93", + "reference": "92d2ef7ffba5418be060d8ba8adaf7223d741f93", + "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": "2014-08-01 14:02:39" + }, + { + "name": "symfony/console", + "version": "v2.6.3", + "target-dir": "Symfony/Component/Console", + "source": { + "type": "git", + "url": "https://github.com/symfony/Console.git", + "reference": "6ac6491ff60c0e5a941db3ccdc75a07adbb61476" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Console/zipball/6ac6491ff60c0e5a941db3ccdc75a07adbb61476", + "reference": "6ac6491ff60c0e5a941db3ccdc75a07adbb61476", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.1", + "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": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Console Component", + "homepage": "http://symfony.com", + "time": "2015-01-06 17:50:02" + }, + { + "name": "symfony/finder", + "version": "v2.6.3", + "target-dir": "Symfony/Component/Finder", + "source": { + "type": "git", + "url": "https://github.com/symfony/Finder.git", + "reference": "16513333bca64186c01609961a2bb1b95b5e1355" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Finder/zipball/16513333bca64186c01609961a2bb1b95b5e1355", + "reference": "16513333bca64186c01609961a2bb1b95b5e1355", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "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": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Finder Component", + "homepage": "http://symfony.com", + "time": "2015-01-03 08:01:59" + }, + { + "name": "symfony/process", + "version": "v2.6.3", + "target-dir": "Symfony/Component/Process", + "source": { + "type": "git", + "url": "https://github.com/symfony/Process.git", + "reference": "319794f611bd8bdefbac72beb3f05e847f8ebc92" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Process/zipball/319794f611bd8bdefbac72beb3f05e847f8ebc92", + "reference": "319794f611bd8bdefbac72beb3f05e847f8ebc92", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "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": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Process Component", + "homepage": "http://symfony.com", + "time": "2015-01-06 22:47:52" + }, + { + "name": "symfony/yaml", + "version": "v2.6.3", + "target-dir": "Symfony/Component/Yaml", + "source": { + "type": "git", + "url": "https://github.com/symfony/Yaml.git", + "reference": "82462a90848a52c2533aa6b598b107d68076b018" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/82462a90848a52c2533aa6b598b107d68076b018", + "reference": "82462a90848a52c2533aa6b598b107d68076b018", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "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": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Yaml Component", + "homepage": "http://symfony.com", + "time": "2015-01-03 15:33:07" + } + ], "aliases": [], "minimum-stability": "stable", "stability-flags": { From 9fb6248bde595b841d5804af2e950db186cf6a50 Mon Sep 17 00:00:00 2001 From: lavigor Date: Sat, 17 Jan 2015 22:11:50 +0300 Subject: [PATCH 16/22] A fix for namespaces. --- acp/upload_module.php | 4 ++-- includes/filetree/filedownload.php | 2 ++ includes/filetree/filetree.php | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/acp/upload_module.php b/acp/upload_module.php index 2a200f4..3300246 100644 --- a/acp/upload_module.php +++ b/acp/upload_module.php @@ -45,7 +45,7 @@ function main($id, $mode) $file = $request->variable('file', ''); if ($file != '') { - \filetree::get_file($file); + \boardtools\upload\filetree\filetree::get_file($file); } $this->upload_ext_name = 'boardtools/upload'; @@ -168,7 +168,7 @@ function main($id, $mode) include($phpbb_root_path . 'ext/boardtools/upload/includes/filetree/filedownload.' . $phpEx); - if (!(\filedownload::download_file($filename, $download_name, $mimetype))) + if (!(\boardtools\upload\filetree\filedownload::download_file($filename, $download_name, $mimetype))) { redirect($this->main_link); } diff --git a/includes/filetree/filedownload.php b/includes/filetree/filedownload.php index 5d9c0fe..5cf3971 100644 --- a/includes/filetree/filedownload.php +++ b/includes/filetree/filedownload.php @@ -7,6 +7,8 @@ * */ +namespace boardtools\upload\filetree; + class filedownload { public static function download_file($filename, $download_name, $mimetype) diff --git a/includes/filetree/filetree.php b/includes/filetree/filetree.php index 0762d20..0fd8f70 100644 --- a/includes/filetree/filetree.php +++ b/includes/filetree/filetree.php @@ -7,6 +7,8 @@ * */ +namespace boardtools\upload\filetree; + class filetree { public static function get_file($file) From 56a51f97d4ebcfcd7e72abad25921c4b2bf5aa37 Mon Sep 17 00:00:00 2001 From: lavigor Date: Sat, 17 Jan 2015 22:23:27 +0300 Subject: [PATCH 17/22] Travis fixes. --- acp/upload_module.php | 1 - includes/filetree/filetree.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/acp/upload_module.php b/acp/upload_module.php index 3300246..5f87483 100644 --- a/acp/upload_module.php +++ b/acp/upload_module.php @@ -8,7 +8,6 @@ */ namespace boardtools\upload\acp; -use \Michelf\MarkdownExtra; class upload_module { diff --git a/includes/filetree/filetree.php b/includes/filetree/filetree.php index 0fd8f70..f73fcbc 100644 --- a/includes/filetree/filetree.php +++ b/includes/filetree/filetree.php @@ -38,7 +38,7 @@ public static function php_file_tree($directory, $display_name, $uaction, $exten } public static function php_file_tree_dir($directory, $uaction, $extensions = array(), $first_call = true) - { + { if (function_exists('scandir')) { $file = scandir($directory); From dde17aa682948d7e022d1e05f8340ee1b4079686 Mon Sep 17 00:00:00 2001 From: lavigor Date: Sat, 17 Jan 2015 22:56:58 +0300 Subject: [PATCH 18/22] Some fixes. --- acp/upload_module.php | 2 +- includes/filetree/filedownload.php | 3 --- includes/filetree/filetree.php | 17 ++++++----------- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/acp/upload_module.php b/acp/upload_module.php index 5f87483..6334a01 100644 --- a/acp/upload_module.php +++ b/acp/upload_module.php @@ -901,7 +901,7 @@ function upload_ext($action) 'S_UPLOADED' => $display_name, 'S_UPLOADED_SELF' => ($action == 'upload_self'), 'EXT_UPDATED' => $made_update, - 'FILETREE' => \filetree::php_file_tree($phpbb_root_path . 'ext/' . $destination, $display_name, $this->main_link), + 'FILETREE' => \boardtools\upload\filetree\filetree::php_file_tree($phpbb_root_path . 'ext/' . $destination, $display_name, $this->main_link), 'S_ACTION' => ($action != 'upload_self') ? $phpbb_root_path . 'adm/index.' . $phpEx . '?i=acp_extensions&sid=' . $user->session_id . '&mode=main&action=enable_pre&ext_name=' . urlencode($destination) : $this->main_link . '&action=upload_self_update', 'S_ACTION_BACK' => $this->main_link, 'U_ACTION' => $this->u_action, diff --git a/includes/filetree/filedownload.php b/includes/filetree/filedownload.php index 5cf3971..016a4c4 100644 --- a/includes/filetree/filedownload.php +++ b/includes/filetree/filedownload.php @@ -22,9 +22,6 @@ public static function download_file($filename, $download_name, $mimetype) { while ($buffer = fread($fp, 1024)) { - /** - * @ignore - */ echo $buffer; } fclose($fp); diff --git a/includes/filetree/filetree.php b/includes/filetree/filetree.php index f73fcbc..ffaa6fd 100644 --- a/includes/filetree/filetree.php +++ b/includes/filetree/filetree.php @@ -15,10 +15,8 @@ public static function get_file($file) { if ($file != '') { - $string = file_get_contents($file); - /** @ignore */ + $string = @file_get_contents($file); echo '
    ' . substr($file, strrpos($file, '/') + 1) . '
    ' . highlight_string($string, true) . '
    '; - /** @ignore */ exit(); } return false; @@ -33,19 +31,16 @@ public static function php_file_tree($directory, $display_name, $uaction, $exten { $directory = substr($directory, 0, strlen($directory) - 1); } - $code .= \filetree::php_file_tree_dir($directory, $uaction, $extensions); + $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) { - if (function_exists('scandir')) + $file = @scandir($directory); + if (!$file) { - $file = scandir($directory); - } - else - { - $file = php4_scandir($directory); + return false; } natcasesort($file); @@ -98,7 +93,7 @@ public static function php_file_tree_dir($directory, $uaction, $extensions = arr { // Directory $php_file_tree .= '
  • ' . htmlspecialchars($this_file) . ''; - $php_file_tree .= \filetree::php_file_tree_dir($directory . '/' . $this_file, $uaction, $extensions, false); + $php_file_tree .= self::php_file_tree_dir($directory . '/' . $this_file, $uaction, $extensions, false); $php_file_tree .= '
  • '; } else From 02ee633770e303ecb9c4ba2cadf45f357933abb7 Mon Sep 17 00:00:00 2001 From: lavigor Date: Wed, 21 Jan 2015 17:52:11 +0300 Subject: [PATCH 19/22] Some fixes for the fixes. --- acp/upload_module.php | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/acp/upload_module.php b/acp/upload_module.php index 6334a01..355e339 100644 --- a/acp/upload_module.php +++ b/acp/upload_module.php @@ -305,7 +305,10 @@ function listzip() function getComposer($dir) { - global $composer; + if (@is_file($dir.'/composer.json')) + { + return $dir . '/composer.json'; + } $ffs = @scandir($dir); if (!$ffs) { @@ -316,14 +319,13 @@ function getComposer($dir) { if ($ff != '.' && $ff != '..') { - if ($ff == 'composer.json') + if (@is_dir($dir.'/'.$ff)) { - $composer = $dir . '/' . $ff; - break; + $composer = $this->getComposer($dir . '/' . $ff); } - if(is_dir($dir.'/'.$ff)) + if ($composer !== false) { - $this->getComposer($dir . '/' . $ff); + return $composer; } } } @@ -333,7 +335,8 @@ function getComposer($dir) // Function to remove folders and files function rrmdir($dir, $no_errors = true) { - if (is_dir($dir)) + global $user; + if (@is_dir($dir)) { $files = @scandir($dir); if ($files === false) @@ -350,7 +353,7 @@ function rrmdir($dir, $no_errors = true) } rmdir($dir); } - else if (file_exists($dir)) + else if (@file_exists($dir)) { if (!(@unlink($dir))) { @@ -364,7 +367,8 @@ function rrmdir($dir, $no_errors = true) // Function to copy folders and files function rcopy($src, $dst) { - if (file_exists($dst)) + global $user; + if (@file_exists($dst)) { if (!($this->rrmdir($dst))) { @@ -372,7 +376,7 @@ function rcopy($src, $dst) return false; } } - if (is_dir($src)) + if (@is_dir($src)) { $this->recursive_mkdir($dst, 0755); $files = @scandir($src); @@ -392,7 +396,7 @@ function rcopy($src, $dst) } } } - else if (file_exists($src)) + else if (@file_exists($src)) { if (!(@copy($src, $dst))) { @@ -836,11 +840,17 @@ function upload_ext($action) $old_ext_name = $destination; if($old_composery = $this->getComposer($phpbb_root_path . 'ext/' . $destination)) { - $old_string = file_get_contents($old_composery); - $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; + 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; + } } $this->save_zip_archive('ext/' . $destination . '/', str_replace(array('/', '\\'), '_', $old_ext_name) . '_old'); if (!($this->rrmdir($phpbb_root_path . 'ext/' . $destination))) From 413b0ae3e0f833cf491f57f28b2a3f73951e2ecb Mon Sep 17 00:00:00 2001 From: lavigor Date: Wed, 21 Jan 2015 20:38:47 +0300 Subject: [PATCH 20/22] Some new fixes. --- README.md | 48 +++++++++++++-------------- adm/style/css/jquery.simpledialog.css | 30 +++++++++++------ adm/style/css/upload.css | 9 +++++ adm/style/js/upload.js | 3 +- 4 files changed, 54 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 7e1e136..dff4239 100644 --- a/README.md +++ b/README.md @@ -9,14 +9,30 @@ With this extension you can install/update/delete extensions without using FTP. * phpBB 3.1.0 or higher * PHP 5.3.3 or higher -## Installation -You can install this extension on the latest version of [phpBB 3.1](https://www.phpbb.com/downloads/) or on the latest development version of [phpBB 3.1-dev](https://github.com/phpbb/phpbb3) by doing the following: +## Sources +You can get the extension from one of the following sources: +* phpbb.com: https://www.phpbb.com/customise/db/extension/upload/ +* github.com: https://github.com/BoardTools/upload -1. Download the extension. You can do it [directly from phpbb.com](https://www.phpbb.com/customise/db/extension/upload/) or by downloading the [latest ZIP-archive of `master` branch of its GitHub repository](https://github.com/BoardTools/upload/archive/master.zip). -2. Check out the existence of the folder `/ext/boardtools/upload/` in the root of your board folder. Create folders if necessary. -3. Copy the contents of the downloaded `upload-master` folder to `/ext/boardtools/upload/`. -4. Navigate in the ACP to `Customise -> Extension Management -> Manage extensions -> Upload Extensions`. -5. Click `Enable`. +The support from the authors is given only for the packages uploaded from the sources listed above. + +## 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. + +### 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 ### Upload extensions @@ -55,24 +71,6 @@ You can do the following actions with zip files uploaded with Upload Extensions: 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. -## Update -### Quick update -1. Navigate in the ACP to `Customise -> Extension Management -> Upload extensions`. -2. When an update is available, you will see an update button on the page. -3. Click on it and also click on other `Update` buttons that will appear on the screen. And the extension will be updated! - -### Standard update -1. Download the updated extension. You can do it [directly from phpbb.com](https://www.phpbb.com/customise/db/extension/upload/) or by downloading the [latest ZIP-archive of `master` branch of its GitHub repository](https://github.com/BoardTools/upload/archive/master.zip). -2. Navigate in the ACP to `Customise -> Extension Management -> Manage extensions -> Upload Extensions` and click `Disable`. -3. Copy the contents of the downloaded `upload-master` folder to `/ext/boardtools/upload/`. -4. Navigate in the ACP to `Customise -> Extension Management -> Manage extensions -> Upload Extensions` and click `Enable`. -5. Click `Details` or `Re-Check all versions` link to follow updates. - -## Uninstallation -Navigate in the ACP to `Customise -> Extension Management -> Manage extensions -> Upload Extensions` and click `Disable`. - -For permanent uninstallation click `Delete Data` and then you can safely delete the `/ext/boardtools/upload/` folder. - ## License [GNU General Public License v2](http://opensource.org/licenses/GPL-2.0) diff --git a/adm/style/css/jquery.simpledialog.css b/adm/style/css/jquery.simpledialog.css index e3df9f4..108424d 100644 --- a/adm/style/css/jquery.simpledialog.css +++ b/adm/style/css/jquery.simpledialog.css @@ -9,7 +9,9 @@ position: absolute; background-color: #fff; text-align:left; - border: solid 5px #666; + border: solid 1px #888; + border-radius: 20px; + box-shadow: 0px 0px 30px #888; overflow-y:auto; overflow-x:hidden; } @@ -44,20 +46,28 @@ } .sd_closelabel{ position:absolute; - width:50px; - height:22px; - - line-height:22px; + line-height:20px; + padding: 0; + margin: 0; top:0; - left:0; - padding:5px 10px; + left:auto !important; + right:0; text-align:center; - background-color:#ccc; + background-color:#f17878; + border-radius: 100%; + font-size: 20px; + font-weight: bold; + color: #fff; } .sd_closelabel a { + display:block; + width:20px; + height:20px; + padding:10px; text-decoration:none; - color: #222; - font-size: 12px; + border-radius: 100%; + color: #fff; + font-size: 24px; font-weight:bold; } .close { diff --git a/adm/style/css/upload.css b/adm/style/css/upload.css index 5a4eb2a..ea05bed 100644 --- a/adm/style/css/upload.css +++ b/adm/style/css/upload.css @@ -33,6 +33,11 @@ h1 {position: relative;} background: linear-gradient(to bottom, #92d992 0%, #228822 100%); } +.rtl #uploaded_ok { + margin-right: 0px; + margin-left: 15px; +} + #enable_uploaded { display: inline-block; float: right; @@ -101,6 +106,10 @@ h1 {position: relative;} text-decoration: underline; } +.rtl #show_filetree, .rtl #hide_filetree { + float: left; +} + .select_all_code { position: absolute; bottom: 5px; diff --git a/adm/style/js/upload.js b/adm/style/js/upload.js index 09690cf..a92c1b6 100644 --- a/adm/style/js/upload.js +++ b/adm/style/js/upload.js @@ -4,7 +4,8 @@ $("a.simpledialog").simpleDialog({ opacity: 0.1, width: '650px', - height: '600px' + height: '600px', + closeLabel: '×' }); /* For noscript compatibility we do it here instead of css file */ From a60f2b9d588c33cc1fe92656e624b3d884ad61e3 Mon Sep 17 00:00:00 2001 From: lavigor Date: Thu, 22 Jan 2015 00:11:16 +0300 Subject: [PATCH 21/22] Readme fixes. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dff4239..5321b34 100644 --- a/README.md +++ b/README.md @@ -10,13 +10,13 @@ With this extension you can install/update/delete extensions without using FTP. * PHP 5.3.3 or higher ## Sources -You can get the extension from one of the following 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. -## Installation, Update, Uninstallation +## 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. @@ -74,4 +74,4 @@ If you have uploaded different zip files with the same name, they will be rename ## License [GNU General Public License v2](http://opensource.org/licenses/GPL-2.0) -© 2014 - John Peskens (http://ForumHulp.com) and Igor Lavrov (https://github.com/LavIgor) \ No newline at end of file +© 2014 - 2015 John Peskens (http://ForumHulp.com) and Igor Lavrov (https://github.com/LavIgor) \ No newline at end of file From 2fcfd9ecac0b0a73619c75c1f122cce7b51c2555 Mon Sep 17 00:00:00 2001 From: lavigor Date: Fri, 20 Feb 2015 19:47:52 +0300 Subject: [PATCH 22/22] Try to make the existing directory for ZIP files writable. Fixed the issue reported by Derky. > If the directory exists but is unwritable this function will not chmod it. --- migrations/configuration/add_zip_config.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/migrations/configuration/add_zip_config.php b/migrations/configuration/add_zip_config.php index a7de4e6..e7eb92f 100644 --- a/migrations/configuration/add_zip_config.php +++ b/migrations/configuration/add_zip_config.php @@ -42,6 +42,10 @@ private function upload_directory() $directory = 'ext'; } } + else if (!is_writable($this->phpbb_root_path . $directory)) + { + @chmod($this->phpbb_root_path . $directory, 0755); + } return $directory; }