diff options
Diffstat (limited to 'lib/plugins/plugin')
-rw-r--r-- | lib/plugins/plugin/classes/ap_download.class.php | 36 | ||||
-rw-r--r-- | lib/plugins/plugin/classes/ap_enable.class.php | 4 | ||||
-rw-r--r-- | lib/plugins/plugin/classes/ap_manage.class.php | 13 | ||||
-rw-r--r-- | lib/plugins/plugin/lang/cs/lang.php | 1 | ||||
-rw-r--r-- | lib/plugins/plugin/lang/eo/lang.php | 1 | ||||
-rw-r--r-- | lib/plugins/plugin/lang/es/lang.php | 6 | ||||
-rw-r--r-- | lib/plugins/plugin/lang/eu/lang.php | 1 | ||||
-rw-r--r-- | lib/plugins/plugin/lang/fa/lang.php | 1 | ||||
-rw-r--r-- | lib/plugins/plugin/lang/fr/admin_plugin.txt | 4 | ||||
-rw-r--r-- | lib/plugins/plugin/lang/fr/lang.php | 46 | ||||
-rw-r--r-- | lib/plugins/plugin/lang/it/lang.php | 1 | ||||
-rw-r--r-- | lib/plugins/plugin/lang/lv/lang.php | 1 | ||||
-rw-r--r-- | lib/plugins/plugin/lang/nl/lang.php | 3 | ||||
-rw-r--r-- | lib/plugins/plugin/lang/zh-tw/lang.php | 19 | ||||
-rw-r--r-- | lib/plugins/plugin/lang/zh/lang.php | 2 | ||||
-rw-r--r-- | lib/plugins/plugin/plugin.info.txt | 7 |
16 files changed, 86 insertions, 60 deletions
diff --git a/lib/plugins/plugin/classes/ap_download.class.php b/lib/plugins/plugin/classes/ap_download.class.php index b2571f632..0eb567c80 100644 --- a/lib/plugins/plugin/classes/ap_download.class.php +++ b/lib/plugins/plugin/classes/ap_download.class.php @@ -8,8 +8,9 @@ class ap_download extends ap_manage { */ function process() { global $lang; + global $INPUT; - $plugin_url = $_REQUEST['url']; + $plugin_url = $INPUT->str('url'); $this->download($plugin_url, $this->overwrite); return ''; } @@ -155,16 +156,16 @@ class ap_download extends ap_manage { $info['type'] = 'plugin'; $info['tmp'] = "$base/$dir"; $conf = confToHash("$base/$dir/$f"); - $info['base'] = basename($conf['base']); - if(!$info['base']) $info['base'] = basename("$base/$dir"); + $info['base'] = utf8_basename($conf['base']); + if(!$info['base']) $info['base'] = utf8_basename("$base/$dir"); $result['new'][] = $info; }elseif($f == 'template.info.txt'){ $info = array(); $info['type'] = 'template'; $info['tmp'] = "$base/$dir"; $conf = confToHash("$base/$dir/$f"); - $info['base'] = basename($conf['base']); - if(!$info['base']) $info['base'] = basename("$base/$dir"); + $info['base'] = utf8_basename($conf['base']); + if(!$info['base']) $info['base'] = utf8_basename("$base/$dir"); $result['new'][] = $info; } }else{ @@ -199,31 +200,26 @@ class ap_download extends ap_manage { if (in_array($ext, array('tar','bz','gz'))) { switch($ext){ case 'bz': - $compress_type = TarLib::COMPRESS_BZIP; + $compress_type = Tar::COMPRESS_BZIP; break; case 'gz': - $compress_type = TarLib::COMPRESS_GZIP; + $compress_type = Tar::COMPRESS_GZIP; break; default: - $compress_type = TarLib::COMPRESS_NONE; + $compress_type = Tar::COMPRESS_NONE; } - $tar = new TarLib($file, $compress_type); - if($tar->_initerror < 0){ + $tar = new Tar(); + try { + $tar->open($file, $compress_type); + $tar->extract($target); + return true; + }catch(Exception $e){ if($conf['allowdebug']){ - msg('TarLib Error: '.$tar->TarErrorStr($tar->_initerror),-1); + msg('Tar Error: '.$e->getMessage().' ['.$e->getFile().':'.$e->getLine().']',-1); } return false; } - $ok = $tar->Extract(TarLib::FULL_ARCHIVE, $target, '', 0777); - - if($ok<1){ - if($conf['allowdebug']){ - msg('TarLib Error: '.$tar->TarErrorStr($ok),-1); - } - return false; - } - return true; } else if ($ext == 'zip') { $zip = new ZipLib(); diff --git a/lib/plugins/plugin/classes/ap_enable.class.php b/lib/plugins/plugin/classes/ap_enable.class.php index 35450a907..a25c7ede8 100644 --- a/lib/plugins/plugin/classes/ap_enable.class.php +++ b/lib/plugins/plugin/classes/ap_enable.class.php @@ -6,9 +6,11 @@ class ap_enable extends ap_manage { function process() { global $plugin_protected; + global $INPUT; + $count_enabled = $count_disabled = 0; - $this->enabled = isset($_REQUEST['enabled']) ? $_REQUEST['enabled'] : array(); + $this->enabled = $INPUT->arr('enabled'); foreach ($this->manager->plugin_list as $plugin) { if (in_array($plugin, $plugin_protected)) continue; diff --git a/lib/plugins/plugin/classes/ap_manage.class.php b/lib/plugins/plugin/classes/ap_manage.class.php index 12480e922..28579cbe9 100644 --- a/lib/plugins/plugin/classes/ap_manage.class.php +++ b/lib/plugins/plugin/classes/ap_manage.class.php @@ -141,9 +141,18 @@ class ap_manage { break; case 'update' : + $url = $data[0]; $date = date('r'); - if (!$fp = @fopen($file, 'a')) return; - fwrite($fp, "updated=$date\n"); + if (!$fp = @fopen($file, 'r+')) return; + $buffer = ""; + while (($line = fgets($fp)) !== false) { + $urlFound = strpos($line,"url"); + if($urlFound !== false) $line="url=$url\n"; + $buffer .= $line; + } + $buffer .= "updated=$date\n"; + fseek($fp, 0); + fwrite($fp, $buffer); fclose($fp); break; } diff --git a/lib/plugins/plugin/lang/cs/lang.php b/lib/plugins/plugin/lang/cs/lang.php index 1fd360dca..20a015cd4 100644 --- a/lib/plugins/plugin/lang/cs/lang.php +++ b/lib/plugins/plugin/lang/cs/lang.php @@ -12,6 +12,7 @@ * @author Vojta Beran <xmamut@email.cz> * @author zbynek.krivka@seznam.cz * @author Bohumir Zamecnik <bohumir.zamecnik@gmail.com> + * @author Jakub A. Těšínský (j@kub.cz) */ $lang['menu'] = 'Správa pluginů'; $lang['download'] = 'Stáhnout a instalovat plugin'; diff --git a/lib/plugins/plugin/lang/eo/lang.php b/lib/plugins/plugin/lang/eo/lang.php index 36e7eadff..67553454c 100644 --- a/lib/plugins/plugin/lang/eo/lang.php +++ b/lib/plugins/plugin/lang/eo/lang.php @@ -10,6 +10,7 @@ * @author Erik Pedersen <erik.pedersen@shaw.ca> * @author Robert BOGENSCHNEIDER <robog@gmx.de> * @author Robert Bogenschneider <bogi@uea.org> + * @author Robert Bogenschneider <robog@gmx.de> */ $lang['menu'] = 'Administri Kromaĵojn'; $lang['download'] = 'Elŝuti kaj instali novan kromaĵon'; diff --git a/lib/plugins/plugin/lang/es/lang.php b/lib/plugins/plugin/lang/es/lang.php index ac548245b..ded7d7369 100644 --- a/lib/plugins/plugin/lang/es/lang.php +++ b/lib/plugins/plugin/lang/es/lang.php @@ -22,6 +22,8 @@ * @author emezeta <emezeta@infoprimo.com> * @author Oscar Ciudad <oscar@jacho.net> * @author Ruben Figols <ruben.figols@gmail.com> + * @author Gerardo Zamudio <gerardo@gerardozamudio.net> + * @author Mercè López mercelz@gmail.com */ $lang['menu'] = 'Administración de Plugins'; $lang['download'] = 'Descargar e instalar un nuevo plugin'; @@ -65,6 +67,6 @@ $lang['error_copy'] = 'Hubo un error al copiar el fichero mientras se $lang['error_delete'] = 'Hubo un error al intentar eliminar el plugin <em>%s</em>. La causa más probable es que no se cuente con los permisos necesarios en el fichero o en el directorio'; $lang['enabled'] = 'Plugin %s habilitado.'; $lang['notenabled'] = 'Plugin %s no puede ser habilitado, verifica los permisos del archivo.'; -$lang['disabled'] = 'Plugin %s desabilitado.'; -$lang['notdisabled'] = 'Plugin %s no puede ser desabilitado, verifica los permisos de archivo.'; +$lang['disabled'] = 'Plugin %s deshabilitado.'; +$lang['notdisabled'] = 'Plugin %s no puede ser deshabilitado, verifica los permisos de archivo.'; $lang['packageinstalled'] = 'Plugin (%d plugin(s): %s) instalado exitosamente.'; diff --git a/lib/plugins/plugin/lang/eu/lang.php b/lib/plugins/plugin/lang/eu/lang.php index 56c03325f..2fc07fef9 100644 --- a/lib/plugins/plugin/lang/eu/lang.php +++ b/lib/plugins/plugin/lang/eu/lang.php @@ -3,6 +3,7 @@ * Basque language file * * @author Inko Illarramendi <inko.i.a@gmail.com> + * @author Zigor Astarbe <astarbe@gmail.com> */ $lang['menu'] = 'Plugin-ak Kudeatu'; $lang['download'] = 'Plugin berri bat deskargatu eta instalatu'; diff --git a/lib/plugins/plugin/lang/fa/lang.php b/lib/plugins/plugin/lang/fa/lang.php index dbfe9ef9a..bc43ee3ef 100644 --- a/lib/plugins/plugin/lang/fa/lang.php +++ b/lib/plugins/plugin/lang/fa/lang.php @@ -8,6 +8,7 @@ * @author Omid Mottaghi <omidmr@gmail.com> * @author Mohammad Reza Shoaei <shoaei@gmail.com> * @author Milad DZand <M.DastanZand@gmail.com> + * @author AmirH Hassaneini <mytechmix@gmail.com> */ $lang['menu'] = 'مدیریت افزونهها'; $lang['download'] = 'دریافت و نصب افزونه'; diff --git a/lib/plugins/plugin/lang/fr/admin_plugin.txt b/lib/plugins/plugin/lang/fr/admin_plugin.txt index f90b627f3..b7beba25a 100644 --- a/lib/plugins/plugin/lang/fr/admin_plugin.txt +++ b/lib/plugins/plugin/lang/fr/admin_plugin.txt @@ -1,4 +1,4 @@ -====== Gestion des modules externes ====== +====== Gestion des extensions ====== -Cette page vous permet de gérer tout ce qui a trait aux [[doku>fr:plugins|modules externes]] de DokuWiki. Pour télécharger et installer un module, le répertoire « ''plugin'' » doit être accessible en écriture pour le serveur Web. +Cette page vous permet de gérer tout ce qui a trait aux [[doku>fr:plugins|extensions]] de DokuWiki. Pour pouvoir télécharger et installer un module, le répertoire « ''plugin'' » doit être accessible en écriture pour le serveur web. diff --git a/lib/plugins/plugin/lang/fr/lang.php b/lib/plugins/plugin/lang/fr/lang.php index bf7a3739a..06cd1ab8d 100644 --- a/lib/plugins/plugin/lang/fr/lang.php +++ b/lib/plugins/plugin/lang/fr/lang.php @@ -18,10 +18,12 @@ * @author schplurtz@laposte.net * @author skimpax@gmail.com * @author Yannick Aure <yannick.aure@gmail.com> + * @author Olivier DUVAL <zorky00@gmail.com> + * @author Anael Mobilia <contrib@anael.eu> */ -$lang['menu'] = 'Gestion des modules externes'; -$lang['download'] = 'Télécharger et installer un nouveau module'; -$lang['manage'] = 'Modules installés'; +$lang['menu'] = 'Gestion des extensions'; +$lang['download'] = 'Télécharger et installer une nouvelle extension'; +$lang['manage'] = 'Extensions installées'; $lang['btn_info'] = 'Info'; $lang['btn_update'] = 'Mettre à jour'; $lang['btn_delete'] = 'Supprimer'; @@ -34,18 +36,18 @@ $lang['lastupdate'] = 'Dernière mise à jour :'; $lang['source'] = 'Source :'; $lang['unknown'] = 'inconnu'; $lang['updating'] = 'Mise à jour…'; -$lang['updated'] = 'Modules %s mis à jour avec succès'; -$lang['updates'] = 'Les modules suivants ont été mis à jour avec succès'; +$lang['updated'] = 'Extension %s mise à jour avec succès'; +$lang['updates'] = 'Les extensions suivantes ont été mises à jour avec succès'; $lang['update_none'] = 'Aucune mise à jour n\'a été trouvée.'; $lang['deleting'] = 'Suppression…'; -$lang['deleted'] = 'Module %s supprimé.'; +$lang['deleted'] = 'Extension %s supprimée.'; $lang['downloading'] = 'Téléchargement…'; -$lang['downloaded'] = 'Module %s installé avec succès'; -$lang['downloads'] = 'Les modules suivants ont été installés avec succès :'; -$lang['download_none'] = 'Aucun module n\'était trouvé, ou un problème inconnu est survenu durant le téléchargement et l\'installation.'; -$lang['plugin'] = 'Module :'; +$lang['downloaded'] = 'Extension %s installée avec succès'; +$lang['downloads'] = 'Les extensions suivantes ont été installées avec succès :'; +$lang['download_none'] = 'Aucune extension n\'a été trouvée, ou un problème inconnu est survenu durant le téléchargement et l\'installation.'; +$lang['plugin'] = 'Extension :'; $lang['components'] = 'Composants'; -$lang['noinfo'] = 'Ce module externe n\'a transmis aucune information, il pourrait être invalide.'; +$lang['noinfo'] = 'Cette extension n\'a transmis aucune information, elle pourrait être invalide.'; $lang['name'] = 'Nom :'; $lang['date'] = 'Date :'; $lang['type'] = 'Type :'; @@ -53,14 +55,14 @@ $lang['desc'] = 'Description :'; $lang['author'] = 'Auteur :'; $lang['www'] = 'Site web :'; $lang['error'] = 'Une erreur inconnue est survenue.'; -$lang['error_download'] = 'Impossible de télécharger le fichier du module : %s'; -$lang['error_badurl'] = 'URL suspecte. Impossible de déterminer le nom du fichier à partir de l\'URL'; -$lang['error_dircreate'] = 'Impossible de créer le répertoire temporaire pour réceptionner le téléchargement'; -$lang['error_decompress'] = 'Le gestionnaire de modules externes a été incapable de décompresser le fichier téléchargé. Ceci peut être le résultat d\'un mauvais téléchargement, auquel cas vous devriez réessayer ; ou bien le format de compression est inconnu, auquel cas vous devez télécharger et installer le module manuellement.'; -$lang['error_copy'] = 'Une erreur de copie est survenue lors de l\'installation des fichiers du module <em>%s</em> : votre disque est peut-être plein ou les droits d\'accès au fichier sont incorrects. Il a pu en résulter une installation partielle du module rendant votre installation du wiki instable.'; -$lang['error_delete'] = 'Une erreur est survenue à la suppression du module <em>%s</em>. La raison la plus probable est l\'insuffisance des droits sur les fichiers ou le répertoire.'; -$lang['enabled'] = 'Module %s activé.'; -$lang['notenabled'] = 'Le module %s n\'a pas pu être activé, vérifiez le fichier des permissions.'; -$lang['disabled'] = 'Module %s désactivé.'; -$lang['notdisabled'] = 'Le module %s n\'a pas pu être désactivé, vérifiez le fichier des permissions.'; -$lang['packageinstalled'] = 'Ensemble de modules (%d module(s): %s) installé avec succès.'; +$lang['error_download'] = 'Impossible de télécharger le fichier de l\'extension : %s'; +$lang['error_badurl'] = 'URL suspecte : impossible de déterminer le nom du fichier à partir de l\'URL'; +$lang['error_dircreate'] = 'Impossible de créer le répertoire temporaire pour effectuer le téléchargement'; +$lang['error_decompress'] = 'Le gestionnaire d\'extensions a été incapable de décompresser le fichier téléchargé. Ceci peut être le résultat d\'un mauvais téléchargement, auquel cas vous devriez réessayer ; ou bien le format de compression est inconnu, auquel cas vous devez télécharger et installer l\'extension manuellement.'; +$lang['error_copy'] = 'Une erreur de copie est survenue lors de l\'installation des fichiers de l\'extension <em>%s</em> : le disque est peut-être plein ou les autorisations d\'accès sont incorrects. Il a pu en résulter une installation partielle de l\'extension et laisser votre installation du wiki instable.'; +$lang['error_delete'] = 'Une erreur est survenue lors de la suppression de l\'extension <em>%s</em>. La raison la plus probable est l\'insuffisance des autorisations sur les fichiers ou les répertoires.'; +$lang['enabled'] = 'Extension %s activée.'; +$lang['notenabled'] = 'L\'extension %s n\'a pas pu être activée, vérifiez les autorisations des fichiers.'; +$lang['disabled'] = 'Extension %s désactivée.'; +$lang['notdisabled'] = 'L\'extension %s n\'a pas pu être désactivée, vérifiez les autorisations des fichiers.'; +$lang['packageinstalled'] = 'Ensemble d\'extensions (%d extension(s): %s) installé avec succès.'; diff --git a/lib/plugins/plugin/lang/it/lang.php b/lib/plugins/plugin/lang/it/lang.php index 3994948a0..9ae55c5de 100644 --- a/lib/plugins/plugin/lang/it/lang.php +++ b/lib/plugins/plugin/lang/it/lang.php @@ -14,6 +14,7 @@ * @author Osman Tekin osman.tekin93@hotmail.it * @author Jacopo Corbetta <jacopo.corbetta@gmail.com> * @author Matteo Pasotti <matteo@xquiet.eu> + * @author snarchio@gmail.com */ $lang['menu'] = 'Gestione Plugin'; $lang['download'] = 'Scarica e installa un nuovo plugin'; diff --git a/lib/plugins/plugin/lang/lv/lang.php b/lib/plugins/plugin/lang/lv/lang.php index 0f6103899..9a8727875 100644 --- a/lib/plugins/plugin/lang/lv/lang.php +++ b/lib/plugins/plugin/lang/lv/lang.php @@ -48,3 +48,4 @@ $lang['enabled'] = 'Modulis %s pieslēgts.'; $lang['notenabled'] = 'Moduli %s nevar pieslēgt, pārbaudi failu tiesības.'; $lang['disabled'] = 'Modulis %s atslēgts.'; $lang['notdisabled'] = 'Moduli %s nevar atslēgt, pārbaudi failu tiesības.'; +$lang['packageinstalled'] = 'Moduļu paka (pavisam kopā %d: %s) veiksmīgi uzstādīti.'; diff --git a/lib/plugins/plugin/lang/nl/lang.php b/lib/plugins/plugin/lang/nl/lang.php index 0599c3184..10db78411 100644 --- a/lib/plugins/plugin/lang/nl/lang.php +++ b/lib/plugins/plugin/lang/nl/lang.php @@ -13,6 +13,7 @@ * @author Timon Van Overveldt <timonvo@gmail.com> * @author Jeroen * @author Ricardo Guijt <ricardoguijt@gmail.com> + * @author Gerrit <klapinklapin@gmail.com> */ $lang['menu'] = 'Plugins beheren'; $lang['download'] = 'Download en installeer een nieuwe plugin'; @@ -58,4 +59,4 @@ $lang['enabled'] = 'Plugin %s ingeschakeld.'; $lang['notenabled'] = 'Plugin %s kon niet worden ingeschakeld, controleer bestandsrechten.'; $lang['disabled'] = 'Plugin %s uitgeschakeld.'; $lang['notdisabled'] = 'Plugin %s kon niet worden uitgeschakeld, controleer bestandsrechten.'; -$lang['packageinstalled'] = 'Plugin package (%d plugin%s: %s) succesvol geïnstalleerd.'; +$lang['packageinstalled'] = 'Plugin package (%d plugin(s): %s) succesvol geïnstalleerd.'; diff --git a/lib/plugins/plugin/lang/zh-tw/lang.php b/lib/plugins/plugin/lang/zh-tw/lang.php index 54234212d..8fa3efb0a 100644 --- a/lib/plugins/plugin/lang/zh-tw/lang.php +++ b/lib/plugins/plugin/lang/zh-tw/lang.php @@ -9,6 +9,7 @@ * @author Cheng-Wei Chien <e.cwchien@gmail.com> * @author Danny Lin * @author Shuo-Ting Jian <shoting@gmail.com> + * @author syaoranhinata@gmail.com */ $lang['menu'] = '管理插件 (Plugins)'; $lang['download'] = '下載與安裝插件'; @@ -20,8 +21,8 @@ $lang['btn_settings'] = '設定'; $lang['btn_download'] = '下載'; $lang['btn_enable'] = '儲存'; $lang['url'] = 'URL'; -$lang['installed'] = '安裝:'; -$lang['lastupdate'] = '上次更新:'; +$lang['installed'] = '安裝:'; +$lang['lastupdate'] = '上次更新:'; $lang['source'] = '來源:'; $lang['unknown'] = '未知'; $lang['updating'] = '更新中 ...'; @@ -34,17 +35,17 @@ $lang['downloading'] = '下載中 ...'; $lang['downloaded'] = '插件 %s 已成功地安裝'; $lang['downloads'] = '以下的插件已成功地安裝:'; $lang['download_none'] = '找不到插件,或在下載與安裝時發生了未知的問題'; -$lang['plugin'] = '插件:'; +$lang['plugin'] = '插件:'; $lang['components'] = '元件'; $lang['noinfo'] = '此插件沒有回傳任何資訊,可能是無效的'; -$lang['name'] = '名稱:'; -$lang['date'] = '日期:'; -$lang['type'] = '類型:'; -$lang['desc'] = '描述:'; -$lang['author'] = '作者:'; +$lang['name'] = '名稱:'; +$lang['date'] = '日期:'; +$lang['type'] = '類型:'; +$lang['desc'] = '描述:'; +$lang['author'] = '作者:'; $lang['www'] = '網頁:'; $lang['error'] = '一個未知的錯誤發生。'; -$lang['error_download'] = '無法下載插件檔案: %s'; +$lang['error_download'] = '無法下載插件檔案: %s'; $lang['error_badurl'] = 'URL 可能有問題 - 從 URL 中無法得知文件名'; $lang['error_dircreate'] = '無法建立暫存目錄來接收下載的內容'; $lang['error_decompress'] = '插件管理器無法解壓下載的文件。這可能是由於下載出現錯誤,遇到這種情況,請您再次嘗試;或者是壓縮格式無法識別,遇到這種情況,您需要手動下載並安裝該插件。'; diff --git a/lib/plugins/plugin/lang/zh/lang.php b/lib/plugins/plugin/lang/zh/lang.php index 58f05fbd9..473d31ead 100644 --- a/lib/plugins/plugin/lang/zh/lang.php +++ b/lib/plugins/plugin/lang/zh/lang.php @@ -60,4 +60,4 @@ $lang['enabled'] = '%s 插件启用'; $lang['notenabled'] = '%s插件启用失败,请检查文件权限。'; $lang['disabled'] = '%s 插件禁用'; $lang['notdisabled'] = '%s插件禁用失败,请检查文件权限。'; -$lang['packageinstalled'] = '插件 (%d plugin%s: %s) 已成功安装。'; +$lang['packageinstalled'] = '插件 (%d 插件: %s) 已成功安装。'; diff --git a/lib/plugins/plugin/plugin.info.txt b/lib/plugins/plugin/plugin.info.txt new file mode 100644 index 000000000..c2f72d998 --- /dev/null +++ b/lib/plugins/plugin/plugin.info.txt @@ -0,0 +1,7 @@ +base plugin +author Christopher Smith +email chris@jalakai.co.uk +date 2012-09-08 +name Plugin Manager plugin +desc Manage and install plugins +url http://www.dokuwiki.org/plugin:plugin |