From c7b9800aee5425a3964963c77c761f4439578b75 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Thu, 1 Aug 2013 11:35:05 +0200 Subject: Extension manager: First draft of the extension class --- .gitignore | 1 + lib/plugins/extension/README | 27 +++ lib/plugins/extension/helper/extension.php | 289 +++++++++++++++++++++++++++++ lib/plugins/extension/plugin.info.txt | 7 + 4 files changed, 324 insertions(+) create mode 100644 lib/plugins/extension/README create mode 100644 lib/plugins/extension/helper/extension.php create mode 100644 lib/plugins/extension/plugin.info.txt diff --git a/.gitignore b/.gitignore index e83fed24f..64816ba38 100644 --- a/.gitignore +++ b/.gitignore @@ -42,6 +42,7 @@ !/lib/plugins/authplain !/lib/plugins/acl !/lib/plugins/config +!/lib/plugins/extension !/lib/plugins/info !/lib/plugins/plugin !/lib/plugins/popularity diff --git a/lib/plugins/extension/README b/lib/plugins/extension/README new file mode 100644 index 000000000..5eefe924d --- /dev/null +++ b/lib/plugins/extension/README @@ -0,0 +1,27 @@ +extension Plugin for DokuWiki + +Extension manager + +All documentation for this plugin can be found at +https://www.dokuwiki.org/plugin:extension + +If you install this plugin manually, make sure it is installed in +lib/plugins/extension/ - if the folder is called different it +will not work! + +Please refer to http://www.dokuwiki.org/plugins for additional info +on how to install plugins in DokuWiki. + +---- +Copyright (C) Michael Hamann + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +See the COPYING file in your DokuWiki folder for details diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php new file mode 100644 index 000000000..2746837be --- /dev/null +++ b/lib/plugins/extension/helper/extension.php @@ -0,0 +1,289 @@ + + */ + +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +/** + * Class helper_plugin_extension_extension represents a single extension (plugin or template) + */ +class helper_plugin_extension_extension extends DokuWiki_Plugin { + private $name; + private $is_template; + private $localInfo; + private $remoteInfo; + + /** + * @return bool false, this component is not a singleton + */ + public function isSingleton() { + return false; + } + + /** + * Set the name of the extension this instance shall represents, triggers loading the local and remote data + * + * @param string $name The base name of the extension + * @param bool $is_template If the extension is a template + * @return bool If some (local or remote) data was found + */ + public function setExtension($name, $is_template) { + $this->name = $name; + $this->is_template = $is_template; + } + + /** + * If the extension is installed locally + * + * @return bool If the extension is installed locally + */ + public function isInstalled() { + } + + /** + * If the extension should be updated, i.e. if an updated version is available + * + * @return bool If an update is available + */ + public function updateAvailable() { + return $this->getInstalledVersion() < $this->getLastUpdate(); + } + + /** + * If the extension is a template + * + * @return bool If this extension is a template + */ + public function isTemplate() { + return $this->is_template; + } + + // Data from plugin.info.txt/template.info.txt or the repo when not available locally + /** + * Get the basename of the extension + * + * @return string The basename + */ + public function getBase() { + } + + /** + * Get the display name of the extension + * + * @return string The display name + */ + public function getName() { + } + + /** + * Get the author name of the extension + * + * @return string The name of the author + */ + public function getAuthor() { + } + + /** + * Get the email of the author of the extension + * + * @return string The email address + */ + public function getEmail() { + } + + /** + * Get the description of the extension + * + * @return string The description + */ + public function getDescription() { + } + + /** + * Get the URL of the extension, usually a page on dokuwiki.org + * + * @return string The URL + */ + public function getURL() { + } + + /** + * Get the installed version of the extension + * + * @return string The version, usually in the form yyyy-mm-dd + */ + public function getInstalledVersion() { + } + + /** + * Get the names of the dependencies of this extension + * + * @return array The base names of the dependencies + */ + public function getDependencies() { + } + + /** + * Get the names of all conflicting extensions + * + * @return array The names of the conflicting extensions + */ + public function getConflicts() { + } + + /** + * Get the names of similar extensions + * + * @return array The names of similar extensions + */ + public function getSimilarPlugins() { + } + + /** + * Get the names of the tags of the extension + * + * @return array The names of the tags of the extension + */ + public function getTags() { + } + + /** + * Get the text of the security warning if there is any + * + * @return string|bool The security warning if there is any, false otherwise + */ + public function getSecurityWarning() { + } + + /** + * Get the text of the security issue if there is any + * + * @return string|bool The security issue if there is any, false otherwise + */ + public function getSecurityIssue() { + } + + /** + * Get the URL of the screenshot of the extension if there is any + * + * @return string|bool The screenshot URL if there is any, false otherwise + */ + public function getScreenshotURL() { + } + + /** + * Get the last used download URL of the extension if there is any + * + * @return string|bool The previously used download URL, false if the extension has been installed manually + */ + public function getLastDownloadURL() { + } + + /** + * Get the download URL of the extension if there is any + * + * @return string|bool The download URL if there is any, false otherwise + */ + public function getDownloadURL() { + } + + /** + * Get the bug tracker URL of the extension if there is any + * + * @return string|bool The bug tracker URL if there is any, false otherwise + */ + public function getBugtrackerURL() { + } + + /** + * Get the URL of the source repository if there is any + * + * @return string|bool The URL of the source repository if there is any, false otherwise + */ + public function getSourcerepoURL() { + } + + /** + * Get the donation URL of the extension if there is any + * + * @return string|bool The donation URL if there is any, false otherwise + */ + public function getDonationURL() { + } + + /** + * Get the extension type(s) + * + * @return array The type(s) as array of strings + */ + public function getType() { + } + + /** + * Get a list of all DokuWiki versions this extension is compatible with + * + * @return array The versions in the form yyyy-mm-dd + */ + public function getCompatibleVersions() { + } + + /** + * Get the date of the last available update + * + * @return string The last available update in the form yyyy-mm-dd + */ + public function getLastUpdate() { + } + + /** + * Get the base path of the extension + * + * @return string The base path of the extension + */ + public function getInstallDir() { + if ($this->isTemplate()) { + return basename(tpl_incdir()).$this->name; + } else { + return DOKU_PLUGIN.$this->name; + } + } + + /** + * The type of extension installation + * + * @return string One of "none", "manual", "git" or "automatic" + */ + public function getInstallType() { + } + + /** + * If the extension can probably be installed/updated or uninstalled + * + * @return bool|string True or one of "nourl", "noparentperms" (template/plugin install path not writable), "noperms" (extension itself not writable) + */ + public function canModify() { + } + + /** + * Install or update the extension + * + * @return bool|string True or an error message + */ + public function installOrUpdate() { + } + + /** + * Uninstall the extension + * + * @return bool|string True or an error message + */ + public function deleteExtension() { + } +} + +// vim:ts=4:sw=4:et: diff --git a/lib/plugins/extension/plugin.info.txt b/lib/plugins/extension/plugin.info.txt new file mode 100644 index 000000000..3c4469ad7 --- /dev/null +++ b/lib/plugins/extension/plugin.info.txt @@ -0,0 +1,7 @@ +base extension +author Michael Hamann +email michael@content-space.de +date 2013-08-01 +name extension plugin +desc Extension manager +url https://www.dokuwiki.org/plugin:extension -- cgit v1.2.3 From b9ca398d17863ad9a679d220dd742b0480fa80b6 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Thu, 1 Aug 2013 20:50:37 +0200 Subject: Extension manager: implemented more extension info and basic repository access --- lib/plugins/extension/helper/extension.php | 188 ++++++++++++++++++++++++++-- lib/plugins/extension/helper/repository.php | 112 +++++++++++++++++ 2 files changed, 292 insertions(+), 8 deletions(-) create mode 100644 lib/plugins/extension/helper/repository.php diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 2746837be..b8981cf91 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -17,6 +17,9 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { private $is_template; private $localInfo; private $remoteInfo; + private $managerData; + /** @var helper_plugin_extension_repository $repository */ + private $repository = null; /** * @return bool false, this component is not a singleton @@ -35,6 +38,28 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { public function setExtension($name, $is_template) { $this->name = $name; $this->is_template = $is_template; + $this->localInfo = array(); + $this->managerData = array(); + $this->remoteInfo = array(); + + if ($this->isInstalled()) { + if ($this->isTemplate()) { + $infopath = $this->getInstallDir().'/template.info.txt'; + } else { + $infopath = $this->getInstallDir().'/plugin.info.txt'; + } + if (is_readable($infopath)) { + $this->localInfo = confToHash($infopath); + } + + $this->readManagerData(); + } + + if ($this->repository == null) { + $this->repository = $this->loadHelper('extension_repository'); + } + + $this->remoteInfo = $this->repository->getData(($this->isTemplate() ? 'template:' : '').$this->getBase()); } /** @@ -43,6 +68,18 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return bool If the extension is installed locally */ public function isInstalled() { + return is_dir($this->getInstallDir()); + } + + /** + * If the extension is enabled + * + * @return bool If the extension is enabled + */ + public function isEnabled() { + /* @var Doku_Plugin_Controller $plugin_controller */ + global $plugin_controller; + return !$plugin_controller->isdisabled($this->name); } /** @@ -51,6 +88,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return bool If an update is available */ public function updateAvailable() { + $lastupdate = $this->getLastUpdate(); + if ($lastupdate === false) return false; return $this->getInstalledVersion() < $this->getLastUpdate(); } @@ -70,6 +109,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string The basename */ public function getBase() { + return $this->name; } /** @@ -78,6 +118,9 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string The display name */ public function getName() { + if (isset($this->localInfo['name'])) return $this->localInfo['name']; + if (isset($this->remoteInfo['name'])) return $this->remoteInfo['name']; + return $this->name; } /** @@ -86,14 +129,31 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string The name of the author */ public function getAuthor() { + if (isset($this->localInfo['author'])) return $this->localInfo['author']; + if (isset($this->remoteInfo['author'])) return $this->remoteInfo['author']; + return $this->getLang('unknownauthor'); } /** - * Get the email of the author of the extension + * Get the email of the author of the extension if there is any * - * @return string The email address + * @return string|bool The email address or false if there is none */ public function getEmail() { + // email is only in the local data + if (isset($this->localInfo['email'])) return $this->localInfo['email']; + return false; + } + + /** + * Get the email id, i.e. the md5sum of the email + * + * @return string|bool The md5sum of the email if there is any, false otherwise + */ + public function getEmailID() { + if (isset($this->remoteInfo['emailid'])) return $this->remoteInfo['emailid']; + if (isset($this->localInfo['email'])) return md5($this->localInfo['email']); + return false; } /** @@ -102,6 +162,9 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string The description */ public function getDescription() { + if (isset($this->localInfo['desc'])) return $this->localInfo['desc']; + if (isset($this->remoteInfo['description'])) return $this->remoteInfo['description']; + return ''; } /** @@ -110,14 +173,19 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string The URL */ public function getURL() { + if (isset($this->localInfo['url'])) return $this->localInfo['url']; + return 'https://www.dokuwiki.org/plugin:'.$this->name; } /** * Get the installed version of the extension * - * @return string The version, usually in the form yyyy-mm-dd + * @return string|bool The version, usually in the form yyyy-mm-dd if there is any */ public function getInstalledVersion() { + if (isset($this->localInfo['date'])) return $this->localInfo['date']; + if ($this->isInstalled()) return $this->getLang('unknownversion'); + return false; } /** @@ -126,6 +194,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return array The base names of the dependencies */ public function getDependencies() { + if (isset($this->remoteInfo['dependencies'])) return $this->remoteInfo['dependencies']; + return array(); } /** @@ -134,6 +204,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return array The names of the conflicting extensions */ public function getConflicts() { + if (isset($this->remoteInfo['conflicts'])) return $this->remoteInfo['dependencies']; + return array(); } /** @@ -141,7 +213,9 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return array The names of similar extensions */ - public function getSimilarPlugins() { + public function getSimilarExtensions() { + if (isset($this->remoteInfo['similar'])) return $this->remoteInfo['similar']; + return array(); } /** @@ -150,6 +224,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return array The names of the tags of the extension */ public function getTags() { + if (isset($this->remoteInfo['tags'])) return $this->remoteInfo['tags']; + return array(); } /** @@ -158,6 +234,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string|bool The security warning if there is any, false otherwise */ public function getSecurityWarning() { + if (isset($this->remoteInfo['securitywarning'])) return $this->remoteInfo['securitywarning']; + return false; } /** @@ -166,6 +244,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string|bool The security issue if there is any, false otherwise */ public function getSecurityIssue() { + if (isset($this->remoteInfo['securityissue'])) return $this->remoteInfo['securityissue']; + return false; } /** @@ -174,6 +254,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string|bool The screenshot URL if there is any, false otherwise */ public function getScreenshotURL() { + if (isset($this->remoteInfo['screenshoturl'])) return $this->remoteInfo['screenshoturl']; + return false; } /** @@ -182,6 +264,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string|bool The previously used download URL, false if the extension has been installed manually */ public function getLastDownloadURL() { + if (isset($this->managerData['downloadurl'])) return $this->managerData['downloadurl']; + return false; } /** @@ -190,6 +274,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string|bool The download URL if there is any, false otherwise */ public function getDownloadURL() { + if (isset($this->remoteInfo['downloadurl'])) return $this->remoteInfo['downloadurl']; + return false; } /** @@ -198,6 +284,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string|bool The bug tracker URL if there is any, false otherwise */ public function getBugtrackerURL() { + if (isset($this->remoteInfo['bugtracker'])) return $this->remoteInfo['bugtracker']; + return false; } /** @@ -206,6 +294,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string|bool The URL of the source repository if there is any, false otherwise */ public function getSourcerepoURL() { + if (isset($this->remoteInfo['sourcerepo'])) return $this->remoteInfo['sourcerepo']; + return false; } /** @@ -214,6 +304,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string|bool The donation URL if there is any, false otherwise */ public function getDonationURL() { + if (isset($this->remoteInfo['donationurl'])) return $this->remoteInfo['donationurl']; + return false; } /** @@ -221,23 +313,30 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return array The type(s) as array of strings */ - public function getType() { + public function getTypes() { + if (isset($this->remoteInfo['types'])) return explode(', ', $this->remoteInfo['types']); + if ($this->isTemplate()) return array(32 => 'template'); + return array(); } /** * Get a list of all DokuWiki versions this extension is compatible with * - * @return array The versions in the form yyyy-mm-dd + * @return array The versions in the form yyyy-mm-dd => ('label' => label, 'implicit' => implicit) */ public function getCompatibleVersions() { + if (isset($this->remoteInfo['compatible'])) return $this->remoteInfo['compatible']; + return array(); } /** * Get the date of the last available update * - * @return string The last available update in the form yyyy-mm-dd + * @return string|bool The last available update in the form yyyy-mm-dd if there is any, false otherwise */ public function getLastUpdate() { + if (isset($this->remoteInfo['lastupdate'])) return $this->remoteInfo['lastupdate']; + return false; } /** @@ -259,6 +358,10 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string One of "none", "manual", "git" or "automatic" */ public function getInstallType() { + if (!$this->isInstalled()) return 'none'; + if (!empty($this->managerData)) return 'automatic'; + if (is_dir($this->getInstallDir().'/.git')) return 'git'; + return 'manual'; } /** @@ -282,7 +385,76 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return bool|string True or an error message */ - public function deleteExtension() { + public function uninstall() { + } + + /** + * Enable the extension + * + * @return bool|string True or an error message + */ + public function enable() { + if ($this->isTemplate()) return $this->getLang('notimplemented'); + /* @var Doku_Plugin_Controller $plugin_controller */ + global $plugin_controller; + if (!$this->isInstalled()) return $this->getLang('notinstalled'); + if (!$this->isEnabled()) return $this->getLang('alreadyenabled'); + if ($plugin_controller->enable($this->name)) { + return true; + } else { + return $this->getLang('pluginlistsaveerror'); + } + } + + /** + * Disable the extension + * + * @return bool|string True or an error message + */ + public function disable() { + if ($this->isTemplate()) return $this->getLang('notimplemented'); + + /* @var Doku_Plugin_Controller $plugin_controller */ + global $plugin_controller; + if (!$this->isInstalled()) return $this->getLang('notinstalled'); + if (!$this->isEnabled()) return $this->getLang('alreadydisabled'); + if ($plugin_controller->disable($this->name)) { + return true; + } else { + return $this->getLang('pluginlistsaveerror'); + } + } + + /** + * Read the manager.dat file + */ + protected function readManagerData() { + $managerpath = $this->getInstallDir().'/manager.dat'; + if (is_readable($managerpath)) { + $file = @file($managerpath); + if(!empty($file)) { + foreach($file as $line) { + list($key, $value) = explode('=', trim($line, PHP_EOL), 2); + $key = trim($key); + $value = trim($value); + // backwards compatible with old plugin manager + if($key == 'url') $key = 'downloadurl'; + $this->managerData[$key] = $value; + } + } + } + } + + /** + * Write the manager.data file + */ + protected function writeManagerData() { + $managerpath = $this->getInstallDir().'/manager.dat'; + $data = ''; + foreach ($this->managerData as $k => $v) { + $data .= $k.'='.$v.DOKU_LF; + } + io_saveFile($managerpath, $data); } } diff --git a/lib/plugins/extension/helper/repository.php b/lib/plugins/extension/helper/repository.php new file mode 100644 index 000000000..37b9bc02c --- /dev/null +++ b/lib/plugins/extension/helper/repository.php @@ -0,0 +1,112 @@ + + */ + +if (!defined('EXTENSION_REPOSITORY_API_ENDPOINT')) + define('EXTENSION_REPSITORY_API', 'http://www.dokuwiki.org/lib/plugins/pluginrepo/api.php'); + +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +/** + * Class helper_plugin_extension_repository provides access to the extension repository on dokuwiki.org + */ +class helper_plugin_extension_repository extends DokuWiki_Plugin { + private $loaded_extensions = array(); + private $has_access = null; + /** + * Initialize the repository (cache), fetches data for all installed plugins + */ + public function init() { + /* @var Doku_Plugin_Controller $plugin_controller */ + global $plugin_controller; + if ($this->hasAccess()) { + $list = $plugin_controller->getList('', true); + $request_data = array('fmt' => 'php'); + $request_needed = false; + foreach ($list as $name) { + $cache = new cache('##extension_manager##'.$name, 'repo'); + $result = null; + if (!isset($this->loaded_extensions[$name]) && $this->hasAccess() && !$cache->useCache(array('age' => 3600 * 24))) { + $this->loaded_extensions[$name] = true; + $request_data['ext'][] = $name; + $request_needed = true; + } + } + + if ($request_needed) { + $httpclient = new DokuHTTPClient(); + $data = $httpclient->post(EXTENSION_REPSITORY_API, $request_data); + if ($data !== false) { + $extensions = unserialize($data); + foreach ($extensions as $extension) { + $cache = new cache('##extension_manager##'.$extension['plugin'], 'repo'); + $cache->storeCache(serialize($extension)); + } + } else { + $this->has_access = false; + } + } + } + } + + /** + * If repository access is available + * + * @return bool If repository access is available + */ + public function hasAccess() { + if ($this->has_access === null) { + $cache = new cache('##extension_manager###hasAccess', 'repo'); + $result = null; + if (!$cache->useCache(array('age' => 3600 * 24))) { + $httpclient = new DokuHTTPClient(); + $httpclient->timeout = 5; + $data = $httpclient->get(EXTENSION_REPSITORY_API.'?cmd=ping'); + if ($data !== false) { + $this->has_access = true; + $cache->storeCache(1); + } else { + $this->has_access = false; + $cache->storeCache(0); + } + } else { + $this->has_access = ($cache->retrieveCache(false) == 1); + } + } + return $this->has_access; + } + + /** + * Get the remote data of an individual plugin or template + * + * @param string $name The plugin name to get the data for, template names need to be prefix by 'template:' + * @return array The data or null if nothing was found (possibly no repository access) + */ + public function getData($name) { + $cache = new cache('##extension_manager##'.$name, 'repo'); + $result = null; + if (!isset($this->loaded_extensions[$name]) && $this->hasAccess() && !$cache->useCache(array('age' => 3600 * 24))) { + $this->loaded_extensions[$name] = true; + $httpclient = new DokuHTTPClient(); + $data = $httpclient->get(EXTENSION_REPSITORY_API.'?fmt=php&ext[]='.urlencode($name)); + if ($data !== false) { + $result = unserialize($data); + $cache->storeCache(serialize($result[0])); + return $result[0]; + } else { + $this->has_access = false; + } + } + if (file_exists($cache->cache)) { + return unserialize($cache->retrieveCache(false)); + } + return array(); + } +} + +// vim:ts=4:sw=4:et: -- cgit v1.2.3 From 788f86d986d170475e9fda3578b4fde5ba4864dd Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Thu, 1 Aug 2013 21:14:17 +0200 Subject: Extension manager: add language file and simple admin component --- lib/plugins/extension/admin.php | 58 ++++++++++++++++++++++++++++++++++ lib/plugins/extension/lang/en/lang.php | 21 ++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 lib/plugins/extension/admin.php create mode 100644 lib/plugins/extension/lang/en/lang.php diff --git a/lib/plugins/extension/admin.php b/lib/plugins/extension/admin.php new file mode 100644 index 000000000..19863e772 --- /dev/null +++ b/lib/plugins/extension/admin.php @@ -0,0 +1,58 @@ + + */ + +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +class admin_plugin_extension extends DokuWiki_Admin_Plugin { + + /** + * @return int sort number in admin menu + */ + public function getMenuSort() { + return 0; + } + + /** + * @return bool true if only access for superuser, false is for superusers and moderators + */ + public function forAdminOnly() { + return true; + } + + /** + * Should carry out any processing required by the plugin. + */ + public function handle() { + /* @var helper_plugin_extension_repository $repository */ + $repository = $this->loadHelper('extension_repository'); + $repository->init(); + } + + /** + * Render HTML output, e.g. helpful text and a form + */ + public function html() { + /* @var Doku_Plugin_Controller $plugin_controller */ + global $plugin_controller; + ptln('

'.$this->getLang('menu').'

'); + + $pluginlist = $plugin_controller->getList('', true); + /* @var helper_plugin_extension_extension $extension */ + $extension = $this->loadHelper('extension_extension'); + foreach ($pluginlist as $name) { + $extension->setExtension($name, false); + ptln('

'.hsc($extension->getName()).'

'); + ptln('

'.hsc($extension->getDescription()).'

'); + ptln('

Latest available version: '.hsc($extension->getLastUpdate()).'

'); + ptln('

Installed version: '.hsc($extension->getInstalledVersion()).'

'); + } + } +} + +// vim:ts=4:sw=4:et: \ No newline at end of file diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php new file mode 100644 index 000000000..81069e498 --- /dev/null +++ b/lib/plugins/extension/lang/en/lang.php @@ -0,0 +1,21 @@ + + */ + +// menu entry for admin plugins +$lang['menu'] = 'Extension manager'; + +// custom language strings for the plugin +$lang['notimplemented'] = 'This feature hasn\'t been implemented yet'; +$lang['alreadyenabled'] = 'This extension has already been enabled'; +$lang['alreadydisabled'] = 'This extension has already been disabled'; +$lang['pluginlistsaveerror'] = 'There was an error saving the plugin list'; +$lang['unknownauthor'] = 'Unknown author'; +$lang['unknownversion'] = 'Unknown version'; + + + +//Setup VIM: ex: et ts=4 : -- cgit v1.2.3 From 9c0a72696a95f03deea27243cb67a497ed3d6993 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Fri, 2 Aug 2013 12:28:08 +0200 Subject: Extension manager: fix install dir for templates --- lib/plugins/extension/helper/extension.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index b8981cf91..05f64efeb 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -8,6 +8,7 @@ // must be run within Dokuwiki if(!defined('DOKU_INC')) die(); +if(!defined('DOKU_TPLLIB')) define('DOKU_TPLLIB', DOKU_INC.'lib/tpl/'); /** * Class helper_plugin_extension_extension represents a single extension (plugin or template) @@ -346,7 +347,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { */ public function getInstallDir() { if ($this->isTemplate()) { - return basename(tpl_incdir()).$this->name; + return DOKU_TPLLIB.$this->name; } else { return DOKU_PLUGIN.$this->name; } -- cgit v1.2.3 From 7c30f5ced5496bbc22c78497011da33d121aeb56 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Fri, 2 Aug 2013 12:29:34 +0200 Subject: Extension manager: Use getInfo() when no info.txt is available --- lib/plugins/extension/helper/extension.php | 52 ++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 9 deletions(-) diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 05f64efeb..4243afb69 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -44,15 +44,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { $this->remoteInfo = array(); if ($this->isInstalled()) { - if ($this->isTemplate()) { - $infopath = $this->getInstallDir().'/template.info.txt'; - } else { - $infopath = $this->getInstallDir().'/plugin.info.txt'; - } - if (is_readable($infopath)) { - $this->localInfo = confToHash($infopath); - } - + $this->readLocalData(); $this->readManagerData(); } @@ -426,6 +418,48 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { } } + /** + * Read local extension data either from info.txt or getInfo() + */ + protected function readLocalData() { + if ($this->isTemplate()) { + $infopath = $this->getInstallDir().'/template.info.txt'; + } else { + $infopath = $this->getInstallDir().'/plugin.info.txt'; + } + + if (is_readable($infopath)) { + $this->localInfo = confToHash($infopath); + } elseif (!$this->isTemplate() && $this->isEnabled()) { + global $plugin_types; + $path = $this->getInstallDir().'/'; + $plugin = null; + + foreach($plugin_types as $type) { + if(@file_exists($path.$type.'.php')) { + $plugin = plugin_load($type, $this->getBase()); + if ($plugin) break; + } + + if($dh = @opendir($path.$type.'/')) { + while(false !== ($cp = readdir($dh))) { + if($cp == '.' || $cp == '..' || strtolower(substr($cp, -4)) != '.php') continue; + + $plugin = plugin_load($type, $this->getBase().'_'.substr($cp, 0, -4)); + if ($plugin) break; + } + if ($plugin) break; + closedir($dh); + } + } + + if ($plugin) { + /* @var DokuWiki_Plugin $plugin */ + $this->localInfo = $plugin->getInfo(); + } + } + } + /** * Read the manager.dat file */ -- cgit v1.2.3 From 449f398253213589bf4cd3c28f2c38b9d853b06a Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Fri, 2 Aug 2013 12:30:42 +0200 Subject: Extension manager: Improve update check --- lib/plugins/extension/helper/extension.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 4243afb69..5e3074c83 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -83,6 +83,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { public function updateAvailable() { $lastupdate = $this->getLastUpdate(); if ($lastupdate === false) return false; + $installed = $this->getInstalledVersion(); + if ($installed === false || $installed === $this->getLang('unknownversion')) return true; return $this->getInstalledVersion() < $this->getLastUpdate(); } -- cgit v1.2.3 From 1981046ea006031f74fb082960756b3d2919b99e Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Fri, 2 Aug 2013 12:31:11 +0200 Subject: Extension manager: implement uninstall, canModify and install/update --- lib/plugins/extension/helper/extension.php | 361 ++++++++++++++++++++++++++++- lib/plugins/extension/lang/en/lang.php | 6 + 2 files changed, 366 insertions(+), 1 deletion(-) diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 5e3074c83..b80e56a4d 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -365,6 +365,18 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return bool|string True or one of "nourl", "noparentperms" (template/plugin install path not writable), "noperms" (extension itself not writable) */ public function canModify() { + if ($this->isInstalled()) { + if (!is_writable($this->getInstallDir())) { + return 'noperms'; + } + } + $parent_path = ($this->isTemplate() ? DOKU_TPLLIB : DOKU_PLUGIN); + if (!is_writable($parent_path)) { + return 'noparentperms'; + } + + if (!$this->getDownloadURL()) return 'nourl'; + return true; } /** @@ -373,14 +385,26 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return bool|string True or an error message */ public function installOrUpdate() { + if (($status = $this->download($this->getDownloadURL(), $path)) === true) { + if (($status = $this->installArchive($path, $installed_extensions, $this->isInstalled(), $this->getBase())) == true) { + // refresh extension information + if (!isset($installed_extensions[$this->getBase()])) { + $status = 'Error, the requested extension hasn\'t been installed or updated'; + } + $this->setExtension($this->name, $this->isTemplate()); + } + $this->dir_delete(dirname($path)); + } + return $status; } /** * Uninstall the extension * - * @return bool|string True or an error message + * @return bool If the plugin was sucessfully installed */ public function uninstall() { + return $this->dir_delete($this->getInstallDir()); } /** @@ -493,6 +517,341 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { } io_saveFile($managerpath, $data); } + + /** + * delete, with recursive sub-directory support + * + * @param string $path The path that shall be deleted + * @return bool If the directory has been successfully deleted + */ + protected function dir_delete($path) { + if(!is_string($path) || $path == "") return false; + + if(is_dir($path) && !is_link($path)) { + if(!$dh = @opendir($path)) return false; + + while ($f = readdir($dh)) { + if($f == '..' || $f == '.') continue; + $this->dir_delete("$path/$f"); + } + + closedir($dh); + return @rmdir($path); + } else { + return @unlink($path); + } + } + + /** + * Download an archive to a protected path + * @param string $url The url to get the archive from + * @param string $path The path where the archive was saved (output parameter) + * @return bool|string True on success, an error message on failure + */ + public function download($url, &$path) { + // check the url + $matches = array(); + if(!preg_match("/[^/]*$/", $url, $matches) || !$matches[0]) { + return $this->getLang('baddownloadurl'); + } + $file = $matches[0]; + + // create tmp directory for download + if(!($tmp = io_mktmpdir())) { + return $this->getLang('error_dircreate'); + } + + // download + if(!$file = io_download($url, $tmp.'/', true, $file)) { + $this->dir_delete($tmp); + return sprintf($this->getLang('error_download'), $url); + } + + $path = $tmp.'/'.$file; + + return true; + } + + /** + * @param string $file The path to the archive that shall be installed + * @param bool $overwrite If an already installed plugin should be overwritten + * @param array $installed_extensions Array of all installed extensions in the form $base => ('type' => $type, 'action' => 'update'|'install') + * @param string $base The basename of the plugin if it's known + * @return bool|string True on success, an error message on failure + */ + public function installArchive($file, &$installed_extensions, $overwrite=false, $base = '') { + $error = false; + + // create tmp directory for decompression + if(!($tmp = io_mktmpdir())) { + return $this->getLang('error_dircreate'); + } + + // add default base folder if specified to handle case where zip doesn't contain this + if($base && !@mkdir($tmp.'/'.$base)) { + $error = $this->getLang('error_dircreate'); + } + + if(!$error && !$this->decompress("$tmp/$file", "$tmp/".$base)) { + $error = sprintf($this->getLang('error_decompress'), $file); + } + + // search $tmp/$base for the folder(s) that has been created + // move the folder(s) to lib/.. + if(!$error) { + $result = array('old'=>array(), 'new'=>array()); + + if(!$this->find_folders($result, $tmp.'/'.$base, ($this->isTemplate() ? 'template' : 'plugin'))) { + $error = $this->getLang('error_findfolder'); + + } else { + // choose correct result array + if(count($result['new'])) { + $install = $result['new']; + }else{ + $install = $result['old']; + } + + // now install all found items + foreach($install as $item) { + // where to install? + if($item['type'] == 'template') { + $target_base_dir = DOKU_TPLLIB; + }else{ + $target_base_dir = DOKU_PLUGIN; + } + + if(!empty($item['base'])) { + // use base set in info.txt + } elseif($base && count($install) == 1) { + $item['base'] = $base; + } else { + // default - use directory as found in zip + // plugins from github/master without *.info.txt will install in wrong folder + // but using $info->id will make 'code3' fail (which should install in lib/code/..) + $item['base'] = basename($item['tmp']); + } + + // check to make sure we aren't overwriting anything + $target = $target_base_dir.$item['base']; + if(!$overwrite && @file_exists($target)) { + // TODO remember our settings, ask the user to confirm overwrite + continue; + } + + $action = @file_exists($target) ? 'update' : 'install'; + + // copy action + if($this->dircopy($item['tmp'], $target)) { + // TODO: write manager.dat! + $installed_extensions[$item['base']] = array('type' => $item['type'], 'action' => $action); + } else { + $error = sprintf($this->getLang('error_copy').DOKU_LF, $item['base']); + break; + } + } + } + } + + // cleanup + if($tmp) $this->dir_delete($tmp); + + if($error) { + return $error; + } + + return true; + } + + /** + * Find out what was in the extracted directory + * + * Correct folders are searched recursively using the "*.info.txt" configs + * as indicator for a root folder. When such a file is found, it's base + * setting is used (when set). All folders found by this method are stored + * in the 'new' key of the $result array. + * + * For backwards compatibility all found top level folders are stored as + * in the 'old' key of the $result array. + * + * When no items are found in 'new' the copy mechanism should fall back + * the 'old' list. + * + * @author Andreas Gohr + * @param array $result - results are stored here + * @param string $base - the temp directory where the package was unpacked to + * @param string $default_type - type used if no info.txt available + * @param string $dir - a subdirectory. do not set. used by recursion + * @return bool - false on error + */ + private function find_folders(&$result, $base, $default_type, $dir='') { + $this_dir = "$base$dir"; + $dh = @opendir($this_dir); + if(!$dh) return false; + + $found_dirs = array(); + $found_files = 0; + $found_template_parts = 0; + $found_info_txt = false; + while (false !== ($f = readdir($dh))) { + if($f == '.' || $f == '..') continue; + + if(is_dir("$this_dir/$f")) { + $found_dirs[] = "$dir/$f"; + + } else { + // it's a file -> check for config + $found_files++; + switch ($f) { + case 'plugin.info.txt': + case 'template.info.txt': + $found_info_txt = true; + $info = array(); + $type = explode('.', $f, 2); + $info['type'] = $type[0]; + $info['tmp'] = $this_dir; + $conf = confToHash("$this_dir/$f"); + $info['base'] = basename($conf['base']); + $result['new'][] = $info; + break; + + case 'main.php': + case 'details.php': + case 'mediamanager.php': + case 'style.ini': + $found_template_parts++; + break; + } + } + } + closedir($dh); + + // URL downloads default to 'plugin', try extra hard to indentify templates + if(!$default_type && $found_template_parts > 2 && !$found_info_txt) { + $info = array(); + $info['type'] = 'template'; + $info['tmp'] = $this_dir; + $result['new'][] = $info; + } + + // files in top level but no info.txt, assume this is zip missing a base directory + // works for all downloads unless direct URL where $base will be the tmp directory ($info->id was empty) + if(!$dir && $found_files > 0 && !$found_info_txt && $default_type) { + $info = array(); + $info['type'] = $default_type; + $info['tmp'] = $base; + $result['old'][] = $info; + return true; + } + + foreach ($found_dirs as $found_dir) { + // if top level add to dir list for old method, then recurse + if(!$dir) { + $info = array(); + $info['type'] = ($default_type ? $default_type : 'plugin'); + $info['tmp'] = "$base$found_dir"; + $result['old'][] = $info; + } + $this->find_folders($result, $base, $default_type, "$found_dir"); + } + return true; + } + + + /** + * Decompress a given file to the given target directory + * + * Determines the compression type from the file extension + */ + private function decompress($file, $target) { + // decompression library doesn't like target folders ending in "/" + if(substr($target, -1) == "/") $target = substr($target, 0, -1); + + $ext = $this->guess_archive($file); + if(in_array($ext, array('tar', 'bz', 'gz'))) { + switch($ext) { + case 'bz': + $compress_type = Tar::COMPRESS_BZIP; + break; + case 'gz': + $compress_type = Tar::COMPRESS_GZIP; + break; + default: + $compress_type = Tar::COMPRESS_NONE; + } + + $tar = new Tar(); + try { + $tar->open($file, $compress_type); + $tar->extract($target); + } catch (Exception $e) { + return $e->getMessage(); + } + + return true; + } elseif($ext == 'zip') { + + $zip = new ZipLib(); + $ok = $zip->Extract($file, $target); + + return ($ok==-1 ? 'Error extracting the zip archive' : true); + } + + // the only case when we don't get one of the recognized archive types is when the archive file can't be read + return 'Couldn\'t read archive file'; + } + + /** + * Determine the archive type of the given file + * + * Reads the first magic bytes of the given file for content type guessing, + * if neither bz, gz or zip are recognized, tar is assumed. + * + * @author Andreas Gohr + * @param string $file The file to analyze + * @return string|bool false if the file can't be read, otherwise an "extension" + */ + private function guess_archive($file) { + $fh = fopen($file, 'rb'); + if(!$fh) return false; + $magic = fread($fh, 5); + fclose($fh); + + if(strpos($magic, "\x42\x5a") === 0) return 'bz'; + if(strpos($magic, "\x1f\x8b") === 0) return 'gz'; + if(strpos($magic, "\x50\x4b\x03\x04") === 0) return 'zip'; + return 'tar'; + } + + /** + * Copy with recursive sub-directory support + */ + private function dircopy($src, $dst) { + global $conf; + + if(is_dir($src)) { + if(!$dh = @opendir($src)) return false; + + if($ok = io_mkdir_p($dst)) { + while ($ok && (false !== ($f = readdir($dh)))) { + if($f == '..' || $f == '.') continue; + $ok = $this->dircopy("$src/$f", "$dst/$f"); + } + } + + closedir($dh); + return $ok; + + } else { + $exists = @file_exists($dst); + + if(!@copy($src, $dst)) return false; + if(!$exists && !empty($conf['fperm'])) chmod($dst, $conf['fperm']); + @touch($dst, filemtime($src)); + } + + return true; + } } // vim:ts=4:sw=4:et: diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index 81069e498..f0999ff01 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -17,5 +17,11 @@ $lang['unknownauthor'] = 'Unknown author'; $lang['unknownversion'] = 'Unknown version'; +$lang['error_badurl'] = 'URL ends with slash - unable to determine file name from the url'; +$lang['error_dircreate'] = 'Unable to create temporary folder to receive download'; +$lang['error_download'] = 'Unable to download the file: %s'; +$lang['error_decompress'] = 'Unable to decompress the downloaded file. This maybe as a result of a bad download, in which case you should try again; or the compression format may be unknown, in which case you will need to download and install manually'; +$lang['error_findfolder'] = 'Unable to identify extension directory, you need to download and install manually'; +$lang['error_copy'] = 'There was a file copy error while attempting to install files for directory %s: the disk could be full or file access permissions may be incorrect. This may have resulted in a partially installed plugin and leave your wiki installation unstable'; //Setup VIM: ex: et ts=4 : -- cgit v1.2.3 From 02779b18797b2ee1304613de684d54988815dacb Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Fri, 2 Aug 2013 23:30:32 +0200 Subject: Extension manager: Implement extension table This uses a lot of code and the whole design from the previous extension manager implementation. --- lib/plugins/extension/admin.php | 78 ++++- lib/plugins/extension/helper/extension.php | 189 ++++++++++-- lib/plugins/extension/helper/list.php | 477 +++++++++++++++++++++++++++++ lib/plugins/extension/images/disabled.png | Bin 0 -> 1486 bytes lib/plugins/extension/images/donate.png | Bin 0 -> 1293 bytes lib/plugins/extension/images/down.png | Bin 0 -> 280 bytes lib/plugins/extension/images/enabled.png | Bin 0 -> 1231 bytes lib/plugins/extension/images/icons.xcf | Bin 0 -> 43016 bytes lib/plugins/extension/images/license.txt | 4 + lib/plugins/extension/images/plugin.png | Bin 0 -> 6259 bytes lib/plugins/extension/images/template.png | Bin 0 -> 6802 bytes lib/plugins/extension/images/up.png | Bin 0 -> 281 bytes lib/plugins/extension/lang/en/lang.php | 96 +++++- lib/plugins/extension/style.css | 368 ++++++++++++++++++++++ 14 files changed, 1172 insertions(+), 40 deletions(-) create mode 100644 lib/plugins/extension/helper/list.php create mode 100644 lib/plugins/extension/images/disabled.png create mode 100644 lib/plugins/extension/images/donate.png create mode 100644 lib/plugins/extension/images/down.png create mode 100644 lib/plugins/extension/images/enabled.png create mode 100644 lib/plugins/extension/images/icons.xcf create mode 100644 lib/plugins/extension/images/license.txt create mode 100644 lib/plugins/extension/images/plugin.png create mode 100644 lib/plugins/extension/images/template.png create mode 100644 lib/plugins/extension/images/up.png create mode 100644 lib/plugins/extension/style.css diff --git a/lib/plugins/extension/admin.php b/lib/plugins/extension/admin.php index 19863e772..373f90183 100644 --- a/lib/plugins/extension/admin.php +++ b/lib/plugins/extension/admin.php @@ -9,7 +9,11 @@ // must be run within Dokuwiki if(!defined('DOKU_INC')) die(); +/** + * Admin part of the extension manager + */ class admin_plugin_extension extends DokuWiki_Admin_Plugin { + protected $infoFor = null; /** * @return int sort number in admin menu @@ -26,32 +30,94 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { } /** - * Should carry out any processing required by the plugin. + * Execute the requested action(s) and initialize the plugin repository */ public function handle() { + global $INPUT; + // initialize the remote repository /* @var helper_plugin_extension_repository $repository */ $repository = $this->loadHelper('extension_repository'); $repository->init(); + + /* @var helper_plugin_extension_extension $extension */ + $extension = $this->loadHelper('extension_extension'); + + if ($INPUT->post->has('fn')) { + $actions = $INPUT->post->arr('fn'); + foreach ($actions as $action => $extensions) { + foreach ($extensions as $extname => $label) { + switch ($action) { + case 'info': + $this->infoFor = $extname; + break; + case 'install': + msg('Not implemented'); + break; + case 'reinstall': + case 'update': + $extension->setExtension($extname, false); + $status = $extension->installOrUpdate(); + if ($status !== true) { + msg($status, -1); + } else { + msg(sprintf($this->getLang('msg_update_success'), hsc($extension->getName())), 1); + } + break; + case 'uninstall': + $extension->setExtension($extname, false); + $status = $extension->uninstall(); + if ($status !== true) { + msg($status, -1); + } else { + msg(sprintf($this->getLang('msg_delete_success'), hsc($extension->getName())), 1); + } + break; + case 'enable'; + $extension->setExtension($extname, false); + $status = $extension->enable(); + if ($status !== true) { + msg($status, -1); + } else { + msg(sprintf($this->getLang('msg_enabled'), hsc($extension->getName())), 1); + } + break; + case 'disable'; + $extension->setExtension($extname, false); + $status = $extension->disable(); + if ($status !== true) { + msg($status, -1); + } else { + msg(sprintf($this->getLang('msg_disabled'), hsc($extension->getName())), 1); + } + break; + } + } + } + } } /** - * Render HTML output, e.g. helpful text and a form + * Render HTML output */ public function html() { /* @var Doku_Plugin_Controller $plugin_controller */ global $plugin_controller; ptln('

'.$this->getLang('menu').'

'); + ptln('
'); $pluginlist = $plugin_controller->getList('', true); /* @var helper_plugin_extension_extension $extension */ $extension = $this->loadHelper('extension_extension'); + /* @var helper_plugin_extension_list $list */ + $list = $this->loadHelper('extension_list'); + $list->start_form(); foreach ($pluginlist as $name) { $extension->setExtension($name, false); - ptln('

'.hsc($extension->getName()).'

'); - ptln('

'.hsc($extension->getDescription()).'

'); - ptln('

Latest available version: '.hsc($extension->getLastUpdate()).'

'); - ptln('

Installed version: '.hsc($extension->getInstalledVersion()).'

'); + $list->add_row($extension, $name == $this->infoFor); } + $list->end_form(); + $list->render(); + ptln('
'); } } diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index b80e56a4d..093ee7828 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -64,6 +64,35 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { return is_dir($this->getInstallDir()); } + /** + * If the extension is bundled + * + * @return bool If the extension is bundled + */ + public function isBundled() { + if (!empty($this->remoteInfo['bundled'])) return $this->remoteInfo['bundled']; + return in_array($this->name, + array('acl', 'info', 'extension', 'test', 'revert', 'popularity', 'config', 'plugin', 'safefnrecode', 'authplain')); + } + + /** + * If the extension is protected + * + * @return bool if the extension is protected + */ + public function isProtected() { + return in_array($this->name, array('acl', 'config', 'info', 'plugin', 'revert', 'usermanager')); + } + + /** + * If the extension is installed in the correct directory + * + * @return bool If the extension is installed in the correct directory + */ + public function isInWrongFolder() { + return $this->name != $this->getBase(); + } + /** * If the extension is enabled * @@ -97,6 +126,15 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { return $this->is_template; } + /** + * Get the name of the installation directory + * + * @return string The name of the installation directory + */ + public function getInstallName() { + return $this->name; + } + // Data from plugin.info.txt/template.info.txt or the repo when not available locally /** * Get the basename of the extension @@ -104,6 +142,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string The basename */ public function getBase() { + if (!empty($this->localInfo['base'])) return $this->localInfo['base']; return $this->name; } @@ -113,20 +152,20 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string The display name */ public function getName() { - if (isset($this->localInfo['name'])) return $this->localInfo['name']; - if (isset($this->remoteInfo['name'])) return $this->remoteInfo['name']; + if (!empty($this->localInfo['name'])) return $this->localInfo['name']; + if (!empty($this->remoteInfo['name'])) return $this->remoteInfo['name']; return $this->name; } /** * Get the author name of the extension * - * @return string The name of the author + * @return string|bool The name of the author or false if there is none */ public function getAuthor() { - if (isset($this->localInfo['author'])) return $this->localInfo['author']; - if (isset($this->remoteInfo['author'])) return $this->remoteInfo['author']; - return $this->getLang('unknownauthor'); + if (!empty($this->localInfo['author'])) return $this->localInfo['author']; + if (!empty($this->remoteInfo['author'])) return $this->remoteInfo['author']; + return false; } /** @@ -136,7 +175,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { */ public function getEmail() { // email is only in the local data - if (isset($this->localInfo['email'])) return $this->localInfo['email']; + if (!empty($this->localInfo['email'])) return $this->localInfo['email']; return false; } @@ -146,8 +185,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string|bool The md5sum of the email if there is any, false otherwise */ public function getEmailID() { - if (isset($this->remoteInfo['emailid'])) return $this->remoteInfo['emailid']; - if (isset($this->localInfo['email'])) return md5($this->localInfo['email']); + if (!empty($this->remoteInfo['emailid'])) return $this->remoteInfo['emailid']; + if (!empty($this->localInfo['email'])) return md5($this->localInfo['email']); return false; } @@ -157,8 +196,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string The description */ public function getDescription() { - if (isset($this->localInfo['desc'])) return $this->localInfo['desc']; - if (isset($this->remoteInfo['description'])) return $this->remoteInfo['description']; + if (!empty($this->localInfo['desc'])) return $this->localInfo['desc']; + if (!empty($this->remoteInfo['description'])) return $this->remoteInfo['description']; return ''; } @@ -168,8 +207,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string The URL */ public function getURL() { - if (isset($this->localInfo['url'])) return $this->localInfo['url']; - return 'https://www.dokuwiki.org/plugin:'.$this->name; + if (!empty($this->localInfo['url'])) return $this->localInfo['url']; + return 'https://www.dokuwiki.org/'.($this->isTemplate() ? 'template' : 'plugin').':'.$this->getBase(); } /** @@ -178,28 +217,66 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string|bool The version, usually in the form yyyy-mm-dd if there is any */ public function getInstalledVersion() { - if (isset($this->localInfo['date'])) return $this->localInfo['date']; + if (!empty($this->localInfo['date'])) return $this->localInfo['date']; if ($this->isInstalled()) return $this->getLang('unknownversion'); return false; } + /** + * Get the install date of the current version + * + * @return string|bool The date of the last update or false if not available + */ + public function getUpdateDate() { + if (!empty($this->managerData['updated'])) return $this->managerData['updated']; + return false; + } + + /** + * Get the date of the installation of the plugin + * + * @return string|bool The date of the installation or false if not available + */ + public function getInstallDate() { + if (!empty($this->managerData['installed'])) return $this->managerData['installed']; + return false; + } + /** * Get the names of the dependencies of this extension * * @return array The base names of the dependencies */ public function getDependencies() { - if (isset($this->remoteInfo['dependencies'])) return $this->remoteInfo['dependencies']; + if (!empty($this->remoteInfo['dependencies'])) return $this->remoteInfo['dependencies']; return array(); } + /** + * Get the names of the missing dependencies + * + * @return array The base names of the missing dependencies + */ + public function getMissingDependencies() { + /* @var Doku_Plugin_Controller $plugin_controller */ + global $plugin_controller; + $dependencies = $this->getDependencies(); + $missing_dependencies = array(); + foreach ($dependencies as $dependency) { + if ($plugin_controller->isdisabled($dependency)) { + $missing_dependencies[] = $dependency; + } + } + return $missing_dependencies; + } + /** * Get the names of all conflicting extensions * * @return array The names of the conflicting extensions */ public function getConflicts() { - if (isset($this->remoteInfo['conflicts'])) return $this->remoteInfo['dependencies']; + if (!empty($this->remoteInfo['conflicts'])) return $this->remoteInfo['dependencies']; return array(); } @@ -209,7 +286,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return array The names of similar extensions */ public function getSimilarExtensions() { - if (isset($this->remoteInfo['similar'])) return $this->remoteInfo['similar']; + if (!empty($this->remoteInfo['similar'])) return $this->remoteInfo['similar']; return array(); } @@ -219,17 +296,28 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return array The names of the tags of the extension */ public function getTags() { - if (isset($this->remoteInfo['tags'])) return $this->remoteInfo['tags']; + if (!empty($this->remoteInfo['tags'])) return $this->remoteInfo['tags']; return array(); } + /** + * Get the popularity information as floating point number [0,1] + * + * @return float|bool The popularity information or false if it isn't available + */ + public function getPopularity() { + if (!empty($this->remoteInfo['popularity'])) return $this->remoteInfo['popularity']/200.0; + return false; + } + + /** * Get the text of the security warning if there is any * * @return string|bool The security warning if there is any, false otherwise */ public function getSecurityWarning() { - if (isset($this->remoteInfo['securitywarning'])) return $this->remoteInfo['securitywarning']; + if (!empty($this->remoteInfo['securitywarning'])) return $this->remoteInfo['securitywarning']; return false; } @@ -239,7 +327,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string|bool The security issue if there is any, false otherwise */ public function getSecurityIssue() { - if (isset($this->remoteInfo['securityissue'])) return $this->remoteInfo['securityissue']; + if (!empty($this->remoteInfo['securityissue'])) return $this->remoteInfo['securityissue']; return false; } @@ -249,17 +337,26 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string|bool The screenshot URL if there is any, false otherwise */ public function getScreenshotURL() { - if (isset($this->remoteInfo['screenshoturl'])) return $this->remoteInfo['screenshoturl']; + if (!empty($this->remoteInfo['screenshoturl'])) return $this->remoteInfo['screenshoturl']; return false; } + /** + * Get the URL of the thumbnail of the extension if there is any + * + * @return string|bool The thumbnail URL if there is any, false otherwise + */ + public function getThumbnailURL() { + if (!empty($this->remoteInfo['thumbnailurl'])) return $this->remoteInfo['thumbnailurl']; + return false; + } /** * Get the last used download URL of the extension if there is any * * @return string|bool The previously used download URL, false if the extension has been installed manually */ public function getLastDownloadURL() { - if (isset($this->managerData['downloadurl'])) return $this->managerData['downloadurl']; + if (!empty($this->managerData['downloadurl'])) return $this->managerData['downloadurl']; return false; } @@ -269,17 +366,28 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string|bool The download URL if there is any, false otherwise */ public function getDownloadURL() { - if (isset($this->remoteInfo['downloadurl'])) return $this->remoteInfo['downloadurl']; + if (!empty($this->remoteInfo['downloadurl'])) return $this->remoteInfo['downloadurl']; return false; } + /** + * If the download URL has changed since the last download + * + * @return bool If the download URL has changed + */ + public function hasDownloadURLChanged() { + $lasturl = $this->getLastDownloadURL(); + $currenturl = $this->getDownloadURL(); + return ($lasturl && $currenturl && $lasturl != $currenturl); + } + /** * Get the bug tracker URL of the extension if there is any * * @return string|bool The bug tracker URL if there is any, false otherwise */ public function getBugtrackerURL() { - if (isset($this->remoteInfo['bugtracker'])) return $this->remoteInfo['bugtracker']; + if (!empty($this->remoteInfo['bugtracker'])) return $this->remoteInfo['bugtracker']; return false; } @@ -289,7 +397,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string|bool The URL of the source repository if there is any, false otherwise */ public function getSourcerepoURL() { - if (isset($this->remoteInfo['sourcerepo'])) return $this->remoteInfo['sourcerepo']; + if (!empty($this->remoteInfo['sourcerepo'])) return $this->remoteInfo['sourcerepo']; return false; } @@ -299,7 +407,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string|bool The donation URL if there is any, false otherwise */ public function getDonationURL() { - if (isset($this->remoteInfo['donationurl'])) return $this->remoteInfo['donationurl']; + if (!empty($this->remoteInfo['donationurl'])) return $this->remoteInfo['donationurl']; return false; } @@ -309,7 +417,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return array The type(s) as array of strings */ public function getTypes() { - if (isset($this->remoteInfo['types'])) return explode(', ', $this->remoteInfo['types']); + if (!empty($this->remoteInfo['types'])) return $this->remoteInfo['types']; if ($this->isTemplate()) return array(32 => 'template'); return array(); } @@ -320,7 +428,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return array The versions in the form yyyy-mm-dd => ('label' => label, 'implicit' => implicit) */ public function getCompatibleVersions() { - if (isset($this->remoteInfo['compatible'])) return $this->remoteInfo['compatible']; + if (!empty($this->remoteInfo['compatible'])) return $this->remoteInfo['compatible']; return array(); } @@ -330,7 +438,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string|bool The last available update in the form yyyy-mm-dd if there is any, false otherwise */ public function getLastUpdate() { - if (isset($this->remoteInfo['lastupdate'])) return $this->remoteInfo['lastupdate']; + if (!empty($this->remoteInfo['lastupdate'])) return $this->remoteInfo['lastupdate']; return false; } @@ -392,6 +500,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { $status = 'Error, the requested extension hasn\'t been installed or updated'; } $this->setExtension($this->name, $this->isTemplate()); + $this->purgeCache(); } $this->dir_delete(dirname($path)); } @@ -404,6 +513,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return bool If the plugin was sucessfully installed */ public function uninstall() { + $this->purgeCache(); return $this->dir_delete($this->getInstallDir()); } @@ -417,8 +527,9 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { /* @var Doku_Plugin_Controller $plugin_controller */ global $plugin_controller; if (!$this->isInstalled()) return $this->getLang('notinstalled'); - if (!$this->isEnabled()) return $this->getLang('alreadyenabled'); + if ($this->isEnabled()) return $this->getLang('alreadyenabled'); if ($plugin_controller->enable($this->name)) { + $this->purgeCache(); return true; } else { return $this->getLang('pluginlistsaveerror'); @@ -438,12 +549,24 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { if (!$this->isInstalled()) return $this->getLang('notinstalled'); if (!$this->isEnabled()) return $this->getLang('alreadydisabled'); if ($plugin_controller->disable($this->name)) { + $this->purgeCache(); return true; } else { return $this->getLang('pluginlistsaveerror'); } } + /** + * Purge the cache by touching the main configuration file + */ + protected function purgeCache() { + global $config_cascade; + + // expire dokuwiki caches + // touching local.php expires wiki page, JS and CSS caches + @touch(reset($config_cascade['main']['local'])); + } + /** * Read local extension data either from info.txt or getInfo() */ @@ -463,7 +586,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { foreach($plugin_types as $type) { if(@file_exists($path.$type.'.php')) { - $plugin = plugin_load($type, $this->getBase()); + $plugin = plugin_load($type, $this->name); if ($plugin) break; } @@ -471,7 +594,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { while(false !== ($cp = readdir($dh))) { if($cp == '.' || $cp == '..' || strtolower(substr($cp, -4)) != '.php') continue; - $plugin = plugin_load($type, $this->getBase().'_'.substr($cp, 0, -4)); + $plugin = plugin_load($type, $this->name.'_'.substr($cp, 0, -4)); if ($plugin) break; } if ($plugin) break; @@ -551,7 +674,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { public function download($url, &$path) { // check the url $matches = array(); - if(!preg_match("/[^/]*$/", $url, $matches) || !$matches[0]) { + if(!preg_match("/[^\/]*$/", $url, $matches) || !$matches[0]) { return $this->getLang('baddownloadurl'); } $file = $matches[0]; diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php new file mode 100644 index 000000000..ffb88114d --- /dev/null +++ b/lib/plugins/extension/helper/list.php @@ -0,0 +1,477 @@ + + */ + +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +/** + * Class helper_plugin_extension_extension represents a single extension (plugin or template) + */ +class helper_plugin_extension_list extends DokuWiki_Plugin { + protected $form = ''; + + function start_form() { + $this->form .= '
'; + $hidden = array( + 'do'=>'admin', + 'page'=>'extension', + 'sectok'=>getSecurityToken() + ); + $this->add_hidden($hidden); + $this->form .= '
    '; + } + /** + * Build single row of extension table + * @param helper_plugin_extension_extension $extension The extension that shall be added + * @param bool $showinfo Show the info area + */ + function add_row(helper_plugin_extension_extension $extension, $showinfo = false) { + $this->start_row($extension); + $this->populate_column('legend', $this->make_legend($extension, $showinfo)); + $this->populate_column('actions', $this->make_actions($extension)); + $this->end_row(); + } + + /** + * Adds a header to the form + * + * @param string $id The id of the header + * @param string $header The content of the header + * @param int $level The level of the header + */ + function add_header($id, $header, $level = 2) { + $this->form .=''.hsc($header).''; + } + + /** + * Adds a paragraph to the form + * + * @param string $data The content + */ + function add_p($data) { + $this->form .= '

    '.hsc($data).'

    '; + } + + /** + * Add hidden fields to the form with the given data + * @param array $array + */ + function add_hidden(array $array) { + $this->form .= '
    '; + foreach ($array as $key => $value) { + $this->form .= ''; + } + $this->form .= '
    '; + } + + /** + * Add closing tags + */ + function end_form() { + $this->form .= '
'; + $this->form .= '
'; + } + + /** + * Print the form + */ + function render() { + echo $this->form; + } + + /** + * Start the HTML for the row for the extension + * + * @param helper_plugin_extension_extension $extension The extension + */ + private function start_row(helper_plugin_extension_extension $extension) { + $this->form .= '
  • '; + } + + /** + * Add a column with the given class and content + * @param string $class The class name + * @param string $html The content + */ + private function populate_column($class, $html) { + $this->form .= '
    '.$html.'
    '; + } + + /** + * End the row + */ + private function end_row() { + $this->form .= '
  • '.DOKU_LF; + } + + /** + * Generate the link to the plugin homepage + * + * @param helper_plugin_extension_extension $extension The extension + * @return string The HTML code + */ + function make_homepagelink(helper_plugin_extension_extension $extension) { + $text = $this->getLang('homepage_link'); + $url = hsc($extension->getURL()); + return ''.$text.' '; + } + + /** + * Generate the class name for the row of the extensio + * + * @param helper_plugin_extension_extension $extension The extension object + * @return string The class name + */ + function make_class(helper_plugin_extension_extension $extension) { + $class = ($extension->isTemplate()) ? 'template' : 'plugin'; + if($extension->isInstalled()) { + $class.=' installed'; + $class.= ($extension->isEnabled()) ? ' enabled':' disabled'; + } + if(!$extension->canModify()) $class.= ' notselect'; + if($extension->isProtected()) $class.= ' protected'; + //if($this->showinfo) $class.= ' showinfo'; + return $class; + } + + /** + * Generate a link to the author of the extension + * + * @param helper_plugin_extension_extension $extension The extension object + * @return string The HTML code of the link + */ + function make_author(helper_plugin_extension_extension $extension) { + global $ID; + + if($extension->getAuthor()) { + + $params = array( + 'do'=>'admin', + 'page'=>'extension', + 'tab'=>'search', + 'q'=>'author:'.$extension->getAuthor() + ); + $url = wl($ID, $params); + return ''.hsc($extension->getAuthor()).''; + } + return "".$this->getLang('unknown_author').""; + } + + /** + * Get the link and image tag for the screenshot/thumbnail + * + * @param helper_plugin_extension_extension $extension The extension object + * @return string The HTML code + */ + function make_screenshot(helper_plugin_extension_extension $extension) { + if($extension->getScreenshotURL()) { + $img = ''. + ''.hsc($extension->getName()).''. + ''; + } elseif($extension->isTemplate()) { + $img = 'template'; + + } else { + $img = 'plugin'; + } + return '
    '.$img.'
    '; + } + + /** + * Extension main description + * + * @param helper_plugin_extension_extension $extension The extension object + * @param bool $showinfo Show the info section + * @return string The HTML code + */ + function make_legend(helper_plugin_extension_extension $extension, $showinfo = false) { + $return = '
    '; + $return .= '

    '; + $return .= sprintf($this->getLang('extensionby'), hsc($extension->getName()), $this->make_author($extension)); + $return .= '

    '; + + $return .= $this->make_screenshot($extension); + + $popularity = $extension->getPopularity(); + if ($popularity !== false && !$extension->isBundled()) { + $popularityText = sprintf($this->getLang('popularity'), $popularity); + $return .= '
    '; + } + + $return .= '

    '; + if($extension->getDescription()) { + $return .= hsc($extension->getDescription()).' '; + } + $return .= '

    '; + + $return .= $this->make_linkbar($extension); + $return .= $this->make_action('info', $extension, $showinfo); + if ($showinfo) { + $return .= $this->make_info($extension); + } + $return .= $this->make_noticearea($extension); + $return .= '
    '; + return $return; + } + + /** + * Generate the link bar HTML code + * + * @param helper_plugin_extension_extension $extension The extension instance + * @return string The HTML code + */ + function make_linkbar(helper_plugin_extension_extension $extension) { + $return = ''; + $return .= $this->make_homepagelink($extension); + if ($extension->getBugtrackerURL()) { + $return .= ' '.$this->getLang('bugs_features').' '; + } + foreach ($extension->getTags() as $tag) { + $return .= hsc($tag).' '; //$this->manager->handler->html_taglink($tag); + } + $return .= ''; + return $return; + } + + /** + * Notice area + * + * @param helper_plugin_extension_extension $extension The extension + * @return string The HTML code + */ + function make_noticearea(helper_plugin_extension_extension $extension) { + $return = ''; + $missing_dependencies = $extension->getMissingDependencies(); + if(!empty($missing_dependencies)) { + $return .= '
    '. + sprintf($this->getLang('missing_dependency'), implode(', ', /*array_map(array($this->helper, 'make_extensionsearchlink'),*/ $missing_dependencies)). + '
    '; + } + if($extension->isInWrongFolder()) { + $return .= '
    '. + sprintf($this->getLang('wrong_folder'), hsc($extension->getInstallName()), hsc($extension->getBase())). + '
    '; + } + if(($securityissue = $extension->getSecurityIssue()) !== false) { + $return .= '
    '. + sprintf($this->getLang('security_issue'), hsc($securityissue )). + '
    '; + } + if(($securitywarning = $extension->getSecurityWarning()) !== false) { + $return .= '
    '. + sprintf($this->getLang('security_warning'), hsc($securitywarning)). + '
    '; + } + if($extension->updateAvailable()) { + $return .= '
    '. + sprintf($this->getLang('update_available'), hsc($extension->getLastUpdate())). + '
    '; + } + if($extension->hasDownloadURLChanged()) { + $return .= '
    '. + sprintf($this->getLang('url_change'), hsc($extension->getDownloadURL()), hsc($extension->getLastDownloadURL())). + '
    '; + } + return $return; + } + + /** + * Create a link from the given URL + * + * Shortens the URL for display + * + * @param string $url + * + * @return string HTML link + */ + function shortlink($url){ + $link = parse_url($url); + + $base = $link['host']; + if($link['port']) $base .= $base.':'.$link['port']; + $long = $link['path']; + if($link['query']) $long .= $link['query']; + + $name = shorten($base, $long, 55); + + return ''.hsc($name).''; + } + + /** + * Plugin/template details + * + * @param helper_plugin_extension_extension $extension The extension + * @return string The HTML code + */ + function make_info(helper_plugin_extension_extension $extension) { + $default = $this->getLang('unknown'); + $return = '
    '; + + if (!$extension->isBundled()) { + $return .= '
    '.$this->getLang('downloadurl').'
    '; + $return .= '
    '; + $return .= ($extension->getDownloadURL() ? $this->shortlink($extension->getDownloadURL()) : $default); + $return .= '
    '; + + $return .= '
    '.$this->getLang('repository').'
    '; + $return .= '
    '; + $return .= ($extension->getSourcerepoURL() ? $this->shortlink($extension->getSourcerepoURL()) : $default); + $return .= '
    '; + } + + if ($extension->isInstalled()) { + if ($extension->getInstalledVersion()) { + $return .= '
    '.$this->getLang('installed_version').'
    '; + $return .= '
    '; + $return .= hsc($extension->getInstalledVersion()); + $return .= '
    '; + } else { + $return .= '
    '.$this->getLang('install_date').'
    '; + $return .= '
    '; + $return .= ($extension->getUpdateDate() ? hsc($extension->getUpdateDate()) : $this->getLang('unknown')); + $return .= '
    '; + } + } + if (!$extension->isInstalled() || $extension->updateAvailable()) { + $return .= '
    '.$this->getLang('available_version').'
    '; + $return .= '
    '; + $return .= ($extension->getLastUpdate() ? hsc($extension->getLastUpdate()) : $this->getLang('unknown')); + $return .= '
    '; + } + + if($extension->getInstallDate()) { + $return .= '
    '.$this->getLang('installed').'
    '; + $return .= '
    '; + $return .= hsc($extension->getInstallDate()); + $return .= '
    '; + } + + $return .= '
    '.$this->getLang('provides').'
    '; + $return .= '
    '; + $return .= ($extension->getTypes() ? hsc(implode(', ', $extension->getTypes())) : $default); + $return .= '
    '; + + if($extension->getCompatibleVersions()) { + $return .= '
    '.$this->getLang('compatible').'
    '; + $return .= '
    '; + foreach ($extension->getCompatibleVersions() as $date => $version) { + $return .= $version['label'].' ('.$date.'), '; + } + $return .= '
    '; + } + if($extension->getDependencies()) { + $return .= '
    '.$this->getLang('depends').'
    '; + $return .= '
    '; + $return .= $this->make_linklist($extension->getDependencies()); + $return .= '
    '; + } + + if($extension->getSimilarExtensions()) { + $return .= '
    '.$this->getLang('similar').'
    '; + $return .= '
    '; + $return .= $this->make_linklist($extension->getSimilarExtensions()); + $return .= '
    '; + } + + if($extension->getConflicts()) { + $return .= '
    '.$this->getLang('conflicts').'
    '; + $return .= '
    '; + $return .= $this->make_linklist($extension->getConflicts()); + $return .= '
    '; + } + if ($extension->getDonationURL()) { + $return .= ''; + } + $return .= '
    '; + return $return; + } + + /** + * Generate a list of links for extensions + * @param array $links The links + * @return string The HTML code + */ + function make_linklist($links) { + $return = ''; + foreach ($links as $link) { + $dokulink = hsc($link); + if (strpos($link, 'template:') !== 0) $dokulink = 'plugin:'.$dokulink; + $return .= ''.$link.' '; + } + return $return; + } + + /** + * Display the action buttons if they are possible + * + * @param helper_plugin_extension_extension $extension The extension + * @return string The HTML code + */ + function make_actions(helper_plugin_extension_extension $extension) { + $return = ''; + if (!$extension->isInstalled() && $extension->canModify() === true) { + $return .= $this->make_action('install', $extension); + } elseif ($extension->canModify()) { + if (!$extension->isBundled()) { + $return .= $this->make_action('uninstall', $extension); + if ($extension->getDownloadURL()) { + if ($extension->updateAvailable()) { + $return .= $this->make_action('update', $extension); + } else { + $return .= $this->make_action('reinstall', $extension); + } + } + } + if (!$extension->isProtected()) { + if ($extension->isEnabled()) { + $return .= $this->make_action('disable', $extension); + } else { + $return .= $this->make_action('enable', $extension); + } + } + } + + if (!$extension->isInstalled()) { + $return .= ' '.$this->getLang('available_version').' '; + $return .= ($extension->getLastUpdate() ? hsc($extension->getLastUpdate()) : $this->getLang('unknown')).''; + } + + return $return; + } + + /** + * Display an action button for an extension + * + * @param string $action The action + * @param helper_plugin_extension_extension $extension The extension + * @param bool $showinfo If the info block is shown + * @return string The HTML code + */ + function make_action($action, $extension, $showinfo = false) { + $title = $revertAction = $extraClass = ''; + + switch ($action) { + case 'info': + $title = 'title="'.$this->getLang('btn_info').'"'; + if ($showinfo) { + $revertAction = '-'; + $extraClass = 'close'; + } + break; + case 'install': + case 'reinstall': + $title = 'title="'.$extension->getDownloadURL().'"'; + break; + } + + $classes = 'button '.$action.' '.$extraClass; + $name = 'fn['.$action.']['.$revertAction.hsc($extension->getInstallName()).']'; + + return ''; + } +} diff --git a/lib/plugins/extension/images/disabled.png b/lib/plugins/extension/images/disabled.png new file mode 100644 index 000000000..7a0dbb3b5 Binary files /dev/null and b/lib/plugins/extension/images/disabled.png differ diff --git a/lib/plugins/extension/images/donate.png b/lib/plugins/extension/images/donate.png new file mode 100644 index 000000000..b26ceb66e Binary files /dev/null and b/lib/plugins/extension/images/donate.png differ diff --git a/lib/plugins/extension/images/down.png b/lib/plugins/extension/images/down.png new file mode 100644 index 000000000..df7beda4e Binary files /dev/null and b/lib/plugins/extension/images/down.png differ diff --git a/lib/plugins/extension/images/enabled.png b/lib/plugins/extension/images/enabled.png new file mode 100644 index 000000000..7c051cda1 Binary files /dev/null and b/lib/plugins/extension/images/enabled.png differ diff --git a/lib/plugins/extension/images/icons.xcf b/lib/plugins/extension/images/icons.xcf new file mode 100644 index 000000000..a99747d81 Binary files /dev/null and b/lib/plugins/extension/images/icons.xcf differ diff --git a/lib/plugins/extension/images/license.txt b/lib/plugins/extension/images/license.txt new file mode 100644 index 000000000..254b9cdf6 --- /dev/null +++ b/lib/plugins/extension/images/license.txt @@ -0,0 +1,4 @@ +enabled.png - CC-BY-ND, (c) Emey87 http://www.iconfinder.com/icondetails/65590/48/lightbulb_icon +disabled.png - CC-BY-ND, (c) Emey87 http://www.iconfinder.com/icondetails/65589/48/idea_lightbulb_off_icon +plugin.png - public domain, (c) nicubunu, http://openclipart.org/detail/15093/blue-jigsaw-piece-07-by-nicubunu +template.png - public domain, (c) mathec, http://openclipart.org/detail/166596/palette-by-mathec diff --git a/lib/plugins/extension/images/plugin.png b/lib/plugins/extension/images/plugin.png new file mode 100644 index 000000000..b9133681f Binary files /dev/null and b/lib/plugins/extension/images/plugin.png differ diff --git a/lib/plugins/extension/images/template.png b/lib/plugins/extension/images/template.png new file mode 100644 index 000000000..383c4d0a3 Binary files /dev/null and b/lib/plugins/extension/images/template.png differ diff --git a/lib/plugins/extension/images/up.png b/lib/plugins/extension/images/up.png new file mode 100644 index 000000000..ec9337715 Binary files /dev/null and b/lib/plugins/extension/images/up.png differ diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index f0999ff01..b3a451ecc 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -3,6 +3,7 @@ * English language file for extension plugin * * @author Michael Hamann + * @author Christopher Smith */ // menu entry for admin plugins @@ -16,6 +17,100 @@ $lang['pluginlistsaveerror'] = 'There was an error saving the plugin list'; $lang['unknownauthor'] = 'Unknown author'; $lang['unknownversion'] = 'Unknown version'; +// extension list +$lang['btn_info'] = 'Show more info'; +$lang['btn_update'] = 'Update'; +$lang['btn_uninstall'] = 'Uninstall'; +$lang['btn_enable'] = 'Enable'; +$lang['btn_disable'] = 'Disable'; +//$lang['btn_disable_all'] = 'Disable all'; +//$lang['btn_settings'] = 'Settings'; +$lang['btn_install'] = 'Install'; +$lang['btn_reinstall'] = 'Re-install'; +//$lang['btn_disdown'] = 'Download as Disabled'; +//$lang['btn_dependown'] = 'Download with dependencies'; + +$lang['extensionby'] = '%s by %s'; +$lang['popularity'] = 'Popularity: %s'; +$lang['homepage_link'] = 'Docs'; +$lang['bugs_features'] = 'Bugs'; +$lang['author_hint'] = 'Search extensions by this author'; +$lang['tag_hint'] = 'Search extensions with this tag'; +$lang['installed'] = 'Installed:'; +$lang['lastupdate'] = 'Last updated:'; +$lang['downloadurl'] = 'Download URL:'; +$lang['repository'] = 'Repository:'; +$lang['unknown'] = 'unknown'; +$lang['installed_version'] = 'Installed version:'; +$lang['install_date'] = 'Your last update:'; +$lang['available_version'] = 'Version:'; +$lang['compatible'] = 'Compatible with:'; +$lang['depends'] = 'Depends on:'; +$lang['similar'] = 'Similar to:'; +$lang['conflicts'] = 'Conflicts with:'; +$lang['donate'] = 'Donate'; +$lang['bundled'] = 'bundled'; +$lang['manual_install'] = 'manual install'; + +$lang['msg_tpl_uninstalled'] = 'Template %s uninstalled'; +$lang['msg_tpl_uninstalled'] = 'Template %s could not be uninstalled'; +$lang['msg_uninstalled'] = 'Plugin %s uninstalled'; +$lang['msg_uninstalled'] = 'Plugin %s could not be uninstalled'; + +$lang['msg_tpl_enabled'] = 'Template %s enabled'; +$lang['msg_tpl_notenabled'] = 'Template %s could not be enabled, check file permissions'; +$lang['msg_enabled'] = 'Plugin %s enabled'; +$lang['msg_notenabled'] = 'Plugin %s could not be enabled, check file permissions'; + +$lang['msg_disabled'] = 'Plugin %s disabled'; +$lang['msg_notdisabled'] = 'Plugin %s could not be disabled, check file permissions'; + +$lang['msg_url_failed'] = 'URL [%s] could not be downloaded.
    %s'; +$lang['msg_download_failed'] = 'Plugin %s could not be downloaded.
    %s'; +$lang['msg_download_success'] = 'Plugin %s installed successfully'; +$lang['msg_tpl_download_failed'] = 'Template %s could not be downloaded.
    %s'; +$lang['msg_tpl_download_success'] = 'Template %s installed successfully'; +$lang['msg_download_pkg_success'] = '%s extension package successfully installed (%s)'; +$lang['msg_tpl_download_pkg_success'] = '%s extension package successfully installed (%s)'; + +$lang['msg_update_success'] = 'Plugin %s successfully updated'; +$lang['msg_update_failed'] = 'Update of plugin %s failed.
    %s'; +$lang['msg_tpl_update_success'] = 'Template %s successfully updated'; +$lang['msg_tpl_update_failed'] = 'Update of template %s failed.
    %s'; +$lang['msg_update_pkg_success'] = '%s extension package successfully updated (%s)'; +$lang['msg_tpl_update_pkg_success'] = '%s extension package successfully updated (%s)'; + +$lang['msg_reinstall_success'] = 'Plugin %s re-installed successfully'; +$lang['msg_reinstall_failed'] = 'Failed to re-install plugin %s.
    %s'; +$lang['msg_tpl_reinstall_success'] = 'Template %s re-installed successfully'; +$lang['msg_tpl_reinstall_failed'] = 'Failed to re-install template %s.
    %s'; +$lang['msg_reinstall_pkg_success'] = '%s extension package successfully reinstalled (%s)'; +$lang['msg_tpl_reinstall_pkg_success'] = '%s extension package successfully reinstalled (%s)'; + +// info titles +$lang['plugin'] = 'Plugin'; +$lang['provides'] = 'Provides:'; +$lang['noinfo'] = 'This plugin returned no information, it may be invalid.'; +$lang['name'] = 'Name:'; +$lang['date'] = 'Date:'; +$lang['type'] = 'Type:'; +$lang['desc'] = 'Description:'; +$lang['author'] = 'Author:'; +$lang['www'] = 'Web:'; + +// error messages +$lang['needed_by'] = 'Needed by:'; +$lang['not_writable'] = 'DokuWiki can not write to the folder'; +$lang['missing_dependency'] = 'Missing or disabled dependency: %s'; +$lang['security_issue'] = 'Security Issue: %s'; +$lang['security_warning'] = 'Security Warning: %s'; +$lang['update_available'] = 'Update: New version %s is available.'; +$lang['wrong_folder'] = 'Plugin installed incorrectly: Rename plugin directory "%s" to "%s".'; +$lang['url_change'] = 'URL changed: Download URL has changed since last download. Check if the new URL is valid before updating the extension.
    New: %s
    Old: %s'; +$lang['gitmanaged'] = 'Extension installed with git'; +$lang['bundled_source'] = 'Bundled with DokuWiki source'; +$lang['no_url'] = 'No download URL'; +$lang['no_manager'] = 'Could not find manager.dat file'; $lang['error_badurl'] = 'URL ends with slash - unable to determine file name from the url'; $lang['error_dircreate'] = 'Unable to create temporary folder to receive download'; @@ -23,5 +118,4 @@ $lang['error_download'] = 'Unable to download the file: %s'; $lang['error_decompress'] = 'Unable to decompress the downloaded file. This maybe as a result of a bad download, in which case you should try again; or the compression format may be unknown, in which case you will need to download and install manually'; $lang['error_findfolder'] = 'Unable to identify extension directory, you need to download and install manually'; $lang['error_copy'] = 'There was a file copy error while attempting to install files for directory %s: the disk could be full or file access permissions may be incorrect. This may have resulted in a partially installed plugin and leave your wiki installation unstable'; - //Setup VIM: ex: et ts=4 : diff --git a/lib/plugins/extension/style.css b/lib/plugins/extension/style.css new file mode 100644 index 000000000..1cce52be8 --- /dev/null +++ b/lib/plugins/extension/style.css @@ -0,0 +1,368 @@ +/* + * Extension plugin styles + * + * @author Christopher Smith + * @author Piyush Mishra + * @author Håkan Sandell + * @author Anika Henke + */ + +/* + * tab support not included in "Angua", copied from _mediamanager.css + */ +#extension__manager .panelHeader { + background-color: __background_alt__; + margin-bottom: 10px; + padding: 10px; + text-align: left; + /* to counter partly missing border of ul.tabs: */ + border-top: 1px solid __border__; + margin-top: -1px; +} + +#extension__manager .panelHeader p { + float: left; + font-weight: normal; + font-size: 1em; + padding: 0; + margin: 0 0 3px; +} +[dir=rtl] #extension__manager .panelHeader p { + float: right; +} + +#extension__manager ul.tabs div.message { + display: inline; + margin: 0 .5em; +} + +/* + * general layout + */ +#extension__manager h2 { + margin-left: 0; +} + +#extension__manager a.taglink { + padding: 1px 4px; + background-color: __background_neu__; + border-radius: 3px; +} +[dir=rtl] #extension__manager a.taglink { + display: inline-block; + line-height: 1.2; +} + +#extension__manager .panelHeader div.error { + margin-top: 0; + float: left; +} +[dir=rtl] #extension__manager .panelHeader div.error { + float: right; +} + +/* + * search & url download forms + */ +#extension__manager form.search, +#extension__manager form.btn_reload { + float: right; +} +[dir=rtl] #extension__manager form.search, +[dir=rtl] #extension__manager form.btn_reload { + float: left; +} + +#extension__manager div.search form.search { + float: none; +} + +#extension__manager .tagcloud { + width: 55%; + float: left; + margin: 0 0.5em 1em 0; +} +[dir=rtl] #extension__manager .tagcloud { + float: right; + margin: 0 0 1em .5em; +} + +#extension__manager .tagcloud a.taglink { + background-color: inherit; +} + +#extension__manager div.search { + width: 44%; + float: left; +} +[dir=rtl] #extension__manager div.search { + float: right; +} + +#extension__manager fieldset { + margin-top: 0.5em; + width: auto; +} + +#extension__manager fieldset p { + margin: 0.5em; + text-align: justify; + font-size: 85%; +} + +/* tag cloud */ +#extension__manager a.cl0 { font-size: 0.7em; } +#extension__manager a.cl1 { font-size: 0.9em; } +#extension__manager a.cl2 { font-size: 1em; } +#extension__manager a.cl3 { font-size: 1.3em; } +#extension__manager a.cl4 { font-size: 1.6em; } +#extension__manager a.cl5 { font-size: 1.9em; } + + +#extension__manager .extensionList input.button { + margin: 0 .3em .3em 0; +} +[dir=rtl] #extension__manager .extensionList input.button { + margin: 0 0 .3em .3em; +} + +/* + * extensions table + */ +#extension__manager .extensionList { + margin-left: 0; + margin-right: 0; + padding: 0; + list-style: none; +} + +#extension__manager .extensionList li { + margin: 0 0 .5em; + padding: 0 0 .5em; + color: __text__; + border-bottom: 1px solid __border__; + overflow: hidden; +} + +#extension__manager .legend { + position: relative; + width: 75%; + float: left; +} +[dir=rtl] #extension__manager .legend { + float: right; +} + +#extension__manager .legend > div { + padding: 0 .5em 0 132px; + border-right: 1px solid __background_alt__; + overflow: hidden; +} +[dir=rtl] #extension__manager .legend > div { + padding: 0 132px 0 .5em; + border-left: 1px solid __background_alt__; + border-right-width: 0; +} + +#extension__manager .enabled div.screenshot span { + background: transparent url(images/enabled.png) no-repeat 2px 2px; +} + +#extension__manager .disabled div.screenshot span { + background: transparent url(images/disabled.png) no-repeat 2px 2px; +} + +#extension__manager .legend div.screenshot { + margin-top: 4px; + margin-left: -132px; + max-width: 120px; + float: left; +} +[dir=rtl] #extension__manager .legend div.screenshot { + margin-left: 0; + margin-right: -132px; + float: right; +} + +#extension__manager .legend div.screenshot span { + min-height: 24px; + min-width: 24px; + position: absolute; + left: 0; +} +[dir=rtl] #extension__manager .legend div.screenshot span { + left: auto; + right: 0; +} + +#extension__manager .legend h2 { + width: 100%; + float: right; + margin: 0.2em 0 0.5em; + font-size: 100%; + font-weight: normal; + border: none; +} +[dir=rtl] #extension__manager .legend h2 { + float: left; +} + +#extension__manager .legend h2 strong { + font-size: 120%; + font-weight: bold; + vertical-align: baseline; +} + +#extension__manager .legend p { + margin: 0 0 0.6em 0; +} + +#extension__manager .legend span.linkbar { + font-size: 85%; +} + +#extension__manager .legend span.linkbar a.urlextern + a.taglink, +#extension__manager .legend span.linkbar a.interwiki + a.taglink { + margin-left: 0.4em; +} +[dir=rtl] #extension__manager .legend span.linkbar a.urlextern + a.taglink, +[dir=rtl] #extension__manager .legend span.linkbar a.interwiki + a.taglink { + margin-left: 0; +} +[dir=rtl] #extension__manager .legend span.linkbar a.urlextern, +[dir=rtl] #extension__manager .legend span.linkbar a.interwiki { + margin-left: .4em; +} + +#extension__manager .legend input.button { + background: transparent url(images/up.png) no-repeat 0 0; + box-shadow: none; + border-width: 0; + height: 14px; + text-indent: -99999px; + float: right; + margin: .5em 0 0; +} +[dir=rtl] #extension__manager .legend input.button { + float: left; + margin: .5em 0 0; +} + +#extension__manager .legend input.button.close { + background: transparent url(images/down.png) no-repeat 0 0; +} + +#extension__manager .legend div.popularity { + background-color: __background__; + border: 1px solid silver; + height: .4em; + margin: 0 auto; + padding: 1px; + width: 5.5em; + position: absolute; + right: .5em; + top: 0.2em; +} +[dir=rtl] #extension__manager .legend div.popularity { + right: auto; + left: .5em; +} + +#extension__manager .legend div.popularity div { + background-color: __border__; + height: 100%; +} + +#extension__manager .legend div.popularity div span { + display: none;/* @todo: hide accessibly */ +} + +#extension__manager .actions { + padding: 0; + font-size: 95%; + width: 25%; + float: right; + text-align: right; +} +[dir=rtl] #extension__manager .actions { + float: left; + text-align: left; +} + +#extension__manager .actions .version { + display: block; +} + +#extension__manager .actions p { + margin: 0.2em 0; + text-align: center; +} + +/* + * extensions table, detailed info box + */ +#extension__manager dl.details { + margin: 0.4em 0 0 0; + font-size: 85%; + border-top: 1px solid __background_alt__; + clear: both; +} + +#extension__manager dl.details dt { + clear: left; + float: left; + width: 25%; + margin: 0; + text-align: right; + font-weight: normal; + padding: 0.2em 5px 0 0; +} +[dir=rtl] #extension__manager dl.details dt { + clear: right; + float: right; + text-align: left; + padding: 0.2em 0 0 5px; +} + +#extension__manager dl.details dd { + margin-left: 25%; + font-weight: bold; + padding: 0.2em 0 0 5px; +} +[dir=rtl] #extension__manager dl.details dd { + margin-left: 0; + margin-right: 25%; + padding: 0.2em 5px 0 0 ; +} + +#extension__manager dl.details dd a { + font-weight: normal; +} + +#extension__manager #info__popup { + z-index: 20; + overflow: hidden; + opacity: 0.9; + border: 1px solid __border__; + background-color: __border__; /*background_other__;*/ + text-align: left; + padding: 0.2em; +} +[dir=rtl] #extension__manager #info__popup { + text-align: right; +} + +#extension__manager div.msg { + margin: 0.4em 0 0 0; +} + +#extension__manager ul.tabs div.msg { + display: inline; + margin-left: 0.4em; +} +[dir=rtl] #extension__manager ul.tabs div.msg { + margin-left: 0; + margin-right: 0.4em; +} + +/* end admin plugin styles */ -- cgit v1.2.3 From dfabb2233685be891929dd4065c257a025dc3151 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 4 Aug 2013 18:20:45 +0200 Subject: added tabURL builder --- lib/plugins/extension/helper/list.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index ffb88114d..e8b4f472f 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -474,4 +474,24 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { return ''; } + + /** + * Create an URL inside the extension manager + * + * @param string tab tb to load, empty for current tab + * @param array $params associative array of parameter to set + * @return string + */ + static public function tabURL($tab='', $params=array()){ + global $ID; + global $INPUT; + + if(!$tab) $tab = $INPUT->str('tab', 'installed', true); + $defaults = array( + 'do' => 'admin', + 'page' => 'extension', + 'tab' => $tab, + ); + return wl($ID, array_merge($defaults, $params)); + } } -- cgit v1.2.3 From b8d600ef317ee91b73133cc7af7a83cf12d5d0d9 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 4 Aug 2013 18:21:08 +0200 Subject: fixed screenshot height --- lib/plugins/extension/style.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/plugins/extension/style.css b/lib/plugins/extension/style.css index 1cce52be8..0a3a0cc0e 100644 --- a/lib/plugins/extension/style.css +++ b/lib/plugins/extension/style.css @@ -172,6 +172,11 @@ background: transparent url(images/disabled.png) no-repeat 2px 2px; } +#extension__manager div.screenshot img { + width: 120px; + height: 70px; +} + #extension__manager .legend div.screenshot { margin-top: 4px; margin-left: -132px; -- cgit v1.2.3 From 141407788877f98d4acc6eabc7cc3e831eaa8317 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 4 Aug 2013 18:22:39 +0200 Subject: fixed typo in define --- lib/plugins/extension/helper/repository.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/plugins/extension/helper/repository.php b/lib/plugins/extension/helper/repository.php index 37b9bc02c..459d7cbec 100644 --- a/lib/plugins/extension/helper/repository.php +++ b/lib/plugins/extension/helper/repository.php @@ -6,8 +6,10 @@ * @author Michael Hamann */ +define('EXTENSION_REPOSITORY_API', 'http://localhost/dokuwiki/lib/plugins/pluginrepo/api.php'); + if (!defined('EXTENSION_REPOSITORY_API_ENDPOINT')) - define('EXTENSION_REPSITORY_API', 'http://www.dokuwiki.org/lib/plugins/pluginrepo/api.php'); + define('EXTENSION_REPOSITORY_API', 'http://www.dokuwiki.org/lib/plugins/pluginrepo/api.php'); // must be run within Dokuwiki if(!defined('DOKU_INC')) die(); @@ -40,7 +42,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin { if ($request_needed) { $httpclient = new DokuHTTPClient(); - $data = $httpclient->post(EXTENSION_REPSITORY_API, $request_data); + $data = $httpclient->post(EXTENSION_REPOSITORY_API, $request_data); if ($data !== false) { $extensions = unserialize($data); foreach ($extensions as $extension) { @@ -66,7 +68,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin { if (!$cache->useCache(array('age' => 3600 * 24))) { $httpclient = new DokuHTTPClient(); $httpclient->timeout = 5; - $data = $httpclient->get(EXTENSION_REPSITORY_API.'?cmd=ping'); + $data = $httpclient->get(EXTENSION_REPOSITORY_API.'?cmd=ping'); if ($data !== false) { $this->has_access = true; $cache->storeCache(1); @@ -93,7 +95,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin { if (!isset($this->loaded_extensions[$name]) && $this->hasAccess() && !$cache->useCache(array('age' => 3600 * 24))) { $this->loaded_extensions[$name] = true; $httpclient = new DokuHTTPClient(); - $data = $httpclient->get(EXTENSION_REPSITORY_API.'?fmt=php&ext[]='.urlencode($name)); + $data = $httpclient->get(EXTENSION_REPOSITORY_API.'?fmt=php&ext[]='.urlencode($name)); if ($data !== false) { $result = unserialize($data); $cache->storeCache(serialize($result[0])); -- cgit v1.2.3 From e45b5c14dbb09dd200d66ff21de1bba960113c68 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 4 Aug 2013 18:24:20 +0200 Subject: added connectivity recheck --- lib/plugins/extension/admin.php | 7 +++++++ lib/plugins/extension/helper/repository.php | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/plugins/extension/admin.php b/lib/plugins/extension/admin.php index 373f90183..6cad58595 100644 --- a/lib/plugins/extension/admin.php +++ b/lib/plugins/extension/admin.php @@ -39,6 +39,13 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { $repository = $this->loadHelper('extension_repository'); $repository->init(); + if(!$repository->hasAccess()){ + $url = helper_plugin_extension_list::tabURL('', array('purge'=>1)); + + msg('The DokuWiki extension repository can not be reached currently. + Online Features are not available. [retry]', -1); + } + /* @var helper_plugin_extension_extension $extension */ $extension = $this->loadHelper('extension_extension'); diff --git a/lib/plugins/extension/helper/repository.php b/lib/plugins/extension/helper/repository.php index 459d7cbec..a5012ccb5 100644 --- a/lib/plugins/extension/helper/repository.php +++ b/lib/plugins/extension/helper/repository.php @@ -65,7 +65,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin { if ($this->has_access === null) { $cache = new cache('##extension_manager###hasAccess', 'repo'); $result = null; - if (!$cache->useCache(array('age' => 3600 * 24))) { + if (!$cache->useCache(array('age' => 3600 * 24, 'purge'=>1))) { $httpclient = new DokuHTTPClient(); $httpclient->timeout = 5; $data = $httpclient->get(EXTENSION_REPOSITORY_API.'?cmd=ping'); -- cgit v1.2.3 From a8332b68fa9dd8f70d2fc9d9e50c34957cf9e24d Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 4 Aug 2013 18:24:53 +0200 Subject: various gui fixes --- lib/plugins/extension/helper/extension.php | 2 ++ lib/plugins/extension/helper/list.php | 34 +++++++++++++++++++----------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 093ee7828..296b81ac5 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -53,6 +53,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { } $this->remoteInfo = $this->repository->getData(($this->isTemplate() ? 'template:' : '').$this->getBase()); + + return ($this->localInfo || $this->remoteInfo); } /** diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index e8b4f472f..816d4a444 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -10,7 +10,7 @@ if(!defined('DOKU_INC')) die(); /** - * Class helper_plugin_extension_extension represents a single extension (plugin or template) + * Class helper_plugin_extension_list takes care of creating a HTML list of extensions */ class helper_plugin_extension_list extends DokuWiki_Plugin { protected $form = ''; @@ -150,16 +150,15 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { if($extension->getAuthor()) { - $params = array( - 'do'=>'admin', - 'page'=>'extension', - 'tab'=>'search', - 'q'=>'author:'.$extension->getAuthor() - ); - $url = wl($ID, $params); - return ''.hsc($extension->getAuthor()).''; + $mailid = $extension->getEmailID(); + if($mailid){ + $url = $this->tabURL('search', array('q' => 'mailid:'.$mailid)); + return ''.hsc($extension->getAuthor()).''; + }else{ + return ''.hsc($extension->getAuthor()).''; + } } - return "".$this->getLang('unknown_author').""; + return "".$this->getLang('unknown_author').""; } /** @@ -231,8 +230,19 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { if ($extension->getBugtrackerURL()) { $return .= ' '.$this->getLang('bugs_features').' '; } - foreach ($extension->getTags() as $tag) { - $return .= hsc($tag).' '; //$this->manager->handler->html_taglink($tag); + if($extension->getTags()){ + $first = true; + echo ''; + foreach ($extension->getTags() as $tag) { + if(!$first){ + $return .= ', '; + }else{ + $first = false; + } + $url = $this->tabURL('search', array('q' => 'tag:'.$tag)); + $return .= ''.hsc($tag).''; + } + echo ''; } $return .= ''; return $return; -- cgit v1.2.3 From d7410643d8e3db12a76845370d8eee2508fa6115 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 4 Aug 2013 19:46:02 +0200 Subject: added tab navigation --- lib/plugins/extension/admin.php | 49 +++++++++++++++++------ lib/plugins/extension/helper/gui.php | 71 ++++++++++++++++++++++++++++++++++ lib/plugins/extension/helper/list.php | 35 +++++++---------- lib/plugins/extension/lang/en/lang.php | 6 ++- 4 files changed, 126 insertions(+), 35 deletions(-) create mode 100644 lib/plugins/extension/helper/gui.php diff --git a/lib/plugins/extension/admin.php b/lib/plugins/extension/admin.php index 6cad58595..4faafedb2 100644 --- a/lib/plugins/extension/admin.php +++ b/lib/plugins/extension/admin.php @@ -14,6 +14,17 @@ if(!defined('DOKU_INC')) die(); */ class admin_plugin_extension extends DokuWiki_Admin_Plugin { protected $infoFor = null; + /** @var helper_plugin_extension_gui */ + protected $gui; + + /** + * Constructor + * + * loads additional helpers + */ + public function __construct(){ + $this->gui = plugin_load('helper', 'extension_gui'); + } /** * @return int sort number in admin menu @@ -40,7 +51,7 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { $repository->init(); if(!$repository->hasAccess()){ - $url = helper_plugin_extension_list::tabURL('', array('purge'=>1)); + $url = $this->gui->tabURL('', array('purge'=>1)); msg('The DokuWiki extension repository can not be reached currently. Online Features are not available. [retry]', -1); @@ -109,21 +120,35 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { public function html() { /* @var Doku_Plugin_Controller $plugin_controller */ global $plugin_controller; + global $INPUT; ptln('

    '.$this->getLang('menu').'

    '); ptln('
    '); - $pluginlist = $plugin_controller->getList('', true); - /* @var helper_plugin_extension_extension $extension */ - $extension = $this->loadHelper('extension_extension'); - /* @var helper_plugin_extension_list $list */ - $list = $this->loadHelper('extension_list'); - $list->start_form(); - foreach ($pluginlist as $name) { - $extension->setExtension($name, false); - $list->add_row($extension, $name == $this->infoFor); + $this->gui->tabNavigation(); + + switch($INPUT->str('tab','plugins')){ + case 'search': + echo 'search interface'; + break; + case 'plugins': + default: + // FIXME move to function? + + $pluginlist = $plugin_controller->getList('', true); + /* @var helper_plugin_extension_extension $extension */ + $extension = $this->loadHelper('extension_extension'); + /* @var helper_plugin_extension_list $list */ + $list = $this->loadHelper('extension_list'); + $list->start_form(); + foreach ($pluginlist as $name) { + $extension->setExtension($name, false); + $list->add_row($extension, $name == $this->infoFor); + } + $list->end_form(); + $list->render(); } - $list->end_form(); - $list->render(); + + ptln('
    '); } } diff --git a/lib/plugins/extension/helper/gui.php b/lib/plugins/extension/helper/gui.php new file mode 100644 index 000000000..eba5fbc7f --- /dev/null +++ b/lib/plugins/extension/helper/gui.php @@ -0,0 +1,71 @@ + + */ + +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +/** + * Class helper_plugin_extension_list takes care of the overall GUI + */ +class helper_plugin_extension_gui extends DokuWiki_Plugin { + + protected $tabs = array('plugins', 'templates', 'search'); + + /** + * Print the tab navigation + * + * @fixme style active one + */ + public function tabNavigation() { + echo '
      '; + foreach(array('plugins', 'templates', 'search') as $tab) { + $url = $this->tabURL($tab); + if($this->currentTab() == $tab) { + $class = 'class="active"'; + } else { + $class = ''; + } + echo '
    • '.$this->getLang('tab_'.$tab).'
    • '; + } + echo '
    '; + } + + /** + * Return the currently selected tab + * + * @return string + */ + public function currentTab() { + global $INPUT; + + $tab = $INPUT->str('tab', 'plugins', true); + if(!in_array($tab, $this->tabs)) $tab = 'plugins'; + return $tab; + } + + /** + * Create an URL inside the extension manager + * + * @param string $tab tab to load, empty for current tab + * @param array $params associative array of parameter to set + * + * @return string + */ + public function tabURL($tab = '', $params = array()) { + global $ID; + + if(!$tab) $tab = $this->currentTab(); + $defaults = array( + 'do' => 'admin', + 'page' => 'extension', + 'tab' => $tab, + ); + return wl($ID, array_merge($defaults, $params)); + } + +} diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 816d4a444..1c337176d 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -14,6 +14,17 @@ if(!defined('DOKU_INC')) die(); */ class helper_plugin_extension_list extends DokuWiki_Plugin { protected $form = ''; + /** @var helper_plugin_extension_gui */ + protected $gui; + + /** + * Constructor + * + * loads additional helpers + */ + public function __construct(){ + $this->gui = plugin_load('helper', 'extension_gui'); + } function start_form() { $this->form .= '
    '; @@ -152,7 +163,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $mailid = $extension->getEmailID(); if($mailid){ - $url = $this->tabURL('search', array('q' => 'mailid:'.$mailid)); + $url = $this->gui->tabURL('search', array('q' => 'mailid:'.$mailid)); return ''.hsc($extension->getAuthor()).''; }else{ return ''.hsc($extension->getAuthor()).''; @@ -239,7 +250,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { }else{ $first = false; } - $url = $this->tabURL('search', array('q' => 'tag:'.$tag)); + $url = $this->gui->tabURL('search', array('q' => 'tag:'.$tag)); $return .= ''.hsc($tag).''; } echo ''; @@ -484,24 +495,4 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { return ''; } - - /** - * Create an URL inside the extension manager - * - * @param string tab tb to load, empty for current tab - * @param array $params associative array of parameter to set - * @return string - */ - static public function tabURL($tab='', $params=array()){ - global $ID; - global $INPUT; - - if(!$tab) $tab = $INPUT->str('tab', 'installed', true); - $defaults = array( - 'do' => 'admin', - 'page' => 'extension', - 'tab' => $tab, - ); - return wl($ID, array_merge($defaults, $params)); - } } diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index b3a451ecc..4439db879 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -7,7 +7,11 @@ */ // menu entry for admin plugins -$lang['menu'] = 'Extension manager'; +$lang['menu'] = 'Extension Manager'; + +$lang['tab_plugins'] = 'Installed Plugins'; +$lang['tab_templates'] = 'Installed Templates'; +$lang['tab_search'] = 'Search and Install'; // custom language strings for the plugin $lang['notimplemented'] = 'This feature hasn\'t been implemented yet'; -- cgit v1.2.3 From 5d7f3164ea4199d7cf1215a1a8a5785218c9e149 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 4 Aug 2013 20:08:30 +0200 Subject: moved display stuff to gui class, added template list --- lib/plugins/extension/admin.php | 23 +++++----------------- lib/plugins/extension/helper/gui.php | 37 ++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 18 deletions(-) diff --git a/lib/plugins/extension/admin.php b/lib/plugins/extension/admin.php index 4faafedb2..39ce9e947 100644 --- a/lib/plugins/extension/admin.php +++ b/lib/plugins/extension/admin.php @@ -118,34 +118,21 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { * Render HTML output */ public function html() { - /* @var Doku_Plugin_Controller $plugin_controller */ - global $plugin_controller; - global $INPUT; ptln('

    '.$this->getLang('menu').'

    '); ptln('
    '); $this->gui->tabNavigation(); - switch($INPUT->str('tab','plugins')){ + switch($this->gui->currentTab()){ case 'search': echo 'search interface'; break; + case 'templates': + $this->gui->templateList(); + break; case 'plugins': default: - // FIXME move to function? - - $pluginlist = $plugin_controller->getList('', true); - /* @var helper_plugin_extension_extension $extension */ - $extension = $this->loadHelper('extension_extension'); - /* @var helper_plugin_extension_list $list */ - $list = $this->loadHelper('extension_list'); - $list->start_form(); - foreach ($pluginlist as $name) { - $extension->setExtension($name, false); - $list->add_row($extension, $name == $this->infoFor); - } - $list->end_form(); - $list->render(); + $this->gui->pluginList(); } diff --git a/lib/plugins/extension/helper/gui.php b/lib/plugins/extension/helper/gui.php index eba5fbc7f..41afc2069 100644 --- a/lib/plugins/extension/helper/gui.php +++ b/lib/plugins/extension/helper/gui.php @@ -16,6 +16,43 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { protected $tabs = array('plugins', 'templates', 'search'); + + public function pluginList(){ + /* @var Doku_Plugin_Controller $plugin_controller */ + global $plugin_controller; + + $pluginlist = $plugin_controller->getList('', true); + /* @var helper_plugin_extension_extension $extension */ + $extension = $this->loadHelper('extension_extension'); + /* @var helper_plugin_extension_list $list */ + $list = $this->loadHelper('extension_list'); + $list->start_form(); + foreach ($pluginlist as $name) { + $extension->setExtension($name, false); + $list->add_row($extension, $name == $this->infoFor); + } + $list->end_form(); + $list->render(); + } + + public function templateList(){ + // FIXME do we have a real way? + $tpllist = glob(DOKU_INC.'lib/tpl/*', GLOB_ONLYDIR); + $tpllist = array_map('basename', $tpllist); + + /* @var helper_plugin_extension_extension $extension */ + $extension = $this->loadHelper('extension_extension'); + /* @var helper_plugin_extension_list $list */ + $list = $this->loadHelper('extension_list'); + $list->start_form(); + foreach ($tpllist as $name) { + $extension->setExtension($name, true); + $list->add_row($extension, $name == $this->infoFor); + } + $list->end_form(); + $list->render(); + } + /** * Print the tab navigation * -- cgit v1.2.3 From 1dd40c86eb47f24a2e7c7022592fd9cd25ff07f2 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 4 Aug 2013 20:24:19 +0200 Subject: added intros --- lib/plugins/extension/admin.php | 6 +++--- lib/plugins/extension/helper/gui.php | 22 +++++++++++++++++++--- lib/plugins/extension/lang/en/intro_plugins.txt | 1 + lib/plugins/extension/lang/en/intro_search.txt | 1 + lib/plugins/extension/lang/en/intro_templates.txt | 1 + 5 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 lib/plugins/extension/lang/en/intro_plugins.txt create mode 100644 lib/plugins/extension/lang/en/intro_search.txt create mode 100644 lib/plugins/extension/lang/en/intro_templates.txt diff --git a/lib/plugins/extension/admin.php b/lib/plugins/extension/admin.php index 39ce9e947..ee180192d 100644 --- a/lib/plugins/extension/admin.php +++ b/lib/plugins/extension/admin.php @@ -125,14 +125,14 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { switch($this->gui->currentTab()){ case 'search': - echo 'search interface'; + $this->gui->tabSearch(); break; case 'templates': - $this->gui->templateList(); + $this->gui->tabTemplates(); break; case 'plugins': default: - $this->gui->pluginList(); + $this->gui->tabPlugins(); } diff --git a/lib/plugins/extension/helper/gui.php b/lib/plugins/extension/helper/gui.php index 41afc2069..7c83a3854 100644 --- a/lib/plugins/extension/helper/gui.php +++ b/lib/plugins/extension/helper/gui.php @@ -16,11 +16,15 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { protected $tabs = array('plugins', 'templates', 'search'); - - public function pluginList(){ + /** + * display the plugin tab + */ + public function tabPlugins(){ /* @var Doku_Plugin_Controller $plugin_controller */ global $plugin_controller; + echo $this->locale_xhtml('intro_plugins'); + $pluginlist = $plugin_controller->getList('', true); /* @var helper_plugin_extension_extension $extension */ $extension = $this->loadHelper('extension_extension'); @@ -35,7 +39,12 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { $list->render(); } - public function templateList(){ + /** + * Display the template tab + */ + public function tabTemplates(){ + echo $this->locale_xhtml('intro_templates'); + // FIXME do we have a real way? $tpllist = glob(DOKU_INC.'lib/tpl/*', GLOB_ONLYDIR); $tpllist = array_map('basename', $tpllist); @@ -53,6 +62,13 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { $list->render(); } + /** + * Display the search tab + */ + public function tabSearch(){ + echo $this->locale_xhtml('intro_search'); + } + /** * Print the tab navigation * diff --git a/lib/plugins/extension/lang/en/intro_plugins.txt b/lib/plugins/extension/lang/en/intro_plugins.txt new file mode 100644 index 000000000..ef180135e --- /dev/null +++ b/lib/plugins/extension/lang/en/intro_plugins.txt @@ -0,0 +1 @@ +Here you can view, enable and disable installed plugins. \ No newline at end of file diff --git a/lib/plugins/extension/lang/en/intro_search.txt b/lib/plugins/extension/lang/en/intro_search.txt new file mode 100644 index 000000000..003c99c61 --- /dev/null +++ b/lib/plugins/extension/lang/en/intro_search.txt @@ -0,0 +1 @@ +Here you can search for available plugins and templates for DokuWiki. Be sure to read more about Plugin Security before installing FIXME add link \ No newline at end of file diff --git a/lib/plugins/extension/lang/en/intro_templates.txt b/lib/plugins/extension/lang/en/intro_templates.txt new file mode 100644 index 000000000..2b3af727b --- /dev/null +++ b/lib/plugins/extension/lang/en/intro_templates.txt @@ -0,0 +1 @@ +Here you can view, enable and disable installed templates. Note that only one template can be activated at a time. \ No newline at end of file -- cgit v1.2.3 From a218edff81be5cec78bfcb0f65042315ae4e656b Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 4 Aug 2013 20:24:28 +0200 Subject: removed test repository again --- lib/plugins/extension/helper/repository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/extension/helper/repository.php b/lib/plugins/extension/helper/repository.php index a5012ccb5..21082c0d8 100644 --- a/lib/plugins/extension/helper/repository.php +++ b/lib/plugins/extension/helper/repository.php @@ -6,7 +6,7 @@ * @author Michael Hamann */ -define('EXTENSION_REPOSITORY_API', 'http://localhost/dokuwiki/lib/plugins/pluginrepo/api.php'); +#define('EXTENSION_REPOSITORY_API', 'http://localhost/dokuwiki/lib/plugins/pluginrepo/api.php'); if (!defined('EXTENSION_REPOSITORY_API_ENDPOINT')) define('EXTENSION_REPOSITORY_API', 'http://www.dokuwiki.org/lib/plugins/pluginrepo/api.php'); -- cgit v1.2.3 From 7944abddde7619d8d59740cde19743c090d4fd3d Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 4 Aug 2013 20:34:12 +0200 Subject: translated error message --- lib/plugins/extension/admin.php | 4 +--- lib/plugins/extension/lang/en/lang.php | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/plugins/extension/admin.php b/lib/plugins/extension/admin.php index ee180192d..c9f37affb 100644 --- a/lib/plugins/extension/admin.php +++ b/lib/plugins/extension/admin.php @@ -52,9 +52,7 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { if(!$repository->hasAccess()){ $url = $this->gui->tabURL('', array('purge'=>1)); - - msg('The DokuWiki extension repository can not be reached currently. - Online Features are not available. [retry]', -1); + msg($this->getLang('repo_error').' ['.$this->getLang('repo_retry').']', -1); } /* @var helper_plugin_extension_extension $extension */ diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index 4439db879..10bf2087f 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -56,6 +56,9 @@ $lang['donate'] = 'Donate'; $lang['bundled'] = 'bundled'; $lang['manual_install'] = 'manual install'; +$lang['repo_error'] = 'The DokuWiki extension repository can not be reached currently. Online Features are not available.'; +$lang['repo_retry'] = 'Retry'; + $lang['msg_tpl_uninstalled'] = 'Template %s uninstalled'; $lang['msg_tpl_uninstalled'] = 'Template %s could not be uninstalled'; $lang['msg_uninstalled'] = 'Plugin %s uninstalled'; -- cgit v1.2.3 From e8dda2c3faf5eb61b68d5afcbea13c5802484b4a Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Aug 2013 13:08:06 +0200 Subject: added gravatar images --- lib/plugins/extension/helper/list.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 1c337176d..843697667 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -164,7 +164,8 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $mailid = $extension->getEmailID(); if($mailid){ $url = $this->gui->tabURL('search', array('q' => 'mailid:'.$mailid)); - return ''.hsc($extension->getAuthor()).''; + return ' '.hsc($extension->getAuthor()).''; + }else{ return ''.hsc($extension->getAuthor()).''; } -- cgit v1.2.3 From 55332151e03b99bbfd15e0fbaae391aae454d9eb Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Aug 2013 13:43:35 +0200 Subject: some initial go at the search tab --- lib/plugins/extension/admin.php | 2 +- lib/plugins/extension/helper/extension.php | 29 +++++++++--- lib/plugins/extension/helper/gui.php | 49 +++++++++++++++---- lib/plugins/extension/helper/repository.php | 73 +++++++++++++++++++++++++++++ 4 files changed, 136 insertions(+), 17 deletions(-) diff --git a/lib/plugins/extension/admin.php b/lib/plugins/extension/admin.php index c9f37affb..51d4a8d1d 100644 --- a/lib/plugins/extension/admin.php +++ b/lib/plugins/extension/admin.php @@ -48,7 +48,7 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { // initialize the remote repository /* @var helper_plugin_extension_repository $repository */ $repository = $this->loadHelper('extension_repository'); - $repository->init(); + if(!$repository->hasAccess()){ $url = $this->gui->tabURL('', array('purge'=>1)); diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 296b81ac5..53753fcc1 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -14,8 +14,9 @@ if(!defined('DOKU_TPLLIB')) define('DOKU_TPLLIB', DOKU_INC.'lib/tpl/'); * Class helper_plugin_extension_extension represents a single extension (plugin or template) */ class helper_plugin_extension_extension extends DokuWiki_Plugin { + private $id; private $name; - private $is_template; + private $is_template = false; private $localInfo; private $remoteInfo; private $managerData; @@ -32,13 +33,18 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { /** * Set the name of the extension this instance shall represents, triggers loading the local and remote data * - * @param string $name The base name of the extension - * @param bool $is_template If the extension is a template + * @param string $id The id of the extension (prefixed with template: for templates) * @return bool If some (local or remote) data was found */ - public function setExtension($name, $is_template) { - $this->name = $name; - $this->is_template = $is_template; + public function setExtension($id) { + $this->id = $id; + $this->name = $id; + + if(substr($id, 0 , 9) == 'template'){ + $this->name = substr($id, 10); + $this->is_template = true; + } + $this->localInfo = array(); $this->managerData = array(); $this->remoteInfo = array(); @@ -128,6 +134,17 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { return $this->is_template; } + /** + * Get the ID of the extension + * + * This is the same as getName() for plugins, for templates it's getName() prefixed with 'template:' + * + * @return string + */ + public function getID() { + return $this->id; + } + /** * Get the name of the installation directory * diff --git a/lib/plugins/extension/helper/gui.php b/lib/plugins/extension/helper/gui.php index 7c83a3854..cf5b8a347 100644 --- a/lib/plugins/extension/helper/gui.php +++ b/lib/plugins/extension/helper/gui.php @@ -16,10 +16,13 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { protected $tabs = array('plugins', 'templates', 'search'); + /** @var string the extension that should have an open info window FIXME currently broken*/ + protected $infofor = ''; + /** * display the plugin tab */ - public function tabPlugins(){ + public function tabPlugins() { /* @var Doku_Plugin_Controller $plugin_controller */ global $plugin_controller; @@ -31,8 +34,8 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { /* @var helper_plugin_extension_list $list */ $list = $this->loadHelper('extension_list'); $list->start_form(); - foreach ($pluginlist as $name) { - $extension->setExtension($name, false); + foreach($pluginlist as $name) { + $extension->setExtension($name); $list->add_row($extension, $name == $this->infoFor); } $list->end_form(); @@ -42,7 +45,7 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { /** * Display the template tab */ - public function tabTemplates(){ + public function tabTemplates() { echo $this->locale_xhtml('intro_templates'); // FIXME do we have a real way? @@ -54,8 +57,8 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { /* @var helper_plugin_extension_list $list */ $list = $this->loadHelper('extension_list'); $list->start_form(); - foreach ($tpllist as $name) { - $extension->setExtension($name, true); + foreach($tpllist as $name) { + $extension->setExtension("template:$name"); $list->add_row($extension, $name == $this->infoFor); } $list->end_form(); @@ -65,8 +68,34 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { /** * Display the search tab */ - public function tabSearch(){ + public function tabSearch() { + global $INPUT; echo $this->locale_xhtml('intro_search'); + + $form = new Doku_Form(array('action' => $this->tabURL('', array(), '&'))); + $form->addElement(form_makeTextField('q', $INPUT->str('q'), 'Search')); + $form->addElement(form_makeButton('submit', '', 'Search')); + $form->printForm(); + + if(!$INPUT->bool('q')) return; + + + /* @var helper_plugin_extension_repository $repository FIXME should we use some gloabl instance? */ + $repository = $this->loadHelper('extension_repository'); + $result = $repository->search($INPUT->str('q')); + + /* @var helper_plugin_extension_extension $extension */ + $extension = $this->loadHelper('extension_extension'); + /* @var helper_plugin_extension_list $list */ + $list = $this->loadHelper('extension_list'); + $list->start_form(); + foreach($result as $name) { + $extension->setExtension($name); + $list->add_row($extension, $name == $this->infoFor); + } + $list->end_form(); + $list->render(); + } /** @@ -106,10 +135,10 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { * * @param string $tab tab to load, empty for current tab * @param array $params associative array of parameter to set - * + * @param string $sep seperator to build the URL * @return string */ - public function tabURL($tab = '', $params = array()) { + public function tabURL($tab = '', $params = array(), $sep = '&') { global $ID; if(!$tab) $tab = $this->currentTab(); @@ -118,7 +147,7 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { 'page' => 'extension', 'tab' => $tab, ); - return wl($ID, array_merge($defaults, $params)); + return wl($ID, array_merge($defaults, $params), false, $sep); } } diff --git a/lib/plugins/extension/helper/repository.php b/lib/plugins/extension/helper/repository.php index 21082c0d8..98128a9a3 100644 --- a/lib/plugins/extension/helper/repository.php +++ b/lib/plugins/extension/helper/repository.php @@ -109,6 +109,79 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin { } return array(); } + + protected function cacheData($name, $data){ + + } + + /** + * Search for plugins or templates using the given query string + * + * @param string $q the query string + * @return array a list of matching extensions + */ + public function search($q){ + $query = $this->parse_query($q); + $query['fmt'] = 'php'; + + $httpclient = new DokuHTTPClient(); + $data = $httpclient->post(EXTENSION_REPOSITORY_API, $query); + if ($data === false) return array(); + $result = unserialize($data); + + $ids = array(); + + // store cache info for each extension + foreach($result as $ext){ + $name = $ext['name']; + $cache = new cache('##extension_manager##'.$name, 'repo'); + $cache->storeCache(serialize($ext)); + $ids[] = $name; + } + + return $ids; + } + + /** + * Parses special queries from the query string + * + * @param string $q + * @return array + */ + protected function parse_query($q){ + $parameters = array( + 'tag' => array(), + 'mail' => array(), + 'type' => array() + ); + + // extract tags + if(preg_match_all('/(^|\s)(tag:([\S]+))/', $q, $matches, PREG_SET_ORDER)){ + foreach($matches as $m){ + $q = str_replace($m[2], '', $q); + $parameters['tag'][] = $m[3]; + } + } + // extract author ids + if(preg_match_all('/(^|\s)(authorid:([\S]+))/', $q, $matches, PREG_SET_ORDER)){ + foreach($matches as $m){ + $q = str_replace($m[2], '', $q); + $parameters['mail'][] = $m[3]; + } + } + // extract types + if(preg_match_all('/(^|\s)(type:([\S]+))/', $q, $matches, PREG_SET_ORDER)){ + foreach($matches as $m){ + $q = str_replace($m[2], '', $q); + $parameters['type'][] = $m[3]; + } + } + + // FIXME make integer from type value + + $parameters['q'] = trim($q); + return $parameters; + } } // vim:ts=4:sw=4:et: -- cgit v1.2.3 From 813d7e0910cdbb80dceef4d952adc551987c84e7 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Aug 2013 14:06:34 +0200 Subject: fixed some confusion between base, id and name --- lib/plugins/extension/admin.php | 8 +++--- lib/plugins/extension/helper/extension.php | 40 ++++++++++++++--------------- lib/plugins/extension/helper/list.php | 8 +++--- lib/plugins/extension/helper/repository.php | 6 +---- 4 files changed, 29 insertions(+), 33 deletions(-) diff --git a/lib/plugins/extension/admin.php b/lib/plugins/extension/admin.php index 51d4a8d1d..7faed142d 100644 --- a/lib/plugins/extension/admin.php +++ b/lib/plugins/extension/admin.php @@ -76,7 +76,7 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { if ($status !== true) { msg($status, -1); } else { - msg(sprintf($this->getLang('msg_update_success'), hsc($extension->getName())), 1); + msg(sprintf($this->getLang('msg_update_success'), hsc($extension->getDisplayName())), 1); } break; case 'uninstall': @@ -85,7 +85,7 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { if ($status !== true) { msg($status, -1); } else { - msg(sprintf($this->getLang('msg_delete_success'), hsc($extension->getName())), 1); + msg(sprintf($this->getLang('msg_delete_success'), hsc($extension->getDisplayName())), 1); } break; case 'enable'; @@ -94,7 +94,7 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { if ($status !== true) { msg($status, -1); } else { - msg(sprintf($this->getLang('msg_enabled'), hsc($extension->getName())), 1); + msg(sprintf($this->getLang('msg_enabled'), hsc($extension->getDisplayName())), 1); } break; case 'disable'; @@ -103,7 +103,7 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { if ($status !== true) { msg($status, -1); } else { - msg(sprintf($this->getLang('msg_disabled'), hsc($extension->getName())), 1); + msg(sprintf($this->getLang('msg_disabled'), hsc($extension->getDisplayName())), 1); } break; } diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 53753fcc1..6a152b169 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -15,7 +15,7 @@ if(!defined('DOKU_TPLLIB')) define('DOKU_TPLLIB', DOKU_INC.'lib/tpl/'); */ class helper_plugin_extension_extension extends DokuWiki_Plugin { private $id; - private $name; + private $base; private $is_template = false; private $localInfo; private $remoteInfo; @@ -38,10 +38,10 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { */ public function setExtension($id) { $this->id = $id; - $this->name = $id; + $this->base = $id; - if(substr($id, 0 , 9) == 'template'){ - $this->name = substr($id, 10); + if(substr($id, 0 , 9) == 'template:'){ + $this->base = substr($id, 9); $this->is_template = true; } @@ -58,7 +58,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { $this->repository = $this->loadHelper('extension_repository'); } - $this->remoteInfo = $this->repository->getData(($this->isTemplate() ? 'template:' : '').$this->getBase()); + $this->remoteInfo = $this->repository->getData($this->getID()); return ($this->localInfo || $this->remoteInfo); } @@ -79,7 +79,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { */ public function isBundled() { if (!empty($this->remoteInfo['bundled'])) return $this->remoteInfo['bundled']; - return in_array($this->name, + return in_array($this->base, array('acl', 'info', 'extension', 'test', 'revert', 'popularity', 'config', 'plugin', 'safefnrecode', 'authplain')); } @@ -89,7 +89,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return bool if the extension is protected */ public function isProtected() { - return in_array($this->name, array('acl', 'config', 'info', 'plugin', 'revert', 'usermanager')); + return in_array($this->base, array('acl', 'config', 'info', 'plugin', 'revert', 'usermanager')); } /** @@ -98,7 +98,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return bool If the extension is installed in the correct directory */ public function isInWrongFolder() { - return $this->name != $this->getBase(); + return $this->base != $this->getBase(); } /** @@ -109,7 +109,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { public function isEnabled() { /* @var Doku_Plugin_Controller $plugin_controller */ global $plugin_controller; - return !$plugin_controller->isdisabled($this->name); + return !$plugin_controller->isdisabled($this->base); } /** @@ -151,7 +151,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return string The name of the installation directory */ public function getInstallName() { - return $this->name; + return $this->base; } // Data from plugin.info.txt/template.info.txt or the repo when not available locally @@ -162,7 +162,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { */ public function getBase() { if (!empty($this->localInfo['base'])) return $this->localInfo['base']; - return $this->name; + return $this->base; } /** @@ -170,10 +170,10 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string The display name */ - public function getName() { + public function getDisplayName() { if (!empty($this->localInfo['name'])) return $this->localInfo['name']; if (!empty($this->remoteInfo['name'])) return $this->remoteInfo['name']; - return $this->name; + return $this->base; } /** @@ -468,9 +468,9 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { */ public function getInstallDir() { if ($this->isTemplate()) { - return DOKU_TPLLIB.$this->name; + return DOKU_TPLLIB.$this->base; } else { - return DOKU_PLUGIN.$this->name; + return DOKU_PLUGIN.$this->base; } } @@ -518,7 +518,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { if (!isset($installed_extensions[$this->getBase()])) { $status = 'Error, the requested extension hasn\'t been installed or updated'; } - $this->setExtension($this->name, $this->isTemplate()); + $this->setExtension($this->getID()); $this->purgeCache(); } $this->dir_delete(dirname($path)); @@ -547,7 +547,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { global $plugin_controller; if (!$this->isInstalled()) return $this->getLang('notinstalled'); if ($this->isEnabled()) return $this->getLang('alreadyenabled'); - if ($plugin_controller->enable($this->name)) { + if ($plugin_controller->enable($this->base)) { $this->purgeCache(); return true; } else { @@ -567,7 +567,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { global $plugin_controller; if (!$this->isInstalled()) return $this->getLang('notinstalled'); if (!$this->isEnabled()) return $this->getLang('alreadydisabled'); - if ($plugin_controller->disable($this->name)) { + if ($plugin_controller->disable($this->base)) { $this->purgeCache(); return true; } else { @@ -605,7 +605,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { foreach($plugin_types as $type) { if(@file_exists($path.$type.'.php')) { - $plugin = plugin_load($type, $this->name); + $plugin = plugin_load($type, $this->base); if ($plugin) break; } @@ -613,7 +613,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { while(false !== ($cp = readdir($dh))) { if($cp == '.' || $cp == '..' || strtolower(substr($cp, -4)) != '.php') continue; - $plugin = plugin_load($type, $this->name.'_'.substr($cp, 0, -4)); + $plugin = plugin_load($type, $this->base.'_'.substr($cp, 0, -4)); if ($plugin) break; } if ($plugin) break; diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 843697667..12db5ea3c 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -163,7 +163,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $mailid = $extension->getEmailID(); if($mailid){ - $url = $this->gui->tabURL('search', array('q' => 'mailid:'.$mailid)); + $url = $this->gui->tabURL('search', array('q' => 'authorid:'.$mailid)); return ' '.hsc($extension->getAuthor()).''; }else{ @@ -181,8 +181,8 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { */ function make_screenshot(helper_plugin_extension_extension $extension) { if($extension->getScreenshotURL()) { - $img = ''. - ''.hsc($extension->getName()).''. + $img = ''. + ''.hsc($extension->getDisplayName()).''. ''; } elseif($extension->isTemplate()) { $img = 'template'; @@ -203,7 +203,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { function make_legend(helper_plugin_extension_extension $extension, $showinfo = false) { $return = '
    '; $return .= '

    '; - $return .= sprintf($this->getLang('extensionby'), hsc($extension->getName()), $this->make_author($extension)); + $return .= sprintf($this->getLang('extensionby'), hsc($extension->getDisplayName()), $this->make_author($extension)); $return .= '

    '; $return .= $this->make_screenshot($extension); diff --git a/lib/plugins/extension/helper/repository.php b/lib/plugins/extension/helper/repository.php index 98128a9a3..38e07786e 100644 --- a/lib/plugins/extension/helper/repository.php +++ b/lib/plugins/extension/helper/repository.php @@ -110,10 +110,6 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin { return array(); } - protected function cacheData($name, $data){ - - } - /** * Search for plugins or templates using the given query string * @@ -133,7 +129,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin { // store cache info for each extension foreach($result as $ext){ - $name = $ext['name']; + $name = $ext['plugin']; $cache = new cache('##extension_manager##'.$name, 'repo'); $cache->storeCache(serialize($ext)); $ids[] = $name; -- cgit v1.2.3 From 89275cfd7e4e8b88724a36ccf7ae7bd29342d494 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Aug 2013 15:22:18 +0200 Subject: added a first unit test --- lib/plugins/extension/_test/extension.test.php | 62 ++++++++++++++++++++++++++ lib/plugins/extension/helper/extension.php | 11 ++++- lib/plugins/extension/plugin.info.txt | 4 +- 3 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 lib/plugins/extension/_test/extension.test.php diff --git a/lib/plugins/extension/_test/extension.test.php b/lib/plugins/extension/_test/extension.test.php new file mode 100644 index 000000000..6dfa49a46 --- /dev/null +++ b/lib/plugins/extension/_test/extension.test.php @@ -0,0 +1,62 @@ +setExtension('extension'); + $this->assertEquals('extension', $extension->getID()); + $this->assertEquals('extension', $extension->getBase()); + $this->assertEquals('Extension Manager', $extension->getDisplayName()); + $this->assertEquals('Michael Hamann', $extension->getAuthor()); + $this->assertEquals('michael@content-space.de', $extension->getEmail()); + $this->assertEquals(md5('michael@content-space.de'), $extension->getEmailID()); + $this->assertEquals('https://www.dokuwiki.org/plugin:extension', $extension->getURL()); + $this->assertEquals('Allows managing and installing plugins and templates', $extension->getDescription()); + $this->assertFalse($extension->isTemplate()); + $this->assertTrue($extension->isEnabled()); + $this->assertTrue($extension->isInstalled()); + $this->assertTrue($extension->isBundled()); + + $extension->setExtension('testing'); + $this->assertEquals('testing', $extension->getID()); + $this->assertEquals('testing', $extension->getBase()); + $this->assertEquals('Testing Plugin', $extension->getDisplayName()); + $this->assertEquals('Tobias Sarnowski', $extension->getAuthor()); + $this->assertEquals('tobias@trustedco.de', $extension->getEmail()); + $this->assertEquals(md5('tobias@trustedco.de'), $extension->getEmailID()); + $this->assertEquals('http://www.dokuwiki.org/plugin:testing', $extension->getURL()); + $this->assertEquals('Used to test the test framework. Should always be disabled.', $extension->getDescription()); + $this->assertFalse($extension->isTemplate()); + $this->assertFalse($extension->isEnabled()); + $this->assertTrue($extension->isInstalled()); + $this->assertTrue($extension->isBundled()); + + $extension->setExtension('template:dokuwiki'); + $this->assertEquals('template:dokuwiki', $extension->getID()); + $this->assertEquals('dokuwiki', $extension->getBase()); + $this->assertEquals('DokuWiki Template', $extension->getDisplayName()); + $this->assertEquals('Anika Henke', $extension->getAuthor()); + $this->assertEquals('anika@selfthinker.org', $extension->getEmail()); + $this->assertEquals(md5('anika@selfthinker.org'), $extension->getEmailID()); + $this->assertEquals('http://www.dokuwiki.org/template:dokuwiki', $extension->getURL()); + $this->assertEquals('DokuWiki\'s default template since 2012', $extension->getDescription()); + $this->assertTrue($extension->isTemplate()); + $this->assertTrue($extension->isEnabled()); + $this->assertTrue($extension->isInstalled()); + $this->assertTrue($extension->isBundled()); + + } + +} \ No newline at end of file diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 6a152b169..88fb5e229 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -80,7 +80,11 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { public function isBundled() { if (!empty($this->remoteInfo['bundled'])) return $this->remoteInfo['bundled']; return in_array($this->base, - array('acl', 'info', 'extension', 'test', 'revert', 'popularity', 'config', 'plugin', 'safefnrecode', 'authplain')); + array('acl', 'info', 'extension', 'test', 'revert', 'popularity', + 'config', 'plugin', 'safefnrecode', 'authplain', 'testing', + 'template:dokuwiki', 'template:default' + ) + ); } /** @@ -107,6 +111,11 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return bool If the extension is enabled */ public function isEnabled() { + global $conf; + if($this->isTemplate()){ + return ($conf['template'] == $this->getBase()); + } + /* @var Doku_Plugin_Controller $plugin_controller */ global $plugin_controller; return !$plugin_controller->isdisabled($this->base); diff --git a/lib/plugins/extension/plugin.info.txt b/lib/plugins/extension/plugin.info.txt index 3c4469ad7..ef16d78a1 100644 --- a/lib/plugins/extension/plugin.info.txt +++ b/lib/plugins/extension/plugin.info.txt @@ -2,6 +2,6 @@ base extension author Michael Hamann email michael@content-space.de date 2013-08-01 -name extension plugin -desc Extension manager +name Extension Manager +desc Allows managing and installing plugins and templates url https://www.dokuwiki.org/plugin:extension -- cgit v1.2.3 From ea9f3f904d439e9af84bdbed8e1a0bba3ed286b2 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Aug 2013 15:31:45 +0200 Subject: added 4th tab for manual install --- lib/plugins/extension/admin.php | 3 +++ lib/plugins/extension/helper/extension.php | 2 +- lib/plugins/extension/helper/gui.php | 11 +++++++++-- lib/plugins/extension/lang/en/intro_install.txt | 1 + lib/plugins/extension/lang/en/lang.php | 1 + 5 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 lib/plugins/extension/lang/en/intro_install.txt diff --git a/lib/plugins/extension/admin.php b/lib/plugins/extension/admin.php index 7faed142d..cf4eb79d7 100644 --- a/lib/plugins/extension/admin.php +++ b/lib/plugins/extension/admin.php @@ -128,6 +128,9 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { case 'templates': $this->gui->tabTemplates(); break; + case 'install': + $this->gui->tabInstall(); + break; case 'plugins': default: $this->gui->tabPlugins(); diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 88fb5e229..244ec9b9a 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -702,7 +702,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { public function download($url, &$path) { // check the url $matches = array(); - if(!preg_match("/[^\/]*$/", $url, $matches) || !$matches[0]) { + if(!preg_match('/[^\/]*$/', $url, $matches) || !$matches[0]) { return $this->getLang('baddownloadurl'); } $file = $matches[0]; diff --git a/lib/plugins/extension/helper/gui.php b/lib/plugins/extension/helper/gui.php index cf5b8a347..09cea7fcb 100644 --- a/lib/plugins/extension/helper/gui.php +++ b/lib/plugins/extension/helper/gui.php @@ -14,7 +14,7 @@ if(!defined('DOKU_INC')) die(); */ class helper_plugin_extension_gui extends DokuWiki_Plugin { - protected $tabs = array('plugins', 'templates', 'search'); + protected $tabs = array('plugins', 'templates', 'search', 'install'); /** @var string the extension that should have an open info window FIXME currently broken*/ protected $infofor = ''; @@ -98,6 +98,13 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { } + /** + * Display the template tab + */ + public function tabInstall() { + echo $this->locale_xhtml('intro_install'); + } + /** * Print the tab navigation * @@ -105,7 +112,7 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { */ public function tabNavigation() { echo '
      '; - foreach(array('plugins', 'templates', 'search') as $tab) { + foreach($this->tabs as $tab) { $url = $this->tabURL($tab); if($this->currentTab() == $tab) { $class = 'class="active"'; diff --git a/lib/plugins/extension/lang/en/intro_install.txt b/lib/plugins/extension/lang/en/intro_install.txt new file mode 100644 index 000000000..f68d2d909 --- /dev/null +++ b/lib/plugins/extension/lang/en/intro_install.txt @@ -0,0 +1 @@ +Here you can manual install plugins and templates by either uploading them or providing a direct download URL. \ No newline at end of file diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index 10bf2087f..24cabe1fa 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -12,6 +12,7 @@ $lang['menu'] = 'Extension Manager'; $lang['tab_plugins'] = 'Installed Plugins'; $lang['tab_templates'] = 'Installed Templates'; $lang['tab_search'] = 'Search and Install'; +$lang['tab_install'] = 'Manual Install'; // custom language strings for the plugin $lang['notimplemented'] = 'This feature hasn\'t been implemented yet'; -- cgit v1.2.3 From 2d87f05b99091011a83d131724e9714f9c07f976 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Aug 2013 15:40:05 +0200 Subject: moved CSS to LESS file, removed angua compatibility --- lib/plugins/extension/style.css | 373 --------------------------------------- lib/plugins/extension/style.less | 345 ++++++++++++++++++++++++++++++++++++ 2 files changed, 345 insertions(+), 373 deletions(-) delete mode 100644 lib/plugins/extension/style.css create mode 100644 lib/plugins/extension/style.less diff --git a/lib/plugins/extension/style.css b/lib/plugins/extension/style.css deleted file mode 100644 index 0a3a0cc0e..000000000 --- a/lib/plugins/extension/style.css +++ /dev/null @@ -1,373 +0,0 @@ -/* - * Extension plugin styles - * - * @author Christopher Smith - * @author Piyush Mishra - * @author Håkan Sandell - * @author Anika Henke - */ - -/* - * tab support not included in "Angua", copied from _mediamanager.css - */ -#extension__manager .panelHeader { - background-color: __background_alt__; - margin-bottom: 10px; - padding: 10px; - text-align: left; - /* to counter partly missing border of ul.tabs: */ - border-top: 1px solid __border__; - margin-top: -1px; -} - -#extension__manager .panelHeader p { - float: left; - font-weight: normal; - font-size: 1em; - padding: 0; - margin: 0 0 3px; -} -[dir=rtl] #extension__manager .panelHeader p { - float: right; -} - -#extension__manager ul.tabs div.message { - display: inline; - margin: 0 .5em; -} - -/* - * general layout - */ -#extension__manager h2 { - margin-left: 0; -} - -#extension__manager a.taglink { - padding: 1px 4px; - background-color: __background_neu__; - border-radius: 3px; -} -[dir=rtl] #extension__manager a.taglink { - display: inline-block; - line-height: 1.2; -} - -#extension__manager .panelHeader div.error { - margin-top: 0; - float: left; -} -[dir=rtl] #extension__manager .panelHeader div.error { - float: right; -} - -/* - * search & url download forms - */ -#extension__manager form.search, -#extension__manager form.btn_reload { - float: right; -} -[dir=rtl] #extension__manager form.search, -[dir=rtl] #extension__manager form.btn_reload { - float: left; -} - -#extension__manager div.search form.search { - float: none; -} - -#extension__manager .tagcloud { - width: 55%; - float: left; - margin: 0 0.5em 1em 0; -} -[dir=rtl] #extension__manager .tagcloud { - float: right; - margin: 0 0 1em .5em; -} - -#extension__manager .tagcloud a.taglink { - background-color: inherit; -} - -#extension__manager div.search { - width: 44%; - float: left; -} -[dir=rtl] #extension__manager div.search { - float: right; -} - -#extension__manager fieldset { - margin-top: 0.5em; - width: auto; -} - -#extension__manager fieldset p { - margin: 0.5em; - text-align: justify; - font-size: 85%; -} - -/* tag cloud */ -#extension__manager a.cl0 { font-size: 0.7em; } -#extension__manager a.cl1 { font-size: 0.9em; } -#extension__manager a.cl2 { font-size: 1em; } -#extension__manager a.cl3 { font-size: 1.3em; } -#extension__manager a.cl4 { font-size: 1.6em; } -#extension__manager a.cl5 { font-size: 1.9em; } - - -#extension__manager .extensionList input.button { - margin: 0 .3em .3em 0; -} -[dir=rtl] #extension__manager .extensionList input.button { - margin: 0 0 .3em .3em; -} - -/* - * extensions table - */ -#extension__manager .extensionList { - margin-left: 0; - margin-right: 0; - padding: 0; - list-style: none; -} - -#extension__manager .extensionList li { - margin: 0 0 .5em; - padding: 0 0 .5em; - color: __text__; - border-bottom: 1px solid __border__; - overflow: hidden; -} - -#extension__manager .legend { - position: relative; - width: 75%; - float: left; -} -[dir=rtl] #extension__manager .legend { - float: right; -} - -#extension__manager .legend > div { - padding: 0 .5em 0 132px; - border-right: 1px solid __background_alt__; - overflow: hidden; -} -[dir=rtl] #extension__manager .legend > div { - padding: 0 132px 0 .5em; - border-left: 1px solid __background_alt__; - border-right-width: 0; -} - -#extension__manager .enabled div.screenshot span { - background: transparent url(images/enabled.png) no-repeat 2px 2px; -} - -#extension__manager .disabled div.screenshot span { - background: transparent url(images/disabled.png) no-repeat 2px 2px; -} - -#extension__manager div.screenshot img { - width: 120px; - height: 70px; -} - -#extension__manager .legend div.screenshot { - margin-top: 4px; - margin-left: -132px; - max-width: 120px; - float: left; -} -[dir=rtl] #extension__manager .legend div.screenshot { - margin-left: 0; - margin-right: -132px; - float: right; -} - -#extension__manager .legend div.screenshot span { - min-height: 24px; - min-width: 24px; - position: absolute; - left: 0; -} -[dir=rtl] #extension__manager .legend div.screenshot span { - left: auto; - right: 0; -} - -#extension__manager .legend h2 { - width: 100%; - float: right; - margin: 0.2em 0 0.5em; - font-size: 100%; - font-weight: normal; - border: none; -} -[dir=rtl] #extension__manager .legend h2 { - float: left; -} - -#extension__manager .legend h2 strong { - font-size: 120%; - font-weight: bold; - vertical-align: baseline; -} - -#extension__manager .legend p { - margin: 0 0 0.6em 0; -} - -#extension__manager .legend span.linkbar { - font-size: 85%; -} - -#extension__manager .legend span.linkbar a.urlextern + a.taglink, -#extension__manager .legend span.linkbar a.interwiki + a.taglink { - margin-left: 0.4em; -} -[dir=rtl] #extension__manager .legend span.linkbar a.urlextern + a.taglink, -[dir=rtl] #extension__manager .legend span.linkbar a.interwiki + a.taglink { - margin-left: 0; -} -[dir=rtl] #extension__manager .legend span.linkbar a.urlextern, -[dir=rtl] #extension__manager .legend span.linkbar a.interwiki { - margin-left: .4em; -} - -#extension__manager .legend input.button { - background: transparent url(images/up.png) no-repeat 0 0; - box-shadow: none; - border-width: 0; - height: 14px; - text-indent: -99999px; - float: right; - margin: .5em 0 0; -} -[dir=rtl] #extension__manager .legend input.button { - float: left; - margin: .5em 0 0; -} - -#extension__manager .legend input.button.close { - background: transparent url(images/down.png) no-repeat 0 0; -} - -#extension__manager .legend div.popularity { - background-color: __background__; - border: 1px solid silver; - height: .4em; - margin: 0 auto; - padding: 1px; - width: 5.5em; - position: absolute; - right: .5em; - top: 0.2em; -} -[dir=rtl] #extension__manager .legend div.popularity { - right: auto; - left: .5em; -} - -#extension__manager .legend div.popularity div { - background-color: __border__; - height: 100%; -} - -#extension__manager .legend div.popularity div span { - display: none;/* @todo: hide accessibly */ -} - -#extension__manager .actions { - padding: 0; - font-size: 95%; - width: 25%; - float: right; - text-align: right; -} -[dir=rtl] #extension__manager .actions { - float: left; - text-align: left; -} - -#extension__manager .actions .version { - display: block; -} - -#extension__manager .actions p { - margin: 0.2em 0; - text-align: center; -} - -/* - * extensions table, detailed info box - */ -#extension__manager dl.details { - margin: 0.4em 0 0 0; - font-size: 85%; - border-top: 1px solid __background_alt__; - clear: both; -} - -#extension__manager dl.details dt { - clear: left; - float: left; - width: 25%; - margin: 0; - text-align: right; - font-weight: normal; - padding: 0.2em 5px 0 0; -} -[dir=rtl] #extension__manager dl.details dt { - clear: right; - float: right; - text-align: left; - padding: 0.2em 0 0 5px; -} - -#extension__manager dl.details dd { - margin-left: 25%; - font-weight: bold; - padding: 0.2em 0 0 5px; -} -[dir=rtl] #extension__manager dl.details dd { - margin-left: 0; - margin-right: 25%; - padding: 0.2em 5px 0 0 ; -} - -#extension__manager dl.details dd a { - font-weight: normal; -} - -#extension__manager #info__popup { - z-index: 20; - overflow: hidden; - opacity: 0.9; - border: 1px solid __border__; - background-color: __border__; /*background_other__;*/ - text-align: left; - padding: 0.2em; -} -[dir=rtl] #extension__manager #info__popup { - text-align: right; -} - -#extension__manager div.msg { - margin: 0.4em 0 0 0; -} - -#extension__manager ul.tabs div.msg { - display: inline; - margin-left: 0.4em; -} -[dir=rtl] #extension__manager ul.tabs div.msg { - margin-left: 0; - margin-right: 0.4em; -} - -/* end admin plugin styles */ diff --git a/lib/plugins/extension/style.less b/lib/plugins/extension/style.less new file mode 100644 index 000000000..40fdb6075 --- /dev/null +++ b/lib/plugins/extension/style.less @@ -0,0 +1,345 @@ +/* + * Extension plugin styles + * + * @author Christopher Smith + * @author Piyush Mishra + * @author Håkan Sandell + * @author Anika Henke + */ + + +/* + * general layout + */ +#extension__manager h2 { + margin-left: 0; +} + +#extension__manager a.taglink { + padding: 1px 4px; + background-color: @ini_background_neu; + border-radius: 3px; +} +[dir=rtl] #extension__manager a.taglink { + display: inline-block; + line-height: 1.2; +} + +#extension__manager .panelHeader div.error { + margin-top: 0; + float: left; +} +[dir=rtl] #extension__manager .panelHeader div.error { + float: right; +} + +/* + * search & url download forms + */ +#extension__manager form.search, +#extension__manager form.btn_reload { + float: right; +} +[dir=rtl] #extension__manager form.search, +[dir=rtl] #extension__manager form.btn_reload { + float: left; +} + +#extension__manager div.search form.search { + float: none; +} + +#extension__manager .tagcloud { + width: 55%; + float: left; + margin: 0 0.5em 1em 0; +} +[dir=rtl] #extension__manager .tagcloud { + float: right; + margin: 0 0 1em .5em; +} + +#extension__manager .tagcloud a.taglink { + background-color: inherit; +} + +#extension__manager div.search { + width: 44%; + float: left; +} +[dir=rtl] #extension__manager div.search { + float: right; +} + +#extension__manager fieldset { + margin-top: 0.5em; + width: auto; +} + +#extension__manager fieldset p { + margin: 0.5em; + text-align: justify; + font-size: 85%; +} + +/* tag cloud */ +#extension__manager a.cl0 { font-size: 0.7em; } +#extension__manager a.cl1 { font-size: 0.9em; } +#extension__manager a.cl2 { font-size: 1em; } +#extension__manager a.cl3 { font-size: 1.3em; } +#extension__manager a.cl4 { font-size: 1.6em; } +#extension__manager a.cl5 { font-size: 1.9em; } + + +#extension__manager .extensionList input.button { + margin: 0 .3em .3em 0; +} +[dir=rtl] #extension__manager .extensionList input.button { + margin: 0 0 .3em .3em; +} + +/* + * extensions table + */ +#extension__manager .extensionList { + margin-left: 0; + margin-right: 0; + padding: 0; + list-style: none; +} + +#extension__manager .extensionList li { + margin: 0 0 .5em; + padding: 0 0 .5em; + color: @ini_text; + border-bottom: 1px solid @ini_border; + overflow: hidden; +} + +#extension__manager .legend { + position: relative; + width: 75%; + float: left; +} +[dir=rtl] #extension__manager .legend { + float: right; +} + +#extension__manager .legend > div { + padding: 0 .5em 0 132px; + border-right: 1px solid @ini_background_alt; + overflow: hidden; +} +[dir=rtl] #extension__manager .legend > div { + padding: 0 132px 0 .5em; + border-left: 1px solid @ini_background_alt; + border-right-width: 0; +} + +#extension__manager .enabled div.screenshot span { + background: transparent url(images/enabled.png) no-repeat 2px 2px; +} + +#extension__manager .disabled div.screenshot span { + background: transparent url(images/disabled.png) no-repeat 2px 2px; +} + +#extension__manager div.screenshot img { + width: 120px; + height: 70px; +} + +#extension__manager .legend div.screenshot { + margin-top: 4px; + margin-left: -132px; + max-width: 120px; + float: left; +} +[dir=rtl] #extension__manager .legend div.screenshot { + margin-left: 0; + margin-right: -132px; + float: right; +} + +#extension__manager .legend div.screenshot span { + min-height: 24px; + min-width: 24px; + position: absolute; + left: 0; +} +[dir=rtl] #extension__manager .legend div.screenshot span { + left: auto; + right: 0; +} + +#extension__manager .legend h2 { + width: 100%; + float: right; + margin: 0.2em 0 0.5em; + font-size: 100%; + font-weight: normal; + border: none; +} +[dir=rtl] #extension__manager .legend h2 { + float: left; +} + +#extension__manager .legend h2 strong { + font-size: 120%; + font-weight: bold; + vertical-align: baseline; +} + +#extension__manager .legend p { + margin: 0 0 0.6em 0; +} + +#extension__manager .legend span.linkbar { + font-size: 85%; +} + +#extension__manager .legend span.linkbar a.urlextern + a.taglink, +#extension__manager .legend span.linkbar a.interwiki + a.taglink { + margin-left: 0.4em; +} +[dir=rtl] #extension__manager .legend span.linkbar a.urlextern + a.taglink, +[dir=rtl] #extension__manager .legend span.linkbar a.interwiki + a.taglink { + margin-left: 0; +} +[dir=rtl] #extension__manager .legend span.linkbar a.urlextern, +[dir=rtl] #extension__manager .legend span.linkbar a.interwiki { + margin-left: .4em; +} + +#extension__manager .legend input.button { + background: transparent url(images/up.png) no-repeat 0 0; + box-shadow: none; + border-width: 0; + height: 14px; + text-indent: -99999px; + float: right; + margin: .5em 0 0; +} +[dir=rtl] #extension__manager .legend input.button { + float: left; + margin: .5em 0 0; +} + +#extension__manager .legend input.button.close { + background: transparent url(images/down.png) no-repeat 0 0; +} + +#extension__manager .legend div.popularity { + background-color: @ini_background; + border: 1px solid silver; + height: .4em; + margin: 0 auto; + padding: 1px; + width: 5.5em; + position: absolute; + right: .5em; + top: 0.2em; +} +[dir=rtl] #extension__manager .legend div.popularity { + right: auto; + left: .5em; +} + +#extension__manager .legend div.popularity div { + background-color: @ini_border; + height: 100%; +} + +#extension__manager .legend div.popularity div span { + display: none;/* @todo: hide accessibly */ +} + +#extension__manager .actions { + padding: 0; + font-size: 95%; + width: 25%; + float: right; + text-align: right; +} +[dir=rtl] #extension__manager .actions { + float: left; + text-align: left; +} + +#extension__manager .actions .version { + display: block; +} + +#extension__manager .actions p { + margin: 0.2em 0; + text-align: center; +} + +/* + * extensions table, detailed info box + */ +#extension__manager dl.details { + margin: 0.4em 0 0 0; + font-size: 85%; + border-top: 1px solid @ini_background_alt; + clear: both; +} + +#extension__manager dl.details dt { + clear: left; + float: left; + width: 25%; + margin: 0; + text-align: right; + font-weight: normal; + padding: 0.2em 5px 0 0; +} +[dir=rtl] #extension__manager dl.details dt { + clear: right; + float: right; + text-align: left; + padding: 0.2em 0 0 5px; +} + +#extension__manager dl.details dd { + margin-left: 25%; + font-weight: bold; + padding: 0.2em 0 0 5px; +} +[dir=rtl] #extension__manager dl.details dd { + margin-left: 0; + margin-right: 25%; + padding: 0.2em 5px 0 0 ; +} + +#extension__manager dl.details dd a { + font-weight: normal; +} + +#extension__manager #info__popup { + z-index: 20; + overflow: hidden; + opacity: 0.9; + border: 1px solid @ini_border; + background-color: @ini_border; /*background_other__;*/ + text-align: left; + padding: 0.2em; +} +[dir=rtl] #extension__manager #info__popup { + text-align: right; +} + +#extension__manager div.msg { + margin: 0.4em 0 0 0; +} + +#extension__manager ul.tabs div.msg { + display: inline; + margin-left: 0.4em; +} +[dir=rtl] #extension__manager ul.tabs div.msg { + margin-left: 0; + margin-right: 0.4em; +} + +/* end admin plugin styles */ -- cgit v1.2.3 From 61746d5540723d7463a0c1d666decb9c164c6678 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Aug 2013 16:07:21 +0200 Subject: added a very simplistic lightbox --- lib/plugins/extension/helper/list.php | 2 +- lib/plugins/extension/images/overlay.png | Bin 0 -> 109 bytes lib/plugins/extension/script.js | 34 +++++++++++++++++++++++++++++++ lib/plugins/extension/style.less | 29 ++++++++++++++++++++++++++ 4 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 lib/plugins/extension/images/overlay.png create mode 100644 lib/plugins/extension/script.js diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 12db5ea3c..62031a69b 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -181,7 +181,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { */ function make_screenshot(helper_plugin_extension_extension $extension) { if($extension->getScreenshotURL()) { - $img = ''. + $img = ''. ''.hsc($extension->getDisplayName()).''. ''; } elseif($extension->isTemplate()) { diff --git a/lib/plugins/extension/images/overlay.png b/lib/plugins/extension/images/overlay.png new file mode 100644 index 000000000..8f92c2fe7 Binary files /dev/null and b/lib/plugins/extension/images/overlay.png differ diff --git a/lib/plugins/extension/script.js b/lib/plugins/extension/script.js new file mode 100644 index 000000000..f2a6aae50 --- /dev/null +++ b/lib/plugins/extension/script.js @@ -0,0 +1,34 @@ +jQuery(function(){ + + + /** + * very simple lightbox + * @link http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/super-simple-lightbox-with-css-and-jquery/ + */ + jQuery('a.extension_screenshot').click(function(e) { + e.preventDefault(); + + //Get clicked link href + var image_href = jQuery(this).attr("href"); + + // create lightbox if needed + var $lightbox = jQuery('#plugin__extensionlightbox'); + if(!$lightbox.length){ + $lightbox = jQuery('

      Click to close

      ') + .appendTo(jQuery('body')) + .hide() + .click(function(){ + $lightbox.hide(); + }); + } + + // fill and show it + $lightbox + .show() + .find('div').html(''); + + + return false; + }); + +}); \ No newline at end of file diff --git a/lib/plugins/extension/style.less b/lib/plugins/extension/style.less index 40fdb6075..cd9eeaa74 100644 --- a/lib/plugins/extension/style.less +++ b/lib/plugins/extension/style.less @@ -7,6 +7,35 @@ * @author Anika Henke */ +/** + * very simple lightbox + * @link http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/super-simple-lightbox-with-css-and-jquery/ + */ +#plugin__extensionlightbox { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: url(images/overlay.png) repeat; + text-align: center; + cursor: pointer; + + p { + text-align: right; + color: #fff; + margin-right: 20px; + font-size: 12px; + } + + img { + box-shadow: 0 0 25px #111; + -webkit-box-shadow: 0 0 25px #111; + -moz-box-shadow: 0 0 25px #111; + max-width: 90%; + max-height: 90%; + } +} /* * general layout -- cgit v1.2.3 From 519895b5625277197a88748c515919515f1113b8 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Aug 2013 20:04:17 +0200 Subject: added tests for the find_folders method --- lib/plugins/extension/_test/extension.test.php | 234 ++++++++++++++++++++- .../extension/_test/testdata/either1/script.js | 0 .../_test/testdata/eithersub2/either2/script.js | 0 .../_test/testdata/plgfoo5/plugin.info.txt | 7 + .../_test/testdata/plgsub3/plugin3/syntax.php | 0 .../_test/testdata/plgsub4/plugin4/plugin.info.txt | 7 + .../_test/testdata/plgsub6/plgfoo6/plugin.info.txt | 7 + .../extension/_test/testdata/plugin1/syntax.php | 0 .../_test/testdata/plugin2/plugin.info.txt | 7 + .../extension/_test/testdata/template1/main.php | 0 .../extension/_test/testdata/template1/style.ini | 0 .../_test/testdata/template2/template.info.txt | 7 + .../_test/testdata/tplfoo5/template.info.txt | 7 + .../_test/testdata/tplsub3/template3/main.php | 0 .../_test/testdata/tplsub3/template3/style.ini | 0 .../testdata/tplsub4/template4/template.info.txt | 7 + .../testdata/tplsub6/tplfoo6/template.info.txt | 7 + lib/plugins/extension/admin.php | 10 +- lib/plugins/extension/helper/extension.php | 190 ++++++++--------- 19 files changed, 382 insertions(+), 108 deletions(-) create mode 100644 lib/plugins/extension/_test/testdata/either1/script.js create mode 100644 lib/plugins/extension/_test/testdata/eithersub2/either2/script.js create mode 100644 lib/plugins/extension/_test/testdata/plgfoo5/plugin.info.txt create mode 100644 lib/plugins/extension/_test/testdata/plgsub3/plugin3/syntax.php create mode 100644 lib/plugins/extension/_test/testdata/plgsub4/plugin4/plugin.info.txt create mode 100644 lib/plugins/extension/_test/testdata/plgsub6/plgfoo6/plugin.info.txt create mode 100644 lib/plugins/extension/_test/testdata/plugin1/syntax.php create mode 100644 lib/plugins/extension/_test/testdata/plugin2/plugin.info.txt create mode 100644 lib/plugins/extension/_test/testdata/template1/main.php create mode 100644 lib/plugins/extension/_test/testdata/template1/style.ini create mode 100644 lib/plugins/extension/_test/testdata/template2/template.info.txt create mode 100644 lib/plugins/extension/_test/testdata/tplfoo5/template.info.txt create mode 100644 lib/plugins/extension/_test/testdata/tplsub3/template3/main.php create mode 100644 lib/plugins/extension/_test/testdata/tplsub3/template3/style.ini create mode 100644 lib/plugins/extension/_test/testdata/tplsub4/template4/template.info.txt create mode 100644 lib/plugins/extension/_test/testdata/tplsub6/tplfoo6/template.info.txt diff --git a/lib/plugins/extension/_test/extension.test.php b/lib/plugins/extension/_test/extension.test.php index 6dfa49a46..97726d212 100644 --- a/lib/plugins/extension/_test/extension.test.php +++ b/lib/plugins/extension/_test/extension.test.php @@ -1,10 +1,23 @@ setExtension('extension'); @@ -56,7 +68,225 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $this->assertTrue($extension->isEnabled()); $this->assertTrue($extension->isInstalled()); $this->assertTrue($extension->isBundled()); + } + + public function testFindFoldersPlugins() { + $extension = new mock_helper_plugin_extension_extension(); + $tdir = dirname(__FILE__).'/testdata'; + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/plugin1", 'plugin'); + $this->assertTrue($ok); + $this->assertEquals(0, count($result['new'])); + $this->assertEquals(1, count($result['old'])); + $this->assertEquals('plugin', $result['old'][0]['type']); + $this->assertEquals('plugin1', $this->extdir($result['old'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/plugin2", 'plugin'); + $this->assertTrue($ok); + $this->assertEquals(1, count($result['new'])); + $this->assertEquals('plugin', $result['new'][0]['type']); + $this->assertEquals('plugin2', $result['new'][0]['base']); + $this->assertEquals('plugin2', $this->extdir($result['new'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/plgsub3", 'plugin'); + $this->assertTrue($ok); + $this->assertEquals(0, count($result['new'])); + $this->assertEquals(1, count($result['old'])); + $this->assertEquals('plugin', $result['old'][0]['type']); + $this->assertEquals('plgsub3/plugin3', $this->extdir($result['old'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/plgsub4", 'plugin'); + $this->assertTrue($ok); + $this->assertEquals(1, count($result['new'])); + $this->assertEquals('plugin', $result['new'][0]['type']); + $this->assertEquals('plugin4', $result['new'][0]['base']); + $this->assertEquals('plgsub4/plugin4', $this->extdir($result['new'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/plgfoo5", 'plugin'); + $this->assertTrue($ok); + $this->assertEquals(1, count($result['new'])); + $this->assertEquals('plugin', $result['new'][0]['type']); + $this->assertEquals('plugin5', $result['new'][0]['base']); + $this->assertEquals('plgfoo5', $this->extdir($result['new'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/plgsub6/plgfoo6", 'plugin'); + $this->assertTrue($ok); + $this->assertEquals(1, count($result['new'])); + $this->assertEquals('plugin', $result['new'][0]['type']); + $this->assertEquals('plugin6', $result['new'][0]['base']); + $this->assertEquals('plgsub6/plgfoo6', $this->extdir($result['new'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/either1", 'plugin'); + $this->assertTrue($ok); + $this->assertEquals(0, count($result['new'])); + $this->assertEquals(1, count($result['old'])); + $this->assertEquals('plugin', $result['old'][0]['type']); + $this->assertEquals('either1', $this->extdir($result['old'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/eithersub2/either2", 'plugin'); + $this->assertTrue($ok); + $this->assertEquals(0, count($result['new'])); + $this->assertEquals(1, count($result['old'])); + $this->assertEquals('plugin', $result['old'][0]['type']); + $this->assertEquals('eithersub2/either2', $this->extdir($result['old'][0]['tmp'])); + } + + public function testFindFoldersTemplates() { + $extension = new mock_helper_plugin_extension_extension(); + $tdir = dirname(__FILE__).'/testdata'; + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/template1", 'template'); + $this->assertTrue($ok); + $this->assertEquals(0, count($result['new'])); + $this->assertEquals(1, count($result['old'])); + $this->assertEquals('template', $result['old'][0]['type']); + $this->assertEquals('template1', $this->extdir($result['old'][0]['tmp'])); + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/template2", 'template'); + $this->assertTrue($ok); + $this->assertEquals(1, count($result['new'])); + $this->assertEquals('template', $result['new'][0]['type']); + $this->assertEquals('template2', $result['new'][0]['base']); + $this->assertEquals('template2', $this->extdir($result['new'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/tplsub3", 'template'); + $this->assertTrue($ok); + $this->assertEquals(0, count($result['new'])); + $this->assertEquals(1, count($result['old'])); + $this->assertEquals('template', $result['old'][0]['type']); + $this->assertEquals('tplsub3/template3', $this->extdir($result['old'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/tplsub4", 'template'); + $this->assertTrue($ok); + $this->assertEquals(1, count($result['new'])); + $this->assertEquals('template', $result['new'][0]['type']); + $this->assertEquals('template4', $result['new'][0]['base']); + $this->assertEquals('tplsub4/template4', $this->extdir($result['new'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/tplfoo5", 'template'); + $this->assertTrue($ok); + $this->assertEquals(1, count($result['new'])); + $this->assertEquals('template', $result['new'][0]['type']); + $this->assertEquals('template5', $result['new'][0]['base']); + $this->assertEquals('tplfoo5', $this->extdir($result['new'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/tplsub6/tplfoo6", 'template'); + $this->assertTrue($ok); + $this->assertEquals(1, count($result['new'])); + $this->assertEquals('template', $result['new'][0]['type']); + $this->assertEquals('template6', $result['new'][0]['base']); + $this->assertEquals('tplsub6/tplfoo6', $this->extdir($result['new'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/either1", 'template'); + $this->assertTrue($ok); + $this->assertEquals(0, count($result['new'])); + $this->assertEquals(1, count($result['old'])); + $this->assertEquals('template', $result['old'][0]['type']); + $this->assertEquals('either1', $this->extdir($result['old'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/eithersub2/either2", 'template'); + $this->assertTrue($ok); + $this->assertEquals(0, count($result['new'])); + $this->assertEquals(1, count($result['old'])); + $this->assertEquals('template', $result['old'][0]['type']); + $this->assertEquals('eithersub2/either2', $this->extdir($result['old'][0]['tmp'])); + } + + public function testFindFoldersTemplatesAutodetect() { + $extension = new mock_helper_plugin_extension_extension(); + $tdir = dirname(__FILE__).'/testdata'; + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/template1"); + $this->assertTrue($ok); + $this->assertEquals(0, count($result['new'])); + $this->assertEquals(1, count($result['old'])); + $this->assertEquals('template', $result['old'][0]['type']); + $this->assertEquals('template1', $this->extdir($result['old'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/template2"); + $this->assertTrue($ok); + $this->assertEquals(1, count($result['new'])); + $this->assertEquals('template', $result['new'][0]['type']); + $this->assertEquals('template2', $result['new'][0]['base']); + $this->assertEquals('template2', $this->extdir($result['new'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/tplsub3"); + $this->assertTrue($ok); + $this->assertEquals(0, count($result['new'])); + $this->assertEquals(1, count($result['old'])); + $this->assertEquals('template', $result['old'][0]['type']); + $this->assertEquals('tplsub3/template3', $this->extdir($result['old'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/tplsub4"); + $this->assertTrue($ok); + $this->assertEquals(1, count($result['new'])); + $this->assertEquals('template', $result['new'][0]['type']); + $this->assertEquals('template4', $result['new'][0]['base']); + $this->assertEquals('tplsub4/template4', $this->extdir($result['new'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/tplfoo5"); + $this->assertTrue($ok); + $this->assertEquals(1, count($result['new'])); + $this->assertEquals('template', $result['new'][0]['type']); + $this->assertEquals('template5', $result['new'][0]['base']); + $this->assertEquals('tplfoo5', $this->extdir($result['new'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/tplsub6/tplfoo6"); + $this->assertTrue($ok); + $this->assertEquals(1, count($result['new'])); + $this->assertEquals('template', $result['new'][0]['type']); + $this->assertEquals('template6', $result['new'][0]['base']); + $this->assertEquals('tplsub6/tplfoo6', $this->extdir($result['new'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/either1"); + $this->assertTrue($ok); + $this->assertEquals(0, count($result['new'])); + $this->assertEquals(1, count($result['old'])); + $this->assertEquals('plugin', $result['old'][0]['type']); + $this->assertEquals('either1', $this->extdir($result['old'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/eithersub2/either2"); + $this->assertTrue($ok); + $this->assertEquals(0, count($result['new'])); + $this->assertEquals(1, count($result['old'])); + $this->assertEquals('plugin', $result['old'][0]['type']); + $this->assertEquals('eithersub2/either2', $this->extdir($result['old'][0]['tmp'])); } + /** + * remove the test data directory from a dir name for cross install comparison + * + * @param string $dir + * @return string + */ + protected function extdir($dir) { + $tdir = dirname(__FILE__).'/testdata'; + $len = strlen($tdir); + $dir = trim(substr($dir, $len), '/'); + return $dir; + } } \ No newline at end of file diff --git a/lib/plugins/extension/_test/testdata/either1/script.js b/lib/plugins/extension/_test/testdata/either1/script.js new file mode 100644 index 000000000..e69de29bb diff --git a/lib/plugins/extension/_test/testdata/eithersub2/either2/script.js b/lib/plugins/extension/_test/testdata/eithersub2/either2/script.js new file mode 100644 index 000000000..e69de29bb diff --git a/lib/plugins/extension/_test/testdata/plgfoo5/plugin.info.txt b/lib/plugins/extension/_test/testdata/plgfoo5/plugin.info.txt new file mode 100644 index 000000000..cc4532d29 --- /dev/null +++ b/lib/plugins/extension/_test/testdata/plgfoo5/plugin.info.txt @@ -0,0 +1,7 @@ +base plugin5 +author Andreas Gohr +email andi@splitbrain.org +date 2013-05-02 +name Dummy Plugin +desc Dummy plugin data +url http://example.com/plugin:plugin5 diff --git a/lib/plugins/extension/_test/testdata/plgsub3/plugin3/syntax.php b/lib/plugins/extension/_test/testdata/plgsub3/plugin3/syntax.php new file mode 100644 index 000000000..e69de29bb diff --git a/lib/plugins/extension/_test/testdata/plgsub4/plugin4/plugin.info.txt b/lib/plugins/extension/_test/testdata/plgsub4/plugin4/plugin.info.txt new file mode 100644 index 000000000..374b6bf24 --- /dev/null +++ b/lib/plugins/extension/_test/testdata/plgsub4/plugin4/plugin.info.txt @@ -0,0 +1,7 @@ +base plugin4 +author Andreas Gohr +email andi@splitbrain.org +date 2013-05-02 +name Dummy Plugin +desc Dummy plugin data +url http://example.com/plugin:plugin4 diff --git a/lib/plugins/extension/_test/testdata/plgsub6/plgfoo6/plugin.info.txt b/lib/plugins/extension/_test/testdata/plgsub6/plgfoo6/plugin.info.txt new file mode 100644 index 000000000..461ff8735 --- /dev/null +++ b/lib/plugins/extension/_test/testdata/plgsub6/plgfoo6/plugin.info.txt @@ -0,0 +1,7 @@ +base plugin6 +author Andreas Gohr +email andi@splitbrain.org +date 2013-05-02 +name Dummy Plugin +desc Dummy plugin data +url http://example.com/plugin:plugin6 diff --git a/lib/plugins/extension/_test/testdata/plugin1/syntax.php b/lib/plugins/extension/_test/testdata/plugin1/syntax.php new file mode 100644 index 000000000..e69de29bb diff --git a/lib/plugins/extension/_test/testdata/plugin2/plugin.info.txt b/lib/plugins/extension/_test/testdata/plugin2/plugin.info.txt new file mode 100644 index 000000000..d56758fe9 --- /dev/null +++ b/lib/plugins/extension/_test/testdata/plugin2/plugin.info.txt @@ -0,0 +1,7 @@ +base plugin2 +author Andreas Gohr +email andi@splitbrain.org +date 2013-05-02 +name Dummy Plugin +desc Dummy Plugin data +url http://example.com/plugin:plugin2 diff --git a/lib/plugins/extension/_test/testdata/template1/main.php b/lib/plugins/extension/_test/testdata/template1/main.php new file mode 100644 index 000000000..e69de29bb diff --git a/lib/plugins/extension/_test/testdata/template1/style.ini b/lib/plugins/extension/_test/testdata/template1/style.ini new file mode 100644 index 000000000..e69de29bb diff --git a/lib/plugins/extension/_test/testdata/template2/template.info.txt b/lib/plugins/extension/_test/testdata/template2/template.info.txt new file mode 100644 index 000000000..882a7b914 --- /dev/null +++ b/lib/plugins/extension/_test/testdata/template2/template.info.txt @@ -0,0 +1,7 @@ +base template2 +author Andreas Gohr +email andi@splitbrain.org +date 2013-05-02 +name Dummy Template +desc Dummy template data +url http://example.com/template:template2 diff --git a/lib/plugins/extension/_test/testdata/tplfoo5/template.info.txt b/lib/plugins/extension/_test/testdata/tplfoo5/template.info.txt new file mode 100644 index 000000000..4d7ecb8ef --- /dev/null +++ b/lib/plugins/extension/_test/testdata/tplfoo5/template.info.txt @@ -0,0 +1,7 @@ +base template5 +author Andreas Gohr +email andi@splitbrain.org +date 2013-05-02 +name Dummy Template +desc Dummy template data +url http://example.com/template:template5 diff --git a/lib/plugins/extension/_test/testdata/tplsub3/template3/main.php b/lib/plugins/extension/_test/testdata/tplsub3/template3/main.php new file mode 100644 index 000000000..e69de29bb diff --git a/lib/plugins/extension/_test/testdata/tplsub3/template3/style.ini b/lib/plugins/extension/_test/testdata/tplsub3/template3/style.ini new file mode 100644 index 000000000..e69de29bb diff --git a/lib/plugins/extension/_test/testdata/tplsub4/template4/template.info.txt b/lib/plugins/extension/_test/testdata/tplsub4/template4/template.info.txt new file mode 100644 index 000000000..f050555e5 --- /dev/null +++ b/lib/plugins/extension/_test/testdata/tplsub4/template4/template.info.txt @@ -0,0 +1,7 @@ +base template4 +author Andreas Gohr +email andi@splitbrain.org +date 2013-05-02 +name Dummy Template +desc Dummy template data +url http://example.com/template:template4 diff --git a/lib/plugins/extension/_test/testdata/tplsub6/tplfoo6/template.info.txt b/lib/plugins/extension/_test/testdata/tplsub6/tplfoo6/template.info.txt new file mode 100644 index 000000000..ea4dc230d --- /dev/null +++ b/lib/plugins/extension/_test/testdata/tplsub6/tplfoo6/template.info.txt @@ -0,0 +1,7 @@ +base template6 +author Andreas Gohr +email andi@splitbrain.org +date 2013-05-02 +name Dummy Template +desc Dummy template data +url http://example.com/template:template6 diff --git a/lib/plugins/extension/admin.php b/lib/plugins/extension/admin.php index cf4eb79d7..e28fd612c 100644 --- a/lib/plugins/extension/admin.php +++ b/lib/plugins/extension/admin.php @@ -67,11 +67,9 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { $this->infoFor = $extname; break; case 'install': - msg('Not implemented'); - break; case 'reinstall': case 'update': - $extension->setExtension($extname, false); + $extension->setExtension($extname); $status = $extension->installOrUpdate(); if ($status !== true) { msg($status, -1); @@ -80,7 +78,7 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { } break; case 'uninstall': - $extension->setExtension($extname, false); + $extension->setExtension($extname); $status = $extension->uninstall(); if ($status !== true) { msg($status, -1); @@ -89,7 +87,7 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { } break; case 'enable'; - $extension->setExtension($extname, false); + $extension->setExtension($extname); $status = $extension->enable(); if ($status !== true) { msg($status, -1); @@ -98,7 +96,7 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { } break; case 'disable'; - $extension->setExtension($extname, false); + $extension->setExtension($extname); $status = $extension->disable(); if ($status !== true) { msg($status, -1); diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 244ec9b9a..62f950cac 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -127,6 +127,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return bool If an update is available */ public function updateAvailable() { + if(!$this->isInstalled()) return false; $lastupdate = $this->getLastUpdate(); if ($lastupdate === false) return false; $installed = $this->getInstalledVersion(); @@ -518,21 +519,24 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { /** * Install or update the extension * - * @return bool|string True or an error message + * @throws \Exception when something goes wrong + * @return array The list of installed extensions */ public function installOrUpdate() { - if (($status = $this->download($this->getDownloadURL(), $path)) === true) { - if (($status = $this->installArchive($path, $installed_extensions, $this->isInstalled(), $this->getBase())) == true) { - // refresh extension information - if (!isset($installed_extensions[$this->getBase()])) { - $status = 'Error, the requested extension hasn\'t been installed or updated'; - } - $this->setExtension($this->getID()); - $this->purgeCache(); + try { + $path = $this->download($this->getDownloadURL()); + $installed = $this->installArchive($path, $this->isInstalled(), $this->getBase()); + + // refresh extension information + if (!isset($installed[$this->getBase()])) { + throw new Exception('Error, the requested extension hasn\'t been installed or updated'); } - $this->dir_delete(dirname($path)); + $this->setExtension($this->getID()); + $this->purgeCache(); + }catch (Exception $e){ + throw $e; } - return $status; + return $installed; } /** @@ -695,112 +699,108 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { /** * Download an archive to a protected path + * * @param string $url The url to get the archive from - * @param string $path The path where the archive was saved (output parameter) - * @return bool|string True on success, an error message on failure + * @throws Exception when something goes wrong + * @return string The path where the archive was saved */ - public function download($url, &$path) { + public function download($url) { // check the url $matches = array(); if(!preg_match('/[^\/]*$/', $url, $matches) || !$matches[0]) { - return $this->getLang('baddownloadurl'); + throw new Exception($this->getLang('baddownloadurl')); } $file = $matches[0]; // create tmp directory for download if(!($tmp = io_mktmpdir())) { - return $this->getLang('error_dircreate'); + throw new Exception($this->getLang('error_dircreate')); } // download - if(!$file = io_download($url, $tmp.'/', true, $file)) { + if(!$file = io_download($url, $tmp.'/', true, $file, 0)) { $this->dir_delete($tmp); - return sprintf($this->getLang('error_download'), $url); + throw new Exception(sprintf($this->getLang('error_download'), hsc($url))); } - $path = $tmp.'/'.$file; - - return true; + return $tmp.'/'.$file; } /** * @param string $file The path to the archive that shall be installed * @param bool $overwrite If an already installed plugin should be overwritten - * @param array $installed_extensions Array of all installed extensions in the form $base => ('type' => $type, 'action' => 'update'|'install') * @param string $base The basename of the plugin if it's known + * @throws Exception when something went wrong * @return bool|string True on success, an error message on failure */ - public function installArchive($file, &$installed_extensions, $overwrite=false, $base = '') { + public function installArchive($file, $overwrite=false, $base = '') { $error = false; // create tmp directory for decompression if(!($tmp = io_mktmpdir())) { - return $this->getLang('error_dircreate'); + throw new Exception($this->getLang('error_dircreate')); } // add default base folder if specified to handle case where zip doesn't contain this if($base && !@mkdir($tmp.'/'.$base)) { - $error = $this->getLang('error_dircreate'); + throw new Exception($this->getLang('error_dircreate')); } - if(!$error && !$this->decompress("$tmp/$file", "$tmp/".$base)) { - $error = sprintf($this->getLang('error_decompress'), $file); + // decompress + if(!$this->decompress("$tmp/$file", "$tmp/".$base)) { + throw new Exception(sprintf($this->getLang('error_decompress'), $file)); } // search $tmp/$base for the folder(s) that has been created // move the folder(s) to lib/.. - if(!$error) { - $result = array('old'=>array(), 'new'=>array()); - - if(!$this->find_folders($result, $tmp.'/'.$base, ($this->isTemplate() ? 'template' : 'plugin'))) { - $error = $this->getLang('error_findfolder'); + $result = array('old'=>array(), 'new'=>array()); + if(!$this->find_folders($result, $tmp.'/'.$base, ($this->isTemplate() ? 'template' : 'plugin'))) { + throw new Exception($this->getLang('error_findfolder')); + } - } else { - // choose correct result array - if(count($result['new'])) { - $install = $result['new']; - }else{ - $install = $result['old']; - } + // choose correct result array + if(count($result['new'])) { + $install = $result['new']; + }else{ + $install = $result['old']; + } - // now install all found items - foreach($install as $item) { - // where to install? - if($item['type'] == 'template') { - $target_base_dir = DOKU_TPLLIB; - }else{ - $target_base_dir = DOKU_PLUGIN; - } + // now install all found items + foreach($install as $item) { + // where to install? + if($item['type'] == 'template') { + $target_base_dir = DOKU_TPLLIB; + }else{ + $target_base_dir = DOKU_PLUGIN; + } - if(!empty($item['base'])) { - // use base set in info.txt - } elseif($base && count($install) == 1) { - $item['base'] = $base; - } else { - // default - use directory as found in zip - // plugins from github/master without *.info.txt will install in wrong folder - // but using $info->id will make 'code3' fail (which should install in lib/code/..) - $item['base'] = basename($item['tmp']); - } + if(!empty($item['base'])) { + // use base set in info.txt + } elseif($base && count($install) == 1) { + $item['base'] = $base; + } else { + // default - use directory as found in zip + // plugins from github/master without *.info.txt will install in wrong folder + // but using $info->id will make 'code3' fail (which should install in lib/code/..) + $item['base'] = basename($item['tmp']); + } - // check to make sure we aren't overwriting anything - $target = $target_base_dir.$item['base']; - if(!$overwrite && @file_exists($target)) { - // TODO remember our settings, ask the user to confirm overwrite - continue; - } + // check to make sure we aren't overwriting anything + $target = $target_base_dir.$item['base']; + if(!$overwrite && @file_exists($target)) { + // TODO remember our settings, ask the user to confirm overwrite + continue; + } - $action = @file_exists($target) ? 'update' : 'install'; + $action = @file_exists($target) ? 'update' : 'install'; - // copy action - if($this->dircopy($item['tmp'], $target)) { - // TODO: write manager.dat! - $installed_extensions[$item['base']] = array('type' => $item['type'], 'action' => $action); - } else { - $error = sprintf($this->getLang('error_copy').DOKU_LF, $item['base']); - break; - } - } + // copy action + if($this->dircopy($item['tmp'], $target)) { + // TODO: write manager.dat! + $installed_extensions[$item['base']] = array('type' => $item['type'], 'action' => $action); + } else { + $error = sprintf($this->getLang('error_copy').DOKU_LF, $item['base']); + break; } } @@ -830,25 +830,24 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @author Andreas Gohr * @param array $result - results are stored here - * @param string $base - the temp directory where the package was unpacked to + * @param string $directory - the temp directory where the package was unpacked to * @param string $default_type - type used if no info.txt available - * @param string $dir - a subdirectory. do not set. used by recursion + * @param string $subdir - a subdirectory. do not set. used by recursion * @return bool - false on error */ - private function find_folders(&$result, $base, $default_type, $dir='') { - $this_dir = "$base$dir"; + protected function find_folders(&$result, $directory, $default_type='plugin', $subdir='') { + $this_dir = "$directory$subdir"; $dh = @opendir($this_dir); if(!$dh) return false; $found_dirs = array(); $found_files = 0; $found_template_parts = 0; - $found_info_txt = false; while (false !== ($f = readdir($dh))) { if($f == '.' || $f == '..') continue; if(is_dir("$this_dir/$f")) { - $found_dirs[] = "$dir/$f"; + $found_dirs[] = "$subdir/$f"; } else { // it's a file -> check for config @@ -856,7 +855,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { switch ($f) { case 'plugin.info.txt': case 'template.info.txt': - $found_info_txt = true; + // we have found a clear marker, save and return $info = array(); $type = explode('.', $f, 2); $info['type'] = $type[0]; @@ -864,7 +863,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { $conf = confToHash("$this_dir/$f"); $info['base'] = basename($conf['base']); $result['new'][] = $info; - break; + return true; case 'main.php': case 'details.php': @@ -877,33 +876,24 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { } closedir($dh); - // URL downloads default to 'plugin', try extra hard to indentify templates - if(!$default_type && $found_template_parts > 2 && !$found_info_txt) { + // files where found but no info.txt - use old method + if($found_files){ $info = array(); - $info['type'] = 'template'; $info['tmp'] = $this_dir; - $result['new'][] = $info; - } + // does this look like a template or should we use the default type? + if($found_template_parts >= 2) { + $info['type'] = 'template'; + } else { + $info['type'] = $default_type; + } - // files in top level but no info.txt, assume this is zip missing a base directory - // works for all downloads unless direct URL where $base will be the tmp directory ($info->id was empty) - if(!$dir && $found_files > 0 && !$found_info_txt && $default_type) { - $info = array(); - $info['type'] = $default_type; - $info['tmp'] = $base; $result['old'][] = $info; return true; } + // we have no files yet -> recurse foreach ($found_dirs as $found_dir) { - // if top level add to dir list for old method, then recurse - if(!$dir) { - $info = array(); - $info['type'] = ($default_type ? $default_type : 'plugin'); - $info['tmp'] = "$base$found_dir"; - $result['old'][] = $info; - } - $this->find_folders($result, $base, $default_type, "$found_dir"); + $this->find_folders($result, $directory, $default_type, "$found_dir"); } return true; } -- cgit v1.2.3 From 5c0b30bf48d7f8e5f3d5764cfab94d0d09c0a8b1 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Aug 2013 21:26:20 +0200 Subject: installation now works --- lib/plugins/extension/admin.php | 14 +++++++------ lib/plugins/extension/helper/extension.php | 33 ++++++++++++++++++------------ lib/plugins/extension/lang/en/lang.php | 9 +++++++- 3 files changed, 36 insertions(+), 20 deletions(-) diff --git a/lib/plugins/extension/admin.php b/lib/plugins/extension/admin.php index e28fd612c..f1ed83591 100644 --- a/lib/plugins/extension/admin.php +++ b/lib/plugins/extension/admin.php @@ -69,12 +69,14 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { case 'install': case 'reinstall': case 'update': - $extension->setExtension($extname); - $status = $extension->installOrUpdate(); - if ($status !== true) { - msg($status, -1); - } else { - msg(sprintf($this->getLang('msg_update_success'), hsc($extension->getDisplayName())), 1); + try { + $extension->setExtension($extname); + $installed = $extension->installOrUpdate(); + foreach($installed as $extension => $info){ + msg(sprintf($this->getLang('msg_'.$info['type'].'_'.$info['action'].'_success'), $info['base']), 1); + } + }catch (Exception $e){ + msg($e->getMessage(), -1); } break; case 'uninstall': diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 62f950cac..8438253f9 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -528,7 +528,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { $installed = $this->installArchive($path, $this->isInstalled(), $this->getBase()); // refresh extension information - if (!isset($installed[$this->getBase()])) { + if (!isset($installed[$this->getID()])) { throw new Exception('Error, the requested extension hasn\'t been installed or updated'); } $this->setExtension($this->getID()); @@ -734,7 +734,6 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return bool|string True on success, an error message on failure */ public function installArchive($file, $overwrite=false, $base = '') { - $error = false; // create tmp directory for decompression if(!($tmp = io_mktmpdir())) { @@ -747,14 +746,21 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { } // decompress - if(!$this->decompress("$tmp/$file", "$tmp/".$base)) { + if(!$this->decompress($file, "$tmp/".$base)) { throw new Exception(sprintf($this->getLang('error_decompress'), $file)); } // search $tmp/$base for the folder(s) that has been created // move the folder(s) to lib/.. $result = array('old'=>array(), 'new'=>array()); - if(!$this->find_folders($result, $tmp.'/'.$base, ($this->isTemplate() ? 'template' : 'plugin'))) { + if($base){ + // when a base was set it came from the current extension setup #fixme this is a bit hacky + $default = ($this->isTemplate() ? 'template' : 'plugin'); + }else{ + // assume a default of plugin, find_folders will autodetect templates + $default = 'plugin'; + } + if(!$this->find_folders($result, $tmp.'/'.$base, $default)) { throw new Exception($this->getLang('error_findfolder')); } @@ -796,22 +802,23 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { // copy action if($this->dircopy($item['tmp'], $target)) { - // TODO: write manager.dat! - $installed_extensions[$item['base']] = array('type' => $item['type'], 'action' => $action); + // return info + $id = $item['base']; + if($item['type'] == 'template') $id = 'template:'.$id; + $installed_extensions[$id] = array( + 'base' => $item['base'], + 'type' => $item['type'], + 'action' => $action + ); } else { - $error = sprintf($this->getLang('error_copy').DOKU_LF, $item['base']); - break; + throw new Exception(sprintf($this->getLang('error_copy').DOKU_LF, $item['base'])); } } // cleanup if($tmp) $this->dir_delete($tmp); - if($error) { - return $error; - } - - return true; + return $installed_extensions; } /** diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index 24cabe1fa..1a5c90923 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -73,11 +73,18 @@ $lang['msg_notenabled'] = 'Plugin %s could not be enabled, check file pe $lang['msg_disabled'] = 'Plugin %s disabled'; $lang['msg_notdisabled'] = 'Plugin %s could not be disabled, check file permissions'; + +$lang['msg_template_install_success'] = 'Template %s installed successfully'; +$lang['msg_template_update_success'] = 'Template %s updated successfully'; +$lang['msg_plugin_install_success'] = 'Plugin %s installed successfully'; +$lang['msg_plugin_update_success'] = 'Plugin %s updated successfully'; + + $lang['msg_url_failed'] = 'URL [%s] could not be downloaded.
      %s'; $lang['msg_download_failed'] = 'Plugin %s could not be downloaded.
      %s'; $lang['msg_download_success'] = 'Plugin %s installed successfully'; $lang['msg_tpl_download_failed'] = 'Template %s could not be downloaded.
      %s'; -$lang['msg_tpl_download_success'] = 'Template %s installed successfully'; + $lang['msg_download_pkg_success'] = '%s extension package successfully installed (%s)'; $lang['msg_tpl_download_pkg_success'] = '%s extension package successfully installed (%s)'; -- cgit v1.2.3 From 045d57189c1fb4e8775603cd39927557e3eddfd9 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Aug 2013 21:34:51 +0200 Subject: make sure temporary folders are cleaned up --- lib/plugins/extension/helper/extension.php | 32 ++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 8438253f9..dc570aa0d 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -23,6 +23,20 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { /** @var helper_plugin_extension_repository $repository */ private $repository = null; + /** @var array list of temporary directories */ + private $temporary = array(); + + /** + * Destructor + * + * deletes any dangling temporary directories + */ + public function __destruct() { + foreach($this->temporary as $dir){ + $this->dir_delete($dir); + } + } + /** * @return bool false, this component is not a singleton */ @@ -697,6 +711,20 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { } } + /** + * Returns a temporary directory + * + * The directory is registered for cleanup when the class is destroyed + * + * @return bool|string + */ + protected function mkTmpDir(){ + $dir = io_mktmpdir(); + if(!$dir) return false; + $this->temporary[] = $dir; + return $dir; + } + /** * Download an archive to a protected path * @@ -713,7 +741,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { $file = $matches[0]; // create tmp directory for download - if(!($tmp = io_mktmpdir())) { + if(!($tmp = $this->mkTmpDir())) { throw new Exception($this->getLang('error_dircreate')); } @@ -736,7 +764,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { public function installArchive($file, $overwrite=false, $base = '') { // create tmp directory for decompression - if(!($tmp = io_mktmpdir())) { + if(!($tmp = $this->mkTmpDir())) { throw new Exception($this->getLang('error_dircreate')); } -- cgit v1.2.3 From 341cc636324f216ddc217fc03f02004b8423b9f0 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Aug 2013 21:38:31 +0200 Subject: sort plugins --- lib/plugins/extension/helper/gui.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/plugins/extension/helper/gui.php b/lib/plugins/extension/helper/gui.php index 09cea7fcb..57dfefab3 100644 --- a/lib/plugins/extension/helper/gui.php +++ b/lib/plugins/extension/helper/gui.php @@ -29,6 +29,7 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { echo $this->locale_xhtml('intro_plugins'); $pluginlist = $plugin_controller->getList('', true); + sort($pluginlist); /* @var helper_plugin_extension_extension $extension */ $extension = $this->loadHelper('extension_extension'); /* @var helper_plugin_extension_list $list */ @@ -51,6 +52,7 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { // FIXME do we have a real way? $tpllist = glob(DOKU_INC.'lib/tpl/*', GLOB_ONLYDIR); $tpllist = array_map('basename', $tpllist); + sort($tpllist); /* @var helper_plugin_extension_extension $extension */ $extension = $this->loadHelper('extension_extension'); -- cgit v1.2.3 From 8251e9612a372ea2e25e0d896fb0c3b8e4c3af73 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Aug 2013 21:54:37 +0200 Subject: some style changes --- lib/plugins/extension/helper/list.php | 8 +++++--- lib/plugins/extension/images/tag.png | Bin 0 -> 753 bytes lib/plugins/extension/style.less | 30 +++++++++--------------------- 3 files changed, 14 insertions(+), 24 deletions(-) create mode 100644 lib/plugins/extension/images/tag.png diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 62031a69b..79728b5ca 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -244,7 +244,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { } if($extension->getTags()){ $first = true; - echo ''; + $return .= ''; foreach ($extension->getTags() as $tag) { if(!$first){ $return .= ', '; @@ -254,7 +254,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $url = $this->gui->tabURL('search', array('q' => 'tag:'.$tag)); $return .= ''.hsc($tag).''; } - echo ''; + $return .= ''; } $return .= ''; return $return; @@ -451,7 +451,9 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { } if (!$extension->isProtected()) { if ($extension->isEnabled()) { - $return .= $this->make_action('disable', $extension); + if(!$extension->isTemplate()){ // templates can't be disabled, only anothe can be enabled + $return .= $this->make_action('disable', $extension); + } } else { $return .= $this->make_action('enable', $extension); } diff --git a/lib/plugins/extension/images/tag.png b/lib/plugins/extension/images/tag.png new file mode 100644 index 000000000..155dbb3dd Binary files /dev/null and b/lib/plugins/extension/images/tag.png differ diff --git a/lib/plugins/extension/style.less b/lib/plugins/extension/style.less index cd9eeaa74..53c260f8d 100644 --- a/lib/plugins/extension/style.less +++ b/lib/plugins/extension/style.less @@ -20,6 +20,7 @@ background: url(images/overlay.png) repeat; text-align: center; cursor: pointer; + z-index: 9999; p { text-align: right; @@ -44,16 +45,6 @@ margin-left: 0; } -#extension__manager a.taglink { - padding: 1px 4px; - background-color: @ini_background_neu; - border-radius: 3px; -} -[dir=rtl] #extension__manager a.taglink { - display: inline-block; - line-height: 1.2; -} - #extension__manager .panelHeader div.error { margin-top: 0; float: left; @@ -173,6 +164,10 @@ background: transparent url(images/disabled.png) no-repeat 2px 2px; } +#extension__manager .disabled .legend { + opacity: 0.7; +} + #extension__manager div.screenshot img { width: 120px; height: 70px; @@ -227,19 +222,12 @@ font-size: 85%; } -#extension__manager .legend span.linkbar a.urlextern + a.taglink, -#extension__manager .legend span.linkbar a.interwiki + a.taglink { - margin-left: 0.4em; -} -[dir=rtl] #extension__manager .legend span.linkbar a.urlextern + a.taglink, -[dir=rtl] #extension__manager .legend span.linkbar a.interwiki + a.taglink { - margin-left: 0; -} -[dir=rtl] #extension__manager .legend span.linkbar a.urlextern, -[dir=rtl] #extension__manager .legend span.linkbar a.interwiki { - margin-left: .4em; +#extension__manager .legend span.linkbar span.tags { + padding-left: 18px; + background: transparent url(images/tag.png) no-repeat 0 0; } + #extension__manager .legend input.button { background: transparent url(images/up.png) no-repeat 0 0; box-shadow: none; -- cgit v1.2.3 From 1e0eea17dc60dc6f5ec81ffcca313db353c88c44 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Aug 2013 22:11:52 +0200 Subject: fixed popularity display --- lib/plugins/extension/helper/extension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index dc570aa0d..b3bce082f 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -349,7 +349,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return float|bool The popularity information or false if it isn't available */ public function getPopularity() { - if (!empty($this->remoteInfo['popularity'])) return $this->remoteInfo['popularity']/200.0; + if (!empty($this->remoteInfo['popularity'])) return $this->remoteInfo['popularity']; return false; } -- cgit v1.2.3 From 75e063084d865a011e074c29c5edb8569fe2cfe1 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Aug 2013 22:58:01 +0200 Subject: made info mechanism work again --- lib/plugins/extension/admin.php | 3 -- lib/plugins/extension/helper/gui.php | 21 +++++++++++--- lib/plugins/extension/helper/list.php | 43 ++++++++++++++--------------- lib/plugins/extension/helper/repository.php | 12 ++++++-- lib/plugins/extension/style.less | 11 ++++---- 5 files changed, 54 insertions(+), 36 deletions(-) diff --git a/lib/plugins/extension/admin.php b/lib/plugins/extension/admin.php index f1ed83591..3237a26e5 100644 --- a/lib/plugins/extension/admin.php +++ b/lib/plugins/extension/admin.php @@ -63,9 +63,6 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { foreach ($actions as $action => $extensions) { foreach ($extensions as $extname => $label) { switch ($action) { - case 'info': - $this->infoFor = $extname; - break; case 'install': case 'reinstall': case 'update': diff --git a/lib/plugins/extension/helper/gui.php b/lib/plugins/extension/helper/gui.php index 57dfefab3..6a0cdb22e 100644 --- a/lib/plugins/extension/helper/gui.php +++ b/lib/plugins/extension/helper/gui.php @@ -17,7 +17,18 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { protected $tabs = array('plugins', 'templates', 'search', 'install'); /** @var string the extension that should have an open info window FIXME currently broken*/ - protected $infofor = ''; + protected $infoFor = ''; + + /** + * Constructor + * + * initializes requested info window + */ + public function __construct(){ + global $INPUT; + $this->infoFor = $INPUT->str('info'); + } + /** * display the plugin tab @@ -37,7 +48,7 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { $list->start_form(); foreach($pluginlist as $name) { $extension->setExtension($name); - $list->add_row($extension, $name == $this->infoFor); + $list->add_row($extension, $extension->getID() == $this->infoFor); } $list->end_form(); $list->render(); @@ -61,7 +72,7 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { $list->start_form(); foreach($tpllist as $name) { $extension->setExtension("template:$name"); - $list->add_row($extension, $name == $this->infoFor); + $list->add_row($extension, $extension->getID() == $this->infoFor); } $list->end_form(); $list->render(); @@ -93,7 +104,7 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { $list->start_form(); foreach($result as $name) { $extension->setExtension($name); - $list->add_row($extension, $name == $this->infoFor); + $list->add_row($extension, $extension->getID() == $this->infoFor); } $list->end_form(); $list->render(); @@ -149,12 +160,14 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { */ public function tabURL($tab = '', $params = array(), $sep = '&') { global $ID; + global $INPUT; if(!$tab) $tab = $this->currentTab(); $defaults = array( 'do' => 'admin', 'page' => 'extension', 'tab' => $tab, + 'q' => $INPUT->str('q') ); return wl($ID, array_merge($defaults, $params), false, $sep); } diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 79728b5ca..767a8ed40 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -101,7 +101,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @param helper_plugin_extension_extension $extension The extension */ private function start_row(helper_plugin_extension_extension $extension) { - $this->form .= '
    • '; + $this->form .= '
    • '; } /** @@ -221,7 +221,15 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $return .= '

      '; $return .= $this->make_linkbar($extension); - $return .= $this->make_action('info', $extension, $showinfo); + + if($showinfo){ + $url = $this->gui->tabURL(''); + $return .= ''.$this->getLang('btn_info').''; + }else{ + $url = $this->gui->tabURL('', array('info' => $extension->getID())); + $return .= ''.$this->getLang('btn_info').''; + } + if ($showinfo) { $return .= $this->make_info($extension); } @@ -415,15 +423,14 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { /** * Generate a list of links for extensions - * @param array $links The links + * + * @param array $ext The extensions * @return string The HTML code */ - function make_linklist($links) { + function make_linklist($ext) { $return = ''; - foreach ($links as $link) { - $dokulink = hsc($link); - if (strpos($link, 'template:') !== 0) $dokulink = 'plugin:'.$dokulink; - $return .= ''.$link.' '; + foreach ($ext as $link) { + $return .= ''.hsc($link).' '; } return $return; } @@ -438,7 +445,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $return = ''; if (!$extension->isInstalled() && $extension->canModify() === true) { $return .= $this->make_action('install', $extension); - } elseif ($extension->canModify()) { + } elseif ($extension->canModify() === true) { if (!$extension->isBundled()) { $return .= $this->make_action('uninstall', $extension); if ($extension->getDownloadURL()) { @@ -451,7 +458,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { } if (!$extension->isProtected()) { if ($extension->isEnabled()) { - if(!$extension->isTemplate()){ // templates can't be disabled, only anothe can be enabled + if(!$extension->isTemplate()){ // templates can't be disabled, only another can be enabled $return .= $this->make_action('disable', $extension); } } else { @@ -473,28 +480,20 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * * @param string $action The action * @param helper_plugin_extension_extension $extension The extension - * @param bool $showinfo If the info block is shown * @return string The HTML code */ - function make_action($action, $extension, $showinfo = false) { - $title = $revertAction = $extraClass = ''; + function make_action($action, $extension) { + $title = ''; switch ($action) { - case 'info': - $title = 'title="'.$this->getLang('btn_info').'"'; - if ($showinfo) { - $revertAction = '-'; - $extraClass = 'close'; - } - break; case 'install': case 'reinstall': $title = 'title="'.$extension->getDownloadURL().'"'; break; } - $classes = 'button '.$action.' '.$extraClass; - $name = 'fn['.$action.']['.$revertAction.hsc($extension->getInstallName()).']'; + $classes = 'button '.$action; + $name = 'fn['.$action.']['.hsc($extension->getID()).']'; return ''; } diff --git a/lib/plugins/extension/helper/repository.php b/lib/plugins/extension/helper/repository.php index 38e07786e..1f603a866 100644 --- a/lib/plugins/extension/helper/repository.php +++ b/lib/plugins/extension/helper/repository.php @@ -146,9 +146,10 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin { */ protected function parse_query($q){ $parameters = array( - 'tag' => array(), + 'tag' => array(), 'mail' => array(), - 'type' => array() + 'type' => array(), + 'ext' => array() ); // extract tags @@ -165,6 +166,13 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin { $parameters['mail'][] = $m[3]; } } + // extract extensions + if(preg_match_all('/(^|\s)(ext:([\S]+))/', $q, $matches, PREG_SET_ORDER)){ + foreach($matches as $m){ + $q = str_replace($m[2], '', $q); + $parameters['ext'][] = $m[3]; + } + } // extract types if(preg_match_all('/(^|\s)(type:([\S]+))/', $q, $matches, PREG_SET_ORDER)){ foreach($matches as $m){ diff --git a/lib/plugins/extension/style.less b/lib/plugins/extension/style.less index 53c260f8d..fc5613044 100644 --- a/lib/plugins/extension/style.less +++ b/lib/plugins/extension/style.less @@ -228,21 +228,22 @@ } -#extension__manager .legend input.button { +#extension__manager .legend a.info { background: transparent url(images/up.png) no-repeat 0 0; - box-shadow: none; border-width: 0; - height: 14px; + height: 13px; + width: 13px; text-indent: -99999px; float: right; margin: .5em 0 0; + overflow: hidden; } -[dir=rtl] #extension__manager .legend input.button { +[dir=rtl] #extension__manager .legend a.info { float: left; margin: .5em 0 0; } -#extension__manager .legend input.button.close { +#extension__manager .legend a.info.close { background: transparent url(images/down.png) no-repeat 0 0; } -- cgit v1.2.3 From 72dda0b4378651b271f5fb516fb8e21a80ac3ebf Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Aug 2013 23:55:39 +0200 Subject: added AJAX detail infos --- lib/plugins/extension/action.php | 51 +++++++++++++++++++++++++++++++++++ lib/plugins/extension/helper/list.php | 5 ++-- lib/plugins/extension/script.js | 29 +++++++++++++++++++- 3 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 lib/plugins/extension/action.php diff --git a/lib/plugins/extension/action.php b/lib/plugins/extension/action.php new file mode 100644 index 000000000..b35c1cb13 --- /dev/null +++ b/lib/plugins/extension/action.php @@ -0,0 +1,51 @@ + + */ + +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +class action_plugin_extension extends DokuWiki_Action_Plugin { + + /** + * Registers a callback function for a given event + * + * @param Doku_Event_Handler $controller DokuWiki's event controller object + * @return void + */ + public function register(Doku_Event_Handler &$controller) { + + $controller->register_hook('AJAX_CALL_UNKNOWN', 'BEFORE', $this, 'info'); + + } + + public function info(Doku_Event &$event, $param){ + global $INPUT; + if($event->data != 'plugin_extension') return; + $event->preventDefault(); + $event->stopPropagation(); + + header('Content-Type: text/html; charset=utf-8'); + + $ext = $INPUT->str('ext'); + if(!$ext) { + echo 'no extension given'; + return; + } + + /** @var helper_plugin_extension_extension $extension */ + $extension = plugin_load('helper', 'extension_extension'); + $extension->setExtension($ext); + + /** @var helper_plugin_extension_list $list */ + $list = plugin_load('helper', 'extension_list'); + + + echo $list->make_info($extension); + } + +} + diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 767a8ed40..6b1d41f78 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -224,11 +224,12 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { if($showinfo){ $url = $this->gui->tabURL(''); - $return .= ''.$this->getLang('btn_info').''; + $class = 'close'; }else{ $url = $this->gui->tabURL('', array('info' => $extension->getID())); - $return .= ''.$this->getLang('btn_info').''; + $class = ''; } + $return .= ''.$this->getLang('btn_info').''; if ($showinfo) { $return .= $this->make_info($extension); diff --git a/lib/plugins/extension/script.js b/lib/plugins/extension/script.js index f2a6aae50..7480801ac 100644 --- a/lib/plugins/extension/script.js +++ b/lib/plugins/extension/script.js @@ -5,7 +5,7 @@ jQuery(function(){ * very simple lightbox * @link http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/super-simple-lightbox-with-css-and-jquery/ */ - jQuery('a.extension_screenshot').click(function(e) { + jQuery('#extension__manager a.extension_screenshot').click(function(e) { e.preventDefault(); //Get clicked link href @@ -31,4 +31,31 @@ jQuery(function(){ return false; }); + /** + * AJAX detail infos + */ + jQuery('#extension__manager a.info').click(function(e){ + e.preventDefault(); + + var $link = jQuery(this); + var $details = $link.parent().find('dl.details'); + if($details.length){ + $link.toggleClass('close'); + $details.toggle(); + return; + } + + $link.addClass('close'); + jQuery.get( + DOKU_BASE + 'lib/exe/ajax.php', + { + call: 'plugin_extension', + ext: $link.data('extid') + }, + function(data){ + $link.parent().append(data); + } + ); + }); + }); \ No newline at end of file -- cgit v1.2.3 From fee60c9e19860de9edb1dd146ec7063bb9eda392 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 10 Aug 2013 10:23:04 +0200 Subject: manual install tab now works --- lib/plugins/extension/admin.php | 46 +++++++++----- lib/plugins/extension/helper/extension.php | 98 +++++++++++++++++++++++++----- lib/plugins/extension/helper/gui.php | 14 +++-- lib/plugins/extension/lang/en/lang.php | 4 +- 4 files changed, 127 insertions(+), 35 deletions(-) diff --git a/lib/plugins/extension/admin.php b/lib/plugins/extension/admin.php index 3237a26e5..62d94e899 100644 --- a/lib/plugins/extension/admin.php +++ b/lib/plugins/extension/admin.php @@ -22,7 +22,7 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { * * loads additional helpers */ - public function __construct(){ + public function __construct() { $this->gui = plugin_load('helper', 'extension_gui'); } @@ -49,37 +49,36 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { /* @var helper_plugin_extension_repository $repository */ $repository = $this->loadHelper('extension_repository'); - - if(!$repository->hasAccess()){ - $url = $this->gui->tabURL('', array('purge'=>1)); + if(!$repository->hasAccess()) { + $url = $this->gui->tabURL('', array('purge' => 1)); msg($this->getLang('repo_error').' ['.$this->getLang('repo_retry').']', -1); } /* @var helper_plugin_extension_extension $extension */ $extension = $this->loadHelper('extension_extension'); - if ($INPUT->post->has('fn')) { + if($INPUT->post->has('fn') && checkSecurityToken()) { $actions = $INPUT->post->arr('fn'); - foreach ($actions as $action => $extensions) { - foreach ($extensions as $extname => $label) { - switch ($action) { + foreach($actions as $action => $extensions) { + foreach($extensions as $extname => $label) { + switch($action) { case 'install': case 'reinstall': case 'update': try { $extension->setExtension($extname); $installed = $extension->installOrUpdate(); - foreach($installed as $extension => $info){ + foreach($installed as $ext => $info) { msg(sprintf($this->getLang('msg_'.$info['type'].'_'.$info['action'].'_success'), $info['base']), 1); } - }catch (Exception $e){ + } catch(Exception $e) { msg($e->getMessage(), -1); } break; case 'uninstall': $extension->setExtension($extname); $status = $extension->uninstall(); - if ($status !== true) { + if($status !== true) { msg($status, -1); } else { msg(sprintf($this->getLang('msg_delete_success'), hsc($extension->getDisplayName())), 1); @@ -88,7 +87,7 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { case 'enable'; $extension->setExtension($extname); $status = $extension->enable(); - if ($status !== true) { + if($status !== true) { msg($status, -1); } else { msg(sprintf($this->getLang('msg_enabled'), hsc($extension->getDisplayName())), 1); @@ -97,7 +96,7 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { case 'disable'; $extension->setExtension($extname); $status = $extension->disable(); - if ($status !== true) { + if($status !== true) { msg($status, -1); } else { msg(sprintf($this->getLang('msg_disabled'), hsc($extension->getDisplayName())), 1); @@ -106,6 +105,24 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { } } } + } elseif($INPUT->post->str('installurl') && checkSecurityToken()) { + try { + $installed = $extension->installFromURL($INPUT->post->str('installurl')); + foreach($installed as $ext => $info) { + msg(sprintf($this->getLang('msg_'.$info['type'].'_'.$info['action'].'_success'), $info['base']), 1); + } + } catch(Exception $e) { + msg($e->getMessage(), -1); + } + } elseif(isset($_FILES['installfile']) && checkSecurityToken()) { + try { + $installed = $extension->installFromUpload('installfile'); + foreach($installed as $ext => $info) { + msg(sprintf($this->getLang('msg_'.$info['type'].'_'.$info['action'].'_success'), $info['base']), 1); + } + } catch(Exception $e) { + msg($e->getMessage(), -1); + } } } @@ -118,7 +135,7 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { $this->gui->tabNavigation(); - switch($this->gui->currentTab()){ + switch($this->gui->currentTab()) { case 'search': $this->gui->tabSearch(); break; @@ -133,7 +150,6 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { $this->gui->tabPlugins(); } - ptln('
    '); } } diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index b3bce082f..550fc33fb 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -530,6 +530,67 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { return true; } + /** + * Install an extension from a user upload + * + * @param string $field name of the upload file + * @throws Exception when something goes wrong + * @return array The list of installed extensions + */ + public function installFromUpload($field){ + if($_FILES[$field]['error']){ + throw new Exception($this->getLang('msg_upload_failed').' ('.$_FILES[$field]['error'].')'); + } + + $tmp = $this->mkTmpDir(); + if(!$tmp) throw new Exception($this->getLang('error_dircreate')); + + // filename may contain the plugin name for old style plugins... + $basename = basename($_FILES[$field]['name']); + $basename = preg_replace('/\.(tar\.gz|tar\.bz|tar\.bz2|tar|tgz|tbz|zip)$/', '', $basename); + $basename = preg_replace('/[\W]+/', '', $basename); + + if(!move_uploaded_file($_FILES[$field]['tmp_name'], "$tmp/upload.archive")){ + throw new Exception($this->getLang('msg_upload_failed')); + } + + try { + $installed = $this->installArchive("$tmp/upload.archive", true, $basename); + + // purge caches + foreach($installed as $ext => $info){ + $this->setExtension($ext); + $this->purgeCache(); + } + }catch (Exception $e){ + throw $e; + } + return $installed; + } + + /** + * Install an extension from a remote URL + * + * @param string $url + * @throws Exception when something goes wrong + * @return array The list of installed extensions + */ + public function installFromURL($url){ + try { + $path = $this->download($url); + $installed = $this->installArchive($path, true); + + // purge caches + foreach($installed as $ext => $info){ + $this->setExtension($ext); + $this->purgeCache(); + } + }catch (Exception $e){ + throw $e; + } + return $installed; + } + /** * Install or update the extension * @@ -759,9 +820,10 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @param bool $overwrite If an already installed plugin should be overwritten * @param string $base The basename of the plugin if it's known * @throws Exception when something went wrong - * @return bool|string True on success, an error message on failure + * @return array list of installed extensions */ public function installArchive($file, $overwrite=false, $base = '') { + $installed_extensions = array(); // create tmp directory for decompression if(!($tmp = $this->mkTmpDir())) { @@ -774,20 +836,16 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { } // decompress - if(!$this->decompress($file, "$tmp/".$base)) { - throw new Exception(sprintf($this->getLang('error_decompress'), $file)); + try{ + $this->decompress($file, "$tmp/".$base); + } catch (Exception $e) { + throw $e; } // search $tmp/$base for the folder(s) that has been created // move the folder(s) to lib/.. $result = array('old'=>array(), 'new'=>array()); - if($base){ - // when a base was set it came from the current extension setup #fixme this is a bit hacky - $default = ($this->isTemplate() ? 'template' : 'plugin'); - }else{ - // assume a default of plugin, find_folders will autodetect templates - $default = 'plugin'; - } + $default = ($this->isTemplate() ? 'template' : 'plugin'); if(!$this->find_folders($result, $tmp.'/'.$base, $default)) { throw new Exception($this->getLang('error_findfolder')); } @@ -799,6 +857,10 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { $install = $result['old']; } + if(!count($install)){ + throw new Exception($this->getLang('error_findfolder')); + } + // now install all found items foreach($install as $item) { // where to install? @@ -933,11 +995,15 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { return true; } - /** * Decompress a given file to the given target directory * * Determines the compression type from the file extension + * + * @param string $file archive to extract + * @param string $target directory to extract to + * @throws Exception + * @return bool */ private function decompress($file, $target) { // decompression library doesn't like target folders ending in "/" @@ -961,7 +1027,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { $tar->open($file, $compress_type); $tar->extract($target); } catch (Exception $e) { - return $e->getMessage(); + throw new Exception($this->getLang('error_decompress').' '.$e->getMessage()); } return true; @@ -970,11 +1036,15 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { $zip = new ZipLib(); $ok = $zip->Extract($file, $target); - return ($ok==-1 ? 'Error extracting the zip archive' : true); + if($ok == -1){ + throw new Exception($this->getLang('error_decompress').' Error extracting the zip archive'); + } + + return true; } // the only case when we don't get one of the recognized archive types is when the archive file can't be read - return 'Couldn\'t read archive file'; + throw new Exception($this->getLang('error_decompress').' Couldn\'t read archive file'); } /** diff --git a/lib/plugins/extension/helper/gui.php b/lib/plugins/extension/helper/gui.php index 6a0cdb22e..8577a1696 100644 --- a/lib/plugins/extension/helper/gui.php +++ b/lib/plugins/extension/helper/gui.php @@ -16,7 +16,7 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { protected $tabs = array('plugins', 'templates', 'search', 'install'); - /** @var string the extension that should have an open info window FIXME currently broken*/ + /** @var string the extension that should have an open info window FIXME currently broken */ protected $infoFor = ''; /** @@ -24,12 +24,11 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { * * initializes requested info window */ - public function __construct(){ + public function __construct() { global $INPUT; $this->infoFor = $INPUT->str('info'); } - /** * display the plugin tab */ @@ -92,10 +91,9 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { if(!$INPUT->bool('q')) return; - /* @var helper_plugin_extension_repository $repository FIXME should we use some gloabl instance? */ $repository = $this->loadHelper('extension_repository'); - $result = $repository->search($INPUT->str('q')); + $result = $repository->search($INPUT->str('q')); /* @var helper_plugin_extension_extension $extension */ $extension = $this->loadHelper('extension_extension'); @@ -116,6 +114,12 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { */ public function tabInstall() { echo $this->locale_xhtml('intro_install'); + + $form = new Doku_Form(array('action' => $this->tabURL('', array(), '&'), 'enctype' => 'multipart/form-data')); + $form->addElement(form_makeTextField('installurl', '', 'Install from URL:', '', 'block')); + $form->addElement(form_makeFileField('installfile', 'Upload Extension:', '', 'block')); + $form->addElement(form_makeButton('submit', '', 'Install')); + $form->printForm(); } /** diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index 1a5c90923..0c4582124 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -79,6 +79,8 @@ $lang['msg_template_update_success'] = 'Template %s updated successfully'; $lang['msg_plugin_install_success'] = 'Plugin %s installed successfully'; $lang['msg_plugin_update_success'] = 'Plugin %s updated successfully'; +$lang['msg_upload_failed'] = 'Uploading the file failed'; + $lang['msg_url_failed'] = 'URL [%s] could not be downloaded.
    %s'; $lang['msg_download_failed'] = 'Plugin %s could not be downloaded.
    %s'; @@ -130,7 +132,7 @@ $lang['no_manager'] = 'Could not find manager.dat file'; $lang['error_badurl'] = 'URL ends with slash - unable to determine file name from the url'; $lang['error_dircreate'] = 'Unable to create temporary folder to receive download'; $lang['error_download'] = 'Unable to download the file: %s'; -$lang['error_decompress'] = 'Unable to decompress the downloaded file. This maybe as a result of a bad download, in which case you should try again; or the compression format may be unknown, in which case you will need to download and install manually'; +$lang['error_decompress'] = 'Unable to decompress the downloaded file. This maybe as a result of a bad download, in which case you should try again; or the compression format may be unknown, in which case you will need to download and install manually.'; $lang['error_findfolder'] = 'Unable to identify extension directory, you need to download and install manually'; $lang['error_copy'] = 'There was a file copy error while attempting to install files for directory %s: the disk could be full or file access permissions may be incorrect. This may have resulted in a partially installed plugin and leave your wiki installation unstable'; //Setup VIM: ex: et ts=4 : -- cgit v1.2.3 From df7751c6c456e0107b11d547c159266b470470d9 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 10 Aug 2013 10:45:29 +0200 Subject: nicer tabs --- lib/plugins/extension/helper/gui.php | 8 ++++++++ lib/plugins/extension/lang/en/intro_install.txt | 2 +- lib/plugins/extension/lang/en/intro_plugins.txt | 2 +- lib/plugins/extension/lang/en/intro_search.txt | 2 +- lib/plugins/extension/lang/en/intro_templates.txt | 2 +- lib/plugins/extension/style.less | 20 ++++++++++++++++++++ 6 files changed, 32 insertions(+), 4 deletions(-) diff --git a/lib/plugins/extension/helper/gui.php b/lib/plugins/extension/helper/gui.php index 8577a1696..7ad238af4 100644 --- a/lib/plugins/extension/helper/gui.php +++ b/lib/plugins/extension/helper/gui.php @@ -36,7 +36,9 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { /* @var Doku_Plugin_Controller $plugin_controller */ global $plugin_controller; + echo '
    '; echo $this->locale_xhtml('intro_plugins'); + echo '
    '; $pluginlist = $plugin_controller->getList('', true); sort($pluginlist); @@ -57,7 +59,9 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { * Display the template tab */ public function tabTemplates() { + echo '
    '; echo $this->locale_xhtml('intro_templates'); + echo '
    '; // FIXME do we have a real way? $tpllist = glob(DOKU_INC.'lib/tpl/*', GLOB_ONLYDIR); @@ -82,7 +86,9 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { */ public function tabSearch() { global $INPUT; + echo '
    '; echo $this->locale_xhtml('intro_search'); + echo '
    '; $form = new Doku_Form(array('action' => $this->tabURL('', array(), '&'))); $form->addElement(form_makeTextField('q', $INPUT->str('q'), 'Search')); @@ -113,7 +119,9 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { * Display the template tab */ public function tabInstall() { + echo '
    '; echo $this->locale_xhtml('intro_install'); + echo '
    '; $form = new Doku_Form(array('action' => $this->tabURL('', array(), '&'), 'enctype' => 'multipart/form-data')); $form->addElement(form_makeTextField('installurl', '', 'Install from URL:', '', 'block')); diff --git a/lib/plugins/extension/lang/en/intro_install.txt b/lib/plugins/extension/lang/en/intro_install.txt index f68d2d909..0556c8048 100644 --- a/lib/plugins/extension/lang/en/intro_install.txt +++ b/lib/plugins/extension/lang/en/intro_install.txt @@ -1 +1 @@ -Here you can manual install plugins and templates by either uploading them or providing a direct download URL. \ No newline at end of file +Here you can manually install plugins and templates by either uploading them or providing a direct download URL. \ No newline at end of file diff --git a/lib/plugins/extension/lang/en/intro_plugins.txt b/lib/plugins/extension/lang/en/intro_plugins.txt index ef180135e..4e42efee1 100644 --- a/lib/plugins/extension/lang/en/intro_plugins.txt +++ b/lib/plugins/extension/lang/en/intro_plugins.txt @@ -1 +1 @@ -Here you can view, enable and disable installed plugins. \ No newline at end of file +These are the plugins currently installed in your DokuWiki. You can enable or disable or even completely uninstall them here. Plugin updates are shown here as well, be sure to read the plugin's documentation before updating. \ No newline at end of file diff --git a/lib/plugins/extension/lang/en/intro_search.txt b/lib/plugins/extension/lang/en/intro_search.txt index 003c99c61..244cd6812 100644 --- a/lib/plugins/extension/lang/en/intro_search.txt +++ b/lib/plugins/extension/lang/en/intro_search.txt @@ -1 +1 @@ -Here you can search for available plugins and templates for DokuWiki. Be sure to read more about Plugin Security before installing FIXME add link \ No newline at end of file +This tab gives you access to all available 3rd party plugins and templates for DokuWiki. Please be aware that installing 3rd party code may pose a **security risk**, you may want to read about [[doku>security#plugin_security|plugin security]] first. \ No newline at end of file diff --git a/lib/plugins/extension/lang/en/intro_templates.txt b/lib/plugins/extension/lang/en/intro_templates.txt index 2b3af727b..d42180cc4 100644 --- a/lib/plugins/extension/lang/en/intro_templates.txt +++ b/lib/plugins/extension/lang/en/intro_templates.txt @@ -1 +1 @@ -Here you can view, enable and disable installed templates. Note that only one template can be activated at a time. \ No newline at end of file +These are the templates currently installed in your DokuWiki. Note that only one template can be activated at a time. diff --git a/lib/plugins/extension/style.less b/lib/plugins/extension/style.less index fc5613044..8c85bec46 100644 --- a/lib/plugins/extension/style.less +++ b/lib/plugins/extension/style.less @@ -38,6 +38,26 @@ } } +#extension__manager { + /* tab layout - most of it is in the main template */ + ul.tabs li.active a { + background-color: @ini_background_alt; + border-bottom: solid 1px @ini_background_alt; + z-index: 2; + } + .panelHeader { + background-color: @ini_background_alt; + margin: 0 0 10px 0; + padding: 10px 10px 8px; + text-align: left; + overflow: hidden; + } +} + +/* ------- FIXME everything below needs to be checked for usage ---------- */ + + + /* * general layout */ -- cgit v1.2.3 From 32fdfac2cd446733436dc1b344d7f73b78655cb1 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 10 Aug 2013 11:11:14 +0200 Subject: changed exception handling, redirect after post actions --- lib/plugins/extension/admin.php | 98 +++++++++++++++++----------------- lib/plugins/extension/helper/gui.php | 5 +- lib/plugins/extension/lang/en/lang.php | 2 + 3 files changed, 53 insertions(+), 52 deletions(-) diff --git a/lib/plugins/extension/admin.php b/lib/plugins/extension/admin.php index 62d94e899..99c74848b 100644 --- a/lib/plugins/extension/admin.php +++ b/lib/plugins/extension/admin.php @@ -57,73 +57,71 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { /* @var helper_plugin_extension_extension $extension */ $extension = $this->loadHelper('extension_extension'); - if($INPUT->post->has('fn') && checkSecurityToken()) { - $actions = $INPUT->post->arr('fn'); - foreach($actions as $action => $extensions) { - foreach($extensions as $extname => $label) { - switch($action) { - case 'install': - case 'reinstall': - case 'update': - try { + try { + if($INPUT->post->has('fn') && checkSecurityToken()) { + $actions = $INPUT->post->arr('fn'); + foreach($actions as $action => $extensions) { + foreach($extensions as $extname => $label) { + switch($action) { + case 'install': + case 'reinstall': + case 'update': $extension->setExtension($extname); $installed = $extension->installOrUpdate(); foreach($installed as $ext => $info) { msg(sprintf($this->getLang('msg_'.$info['type'].'_'.$info['action'].'_success'), $info['base']), 1); } - } catch(Exception $e) { - msg($e->getMessage(), -1); - } - break; - case 'uninstall': - $extension->setExtension($extname); - $status = $extension->uninstall(); - if($status !== true) { - msg($status, -1); - } else { - msg(sprintf($this->getLang('msg_delete_success'), hsc($extension->getDisplayName())), 1); - } - break; - case 'enable'; - $extension->setExtension($extname); - $status = $extension->enable(); - if($status !== true) { - msg($status, -1); - } else { - msg(sprintf($this->getLang('msg_enabled'), hsc($extension->getDisplayName())), 1); - } - break; - case 'disable'; - $extension->setExtension($extname); - $status = $extension->disable(); - if($status !== true) { - msg($status, -1); - } else { - msg(sprintf($this->getLang('msg_disabled'), hsc($extension->getDisplayName())), 1); - } - break; + break; + case 'uninstall': + $extension->setExtension($extname); + $status = $extension->uninstall(); + if($status !== true) { + msg($status, -1); + } else { + msg(sprintf($this->getLang('msg_delete_success'), hsc($extension->getDisplayName())), 1); + } + break; + case 'enable'; + $extension->setExtension($extname); + $status = $extension->enable(); + if($status !== true) { + msg($status, -1); + } else { + msg(sprintf($this->getLang('msg_enabled'), hsc($extension->getDisplayName())), 1); + } + break; + case 'disable'; + $extension->setExtension($extname); + $status = $extension->disable(); + if($status !== true) { + msg($status, -1); + } else { + msg(sprintf($this->getLang('msg_disabled'), hsc($extension->getDisplayName())), 1); + } + break; + } } } - } - } elseif($INPUT->post->str('installurl') && checkSecurityToken()) { - try { + send_redirect($this->gui->tabURL('', array(), '&', true)); + } elseif($INPUT->post->str('installurl') && checkSecurityToken()) { $installed = $extension->installFromURL($INPUT->post->str('installurl')); foreach($installed as $ext => $info) { msg(sprintf($this->getLang('msg_'.$info['type'].'_'.$info['action'].'_success'), $info['base']), 1); } - } catch(Exception $e) { - msg($e->getMessage(), -1); - } - } elseif(isset($_FILES['installfile']) && checkSecurityToken()) { - try { + send_redirect($this->gui->tabURL('', array(), '&', true)); + } elseif(isset($_FILES['installfile']) && checkSecurityToken()) { $installed = $extension->installFromUpload('installfile'); foreach($installed as $ext => $info) { msg(sprintf($this->getLang('msg_'.$info['type'].'_'.$info['action'].'_success'), $info['base']), 1); } - } catch(Exception $e) { - msg($e->getMessage(), -1); + send_redirect($this->gui->tabURL('', array(), '&', true)); } + + } catch(Exception $e) { + msg($e->getMessage(), -1); + send_redirect($this->gui->tabURL('', array(), '&', true)); } + } /** diff --git a/lib/plugins/extension/helper/gui.php b/lib/plugins/extension/helper/gui.php index 7ad238af4..2c2a19bf8 100644 --- a/lib/plugins/extension/helper/gui.php +++ b/lib/plugins/extension/helper/gui.php @@ -168,9 +168,10 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { * @param string $tab tab to load, empty for current tab * @param array $params associative array of parameter to set * @param string $sep seperator to build the URL + * @param bool $absolute create absolute URLs? * @return string */ - public function tabURL($tab = '', $params = array(), $sep = '&') { + public function tabURL($tab = '', $params = array(), $sep = '&', $absolute=false) { global $ID; global $INPUT; @@ -181,7 +182,7 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { 'tab' => $tab, 'q' => $INPUT->str('q') ); - return wl($ID, array_merge($defaults, $params), false, $sep); + return wl($ID, array_merge($defaults, $params), $absolute, $sep); } } diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index 0c4582124..8aaa0d8d2 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -74,6 +74,8 @@ $lang['msg_disabled'] = 'Plugin %s disabled'; $lang['msg_notdisabled'] = 'Plugin %s could not be disabled, check file permissions'; +$lang['msg_delete_success'] = 'Extension uninstalled'; + $lang['msg_template_install_success'] = 'Template %s installed successfully'; $lang['msg_template_update_success'] = 'Template %s updated successfully'; $lang['msg_plugin_install_success'] = 'Plugin %s installed successfully'; -- cgit v1.2.3 From 8d295da079a559bf0f254f0db383e0b3188f9985 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 10 Aug 2013 11:46:09 +0200 Subject: language cleanup removed all unused strings --- lib/plugins/extension/helper/extension.php | 2 +- lib/plugins/extension/lang/en/lang.php | 195 ++++++++++------------------- lib/plugins/extension/style.less | 6 +- 3 files changed, 70 insertions(+), 133 deletions(-) diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 550fc33fb..d912a44c0 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -797,7 +797,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { // check the url $matches = array(); if(!preg_match('/[^\/]*$/', $url, $matches) || !$matches[0]) { - throw new Exception($this->getLang('baddownloadurl')); + throw new Exception($this->getLang('error_badurl')); } $file = $matches[0]; diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index 8aaa0d8d2..db1449ae0 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -6,135 +6,68 @@ * @author Christopher Smith */ -// menu entry for admin plugins -$lang['menu'] = 'Extension Manager'; - -$lang['tab_plugins'] = 'Installed Plugins'; -$lang['tab_templates'] = 'Installed Templates'; -$lang['tab_search'] = 'Search and Install'; -$lang['tab_install'] = 'Manual Install'; - -// custom language strings for the plugin -$lang['notimplemented'] = 'This feature hasn\'t been implemented yet'; -$lang['alreadyenabled'] = 'This extension has already been enabled'; -$lang['alreadydisabled'] = 'This extension has already been disabled'; -$lang['pluginlistsaveerror'] = 'There was an error saving the plugin list'; -$lang['unknownauthor'] = 'Unknown author'; -$lang['unknownversion'] = 'Unknown version'; - -// extension list -$lang['btn_info'] = 'Show more info'; -$lang['btn_update'] = 'Update'; -$lang['btn_uninstall'] = 'Uninstall'; -$lang['btn_enable'] = 'Enable'; -$lang['btn_disable'] = 'Disable'; -//$lang['btn_disable_all'] = 'Disable all'; -//$lang['btn_settings'] = 'Settings'; -$lang['btn_install'] = 'Install'; -$lang['btn_reinstall'] = 'Re-install'; -//$lang['btn_disdown'] = 'Download as Disabled'; -//$lang['btn_dependown'] = 'Download with dependencies'; - -$lang['extensionby'] = '%s by %s'; -$lang['popularity'] = 'Popularity: %s'; -$lang['homepage_link'] = 'Docs'; -$lang['bugs_features'] = 'Bugs'; -$lang['author_hint'] = 'Search extensions by this author'; -$lang['tag_hint'] = 'Search extensions with this tag'; -$lang['installed'] = 'Installed:'; -$lang['lastupdate'] = 'Last updated:'; -$lang['downloadurl'] = 'Download URL:'; -$lang['repository'] = 'Repository:'; -$lang['unknown'] = 'unknown'; -$lang['installed_version'] = 'Installed version:'; -$lang['install_date'] = 'Your last update:'; -$lang['available_version'] = 'Version:'; -$lang['compatible'] = 'Compatible with:'; -$lang['depends'] = 'Depends on:'; -$lang['similar'] = 'Similar to:'; -$lang['conflicts'] = 'Conflicts with:'; -$lang['donate'] = 'Donate'; -$lang['bundled'] = 'bundled'; -$lang['manual_install'] = 'manual install'; - -$lang['repo_error'] = 'The DokuWiki extension repository can not be reached currently. Online Features are not available.'; -$lang['repo_retry'] = 'Retry'; - -$lang['msg_tpl_uninstalled'] = 'Template %s uninstalled'; -$lang['msg_tpl_uninstalled'] = 'Template %s could not be uninstalled'; -$lang['msg_uninstalled'] = 'Plugin %s uninstalled'; -$lang['msg_uninstalled'] = 'Plugin %s could not be uninstalled'; - -$lang['msg_tpl_enabled'] = 'Template %s enabled'; -$lang['msg_tpl_notenabled'] = 'Template %s could not be enabled, check file permissions'; -$lang['msg_enabled'] = 'Plugin %s enabled'; -$lang['msg_notenabled'] = 'Plugin %s could not be enabled, check file permissions'; - -$lang['msg_disabled'] = 'Plugin %s disabled'; -$lang['msg_notdisabled'] = 'Plugin %s could not be disabled, check file permissions'; - - -$lang['msg_delete_success'] = 'Extension uninstalled'; - +$lang['menu'] = 'Extension Manager'; + +$lang['tab_plugins'] = 'Installed Plugins'; +$lang['tab_templates'] = 'Installed Templates'; +$lang['tab_search'] = 'Search and Install'; +$lang['tab_install'] = 'Manual Install'; + +$lang['notimplemented'] = 'This feature hasn\'t been implemented yet'; +$lang['notinstalled'] = 'This extension is not installed'; +$lang['alreadyenabled'] = 'This extension has already been enabled'; +$lang['alreadydisabled'] = 'This extension has already been disabled'; +$lang['pluginlistsaveerror'] = 'There was an error saving the plugin list'; +$lang['unknownauthor'] = 'Unknown author'; +$lang['unknownversion'] = 'Unknown version'; + +$lang['btn_info'] = 'Show more info'; +$lang['btn_update'] = 'Update'; +$lang['btn_uninstall'] = 'Uninstall'; +$lang['btn_enable'] = 'Enable'; +$lang['btn_disable'] = 'Disable'; +$lang['btn_install'] = 'Install'; +$lang['btn_reinstall'] = 'Re-install'; + +$lang['extensionby'] = '%s by %s'; +$lang['popularity'] = 'Popularity: %s'; +$lang['homepage_link'] = 'Docs'; +$lang['bugs_features'] = 'Bugs'; +$lang['author_hint'] = 'Search extensions by this author'; +$lang['installed'] = 'Installed:'; +$lang['downloadurl'] = 'Download URL:'; +$lang['repository'] = 'Repository:'; +$lang['unknown'] = 'unknown'; +$lang['installed_version'] = 'Installed version:'; +$lang['install_date'] = 'Your last update:'; +$lang['available_version'] = 'Version:'; +$lang['compatible'] = 'Compatible with:'; +$lang['depends'] = 'Depends on:'; +$lang['similar'] = 'Similar to:'; +$lang['conflicts'] = 'Conflicts with:'; +$lang['donate'] = 'Donate'; +$lang['repo_retry'] = 'Retry'; + +$lang['msg_enabled'] = 'Plugin %s enabled'; +$lang['msg_disabled'] = 'Plugin %s disabled'; +$lang['msg_delete_success'] = 'Extension uninstalled'; $lang['msg_template_install_success'] = 'Template %s installed successfully'; -$lang['msg_template_update_success'] = 'Template %s updated successfully'; -$lang['msg_plugin_install_success'] = 'Plugin %s installed successfully'; -$lang['msg_plugin_update_success'] = 'Plugin %s updated successfully'; - -$lang['msg_upload_failed'] = 'Uploading the file failed'; - - -$lang['msg_url_failed'] = 'URL [%s] could not be downloaded.
    %s'; -$lang['msg_download_failed'] = 'Plugin %s could not be downloaded.
    %s'; -$lang['msg_download_success'] = 'Plugin %s installed successfully'; -$lang['msg_tpl_download_failed'] = 'Template %s could not be downloaded.
    %s'; - -$lang['msg_download_pkg_success'] = '%s extension package successfully installed (%s)'; -$lang['msg_tpl_download_pkg_success'] = '%s extension package successfully installed (%s)'; - -$lang['msg_update_success'] = 'Plugin %s successfully updated'; -$lang['msg_update_failed'] = 'Update of plugin %s failed.
    %s'; -$lang['msg_tpl_update_success'] = 'Template %s successfully updated'; -$lang['msg_tpl_update_failed'] = 'Update of template %s failed.
    %s'; -$lang['msg_update_pkg_success'] = '%s extension package successfully updated (%s)'; -$lang['msg_tpl_update_pkg_success'] = '%s extension package successfully updated (%s)'; - -$lang['msg_reinstall_success'] = 'Plugin %s re-installed successfully'; -$lang['msg_reinstall_failed'] = 'Failed to re-install plugin %s.
    %s'; -$lang['msg_tpl_reinstall_success'] = 'Template %s re-installed successfully'; -$lang['msg_tpl_reinstall_failed'] = 'Failed to re-install template %s.
    %s'; -$lang['msg_reinstall_pkg_success'] = '%s extension package successfully reinstalled (%s)'; -$lang['msg_tpl_reinstall_pkg_success'] = '%s extension package successfully reinstalled (%s)'; - -// info titles -$lang['plugin'] = 'Plugin'; -$lang['provides'] = 'Provides:'; -$lang['noinfo'] = 'This plugin returned no information, it may be invalid.'; -$lang['name'] = 'Name:'; -$lang['date'] = 'Date:'; -$lang['type'] = 'Type:'; -$lang['desc'] = 'Description:'; -$lang['author'] = 'Author:'; -$lang['www'] = 'Web:'; - -// error messages -$lang['needed_by'] = 'Needed by:'; -$lang['not_writable'] = 'DokuWiki can not write to the folder'; -$lang['missing_dependency'] = 'Missing or disabled dependency: %s'; -$lang['security_issue'] = 'Security Issue: %s'; -$lang['security_warning'] = 'Security Warning: %s'; -$lang['update_available'] = 'Update: New version %s is available.'; -$lang['wrong_folder'] = 'Plugin installed incorrectly: Rename plugin directory "%s" to "%s".'; -$lang['url_change'] = 'URL changed: Download URL has changed since last download. Check if the new URL is valid before updating the extension.
    New: %s
    Old: %s'; -$lang['gitmanaged'] = 'Extension installed with git'; -$lang['bundled_source'] = 'Bundled with DokuWiki source'; -$lang['no_url'] = 'No download URL'; -$lang['no_manager'] = 'Could not find manager.dat file'; - -$lang['error_badurl'] = 'URL ends with slash - unable to determine file name from the url'; -$lang['error_dircreate'] = 'Unable to create temporary folder to receive download'; -$lang['error_download'] = 'Unable to download the file: %s'; -$lang['error_decompress'] = 'Unable to decompress the downloaded file. This maybe as a result of a bad download, in which case you should try again; or the compression format may be unknown, in which case you will need to download and install manually.'; -$lang['error_findfolder'] = 'Unable to identify extension directory, you need to download and install manually'; -$lang['error_copy'] = 'There was a file copy error while attempting to install files for directory %s: the disk could be full or file access permissions may be incorrect. This may have resulted in a partially installed plugin and leave your wiki installation unstable'; -//Setup VIM: ex: et ts=4 : +$lang['msg_template_update_success'] = 'Template %s updated successfully'; +$lang['msg_plugin_install_success'] = 'Plugin %s installed successfully'; +$lang['msg_plugin_update_success'] = 'Plugin %s updated successfully'; +$lang['msg_upload_failed'] = 'Uploading the file failed'; + +$lang['provides'] = 'Provides:'; +$lang['missing_dependency'] = 'Missing or disabled dependency: %s'; +$lang['security_issue'] = 'Security Issue: %s'; +$lang['security_warning'] = 'Security Warning: %s'; +$lang['update_available'] = 'Update: New version %s is available.'; +$lang['wrong_folder'] = 'Plugin installed incorrectly: Rename plugin directory "%s" to "%s".'; +$lang['url_change'] = 'URL changed: Download URL has changed since last download. Check if the new URL is valid before updating the extension.
    New: %s
    Old: %s'; + +$lang['error_badurl'] = 'URL ends with slash - unable to determine file name from the url'; +$lang['error_dircreate'] = 'Unable to create temporary folder to receive download'; +$lang['error_download'] = 'Unable to download the file: %s'; +$lang['error_decompress'] = 'Unable to decompress the downloaded file. This maybe as a result of a bad download, in which case you should try again; or the compression format may be unknown, in which case you will need to download and install manually.'; +$lang['error_findfolder'] = 'Unable to identify extension directory, you need to download and install manually'; +$lang['error_copy'] = 'There was a file copy error while attempting to install files for directory %s: the disk could be full or file access permissions may be incorrect. This may have resulted in a partially installed plugin and leave your wiki installation unstable'; diff --git a/lib/plugins/extension/style.less b/lib/plugins/extension/style.less index 8c85bec46..4a036f067 100644 --- a/lib/plugins/extension/style.less +++ b/lib/plugins/extension/style.less @@ -191,6 +191,8 @@ #extension__manager div.screenshot img { width: 120px; height: 70px; + border-radius: 12px; + box-shadow: 2px 2px 2px #ccc; } #extension__manager .legend div.screenshot { @@ -198,6 +200,7 @@ margin-left: -132px; max-width: 120px; float: left; + position: relative; } [dir=rtl] #extension__manager .legend div.screenshot { margin-left: 0; @@ -209,7 +212,8 @@ min-height: 24px; min-width: 24px; position: absolute; - left: 0; + left: 0px; + top: 0px; } [dir=rtl] #extension__manager .legend div.screenshot span { left: auto; -- cgit v1.2.3 From f910b299e4bbc59cfbe4e68af5d34ea2e5815574 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 10 Aug 2013 14:29:40 +0200 Subject: updated styles RTL styles need to be readded --- lib/plugins/extension/helper/gui.php | 16 +- lib/plugins/extension/images/icons.xcf | Bin 43016 -> 67195 bytes lib/plugins/extension/images/plugin.png | Bin 6259 -> 6824 bytes lib/plugins/extension/images/template.png | Bin 6802 -> 7547 bytes lib/plugins/extension/lang/en/lang.php | 3 + lib/plugins/extension/style.less | 477 ++++++++++++------------------ 6 files changed, 199 insertions(+), 297 deletions(-) diff --git a/lib/plugins/extension/helper/gui.php b/lib/plugins/extension/helper/gui.php index 2c2a19bf8..139a1a16a 100644 --- a/lib/plugins/extension/helper/gui.php +++ b/lib/plugins/extension/helper/gui.php @@ -90,9 +90,9 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { echo $this->locale_xhtml('intro_search'); echo '
    '; - $form = new Doku_Form(array('action' => $this->tabURL('', array(), '&'))); - $form->addElement(form_makeTextField('q', $INPUT->str('q'), 'Search')); - $form->addElement(form_makeButton('submit', '', 'Search')); + $form = new Doku_Form(array('action' => $this->tabURL('', array(), '&'), 'class' => 'search')); + $form->addElement(form_makeTextField('q', $INPUT->str('q'), $this->getLang('search_for'))); + $form->addElement(form_makeButton('submit', '', $this->getLang('search'))); $form->printForm(); if(!$INPUT->bool('q')) return; @@ -123,7 +123,7 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { echo $this->locale_xhtml('intro_install'); echo ''; - $form = new Doku_Form(array('action' => $this->tabURL('', array(), '&'), 'enctype' => 'multipart/form-data')); + $form = new Doku_Form(array('action' => $this->tabURL('', array(), '&'), 'enctype' => 'multipart/form-data', 'class' => 'install')); $form->addElement(form_makeTextField('installurl', '', 'Install from URL:', '', 'block')); $form->addElement(form_makeFileField('installfile', 'Upload Extension:', '', 'block')); $form->addElement(form_makeButton('submit', '', 'Install')); @@ -165,13 +165,13 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { /** * Create an URL inside the extension manager * - * @param string $tab tab to load, empty for current tab - * @param array $params associative array of parameter to set - * @param string $sep seperator to build the URL + * @param string $tab tab to load, empty for current tab + * @param array $params associative array of parameter to set + * @param string $sep seperator to build the URL * @param bool $absolute create absolute URLs? * @return string */ - public function tabURL($tab = '', $params = array(), $sep = '&', $absolute=false) { + public function tabURL($tab = '', $params = array(), $sep = '&', $absolute = false) { global $ID; global $INPUT; diff --git a/lib/plugins/extension/images/icons.xcf b/lib/plugins/extension/images/icons.xcf index a99747d81..ab69b3099 100644 Binary files a/lib/plugins/extension/images/icons.xcf and b/lib/plugins/extension/images/icons.xcf differ diff --git a/lib/plugins/extension/images/plugin.png b/lib/plugins/extension/images/plugin.png index b9133681f..e4a2d3be6 100644 Binary files a/lib/plugins/extension/images/plugin.png and b/lib/plugins/extension/images/plugin.png differ diff --git a/lib/plugins/extension/images/template.png b/lib/plugins/extension/images/template.png index 383c4d0a3..ee74bc1d5 100644 Binary files a/lib/plugins/extension/images/template.png and b/lib/plugins/extension/images/template.png differ diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index db1449ae0..11c5caa2b 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -29,6 +29,9 @@ $lang['btn_disable'] = 'Disable'; $lang['btn_install'] = 'Install'; $lang['btn_reinstall'] = 'Re-install'; +$lang['search_for'] = 'Search Extension:'; +$lang['search'] = 'Search'; + $lang['extensionby'] = '%s by %s'; $lang['popularity'] = 'Popularity: %s'; $lang['homepage_link'] = 'Docs'; diff --git a/lib/plugins/extension/style.less b/lib/plugins/extension/style.less index 4a036f067..e1a7a1d7b 100644 --- a/lib/plugins/extension/style.less +++ b/lib/plugins/extension/style.less @@ -38,8 +38,11 @@ } } +/** + * general styles + */ #extension__manager { - /* tab layout - most of it is in the main template */ + // tab layout - most of it is in the main template ul.tabs li.active a { background-color: @ini_background_alt; border-bottom: solid 1px @ini_background_alt; @@ -52,336 +55,232 @@ text-align: left; overflow: hidden; } -} - -/* ------- FIXME everything below needs to be checked for usage ---------- */ - - - -/* - * general layout - */ -#extension__manager h2 { - margin-left: 0; -} -#extension__manager .panelHeader div.error { - margin-top: 0; - float: left; -} -[dir=rtl] #extension__manager .panelHeader div.error { - float: right; + // message spacing + div.msg { + margin: 0.4em 0 0 0; + } } /* - * search & url download forms + * extensions table */ -#extension__manager form.search, -#extension__manager form.btn_reload { - float: right; -} -[dir=rtl] #extension__manager form.search, -[dir=rtl] #extension__manager form.btn_reload { - float: left; -} - -#extension__manager div.search form.search { - float: none; -} - -#extension__manager .tagcloud { - width: 55%; - float: left; - margin: 0 0.5em 1em 0; -} -[dir=rtl] #extension__manager .tagcloud { - float: right; - margin: 0 0 1em .5em; -} - -#extension__manager .tagcloud a.taglink { - background-color: inherit; -} - -#extension__manager div.search { - width: 44%; - float: left; -} -[dir=rtl] #extension__manager div.search { - float: right; -} - -#extension__manager fieldset { - margin-top: 0.5em; - width: auto; -} - -#extension__manager fieldset p { - margin: 0.5em; - text-align: justify; - font-size: 85%; -} - -/* tag cloud */ -#extension__manager a.cl0 { font-size: 0.7em; } -#extension__manager a.cl1 { font-size: 0.9em; } -#extension__manager a.cl2 { font-size: 1em; } -#extension__manager a.cl3 { font-size: 1.3em; } -#extension__manager a.cl4 { font-size: 1.6em; } -#extension__manager a.cl5 { font-size: 1.9em; } +#extension__list { + ul.extensionList { + margin-left: 0; + margin-right: 0; + padding: 0; + list-style: none; + } + ul.extensionList li { + margin: 0 0 .5em; + padding: 0 0 .5em; + color: @ini_text; + border-bottom: 1px solid @ini_border; + overflow: hidden; + } -#extension__manager .extensionList input.button { - margin: 0 .3em .3em 0; -} -[dir=rtl] #extension__manager .extensionList input.button { - margin: 0 0 .3em .3em; + input.button { + margin: 0 .3em .3em 0; + } } -/* - * extensions table +/** + * extension table left column */ -#extension__manager .extensionList { - margin-left: 0; - margin-right: 0; - padding: 0; - list-style: none; -} - -#extension__manager .extensionList li { - margin: 0 0 .5em; - padding: 0 0 .5em; - color: @ini_text; - border-bottom: 1px solid @ini_border; - overflow: hidden; -} - -#extension__manager .legend { +#extension__list .legend { position: relative; width: 75%; float: left; -} -[dir=rtl] #extension__manager .legend { - float: right; -} -#extension__manager .legend > div { - padding: 0 .5em 0 132px; - border-right: 1px solid @ini_background_alt; - overflow: hidden; -} -[dir=rtl] #extension__manager .legend > div { - padding: 0 132px 0 .5em; - border-left: 1px solid @ini_background_alt; - border-right-width: 0; -} - -#extension__manager .enabled div.screenshot span { - background: transparent url(images/enabled.png) no-repeat 2px 2px; -} - -#extension__manager .disabled div.screenshot span { - background: transparent url(images/disabled.png) no-repeat 2px 2px; -} - -#extension__manager .disabled .legend { - opacity: 0.7; -} - -#extension__manager div.screenshot img { - width: 120px; - height: 70px; - border-radius: 12px; - box-shadow: 2px 2px 2px #ccc; -} - -#extension__manager .legend div.screenshot { - margin-top: 4px; - margin-left: -132px; - max-width: 120px; - float: left; - position: relative; -} -[dir=rtl] #extension__manager .legend div.screenshot { - margin-left: 0; - margin-right: -132px; - float: right; -} + // padding + > div { + padding: 0 .5em 0 132px; + border-right: 1px solid @ini_background_alt; + overflow: hidden; + } -#extension__manager .legend div.screenshot span { - min-height: 24px; - min-width: 24px; - position: absolute; - left: 0px; - top: 0px; -} -[dir=rtl] #extension__manager .legend div.screenshot span { - left: auto; - right: 0; -} + // screenshot + div.screenshot { + margin-top: 4px; + margin-left: -132px; + max-width: 120px; + float: left; + position: relative; + + img { + width: 120px; + height: 70px; + border-radius: 5px; + box-shadow: 2px 2px 2px #666; + } + + span { + min-height: 24px; + min-width: 24px; + position: absolute; + left: 0px; + top: 0px; + } + } -#extension__manager .legend h2 { - width: 100%; - float: right; - margin: 0.2em 0 0.5em; - font-size: 100%; - font-weight: normal; - border: none; -} -[dir=rtl] #extension__manager .legend h2 { - float: left; -} + // plugin headline + h2 { + width: 100%; + float: right; + margin: 0.2em 0 0.5em; + font-size: 100%; + font-weight: normal; + border: none; + + strong { + font-size: 120%; + font-weight: bold; + vertical-align: baseline; + } + } -#extension__manager .legend h2 strong { - font-size: 120%; - font-weight: bold; - vertical-align: baseline; -} + // description + p { + margin: 0 0 0.6em 0; + } -#extension__manager .legend p { - margin: 0 0 0.6em 0; -} + // popularity bar + div.popularity { + background-color: @ini_background; + border: 1px solid silver; + height: .4em; + margin: 0 auto; + padding: 1px; + width: 5.5em; + position: absolute; + right: .5em; + top: 0.2em; + + div { + background-color: @ini_border; + height: 100%; + + span { + display: none;// @todo: hide accessibly + } + } + } -#extension__manager .legend span.linkbar { - font-size: 85%; -} + // Docs, Bugs, Tags + span.linkbar { + font-size: 85%; -#extension__manager .legend span.linkbar span.tags { - padding-left: 18px; - background: transparent url(images/tag.png) no-repeat 0 0; -} + span.tags { + padding-left: 18px; + background: transparent url(images/tag.png) no-repeat 0 0; + } + } + // more info button + a.info { + background: transparent url(images/up.png) no-repeat 0 0; + border-width: 0; + height: 13px; + width: 13px; + text-indent: -9999px; + float: right; + margin: .5em 0 0; + overflow: hidden; -#extension__manager .legend a.info { - background: transparent url(images/up.png) no-repeat 0 0; - border-width: 0; - height: 13px; - width: 13px; - text-indent: -99999px; - float: right; - margin: .5em 0 0; - overflow: hidden; -} -[dir=rtl] #extension__manager .legend a.info { - float: left; - margin: .5em 0 0; -} + &.close { + background: transparent url(images/down.png) no-repeat 0 0; + } + } -#extension__manager .legend a.info.close { - background: transparent url(images/down.png) no-repeat 0 0; + // detailed info box + dl.details { + margin: 0.4em 0 0 0; + font-size: 85%; + border-top: 1px solid @ini_background_alt; + clear: both; + + dt { + clear: left; + float: left; + width: 25%; + margin: 0; + text-align: right; + font-weight: normal; + padding: 0.2em 5px 0 0; + } + + dd { + margin-left: 25%; + font-weight: bold; + padding: 0.2em 0 0 5px; + + a { + font-weight: normal; + } + } + } } -#extension__manager .legend div.popularity { - background-color: @ini_background; - border: 1px solid silver; - height: .4em; - margin: 0 auto; - padding: 1px; - width: 5.5em; - position: absolute; - right: .5em; - top: 0.2em; -} -[dir=rtl] #extension__manager .legend div.popularity { - right: auto; - left: .5em; -} +/* + * Enabled/Disabled overrides + */ +#extension__list { + .enabled div.screenshot span { + background: transparent url(images/enabled.png) no-repeat 2px 2px; + } -#extension__manager .legend div.popularity div { - background-color: @ini_border; - height: 100%; -} + .disabled div.screenshot span { + background: transparent url(images/disabled.png) no-repeat 2px 2px; + } -#extension__manager .legend div.popularity div span { - display: none;/* @todo: hide accessibly */ + .disabled .legend { + opacity: 0.7; + } } +/** + * extension table right column + */ #extension__manager .actions { padding: 0; font-size: 95%; width: 25%; float: right; text-align: right; -} -[dir=rtl] #extension__manager .actions { - float: left; - text-align: left; -} -#extension__manager .actions .version { - display: block; -} + .version { + display: block; + } -#extension__manager .actions p { - margin: 0.2em 0; - text-align: center; + p { + margin: 0.2em 0; + text-align: center; + } } -/* - * extensions table, detailed info box +/** + * Search form */ -#extension__manager dl.details { - margin: 0.4em 0 0 0; - font-size: 85%; - border-top: 1px solid @ini_background_alt; - clear: both; -} - -#extension__manager dl.details dt { - clear: left; - float: left; - width: 25%; - margin: 0; - text-align: right; - font-weight: normal; - padding: 0.2em 5px 0 0; -} -[dir=rtl] #extension__manager dl.details dt { - clear: right; - float: right; - text-align: left; - padding: 0.2em 0 0 5px; -} - -#extension__manager dl.details dd { - margin-left: 25%; - font-weight: bold; - padding: 0.2em 0 0 5px; -} -[dir=rtl] #extension__manager dl.details dd { - margin-left: 0; - margin-right: 25%; - padding: 0.2em 5px 0 0 ; -} - -#extension__manager dl.details dd a { - font-weight: normal; -} +#extension__manager form.search { + display: block; + margin-bottom: 2em; -#extension__manager #info__popup { - z-index: 20; - overflow: hidden; - opacity: 0.9; - border: 1px solid @ini_border; - background-color: @ini_border; /*background_other__;*/ - text-align: left; - padding: 0.2em; -} -[dir=rtl] #extension__manager #info__popup { - text-align: right; -} + span { + font-weight: bold; + } -#extension__manager div.msg { - margin: 0.4em 0 0 0; + input.edit { + width: 25em; + } } -#extension__manager ul.tabs div.msg { - display: inline; - margin-left: 0.4em; -} -[dir=rtl] #extension__manager ul.tabs div.msg { - margin-left: 0; - margin-right: 0.4em; +/** + * Install form + */ +#extension__manager form.install { + text-align: center; + display: block; + width: 60%; } - -/* end admin plugin styles */ -- cgit v1.2.3 From 347e1146ca6a08dc90247a3f7da31cbc3a409aa0 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 10 Aug 2013 14:43:12 +0200 Subject: fixed screenshots --- lib/plugins/extension/helper/list.php | 4 ++-- lib/plugins/extension/lang/en/intro_install.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 6b1d41f78..16ef71569 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -181,8 +181,8 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { */ function make_screenshot(helper_plugin_extension_extension $extension) { if($extension->getScreenshotURL()) { - $img = ''. - ''.hsc($extension->getDisplayName()).''. + $img = ''. + ''.hsc($extension->getDisplayName()).''. ''; } elseif($extension->isTemplate()) { $img = 'template'; diff --git a/lib/plugins/extension/lang/en/intro_install.txt b/lib/plugins/extension/lang/en/intro_install.txt index 0556c8048..a5d5ab008 100644 --- a/lib/plugins/extension/lang/en/intro_install.txt +++ b/lib/plugins/extension/lang/en/intro_install.txt @@ -1 +1 @@ -Here you can manually install plugins and templates by either uploading them or providing a direct download URL. \ No newline at end of file +Here you can manually install plugins and templates by either uploading them or providing a direct download URL. -- cgit v1.2.3 From e445eeb3b675b350b4cebeeea610d4f7cd2e8f19 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 11 Aug 2013 11:19:34 +0200 Subject: fixed button logic --- lib/plugins/extension/helper/extension.php | 19 ++++++++++--------- lib/plugins/extension/helper/list.php | 26 ++++++++++++++++++++------ lib/plugins/extension/images/warning.png | Bin 0 -> 613 bytes lib/plugins/extension/lang/en/lang.php | 4 ++++ lib/plugins/extension/style.less | 9 +++++++++ 5 files changed, 43 insertions(+), 15 deletions(-) create mode 100644 lib/plugins/extension/images/warning.png diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index d912a44c0..6136c3c9a 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -107,7 +107,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return bool if the extension is protected */ public function isProtected() { - return in_array($this->base, array('acl', 'config', 'info', 'plugin', 'revert', 'usermanager')); + return in_array($this->id, array('acl', 'config', 'info', 'plugin', 'revert', 'usermanager', 'template:dokuwiki')); } /** @@ -513,20 +513,21 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { /** * If the extension can probably be installed/updated or uninstalled * - * @return bool|string True or one of "nourl", "noparentperms" (template/plugin install path not writable), "noperms" (extension itself not writable) + * @return bool|string True or error string */ public function canModify() { - if ($this->isInstalled()) { - if (!is_writable($this->getInstallDir())) { + if($this->isInstalled()) { + if(!is_writable($this->getInstallDir())) { return 'noperms'; } } - $parent_path = ($this->isTemplate() ? DOKU_TPLLIB : DOKU_PLUGIN); - if (!is_writable($parent_path)) { - return 'noparentperms'; - } - if (!$this->getDownloadURL()) return 'nourl'; + if($this->isTemplate() && !is_writable(DOKU_TPLLIB)) { + return 'notplperms'; + + } elseif(!is_writable(DOKU_PLUGIN)) { + return 'nopluginperms'; + } return true; } diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 16ef71569..7ecd5b267 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -444,11 +444,13 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { */ function make_actions(helper_plugin_extension_extension $extension) { $return = ''; - if (!$extension->isInstalled() && $extension->canModify() === true) { - $return .= $this->make_action('install', $extension); - } elseif ($extension->canModify() === true) { - if (!$extension->isBundled()) { - $return .= $this->make_action('uninstall', $extension); + $errors = ''; + + if ($extension->isInstalled()) { + if (($canmod = $extension->canModify()) === true) { + if (!$extension->isProtected()) { + $return .= $this->make_action('uninstall', $extension); + } if ($extension->getDownloadURL()) { if ($extension->updateAvailable()) { $return .= $this->make_action('update', $extension); @@ -456,7 +458,10 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $return .= $this->make_action('reinstall', $extension); } } + }else{ + $errors .= '

    '.$this->getLang($canmod).'

    '; } + if (!$extension->isProtected()) { if ($extension->isEnabled()) { if(!$extension->isTemplate()){ // templates can't be disabled, only another can be enabled @@ -466,6 +471,15 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $return .= $this->make_action('enable', $extension); } } + + }else{ + if (($canmod = $extension->canModify()) === true) { + if ($extension->getDownloadURL()) { + $return .= $this->make_action('install', $extension); + } + }else{ + $errors .= '
    '.$this->getLang($canmod).'
    '; + } } if (!$extension->isInstalled()) { @@ -473,7 +487,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $return .= ($extension->getLastUpdate() ? hsc($extension->getLastUpdate()) : $this->getLang('unknown')).''; } - return $return; + return $return.' '.$errors; } /** diff --git a/lib/plugins/extension/images/warning.png b/lib/plugins/extension/images/warning.png new file mode 100644 index 000000000..c5e482f84 Binary files /dev/null and b/lib/plugins/extension/images/warning.png differ diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index 11c5caa2b..53ce597dd 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -74,3 +74,7 @@ $lang['error_download'] = 'Unable to download the file: %s'; $lang['error_decompress'] = 'Unable to decompress the downloaded file. This maybe as a result of a bad download, in which case you should try again; or the compression format may be unknown, in which case you will need to download and install manually.'; $lang['error_findfolder'] = 'Unable to identify extension directory, you need to download and install manually'; $lang['error_copy'] = 'There was a file copy error while attempting to install files for directory %s: the disk could be full or file access permissions may be incorrect. This may have resulted in a partially installed plugin and leave your wiki installation unstable'; + +$lang['noperms'] = 'Extension directory is not writable'; +$lang['notplperms'] = 'Template directory is not writable'; +$lang['nopluginperms'] = 'Plugin directory is not writable'; \ No newline at end of file diff --git a/lib/plugins/extension/style.less b/lib/plugins/extension/style.less index e1a7a1d7b..762968611 100644 --- a/lib/plugins/extension/style.less +++ b/lib/plugins/extension/style.less @@ -258,6 +258,15 @@ margin: 0.2em 0; text-align: center; } + + p.permerror { + margin-left: 0.4em; + text-align: left; + padding-left: 19px; + background: transparent url(images/warning.png) center left no-repeat; + line-height: 18px; + font-size: 12px; + } } /** -- cgit v1.2.3 From 7ca0915cf61dd8ff297bf1d3ebd6aafcab88a618 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 11 Aug 2013 11:52:47 +0200 Subject: fixed donation link --- lib/plugins/extension/helper/list.php | 18 ++++++++++++------ lib/plugins/extension/images/donate.png | Bin 1293 -> 724 bytes lib/plugins/extension/lang/en/lang.php | 3 ++- lib/plugins/extension/style.less | 7 ++++--- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 7ecd5b267..ef589dedd 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -343,6 +343,14 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $default = $this->getLang('unknown'); $return = '
    '; + if ($extension->getDonationURL()) { + $return .= '
    '.$this->getLang('donate').'
    '; + $return .= '
    '; + $return .= ''; + $return .= '
    '; + } + + if (!$extension->isBundled()) { $return .= '
    '.$this->getLang('downloadurl').'
    '; $return .= '
    '; @@ -393,6 +401,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { foreach ($extension->getCompatibleVersions() as $date => $version) { $return .= $version['label'].' ('.$date.'), '; } + $return = rtrim($return, ', '); $return .= '
    '; } if($extension->getDependencies()) { @@ -415,9 +424,6 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $return .= $this->make_linklist($extension->getConflicts()); $return .= ''; } - if ($extension->getDonationURL()) { - $return .= ''; - } $return .= '
    '; return $return; } @@ -431,9 +437,9 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { function make_linklist($ext) { $return = ''; foreach ($ext as $link) { - $return .= ''.hsc($link).' '; + $return .= ''.hsc($link).', '; } - return $return; + return rtrim($return, ', '); } /** @@ -482,7 +488,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { } } - if (!$extension->isInstalled()) { + if (!$extension->isInstalled() && $extension->getDownloadURL()) { $return .= ' '.$this->getLang('available_version').' '; $return .= ($extension->getLastUpdate() ? hsc($extension->getLastUpdate()) : $this->getLang('unknown')).''; } diff --git a/lib/plugins/extension/images/donate.png b/lib/plugins/extension/images/donate.png index b26ceb66e..9e234da1c 100644 Binary files a/lib/plugins/extension/images/donate.png and b/lib/plugins/extension/images/donate.png differ diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index 53ce597dd..684ff2bad 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -48,7 +48,8 @@ $lang['compatible'] = 'Compatible with:'; $lang['depends'] = 'Depends on:'; $lang['similar'] = 'Similar to:'; $lang['conflicts'] = 'Conflicts with:'; -$lang['donate'] = 'Donate'; +$lang['donate'] = 'Like this?'; +$lang['donate_action'] = 'Buy the author a coffee!'; $lang['repo_retry'] = 'Retry'; $lang['msg_enabled'] = 'Plugin %s enabled'; diff --git a/lib/plugins/extension/style.less b/lib/plugins/extension/style.less index 762968611..0d86f5419 100644 --- a/lib/plugins/extension/style.less +++ b/lib/plugins/extension/style.less @@ -209,15 +209,16 @@ text-align: right; font-weight: normal; padding: 0.2em 5px 0 0; + font-weight: bold; } dd { margin-left: 25%; - font-weight: bold; padding: 0.2em 0 0 5px; - a { - font-weight: normal; + a.donate { + padding-left: 18px; + background: transparent url(images/donate.png) left center no-repeat; } } } -- cgit v1.2.3 From 9597c3b83b2dbf2787bf9046c911f0cc17d29481 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 11 Aug 2013 12:05:09 +0200 Subject: just not handle enable/disable for templates for now --- lib/plugins/extension/helper/extension.php | 5 +++-- lib/plugins/extension/helper/list.php | 6 ++---- lib/plugins/extension/lang/en/intro_templates.txt | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 6136c3c9a..6ad8f5185 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -632,10 +632,11 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { */ public function enable() { if ($this->isTemplate()) return $this->getLang('notimplemented'); - /* @var Doku_Plugin_Controller $plugin_controller */ - global $plugin_controller; if (!$this->isInstalled()) return $this->getLang('notinstalled'); if ($this->isEnabled()) return $this->getLang('alreadyenabled'); + + /* @var Doku_Plugin_Controller $plugin_controller */ + global $plugin_controller; if ($plugin_controller->enable($this->base)) { $this->purgeCache(); return true; diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index ef589dedd..e33dbfa04 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -468,11 +468,9 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $errors .= '

    '.$this->getLang($canmod).'

    '; } - if (!$extension->isProtected()) { + if (!$extension->isProtected() && !$extension->isTemplate()) { // no enable/disable for templates if ($extension->isEnabled()) { - if(!$extension->isTemplate()){ // templates can't be disabled, only another can be enabled - $return .= $this->make_action('disable', $extension); - } + $return .= $this->make_action('disable', $extension); } else { $return .= $this->make_action('enable', $extension); } diff --git a/lib/plugins/extension/lang/en/intro_templates.txt b/lib/plugins/extension/lang/en/intro_templates.txt index d42180cc4..8bc04631d 100644 --- a/lib/plugins/extension/lang/en/intro_templates.txt +++ b/lib/plugins/extension/lang/en/intro_templates.txt @@ -1 +1 @@ -These are the templates currently installed in your DokuWiki. Note that only one template can be activated at a time. +These are the templates currently installed in your DokuWiki. You can select template to be used in the [[?do=admin&page=config|Configuration Manager]]. -- cgit v1.2.3 From 8ecc39810428baa07bb322c5f515f56bac533746 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 11 Aug 2013 12:14:17 +0200 Subject: confirm uninstalling of extensions --- lib/plugins/extension/lang/en/lang.php | 2 ++ lib/plugins/extension/script.js | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index 684ff2bad..3b2d2f38d 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -29,6 +29,8 @@ $lang['btn_disable'] = 'Disable'; $lang['btn_install'] = 'Install'; $lang['btn_reinstall'] = 'Re-install'; +$lang['js']['reallydel'] = 'Really uninstall this extension?'; + $lang['search_for'] = 'Search Extension:'; $lang['search'] = 'Search'; diff --git a/lib/plugins/extension/script.js b/lib/plugins/extension/script.js index 7480801ac..bd3c97758 100644 --- a/lib/plugins/extension/script.js +++ b/lib/plugins/extension/script.js @@ -1,5 +1,15 @@ jQuery(function(){ + /** + * Confirm uninstalling + */ + jQuery('#extension__manager input.uninstall').click(function(e){ + if(!window.confirm(LANG.plugins.extension.reallydel)){ + e.preventDefault(); + return false; + } + return true; + }); /** * very simple lightbox -- cgit v1.2.3 From 2e308c3608bea50e07aacf51b232eaedbda6eb20 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 11 Aug 2013 12:14:44 +0200 Subject: only carry the q to search tab --- lib/plugins/extension/helper/gui.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/plugins/extension/helper/gui.php b/lib/plugins/extension/helper/gui.php index 139a1a16a..76651515c 100644 --- a/lib/plugins/extension/helper/gui.php +++ b/lib/plugins/extension/helper/gui.php @@ -180,8 +180,9 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { 'do' => 'admin', 'page' => 'extension', 'tab' => $tab, - 'q' => $INPUT->str('q') ); + if($tab == 'search') $defaults['q'] = $INPUT->str('q'); + return wl($ID, array_merge($defaults, $params), $absolute, $sep); } -- cgit v1.2.3 From 95905cbe48caa3de7d6d809a8f0d0cffc9df4720 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 11 Aug 2013 12:18:38 +0200 Subject: make extension manager the default plugin This moves the old plugin manager down to the "other" plugins. It should probably be removed when when we decide the new one is good to go. --- inc/html.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/html.php b/inc/html.php index 96c4eaa1a..00b929c75 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1710,12 +1710,12 @@ function html_admin(){ } unset($menu['acl']); - if($menu['plugin']){ + if($menu['extension']){ ptln('
  • '); + ''. + $menu['extension']['prompt'].''); } - unset($menu['plugin']); + unset($menu['extension']); if($menu['config']){ ptln('
  • '. -- cgit v1.2.3 From 77450f4001bc641f7a724ae5e5c2f71b44c022d1 Mon Sep 17 00:00:00 2001 From: lisps Date: Wed, 27 Nov 2013 09:38:06 +0100 Subject: media image can be resized by height (without width) --- inc/media.php | 1 + lib/exe/fetch.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/inc/media.php b/inc/media.php index d69426414..390cd3488 100644 --- a/inc/media.php +++ b/inc/media.php @@ -1800,6 +1800,7 @@ function media_resize_image($file, $ext, $w, $h=0){ if($info == false) return $file; // that's no image - it's a spaceship! if(!$h) $h = round(($w * $info[1]) / $info[0]); + if(!$w) $w = round(($h * $info[0]) / $info[1]); // we wont scale up to infinity if($w > 2000 || $h > 2000) return $file; diff --git a/lib/exe/fetch.php b/lib/exe/fetch.php index 5967494bf..f33b3f2f8 100644 --- a/lib/exe/fetch.php +++ b/lib/exe/fetch.php @@ -78,8 +78,8 @@ if (defined('SIMPLE_TEST')) { unset($evt); //handle image resizing/cropping - if((substr($MIME, 0, 5) == 'image') && $WIDTH) { - if($HEIGHT) { + if((substr($MIME, 0, 5) == 'image') && ($WIDTH || $HEIGHT)) { + if($HEIGHT && $WDITH) { $data['file'] = $FILE = media_crop_image($data['file'], $EXT, $WIDTH, $HEIGHT); } else { $data['file'] = $FILE = media_resize_image($data['file'], $EXT, $WIDTH, $HEIGHT); -- cgit v1.2.3 From e175e163722d806ebf45aa1e9a7843c2391a5b20 Mon Sep 17 00:00:00 2001 From: lisps Date: Wed, 27 Nov 2013 09:42:41 +0100 Subject: fix indent --- inc/media.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/media.php b/inc/media.php index 390cd3488..12db36841 100644 --- a/inc/media.php +++ b/inc/media.php @@ -1800,7 +1800,7 @@ function media_resize_image($file, $ext, $w, $h=0){ if($info == false) return $file; // that's no image - it's a spaceship! if(!$h) $h = round(($w * $info[1]) / $info[0]); - if(!$w) $w = round(($h * $info[0]) / $info[1]); + if(!$w) $w = round(($h * $info[0]) / $info[1]); // we wont scale up to infinity if($w > 2000 || $h > 2000) return $file; -- cgit v1.2.3 From 6fdd11e032b654dd27de346f7e54231ee043d7ef Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 15 Dec 2013 20:41:23 +0100 Subject: removed superflous README for bundled plugin --- lib/plugins/extension/README | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 lib/plugins/extension/README diff --git a/lib/plugins/extension/README b/lib/plugins/extension/README deleted file mode 100644 index 5eefe924d..000000000 --- a/lib/plugins/extension/README +++ /dev/null @@ -1,27 +0,0 @@ -extension Plugin for DokuWiki - -Extension manager - -All documentation for this plugin can be found at -https://www.dokuwiki.org/plugin:extension - -If you install this plugin manually, make sure it is installed in -lib/plugins/extension/ - if the folder is called different it -will not work! - -Please refer to http://www.dokuwiki.org/plugins for additional info -on how to install plugins in DokuWiki. - ----- -Copyright (C) Michael Hamann - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; version 2 of the License - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -See the COPYING file in your DokuWiki folder for details -- cgit v1.2.3 From c17acc9f11cd61909a9395b560e759686c7717e6 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 5 Jan 2014 19:09:34 +0100 Subject: AUTH_ACL_CHECK event around ACL checking allows to modify ACL results in the AFTER event or to implement a completely different ACL mechanism in the BEFORE event. --- inc/auth.php | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/inc/auth.php b/inc/auth.php index b793f5d12..6000ea6d7 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -661,17 +661,39 @@ function auth_quickaclcheck($id) { } /** - * Returns the maximum rights a user has for - * the given ID or its namespace + * Returns the maximum rights a user has for the given ID or its namespace * * @author Andreas Gohr - * + * @triggers AUTH_ACL_CHECK * @param string $id page ID (needs to be resolved and cleaned) * @param string $user Username * @param array|null $groups Array of groups the user is in * @return int permission level */ function auth_aclcheck($id, $user, $groups) { + $data = array( + 'id' => $id, + 'user' => $user, + 'groups' => $groups + ); + + return trigger_event('AUTH_ACL_CHECK', $data, 'auth_aclcheck_cb'); +} + +/** + * default ACL check method + * + * DO NOT CALL DIRECTLY, use auth_aclcheck() instead + * + * @author Andreas Gohr + * @param array $data event data + * @return int permission level + */ +function auth_aclcheck_cb($data) { + $id =& $data['id']; + $user =& $data['user']; + $groups =& $data['groups']; + global $conf; global $AUTH_ACL; /* @var DokuWiki_Auth_Plugin $auth */ -- cgit v1.2.3 From 9a2e74c192a89e048b53aca9260e70759e8dfdc6 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 5 Jan 2014 19:55:36 +0100 Subject: the plugin is called testing not test --- lib/plugins/extension/helper/extension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 6ad8f5185..04eb24a66 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -94,7 +94,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { public function isBundled() { if (!empty($this->remoteInfo['bundled'])) return $this->remoteInfo['bundled']; return in_array($this->base, - array('acl', 'info', 'extension', 'test', 'revert', 'popularity', + array('acl', 'info', 'extension', 'testing', 'revert', 'popularity', 'config', 'plugin', 'safefnrecode', 'authplain', 'testing', 'template:dokuwiki', 'template:default' ) -- cgit v1.2.3 From 947a0472355a8591b0ef449ad9add9c0b782ddcf Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 5 Jan 2014 19:57:07 +0100 Subject: template:default is no longer bundled --- lib/plugins/extension/helper/extension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 04eb24a66..2d0e91301 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -96,7 +96,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { return in_array($this->base, array('acl', 'info', 'extension', 'testing', 'revert', 'popularity', 'config', 'plugin', 'safefnrecode', 'authplain', 'testing', - 'template:dokuwiki', 'template:default' + 'template:dokuwiki' ) ); } -- cgit v1.2.3 From 220ab8d2dfa86c96112098922b40017448d3500a Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 5 Jan 2014 20:01:45 +0100 Subject: even more fixes for the bundled extension list --- lib/plugins/extension/helper/extension.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 2d0e91301..4eedb2a25 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -94,10 +94,10 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { public function isBundled() { if (!empty($this->remoteInfo['bundled'])) return $this->remoteInfo['bundled']; return in_array($this->base, - array('acl', 'info', 'extension', 'testing', 'revert', 'popularity', - 'config', 'plugin', 'safefnrecode', 'authplain', 'testing', - 'template:dokuwiki' - ) + array( + 'authad', 'authldap', 'authmysql', 'authpgsql', 'authplain', 'acl', 'info', 'extension', + 'revert', 'popularity', 'config', 'plugin', 'safefnrecode', 'testing', 'template:dokuwiki' + ) ); } -- cgit v1.2.3 From 16660d32b7c1e36a9940ee0ee9b692bf0dd1c313 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 5 Jan 2014 20:29:14 +0100 Subject: use config for firguring out if an extension is protected --- conf/plugins.required.php | 10 +++++----- lib/plugins/extension/helper/extension.php | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/conf/plugins.required.php b/conf/plugins.required.php index 26eb8888b..078f6d56d 100644 --- a/conf/plugins.required.php +++ b/conf/plugins.required.php @@ -4,8 +4,8 @@ * from changes by the extention manager. These settings will override any local settings. * It is not recommended to change this file, as it is overwritten on DokuWiki upgrades. */ -$plugins['acl'] = 1; -$plugins['plugin'] = 1; -$plugins['config'] = 1; -$plugins['usermanager'] = 1; -$plugins['revert'] = 1; +$plugins['acl'] = 1; +$plugins['plugin'] = 1; +$plugins['config'] = 1; +$plugins['usermanager'] = 1; +$plugins['template:dokuwiki'] = 1; // not a plugin, but this should not be uninstalled either diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 4eedb2a25..e3cb8a410 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -107,7 +107,10 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return bool if the extension is protected */ public function isProtected() { - return in_array($this->id, array('acl', 'config', 'info', 'plugin', 'revert', 'usermanager', 'template:dokuwiki')); + /** @var Doku_Plugin_Controller $plugin_controller */ + global $plugin_controller; + $cascade = $plugin_controller->getCascade(); + return (isset($cascade['protected'][$this->id]) && $cascade['protected'][$this->id]); } /** -- cgit v1.2.3 From 168f022328fee27758bfd983b209a579621409f6 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 5 Jan 2014 20:31:11 +0100 Subject: protect extension, not plugin anymore --- conf/plugins.required.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/plugins.required.php b/conf/plugins.required.php index 078f6d56d..a2950b760 100644 --- a/conf/plugins.required.php +++ b/conf/plugins.required.php @@ -5,7 +5,7 @@ * It is not recommended to change this file, as it is overwritten on DokuWiki upgrades. */ $plugins['acl'] = 1; -$plugins['plugin'] = 1; +$plugins['extension'] = 1; $plugins['config'] = 1; $plugins['usermanager'] = 1; $plugins['template:dokuwiki'] = 1; // not a plugin, but this should not be uninstalled either -- cgit v1.2.3 From bcdcd3d147fd8bcc680f24de88120c23d9533b50 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 5 Jan 2014 20:39:25 +0100 Subject: do not show updates for bundled plugins --- lib/plugins/extension/helper/extension.php | 1 + lib/plugins/extension/lang/en/lang.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index e3cb8a410..be29f95d8 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -145,6 +145,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { */ public function updateAvailable() { if(!$this->isInstalled()) return false; + if($this->isBundled()) return false; $lastupdate = $this->getLastUpdate(); if ($lastupdate === false) return false; $installed = $this->getInstalledVersion(); diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index 3b2d2f38d..593794ef2 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -45,7 +45,7 @@ $lang['repository'] = 'Repository:'; $lang['unknown'] = 'unknown'; $lang['installed_version'] = 'Installed version:'; $lang['install_date'] = 'Your last update:'; -$lang['available_version'] = 'Version:'; +$lang['available_version'] = 'Available version:'; $lang['compatible'] = 'Compatible with:'; $lang['depends'] = 'Depends on:'; $lang['similar'] = 'Similar to:'; -- cgit v1.2.3 From 5284857cb2f94bc347eb56c694d894283fc41703 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 5 Jan 2014 20:45:32 +0100 Subject: protect authplain and current auth plugin --- conf/plugins.required.php | 1 + lib/plugins/extension/helper/extension.php | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/conf/plugins.required.php b/conf/plugins.required.php index a2950b760..75336da2e 100644 --- a/conf/plugins.required.php +++ b/conf/plugins.required.php @@ -5,6 +5,7 @@ * It is not recommended to change this file, as it is overwritten on DokuWiki upgrades. */ $plugins['acl'] = 1; +$plugins['authplain'] = 1; $plugins['extension'] = 1; $plugins['config'] = 1; $plugins['usermanager'] = 1; diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index be29f95d8..2a7119189 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -102,11 +102,15 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { } /** - * If the extension is protected + * If the extension is protected against any modification (disable/uninstall) * * @return bool if the extension is protected */ public function isProtected() { + // never allow deinstalling the current auth plugin: + global $conf; + if ($this->id == $conf['authtype']) return true; + /** @var Doku_Plugin_Controller $plugin_controller */ global $plugin_controller; $cascade = $plugin_controller->getCascade(); -- cgit v1.2.3 From 13ae5e00de640e20e25bff36eb1b2585acf153d3 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 5 Jan 2014 20:45:52 +0100 Subject: typo fix --- lib/plugins/extension/lang/en/intro_templates.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/extension/lang/en/intro_templates.txt b/lib/plugins/extension/lang/en/intro_templates.txt index 8bc04631d..012a74995 100644 --- a/lib/plugins/extension/lang/en/intro_templates.txt +++ b/lib/plugins/extension/lang/en/intro_templates.txt @@ -1 +1 @@ -These are the templates currently installed in your DokuWiki. You can select template to be used in the [[?do=admin&page=config|Configuration Manager]]. +These are the templates currently installed in your DokuWiki. You can select the template to be used in the [[?do=admin&page=config|Configuration Manager]]. -- cgit v1.2.3 From 9672d9f3bf51a5b383078874035796c6ac776eb1 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 5 Jan 2014 20:58:48 +0100 Subject: removed the old plugin manager --- lib/plugins/extension/helper/extension.php | 2 +- lib/plugins/plugin/admin.php | 137 ---------- lib/plugins/plugin/classes/ap_delete.class.php | 28 -- lib/plugins/plugin/classes/ap_download.class.php | 288 --------------------- lib/plugins/plugin/classes/ap_enable.class.php | 51 ---- lib/plugins/plugin/classes/ap_info.class.php | 143 ---------- lib/plugins/plugin/classes/ap_manage.class.php | 202 --------------- lib/plugins/plugin/classes/ap_update.class.php | 36 --- lib/plugins/plugin/lang/af/lang.php | 13 - lib/plugins/plugin/lang/ar/admin_plugin.txt | 4 - lib/plugins/plugin/lang/ar/lang.php | 54 ---- lib/plugins/plugin/lang/bg/admin_plugin.txt | 3 - lib/plugins/plugin/lang/bg/lang.php | 54 ---- .../plugin/lang/ca-valencia/admin_plugin.txt | 4 - lib/plugins/plugin/lang/ca-valencia/lang.php | 53 ---- lib/plugins/plugin/lang/ca/admin_plugin.txt | 3 - lib/plugins/plugin/lang/ca/lang.php | 55 ---- lib/plugins/plugin/lang/cs/admin_plugin.txt | 3 - lib/plugins/plugin/lang/cs/lang.php | 65 ----- lib/plugins/plugin/lang/da/admin_plugin.txt | 5 - lib/plugins/plugin/lang/da/lang.php | 61 ----- .../plugin/lang/de-informal/admin_plugin.txt | 3 - lib/plugins/plugin/lang/de-informal/lang.php | 59 ----- lib/plugins/plugin/lang/de/admin_plugin.txt | 5 - lib/plugins/plugin/lang/de/lang.php | 66 ----- lib/plugins/plugin/lang/el/admin_plugin.txt | 5 - lib/plugins/plugin/lang/el/lang.php | 58 ----- lib/plugins/plugin/lang/en/admin_plugin.txt | 5 - lib/plugins/plugin/lang/en/lang.php | 78 ------ lib/plugins/plugin/lang/eo/admin_plugin.txt | 3 - lib/plugins/plugin/lang/eo/lang.php | 60 ----- lib/plugins/plugin/lang/es/admin_plugin.txt | 3 - lib/plugins/plugin/lang/es/lang.php | 72 ------ lib/plugins/plugin/lang/et/lang.php | 32 --- lib/plugins/plugin/lang/eu/admin_plugin.txt | 3 - lib/plugins/plugin/lang/eu/lang.php | 52 ---- lib/plugins/plugin/lang/fa/admin_plugin.txt | 3 - lib/plugins/plugin/lang/fa/lang.php | 58 ----- lib/plugins/plugin/lang/fi/admin_plugin.txt | 3 - lib/plugins/plugin/lang/fi/lang.php | 55 ---- lib/plugins/plugin/lang/fr/admin_plugin.txt | 4 - lib/plugins/plugin/lang/fr/lang.php | 69 ----- lib/plugins/plugin/lang/gl/admin_plugin.txt | 3 - lib/plugins/plugin/lang/gl/lang.php | 53 ---- lib/plugins/plugin/lang/he/admin_plugin.txt | 5 - lib/plugins/plugin/lang/he/lang.php | 55 ---- lib/plugins/plugin/lang/hi/lang.php | 12 - lib/plugins/plugin/lang/hr/lang.php | 8 - lib/plugins/plugin/lang/hu/admin_plugin.txt | 4 - lib/plugins/plugin/lang/hu/lang.php | 58 ----- lib/plugins/plugin/lang/ia/admin_plugin.txt | 3 - lib/plugins/plugin/lang/ia/lang.php | 51 ---- lib/plugins/plugin/lang/id-ni/lang.php | 7 - lib/plugins/plugin/lang/id/lang.php | 32 --- lib/plugins/plugin/lang/is/lang.php | 47 ---- lib/plugins/plugin/lang/it/admin_plugin.txt | 3 - lib/plugins/plugin/lang/it/lang.php | 63 ----- lib/plugins/plugin/lang/ja/admin_plugin.txt | 5 - lib/plugins/plugin/lang/ja/lang.php | 58 ----- lib/plugins/plugin/lang/kk/lang.php | 6 - lib/plugins/plugin/lang/ko/admin_plugin.txt | 3 - lib/plugins/plugin/lang/ko/lang.php | 58 ----- lib/plugins/plugin/lang/la/admin_plugin.txt | 3 - lib/plugins/plugin/lang/la/lang.php | 50 ---- lib/plugins/plugin/lang/lb/admin_plugin.txt | 4 - lib/plugins/plugin/lang/lb/lang.php | 6 - lib/plugins/plugin/lang/lt/admin_plugin.txt | 3 - lib/plugins/plugin/lang/lt/lang.php | 13 - lib/plugins/plugin/lang/lv/admin_plugin.txt | 3 - lib/plugins/plugin/lang/lv/lang.php | 51 ---- lib/plugins/plugin/lang/mk/lang.php | 43 --- lib/plugins/plugin/lang/mr/admin_plugin.txt | 4 - lib/plugins/plugin/lang/mr/lang.php | 53 ---- lib/plugins/plugin/lang/ms/lang.php | 6 - lib/plugins/plugin/lang/ne/lang.php | 46 ---- lib/plugins/plugin/lang/nl/admin_plugin.txt | 3 - lib/plugins/plugin/lang/nl/lang.php | 64 ----- lib/plugins/plugin/lang/no/admin_plugin.txt | 3 - lib/plugins/plugin/lang/no/lang.php | 64 ----- lib/plugins/plugin/lang/pl/admin_plugin.txt | 5 - lib/plugins/plugin/lang/pl/lang.php | 63 ----- lib/plugins/plugin/lang/pt-br/admin_plugin.txt | 3 - lib/plugins/plugin/lang/pt-br/lang.php | 66 ----- lib/plugins/plugin/lang/pt/admin_plugin.txt | 3 - lib/plugins/plugin/lang/pt/lang.php | 56 ---- lib/plugins/plugin/lang/ro/admin_plugin.txt | 3 - lib/plugins/plugin/lang/ro/lang.php | 59 ----- lib/plugins/plugin/lang/ru/admin_plugin.txt | 5 - lib/plugins/plugin/lang/ru/lang.php | 66 ----- lib/plugins/plugin/lang/sk/admin_plugin.txt | 4 - lib/plugins/plugin/lang/sk/lang.php | 55 ---- lib/plugins/plugin/lang/sl/admin_plugin.txt | 3 - lib/plugins/plugin/lang/sl/lang.php | 55 ---- lib/plugins/plugin/lang/sq/admin_plugin.txt | 3 - lib/plugins/plugin/lang/sq/lang.php | 50 ---- lib/plugins/plugin/lang/sr/admin_plugin.txt | 3 - lib/plugins/plugin/lang/sr/lang.php | 52 ---- lib/plugins/plugin/lang/sv/admin_plugin.txt | 5 - lib/plugins/plugin/lang/sv/lang.php | 64 ----- lib/plugins/plugin/lang/th/admin_plugin.txt | 3 - lib/plugins/plugin/lang/th/lang.php | 50 ---- lib/plugins/plugin/lang/tr/admin_plugin.txt | 3 - lib/plugins/plugin/lang/tr/lang.php | 55 ---- lib/plugins/plugin/lang/uk/admin_plugin.txt | 7 - lib/plugins/plugin/lang/uk/lang.php | 58 ----- lib/plugins/plugin/lang/vi/lang.php | 5 - lib/plugins/plugin/lang/zh-tw/admin_plugin.txt | 3 - lib/plugins/plugin/lang/zh-tw/lang.php | 60 ----- lib/plugins/plugin/lang/zh/admin_plugin.txt | 5 - lib/plugins/plugin/lang/zh/lang.php | 64 ----- lib/plugins/plugin/plugin.info.txt | 7 - lib/plugins/plugin/style.css | 195 -------------- 112 files changed, 1 insertion(+), 4050 deletions(-) delete mode 100644 lib/plugins/plugin/admin.php delete mode 100644 lib/plugins/plugin/classes/ap_delete.class.php delete mode 100644 lib/plugins/plugin/classes/ap_download.class.php delete mode 100644 lib/plugins/plugin/classes/ap_enable.class.php delete mode 100644 lib/plugins/plugin/classes/ap_info.class.php delete mode 100644 lib/plugins/plugin/classes/ap_manage.class.php delete mode 100644 lib/plugins/plugin/classes/ap_update.class.php delete mode 100644 lib/plugins/plugin/lang/af/lang.php delete mode 100644 lib/plugins/plugin/lang/ar/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/ar/lang.php delete mode 100644 lib/plugins/plugin/lang/bg/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/bg/lang.php delete mode 100644 lib/plugins/plugin/lang/ca-valencia/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/ca-valencia/lang.php delete mode 100644 lib/plugins/plugin/lang/ca/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/ca/lang.php delete mode 100644 lib/plugins/plugin/lang/cs/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/cs/lang.php delete mode 100644 lib/plugins/plugin/lang/da/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/da/lang.php delete mode 100644 lib/plugins/plugin/lang/de-informal/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/de-informal/lang.php delete mode 100644 lib/plugins/plugin/lang/de/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/de/lang.php delete mode 100644 lib/plugins/plugin/lang/el/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/el/lang.php delete mode 100644 lib/plugins/plugin/lang/en/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/en/lang.php delete mode 100644 lib/plugins/plugin/lang/eo/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/eo/lang.php delete mode 100644 lib/plugins/plugin/lang/es/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/es/lang.php delete mode 100644 lib/plugins/plugin/lang/et/lang.php delete mode 100644 lib/plugins/plugin/lang/eu/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/eu/lang.php delete mode 100644 lib/plugins/plugin/lang/fa/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/fa/lang.php delete mode 100644 lib/plugins/plugin/lang/fi/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/fi/lang.php delete mode 100644 lib/plugins/plugin/lang/fr/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/fr/lang.php delete mode 100644 lib/plugins/plugin/lang/gl/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/gl/lang.php delete mode 100644 lib/plugins/plugin/lang/he/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/he/lang.php delete mode 100644 lib/plugins/plugin/lang/hi/lang.php delete mode 100644 lib/plugins/plugin/lang/hr/lang.php delete mode 100644 lib/plugins/plugin/lang/hu/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/hu/lang.php delete mode 100644 lib/plugins/plugin/lang/ia/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/ia/lang.php delete mode 100644 lib/plugins/plugin/lang/id-ni/lang.php delete mode 100644 lib/plugins/plugin/lang/id/lang.php delete mode 100644 lib/plugins/plugin/lang/is/lang.php delete mode 100644 lib/plugins/plugin/lang/it/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/it/lang.php delete mode 100644 lib/plugins/plugin/lang/ja/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/ja/lang.php delete mode 100644 lib/plugins/plugin/lang/kk/lang.php delete mode 100644 lib/plugins/plugin/lang/ko/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/ko/lang.php delete mode 100644 lib/plugins/plugin/lang/la/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/la/lang.php delete mode 100644 lib/plugins/plugin/lang/lb/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/lb/lang.php delete mode 100644 lib/plugins/plugin/lang/lt/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/lt/lang.php delete mode 100644 lib/plugins/plugin/lang/lv/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/lv/lang.php delete mode 100644 lib/plugins/plugin/lang/mk/lang.php delete mode 100644 lib/plugins/plugin/lang/mr/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/mr/lang.php delete mode 100644 lib/plugins/plugin/lang/ms/lang.php delete mode 100644 lib/plugins/plugin/lang/ne/lang.php delete mode 100644 lib/plugins/plugin/lang/nl/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/nl/lang.php delete mode 100644 lib/plugins/plugin/lang/no/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/no/lang.php delete mode 100644 lib/plugins/plugin/lang/pl/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/pl/lang.php delete mode 100644 lib/plugins/plugin/lang/pt-br/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/pt-br/lang.php delete mode 100644 lib/plugins/plugin/lang/pt/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/pt/lang.php delete mode 100644 lib/plugins/plugin/lang/ro/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/ro/lang.php delete mode 100644 lib/plugins/plugin/lang/ru/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/ru/lang.php delete mode 100644 lib/plugins/plugin/lang/sk/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/sk/lang.php delete mode 100644 lib/plugins/plugin/lang/sl/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/sl/lang.php delete mode 100644 lib/plugins/plugin/lang/sq/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/sq/lang.php delete mode 100644 lib/plugins/plugin/lang/sr/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/sr/lang.php delete mode 100644 lib/plugins/plugin/lang/sv/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/sv/lang.php delete mode 100644 lib/plugins/plugin/lang/th/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/th/lang.php delete mode 100644 lib/plugins/plugin/lang/tr/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/tr/lang.php delete mode 100644 lib/plugins/plugin/lang/uk/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/uk/lang.php delete mode 100644 lib/plugins/plugin/lang/vi/lang.php delete mode 100644 lib/plugins/plugin/lang/zh-tw/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/zh-tw/lang.php delete mode 100644 lib/plugins/plugin/lang/zh/admin_plugin.txt delete mode 100644 lib/plugins/plugin/lang/zh/lang.php delete mode 100644 lib/plugins/plugin/plugin.info.txt delete mode 100644 lib/plugins/plugin/style.css diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 2a7119189..9cf4848ad 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -96,7 +96,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { return in_array($this->base, array( 'authad', 'authldap', 'authmysql', 'authpgsql', 'authplain', 'acl', 'info', 'extension', - 'revert', 'popularity', 'config', 'plugin', 'safefnrecode', 'testing', 'template:dokuwiki' + 'revert', 'popularity', 'config', 'safefnrecode', 'testing', 'template:dokuwiki' ) ); } diff --git a/lib/plugins/plugin/admin.php b/lib/plugins/plugin/admin.php deleted file mode 100644 index 3f019d5e2..000000000 --- a/lib/plugins/plugin/admin.php +++ /dev/null @@ -1,137 +0,0 @@ - - */ -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); - -// todo -// - maintain a history of file modified -// - allow a plugin to contain extras to be copied to the current template (extra/tpl/) -// - to images (lib/images/) [ not needed, should go in lib/plugin/images/ ] - -require_once(DOKU_PLUGIN."/plugin/classes/ap_manage.class.php"); - -//--------------------------[ GLOBALS ]------------------------------------------------ -// note: probably should be dokuwiki wide globals, where they can be accessed by pluginutils.php -// global $plugin_types; -// $plugin_types = array('syntax', 'admin'); - -// plugins that are an integral part of dokuwiki, they shouldn't be disabled or deleted -global $plugin_protected; -$plugin_protected = array('acl','plugin','config','info','usermanager','revert'); - -/** - * All DokuWiki plugins to extend the admin function - * need to inherit from this class - */ -class admin_plugin_plugin extends DokuWiki_Admin_Plugin { - - var $disabled = 0; - var $plugin = ''; - var $cmd = ''; - - /** - * @var ap_manage - */ - var $handler = null; - - var $functions = array('delete','update',/*'settings',*/'info'); // require a plugin name - var $commands = array('manage','download','enable'); // don't require a plugin name - var $plugin_list = array(); - - var $msg = ''; - var $error = ''; - - function admin_plugin_plugin() { - $this->disabled = plugin_isdisabled('plugin'); - } - - /** - * return sort order for position in admin menu - */ - function getMenuSort() { - return 20; - } - - /** - * handle user request - */ - function handle() { - global $INPUT; - // enable direct access to language strings - $this->setupLocale(); - - $fn = $INPUT->param('fn'); - if (is_array($fn)) { - $this->cmd = key($fn); - $this->plugin = is_array($fn[$this->cmd]) ? key($fn[$this->cmd]) : null; - } else { - $this->cmd = $fn; - $this->plugin = null; - } - $this->_get_plugin_list(); - - // verify $_REQUEST vars - if (in_array($this->cmd, $this->commands)) { - $this->plugin = ''; - } else if (!in_array($this->cmd, $this->functions) || !in_array($this->plugin, $this->plugin_list)) { - $this->cmd = 'manage'; - $this->plugin = ''; - } - - if(($this->cmd != 'manage' || $this->plugin != '') && !checkSecurityToken()){ - $this->cmd = 'manage'; - $this->plugin = ''; - } - - // create object to handle the command - $class = "ap_".$this->cmd; - @require_once(DOKU_PLUGIN."/plugin/classes/$class.class.php"); - if (!class_exists($class)){ - $class = 'ap_manage'; - } - - $this->handler = new $class($this, $this->plugin); - $this->msg = $this->handler->process(); - - } - - /** - * output appropriate html - */ - function html() { - // enable direct access to language strings - $this->setupLocale(); - $this->_get_plugin_list(); - - if ($this->handler === null) $this->handler = new ap_manage($this, $this->plugin); - - ptln('
    '); - $this->handler->html(); - ptln('
    '); - } - - /** - * Returns a list of all plugins, including the disabled ones - */ - function _get_plugin_list() { - if (empty($this->plugin_list)) { - $list = plugin_list('',true); // all plugins, including disabled ones - sort($list); - trigger_event('PLUGIN_PLUGINMANAGER_PLUGINLIST',$list); - $this->plugin_list = $list; - } - return $this->plugin_list; - } - -} - - - - - - diff --git a/lib/plugins/plugin/classes/ap_delete.class.php b/lib/plugins/plugin/classes/ap_delete.class.php deleted file mode 100644 index 581a6295f..000000000 --- a/lib/plugins/plugin/classes/ap_delete.class.php +++ /dev/null @@ -1,28 +0,0 @@ -dir_delete(DOKU_PLUGIN.plugin_directory($this->manager->plugin))) { - $this->manager->error = sprintf($this->lang['error_delete'],$this->manager->plugin); - } else { - msg(sprintf($this->lang['deleted'],$this->plugin)); - $this->refresh(); - } - } - - function html() { - parent::html(); - - ptln('
    '); - ptln('

    '.$this->lang['deleting'].'

    '); - - if ($this->manager->error) { - ptln('
    '.str_replace("\n","
    ",$this->manager->error).'
    '); - } else { - ptln('

    '.sprintf($this->lang['deleted'],$this->plugin).'

    '); - } - ptln('
    '); - } -} - diff --git a/lib/plugins/plugin/classes/ap_download.class.php b/lib/plugins/plugin/classes/ap_download.class.php deleted file mode 100644 index b1be11506..000000000 --- a/lib/plugins/plugin/classes/ap_download.class.php +++ /dev/null @@ -1,288 +0,0 @@ -str('url'); - $this->download($plugin_url, $this->overwrite); - return ''; - } - - /** - * Print results of the download - */ - function html() { - parent::html(); - - ptln('
    '); - ptln('

    '.$this->lang['downloading'].'

    '); - - if ($this->manager->error) { - ptln('
    '.str_replace("\n","
    ",hsc($this->manager->error)).'
    '); - } else if (count($this->downloaded) == 1) { - ptln('

    '.sprintf($this->lang['downloaded'],$this->downloaded[0]).'

    '); - } else if (count($this->downloaded)) { // more than one plugin in the download - ptln('

    '.$this->lang['downloads'].'

    '); - ptln('
      '); - foreach ($this->downloaded as $plugin) { - ptln('
    • '.$plugin.'
    • ',2); - } - ptln('
    '); - } else { // none found in download - ptln('

    '.$this->lang['download_none'].'

    '); - } - ptln('
    '); - } - - /** - * Process the downloaded file - */ - function download($url, $overwrite=false) { - // check the url - $matches = array(); - if (!preg_match("/[^\/]*$/", $url, $matches) || !$matches[0]) { - $this->manager->error = $this->lang['error_badurl']."\n"; - return false; - } - - $file = $matches[0]; - - if (!($tmp = io_mktmpdir())) { - $this->manager->error = $this->lang['error_dircreate']."\n"; - return false; - } - - if (!$file = io_download($url, "$tmp/", true, $file, 0)) { - $this->manager->error = sprintf($this->lang['error_download'],$url)."\n"; - } - - if (!$this->manager->error && !$this->decompress("$tmp/$file", $tmp)) { - $this->manager->error = sprintf($this->lang['error_decompress'],$file)."\n"; - } - - // search $tmp for the folder(s) that has been created - // move the folder(s) to lib/plugins/ - if (!$this->manager->error) { - $result = array('old'=>array(), 'new'=>array()); - if($this->find_folders($result,$tmp)){ - // choose correct result array - if(count($result['new'])){ - $install = $result['new']; - }else{ - $install = $result['old']; - } - - // now install all found items - foreach($install as $item){ - // where to install? - if($item['type'] == 'template'){ - $target = DOKU_INC.'lib/tpl/'.$item['base']; - }else{ - $target = DOKU_INC.'lib/plugins/'.$item['base']; - } - - // check to make sure we aren't overwriting anything - if (!$overwrite && @file_exists($target)) { - // remember our settings, ask the user to confirm overwrite, FIXME - continue; - } - - $instruction = @file_exists($target) ? 'update' : 'install'; - - // copy action - if ($this->dircopy($item['tmp'], $target)) { - $this->downloaded[] = $item['base']; - $this->plugin_writelog($target, $instruction, array($url)); - } else { - $this->manager->error .= sprintf($this->lang['error_copy']."\n", $item['base']); - } - } - - } else { - $this->manager->error = $this->lang['error']."\n"; - } - } - - // cleanup - if ($tmp) $this->dir_delete($tmp); - - if (!$this->manager->error) { - msg(sprintf($this->lang['packageinstalled'], count($this->downloaded), join(',',$this->downloaded)),1); - $this->refresh(); - return true; - } - - return false; - } - - /** - * Find out what was in the extracted directory - * - * Correct folders are searched recursively using the "*.info.txt" configs - * as indicator for a root folder. When such a file is found, it's base - * setting is used (when set). All folders found by this method are stored - * in the 'new' key of the $result array. - * - * For backwards compatibility all found top level folders are stored as - * in the 'old' key of the $result array. - * - * When no items are found in 'new' the copy mechanism should fall back - * the 'old' list. - * - * @author Andreas Gohr - * @param arrayref $result - results are stored here - * @param string $base - the temp directory where the package was unpacked to - * @param string $dir - a subdirectory. do not set. used by recursion - * @return bool - false on error - */ - function find_folders(&$result,$base,$dir=''){ - $dh = @opendir("$base/$dir"); - if(!$dh) return false; - while (false !== ($f = readdir($dh))) { - if ($f == '.' || $f == '..' || $f == 'tmp') continue; - - if(!is_dir("$base/$dir/$f")){ - // it's a file -> check for config - if($f == 'plugin.info.txt'){ - $info = array(); - $info['type'] = 'plugin'; - $info['tmp'] = "$base/$dir"; - $conf = confToHash("$base/$dir/$f"); - $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'] = utf8_basename($conf['base']); - if(!$info['base']) $info['base'] = utf8_basename("$base/$dir"); - $result['new'][] = $info; - } - }else{ - // it's a directory -> add to dir list for old method, then recurse - if(!$dir){ - $info = array(); - $info['type'] = 'plugin'; - $info['tmp'] = "$base/$dir/$f"; - $info['base'] = $f; - $result['old'][] = $info; - } - $this->find_folders($result,$base,"$dir/$f"); - } - } - closedir($dh); - return true; - } - - - /** - * Decompress a given file to the given target directory - * - * Determines the compression type from the file extension - */ - function decompress($file, $target) { - global $conf; - - // decompression library doesn't like target folders ending in "/" - if (substr($target, -1) == "/") $target = substr($target, 0, -1); - - $ext = $this->guess_archive($file); - if (in_array($ext, array('tar','bz','gz'))) { - switch($ext){ - case 'bz': - $compress_type = Tar::COMPRESS_BZIP; - break; - case 'gz': - $compress_type = Tar::COMPRESS_GZIP; - break; - default: - $compress_type = Tar::COMPRESS_NONE; - } - - $tar = new Tar(); - try { - $tar->open($file, $compress_type); - $tar->extract($target); - return true; - }catch(Exception $e){ - if($conf['allowdebug']){ - msg('Tar Error: '.$e->getMessage().' ['.$e->getFile().':'.$e->getLine().']',-1); - } - return false; - } - } else if ($ext == 'zip') { - - $zip = new ZipLib(); - $ok = $zip->Extract($file, $target); - - // FIXME sort something out for handling zip error messages meaningfully - return ($ok==-1?false:true); - - } - - // unsupported file type - return false; - } - - /** - * Determine the archive type of the given file - * - * Reads the first magic bytes of the given file for content type guessing, - * if neither bz, gz or zip are recognized, tar is assumed. - * - * @author Andreas Gohr - * @returns boolean|string false if the file can't be read, otherwise an "extension" - */ - function guess_archive($file){ - $fh = fopen($file,'rb'); - if(!$fh) return false; - $magic = fread($fh,5); - fclose($fh); - - if(strpos($magic,"\x42\x5a") === 0) return 'bz'; - if(strpos($magic,"\x1f\x8b") === 0) return 'gz'; - if(strpos($magic,"\x50\x4b\x03\x04") === 0) return 'zip'; - return 'tar'; - } - - /** - * Copy with recursive sub-directory support - */ - function dircopy($src, $dst) { - global $conf; - - if (is_dir($src)) { - if (!$dh = @opendir($src)) return false; - - if ($ok = io_mkdir_p($dst)) { - while ($ok && (false !== ($f = readdir($dh)))) { - if ($f == '..' || $f == '.') continue; - $ok = $this->dircopy("$src/$f", "$dst/$f"); - } - } - - closedir($dh); - return $ok; - - } else { - $exists = @file_exists($dst); - - if (!@copy($src,$dst)) return false; - if (!$exists && !empty($conf['fperm'])) chmod($dst, $conf['fperm']); - @touch($dst,filemtime($src)); - } - - return true; - } - - -} - diff --git a/lib/plugins/plugin/classes/ap_enable.class.php b/lib/plugins/plugin/classes/ap_enable.class.php deleted file mode 100644 index a25c7ede8..000000000 --- a/lib/plugins/plugin/classes/ap_enable.class.php +++ /dev/null @@ -1,51 +0,0 @@ -enabled = $INPUT->arr('enabled'); - - foreach ($this->manager->plugin_list as $plugin) { - if (in_array($plugin, $plugin_protected)) continue; - - $new = in_array($plugin, $this->enabled); - $old = !plugin_isdisabled($plugin); - - if ($new != $old) { - switch ($new) { - // enable plugin - case true : - if(plugin_enable($plugin)){ - msg(sprintf($this->lang['enabled'],$plugin),1); - $count_enabled++; - }else{ - msg(sprintf($this->lang['notenabled'],$plugin),-1); - } - break; - case false: - if(plugin_disable($plugin)){ - msg(sprintf($this->lang['disabled'],$plugin),1); - $count_disabled++; - }else{ - msg(sprintf($this->lang['notdisabled'],$plugin),-1); - } - break; - } - } - } - - // refresh plugins, including expiring any dokuwiki cache(s) - if ($count_enabled || $count_disabled) { - $this->refresh(); - } - } - -} - diff --git a/lib/plugins/plugin/classes/ap_info.class.php b/lib/plugins/plugin/classes/ap_info.class.php deleted file mode 100644 index 89b78fa2d..000000000 --- a/lib/plugins/plugin/classes/ap_info.class.php +++ /dev/null @@ -1,143 +0,0 @@ -manager->plugin) { return; } - - $component_list = $this->get_plugin_components($this->manager->plugin); - usort($component_list, array($this,'component_sort')); - - foreach ($component_list as $component) { - if (($obj = plugin_load($component['type'],$component['name'],false,true)) === null) continue; - - $compname = explode('_',$component['name']); - if($compname[1]){ - $compname = '['.$compname[1].']'; - }else{ - $compname = ''; - } - - $this->details[] = array_merge( - $obj->getInfo(), - array( - 'type' => $component['type'], - 'compname' => $compname - )); - unset($obj); - } - - // review details to simplify things - foreach($this->details as $info) { - foreach($info as $item => $value) { - if (!isset($this->plugin_info[$item])) { $this->plugin_info[$item] = $value; continue; } - if ($this->plugin_info[$item] != $value) $this->plugin_info[$item] = ''; - } - } - } - - function html() { - - // output the standard menu stuff - parent::html(); - - // sanity check - if (!$this->manager->plugin) { return; } - - ptln('
    '); - ptln("

    ".$this->manager->getLang('plugin')." {$this->manager->plugin}

    "); - - // collect pertinent information from the log - $installed = $this->plugin_readlog($this->manager->plugin, 'installed'); - $source = $this->plugin_readlog($this->manager->plugin, 'url'); - $updated = $this->plugin_readlog($this->manager->plugin, 'updated'); - if (strrpos($updated, "\n") !== false) $updated = substr($updated, strrpos($updated, "\n")+1); - - ptln("
    ",2); - ptln("
    ".$this->manager->getLang('source').'
    '.($source ? $source : $this->manager->getLang('unknown'))."
    ",4); - ptln("
    ".$this->manager->getLang('installed').'
    '.($installed ? $installed : $this->manager->getLang('unknown'))."
    ",4); - if ($updated) ptln("
    ".$this->manager->getLang('lastupdate').'
    '.$updated."
    ",4); - ptln("
    ",2); - - if (count($this->details) == 0) { - ptln("

    ".$this->manager->getLang('noinfo')."

    ",2); - } else { - - ptln("
    ",2); - if ($this->plugin_info['name']) ptln("
    ".$this->manager->getLang('name')."
    ".$this->out($this->plugin_info['name'])."
    ",4); - if ($this->plugin_info['date']) ptln("
    ".$this->manager->getLang('date')."
    ".$this->out($this->plugin_info['date'])."
    ",4); - if ($this->plugin_info['type']) ptln("
    ".$this->manager->getLang('type')."
    ".$this->out($this->plugin_info['type'])."
    ",4); - if ($this->plugin_info['desc']) ptln("
    ".$this->manager->getLang('desc')."
    ".$this->out($this->plugin_info['desc'])."
    ",4); - if ($this->plugin_info['author']) ptln("
    ".$this->manager->getLang('author')."
    ".$this->manager->email($this->plugin_info['email'], $this->plugin_info['author'])."
    ",4); - if ($this->plugin_info['url']) ptln("
    ".$this->manager->getLang('www')."
    ".$this->manager->external_link($this->plugin_info['url'], '', 'urlextern')."
    ",4); - ptln("
    ",2); - - if (count($this->details) > 1) { - ptln("

    ".$this->manager->getLang('components')."

    ",2); - ptln("
    ",2); - - foreach ($this->details as $info) { - - ptln("
    ",4); - ptln("
    ".$this->manager->getLang('name')."
    ".$this->out($info['name'].' '.$info['compname'])."
    ",6); - if (!$this->plugin_info['date']) ptln("
    ".$this->manager->getLang('date')."
    ".$this->out($info['date'])."
    ",6); - if (!$this->plugin_info['type']) ptln("
    ".$this->manager->getLang('type')."
    ".$this->out($info['type'])."
    ",6); - if (!$this->plugin_info['desc']) ptln("
    ".$this->manager->getLang('desc')."
    ".$this->out($info['desc'])."
    ",6); - if (!$this->plugin_info['author']) ptln("
    ".$this->manager->getLang('author')."
    ".$this->manager->email($info['email'], $info['author'])."
    ",6); - if (!$this->plugin_info['url']) ptln("
    ".$this->manager->getLang('www')."
    ".$this->manager->external_link($info['url'], '', 'urlextern')."
    ",6); - ptln("
    ",4); - - } - ptln("
    ",2); - } - } - ptln("
    "); - } - - // simple output filter, make html entities safe and convert new lines to
    - function out($text) { - return str_replace("\n",'
    ',htmlspecialchars($text)); - } - - - /** - * return a list (name & type) of all the component plugins that make up this plugin - * - * @todo can this move to pluginutils? - */ - function get_plugin_components($plugin) { - - global $plugin_types; - - $components = array(); - $path = DOKU_PLUGIN.plugin_directory($plugin).'/'; - - foreach ($plugin_types as $type) { - if (@file_exists($path.$type.'.php')) { $components[] = array('name'=>$plugin, 'type'=>$type); continue; } - - if ($dh = @opendir($path.$type.'/')) { - while (false !== ($cp = readdir($dh))) { - if ($cp == '.' || $cp == '..' || strtolower(substr($cp,-4)) != '.php') continue; - - $components[] = array('name'=>$plugin.'_'.substr($cp, 0, -4), 'type'=>$type); - } - closedir($dh); - } - } - - return $components; - } - - /** - * usort callback to sort plugin components - */ - function component_sort($a, $b) { - if ($a['name'] == $b['name']) return 0; - return ($a['name'] < $b['name']) ? -1 : 1; - } -} diff --git a/lib/plugins/plugin/classes/ap_manage.class.php b/lib/plugins/plugin/classes/ap_manage.class.php deleted file mode 100644 index 48be63050..000000000 --- a/lib/plugins/plugin/classes/ap_manage.class.php +++ /dev/null @@ -1,202 +0,0 @@ -manager = & $manager; - $this->plugin = $plugin; - $this->lang = & $manager->lang; - } - - function process() { - return ''; - } - - function html() { - print $this->manager->locale_xhtml('admin_plugin'); - $this->html_menu(); - } - - // build our standard menu - function html_menu($listPlugins = true) { - global $ID; - - ptln('
    '); - - ptln('
    '); - ptln('

    '.$this->lang['download'].'

    '); - ptln(' '); - ptln(' '); - ptln('
    '); - ptln(' '.$this->lang['download'].''); - ptln(' '); - ptln(' '); - ptln('
    '); - ptln(' '); - ptln('
    '); - - if ($listPlugins) { - ptln('

    '.$this->lang['manage'].'

    '); - - ptln('
    '); - - ptln(' '); - - $this->html_pluginlist(); - - ptln('
    '); - ptln(' '); - ptln('
    '); - - // ptln('
    '); - ptln(''); - } - - ptln('
    '); - } - - function html_pluginlist() { - global $plugin_protected; - - foreach ($this->manager->plugin_list as $plugin) { - - $disabled = plugin_isdisabled($plugin); - $protected = in_array($plugin,$plugin_protected); - - $checked = ($disabled) ? '' : ' checked="checked"'; - $check_disabled = ($protected) ? ' disabled="disabled"' : ''; - - // determine display class(es) - $class = array(); - if (in_array($plugin, $this->downloaded)) $class[] = 'new'; - if ($disabled) $class[] = 'disabled'; - if ($protected) $class[] = 'protected'; - - $class = count($class) ? ' class="'.join(' ', $class).'"' : ''; - - ptln(' '); - ptln(' '.$plugin.''); - ptln(' '); - ptln('

    '); - - $this->html_button($plugin, 'info', false, 6); - if (in_array('settings', $this->manager->functions)) { - $this->html_button($plugin, 'settings', !@file_exists(DOKU_PLUGIN.$plugin.'/settings.php'), 6); - } - $this->html_button($plugin, 'update', !$this->plugin_readlog($plugin, 'url'), 6); - $this->html_button($plugin, 'delete', $protected, 6); - - ptln(' '); - } - } - - function html_button($plugin, $btn, $disabled=false, $indent=0) { - $disabled = ($disabled) ? 'disabled="disabled"' : ''; - ptln('',$indent); - } - - /** - * Refresh plugin list - */ - function refresh() { - global $config_cascade; - - // expire dokuwiki caches - // touching local.php expires wiki page, JS and CSS caches - @touch(reset($config_cascade['main']['local'])); - - // update latest plugin date - FIXME - global $ID; - send_redirect(wl($ID,array('do'=>'admin','page'=>'plugin'),true, '&')); - } - - /** - * Write a log entry to the given target directory - */ - function plugin_writelog($target, $cmd, $data) { - - $file = $target.'/manager.dat'; - - switch ($cmd) { - case 'install' : - $url = $data[0]; - $date = date('r'); - if (!$fp = @fopen($file, 'w')) return; - fwrite($fp, "installed=$date\nurl=$url\n"); - fclose($fp); - break; - - case 'update' : - $url = $data[0]; - $date = date('r'); - 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; - } - } - - function plugin_readlog($plugin, $field) { - static $log = array(); - $file = DOKU_PLUGIN.plugin_directory($plugin).'/manager.dat'; - - if (!isset($log[$plugin])) { - $tmp = @file_get_contents($file); - if (!$tmp) return ''; - $log[$plugin] = & $tmp; - } - - if ($field == 'ALL') { - return $log[$plugin]; - } - - $match = array(); - if (preg_match_all('/'.$field.'=(.*)$/m',$log[$plugin], $match)) - return implode("\n", $match[1]); - - return ''; - } - - /** - * delete, with recursive sub-directory support - */ - function dir_delete($path) { - if (!is_string($path) || $path == "") return false; - - if (is_dir($path) && !is_link($path)) { - if (!$dh = @opendir($path)) return false; - - while ($f = readdir($dh)) { - if ($f == '..' || $f == '.') continue; - $this->dir_delete("$path/$f"); - } - - closedir($dh); - return @rmdir($path); - } - return @unlink($path); - } - - -} diff --git a/lib/plugins/plugin/classes/ap_update.class.php b/lib/plugins/plugin/classes/ap_update.class.php deleted file mode 100644 index 5d7f6cb08..000000000 --- a/lib/plugins/plugin/classes/ap_update.class.php +++ /dev/null @@ -1,36 +0,0 @@ -plugin_readlog($this->plugin, 'url'); - $this->download($plugin_url, $this->overwrite); - return ''; - } - - function html() { - parent::html(); - - ptln('
    '); - ptln('

    '.$this->lang['updating'].'

    '); - - if ($this->manager->error) { - ptln('
    '.str_replace("\n","
    ", $this->manager->error).'
    '); - } else if (count($this->downloaded) == 1) { - ptln('

    '.sprintf($this->lang['updated'],$this->downloaded[0]).'

    '); - } else if (count($this->downloaded)) { // more than one plugin in the download - ptln('

    '.$this->lang['updates'].'

    '); - ptln('
      '); - foreach ($this->downloaded as $plugin) { - ptln('
    • '.$plugin.'
    • ',2); - } - ptln('
    '); - } else { // none found in download - ptln('

    '.$this->lang['update_none'].'

    '); - } - ptln('
    '); - } -} - diff --git a/lib/plugins/plugin/lang/af/lang.php b/lib/plugins/plugin/lang/af/lang.php deleted file mode 100644 index 669fdd5ce..000000000 --- a/lib/plugins/plugin/lang/af/lang.php +++ /dev/null @@ -1,13 +0,0 @@ -plugins|إضافات]] دوكو ويكي. لتتمكن من تنزيل و تثبيت الإضافات يجب أن يكون دليل الاضافات قابلا للكتابة من خادوم الوب. - diff --git a/lib/plugins/plugin/lang/ar/lang.php b/lib/plugins/plugin/lang/ar/lang.php deleted file mode 100644 index aae58fdb9..000000000 --- a/lib/plugins/plugin/lang/ar/lang.php +++ /dev/null @@ -1,54 +0,0 @@ - - * @author Usama Akkad - * @author uahello@gmail.com - */ -$lang['menu'] = 'إدارة الملحقات'; -$lang['download'] = 'نزّل و ثبت اضافة جديدة'; -$lang['manage'] = 'الإضافات المثبتة'; -$lang['btn_info'] = 'معلومات'; -$lang['btn_update'] = 'حدّث'; -$lang['btn_delete'] = 'احذف'; -$lang['btn_settings'] = 'إعدادات'; -$lang['btn_download'] = 'نزل'; -$lang['btn_enable'] = 'احفظ'; -$lang['url'] = 'رابط'; -$lang['installed'] = 'ثُبتت:'; -$lang['lastupdate'] = 'آخر تحديث:'; -$lang['source'] = 'المصدر:'; -$lang['unknown'] = 'مجهول'; -$lang['updating'] = 'تُحدث ...'; -$lang['updated'] = 'الاضافة %s حُدثت بنجاح'; -$lang['updates'] = 'الاضافة التالية حُدثت بنجاح'; -$lang['update_none'] = 'لا يوجد تحديثات.'; -$lang['deleting'] = 'تُحذف ... '; -$lang['deleted'] = 'حُذفت الإضافة %s.'; -$lang['downloading'] = 'يُنزل ...'; -$lang['downloaded'] = 'الاضافة %s ثبتت بنجاح'; -$lang['downloads'] = 'الاضافة التالية ثبتت بنجاح:'; -$lang['download_none'] = 'لم يجد إضافة، أو ان هناك مشكلة غير معروفة أثناء التنزيل و التثبيت.'; -$lang['plugin'] = 'الإضافة:'; -$lang['components'] = 'المكون:'; -$lang['noinfo'] = 'لم تعطي الإضافة أية معلومة، قد تكون معطوبة.'; -$lang['name'] = 'الاسم :'; -$lang['date'] = 'التاريخ :'; -$lang['type'] = 'النوع :'; -$lang['desc'] = 'الوصف :'; -$lang['author'] = 'الكاتب :'; -$lang['www'] = 'الشابكة :'; -$lang['error'] = 'حث خطأ مجهول.'; -$lang['error_download'] = 'تعذر تنزيل ملف الاضافة: %s'; -$lang['error_badurl'] = 'اشتبه بعنوان خاطئ - تعذر الحصول على الاسم من العنوان'; -$lang['error_dircreate'] = 'تعذر إنشاء مجلد مؤقت للتنزيل'; -$lang['error_decompress'] = 'تعذر على مدير الاضافات فك ضغط الملف المُنزّل. قد يكون ذلك نتيجة لتنزيل خاطئ، في هذه الحالة أعد المحاولة; أو ان هيئة الضغط غير معروفة، في هذه الحالة عليك تنزيل و تثبيت الاضافة يدويا.'; -$lang['error_copy'] = 'كان هناك خطأ في نسخ ملف عند محاولة تثبيت ملفات للإضافة %s: قد يكون القرص ممتلئا أو أن صلاحيات الوصول للملف خاطئة. لربما نتج عن ذلك اضافة مثبته جزئيا تجعل نظام الويكي غير ثابت.'; -$lang['error_delete'] = 'كان هناك خطأ عند محاولة حذف الاضافة %s. السبب الاكثر احتمالا هو صلاحيات غير كافية على الملف أو المجلد'; -$lang['enabled'] = 'الاضافة %s فُعلت. '; -$lang['notenabled'] = 'تعذر تفعيل الاضافة %s، تحقق من اذونات الملف.'; -$lang['disabled'] = 'عُطلت الإضافة %s.'; -$lang['notdisabled'] = 'تعذر تعطيل الإضافة %s، تحقق من اذونات الملف.'; -$lang['packageinstalled'] = 'حزمة الإضافة (%d plugin(s): %s) ثبتت بنجاج.'; diff --git a/lib/plugins/plugin/lang/bg/admin_plugin.txt b/lib/plugins/plugin/lang/bg/admin_plugin.txt deleted file mode 100644 index bad73e136..000000000 --- a/lib/plugins/plugin/lang/bg/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Управление на приставките ====== - -От тази страница можете на управлявате [[doku>plugins|приставките]] на Dokuwiki. За да свалите и инсталирате приставка, е необходимо писането в директорията .../lib/plugins/ да е позволено на сървъра. diff --git a/lib/plugins/plugin/lang/bg/lang.php b/lib/plugins/plugin/lang/bg/lang.php deleted file mode 100644 index 0e6a4cd28..000000000 --- a/lib/plugins/plugin/lang/bg/lang.php +++ /dev/null @@ -1,54 +0,0 @@ - - * @author Viktor Usunov - * @author Kiril - */ -$lang['menu'] = 'Управление на приставките'; -$lang['download'] = 'Сваляне и инсталиране на нова приставка'; -$lang['manage'] = 'Инсталирани приставки'; -$lang['btn_info'] = 'информация'; -$lang['btn_update'] = 'обновяване'; -$lang['btn_delete'] = 'изтриване'; -$lang['btn_settings'] = 'настройки'; -$lang['btn_download'] = 'Сваляне'; -$lang['btn_enable'] = 'Запис'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Инсталирана:'; -$lang['lastupdate'] = 'Актуализирана:'; -$lang['source'] = 'Източник:'; -$lang['unknown'] = 'непознат'; -$lang['updating'] = 'Актуализиране ...'; -$lang['updated'] = 'Приставката %s е качена успешно'; -$lang['updates'] = 'Следните приставки са актуализирани успешно'; -$lang['update_none'] = 'Не са намерени нови версии.'; -$lang['deleting'] = 'Изтриване ...'; -$lang['deleted'] = 'Приставката %s е изтрита успешно.'; -$lang['downloading'] = 'Сваляне ...'; -$lang['downloaded'] = 'Приставката %s е инсталирана успешно '; -$lang['downloads'] = 'Следните приставки са инсталирани успешно:'; -$lang['download_none'] = 'Не са намерени приставки или е възникнала непозната грешка при свалянето и инсталирането.'; -$lang['plugin'] = 'Приставка:'; -$lang['components'] = 'Компоненти'; -$lang['noinfo'] = 'Приставка не върна информация, може да е повредена.'; -$lang['name'] = 'Име:'; -$lang['date'] = 'Дата:'; -$lang['type'] = 'Тип:'; -$lang['desc'] = 'Описание:'; -$lang['author'] = 'Автор:'; -$lang['www'] = 'Уебстраница:'; -$lang['error'] = 'Възникна непозната грешка.'; -$lang['error_download'] = 'Свалянето на приставката %s е невъзможно.'; -$lang['error_badurl'] = 'Предполагаем грешен адрес - не може да се определи име на файла от URL адреса'; -$lang['error_dircreate'] = 'Създаването на временна директория за сваляне не е възможно.'; -$lang['error_decompress'] = 'Разархивирането на сваленият файл е невъзможно. Вероятно е резултат от грешка при свалянето, в този случай трябва да опитате отново; или формата на компресия е непознат - тогава трябва да свалите и инсталирате приставката ръчно.'; -$lang['error_copy'] = 'Възникна грешка при копиране на файл по време на инсталиране на приставката %s: вероятно дискът е пълен или правата за достъп до файловете са грешни. Може да доведе до частично инсталирана приставка и да причини нестабилно функциониране на wiki-то ви.'; -$lang['error_delete'] = 'Възникна грешка при изтриването на приставката %s. Най-вероятната причина е в правата за достъп до файл или директория'; -$lang['enabled'] = 'Приставката %s е включена.'; -$lang['notenabled'] = 'Приставката %s не може да бъде включена, моля проверете правата за файловете.'; -$lang['disabled'] = 'Приставката %s е изключена.'; -$lang['notdisabled'] = 'Приставката %s не е изключена, моля проверете правата за файловете.'; -$lang['packageinstalled'] = 'Пакетът е инсталиран успешно (%d приставка: %s).'; diff --git a/lib/plugins/plugin/lang/ca-valencia/admin_plugin.txt b/lib/plugins/plugin/lang/ca-valencia/admin_plugin.txt deleted file mode 100644 index 6b5a95838..000000000 --- a/lib/plugins/plugin/lang/ca-valencia/admin_plugin.txt +++ /dev/null @@ -1,4 +0,0 @@ -====== Gestor de plúgins ====== - -Des d'esta pàgina pot gestionar tot lo relacionat en els [[doku>plugins|plúgins]] de DokuWiki. Per a poder descarregar i instalar un plúgin, el servidor web deu poder escriure en la carpeta de plúgins. - diff --git a/lib/plugins/plugin/lang/ca-valencia/lang.php b/lib/plugins/plugin/lang/ca-valencia/lang.php deleted file mode 100644 index 3fbdb134d..000000000 --- a/lib/plugins/plugin/lang/ca-valencia/lang.php +++ /dev/null @@ -1,53 +0,0 @@ - - * @author Bernat Arlandis - * @author Bernat Arlandis - */ -$lang['menu'] = 'Gestor de plúgins'; -$lang['download'] = 'Descarregar i instalar un nou plúgin'; -$lang['manage'] = 'Plúgins instalats'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'actualisar'; -$lang['btn_delete'] = 'borrar'; -$lang['btn_settings'] = 'ajusts'; -$lang['btn_download'] = 'Descarregar'; -$lang['btn_enable'] = 'Guardar'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instalat:'; -$lang['lastupdate'] = 'Última actualisació:'; -$lang['source'] = 'Font:'; -$lang['unknown'] = 'desconegut'; -$lang['updating'] = 'Actualisant ...'; -$lang['updated'] = 'Plúgin %s actualisat correctament'; -$lang['updates'] = 'Els següents plúgins s\'han actualisat correctament:'; -$lang['update_none'] = 'No s\'han trobat actualisacions.'; -$lang['deleting'] = 'Borrant ...'; -$lang['deleted'] = 'Plúgin %s borrat.'; -$lang['downloading'] = 'Descarregant ...'; -$lang['downloaded'] = 'Plúgin %s instalat correctament'; -$lang['downloads'] = 'Els següents plúgins s\'han instalat correctament:'; -$lang['download_none'] = 'No s\'han trobat plúgins o ha hagut algun problema descarregant i instalant.'; -$lang['plugin'] = 'Plúgin:'; -$lang['components'] = 'Components'; -$lang['noinfo'] = 'Este plúgin no ha tornat informació, pot ser invàlit.'; -$lang['name'] = 'Nom:'; -$lang['date'] = 'Data:'; -$lang['type'] = 'Classe:'; -$lang['desc'] = 'Descripció:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Ha ocorregut un erro desconegut.'; -$lang['error_download'] = 'No es pot descarregar l\'archiu del plúgin: %s'; -$lang['error_badurl'] = 'Possible URL roïn - no es pot determinar el nom de l\'archiu a partir de la URL'; -$lang['error_dircreate'] = 'No es pot crear la carpeta temporal per a rebre descàrregues'; -$lang['error_decompress'] = 'El gestor de plúgins no ha pogut descomprimir l\'archiu descarregat. Açò pot ser degut a una descàrrega fallida, en eixe cas deuria intentar-ho de nou; o el format de compressió pot ser desconegut, en eixe cas necessitarà descarregar i instalar el plúgin manualment.'; -$lang['error_copy'] = 'Ha ocorregut un erro copiant archius a l\'instalar archius del plúgin %s: el disc podria estar ple o els permissos d\'accés a l\'archiu estar mal. El plúgin podria haver quedat parcialment instalat i deixar el wiki inestable.'; -$lang['error_delete'] = 'Ha ocorregut un erro intentant borrar el plúgin %s. La causa més provable és que els permissos d\'accés a l\'archiu o el directori no siguen suficients'; -$lang['enabled'] = 'Plúgin %s activat.'; -$lang['notenabled'] = 'No s\'ha pogut activar el plúgin %s, comprove els permissos dels archius.'; -$lang['disabled'] = 'Plúgin %s desactivat.'; -$lang['notdisabled'] = 'No s\'ha pogut desactivar el plúgin %s, comprove els permissos dels archius.'; diff --git a/lib/plugins/plugin/lang/ca/admin_plugin.txt b/lib/plugins/plugin/lang/ca/admin_plugin.txt deleted file mode 100644 index c21e3f502..000000000 --- a/lib/plugins/plugin/lang/ca/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Gestió de connectors ====== - -En aquesta pàgina podeu gestionar tot allò referent als [[doku>plugins|connectors]] de Dokuwiki. Per a baixar i instal·lar connectors, cal que el servidor web tingui permís d'escriptura en la carpeta de connectors. \ No newline at end of file diff --git a/lib/plugins/plugin/lang/ca/lang.php b/lib/plugins/plugin/lang/ca/lang.php deleted file mode 100644 index 5c7933666..000000000 --- a/lib/plugins/plugin/lang/ca/lang.php +++ /dev/null @@ -1,55 +0,0 @@ - - * @author carles.bellver@gmail.com - * @author carles.bellver@cent.uji.es - * @author Carles Bellver - * @author daniel@6temes.cat - */ -$lang['menu'] = 'Gestió de connectors'; -$lang['download'] = 'Baixa i instal·la un nou connector'; -$lang['manage'] = 'Connectors instal·lats'; -$lang['btn_info'] = 'informació'; -$lang['btn_update'] = 'actualitza'; -$lang['btn_delete'] = 'suprimeix'; -$lang['btn_settings'] = 'paràmetres'; -$lang['btn_download'] = 'Baixa'; -$lang['btn_enable'] = 'Desa'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instal·lació:'; -$lang['lastupdate'] = 'Darrera actualitació:'; -$lang['source'] = 'Font:'; -$lang['unknown'] = 'desconegut'; -$lang['updating'] = 'S\'està actualitzant...'; -$lang['updated'] = 'El connector %s s\'ha actualitzat amb èxit.'; -$lang['updates'] = 'Els connectors següents s\'han actualitzat amb èxit'; -$lang['update_none'] = 'No s\'han trobat actualitzacions.'; -$lang['deleting'] = 'S\'està suprimint...'; -$lang['deleted'] = 'S\'ha suprimit el connector %s.'; -$lang['downloading'] = 'S\'està baixant...'; -$lang['downloaded'] = 'El connector %s s\'ha instal·lat amb èxit'; -$lang['downloads'] = 'Els connectors següents s\'han instal·lat amb èxit:'; -$lang['download_none'] = 'No s\'han trobat connectors, o hi ha hagut un problema desconegut durant el procés de baixada i instal·lació.'; -$lang['plugin'] = 'Connector:'; -$lang['components'] = 'Components'; -$lang['noinfo'] = 'Aquest connector no ha retornat informació. Potser no és vàlid.'; -$lang['name'] = 'Nom:'; -$lang['date'] = 'Data:'; -$lang['type'] = 'Tipus:'; -$lang['desc'] = 'Descripció:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'S\'ha produït un error desconegut.'; -$lang['error_download'] = 'No s\'ha pogut baixar el fitxer del connector: %s'; -$lang['error_badurl'] = 'L\'URL no sembla vàlid: no permet determinar el nom del fitxer'; -$lang['error_dircreate'] = 'No s\'ha pogut crear una carpeta temporal per rebre la baixada'; -$lang['error_decompress'] = 'El gestor de connectors no ha pogut descomprimir el fitxer baixat. Potser no s\'ha baixat correctament, en el qual cas podríeu tornar a intentar-ho. O el format de compressió podria ser desconegut, en el qual cas hauríeu de baixar i instal·lar el connector manualment.'; -$lang['error_copy'] = 'S\'ha produït un error de còpia de fitxers quan s\'estaven instal·lant els fitxers del connector %s: potser el disc està ple o els permisos d\'accés són incorrectes. Això pot haver causat una instal·lació incompleta del connector i per tant el vostre wiki pot haver quedat en un estat inestable.'; -$lang['error_delete'] = 'S\'ha produït un error quan s\'intentava suprimir el connector %s. La causa més probable d\'això són uns permisos d\'accés insuficients al fitxer o al directori. '; -$lang['enabled'] = 'S\'ha habilitat el connector %s.'; -$lang['notenabled'] = 'No s\'ha pogut habilitar el connector %s. Comproveu els permisos dels fitxers.'; -$lang['disabled'] = 'S\'ha inhabilitat el connector %s.'; -$lang['notdisabled'] = 'No s\'ha pogut inhabilitar el connector %s. Comproveu els permisos dels fitxers.'; -$lang['packageinstalled'] = 'El paquet del connector (%d plugins(s): %s) s\'ha instal·lat correctament.'; diff --git a/lib/plugins/plugin/lang/cs/admin_plugin.txt b/lib/plugins/plugin/lang/cs/admin_plugin.txt deleted file mode 100644 index 6ebf1e78f..000000000 --- a/lib/plugins/plugin/lang/cs/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Správa pluginů ====== - -Na této stránce lze spravovat pluginy DokuWiki [[doku>plugins|plugins]]. Aby bylo možné stahovat a instalovat pluginy, musí mít webový server přístup pro zápis do adresáře //plugin//. diff --git a/lib/plugins/plugin/lang/cs/lang.php b/lib/plugins/plugin/lang/cs/lang.php deleted file mode 100644 index fb8b6cc4e..000000000 --- a/lib/plugins/plugin/lang/cs/lang.php +++ /dev/null @@ -1,65 +0,0 @@ - - * @author Zbynek Krivka - * @author Bohumir Zamecnik - * @author tomas@valenta.cz - * @author Marek Sacha - * @author Lefty - * @author Vojta Beran - * @author zbynek.krivka@seznam.cz - * @author Bohumir Zamecnik - * @author Jakub A. Těšínský (j@kub.cz) - * @author mkucera66@seznam.cz - * @author Zbyněk Křivka - * @author Gerrit Uitslag - */ -$lang['menu'] = 'Správa pluginů'; -$lang['download'] = 'Stáhnout a instalovat plugin'; -$lang['manage'] = 'Seznam instalovaných pluginů'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'aktualizovat'; -$lang['btn_delete'] = 'smazat'; -$lang['btn_settings'] = 'nastavení'; -$lang['btn_download'] = 'Stáhnout'; -$lang['btn_enable'] = 'Uložit'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instalován:'; -$lang['lastupdate'] = 'Poslední aktualizace:'; -$lang['source'] = 'Zdroj:'; -$lang['unknown'] = 'neznámý'; -$lang['updating'] = 'Aktualizuji ...'; -$lang['updated'] = 'Modul %s úspěšně aktualizován'; -$lang['updates'] = 'Následující pluginy byly úspěšně aktualizovány'; -$lang['update_none'] = 'Žádné aktualizace nenalezeny.'; -$lang['deleting'] = 'Probíhá mazání ...'; -$lang['deleted'] = 'Plugin %s smazán.'; -$lang['downloading'] = 'Stahuji ...'; -$lang['downloaded'] = 'Plugin %s nainstalován'; -$lang['downloads'] = 'Následující pluginy byly úspěšně instalovány:'; -$lang['download_none'] = 'Žádné pluginy nebyly nenalezeny, nebo se vyskytla nějaká chyba při -stahování a instalaci.'; -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Součásti'; -$lang['noinfo'] = 'Plugin nevrátil žádné informace. Může být poškozen nebo špatný.'; -$lang['name'] = 'Jméno:'; -$lang['date'] = 'Datum:'; -$lang['type'] = 'Typ:'; -$lang['desc'] = 'Popis:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Nastala neznámá chyba.'; -$lang['error_download'] = 'Nelze stáhnout soubor s pluginem: %s'; -$lang['error_badurl'] = 'URL je zřejmě chybná - nelze z ní určit název souboru'; -$lang['error_dircreate'] = 'Nelze vytvořit dočasný adresář ke stažení dat'; -$lang['error_decompress'] = 'Správce pluginů nemůže rozbalit stažený soubor. Toto může být způsobeno chybou při stahování. Můžete se pokusit stahování opakovat. Chyba může být také v kompresním formátu souboru. V tom případě bude nutné stáhnout a nainstalovat plugin ručně.'; -$lang['error_copy'] = 'Došlo k chybě při instalaci pluginu %s. Je možné, že na disku není volné místo, nebo mohou být špatně nastavena přístupová práva. Pozor, mohlo dojít k částečné a tudíž chybné instalaci pluginu a tím může být ohrožena stabilita wiki.'; -$lang['error_delete'] = 'Došlo k chybě při pokusu o smazání pluginu %s. Nejspíše je chyba v nastavení přístupových práv k některým souborům či adresářům.'; -$lang['enabled'] = 'Plugin %s aktivován.'; -$lang['notenabled'] = 'Plugin %s nelze aktivovat, zkontrolujte práva k souborům.'; -$lang['disabled'] = 'Plugin %s deaktivován.'; -$lang['notdisabled'] = 'Plugin %s nelze deaktivovat, zkontrolujte práva k souborům.'; -$lang['packageinstalled'] = 'Balíček pluginů (%d plugin(ů): %s) úspěšně nainstalován.'; diff --git a/lib/plugins/plugin/lang/da/admin_plugin.txt b/lib/plugins/plugin/lang/da/admin_plugin.txt deleted file mode 100644 index 300b6618b..000000000 --- a/lib/plugins/plugin/lang/da/admin_plugin.txt +++ /dev/null @@ -1,5 +0,0 @@ -====== Udvidelsesstyring ====== - -På denne side kan du kontrollere alle Dokuwikis [[doku>plugins|udvidelser]]. For at hente og opsætte en udvidelse, må din udvidelsesmappe kunne skrives til af serveren. - - diff --git a/lib/plugins/plugin/lang/da/lang.php b/lib/plugins/plugin/lang/da/lang.php deleted file mode 100644 index 07077eaa1..000000000 --- a/lib/plugins/plugin/lang/da/lang.php +++ /dev/null @@ -1,61 +0,0 @@ - - * @author Kalle Sommer Nielsen - * @author Esben Laursen - * @author Harith - * @author Daniel Ejsing-Duun - * @author Erik Bjørn Pedersen - * @author rasmus@kinnerup.com - * @author Michael Pedersen subben@gmail.com - * @author Mikael Lyngvig - * @author Jens Hyllegaard - */ -$lang['menu'] = 'Håndter udvidelser'; -$lang['download'] = 'Hent og tilføj ny udvidelse'; -$lang['manage'] = 'Tilføjede udvidelser'; -$lang['btn_info'] = 'oplysninger'; -$lang['btn_update'] = 'opdater'; -$lang['btn_delete'] = 'slet'; -$lang['btn_settings'] = 'indstillinger'; -$lang['btn_download'] = 'Hent'; -$lang['btn_enable'] = 'Gem'; -$lang['url'] = 'URL-adresse'; -$lang['installed'] = 'Tilføjet:'; -$lang['lastupdate'] = 'Sidst opdateret:'; -$lang['source'] = 'Kilde:'; -$lang['unknown'] = 'ukendt'; -$lang['updating'] = 'Opdaterer ...'; -$lang['updated'] = 'Udvidelse %s blev korrekt opdateret'; -$lang['updates'] = 'De følgende udvidelser blev opdateret korrekt:'; -$lang['update_none'] = 'Ingen opdateringer fundet.'; -$lang['deleting'] = 'Sletter ...'; -$lang['deleted'] = 'Udvidelsen %s slettet.'; -$lang['downloading'] = 'Henter ...'; -$lang['downloaded'] = 'Udvidelse %s blev korrekt installeret'; -$lang['downloads'] = 'De følgende udvidelser blev installeret korrekt:'; -$lang['download_none'] = 'Ingen udvidelser blev fundet, eller en ukendt fejl opstod under hentning og opsætning'; -$lang['plugin'] = 'Udvidelse:'; -$lang['components'] = 'Komponenter'; -$lang['noinfo'] = 'Denne udvidelse videregav ingen oplysninger. Den kan være fejlagtig.'; -$lang['name'] = 'Navn:'; -$lang['date'] = 'Dato:'; -$lang['type'] = 'Type:'; -$lang['desc'] = 'Beskrivelse:'; -$lang['author'] = 'Programmør:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'En ukendt fejl opstod.'; -$lang['error_download'] = 'Kunne ikke hente udvidelsesfilen: %s'; -$lang['error_badurl'] = 'Muligvis dårlig netadresse; kunne ikke hente filnavn fra adressen.'; -$lang['error_dircreate'] = 'Kunne ikke oprette midlertidig mappe til hentning'; -$lang['error_decompress'] = 'Udvidelseshåndtering kunne ikke udpakke den hentede fil. Det kan skyldes et fejlagtigt download, i hvilket fald du må prøve igen. Komprimeringsformatet kan også være ukendt, hvorved du du vil være nødt til at hente og opsætte udvidelsen manuelt.'; -$lang['error_copy'] = 'Der opstod en filkopieringsfejl under forsøget på at installere filerne til udvidelsen %s: Disken kan være fuld eller filadgangsrettighederne kan være forkert sat. Dette kan have ført til en delvist installeret udvidelse og efterladt din wiki-opsætning ustabil.'; -$lang['error_delete'] = 'Der opstod en fejl ved forsøget på at slette udvidelsen %s. Dette skyldes sandsynligvis utilstrækkelig adgang til filer eller mapper.'; -$lang['enabled'] = 'Udvidelsen %s blev aktiveret.'; -$lang['notenabled'] = 'Udvidelsen %s kunne ikke aktiveres. Kontroller filtilladelser.'; -$lang['disabled'] = 'Udvidelsen %s blev ikke aktiveret.'; -$lang['notdisabled'] = 'Udvidelsen %s kunne ikke aktiveres. Kontroller filtilladelser.'; -$lang['packageinstalled'] = 'Plugin pakke (%d plugin(s): %s) installeret korrekt.'; diff --git a/lib/plugins/plugin/lang/de-informal/admin_plugin.txt b/lib/plugins/plugin/lang/de-informal/admin_plugin.txt deleted file mode 100644 index 576797d57..000000000 --- a/lib/plugins/plugin/lang/de-informal/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -===== Erweiterungsmanagement ===== - -Auf dieser Seite kannst du alles anpassen was mit den DokuWiki [[doku>plugins|Erweiterungen]] zu tun hat. Der Ordner der Erweiterungen muss für den Webserver beschreibbar sein, um Erweiterungen herunterladen und installieren zu können. \ No newline at end of file diff --git a/lib/plugins/plugin/lang/de-informal/lang.php b/lib/plugins/plugin/lang/de-informal/lang.php deleted file mode 100644 index 8f1cea5e5..000000000 --- a/lib/plugins/plugin/lang/de-informal/lang.php +++ /dev/null @@ -1,59 +0,0 @@ - - * @author Juergen Schwarzer - * @author Marcel Metz - * @author Matthias Schulte - * @author Christian Wichmann - * @author Pierre Corell - * @author Frank Loizzi - * @author Volker Bödker - */ -$lang['menu'] = 'Plugins verwalten'; -$lang['download'] = 'Herunterladen und installieren einer neuen Erweiterung'; -$lang['manage'] = 'Installierte Erweiterungen'; -$lang['btn_info'] = 'Information'; -$lang['btn_update'] = 'aktualisieren'; -$lang['btn_delete'] = 'löschen'; -$lang['btn_settings'] = 'Einstellungen'; -$lang['btn_download'] = 'Herunterladen'; -$lang['btn_enable'] = 'Speichern'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Installiert:'; -$lang['lastupdate'] = 'Letzte Aktualisierung:'; -$lang['source'] = 'Quellen:'; -$lang['unknown'] = 'unbekannt'; -$lang['updating'] = 'Aktualisiere...'; -$lang['updated'] = 'Erweiterung %s wurde erfolgreich aktualisiert.'; -$lang['updates'] = 'Die folgenden Erweiterungen wurden erfolgreich aktualisiert.'; -$lang['update_none'] = 'Keine Aktualisierungen gefunden.'; -$lang['deleting'] = 'Lösche...'; -$lang['deleted'] = 'Erweiterung %s wurde gelöscht.'; -$lang['downloading'] = 'Herunterladen...'; -$lang['downloaded'] = 'Erweiterung %s wurde erfolgreich installiert'; -$lang['downloads'] = 'Die folgenden Erweiterungen wurden erfolgreich installiert:'; -$lang['download_none'] = 'Keine Erweiterungen gefunden oder es trat ein unbekanntest Problem beim Herunterladen und Installieren auf.'; -$lang['plugin'] = 'Erweiterung:'; -$lang['components'] = 'Komponenten'; -$lang['noinfo'] = 'Diese Erweiterung gab keine Information zurück - sie könnte ungültig sein.'; -$lang['name'] = 'Name:'; -$lang['date'] = 'Datum:'; -$lang['type'] = 'Typ:'; -$lang['desc'] = 'Beschreibung:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Internet:'; -$lang['error'] = 'Es ist ein unbekannter Fehler aufgetreten.'; -$lang['error_download'] = 'Nicht möglich die Erweiterung herunterzuladen: %s'; -$lang['error_badurl'] = 'Vermute schlechte URL - nicht möglich den Dateinamen aus der URL zu ermitteln'; -$lang['error_dircreate'] = 'Nicht möglich einen temporären Ordner zu erstellen um den Download zu empfangen.'; -$lang['error_decompress'] = 'Dem Erweiterungsmanager war es nicht möglich die heruntergeladene Datei zu dekomprimieren. Dies kann an einem defekten Download liegen, in diesem Fall sollten Sie es erneut versuchen; oder das Format mit dem die Datei komprimiert ist, ist unbekannt, da müssen Sie die Erweiterung manuell herunterladen und installieren. '; -$lang['error_copy'] = 'Es trat ein Dateifehler beim Kopieren der Installationsdateien für die Erweiterung %s auf: Die Festplatte könnte voll oder die Zugriffsrechte verweigert worden sein. Dies führt zu einer teilweise installierten Erweiterung und belässt dein Wiki in einem instabilen Zustand.'; -$lang['error_delete'] = 'Es trat ein Fehler beim Löschen der Erweiterung %s auf. Die wahrscheinlichste Ursache ist eine unzureichende Datei- oder Ordnerzugriffserlaubnis.'; -$lang['enabled'] = 'Erweiterung %s aktiviert.'; -$lang['notenabled'] = 'Erweiterung %s konnte nicht aktiviert werden. Überprüfen sie die Zugriffsberechtigung der Datei.'; -$lang['disabled'] = 'Erweiterung %s deaktiviert.'; -$lang['notdisabled'] = 'Erweiterung %s konnte nicht deaktiviert werden - überprüfe Dateiberechtigungen'; -$lang['packageinstalled'] = 'Plugin-Paket (%d Plugin(s): %s) erfolgreich installiert.'; diff --git a/lib/plugins/plugin/lang/de/admin_plugin.txt b/lib/plugins/plugin/lang/de/admin_plugin.txt deleted file mode 100644 index f3b2caa0c..000000000 --- a/lib/plugins/plugin/lang/de/admin_plugin.txt +++ /dev/null @@ -1,5 +0,0 @@ -====== Verwaltung der Plugins ====== - -Auf dieser Seite kannst du alles machen, was mit DokuWiki [[doku>plugins|Plugins]] zu tun hat. Um Plugins automatisch herunterladen und installieren zu können, muss der Webserver im Plugin-Ordner schreiben dürfen. - - diff --git a/lib/plugins/plugin/lang/de/lang.php b/lib/plugins/plugin/lang/de/lang.php deleted file mode 100644 index f41486007..000000000 --- a/lib/plugins/plugin/lang/de/lang.php +++ /dev/null @@ -1,66 +0,0 @@ - - * @author Andreas Gohr - * @author Michael Klier - * @author Leo Moll - * @author Florian Anderiasch - * @author Robin Kluth - * @author Arne Pelka - * @author Dirk Einecke - * @author Blitzi94@gmx.de - * @author Robert Bogenschneider - * @author Robert Bogenschneider - * @author Niels Lange - * @author Christian Wichmann - * @author Paul Lachewsky - * @author Pierre Corell - */ -$lang['menu'] = 'Plugins verwalten'; -$lang['download'] = 'Neues Plugin herunterladen und installieren'; -$lang['manage'] = 'Installierte Plugins'; -$lang['btn_info'] = 'Info'; -$lang['btn_update'] = 'Update'; -$lang['btn_delete'] = 'Löschen'; -$lang['btn_settings'] = 'Einstellungen'; -$lang['btn_download'] = 'Herunterladen'; -$lang['btn_enable'] = 'Speichern'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Installiert:'; -$lang['lastupdate'] = 'Letzte Version:'; -$lang['source'] = 'Quelle:'; -$lang['unknown'] = 'unbekannt'; -$lang['updating'] = 'Lade Update ...'; -$lang['updated'] = 'Update von Plugin %s erfolgreich installiert'; -$lang['updates'] = 'Die folgenden Plugins wurden erfolgreich aktualisiert'; -$lang['update_none'] = 'Keine Updates gefunden.'; -$lang['deleting'] = 'Löschen ...'; -$lang['deleted'] = 'Plugin %s gelöscht.'; -$lang['downloading'] = 'Lade herunter ...'; -$lang['downloaded'] = 'Plugin %s erfolgreich installiert'; -$lang['downloads'] = 'Die folgenden Plugins wurden erfolgreich installiert:'; -$lang['download_none'] = 'Keine Plugins gefunden oder es trat ein Fehler beim Herunterladen auf.'; -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Komponenten'; -$lang['noinfo'] = 'Dieses Plugin liefert keine Informationen, möglicherweise ist es fehlerhaft.'; -$lang['name'] = 'Name:'; -$lang['date'] = 'Datum:'; -$lang['type'] = 'Typ:'; -$lang['desc'] = 'Beschreibung:'; -$lang['author'] = 'Entwickler:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Ein unbekannter Fehler ist aufgetreten.'; -$lang['error_download'] = 'Konnte das Plugin %s nicht herunterladen'; -$lang['error_badurl'] = 'Wahrscheinlich ungültige URL, konnte keinen Dateinamen ausfindig machen'; -$lang['error_dircreate'] = 'Konnte keinen temporären Ordner für die Downloads erstellen'; -$lang['error_decompress'] = 'Der Plugin Manager konnte das Plugin-Archiv nicht entpacken. Entweder ist der Download fehlerhaft oder das Komprimierungsverfahren wird nicht unterstützt. Bitte versuchen Sie es erneut oder downloaden und installieren Sie das Plugin manuell.'; -$lang['error_copy'] = 'Beim Kopieren der Dateien des Plugins trat ein Fehler auf %s: möglicherweise ist die Festplatte voll oder die Dateiberechtigungen falsch. Möglicherweise wurde das Plugin nur teilweise installiert. Sie sollten das Plugin manuell entfernen um Instabilitäten zu vermeiden.'; -$lang['error_delete'] = 'Es gab einem Fehler beim Versuch das Plugin zu löschen %s. Dies liegt wahrscheinlich an fehlenden Dateiberechtigungen.'; -$lang['enabled'] = 'Plugin %s wurde aktiviert.'; -$lang['notenabled'] = 'Plugin %s konnte nicht aktiviert werden, überprüfen Sie die Dateirechte.'; -$lang['disabled'] = 'Plugin %s wurde deaktiviert.'; -$lang['notdisabled'] = 'Plugin %s konnte nicht deaktiviert werden, überprüfen Sie die Dateirechte.'; -$lang['packageinstalled'] = 'Plugin-Paket (%d Plugin(s): %s) erfolgreich installiert.'; diff --git a/lib/plugins/plugin/lang/el/admin_plugin.txt b/lib/plugins/plugin/lang/el/admin_plugin.txt deleted file mode 100644 index 8b292935d..000000000 --- a/lib/plugins/plugin/lang/el/admin_plugin.txt +++ /dev/null @@ -1,5 +0,0 @@ -====== Διαχείριση Επεκτάσεων ====== - -Σε αυτή την σελίδα μπορείτε να διαχειριστείτε τις [[doku>plugins|επεκτάσεις]] του Dokuwiki σας. Για να μπορέσετε να εγκαταστήσετε νέες επεκτάσεις, ο αντίστοιχος φάκελος συστήματος θα πρέπει να είναι εγγράψιμος από τον χρήστη κάτω από τον οποίο εκτελείται η εφαρμογή του εξυπηρετητή σας. - - diff --git a/lib/plugins/plugin/lang/el/lang.php b/lib/plugins/plugin/lang/el/lang.php deleted file mode 100644 index f50e26c46..000000000 --- a/lib/plugins/plugin/lang/el/lang.php +++ /dev/null @@ -1,58 +0,0 @@ - - * @author Thanos Massias - * @author Αθανάσιος Νταής - * @author Konstantinos Koryllos - * @author George Petsagourakis - * @author Petros Vidalis - * @author Vasileios Karavasilis vasileioskaravasilis@gmail.com - */ -$lang['menu'] = 'Διαχείριση Επεκτάσεων'; -$lang['download'] = 'Κατεβάστε και εγκαταστήστε μια νέα επέκταση (plugin)'; -$lang['manage'] = 'Εγκατεστημένες επεκτάσεις'; -$lang['btn_info'] = 'πληροφορίες'; -$lang['btn_update'] = 'ενημέρωση'; -$lang['btn_delete'] = 'διαγραφή'; -$lang['btn_settings'] = 'ρυθμίσεις'; -$lang['btn_download'] = 'Μεταφόρτωση'; -$lang['btn_enable'] = 'Αποθήκευση'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Εγκατεστημένη:'; -$lang['lastupdate'] = 'Τελευταία ενημέρωση:'; -$lang['source'] = 'Προέλευση:'; -$lang['unknown'] = 'άγνωστο'; -$lang['updating'] = 'Σε διαδικασία ενημέρωσης ...'; -$lang['updated'] = 'Η επέκταση %s ενημερώθηκε με επιτυχία'; -$lang['updates'] = 'Οι παρακάτω επεκτάσεις ενημερώθηκαν με επιτυχία:'; -$lang['update_none'] = 'Δεν βρέθηκαν ενημερώσεις.'; -$lang['deleting'] = 'Σε διαδικασία διαγραφής ...'; -$lang['deleted'] = 'Η επέκταση %s διαγράφηκε.'; -$lang['downloading'] = 'Σε διαδικασία μεταφόρτωσης ...'; -$lang['downloaded'] = 'Η επέκταση %s εγκαταστάθηκε με επιτυχία'; -$lang['downloads'] = 'Οι παρακάτω επεκτάσεις εγκαταστάθηκαν με επιτυχία:'; -$lang['download_none'] = 'Δεν βρέθηκαν επεκτάσεις ή εμφανίστηκε κάποιο πρόβλημα κατά την σχετική διαδικασία.'; -$lang['plugin'] = 'Επέκταση:'; -$lang['components'] = 'Συστατικά'; -$lang['noinfo'] = 'Αυτή η επέκταση δεν επέστρεψε κάποια πληροφορία - η επέκταση μπορεί να μην λειτουργεί κανονικά.'; -$lang['name'] = 'Όνομα:'; -$lang['date'] = 'Ημερομηνία:'; -$lang['type'] = 'Τύπος:'; -$lang['desc'] = 'Περιγραφή:'; -$lang['author'] = 'Συγγραφέας:'; -$lang['www'] = 'Διεύθυνση στο διαδίκτυο:'; -$lang['error'] = 'Εμφανίστηκε άγνωστο σφάλμα.'; -$lang['error_download'] = 'Δεν είναι δυνατή η μεταφόρτωση του αρχείου: %s'; -$lang['error_badurl'] = 'Το URL είναι μάλλον λανθασμένο - είναι αδύνατον να εξαχθεί το όνομα αρχείου από αυτό το URL'; -$lang['error_dircreate'] = 'Δεν είναι δυνατή η δημιουργία ενός προσωρινού φακέλου αποθήκευσης των μεταφορτώσεων'; -$lang['error_decompress'] = 'Δεν είναι δυνατή η αποσυμπίεση των μεταφορτώσεων. Αυτό μπορεί να οφείλεται σε μερική λήψη των μεταφορτώσεων, οπότε θα πρέπει να επαναλάβετε την διαδικασία ή το σύστημά σας δεν μπορεί να διαχειριστεί το συγκεκριμένο είδος συμπίεσης, οπότε θα πρέπει να εγκαταστήσετε την επέκταση χειροκίνητα.'; -$lang['error_copy'] = 'Εμφανίστηκε ένα σφάλμα αντιγραφής αρχείων κατά την διάρκεια εγκατάστασης της επέκτασης %s: ο δίσκος μπορεί να είναι γεμάτος ή να μην είναι σωστά ρυθμισμένα τα δικαιώματα πρόσβασης. Αυτό το γεγονός μπορεί να οδήγησε σε μερική εγκατάσταση της επέκτασης και άρα η DokuWiki εγκατάστασή σας να εμφανίσει προβλήματα σταθερότητας.'; -$lang['error_delete'] = 'Εμφανίστηκε ένα σφάλμα κατά την διαδικασία διαγραφής της επέκτασης %s. Η πιθανότερη αιτία είναι να μην είναι σωστά ρυθμισμένα τα δικαιώματα πρόσβασης.'; -$lang['enabled'] = 'Η επέκταση %s ενεργοποιήθηκε.'; -$lang['notenabled'] = 'Η επέκταση %s δεν μπορεί να ενεργοποιηθεί. Ελέγξτε τα δικαιώματα πρόσβασης.'; -$lang['disabled'] = 'Η επέκταση %s απενεργοποιήθηκε.'; -$lang['notdisabled'] = 'Η επέκταση %s δεν μπορεί να απενεργοποιηθεί. Ελέγξτε τα δικαιώματα πρόσβασης.'; -$lang['packageinstalled'] = 'Το πακέτο της επέκτασης (%d επέκταση(εις): %s) εγκαστήθηκε επιτυχημένα.'; diff --git a/lib/plugins/plugin/lang/en/admin_plugin.txt b/lib/plugins/plugin/lang/en/admin_plugin.txt deleted file mode 100644 index cb23b1e02..000000000 --- a/lib/plugins/plugin/lang/en/admin_plugin.txt +++ /dev/null @@ -1,5 +0,0 @@ -====== Plugin Management ====== - -On this page you can manage everything to do with Dokuwiki [[doku>plugins|plugins]]. To be able to download and install a plugin your plugin folder must be writeable by the webserver. - - diff --git a/lib/plugins/plugin/lang/en/lang.php b/lib/plugins/plugin/lang/en/lang.php deleted file mode 100644 index 87570a708..000000000 --- a/lib/plugins/plugin/lang/en/lang.php +++ /dev/null @@ -1,78 +0,0 @@ - - */ - -$lang['menu'] = 'Manage Plugins'; - -// custom language strings for the plugin -$lang['download'] = "Download and install a new plugin"; -$lang['manage'] = "Installed Plugins"; - -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'update'; -$lang['btn_delete'] = 'delete'; -$lang['btn_settings'] = 'settings'; -$lang['btn_download'] = 'Download'; -$lang['btn_enable'] = 'Save'; - -$lang['url'] = 'URL'; - -$lang['installed'] = 'Installed:'; -$lang['lastupdate'] = 'Last updated:'; -$lang['source'] = 'Source:'; -$lang['unknown'] = 'unknown'; - -// ..ing = header message -// ..ed = success message - -$lang['updating'] = 'Updating ...'; -$lang['updated'] = 'Plugin %s updated successfully'; -$lang['updates'] = 'The following plugins have been updated successfully'; -$lang['update_none'] = 'No updates found.'; - -$lang['deleting'] = 'Deleting ...'; -$lang['deleted'] = 'Plugin %s deleted.'; - -$lang['downloading'] = 'Downloading ...'; -$lang['downloaded'] = 'Plugin %s installed successfully'; -$lang['downloads'] = 'The following plugins have been installed successfully:'; -$lang['download_none'] = 'No plugins found, or there has been an unknown problem during downloading and installing.'; - -// info titles -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Components'; -$lang['noinfo'] = 'This plugin returned no information, it may be invalid.'; -$lang['name'] = 'Name:'; -$lang['date'] = 'Date:'; -$lang['type'] = 'Type:'; -$lang['desc'] = 'Description:'; -$lang['author'] = 'Author:'; -$lang['www'] = 'Web:'; - -// error messages -$lang['error'] = 'An unknown error occurred.'; -$lang['error_download'] = 'Unable to download the plugin file: %s'; -$lang['error_badurl'] = 'Suspect bad url - unable to determine file name from the url'; -$lang['error_dircreate'] = 'Unable to create temporary folder to receive download'; -$lang['error_decompress'] = 'The plugin manager was unable to decompress the downloaded file. '. - 'This maybe as a result of a bad download, in which case you should try again; '. - 'or the compression format may be unknown, in which case you will need to '. - 'download and install the plugin manually.'; -$lang['error_copy'] = 'There was a file copy error while attempting to install files for plugin '. - '%s: the disk could be full or file access permissions may be incorrect. '. - 'This may have resulted in a partially installed plugin and leave your wiki '. - 'installation unstable.'; -$lang['error_delete'] = 'There was an error while attempting to delete plugin %s. '. - 'The most probably cause is insufficient file or directory access permissions'; - -$lang['enabled'] = 'Plugin %s enabled.'; -$lang['notenabled'] = 'Plugin %s could not be enabled, check file permissions.'; -$lang['disabled'] = 'Plugin %s disabled.'; -$lang['notdisabled'] = 'Plugin %s could not be disabled, check file permissions.'; -$lang['packageinstalled'] = 'Plugin package (%d plugin(s): %s) successfully installed.'; - -//Setup VIM: ex: et ts=4 : diff --git a/lib/plugins/plugin/lang/eo/admin_plugin.txt b/lib/plugins/plugin/lang/eo/admin_plugin.txt deleted file mode 100644 index c97dddf56..000000000 --- a/lib/plugins/plugin/lang/eo/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Administrado de Kromaĵoj ====== - -En tiu ĉi paĝo vi povas administri ĉion pri DokuWiki-aj [[doku>plugins|kromaĵoj]]. Por sukcesi elŝuti kaj instali kromaĵon, via dosierujo de kromaĵoj devas esti konservebla por la retservilo. diff --git a/lib/plugins/plugin/lang/eo/lang.php b/lib/plugins/plugin/lang/eo/lang.php deleted file mode 100644 index 624246a21..000000000 --- a/lib/plugins/plugin/lang/eo/lang.php +++ /dev/null @@ -1,60 +0,0 @@ - - * @author Felipe Castro - * @author Felipe Castro - * @author Felipo Kastro - * @author Erik Pedersen - * @author Erik Pedersen - * @author Robert BOGENSCHNEIDER - * @author Robert Bogenschneider - * @author Robert Bogenschneider - */ -$lang['menu'] = 'Administri Kromaĵojn'; -$lang['download'] = 'Elŝuti kaj instali novan kromaĵon'; -$lang['manage'] = 'Instalitaj kromaĵoj'; -$lang['btn_info'] = 'Info'; -$lang['btn_update'] = 'Ĝisdatigo'; -$lang['btn_delete'] = 'Forigi'; -$lang['btn_settings'] = 'agordoj'; -$lang['btn_download'] = 'Elŝuti'; -$lang['btn_enable'] = 'Konservi'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instalite:'; -$lang['lastupdate'] = 'Laste ĝisdatigite:'; -$lang['source'] = 'Fonto:'; -$lang['unknown'] = 'nekonate'; -$lang['updating'] = 'Ĝisdatiganta ...'; -$lang['updated'] = 'Kromaĵo %s estas sukcese ĝisdatigita'; -$lang['updates'] = 'Jenaj kromaĵoj estas sukcese ĝisdatigitaj'; -$lang['update_none'] = 'Neniu ĝisdatigo troviĝas.'; -$lang['deleting'] = 'Foriganta ...'; -$lang['deleted'] = 'Kromaĵo %s estas forigita.'; -$lang['downloading'] = 'Elŝutanta ...'; -$lang['downloaded'] = 'La kromaĵo %s estas sukcese instalita'; -$lang['downloads'] = 'Jenaj kromaĵoj estas sukcese instalitaj:'; -$lang['download_none'] = 'Neniu kromaĵo troveblas, aŭ eble okazis nekonata problemo dum elŝuto kaj instalo.'; -$lang['plugin'] = 'Kromaĵo:'; -$lang['components'] = 'Komponantoj'; -$lang['noinfo'] = 'Tiu ĉi kromaĵo liveris neniun informon: eble ĝi ne validas.'; -$lang['name'] = 'Nomo:'; -$lang['date'] = 'Dato:'; -$lang['type'] = 'Tipo:'; -$lang['desc'] = 'Priskribo:'; -$lang['author'] = 'Aŭtoro:'; -$lang['www'] = 'Retpaĝo:'; -$lang['error'] = 'Nekonata eraro okazis.'; -$lang['error_download'] = 'Maleblas elŝuti la kromaĵan dosieron: %s'; -$lang['error_badurl'] = 'Suspektinda malbona URL - maleblas difini la dosieran nomon el la URL'; -$lang['error_dircreate'] = 'Maleblas krei provizoran dosierujon por ricevi elŝutaĵon'; -$lang['error_decompress'] = 'La administrilo de kromaĵoj ne kapablis malkompakti la elŝutitan dosieron. Tio povas esti pro malkompleta elŝuto, tiaokaze provu refoje; aŭ eble la kompakta formato ne estas konata, tiaokaze elŝutu kaj instalu la kromaĵon permane.'; -$lang['error_copy'] = 'Okazis eraro de dosierkopio dum provo instali dosierojn por la kromaĵo %s&: la disko povus esti plenplena aŭ aliro-rajtoj povus esti misdifinitaj. Tio povus rezulti en malkomplete instalita kromaĵo kaj igi vian vikion malstabila.'; -$lang['error_delete'] = 'Okazis eraro dum provo forigi la kromaĵon %s. Verŝajne tio sekvas de nesufiĉa rajto por aliri la dosieron aŭ ties ujon.'; -$lang['enabled'] = 'La kromaĵo %s estas ebligita.'; -$lang['notenabled'] = 'La kromaĵo %s ne povis esti ebligita, kontrolu dosier-permesojn.'; -$lang['disabled'] = 'La kromaĵo %s estas malebligita.'; -$lang['notdisabled'] = 'La kromaĵo %s ne povis esti malebligita, kontrolu dosier-permesojn.'; -$lang['packageinstalled'] = 'Kromaĵa pakaĵo (%d kromaĵo(j): %s) sukcese instalita.'; diff --git a/lib/plugins/plugin/lang/es/admin_plugin.txt b/lib/plugins/plugin/lang/es/admin_plugin.txt deleted file mode 100644 index 973789f03..000000000 --- a/lib/plugins/plugin/lang/es/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Administración de Plugin (agregados) ====== - -En esta página tu puedes administrar todo lo que tenga que ver con los [[doku>plugins|plugins]] de Dokuwiki. Para poder descargar e instalar un plugin el usuario correspondiente al servidor de web debe poder escribir en el directorio de plugins. diff --git a/lib/plugins/plugin/lang/es/lang.php b/lib/plugins/plugin/lang/es/lang.php deleted file mode 100644 index 0ec39285b..000000000 --- a/lib/plugins/plugin/lang/es/lang.php +++ /dev/null @@ -1,72 +0,0 @@ - - * @author Oscar M. Lage - * @author Gabriel Castillo - * @author oliver@samera.com.py - * @author Enrico Nicoletto - * @author Manuel Meco - * @author VictorCastelan - * @author Jordan Mero hack.jord@gmail.com - * @author Felipe Martinez - * @author Javier Aranda - * @author Zerial - * @author Marvin Ortega - * @author Daniel Castro Alvarado - * @author Fernando J. Gómez - * @author Victor Castelan - * @author Mauro Javier Giamberardino - * @author emezeta - * @author Oscar Ciudad - * @author Ruben Figols - * @author Gerardo Zamudio - * @author Mercè López mercelz@gmail.com - */ -$lang['menu'] = 'Administración de Plugins'; -$lang['download'] = 'Descargar e instalar un nuevo plugin'; -$lang['manage'] = 'Plugins instalados'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'actualizar'; -$lang['btn_delete'] = 'borrar'; -$lang['btn_settings'] = 'configuraciones'; -$lang['btn_download'] = 'Descargar'; -$lang['btn_enable'] = 'Guardar'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instalado:'; -$lang['lastupdate'] = 'Última actualización:'; -$lang['source'] = 'Origen:'; -$lang['unknown'] = 'desconocido'; -$lang['updating'] = 'Actualizando ...'; -$lang['updated'] = 'El plugin %s ha sido actualizado con éxito'; -$lang['updates'] = 'Los siguientes plugins han sido actualizados con éxito'; -$lang['update_none'] = 'No se encontraron actualizaciones.'; -$lang['deleting'] = 'Eliminando ...'; -$lang['deleted'] = 'El plugin %s ha sido eliminado.'; -$lang['downloading'] = 'Descargando ...'; -$lang['downloaded'] = 'El plugin %s ha sido instalado con éxito'; -$lang['downloads'] = 'Los siguientes plugins han sido instalados con éxito:'; -$lang['download_none'] = 'No se han encontrado plugins, o hubo algún problema durante la descarga o la instalación.'; -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Componentes'; -$lang['noinfo'] = 'Este plugin no devolvió información, puede ser inválido.'; -$lang['name'] = 'Nombre:'; -$lang['date'] = 'Fecha:'; -$lang['type'] = 'Tipo:'; -$lang['desc'] = 'Descripción:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Ha ocurrido un error desconocido.'; -$lang['error_download'] = 'Incapaz de descargar el archivo del plugin: %s'; -$lang['error_badurl'] = 'Se sospecha que la URL es incorrecta - incapaz de determinar el nombre del archivo a partir de la URL.'; -$lang['error_dircreate'] = 'Incapaz de crear el directorio temporal para la descarga'; -$lang['error_decompress'] = 'El administrador de plugins fue incapaz de descomprimir el fichero descargado. Esto puede ser por una descarga errónea, en cuyo caso debieras intentar nuevamente; o el formato de compresión es desconocido, en este caso deberás descargar e instalar el plugin manualmente.'; -$lang['error_copy'] = 'Hubo un error al copiar el fichero mientras se intentaban instalar ficheros para el plugin %s: el disco puede estar lleno o los permisos del fichero pueden ser incorrectos. Esto puede haber terminado con una instalación parcial del plugin y haber dejado la instalación del wiki en una situación inestable'; -$lang['error_delete'] = 'Hubo un error al intentar eliminar el plugin %s. 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 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/et/lang.php b/lib/plugins/plugin/lang/et/lang.php deleted file mode 100644 index 088acf39b..000000000 --- a/lib/plugins/plugin/lang/et/lang.php +++ /dev/null @@ -1,32 +0,0 @@ - - */ -$lang['manage'] = 'Paigaldatud pluginad'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'uuenda'; -$lang['btn_delete'] = 'kustuta'; -$lang['btn_settings'] = 'seaded'; -$lang['btn_download'] = 'Lae alla'; -$lang['btn_enable'] = 'Salvesta'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Paigaldatud:'; -$lang['lastupdate'] = 'Viimati uuendatud:'; -$lang['source'] = 'Allikas:'; -$lang['unknown'] = 'tundmatu'; -$lang['updating'] = 'Uuendamine ...'; -$lang['update_none'] = 'Uuendusi ei leitud.'; -$lang['deleting'] = 'Kustutamine ...'; -$lang['deleted'] = 'Plugin %s on kustutatud.'; -$lang['downloading'] = 'Allalaadimine ...'; -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Komponendid'; -$lang['name'] = 'Nimi:'; -$lang['date'] = 'Kuupäev'; -$lang['type'] = 'Tüüp:'; -$lang['desc'] = 'Kirjeldus:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Veeb:'; diff --git a/lib/plugins/plugin/lang/eu/admin_plugin.txt b/lib/plugins/plugin/lang/eu/admin_plugin.txt deleted file mode 100644 index 367cf37ee..000000000 --- a/lib/plugins/plugin/lang/eu/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Plugin Kudeaketa ====== - -Orri honetan Dokuwiki [[doku>plugins|plugin-ekin]] erlazionatutako edozer kudeatu dezakezu. Plugin-en bat deskargatu eta instalatu ahal izateko, plugin-en direktorioak web zerbitzariarengatik idazgarria izan behar du. diff --git a/lib/plugins/plugin/lang/eu/lang.php b/lib/plugins/plugin/lang/eu/lang.php deleted file mode 100644 index 2fc07fef9..000000000 --- a/lib/plugins/plugin/lang/eu/lang.php +++ /dev/null @@ -1,52 +0,0 @@ - - * @author Zigor Astarbe - */ -$lang['menu'] = 'Plugin-ak Kudeatu'; -$lang['download'] = 'Plugin berri bat deskargatu eta instalatu'; -$lang['manage'] = 'Instalatutako Plugin-ak'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'eguneratu'; -$lang['btn_delete'] = 'ezabatu'; -$lang['btn_settings'] = 'ezarpenak'; -$lang['btn_download'] = 'Deskargatu'; -$lang['btn_enable'] = 'Gorde'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instalatua:'; -$lang['lastupdate'] = 'Azken aldiz eguneratua:'; -$lang['source'] = 'Iturria:'; -$lang['unknown'] = 'ezezaguna'; -$lang['updating'] = 'Eguneratzen ...'; -$lang['updated'] = 'Arrakastaz eguneratu da %s plugin-a'; -$lang['updates'] = 'Ondorengo plugin-ak ondo eguneratu dira'; -$lang['update_none'] = 'Ez da eguneraketarik aurkitu.'; -$lang['deleting'] = 'Ezabatzen ...'; -$lang['deleted'] = '%s plugin-a ezabatua.'; -$lang['downloading'] = 'Deskargatzen ...'; -$lang['downloaded'] = '%s Plugin-a arrakastaz instalatua'; -$lang['downloads'] = 'Ondorengo plugin-ak arrakastaz instalatu dira:'; -$lang['download_none'] = 'Ez da plugin-ik aurkitu, edo arazo ezezagunen bat egon da deskargatu eta instalatzerako garaian.'; -$lang['plugin'] = 'Plugin-a:'; -$lang['components'] = 'Osagaiak'; -$lang['noinfo'] = 'Plugin honek ez du informaziorik itzuli, agian ez da erabilgarria.'; -$lang['name'] = 'izena:'; -$lang['date'] = 'Data:'; -$lang['type'] = 'Mota:'; -$lang['desc'] = 'Deskribapena:'; -$lang['author'] = 'Egilea:'; -$lang['www'] = 'Web-gunea:'; -$lang['error'] = 'Akats ezezagun bat gertatu da.'; -$lang['error_download'] = 'Ezin izan da plugin-aren honako fitxategia deskargatu: %s'; -$lang['error_badurl'] = 'Ustezko url okerra - ezin izan da fitxategi izena url-tik zehaztu'; -$lang['error_dircreate'] = 'Ezin izan da aldiroko karpeta sortu deskarga jasotzeko'; -$lang['error_decompress'] = 'Plugin kudeatzaileak ezin izan du deskargatutako fitxategia erauzi. Deskarga oker baten ondorioa izan daiteke, eta hala bada berriz saiatu beharko zenuke; edo agian trinkotze formatua ezezaguna da, hala izanik plugin-a eskuz deskargatu eta instalatu beharko zenuelarik.'; -$lang['error_copy'] = 'Fitxategi kopia akats bat egon da %s plugin-arentzat fitxategiak instalatzen saiatzean: diska betea egon liteke edo fitxategi atzipen baimena okerra izan daiteke. Honek partzialki instalatutako plugin bat eta wiki instalazioa ezegonkor utzi dezake.'; -$lang['error_delete'] = 'Akats bat gertatu da %s plugin-a ezabatzeko saiakera egitean. Arrazoia ziurrenik fitxategi edo direktorio atzipen baimen nahikoak ez izatea da.'; -$lang['enabled'] = '%s Plugin-a gaitua.'; -$lang['notenabled'] = '%s Plugin-a ezin izan da gaitu, egiaztatu fitxategi baimenak.'; -$lang['disabled'] = '%s Plugin-a ezgaitua.'; -$lang['notdisabled'] = '%s Plugin-a ezin izan da ezgaitu, egiaztatu fitxategi baimenak. '; -$lang['packageinstalled'] = 'Plugin paketea (%d plugin(s): %s) arrakastaz instalatua izan da.'; diff --git a/lib/plugins/plugin/lang/fa/admin_plugin.txt b/lib/plugins/plugin/lang/fa/admin_plugin.txt deleted file mode 100644 index cd11fb460..000000000 --- a/lib/plugins/plugin/lang/fa/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== مدیریت افزونه‌ها ====== - -در این صفحه شما می‌توانید [[doku>plugins|افزونه‌های]] Dokuwiki را مدیریت کنید. برای امکان دریافت و نصب افزونه‌ها، باید به شاخه‌ی افزونه‌ها (lib/plugin) دسترسی نوشتن برای وب‌سرور را محیا کنید. \ No newline at end of file diff --git a/lib/plugins/plugin/lang/fa/lang.php b/lib/plugins/plugin/lang/fa/lang.php deleted file mode 100644 index 0a8fadb3c..000000000 --- a/lib/plugins/plugin/lang/fa/lang.php +++ /dev/null @@ -1,58 +0,0 @@ - - * @author omidmr@gmail.com - * @author Omid Mottaghi - * @author Mohammad Reza Shoaei - * @author Milad DZand - * @author AmirH Hassaneini - */ -$lang['menu'] = 'مدیریت افزونه‌ها'; -$lang['download'] = 'دریافت و نصب افزونه'; -$lang['manage'] = 'افزونه‌های نصب شده'; -$lang['btn_info'] = 'مشخصات'; -$lang['btn_update'] = 'بروزرسانی'; -$lang['btn_delete'] = 'حذف'; -$lang['btn_settings'] = 'تنظیمات'; -$lang['btn_download'] = 'دانلود'; -$lang['btn_enable'] = 'ذخیره'; -$lang['url'] = 'آدرس'; -$lang['installed'] = 'نصب شده:'; -$lang['lastupdate'] = 'آخرین بروزرسانی:'; -$lang['source'] = 'منبع:'; -$lang['unknown'] = 'ناشناس'; -$lang['updating'] = 'در حال به روز رسانی...'; -$lang['updated'] = 'افزونه‌ی %s با موفقیت به روز رسانی شد'; -$lang['updates'] = 'افزونه‌های زیر با موفقیت به روز رسانی شده است.'; -$lang['update_none'] = 'به روز رسانی‌ای یافت نشد .'; -$lang['deleting'] = 'در حال حذف...'; -$lang['deleted'] = 'افزونه‌ی %s پاک شد.'; -$lang['downloading'] = 'در حال دریافت...'; -$lang['downloaded'] = 'افزونه‌ی %s با موفقیت نصب شد'; -$lang['downloads'] = 'افزونه‌های زیر با موفقیت نصب شدند:'; -$lang['download_none'] = 'هیچ افزونه‌ای یافت نشد، یا یک مشکل ناشناخته در زمان دریافت و نصب پیش آمده است.'; -$lang['plugin'] = 'افزونه:'; -$lang['components'] = 'کامپوننت'; -$lang['noinfo'] = 'این افزونه هیچ اطلاعاتی را برنگردانده است، ممکن است بی‌اعتبار باشد.'; -$lang['name'] = 'اسم:'; -$lang['date'] = 'تاریخ:'; -$lang['type'] = 'نوع:'; -$lang['desc'] = 'توضیحات:'; -$lang['author'] = 'نویسنده:'; -$lang['www'] = 'وب‌سایت:'; -$lang['error'] = 'یک مشکل ناشناخته پیش آمده.'; -$lang['error_download'] = 'توانایی دریافت افزونه‌ی %s نمی‌باشد.'; -$lang['error_badurl'] = 'آدرس مشکل دارد - توانایی تشخیص نام فایل از آدرس وجود ندارد'; -$lang['error_dircreate'] = 'امکان ایجاد شاخه‌ی موقتی برای دریافت فایل نیست.'; -$lang['error_decompress'] = 'باز کردن فایل با مشکل مواجه شد. این اشکال ممکن است به خاطر دریافت ناقصِ فایل باشد که باید دوباره تلاش کنید، یا فرمت فشرده‌سازی شناخته شده نیست، که باید این افزونه رو دستی نصب کنید.'; -$lang['error_copy'] = 'توانایی کپی کردن فایل‌های افزونه‌ی %s در زمان نصب وجود ندارد. ممکن است دسترسی شاخه‌ی افزونه‌ها مشکل داشته باشد. این مشکل ممکن است باعث نصب ناقص افزونه شود و ویکی را با مشکل مواجه کند.'; -$lang['error_delete'] = 'توانایی حذف افزونه‌ی %s وجود ندارد. این مشکل به خاطر دسترسی فایل یا شاخه‌ی افزونه پیش می‌آید.'; -$lang['enabled'] = 'افزونه‌ی %s فعال شد.'; -$lang['notenabled'] = 'افزونه‌ی %s قابلیت فعال کردن ندارد، دسترسی‌ها را چک کنید.'; -$lang['disabled'] = 'افزونه‌ی %s غیرفعال شد.'; -$lang['notdisabled'] = 'افزونه‌ی %s قابلیت غیرفعال کردن ندارد، دسترسی‌ها را چک کنید.'; -$lang['packageinstalled'] = 'بسته افزونه (%d افزونه: %s) به درستی نصب شد.'; diff --git a/lib/plugins/plugin/lang/fi/admin_plugin.txt b/lib/plugins/plugin/lang/fi/admin_plugin.txt deleted file mode 100644 index 9cdfa1c11..000000000 --- a/lib/plugins/plugin/lang/fi/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Liitännäisten hallinta ====== - -Tällä sivulla voit hallita DokuWikin [[doku>plugins|liitännäisiä]]. Voidaksesi ladata ja asentaa liitännäisiä pitää web-palvelimella olla kirjoitusoikeudet plugin hakemistoon. diff --git a/lib/plugins/plugin/lang/fi/lang.php b/lib/plugins/plugin/lang/fi/lang.php deleted file mode 100644 index f51746faa..000000000 --- a/lib/plugins/plugin/lang/fi/lang.php +++ /dev/null @@ -1,55 +0,0 @@ - - * @author Teemu Mattila - * @author Sami Olmari - */ -$lang['menu'] = 'Ylläpidä liitännäisiä'; -$lang['download'] = 'Lataa ja asenna uusi liitännäinen'; -$lang['manage'] = 'Asennetut liitännäiset'; -$lang['btn_info'] = 'tietoa'; -$lang['btn_update'] = 'päivitä'; -$lang['btn_delete'] = 'poista'; -$lang['btn_settings'] = 'asetukset'; -$lang['btn_download'] = 'Lataa'; -$lang['btn_enable'] = 'Tallenna'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Asennettu:'; -$lang['lastupdate'] = 'Päivitetty viimeksi:'; -$lang['source'] = 'Lähde:'; -$lang['unknown'] = 'tuntematon'; -$lang['updating'] = 'Päivitetään ...'; -$lang['updated'] = 'Liitännäinen %s päivitetty onnistuneesti'; -$lang['updates'] = 'Seuraavat liitännäiset on päivitetty onnistuneesti'; -$lang['update_none'] = 'Päivityksiä ei löytynyt'; -$lang['deleting'] = 'Poistetaan ...'; -$lang['deleted'] = 'Liitännäinen %s poistettu.'; -$lang['downloading'] = 'Ladataan ...'; -$lang['downloaded'] = 'Liitännäinen %s asennettu onnistuneesti'; -$lang['downloads'] = 'Seuraavat liitännäiset on asennettu onnistuneesti'; -$lang['download_none'] = 'Liitännäisiä ei löytynyt tai on tapahtunut joku tuntematon virhe latauksen ja asennuksen aikana.'; -$lang['plugin'] = 'Liitännäinen:'; -$lang['components'] = 'Osa'; -$lang['noinfo'] = 'Liitännäinen ei palauttanut mitään tietoa ja se voi olla epäkelpo.'; -$lang['name'] = 'Nimi:'; -$lang['date'] = 'Päiväys:'; -$lang['type'] = 'Tyyppi:'; -$lang['desc'] = 'Kuvaus:'; -$lang['author'] = 'Tekijä:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Tapahtui tuntematon virhe.'; -$lang['error_download'] = 'Liitännäistiedoston %s latauksessa tapahtui tuntematon virhe.'; -$lang['error_badurl'] = 'URL vaikuttaa olleen virheellinen. Siitä ei pystytty päättelemään tiedoston nimeä'; -$lang['error_dircreate'] = 'Ei pystytty luomaan väliaikaista hakemistoa latausta varten'; -$lang['error_decompress'] = 'Liitännäishallinta ei pystynyt purkamaan ladattua tiedostoa. Lataus voi olla epäonnistunut. Siinä tapauksessa voit yrittää uudestaan. Pakkaustapa voi myös olla tuntematon. Siinä tapauksessa sinun pitää ladata ja asentaa liitännäinen käsin.'; -$lang['error_copy'] = 'Tiedoston kopioinnissa tapahtui liitännäisen %s asennuksen aikana virhe. Levy voi olla täynnä tai kansioiden oikeudet voivat olla väärin. Liitännäinen voi olla osittain asennettu ja tämä voi jättää wikiasennukseesi epävakaaseen tilaan.'; -$lang['error_delete'] = 'Liitännäisen %s poistossa tapahtui virhe. Todennäköisin syy on puutteelliset tiedoston tai hakemiston oikeudet'; -$lang['enabled'] = 'Liitännäinen %s käytössä'; -$lang['notenabled'] = 'Liitännäistä %s ei voitu ottaa käyttöön. Tarkista tiedostojen oikeudet.'; -$lang['disabled'] = 'Liitännäinen %s pois käytössä'; -$lang['notdisabled'] = 'Liitännäistä %s ei voitu ottaa pois käytöstä. Tarkista tiedostojen oikeudet.'; -$lang['packageinstalled'] = 'Pluginpaketti (%d plugin: %s:) asennettu onnistuneesti.'; diff --git a/lib/plugins/plugin/lang/fr/admin_plugin.txt b/lib/plugins/plugin/lang/fr/admin_plugin.txt deleted file mode 100644 index b7beba25a..000000000 --- a/lib/plugins/plugin/lang/fr/admin_plugin.txt +++ /dev/null @@ -1,4 +0,0 @@ -====== Gestion des extensions ====== - -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 deleted file mode 100644 index 0592f3c7d..000000000 --- a/lib/plugins/plugin/lang/fr/lang.php +++ /dev/null @@ -1,69 +0,0 @@ - - * @author Delassaux Julien - * @author Maurice A. LeBlanc - * @author stephane.gully@gmail.com - * @author Guillaume Turri - * @author Erik Pedersen - * @author olivier duperray - * @author Vincent Feltz - * @author Philippe Bajoit - * @author Florian Gaub - * @author Samuel Dorsaz samuel.dorsaz@novelion.net - * @author Johan Guilbaud - * @author schplurtz@laposte.net - * @author skimpax@gmail.com - * @author Yannick Aure - * @author Olivier DUVAL - * @author Anael Mobilia - * @author Bruno Veilleux - */ -$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'; -$lang['btn_settings'] = 'Paramètres'; -$lang['btn_download'] = 'Télécharger'; -$lang['btn_enable'] = 'Enregistrer'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Installé :'; -$lang['lastupdate'] = 'Dernière mise à jour :'; -$lang['source'] = 'Source :'; -$lang['unknown'] = 'inconnu'; -$lang['updating'] = 'Mise à jour…'; -$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'] = 'Extension %s supprimée.'; -$lang['downloading'] = 'Téléchargement…'; -$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'] = 'Cette extension n\'a transmis aucune information, elle pourrait être invalide.'; -$lang['name'] = 'Nom :'; -$lang['date'] = 'Date :'; -$lang['type'] = 'Type :'; -$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 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 %s : 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 %s. 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/gl/admin_plugin.txt b/lib/plugins/plugin/lang/gl/admin_plugin.txt deleted file mode 100644 index 216285a8d..000000000 --- a/lib/plugins/plugin/lang/gl/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Xestión de Extensións ====== - -Nesta páxina podes xestionar todas as accións posíbeis cos [[doku>plugins|extensións]] do DokuWiki. Para poder descargar e instalar unha extensión, o teu cartafol de extensións debe ser escribíbel polo servidor web. diff --git a/lib/plugins/plugin/lang/gl/lang.php b/lib/plugins/plugin/lang/gl/lang.php deleted file mode 100644 index b3da44096..000000000 --- a/lib/plugins/plugin/lang/gl/lang.php +++ /dev/null @@ -1,53 +0,0 @@ - - * @author Oscar M. Lage - * @author Rodrigo Rega - */ -$lang['menu'] = 'Xestionar Extensións'; -$lang['download'] = 'Descargar e instalar unha nova extensión'; -$lang['manage'] = 'Extensións Instalados'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'actualización'; -$lang['btn_delete'] = 'eliminar'; -$lang['btn_settings'] = 'configuración'; -$lang['btn_download'] = 'Descargar'; -$lang['btn_enable'] = 'Gardar'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instalado:'; -$lang['lastupdate'] = 'Última actualización:'; -$lang['source'] = 'Fonte:'; -$lang['unknown'] = 'descoñecido'; -$lang['updating'] = 'Actualizando...'; -$lang['updated'] = 'Actualizouse correctamente a extensión %s'; -$lang['updates'] = 'Actualizáronse correctamente as seguintes extensións'; -$lang['update_none'] = 'Non se atoparon actualizacións.'; -$lang['deleting'] = 'Eliminando...'; -$lang['deleted'] = 'Eliminado a extensión %s.'; -$lang['downloading'] = 'Descargando...'; -$lang['downloaded'] = 'Instalouse correctamente a extensión %s'; -$lang['downloads'] = 'Instaláronse correctamente as seguintes extensións:'; -$lang['download_none'] = 'Non se atoparon extensións, ou aconteceu un problema descoñecido durante a descarga e instalación.'; -$lang['plugin'] = 'Extensión:'; -$lang['components'] = 'Compoñentes'; -$lang['noinfo'] = 'Esta extensión non devolveu información ningunha. Pode que non sexa válida.'; -$lang['name'] = 'Nome:'; -$lang['date'] = 'Data:'; -$lang['type'] = 'Tipo:'; -$lang['desc'] = 'Descrición:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Houbo un erro descoñecido.'; -$lang['error_download'] = 'Non se puido descargar o arquivo de extensión: %s'; -$lang['error_badurl'] = 'URL posiblemente incorrecto - non se puido determinar o nome do arquivo mediante o URL'; -$lang['error_dircreate'] = 'Non se puido crear un cartafol temporal para recibir a descarga'; -$lang['error_decompress'] = 'O xestor de extensións non foi quen de descomprimir o arquivo descargado. Isto podería ser causado por unha descarga corrupta, polo que, en tal caso, podes tentalo de novo; ou pode que o formato de compresión sexa descoñecido, co que precisarás descargar e instalar a extensión de xeito manual.'; -$lang['error_copy'] = 'Houbo un erro de copia de arquivo ao tentar instalar a extensión %s: pode que o disco estea cheo ou que os permisos de acceso sexan incorrectos. Isto podería dar lugar a unha instalación parcial da extensión e facer que a túa instalación do wiki se volva inestable.'; -$lang['error_delete'] = 'Houbo un erro ao tentar eliminar a extensión %s. O máis probable é que sexa causado por permisos de acceso ao arquivo ou directorio insuficientes.'; -$lang['enabled'] = 'Extensión %s activado.'; -$lang['notenabled'] = 'A extensión %s non puido ser activada, comproba os permisos de arquivo.'; -$lang['disabled'] = 'Extensión %s desactivada.'; -$lang['notdisabled'] = 'A extensión %s non puido ser desactivada, comproba os permisos de arquivo.'; -$lang['packageinstalled'] = 'Paquete de extensión (%d plugin(s): %s) instalado axeitadamente.'; diff --git a/lib/plugins/plugin/lang/he/admin_plugin.txt b/lib/plugins/plugin/lang/he/admin_plugin.txt deleted file mode 100644 index 206d368db..000000000 --- a/lib/plugins/plugin/lang/he/admin_plugin.txt +++ /dev/null @@ -1,5 +0,0 @@ -====== ניהול הרחבות ====== - -בדף זה ניתן לנהל כל דבר הקשור ל[[doku>plugins|הרחבות]] של DokuWiki. כדי שניתן יהיה להוריד ולהתקין הרחבה על תיקית ה-plugins שלך להיות ברת כתיבה על ידי שרת הרשת. - - diff --git a/lib/plugins/plugin/lang/he/lang.php b/lib/plugins/plugin/lang/he/lang.php deleted file mode 100644 index 7753c23cf..000000000 --- a/lib/plugins/plugin/lang/he/lang.php +++ /dev/null @@ -1,55 +0,0 @@ - - * @author Dotan Kamber - * @author Moshe Kaplan - * @author Yaron Yogev - * @author Yaron Shahrabani - */ -$lang['menu'] = 'ניהול הרחבות'; -$lang['download'] = 'הורדת והתקנת הרחבה חדשה'; -$lang['manage'] = 'הרחבות מותקנות'; -$lang['btn_info'] = 'מידע'; -$lang['btn_update'] = 'עידכון'; -$lang['btn_delete'] = 'מחיקה'; -$lang['btn_settings'] = 'הגדרות'; -$lang['btn_download'] = 'הורדה'; -$lang['btn_enable'] = 'שמירה'; -$lang['url'] = 'URL'; -$lang['installed'] = 'מותקנות:'; -$lang['lastupdate'] = 'עודכנו לאחרונה:'; -$lang['source'] = 'מקור:'; -$lang['unknown'] = 'לא ידוע'; -$lang['updating'] = 'מעדכן ...'; -$lang['updated'] = 'ההרחבה %s עודכנה בהצלחה'; -$lang['updates'] = 'ההרחבות הבאות עודכנו בהצלחה'; -$lang['update_none'] = 'לא נמצאו עידכונים.'; -$lang['deleting'] = 'מוחק ...'; -$lang['deleted'] = 'ההרחבה %s נמחקה.'; -$lang['downloading'] = 'מוריד ...'; -$lang['downloaded'] = 'ההרחבה %s הותקנה בהצלחה'; -$lang['downloads'] = 'ההרחבות הבאות הותקנו בהצלחה:'; -$lang['download_none'] = 'לא נמצאו הרחבות או שחלה בעיה בלתי ידועה במהלך ההורדה וההתקנה.'; -$lang['plugin'] = 'הרחבה:'; -$lang['components'] = 'רכיבים'; -$lang['noinfo'] = 'הרחבה זו לא השיבה מידע, יתכן כי היא אינה בתוקף.'; -$lang['name'] = 'שם:'; -$lang['date'] = 'תאריך:'; -$lang['type'] = 'סוג:'; -$lang['desc'] = 'תיאור:'; -$lang['author'] = 'מחבר:'; -$lang['www'] = 'רשת:'; -$lang['error'] = 'שגיאה לא ידועה ארעה.'; -$lang['error_download'] = 'כשל בהורדת קובץ ההרחבה: %s'; -$lang['error_badurl'] = 'כנראה כתובת שגויה - כשל בקביעת שם הקובץ מהכתובת'; -$lang['error_dircreate'] = 'כשל ביצירת תיקיה זמנית לקבלת ההורדה'; -$lang['error_decompress'] = 'מנהל ההרחבות כשל בפרישת הקובץ שהורד. יתכן כי זו תוצאה של הורדה תקולה ובמקרה זה עליך לנסות שנית; או שיתכן כי תסדיר הכיווץ אינו ידוע, במקרה זה יהיה עליך להוריד ולהתקין את ההרחבה ידנית.'; -$lang['error_copy'] = 'חלה שגיאה בהעתקת הקובץ בניסיון להתקין קבצים להרחבה %s: ייתכן כי הדיסק מלא או שהרשאות הגישה לקבצים שגויות. יתכן כי בשל כך נוצרה התקנה חלקית של ההרחבה שתשאיר את התקנת הויקי שלך לא יציבה.'; -$lang['error_delete'] = 'חלה שגיאה בעת ניסיון למחיקת ההרחבה %s. הסיבה הסבירה ביותר היא הרשאות גישה לקבצים ולספריות שאינן מספקות'; -$lang['enabled'] = 'תוסף %s מופעל.'; -$lang['notenabled'] = 'לא ניתן להפעיל את התוסף %s, בדוק הרשאות קבצים.'; -$lang['disabled'] = 'תוסף %s מושבת.'; -$lang['notdisabled'] = 'לא ניתן להשבית את התוסף %s, בדוק הרשאות קבצים.'; diff --git a/lib/plugins/plugin/lang/hi/lang.php b/lib/plugins/plugin/lang/hi/lang.php deleted file mode 100644 index 89d27cee1..000000000 --- a/lib/plugins/plugin/lang/hi/lang.php +++ /dev/null @@ -1,12 +0,0 @@ - - * @author yndesai@gmail.com - */ -$lang['unknown'] = 'अज्ञात'; -$lang['date'] = 'दिनांक:'; -$lang['author'] = 'लेखक:'; -$lang['error'] = 'अज्ञात त्रुटि हुइ'; diff --git a/lib/plugins/plugin/lang/hr/lang.php b/lib/plugins/plugin/lang/hr/lang.php deleted file mode 100644 index 96f1d6afe..000000000 --- a/lib/plugins/plugin/lang/hr/lang.php +++ /dev/null @@ -1,8 +0,0 @@ - - * @author Dražen Odobašić - * @author Dejan Igrec dejan.igrec@gmail.com - */ diff --git a/lib/plugins/plugin/lang/hu/admin_plugin.txt b/lib/plugins/plugin/lang/hu/admin_plugin.txt deleted file mode 100644 index afa08d349..000000000 --- a/lib/plugins/plugin/lang/hu/admin_plugin.txt +++ /dev/null @@ -1,4 +0,0 @@ -====== Bővítménykezelő ====== - -Ezen az oldalon a Dokuwiki [[doku>plugins|bővítményeivel]] kapcsolatos teendőket láthatod el. A webszervernek tudni kell írnia a //plugin// könyvtárat, hogy új bővítményeket tudj ezen a felületen keresztül letölteni és telepíteni. - diff --git a/lib/plugins/plugin/lang/hu/lang.php b/lib/plugins/plugin/lang/hu/lang.php deleted file mode 100644 index b8fa2cdbe..000000000 --- a/lib/plugins/plugin/lang/hu/lang.php +++ /dev/null @@ -1,58 +0,0 @@ - - * @author Siaynoq Mage - * @author schilling.janos@gmail.com - * @author Szabó Dávid - * @author Sándor TIHANYI - * @author David Szabo - * @author Marton Sebok - */ -$lang['menu'] = 'Bővítménykezelő'; -$lang['download'] = 'Új bővítmény letöltése és telepítése'; -$lang['manage'] = 'Telepített bővítmények'; -$lang['btn_info'] = 'infó'; -$lang['btn_update'] = 'frissítés'; -$lang['btn_delete'] = 'törlés'; -$lang['btn_settings'] = 'beállítások'; -$lang['btn_download'] = 'Letöltés'; -$lang['btn_enable'] = 'Mentés'; -$lang['url'] = 'Cím'; -$lang['installed'] = 'Telepítve:'; -$lang['lastupdate'] = 'Utolsó frissítés:'; -$lang['source'] = 'Forrás:'; -$lang['unknown'] = 'ismeretlen'; -$lang['updating'] = 'Frissítés...'; -$lang['updated'] = 'A %s bővítmény frissítése sikeres'; -$lang['updates'] = 'A következő bővítmények frissítése sikeres:'; -$lang['update_none'] = 'Nem találtam újabb verziót.'; -$lang['deleting'] = 'Törlés...'; -$lang['deleted'] = 'A %s bővítményt eltávolítva.'; -$lang['downloading'] = 'Letöltés...'; -$lang['downloaded'] = 'A %s bővítmény telepítése sikeres.'; -$lang['downloads'] = 'A következő bővítmények telepítése sikeres.'; -$lang['download_none'] = 'Nem találtam bővítményt vagy ismeretlen hiba történt a letöltés/telepítés közben.'; -$lang['plugin'] = 'Bővítmény:'; -$lang['components'] = 'Részek'; -$lang['noinfo'] = 'Ez a bővítmény nem tartalmaz információt, lehet, hogy hibás.'; -$lang['name'] = 'Név:'; -$lang['date'] = 'Dátum:'; -$lang['type'] = 'Típus:'; -$lang['desc'] = 'Leírás:'; -$lang['author'] = 'Szerző:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Ismeretlen hiba lépett fel.'; -$lang['error_download'] = 'Nem tudom letölteni a fájlt a bővítményhez: %s'; -$lang['error_badurl'] = 'Feltehetően rossz URL - nem tudom meghatározni a fájlnevet az URL-ből.'; -$lang['error_dircreate'] = 'Nem tudom létrehozni az átmeneti könyvtárat a letöltéshez.'; -$lang['error_decompress'] = 'A Bővítménykezelő nem tudta a letöltött állományt kicsomagolni. Ennek oka lehet hibás letöltés, ebben az esetben újra letöltéssel próbálkozhatsz, esetleg a tömörítés módja ismeretlen, ebben az esetben kézzel kell letölteni és telepíteni a bővítményt.'; -$lang['error_copy'] = 'Fájl másolási hiba történt a(z) %s bővítmény telepítése közben: vagy a lemezterület fogyott el, vagy az állomány hozzáférési jogosultságai nem megfelelőek. Emiatt előfordulhat, hogy a bővítményt csak részben sikerült telepíteni és a wiki összeomolhat.'; -$lang['error_delete'] = 'Hiba történt a(z) %s bővítmény eltávolítása közben. A legvalószínűbb ok, hogy a könyvtár vagy állomány hozzáférési jogosultságai nem megfelelőek.'; -$lang['enabled'] = 'A(z) %s bővítmény bekapcsolva.'; -$lang['notenabled'] = 'A(z) %s bővítmény engedélyezése nem sikerült. Ellenőrizze a fájlhozzáférési jogosultságokat.'; -$lang['disabled'] = 'A(z) %s bővítmény kikapcsolva.'; -$lang['notdisabled'] = 'A(z) %s bővítmény kikapcsolása nem sikerült. Ellenőrizze a fájlhozzáférési jogosultságokat.'; -$lang['packageinstalled'] = 'A bővítménycsomag(ok) feltelepült(ek): %d plugin(s): %s'; diff --git a/lib/plugins/plugin/lang/ia/admin_plugin.txt b/lib/plugins/plugin/lang/ia/admin_plugin.txt deleted file mode 100644 index c7f758c16..000000000 --- a/lib/plugins/plugin/lang/ia/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Gestion de plug-ins ====== - -In iste pagina tu pote gerer omne cosas con relation al [[doku>plugins|plug-ins]] de DokuWiki. Pro poter discargar e installar un plug-in, le directorio de plug-ins debe permitter le accesso de scriptura al servitor web. \ No newline at end of file diff --git a/lib/plugins/plugin/lang/ia/lang.php b/lib/plugins/plugin/lang/ia/lang.php deleted file mode 100644 index 523f8581d..000000000 --- a/lib/plugins/plugin/lang/ia/lang.php +++ /dev/null @@ -1,51 +0,0 @@ - - * @author Martijn Dekker - */ -$lang['menu'] = 'Gestion de plug-ins'; -$lang['download'] = 'Discargar e installar un nove plug-in'; -$lang['manage'] = 'Plug-ins installate'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'actualisar'; -$lang['btn_delete'] = 'deler'; -$lang['btn_settings'] = 'configurationes'; -$lang['btn_download'] = 'Discargar'; -$lang['btn_enable'] = 'Salveguardar'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Installate:'; -$lang['lastupdate'] = 'Ultime actualisation:'; -$lang['source'] = 'Origine:'; -$lang['unknown'] = 'incognite'; -$lang['updating'] = 'Actualisation…'; -$lang['updated'] = 'Actualisation del plug-in %s succedite'; -$lang['updates'] = 'Le sequente plug-ins ha essite actualisate con successo'; -$lang['update_none'] = 'Nulle actualisation trovate.'; -$lang['deleting'] = 'Deletion…'; -$lang['deleted'] = 'Le plug-in %s ha essite delite.'; -$lang['downloading'] = 'Discargamento…'; -$lang['downloaded'] = 'Installation del plug-in %s succedite.'; -$lang['downloads'] = 'Le sequente plug-ins ha essite installate con successo:'; -$lang['download_none'] = 'Nulle plug-in trovate, o il ha occurrite un problema incognite durante le discargamento e installation.'; -$lang['plugin'] = 'Plug-in:'; -$lang['components'] = 'Componentes'; -$lang['noinfo'] = 'Iste plug-in retornava nulle information; illo pote esser invalide.'; -$lang['name'] = 'Nomine:'; -$lang['date'] = 'Data:'; -$lang['type'] = 'Typo:'; -$lang['desc'] = 'Description:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Un error incognite ha occurrite.'; -$lang['error_download'] = 'Impossibile discargar le file del plug-in: %s'; -$lang['error_badurl'] = 'URL probabilemente invalide; impossibile determinar le nomine del file ex le URL'; -$lang['error_dircreate'] = 'Impossibile crear le dossier temporari pro reciper le discargamento'; -$lang['error_decompress'] = 'Le gestor de plug-ins non poteva decomprimer le file discargate. Isto pote esser le resultato de un discargamento defectuose, in le qual caso tu deberea probar lo de novo; o le formato de compression pote esser incognite, in le qual caso tu debe discargar e installar le plug-in manualmente.'; -$lang['error_copy'] = 'Il occurreva un error durante le tentativa de installar files pro le plugin %s: le disco pote esser plen o le permissiones de accesso a files pote esser incorrecte. Isto pote haber resultate in un plug-in partialmente installate e lassar tu installation del wiki instabile.'; -$lang['error_delete'] = 'Il occurreva un error durante le tentativa de deler le plug-in %s. Le causa le plus probabile es insufficiente permissiones de files o directorios.'; -$lang['enabled'] = 'Plug-in %s activate.'; -$lang['notenabled'] = 'Le plug-in %s non poteva esser activate; verifica le permissiones de accesso a files.'; -$lang['disabled'] = 'Plug-in %s disactivate.'; -$lang['notdisabled'] = 'Le plug-in %s non poteva esser disactivate; verifica le permissiones de accesso a files.'; diff --git a/lib/plugins/plugin/lang/id-ni/lang.php b/lib/plugins/plugin/lang/id-ni/lang.php deleted file mode 100644 index d367340b7..000000000 --- a/lib/plugins/plugin/lang/id-ni/lang.php +++ /dev/null @@ -1,7 +0,0 @@ - - * @author Yustinus Waruwu - */ diff --git a/lib/plugins/plugin/lang/id/lang.php b/lib/plugins/plugin/lang/id/lang.php deleted file mode 100644 index 2653b075e..000000000 --- a/lib/plugins/plugin/lang/id/lang.php +++ /dev/null @@ -1,32 +0,0 @@ - - * @author Yustinus Waruwu - */ -$lang['btn_info'] = 'Info'; -$lang['btn_update'] = 'Baharui'; -$lang['btn_delete'] = 'Hapus'; -$lang['btn_settings'] = 'Pengaturan'; -$lang['btn_download'] = 'Unduh'; -$lang['btn_enable'] = 'Simpan'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instal'; -$lang['lastupdate'] = 'Pembaharuan terakhir:'; -$lang['source'] = 'Sumber:'; -$lang['unknown'] = 'Tidak kenal'; -$lang['updating'] = 'Terbaharui ...'; -$lang['update_none'] = 'Tidak ditemukan pembaharuan'; -$lang['deleting'] = 'Terhapus ...'; -$lang['deleted'] = 'Hapus Plugin %s.'; -$lang['downloading'] = 'Unduh ...'; -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Komponen'; -$lang['name'] = 'Nama:'; -$lang['date'] = 'Tanggal:'; -$lang['type'] = 'Tipe:'; -$lang['desc'] = 'Penjelasan:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Web:'; diff --git a/lib/plugins/plugin/lang/is/lang.php b/lib/plugins/plugin/lang/is/lang.php deleted file mode 100644 index 0ef1243ef..000000000 --- a/lib/plugins/plugin/lang/is/lang.php +++ /dev/null @@ -1,47 +0,0 @@ - - * @author Ólafur Gunnlaugsson - * @author Erik Bjørn Pedersen - */ -$lang['menu'] = 'Umsýsla viðbóta'; -$lang['download'] = 'Hlaða niður og innsetja viðbót'; -$lang['manage'] = 'Uppsettar viðbætur'; -$lang['btn_info'] = 'upplýsingar'; -$lang['btn_update'] = 'uppfæra'; -$lang['btn_delete'] = 'eyða'; -$lang['btn_settings'] = 'stillingar'; -$lang['btn_download'] = 'Niðurhal'; -$lang['btn_enable'] = 'Vista'; -$lang['url'] = 'Veffang'; -$lang['installed'] = 'Innsett:'; -$lang['lastupdate'] = 'Síðast uppfærð:'; -$lang['source'] = 'Gjafi:'; -$lang['unknown'] = 'óþekkt'; -$lang['updating'] = 'Uppfæri viðbót'; -$lang['updated'] = '%s viðbótin hefur verið uppfærð'; -$lang['updates'] = 'Eftirfarandi viðbætur hafa verið uppfærðar'; -$lang['update_none'] = 'Engar uppfærslur fundust.'; -$lang['deleting'] = 'Eyði viðbót'; -$lang['deleted'] = 'Viðbót %s eytt'; -$lang['downloading'] = 'Hleð viðbót niður ...'; -$lang['downloaded'] = 'Viðbót %s hlóðst inn'; -$lang['downloads'] = 'Eftirfarandi viðbótum hefur verið hlaðið inn:'; -$lang['download_none'] = 'Engin viðbót finnst, hugsanlega hefur komið upp villa við niðurhal eða uppsetningu.'; -$lang['plugin'] = 'Viðbót:'; -$lang['components'] = 'Einingar'; -$lang['noinfo'] = 'Þessi viðbót skilaði ekki upplýsingum og er hugsanlega ónýt.'; -$lang['name'] = 'Nafn:'; -$lang['date'] = 'Dagsetning:'; -$lang['type'] = 'Tegund:'; -$lang['desc'] = 'Lýsing:'; -$lang['author'] = 'Höfundur:'; -$lang['www'] = 'Vefur:'; -$lang['error'] = 'Óskilgreind villa'; -$lang['error_download'] = 'Niðurhal viðbótar %s mistókst'; -$lang['error_decompress'] = 'Viðbótastjórinn gat ekki afþjappað skránna. Þetta gæti verið vegna misheppnaðs niðurhals, ef svo er reyndu niðurhal aftur. Það er einnig mögulegt að skráin sé þjöppuð með aðferð sem að er Dokuwiki óþekkt, í því tilfelli er best að vista viðhengið á tölvunni þinni, afþjappa hana þar og svo hlaða skránum upp handvirkt.'; -$lang['enabled'] = 'Viðbót %s hefur verið ræst.'; -$lang['notenabled'] = 'Ekki var hægt að ræsa %s viðbótina. Athugaðu stillingar á skráaleyfum.'; -$lang['disabled'] = 'Viðbót %s var gerð óvirk'; diff --git a/lib/plugins/plugin/lang/it/admin_plugin.txt b/lib/plugins/plugin/lang/it/admin_plugin.txt deleted file mode 100644 index 5591f08fe..000000000 --- a/lib/plugins/plugin/lang/it/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Gestione Plugin ====== - -In questa pagina puoi gestire tutto ciò che riguarda i [[doku>plugins|plugin]] di DokuWiki. Per poter scaricare e installare un plugin, il webserver deve avere accesso in scrittura alla directory dei plugin. \ No newline at end of file diff --git a/lib/plugins/plugin/lang/it/lang.php b/lib/plugins/plugin/lang/it/lang.php deleted file mode 100644 index 186bf976e..000000000 --- a/lib/plugins/plugin/lang/it/lang.php +++ /dev/null @@ -1,63 +0,0 @@ - - * @author Silvia Sargentoni - * @author Pietro Battiston toobaz@email.it - * @author Diego Pierotto ita.translations@tiscali.it - * @author ita.translations@tiscali.it - * @author Lorenzo Breda - * @author snarchio@alice.it - * @author robocap - * @author Osman Tekin osman.tekin93@hotmail.it - * @author Jacopo Corbetta - * @author Matteo Pasotti - * @author snarchio@gmail.com - */ -$lang['menu'] = 'Gestione Plugin'; -$lang['download'] = 'Scarica e installa un nuovo plugin'; -$lang['manage'] = 'Plugin installati'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'aggiorna'; -$lang['btn_delete'] = 'elimina'; -$lang['btn_settings'] = 'configurazione'; -$lang['btn_download'] = 'Scarica'; -$lang['btn_enable'] = 'Salva'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Installato:'; -$lang['lastupdate'] = 'Ultimo aggiornamento:'; -$lang['source'] = 'Origine:'; -$lang['unknown'] = 'sconosciuto'; -$lang['updating'] = 'Aggiornamento in corso ...'; -$lang['updated'] = 'Aggiornamento plugin %s riuscito'; -$lang['updates'] = 'Aggiornamento dei seguenti plugin riuscito:'; -$lang['update_none'] = 'Nessun aggiornamento trovato.'; -$lang['deleting'] = 'Eliminazione in corso ...'; -$lang['deleted'] = 'Plugin %s eliminato.'; -$lang['downloading'] = 'Scaricamento in corso ...'; -$lang['downloaded'] = 'Installazione plugin %s riuscita'; -$lang['downloads'] = 'Installazione dei seguenti plugin riuscita:'; -$lang['download_none'] = 'Nessun plugin trovato, oppure si è verificato un problema sconosciuto durante il download e l\'installazione.'; -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Componenti'; -$lang['noinfo'] = 'Questo plugin non ha fornito alcuna informazione, potrebbe non essere valido.'; -$lang['name'] = 'Nome:'; -$lang['date'] = 'Data:'; -$lang['type'] = 'Tipo:'; -$lang['desc'] = 'Descrizione:'; -$lang['author'] = 'Autore:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Si è verificato un errore sconosciuto.'; -$lang['error_download'] = 'Impossibile scaricare il plugin: %s'; -$lang['error_badurl'] = 'Possibile URL non corretta - impossibile determinare il nome del file dalla URL fornita'; -$lang['error_dircreate'] = 'Impossibile creare la directory temporanea dove scaricare il file'; -$lang['error_decompress'] = 'Impossibile decomprimere il file scaricato. Questo potrebbe essere il risultato di un download incompleto, in tal caso dovresti provare di nuovo; oppure il formato di compressione potrebbe essere sconosciuto, in questo caso è necessario scaricare e installare il plugin manualmente.'; -$lang['error_copy'] = 'Si è verificato un errore nella copia di un file durante l\'installazione del plugin %s: il disco potrebbe essere pieno oppure i permessi di accesso al file potrebbero non essere corretti. Il plugin potrebbe essere stato installato solo parzialmente, questo potrebbe causare instabilità al sistema.'; -$lang['error_delete'] = 'Si è verificato un errore durante l\'eliminazione del plugin %s. Molto probabilmente i permessi di acesso ai file o alla directory non sono sufficienti'; -$lang['enabled'] = 'Plugin %s abilitato.'; -$lang['notenabled'] = 'Impossibile abilitare il plugin %s, verifica i permessi dei file.'; -$lang['disabled'] = 'Plugin %s disabilitato.'; -$lang['notdisabled'] = 'Impossibile disabilitare il plugin %s, verifica i permessi dei file.'; -$lang['packageinstalled'] = 'Pacchetto plugin (%d plugin(s): %s) installato con successo.'; diff --git a/lib/plugins/plugin/lang/ja/admin_plugin.txt b/lib/plugins/plugin/lang/ja/admin_plugin.txt deleted file mode 100644 index c3b85351a..000000000 --- a/lib/plugins/plugin/lang/ja/admin_plugin.txt +++ /dev/null @@ -1,5 +0,0 @@ -====== プラグイン管理 ====== - -この画面で、DokuWikiで使用するプラグイン [[doku>plugins|plugins]] の管理を行うことが出来ます。 プラグインをダウンロード・インストールするためには、サーバー内のプラグイン用フォルダーを 書き込み可にしておく必要があります。 - - diff --git a/lib/plugins/plugin/lang/ja/lang.php b/lib/plugins/plugin/lang/ja/lang.php deleted file mode 100644 index d66e109ce..000000000 --- a/lib/plugins/plugin/lang/ja/lang.php +++ /dev/null @@ -1,58 +0,0 @@ - - * @author Christopher Smith - * @author Ikuo Obataya - * @author Daniel Dupriest - * @author Kazutaka Miyasaka - * @author Taisuke Shimamoto - * @author Satoshi Sahara - */ -$lang['menu'] = 'プラグイン管理'; -$lang['download'] = 'プラグインのダウンロードとインストール'; -$lang['manage'] = 'インストール済みプラグイン'; -$lang['btn_info'] = '情報'; -$lang['btn_update'] = '更新'; -$lang['btn_delete'] = '削除'; -$lang['btn_settings'] = '設定'; -$lang['btn_download'] = 'ダウンロード'; -$lang['btn_enable'] = '保存'; -$lang['url'] = 'URL'; -$lang['installed'] = 'インストール:'; -$lang['lastupdate'] = '最終更新日:'; -$lang['source'] = 'ソース:'; -$lang['unknown'] = '不明'; -$lang['updating'] = '更新中...'; -$lang['updated'] = 'プラグイン %s は更新されました'; -$lang['updates'] = '次のプラグインが更新されました:'; -$lang['update_none'] = 'プラグインの更新データはありません。'; -$lang['deleting'] = '削除中...'; -$lang['deleted'] = 'プラグイン %s は削除されました。'; -$lang['downloading'] = 'ダウンロード中...'; -$lang['downloaded'] = 'プラグイン %s がインストールされました'; -$lang['downloads'] = '次のプラグインがインストールされました:'; -$lang['download_none'] = 'プラグインが見つかりませんでした。もしくはダウンロードかインストールの最中に予期せぬエラーが発生しました。'; -$lang['plugin'] = 'プラグイン:'; -$lang['components'] = 'コンポーネント'; -$lang['noinfo'] = 'このプラグインに関する情報がありません。有効なプラグインではないかも知れません。'; -$lang['name'] = '名前:'; -$lang['date'] = '日付:'; -$lang['type'] = 'タイプ:'; -$lang['desc'] = '説明:'; -$lang['author'] = '作者:'; -$lang['www'] = 'ウェブサイト:'; -$lang['error'] = '予期せぬエラーが発生しました。'; -$lang['error_download'] = 'プラグインファイルをダウンロードできません:%s'; -$lang['error_badurl'] = 'URLが正しくないようです - ファイル名が特定できません'; -$lang['error_dircreate'] = 'ダウンロードしたファイルを一時的に保管しておくフォルダが作成できません'; -$lang['error_decompress'] = 'ダウンロードしたファイルを解凍できませんでした。ダウンロードに失敗した可能性があります(もう一度、実行してください);もしくは、不明な圧縮形式であるかもしれません(手動でインストールする必要があります)'; -$lang['error_copy'] = 'プラグインをインストール中にファイルのコピーに失敗しました。%s:ディスク容量や書き込みの権限を確認してください。このエラーによりプラグインのインストールが完全に行われず、Wikiが不安定な状態です。'; -$lang['error_delete'] = 'プラグインの削除中にエラーが発生しました %s。プラグインが不完全なファイルであったか、ディレクトリの権限が正しくないことが原因であると考えられます。'; -$lang['enabled'] = 'プラグイン %s が有効です。'; -$lang['notenabled'] = 'プラグイン %s を有効にすることができません。権限を確認してください。'; -$lang['disabled'] = 'プラグイン %s が無効です。'; -$lang['notdisabled'] = 'プラグイン %s を無効にすることができません。権限を確認してください。'; -$lang['packageinstalled'] = 'プラグインパッケージ(%d plugin(s): %s)は正しくインストールされました。'; diff --git a/lib/plugins/plugin/lang/kk/lang.php b/lib/plugins/plugin/lang/kk/lang.php deleted file mode 100644 index dde5b9577..000000000 --- a/lib/plugins/plugin/lang/kk/lang.php +++ /dev/null @@ -1,6 +0,0 @@ -ko:plugins|플러그인]]에 관련된 모든 관리를 할 수 있습니다. 플러그인을 다운로드하고 설치하기 위해서는 웹 서버가 플러그인 폴더에 대해 쓰기 권한이 있어야 합니다. \ No newline at end of file diff --git a/lib/plugins/plugin/lang/ko/lang.php b/lib/plugins/plugin/lang/ko/lang.php deleted file mode 100644 index 4cd1ae3c7..000000000 --- a/lib/plugins/plugin/lang/ko/lang.php +++ /dev/null @@ -1,58 +0,0 @@ - - * @author Seung-Chul Yoo - * @author erial2@gmail.com - * @author Myeongjin - * @author Garam - */ -$lang['menu'] = '플러그인 관리'; -$lang['download'] = '새 플러그인을 다운로드하고 설치'; -$lang['manage'] = '설치된 플러그인'; -$lang['btn_info'] = '정보'; -$lang['btn_update'] = '업데이트'; -$lang['btn_delete'] = '삭제'; -$lang['btn_settings'] = '설정'; -$lang['btn_download'] = '다운로드'; -$lang['btn_enable'] = '저장'; -$lang['url'] = 'URL'; -$lang['installed'] = '설치됨:'; -$lang['lastupdate'] = '마지막으로 업데이트됨:'; -$lang['source'] = '원본:'; -$lang['unknown'] = '알 수 없음'; -$lang['updating'] = '업데이트 중 ...'; -$lang['updated'] = '%s 플러그인을 성공적으로 업데이트했습니다'; -$lang['updates'] = '다음 플러그인을 성공적으로 업데이트했습니다'; -$lang['update_none'] = '업데이트를 찾을 수 없습니다.'; -$lang['deleting'] = '삭제 중 ...'; -$lang['deleted'] = '%s 플러그인이 삭제되었습니다.'; -$lang['downloading'] = '다운로드 중 ...'; -$lang['downloaded'] = '%s 플러그인이 성공적으로 설치되었습니다'; -$lang['downloads'] = '다음 플러그인이 성공적으로 설치되었습니다:'; -$lang['download_none'] = '플러그인이 없거나 다운로드 또는 설치 중에 알 수 없는 문제가 발생했습니다.'; -$lang['plugin'] = '플러그인:'; -$lang['components'] = '구성 요소'; -$lang['noinfo'] = '이 플러그인은 어떤 정보도 없습니다. 잘못된 플러그인일 수 있습니다.'; -$lang['name'] = '이름:'; -$lang['date'] = '날짜:'; -$lang['type'] = '종류:'; -$lang['desc'] = '설명:'; -$lang['author'] = '저자:'; -$lang['www'] = '웹:'; -$lang['error'] = '알 수 없는 문제가 발생했습니다.'; -$lang['error_download'] = '플러그인 파일을 다운로드 할 수 없습니다: %s'; -$lang['error_badurl'] = '잘못된 URL 같습니다 - URL에서 파일 이름을 알 수 없습니다'; -$lang['error_dircreate'] = '다운로드를 받기 위한 임시 디렉터리를 만들 수 없습니다'; -$lang['error_decompress'] = '플러그인 관리자가 다운로드 받은 파일을 압축을 풀 수 없습니다. 잘못 다운로드 받았을 수도 있으니 다시 한 번 시도하거나 압축 포맷을 알 수 없는 경우에는 다운로드한 후 수동으로 직접 설치하세요.'; -$lang['error_copy'] = '플러그인을 설치하는 동안 파일 복사하는 데 오류가 발생했습니다. %s: 디스크가 꽉 찼거나 파일 접근 권한이 잘못된 경우입니다. 플러그인 설치가 부분적으로만 이루어졌을 것입니다. 설치가 불완전합니다.'; -$lang['error_delete'] = '%s 플러그인을 삭제하는 동안 오류가 발생했습니다. 대부분의 경우 불완전한 파일이거나 디렉터리 접근 권한이 잘못된 경우입니다'; -$lang['enabled'] = '%s 플러그인을 활성화했습니다.'; -$lang['notenabled'] = '%s 플러그인을 활성화할 수 없습니다. 파일 권한을 확인하세요.'; -$lang['disabled'] = '%s 플러그인을 비활성화했습니다.'; -$lang['notdisabled'] = '%s 플러그인을 비활성화할 수 없습니다. 파일 권한을 확인하하세요.'; -$lang['packageinstalled'] = '플러그인 패키지(플러그인 %d개: %s)가 성공적으로 설치되었습니다.'; diff --git a/lib/plugins/plugin/lang/la/admin_plugin.txt b/lib/plugins/plugin/lang/la/admin_plugin.txt deleted file mode 100644 index 2a41977fc..000000000 --- a/lib/plugins/plugin/lang/la/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Addendorum Administratio ====== - -In hac pagina omnia uicis [[doku>plugins|plugins]] mutare et administrare potes. Vt addenda capere et his uti, in scrinio addendorum scribere et legere potest. \ No newline at end of file diff --git a/lib/plugins/plugin/lang/la/lang.php b/lib/plugins/plugin/lang/la/lang.php deleted file mode 100644 index cd2d81cbd..000000000 --- a/lib/plugins/plugin/lang/la/lang.php +++ /dev/null @@ -1,50 +0,0 @@ - - */ -$lang['menu'] = 'Addendorum administratio'; -$lang['download'] = 'Noua addenda cape'; -$lang['manage'] = 'Addenta in usu'; -$lang['btn_info'] = 'Notae'; -$lang['btn_update'] = 'Nouare'; -$lang['btn_delete'] = 'Delere'; -$lang['btn_settings'] = 'Optiones'; -$lang['btn_download'] = 'Capere'; -$lang['btn_enable'] = 'Seruare'; -$lang['url'] = 'VRL'; -$lang['installed'] = 'In usu:'; -$lang['lastupdate'] = 'Extrema renouatio:'; -$lang['source'] = 'Fons:'; -$lang['unknown'] = 'Ignotum'; -$lang['updating'] = 'Nouans...'; -$lang['updated'] = 'Addenda %s nouata feliciter'; -$lang['updates'] = 'Hae addenda nouata feliciter sunt'; -$lang['update_none'] = 'Nulla renouatio inuenta'; -$lang['deleting'] = 'Delens...'; -$lang['deleted'] = 'Addenda %s deleta.'; -$lang['downloading'] = 'Capens ...'; -$lang['downloaded'] = 'Addenda %s recte in usu'; -$lang['downloads'] = 'Hae addenda feliciter in usu:'; -$lang['download_none'] = 'Nulla addenda reperta aut errores in capiendo sunt.'; -$lang['plugin'] = 'Addenda:'; -$lang['components'] = 'Partes'; -$lang['noinfo'] = 'Addenda alias notas non habent.'; -$lang['name'] = 'Nomen:'; -$lang['date'] = 'Dies:'; -$lang['type'] = 'Genus:'; -$lang['desc'] = 'Descriptio:'; -$lang['author'] = 'Auctor:'; -$lang['www'] = 'Situs interretialis:'; -$lang['error'] = 'Error ignotus.'; -$lang['error_download'] = 'Addenda quae non renouantur: %s'; -$lang['error_badurl'] = 'VRL malum'; -$lang['error_dircreate'] = 'Scrinium temporaneum non creatur, sic nihil capi potest'; -$lang['error_decompress'] = 'Addendorum administrator nouare non potest. Rursum capere nouationes temptat aut manu addenda noua.'; -$lang['error_copy'] = 'Exemplar malum in scrinio addendorum %s est: facultates documenti scrinique fortasse illegitimae sunt. Hic accidit cum addenda partim nouata sunt.'; -$lang['error_delete'] = 'Addenda %s non delentur.'; -$lang['enabled'] = 'Addenda %s apta facta.'; -$lang['notenabled'] = 'Addenda %s quae apta fieri non possunt.'; -$lang['disabled'] = 'Addenda %s non in usu.'; -$lang['notdisabled'] = 'Addenda %s quae inepta fieri non possunt.'; diff --git a/lib/plugins/plugin/lang/lb/admin_plugin.txt b/lib/plugins/plugin/lang/lb/admin_plugin.txt deleted file mode 100644 index 223de10e8..000000000 --- a/lib/plugins/plugin/lang/lb/admin_plugin.txt +++ /dev/null @@ -1,4 +0,0 @@ -====== Plugin Management ====== - -Op dëser Säit kanns de alles verwalte wat mat Dokuwiki [[doku>plugins|Pluginen]] ze dinn huet. Fir e Plugin kënnen z'installéieren, muss däi Pluginverzeechnës vum Webserver schreiwbar sinn. - diff --git a/lib/plugins/plugin/lang/lb/lang.php b/lib/plugins/plugin/lang/lb/lang.php deleted file mode 100644 index 59acdf7a8..000000000 --- a/lib/plugins/plugin/lang/lb/lang.php +++ /dev/null @@ -1,6 +0,0 @@ -plugins|plugins]]. Tam kad parsiųsti ir įdiegti kokį nors priedą jūsų web serveris privalo turėti įrašymo teises priedų kataloge. diff --git a/lib/plugins/plugin/lang/lt/lang.php b/lib/plugins/plugin/lang/lt/lang.php deleted file mode 100644 index c5b2fa11e..000000000 --- a/lib/plugins/plugin/lang/lt/lang.php +++ /dev/null @@ -1,13 +0,0 @@ - - */ -$lang['name'] = 'Vardas:'; -$lang['date'] = 'Data:'; -$lang['type'] = 'Tipas:'; -$lang['desc'] = 'Aprašas:'; -$lang['author'] = 'Autorius:'; -$lang['www'] = 'Tinklapis:'; diff --git a/lib/plugins/plugin/lang/lv/admin_plugin.txt b/lib/plugins/plugin/lang/lv/admin_plugin.txt deleted file mode 100644 index 80335062f..000000000 --- a/lib/plugins/plugin/lang/lv/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Moduļu pārvaldīšana ====== - -Šajā lapā varat pārvaldīt visu, kas saistīts ar Dokuwiki [[doku>plugins|moduļiem]]. Lai varētu lejupielādēt un uzstādīt moduļus, to direktorijai serverī vajag rakstīšanas tiesības. diff --git a/lib/plugins/plugin/lang/lv/lang.php b/lib/plugins/plugin/lang/lv/lang.php deleted file mode 100644 index 9a8727875..000000000 --- a/lib/plugins/plugin/lang/lv/lang.php +++ /dev/null @@ -1,51 +0,0 @@ - - */ -$lang['menu'] = 'Moduļu pārvaldība'; -$lang['download'] = 'Lejupielādēt un instalēt jaunu moduli.'; -$lang['manage'] = 'Instalētie moduļi'; -$lang['btn_info'] = 'uzziņa'; -$lang['btn_update'] = 'atjaunināt'; -$lang['btn_delete'] = 'dzēst'; -$lang['btn_settings'] = 'parametri'; -$lang['btn_download'] = 'Lejupielādēt'; -$lang['btn_enable'] = 'Saglabāt'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instalēts:'; -$lang['lastupdate'] = 'Atjaunināts:'; -$lang['source'] = 'Avots:'; -$lang['unknown'] = 'nav zināms'; -$lang['updating'] = 'Atjauninu...'; -$lang['updated'] = 'Modulis %s veiksmīgi atjaunināts'; -$lang['updates'] = 'Veiksmīgi atjaunināti moduļi:'; -$lang['update_none'] = 'Jauninājums nav atrasts'; -$lang['deleting'] = 'Dzēšu...'; -$lang['deleted'] = 'Modulis %s dzēsts'; -$lang['downloading'] = 'Lejupielādēju...'; -$lang['downloaded'] = 'Modulis %s veiksmīgi instalēts'; -$lang['downloads'] = 'Veiksmīgi instalēti moduļi: '; -$lang['download_none'] = 'Neviens modulis nav atrasts vai arī gadījusies nezinām kļūme lejupielādes un instalācijas gaitā.'; -$lang['plugin'] = 'Modulis:'; -$lang['components'] = 'Sastāvdaļas'; -$lang['noinfo'] = 'Modulis nesniedz informāciju, tas varbūt ir bojāts.'; -$lang['name'] = 'Nosaukums:'; -$lang['date'] = 'Datums:'; -$lang['type'] = 'Tips:'; -$lang['desc'] = 'Apraksts:'; -$lang['author'] = 'Autors:'; -$lang['www'] = 'Mājaslapa:'; -$lang['error'] = 'Gadījās nezināma kļūme.'; -$lang['error_download'] = 'Nevar lejupielādēt moduļa failu %s'; -$lang['error_badurl'] = 'Aizdomas par aplamu URL - jo no tā nevar noteikt faila vārdu.'; -$lang['error_dircreate'] = 'Nevar izveidot pagaidu direktoriju, kur saglabāt lejupielādēto. '; -$lang['error_decompress'] = 'Moduļu pārvaldnieks nevar atspiest lejupielādēto failu. Vai nu neizdevusi es lejupielāde, mēģiniet atkārtot, vai arī nezinām arhīva formāts un tad modulis jāielādē un jāinstalē tev pašam.'; -$lang['error_copy'] = 'Faila kopēšanas kļūda instalējot moduli%s: disks pārpildīts vai aplamas piekļuves tiesības. Rezultātā var iegūt daļēji instalētu moduli un nestabilu Wiki sistēmu.'; -$lang['error_delete'] = 'Kļūme dzēšot moduli %s. Ticamākais iemesls ir direktorijas pieejas tiesību trūkums. '; -$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/mk/lang.php b/lib/plugins/plugin/lang/mk/lang.php deleted file mode 100644 index 747d61638..000000000 --- a/lib/plugins/plugin/lang/mk/lang.php +++ /dev/null @@ -1,43 +0,0 @@ - - */ -$lang['menu'] = 'Уреди ги приклучоците'; -$lang['download'] = 'Симни и инсталирај нов приклучок'; -$lang['manage'] = 'Инсталирани приклучоци'; -$lang['btn_info'] = 'информации'; -$lang['btn_update'] = 'ажурирај'; -$lang['btn_delete'] = 'избриши'; -$lang['btn_settings'] = 'поставувања'; -$lang['btn_download'] = 'Симни'; -$lang['btn_enable'] = 'Зачувај'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Инсталирани:'; -$lang['lastupdate'] = 'Последно ажурирани:'; -$lang['source'] = 'Извор:'; -$lang['unknown'] = 'непознат'; -$lang['updating'] = 'Ажурирам...'; -$lang['updated'] = 'Приклучокот %s е успешно ажуриран'; -$lang['updates'] = 'Следниве приклучоци се успешно ажурирани'; -$lang['update_none'] = 'Нема потребни ажурирања.'; -$lang['deleting'] = 'Бришам...'; -$lang['deleted'] = 'Приклучокот %s е избришан.'; -$lang['downloading'] = 'Симнувам...'; -$lang['downloaded'] = 'Приклучокот %s е успешно инсталиран'; -$lang['downloads'] = 'Следниве приклучоци се успешно инсталирани'; -$lang['download_none'] = 'Нема пронајдени приклучоци, или имаше непознат проблем при симнување и инсталирање.'; -$lang['plugin'] = 'Приклучок:'; -$lang['components'] = 'Компоненти'; -$lang['noinfo'] = 'Овој приклучок не врати информации, може да не е валиден.'; -$lang['name'] = 'Име:'; -$lang['date'] = 'Датум:'; -$lang['type'] = 'Тип:'; -$lang['desc'] = 'Опис:'; -$lang['author'] = 'Автор:'; -$lang['www'] = 'Веб:'; -$lang['error'] = 'Се појави непозната грешка.'; -$lang['error_download'] = 'Не сум во можност да ја симнам датотеката за приклучокот: %s'; -$lang['enabled'] = 'Приклучокот %s е овозможен.'; -$lang['disabled'] = 'Приклучокот %s е оневозможен.'; diff --git a/lib/plugins/plugin/lang/mr/admin_plugin.txt b/lib/plugins/plugin/lang/mr/admin_plugin.txt deleted file mode 100644 index a925a560f..000000000 --- a/lib/plugins/plugin/lang/mr/admin_plugin.txt +++ /dev/null @@ -1,4 +0,0 @@ -====== प्लगिन व्यवस्थापन ====== - -या पानावर तुम्ही डॉक्युविकि [[doku>plugins|प्लगिन]] च्या सर्व बाबींची व्यवस्था लावू शकता. -प्लगिन डाउनलोड व इन्स्टॉल करण्यासाठी तुमच्या प्लगिन फोल्डरवर तुमच्या वेबसर्वरला लेखनाची परवानगी असली पाहिजे. \ No newline at end of file diff --git a/lib/plugins/plugin/lang/mr/lang.php b/lib/plugins/plugin/lang/mr/lang.php deleted file mode 100644 index 3f81739fa..000000000 --- a/lib/plugins/plugin/lang/mr/lang.php +++ /dev/null @@ -1,53 +0,0 @@ - - * @author Padmanabh Kulkarni - * @author shantanoo@gmail.com - */ -$lang['menu'] = 'प्लगिनची व्यवस्था लावा'; -$lang['download'] = 'नवीन प्लगिन डाउनलोड करून इन्स्टॉल करा'; -$lang['manage'] = 'इन्स्टॉल केलेले प्लगिन'; -$lang['btn_info'] = 'माहिती'; -$lang['btn_update'] = 'अद्ययावत'; -$lang['btn_delete'] = 'डिलीट'; -$lang['btn_settings'] = 'सेटिंग'; -$lang['btn_download'] = 'डाउनलोड'; -$lang['btn_enable'] = 'सुरक्षित'; -$lang['url'] = 'URL'; -$lang['installed'] = 'इन्स्टॉलची वेळ :'; -$lang['lastupdate'] = 'शेवटच्या बदलाची वेळ :'; -$lang['source'] = 'स्त्रोत :'; -$lang['unknown'] = 'अगम्य'; -$lang['updating'] = 'अद्ययावत करतोय ...'; -$lang['updated'] = 'प्लगिन %s यशास्विरित्य अद्ययावत केला.'; -$lang['updates'] = 'खालील प्लगिन यशस्वीरीत्या अद्ययावत झाले'; -$lang['update_none'] = 'काही बदल मिळाले नाहीत.'; -$lang['deleting'] = 'डिलीट करतोय ...'; -$lang['deleted'] = '%s प्लगिन डिलीट केला.'; -$lang['downloading'] = 'डाउनलोड करतोय ...'; -$lang['downloaded'] = '%s प्लगिन यशस्वीरीत्या इन्स्टॉल झाला.'; -$lang['downloads'] = 'खालील प्लगिन यशस्वीरीत्या इन्स्टॉल झाले : '; -$lang['download_none'] = 'एकही प्लगिन मिळाला नाही, किंवा डाउनलोड आणि इन्स्टॉल मधे काही अज्ञात अडचण आली असावी.'; -$lang['plugin'] = 'प्लगिन : '; -$lang['components'] = 'भाग : '; -$lang['noinfo'] = 'या प्लगिनने काही माहिती दिली नाही. बहुधा हा अवैध असावा.'; -$lang['name'] = 'नाव :'; -$lang['date'] = 'दिनांक :'; -$lang['type'] = 'टाइप : '; -$lang['desc'] = 'वर्णन : '; -$lang['author'] = 'लेखक : '; -$lang['www'] = 'वेब : '; -$lang['error'] = 'अज्ञात अडचण आली.'; -$lang['error_download'] = 'डाउनलोड न झालेली प्लगिन फाइल : %s'; -$lang['error_badurl'] = 'बहुधा चुकीचे URL - URL वरून फाइलचे नाव ठरवता आले नाही.'; -$lang['error_dircreate'] = 'डाउनलोड साठवण्यासाठी तात्पुरता फोल्डर तयार करू शकलो नाही'; -$lang['error_decompress'] = 'प्लगिन व्यवस्थापक डाउनलोड केलेली फाइल विस्तारित करू शकला नाही. हे कदाचित डाउनलोड नीट न झाल्यामुळे असावं; असे असल्यास तुमची परत डाउनलोड करण्याचा प्रयत्न करू शकता; किंवा प्लगिन संक्षिप्त करण्यास वापरलेली पद्धत अनाकलनीय आहे; तसे असल्यास तुम्हाला स्वतः प्लगिन डाउनलोड व इन्स्टॉल करावा लागेल.'; -$lang['error_copy'] = '%s प्लगिनसाठी फाइल इन्स्टॉल करताना फाइल कॉपी करू शकलो नाही : डिस्क भरली असेल किंवा फाइल वरील परवानग्या बरोबर नसतील. यामुळे प्लगिन अर्धवट इन्स्टॉल जाला असण्याची व त्यामुळे तुमची विकी ख़राब होण्याची शक्यता आहे.'; -$lang['error_delete'] = '%s प्लगिन डिलीट करताना काही चूक झाली आहे. फाइल किंवा डिरेक्टरी वरील परवानग्या बरोबर नसणे हे याचं मुख्य कारण असू शकतं.'; -$lang['enabled'] = '%s प्लगइन चालू केला.'; -$lang['notenabled'] = '%s प्लगइन चालू करू शकलो नाही, फाइलच्या परवानग्या तपासा.'; -$lang['disabled'] = '%s प्लगइन बंद केला.'; -$lang['notdisabled'] = '%s प्लगइन बंद करू शकलो नाही, फाइलच्या परवानग्या तपासा.'; diff --git a/lib/plugins/plugin/lang/ms/lang.php b/lib/plugins/plugin/lang/ms/lang.php deleted file mode 100644 index 77ad2a1c1..000000000 --- a/lib/plugins/plugin/lang/ms/lang.php +++ /dev/null @@ -1,6 +0,0 @@ - - * @author SarojKumar Dhakal - * @author Saroj Dhakal - */ -$lang['menu'] = 'प्लगिन व्यवस्थापन गर्नुहोस।'; -$lang['download'] = 'नयाँ प्लगिन डाउनलोड गरी स्थापना गर्नुहोस्'; -$lang['manage'] = 'स्थापित प्लगिनहरु'; -$lang['btn_info'] = 'जानकारी'; -$lang['btn_update'] = 'अध्यावधिक गर्नुहोस'; -$lang['btn_delete'] = 'मेटाउनुहोस्'; -$lang['btn_settings'] = 'व्यवस्थापन'; -$lang['btn_download'] = 'डाउनलोड गर्नुहोस्'; -$lang['btn_enable'] = 'वचत गर्नुहोस्'; -$lang['url'] = 'URL'; -$lang['installed'] = 'स्थापित'; -$lang['lastupdate'] = 'अन्तिम अध्यावधिक :'; -$lang['source'] = 'स्रोत:'; -$lang['unknown'] = 'थाह नभएको'; -$lang['updating'] = 'अध्यावधिक गर्दै......'; -$lang['updated'] = 'प्लगिन %s सफलतापूर्वक अध्यावधिक भयो '; -$lang['updates'] = 'निम्न प्लगिनहरु सफलतापूर्वक अध्यावधिक भए।'; -$lang['update_none'] = 'कुनै पनि अध्यावधिकम भेटिएन ।'; -$lang['deleting'] = 'हटाउदै ......'; -$lang['deleted'] = 'प्लगिन %s हटाइयो ।'; -$lang['downloading'] = 'डाउनलोड गर्दै ........'; -$lang['downloaded'] = 'प्लगिन %s सफलतापूर्वक स्थापित भयो '; -$lang['downloads'] = 'निम्न प्लगिनहरु सफलतापूर्वक स्थापित भए'; -$lang['download_none'] = 'कुनै पनि प्लगइन भेटिएन, या डाउनलोड गर्दा र स्थापना गर्दा त्रुटि भयो ।'; -$lang['plugin'] = 'प्लगिन:'; -$lang['components'] = 'पुर्जाहरु '; -$lang['noinfo'] = 'यो प्लगइनले कुनै पनि जनाकारी दिएन , यो अमान्य हुनसक्छ ।'; -$lang['name'] = 'नाम:'; -$lang['date'] = 'मिति:'; -$lang['type'] = 'प्रकार :'; -$lang['desc'] = 'जानकारी:'; -$lang['author'] = 'जारीकर्ता:'; -$lang['www'] = 'वेब:'; -$lang['error'] = 'अज्ञात त्रुटि फेला पर्‌यो ।'; -$lang['error_download'] = 'प्लहइन फाइल: %s डाउनलोड गर्न असमर्थ ।'; -$lang['error_badurl'] = 'शंकास्पद खराब url - Url बाट फाइल नाम निश्चित गर्न असमर्थ ।'; -$lang['error_dircreate'] = 'डाउनलोड प्राप्त गर्नको निमि्त्त अस्थाइ फोल्डर निर्माण गर्न असमर्थ ।'; diff --git a/lib/plugins/plugin/lang/nl/admin_plugin.txt b/lib/plugins/plugin/lang/nl/admin_plugin.txt deleted file mode 100644 index 36731b0b0..000000000 --- a/lib/plugins/plugin/lang/nl/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -===== Pluginmanager ===== - -Op deze pagina kunt u alle DokuWiki [[doku>plugins|plugins]] beheren. Om plugins te kunnen downloaden en installeren, moet de plugin-directory schrijfbaar zijn voor de webserver. \ No newline at end of file diff --git a/lib/plugins/plugin/lang/nl/lang.php b/lib/plugins/plugin/lang/nl/lang.php deleted file mode 100644 index 2836c7030..000000000 --- a/lib/plugins/plugin/lang/nl/lang.php +++ /dev/null @@ -1,64 +0,0 @@ - - * @author John de Graaff - * @author Niels Schoot - * @author Dion Nicolaas - * @author Danny Rotsaert - * @author Marijn Hofstra hofstra.m@gmail.com - * @author Matthias Carchon webmaster@c-mattic.be - * @author Marijn Hofstra - * @author Timon Van Overveldt - * @author Jeroen - * @author Ricardo Guijt - * @author Gerrit - * @author Remon - */ -$lang['menu'] = 'Plugins beheren'; -$lang['download'] = 'Download en installeer een nieuwe plugin'; -$lang['manage'] = 'Geïnstalleerde plugins'; -$lang['btn_info'] = 'informatie'; -$lang['btn_update'] = 'bijwerken'; -$lang['btn_delete'] = 'verwijderen'; -$lang['btn_settings'] = 'instellingen'; -$lang['btn_download'] = 'Download'; -$lang['btn_enable'] = 'Opslaan'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Geïnstalleerd:'; -$lang['lastupdate'] = 'Laatst bijgewerkt:'; -$lang['source'] = 'Bron:'; -$lang['unknown'] = 'onbekend'; -$lang['updating'] = 'Bijwerken ...'; -$lang['updated'] = 'Plugin %s succesvol bijgewerkt'; -$lang['updates'] = 'De volgende plugins zijn succesvol bijgewerkt'; -$lang['update_none'] = 'Geen updates gevonden.'; -$lang['deleting'] = 'Verwijderen ...'; -$lang['deleted'] = 'Plugin %s verwijderd.'; -$lang['downloading'] = 'Bezig met downloaden ...'; -$lang['downloaded'] = 'Plugin %s succesvol geïnstalleerd'; -$lang['downloads'] = 'De volgende plugins zijn succesvol geïnstalleerd:'; -$lang['download_none'] = 'Geen plugins gevonden, of er is een onbekende fout opgetreden tijdens het downloaden en installeren.'; -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Onderdelen'; -$lang['noinfo'] = 'Deze plugin gaf geen informatie terug, misschien is hij defect.'; -$lang['name'] = 'Naam:'; -$lang['date'] = 'Datum:'; -$lang['type'] = 'Type:'; -$lang['desc'] = 'Omschrijving:'; -$lang['author'] = 'Auteur:'; -$lang['www'] = 'Weblocatie:'; -$lang['error'] = 'Er is een onbekende fout opgetreden.'; -$lang['error_download'] = 'Kan het volgende plugin bestand niet downloaden: %s'; -$lang['error_badurl'] = 'Vermoedelijk onjuiste url - kan de bestandsnaam niet uit de url afleiden'; -$lang['error_dircreate'] = 'Kan geen tijdelijke directory aanmaken voor de download'; -$lang['error_decompress'] = 'De pluginmanager kan het gedownloade bestand niet uitpakken. Dit kan het resultaat zijn van een mislukte download: probeer het opnieuw; of het compressieformaat is onbekend: in dat geval moet je de plugin handmatig downloaden en installeren.'; -$lang['error_copy'] = 'Er was een probleem met het kopiëren van een bestand tijdens de installatie van plugin %s: de schijf kan vol zijn of onjuiste toegangsrechten hebben. Dit kan tot gevolg hebben dat de plugin slechts gedeeltelijk geïnstalleerd is en kan de wiki onstabiel maken.'; -$lang['error_delete'] = 'Er is een probleem opgetreden tijdens het verwijderen van plugin %s. De meest voorkomende oorzaak is onjuiste toegangsrechten op bestanden of directory\'s.'; -$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.'; diff --git a/lib/plugins/plugin/lang/no/admin_plugin.txt b/lib/plugins/plugin/lang/no/admin_plugin.txt deleted file mode 100644 index 1765b671d..000000000 --- a/lib/plugins/plugin/lang/no/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Behandle programtillegg ====== - -På denne siden kan du behandle alt som har å gjøre med DokuWikis [[doku>plugins|tillegg]]. For å kunne laste ned og installere et tillegg må webserveren ha skrivetilgang til mappen for tillegg. diff --git a/lib/plugins/plugin/lang/no/lang.php b/lib/plugins/plugin/lang/no/lang.php deleted file mode 100644 index 2b890f972..000000000 --- a/lib/plugins/plugin/lang/no/lang.php +++ /dev/null @@ -1,64 +0,0 @@ - - * @author Arild Burud - * @author Torkill Bruland - * @author Rune M. Andersen - * @author Jakob Vad Nielsen (me@jakobnielsen.net) - * @author Kjell Tore Næsgaard - * @author Knut Staring - * @author Lisa Ditlefsen - * @author Erik Pedersen - * @author Erik Bjørn Pedersen - * @author Rune Rasmussen syntaxerror.no@gmail.com - * @author Jon Bøe - * @author Egil Hansen - */ -$lang['menu'] = 'Behandle programtillegg'; -$lang['download'] = 'Last ned og installer et programtillegg'; -$lang['manage'] = 'Installerte programtillegg'; -$lang['btn_info'] = 'informasjon'; -$lang['btn_update'] = 'oppdater'; -$lang['btn_delete'] = 'slett'; -$lang['btn_settings'] = 'innstillinger'; -$lang['btn_download'] = 'Last ned'; -$lang['btn_enable'] = 'Lagre'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Installert:'; -$lang['lastupdate'] = 'Sist oppdatert:'; -$lang['source'] = 'Kilde:'; -$lang['unknown'] = 'ukjent'; -$lang['updating'] = 'Oppdaterer ...'; -$lang['updated'] = 'Tillegget %s er oppdatert'; -$lang['updates'] = 'Følgende programtillegg har blitt oppdatert'; -$lang['update_none'] = 'Ingen oppdateringer funnet.'; -$lang['deleting'] = 'Sletter ...'; -$lang['deleted'] = 'Tillegget %s ble slettet.'; -$lang['downloading'] = 'Laster ned ...'; -$lang['downloaded'] = 'Tillegget %s ble installert'; -$lang['downloads'] = 'De følgende tilleggene ble installert'; -$lang['download_none'] = 'Ingen tillegg funnet, eller det har vært et ukjent problem under nedlasting og installering.'; -$lang['plugin'] = 'Tillegg:'; -$lang['components'] = 'Komponenter'; -$lang['noinfo'] = 'Tillegget ga ikke noe informasjon. Det kan være ugyldig.'; -$lang['name'] = 'Navn:'; -$lang['date'] = 'Dato:'; -$lang['type'] = 'Type:'; -$lang['desc'] = 'Beskrivelse:'; -$lang['author'] = 'Forfatter:'; -$lang['www'] = 'Nett:'; -$lang['error'] = 'En ukjent feil oppstod.'; -$lang['error_download'] = 'Klarte ikke å laste ned tillegget i filen: %s'; -$lang['error_badurl'] = 'Mistenker feil URL - klarte ikke å finne filnavnet i URLen'; -$lang['error_dircreate'] = 'Klarte ikke å lage en midlertidig mappe for å laste ned'; -$lang['error_decompress'] = 'Tilleggsbehandleren klarte ikke å dekomprimere den nedlastede filen. Dette kan være på grunn av en feilet nedlasting, i så fall bør du prøve igjen, eller kompresjonsformatet kan være ukjent, i så fall må du laste ned og installere tillegget manuelt.'; -$lang['error_copy'] = 'Det skjedde en feil ved kopiering av en fil under installasjonen av %s: disken kan være full eller rettighetene satt feil. Dette kan ha ført til et delvist installert tillegg og gjort wikien ubrukelig.'; -$lang['error_delete'] = 'Det skjedde en feil under forsøket på å slette tillegget %s. Den mest sannsynlige grunnen er utilstrekkelige rettigheter for filene eller mappene.'; -$lang['enabled'] = 'Tillegget %s aktivert'; -$lang['notenabled'] = 'Plugin %s kunne ikke aktiveres, sjekk filrettighetene.'; -$lang['disabled'] = 'Plugin %s deaktivert'; -$lang['notdisabled'] = 'Plugin %s kunne ikke deaktiveres, sjekk filrettighetene.'; -$lang['packageinstalled'] = 'Installasjonen av tilleggspakka (%d tillegg: %s) var vellykka'; diff --git a/lib/plugins/plugin/lang/pl/admin_plugin.txt b/lib/plugins/plugin/lang/pl/admin_plugin.txt deleted file mode 100644 index f01048198..000000000 --- a/lib/plugins/plugin/lang/pl/admin_plugin.txt +++ /dev/null @@ -1,5 +0,0 @@ -====== Menadżer wtyczek ====== - -Na tej stronie możesz zarządzać wszystkim co jest związane z [[doku>plugins|wtyczkami]] Dokuwiki. Aby móc ściągnąć i zainstalować wtyczkę, serwer WWW musi mieć prawo do zapisu w katalogu ''plugins''. - - diff --git a/lib/plugins/plugin/lang/pl/lang.php b/lib/plugins/plugin/lang/pl/lang.php deleted file mode 100644 index eae91f33e..000000000 --- a/lib/plugins/plugin/lang/pl/lang.php +++ /dev/null @@ -1,63 +0,0 @@ - - * @author Grzegorz Żur - * @author Mariusz Kujawski - * @author Maciej Kurczewski - * @author Sławomir Boczek - * @author sleshek@wp.pl - * @author Leszek Stachowski - * @author maros - * @author Grzegorz Widła - * @author Łukasz Chmaj - * @author Begina Felicysym - * @author Aoi Karasu - */ -$lang['menu'] = 'Menadżer wtyczek'; -$lang['download'] = 'Ściągnij i zainstaluj nową wtyczkę'; -$lang['manage'] = 'Zainstalowane Wtyczki'; -$lang['btn_info'] = 'Informacje'; -$lang['btn_update'] = 'Aktualizuj'; -$lang['btn_delete'] = 'Usuń'; -$lang['btn_settings'] = 'Ustawienia'; -$lang['btn_download'] = 'Pobierz'; -$lang['btn_enable'] = 'Zapisz'; -$lang['url'] = 'Adres URL'; -$lang['installed'] = 'Instalacja:'; -$lang['lastupdate'] = 'Ostatnio zaktualizowana:'; -$lang['source'] = 'Źródło:'; -$lang['unknown'] = 'nieznane'; -$lang['updating'] = 'Aktualizuję...'; -$lang['updated'] = 'Aktualizacja wtyczki %s pomyślnie ściągnięta'; -$lang['updates'] = 'Aktualizacje następujących wtyczek zostały pomyślnie ściągnięte'; -$lang['update_none'] = 'Nie znaleziono aktualizacji.'; -$lang['deleting'] = 'Usuwam...'; -$lang['deleted'] = 'Wtyczka %s usunięta.'; -$lang['downloading'] = 'Pobieram...'; -$lang['downloaded'] = 'Wtyczka %s pomyślnie zainstalowana'; -$lang['downloads'] = 'Następujące wtyczki zostały pomyślnie zainstalowane:'; -$lang['download_none'] = 'Nie znaleziono wtyczek lub wystąpił nieznany problem podczas ściągania i instalacji.'; -$lang['plugin'] = 'Wtyczka:'; -$lang['components'] = 'Składniki'; -$lang['noinfo'] = 'Ta wtyczka nie zwróciła żadnych informacji, może być niepoprawna.'; -$lang['name'] = 'Nazwa:'; -$lang['date'] = 'Data:'; -$lang['type'] = 'Typ:'; -$lang['desc'] = 'Opis:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'WWW:'; -$lang['error'] = 'Wystąpił nieznany błąd.'; -$lang['error_download'] = 'Nie powiodło się ściągnięcie pliku wtyczki: %s'; -$lang['error_badurl'] = 'Prawdopodobnie zły url - nie da się ustalić nazwy pliku na podstawie urla'; -$lang['error_dircreate'] = 'Nie powiodło się stworzenie tymczasowego katalogu na pobrane pliki'; -$lang['error_decompress'] = 'Menadżer wtyczek nie był w stanie rozpakować ściągniętego pliku. Może to być spowodowane przez nieudany transfer (w takim przypadku powinieneś spróbować ponownie) lub nieznany format kompresji (w takim przypadku będziesz musiał ściągnąć i zainstalować wtyczkę ręcznie).'; -$lang['error_copy'] = 'Wystąpił błąd podczas kopiowania pliku w trakcie instalacji wtyczki %s: być może dysk jest pełny lub prawa dostępu są niepoprawne. Efektem może być częściowo zainstalowana wtyczka co może spowodować niestabilność Twojej instalacji wiki.'; -$lang['error_delete'] = 'Wystąpił błąd przy próbie usunięcia wtyczki %s. Prawdopodobną przyczyną są niewystarczające uprawnienia do katalogu.'; -$lang['enabled'] = 'Wtyczka %s włączona.'; -$lang['notenabled'] = 'Nie udało się uruchomić wtyczki %s, sprawdź uprawnienia dostępu do plików.'; -$lang['disabled'] = 'Wtyczka %s wyłączona.'; -$lang['notdisabled'] = 'Nie udało się wyłączyć wtyczki %s, sprawdź uprawnienia dostępu do plików.'; -$lang['packageinstalled'] = 'Pakiet wtyczek (%d wtyczki: %s) zainstalowany pomyślnie.'; diff --git a/lib/plugins/plugin/lang/pt-br/admin_plugin.txt b/lib/plugins/plugin/lang/pt-br/admin_plugin.txt deleted file mode 100644 index 9e49f5136..000000000 --- a/lib/plugins/plugin/lang/pt-br/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Gerenciamento de Plug-ins ====== - -Nesta página você pode gerenciar tudo relacionado aos [[doku>plugins|plug-ins]] do DokuWiki. Para você baixar e instalar um plug-in o servidor web deve ter permissão de escrita na pasta onde ficam os plug-ins. diff --git a/lib/plugins/plugin/lang/pt-br/lang.php b/lib/plugins/plugin/lang/pt-br/lang.php deleted file mode 100644 index c025188f3..000000000 --- a/lib/plugins/plugin/lang/pt-br/lang.php +++ /dev/null @@ -1,66 +0,0 @@ - - * @author Felipe Castro - * @author Lucien Raven - * @author Enrico Nicoletto - * @author Flávio Veras - * @author Jeferson Propheta - * @author jair.henrique@gmail.com - * @author Luis Dantas - * @author Frederico Guimarães - * @author Jair Henrique - * @author Luis Dantas - * @author Sergio Motta sergio@cisne.com.br - * @author Isaias Masiero Filho - * @author Balaco Baco - * @author Victor Westmann - */ -$lang['menu'] = 'Gerenciar Plug-ins'; -$lang['download'] = 'Baixar e instalar um novo plug-in'; -$lang['manage'] = 'Plug-ins instalados'; -$lang['btn_info'] = 'informações'; -$lang['btn_update'] = 'atualizar'; -$lang['btn_delete'] = 'excluir'; -$lang['btn_settings'] = 'configurações'; -$lang['btn_download'] = 'Baixar'; -$lang['btn_enable'] = 'Salvar'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instalação:'; -$lang['lastupdate'] = 'Última atualização:'; -$lang['source'] = 'Fonte:'; -$lang['unknown'] = 'desconhecida'; -$lang['updating'] = 'Atualizando...'; -$lang['updated'] = 'O plug-in %s foi atualizado com sucesso'; -$lang['updates'] = 'Os seguintes plug-ins foram atualizados com sucesso'; -$lang['update_none'] = 'Não foi encontrada nenhuma atualização.'; -$lang['deleting'] = 'Excluindo...'; -$lang['deleted'] = 'O plug-in %s foi excluído.'; -$lang['downloading'] = 'Baixando...'; -$lang['downloaded'] = 'O plug-in %s foi instalado com sucesso'; -$lang['downloads'] = 'Os seguintes plug-ins foram instalados com sucesso:'; -$lang['download_none'] = 'O plug-in não foi encontrado ou então ocorreu um problema desconhecido durante a transferência e instalação.'; -$lang['plugin'] = 'Plug-in:'; -$lang['components'] = 'Componentes'; -$lang['noinfo'] = 'Esse plug-in não retornou nenhuma informação. Ele pode ser inválido.'; -$lang['name'] = 'Nome:'; -$lang['date'] = 'Data:'; -$lang['type'] = 'Tipo:'; -$lang['desc'] = 'Descrição:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Ocorreu um erro desconhecido.'; -$lang['error_download'] = 'Não foi possível baixar o arquivo de plug-in: %s'; -$lang['error_badurl'] = 'Suspeita de URL mal formatada - não foi possível determinar o nome do arquivo a partir da URL'; -$lang['error_dircreate'] = 'Não foi possível criar a pasta temporária para receber a transferência'; -$lang['error_decompress'] = 'O gerenciador de plug-ins não conseguiu descompactar o arquivo transferido. Isso pode ser resultado de: uma corrupção do arquivo durante a transferência, nesse caso, você deve tentar novamente; ou o formato da compactação pode ser desconhecido, nesse caso você deve transferir e instalar o plug-in manualmente.'; -$lang['error_copy'] = 'Ocorreu um erro de cópia de arquivo na tentativa de instalar o plug-in %s: o disco pode estar cheio ou as permissões de acesso ao arquivo podem estar erradas. Isso pode resultar em um plug-in parcialmente instalado e tornar o seu wiki instável.'; -$lang['error_delete'] = 'Ocorreu um erro na tentativa de excluir o plug-in %s. A causa mais provável é a permissão de acesso insuficiente ao diretório ou ao arquivo.'; -$lang['enabled'] = 'O plug-in %s foi habilitado.'; -$lang['notenabled'] = 'Não foi possível habilitar o plug-in %s. Verifique as permissões de acesso.'; -$lang['disabled'] = 'O plug-in %s foi desabilitado.'; -$lang['notdisabled'] = 'Não foi possível desabilitar o plug-in %s. Verifique as permissões de acesso.'; -$lang['packageinstalled'] = 'O pacote do plugin (%d plugin(s): %s) foi instalado com sucesso.'; diff --git a/lib/plugins/plugin/lang/pt/admin_plugin.txt b/lib/plugins/plugin/lang/pt/admin_plugin.txt deleted file mode 100644 index 2cc470193..000000000 --- a/lib/plugins/plugin/lang/pt/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Gestor de Plugins ====== - -Nesta página pode gerir tudo o que tenha a haver com [[doku>plugins|plugins]] DokuWiki. Atenção que a pasta que contém os plugins precisa de ter permissões de escrita para se poder efectuar o download. \ No newline at end of file diff --git a/lib/plugins/plugin/lang/pt/lang.php b/lib/plugins/plugin/lang/pt/lang.php deleted file mode 100644 index aa6b2e2ec..000000000 --- a/lib/plugins/plugin/lang/pt/lang.php +++ /dev/null @@ -1,56 +0,0 @@ - - * @author Enrico Nicoletto - * @author Fil - * @author André Neves - * @author José Campos zecarlosdecampos@gmail.com - */ -$lang['menu'] = 'Gerir Plugins'; -$lang['download'] = 'Descarregar e instalar um novo plugin'; -$lang['manage'] = 'Plugins Instalados'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'actualizar'; -$lang['btn_delete'] = 'remover'; -$lang['btn_settings'] = 'configurações'; -$lang['btn_download'] = 'Descarregar'; -$lang['btn_enable'] = 'Guardar'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instalado em:'; -$lang['lastupdate'] = 'Actualizado em:'; -$lang['source'] = 'Fonte:'; -$lang['unknown'] = 'desconhecida'; -$lang['updating'] = 'Actualizando ...'; -$lang['updated'] = 'Plugin %s actualizado com sucesso.'; -$lang['updates'] = 'Os seguintes plguins foram actualizados com sucesso:'; -$lang['update_none'] = 'Não foram encontradas actualizações.'; -$lang['deleting'] = 'Removendo ...'; -$lang['deleted'] = 'Plugin %s removido.'; -$lang['downloading'] = 'Descarregando ...'; -$lang['downloaded'] = 'Plugin %s instalado com sucesso.'; -$lang['downloads'] = 'Os seguintes plguins foram instalados com sucesso:'; -$lang['download_none'] = 'Nenhum plugin encontrado ou ocorreu um problema ao descarregar ou instalar.'; -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Componentes'; -$lang['noinfo'] = 'Este plugin não retornou qualquer informação, pode estar inválido.'; -$lang['name'] = 'Nome:'; -$lang['date'] = 'Data:'; -$lang['type'] = 'Tipo:'; -$lang['desc'] = 'Descrição:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Sítio:'; -$lang['error'] = 'Ocorreu um erro desconhecido.'; -$lang['error_download'] = 'Impossível descarregar o ficheiro do plugin: %s'; -$lang['error_badurl'] = 'URL suspeito ou errado - impossível determinar o ficheiro a partir do URL'; -$lang['error_dircreate'] = 'Impossível criar pasta temporária para receber os ficheiros a descarregar'; -$lang['error_decompress'] = 'O gestor de plugins foi incapaz de descomprimir o ficheiro transferido. Isto pode ter sido causado por uma má transferência, caso no qual você deverá tentar de novo, ou por um formato de compressão desconhecido, caso no qual você deve instalar o plugin manualmente.'; -$lang['error_copy'] = 'Ocorreu um erro na cópia do ficheiro na tentativa de instalar o plugin %s: o disco pode estar cheio ou as permissões de acesso do ficheiro podem estar erradas. Isto pode resultar em um plugin parcialmente instalado e deixar a instalação do seu wiki instável.'; -$lang['error_delete'] = 'Ocorreu um erro na tentativa de remover o plug-in %s. A causa mais provável é a permissão de acesso à directoria ou ao ficheiro insuficiente.'; -$lang['enabled'] = 'Plugin %s habilitado.'; -$lang['notenabled'] = 'Plugin %s não pôde ser habilitado, verifique as permissões.'; -$lang['disabled'] = 'Plugin %s desabilitado.'; -$lang['notdisabled'] = 'Plugin %s não pôde ser desabilitado, verifique as permissões.'; -$lang['packageinstalled'] = 'Pacote de Plugins (%d plugin(s): %s) instalado com sucesso.'; diff --git a/lib/plugins/plugin/lang/ro/admin_plugin.txt b/lib/plugins/plugin/lang/ro/admin_plugin.txt deleted file mode 100644 index a2956e45d..000000000 --- a/lib/plugins/plugin/lang/ro/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Managementul Plugin-urilor ====== - -In această pagină puteţi administra orice [[doku>plugins|plugin]] Dokuwiki. Pentru a descărca şi instala un plugin, directorul acestora trebuie să ofere webserver-ului acces la scriere. diff --git a/lib/plugins/plugin/lang/ro/lang.php b/lib/plugins/plugin/lang/ro/lang.php deleted file mode 100644 index c57647e0b..000000000 --- a/lib/plugins/plugin/lang/ro/lang.php +++ /dev/null @@ -1,59 +0,0 @@ - - * @author s_baltariu@yahoo.com - * @author Emanuel-Emeric Andrasi - * @author Emanuel-Emeric Andrași - * @author Emanuel-Emeric Andraşi - * @author Emanuel-Emeric Andrasi - * @author Marius OLAR - * @author Marius Olar - * @author Emanuel-Emeric Andrași - */ -$lang['menu'] = 'Administrează plugin-uri'; -$lang['download'] = 'Descarcă şi instalează un nou plugin'; -$lang['manage'] = 'Plugin-uri instalate'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'actualizare'; -$lang['btn_delete'] = 'ştergere'; -$lang['btn_settings'] = 'setări'; -$lang['btn_download'] = 'Descarcă'; -$lang['btn_enable'] = 'Salvează'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instalat:'; -$lang['lastupdate'] = 'Ultima actualizare:'; -$lang['source'] = 'Sursa:'; -$lang['unknown'] = 'necunoscut'; -$lang['updating'] = 'Se actualizează ...'; -$lang['updated'] = 'Plugin-ul %s a fost actualizat cu succes'; -$lang['updates'] = 'Următoarele plugin-uri au fost actualizate cu succes'; -$lang['update_none'] = 'Nu a fost găsită nici o actualizare.'; -$lang['deleting'] = 'Se şterge ...'; -$lang['deleted'] = 'Plugin-ul %s a fost şters.'; -$lang['downloading'] = 'Se descarcă ...'; -$lang['downloaded'] = 'Plugin-ul %s a fost instalat cu succes'; -$lang['downloads'] = 'Următoarele plugin-uri au fost instalate cu succes'; -$lang['download_none'] = 'Nici un plugin nu a fost găsit, sau o problemă necunoscută a apărut în timpul descărcării şi instalării.'; -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Componente'; -$lang['noinfo'] = 'Acest plugin nu a furnizat nici o informaţie; ar putea fi invalid.'; -$lang['name'] = 'Nume:'; -$lang['date'] = 'Data:'; -$lang['type'] = 'Tip:'; -$lang['desc'] = 'Descriere:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'A intervenit o eroare necunoscută.'; -$lang['error_download'] = 'Nu a fost posibilă descărcarea plugin-ului: %s'; -$lang['error_badurl'] = 'url suspectat ca fiind eronat - nu a putut fi determinat numele fişierului din url'; -$lang['error_dircreate'] = 'Nu a putut fi creat directorul temporar pentru descărcarea fişierului'; -$lang['error_decompress'] = 'Administratorul de plugin-uri nu a putut dezarhiva fişierul descărcat. Aceasta se poate datora unei erori la descărcare, caz în care trebuie să încercaţi din nou; sau formatul de arhivare este necunoscut, caz în care va trebui să descărcaţi şi să instalaţi plugin-ul manual.'; -$lang['error_copy'] = 'O eroare la copiere a apărut la instalarea fişierelor plugin-ului %s: discul poate fi plin sau drepturile de acces ale fişierelor sunt incorecte. Aceasta poate avea ca rezultat o instalare parţială a plugin-ului şi o instabilitate a instalării wiki.'; -$lang['error_delete'] = 'O eroare a apărut la ştergerea plugin-ului %s. Cea mai probabilă cauză sunt drepturile de acces insuficiente ale fişierului sau directorului.'; -$lang['enabled'] = 'Plugin %s activat.'; -$lang['notenabled'] = 'Plugin-ul %s nu poate fi activat, verificaţi permisiunile fişierului.'; -$lang['disabled'] = 'Plugin %s dezactivat.'; -$lang['notdisabled'] = 'Plugin-ul %s nu poate fi dezactivat, verificaţi permisiunile fişierului.'; -$lang['packageinstalled'] = 'Pachet modul (%d modul(e): %s) instalat cu succes.'; diff --git a/lib/plugins/plugin/lang/ru/admin_plugin.txt b/lib/plugins/plugin/lang/ru/admin_plugin.txt deleted file mode 100644 index 3e00e4150..000000000 --- a/lib/plugins/plugin/lang/ru/admin_plugin.txt +++ /dev/null @@ -1,5 +0,0 @@ -====== Управление плагинами ====== - -Здесь вы можете делать всё, что связано с [[doku>plugins|плагинами]] «ДокуВики». Для того, чтобы скачивать и устанавливать плагины, директория плагинов должна быть доступна для записи веб-сервером. - - diff --git a/lib/plugins/plugin/lang/ru/lang.php b/lib/plugins/plugin/lang/ru/lang.php deleted file mode 100644 index b933f7754..000000000 --- a/lib/plugins/plugin/lang/ru/lang.php +++ /dev/null @@ -1,66 +0,0 @@ - - * @author Andrew Pleshakov - * @author Змей Этерийский evil_snake@eternion.ru - * @author Hikaru Nakajima - * @author Alexei Tereschenko - * @author Irina Ponomareva irinaponomareva@webperfectionist.com - * @author Alexander Sorkin - * @author Kirill Krasnov - * @author Vlad Tsybenko - * @author Aleksey Osadchiy - * @author Aleksandr Selivanov - * @author Ladyko Andrey - * @author Eugene - * @author Johnny Utah - * @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua) - */ -$lang['menu'] = 'Управление плагинами'; -$lang['download'] = 'Скачать и установить новый плагин'; -$lang['manage'] = 'Установленные плагины'; -$lang['btn_info'] = 'данные'; -$lang['btn_update'] = 'обновить'; -$lang['btn_delete'] = 'удалить'; -$lang['btn_settings'] = 'настройки'; -$lang['btn_download'] = 'Скачать'; -$lang['btn_enable'] = 'Сохранить'; -$lang['url'] = 'Адрес'; -$lang['installed'] = 'Установлен:'; -$lang['lastupdate'] = 'Последнее обновление:'; -$lang['source'] = 'Источник:'; -$lang['unknown'] = 'неизвестно'; -$lang['updating'] = 'Обновление...'; -$lang['updated'] = 'Плагин %s успешно обновлён'; -$lang['updates'] = 'Следующие плагины были успешно обновлены'; -$lang['update_none'] = 'Обновления не найдены.'; -$lang['deleting'] = 'Удаление...'; -$lang['deleted'] = 'Плагин %s удалён.'; -$lang['downloading'] = 'Скачивание...'; -$lang['downloaded'] = 'Плагин %s успешно установлен'; -$lang['downloads'] = 'Следующие плагины были успешно установлены:'; -$lang['download_none'] = 'Плагины не найдены или возникла неизвестная проблема в процессе скачивания и установки.'; -$lang['plugin'] = 'Плагин:'; -$lang['components'] = 'Компоненты'; -$lang['noinfo'] = 'Этот плагин не сообщил никаких данных, он может быть нерабочим.'; -$lang['name'] = 'Название:'; -$lang['date'] = 'Дата:'; -$lang['type'] = 'Тип:'; -$lang['desc'] = 'Описание:'; -$lang['author'] = 'Автор:'; -$lang['www'] = 'Страница:'; -$lang['error'] = 'Произошла неизвестная ошибка.'; -$lang['error_download'] = 'Не могу скачать файл плагина: %s'; -$lang['error_badurl'] = 'Возможно неправильный адрес — не могу определить имя файла из адреса'; -$lang['error_dircreate'] = 'Не могу создать временную директорию для скачивания'; -$lang['error_decompress'] = 'Менеджеру плагинов не удалось распаковать скачанный файл. Это может быть результатом ошибки при скачивании, в этом случае вы можете попробовать снова, или же плагин упакован неизвестным архиватором, тогда вам необходимо скачать и установить плагин вручную.'; -$lang['error_copy'] = 'Произошла ошибка копирования при попытке установки файлов для плагина %s: переполнение диска или неправильные права доступа. Это могло привести к частичной установке плагина и неустойчивости работы вашей вики.'; -$lang['error_delete'] = 'Произошла ошибка при попытке удалить плагин %s. Наиболее вероятно, что нет необходимых прав доступа к файлам или директориям'; -$lang['enabled'] = 'Плагин %s включен.'; -$lang['notenabled'] = 'Не удалось включить плагин %s. Проверьте системные права доступа к файлам.'; -$lang['disabled'] = 'Плагин %s отключен.'; -$lang['notdisabled'] = 'Не удалось отключить плагин %s. Проверьте системные права доступа к файлам.'; -$lang['packageinstalled'] = 'Пакет (%d плагин(а): %s) успешно установлен.'; diff --git a/lib/plugins/plugin/lang/sk/admin_plugin.txt b/lib/plugins/plugin/lang/sk/admin_plugin.txt deleted file mode 100644 index ad3ae7f58..000000000 --- a/lib/plugins/plugin/lang/sk/admin_plugin.txt +++ /dev/null @@ -1,4 +0,0 @@ -====== Správa pluginov ====== - -Na tejto stránke je možné spravovať [[doku>plugins|pluginy]] Dokuwiki. Aby bolo možné sťahovať a inštalovať pluginy, musí mať webový server prístup pre zápis do adresára //plugin//. - diff --git a/lib/plugins/plugin/lang/sk/lang.php b/lib/plugins/plugin/lang/sk/lang.php deleted file mode 100644 index 35c07cf80..000000000 --- a/lib/plugins/plugin/lang/sk/lang.php +++ /dev/null @@ -1,55 +0,0 @@ - - * @author Michal Mesko - * @author exusik@gmail.com - * @author Martin Michalek - */ -$lang['menu'] = 'Správa pluginov'; -$lang['download'] = 'Stiahnuť a nainštalovať plugin'; -$lang['manage'] = 'Nainštalované pluginy'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'aktualizovať'; -$lang['btn_delete'] = 'zmazať'; -$lang['btn_settings'] = 'nastavenia'; -$lang['btn_download'] = 'Stiahnuť'; -$lang['btn_enable'] = 'Uložiť'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Nainštalovaný:'; -$lang['lastupdate'] = 'Aktualizovaný:'; -$lang['source'] = 'Zdroj:'; -$lang['unknown'] = 'neznámy'; -$lang['updating'] = 'Aktualizuje sa ...'; -$lang['updated'] = 'Plugin %s bol úspešne aktualizovaný'; -$lang['updates'] = 'Nasledujúce pluginy bol úspešne aktualizované:'; -$lang['update_none'] = 'Neboli nájdené žiadne aktualizácie.'; -$lang['deleting'] = 'Vymazáva sa ...'; -$lang['deleted'] = 'Plugin %s bol zmazaný.'; -$lang['downloading'] = 'Sťahuje sa ...'; -$lang['downloaded'] = 'Plugin %s bol úspešne stiahnutý'; -$lang['downloads'] = 'Nasledujúce pluginy bol úspešne stiahnuté:'; -$lang['download_none'] = 'Neboli nájdené žiadne pluginy alebo nastal neznámy problém počas sťahovania a inštalácie pluginov.'; -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Súčasti'; -$lang['noinfo'] = 'Tento plugin neobsahuje žiadne informácie, je možné, že je chybný.'; -$lang['name'] = 'názov:'; -$lang['date'] = 'Dátum:'; -$lang['type'] = 'Typ:'; -$lang['desc'] = 'Popis:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Nastala neznáma chyba.'; -$lang['error_download'] = 'Nie je možné stiahnuť súbor pluginu: %s'; -$lang['error_badurl'] = 'Pravdepodobne zlá url adresa - nie je možné z nej určiť meno súboru'; -$lang['error_dircreate'] = 'Nie je možné vytvoriť dočasný adresár pre uloženie sťahovaného súboru'; -$lang['error_decompress'] = 'Správca pluginov nedokáže dekomprimovať stiahnutý súbor. Môže to byť dôsledok zlého stiahnutia, v tom prípade to skúste znovu, alebo môže ísť o neznámy formát súboru, v tom prípade musíte stiahnuť a nainštalovať plugin manuálne.'; -$lang['error_copy'] = 'Nastala chyba kopírovania súboru počas pokusu inštalovať súbory pluginu%s: disk môže byť plný alebo prístupové práva k súboru môžu byť nesprávne. Toto môže mať za následok čiastočne nainštalovanie pluginu a nestabilitu vašej DokuWiki.'; -$lang['error_delete'] = 'Nastala chyba počas pokusu o zmazanie pluginu %s. Najpravdepodobnejším dôvodom môžu byť nedostatočné prístupové práva pre súbor alebo adresár'; -$lang['enabled'] = 'Plugin %s aktivovaný.'; -$lang['notenabled'] = 'Plugin %s nemôže byť aktivovaný, skontrolujte prístupové práva.'; -$lang['disabled'] = 'Plugin %s deaktivovaný.'; -$lang['notdisabled'] = 'Plugin %s nemôže byť deaktivovaný, skontrolujte prístupové práva.'; -$lang['packageinstalled'] = 'Plugin package (%d plugin(s): %s) úspešne inštalovaný.'; diff --git a/lib/plugins/plugin/lang/sl/admin_plugin.txt b/lib/plugins/plugin/lang/sl/admin_plugin.txt deleted file mode 100644 index 5fd02e1ba..000000000 --- a/lib/plugins/plugin/lang/sl/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Upravljanje vstavkov ====== - -Na tej strani je mogoče spreminjati in prilagajati nastavitve DokuWiki [[doku>plugins|vstavkov]]. Za prejemanje in nameščanje vstavkov v ustrezne mape, morajo imeti te določena ustrezna dovoljenja za pisanje spletnega strežnika. diff --git a/lib/plugins/plugin/lang/sl/lang.php b/lib/plugins/plugin/lang/sl/lang.php deleted file mode 100644 index e205c57f5..000000000 --- a/lib/plugins/plugin/lang/sl/lang.php +++ /dev/null @@ -1,55 +0,0 @@ - - * @author Boštjan Seničar - * @author Gregor Skumavc (grega.skumavc@gmail.com) - * @author Matej Urbančič (mateju@svn.gnome.org) - */ -$lang['menu'] = 'Upravljanje vstavkov'; -$lang['download'] = 'Prejmi in namesti nov vstavek'; -$lang['manage'] = 'Nameščeni vstavki'; -$lang['btn_info'] = 'Podrobnosti'; -$lang['btn_update'] = 'Posodobi'; -$lang['btn_delete'] = 'Izbriši'; -$lang['btn_settings'] = 'Nastavitve'; -$lang['btn_download'] = 'Prejmi'; -$lang['btn_enable'] = 'Shrani'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Nameščeno:'; -$lang['lastupdate'] = 'Nazadnje posodobljeno:'; -$lang['source'] = 'Vir:'; -$lang['unknown'] = 'neznano'; -$lang['updating'] = 'Posodabljanje ...'; -$lang['updated'] = 'Vstavek %s je uspešno posodobljen'; -$lang['updates'] = 'Navedeni vstavki so uspešno posodobljeni'; -$lang['update_none'] = 'Posodobitev ni mogoče najti.'; -$lang['deleting'] = 'Brisanje ...'; -$lang['deleted'] = 'Vstavek %s je izbrisan.'; -$lang['downloading'] = 'Prejemanje ...'; -$lang['downloaded'] = 'Vstavek %s je uspešno nameščen'; -$lang['downloads'] = 'Navedeni vstavki so uspešno nameščeni:'; -$lang['download_none'] = 'Vstavkov ni mogoče najti ali pa je prišlo do napake med prejemanjem in nameščanjem.'; -$lang['plugin'] = 'Vstavek:'; -$lang['components'] = 'Sestavni deli'; -$lang['noinfo'] = 'Vstavek nima vpisanih podrobnih podatkov, kar pomeni, da je morda neveljaven.'; -$lang['name'] = 'Ime:'; -$lang['date'] = 'Datum:'; -$lang['type'] = 'Vrsta:'; -$lang['desc'] = 'Opis:'; -$lang['author'] = 'Avtor:'; -$lang['www'] = 'Spletna stran:'; -$lang['error'] = 'Prišlo je do neznane napake.'; -$lang['error_download'] = 'Ni mogoče prejeti datoteke vstavka: %s'; -$lang['error_badurl'] = 'Napaka naslova URL - ni mogoče določiti imena datoteke iz naslova URL'; -$lang['error_dircreate'] = 'Ni mogoče ustvariti začasne mape za prejemanje'; -$lang['error_decompress'] = 'Z upravljalnikom vstavkov ni mogoče razširiti prejetega arhiva vstavka. Najverjetneje je prišlo do napake med prejemanjem datoteke ali pa zapis arhiva ni znan. Poskusite znova ali pa napako odpravite z ročnim nameščanjem vstavka.'; -$lang['error_copy'] = 'Prišlo je do napake med nameščanjem datotek vstavka %s: najverjetneje so težave s prostorom za namestitev ali pa ni ustreznih dovoljenj za nameščanje. Zaradi nepopolne namestitve lahko nastopijo težave v delovanju sistema Wiki.'; -$lang['error_delete'] = 'Prišlo je do napake med brisanjem vstavka %s: najverjetneje ni ustreznih dovoljenj za dostop do datoteke ali mape'; -$lang['enabled'] = 'Vstavek %s je omogočen.'; -$lang['notenabled'] = 'Vstavka %s ni mogoče omogočiti zaradi neustreznih dovoljen.'; -$lang['disabled'] = 'Vstavek %s je onemogočen.'; -$lang['notdisabled'] = 'Vstavka %s ni mogoče onemogočiti zaradi neustreznih dovoljen.'; -$lang['packageinstalled'] = 'Paket vstavka (%d vstavkov: %s) je uspešno nameščen.'; diff --git a/lib/plugins/plugin/lang/sq/admin_plugin.txt b/lib/plugins/plugin/lang/sq/admin_plugin.txt deleted file mode 100644 index 2e1f19234..000000000 --- a/lib/plugins/plugin/lang/sq/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Menaxhimi i Plugin-eve ====== - -Në këtë faqe mund të menaxhoni çdo gjë që ka të bëjë me [[doku>plugins|plugin-et]] Dokuwiki. Që të jetë në gjendje për të shkarkuar dhe instaluar një plugin, dosja e plugin-it duhet të jetë e shkrueshme nga webserver-i. \ No newline at end of file diff --git a/lib/plugins/plugin/lang/sq/lang.php b/lib/plugins/plugin/lang/sq/lang.php deleted file mode 100644 index 9ddcf527f..000000000 --- a/lib/plugins/plugin/lang/sq/lang.php +++ /dev/null @@ -1,50 +0,0 @@ -%s: disku mund të jetë plotë ose të drejtat për aksesim skedari mund të jenë të gabuara. Kjo mund të ketë shkaktuar një instalim të pjesshëm të plugin-it dhe ta lërë instalimin e wiki-t tënd të paqëndrueshëm.'; -$lang['error_delete'] = 'Ndodhi një gabim gjatë përpjekjes për të fshirë plugin-in %s. Shkaku më i mundshëm është të drejta të pamjaftueshme për aksesim skedari ose dosjeje.'; -$lang['enabled'] = 'Plugini %s u aktivizua.'; -$lang['notenabled'] = 'Plugini %s nuk mundi të aktivizohej, kontrollo të drejtat e aksesit për skedarin.'; -$lang['disabled'] = 'Plugin %s është i paaktivizuar.'; -$lang['notdisabled'] = 'Plugini %s nuk mundi të çaktivizohej, kontrollo të drejtat e aksesit për skedarin.'; diff --git a/lib/plugins/plugin/lang/sr/admin_plugin.txt b/lib/plugins/plugin/lang/sr/admin_plugin.txt deleted file mode 100644 index 6262ece40..000000000 --- a/lib/plugins/plugin/lang/sr/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Управљач додацима ====== - -На овој страни можете управљати са свим у вези DokuWiki [[doku>plugins|додацима]]. Да бисте имали могућност преузимања и инсталирања додатака, фасцикла за додатке мора имати дозволу за писање. \ No newline at end of file diff --git a/lib/plugins/plugin/lang/sr/lang.php b/lib/plugins/plugin/lang/sr/lang.php deleted file mode 100644 index bc22770a1..000000000 --- a/lib/plugins/plugin/lang/sr/lang.php +++ /dev/null @@ -1,52 +0,0 @@ - - * @author Miroslav Šolti - */ -$lang['menu'] = 'Управљач додацима'; -$lang['download'] = 'Преузми и инсталирај нови додатак'; -$lang['manage'] = 'Инсталирани додаци'; -$lang['btn_info'] = 'инфо'; -$lang['btn_update'] = 'ажурирај'; -$lang['btn_delete'] = 'обриши'; -$lang['btn_settings'] = 'поставке'; -$lang['btn_download'] = 'Преузми'; -$lang['btn_enable'] = 'Сачувај'; -$lang['url'] = 'УРЛ'; -$lang['installed'] = 'Инсталирани:'; -$lang['lastupdate'] = 'Последњи пут ажурирани:'; -$lang['source'] = 'Извор:'; -$lang['unknown'] = 'непознат'; -$lang['updating'] = 'Ажурирање:'; -$lang['updated'] = 'Додатак %s је успешно ажуриран'; -$lang['updates'] = 'Следећи додаци су успешно ажурирани'; -$lang['update_none'] = 'Нема доступних ажурирања.'; -$lang['deleting'] = 'Брисање...'; -$lang['deleted'] = 'Додатак %s је обрисан.'; -$lang['downloading'] = 'Преузимање...'; -$lang['downloaded'] = 'Додатак %s је успешно инсталиран'; -$lang['downloads'] = 'Следећи додаци су успешно инсталирани:'; -$lang['download_none'] = 'Нема додатака, или се јавио непознат проблем током преузимања или инсталирања.'; -$lang['plugin'] = 'Додатак:'; -$lang['components'] = 'Компоненте'; -$lang['noinfo'] = 'Овај додатак не враћа никакве информације, можда је неисправан.'; -$lang['name'] = 'Име:'; -$lang['date'] = 'Датум:'; -$lang['type'] = 'Врста:'; -$lang['desc'] = 'Опис:'; -$lang['author'] = 'Аутор:'; -$lang['www'] = 'Веб:'; -$lang['error'] = 'Десила се непозната грешка.'; -$lang['error_download'] = 'Немогуће је преузети додатак: %s'; -$lang['error_badurl'] = 'Сумњам на лош УРЛ - немогу да одредим назив датотеке '; -$lang['error_dircreate'] = 'Немогућност прављења привремене фасцикле за преузимање'; -$lang['error_decompress'] = 'Управљач додацима није у могућности да распакује преузету датотеку. Разлог може да буде лошег преузимања, у том случају пробајте још једном; или је непознат облик компресије, у том случају ручно преузмите и инсталирајте додатак.'; -$lang['error_copy'] = 'Појавила се грешка у копирању у току иснталације додатка %s: складиште је можда пуно или дозволе за уписивање нису постављене како треба. Резултат може бити делимично инсталиран додатак и вики у нестабилном стању.'; -$lang['error_delete'] = 'Појавила се грешка у покушају брисања додатка %s. Нејчешћи узрок је недостатак потребних дозвола за операције са датотекама или фасциклама'; -$lang['enabled'] = 'Додатај %s је укључен.'; -$lang['notenabled'] = 'Додатак %s није могуће укључити, проверите дозволе приступа.'; -$lang['disabled'] = 'Додатај %s је исукључен.'; -$lang['notdisabled'] = 'Додатак %s није могуће исукључити, проверите дозволе приступа.'; diff --git a/lib/plugins/plugin/lang/sv/admin_plugin.txt b/lib/plugins/plugin/lang/sv/admin_plugin.txt deleted file mode 100644 index e490e5e60..000000000 --- a/lib/plugins/plugin/lang/sv/admin_plugin.txt +++ /dev/null @@ -1,5 +0,0 @@ -====== Hantera insticksmoduler ====== - -På den här sidan kan man hantera allting som har att göra med Dokuwikis [[doku>plugins|insticksmoduler]]. För att man ska kunna ladda ned och installera en modul måste katalogen för insticksmoduler vara skrivbar av webbservern. - - diff --git a/lib/plugins/plugin/lang/sv/lang.php b/lib/plugins/plugin/lang/sv/lang.php deleted file mode 100644 index b7c23743b..000000000 --- a/lib/plugins/plugin/lang/sv/lang.php +++ /dev/null @@ -1,64 +0,0 @@ - - * @author Nicklas Henriksson - * @author Håkan Sandell - * @author Dennis Karlsson - * @author Tormod Otter Johansson - * @author emil@sys.nu - * @author Pontus Bergendahl - * @author Tormod Johansson tormod.otter.johansson@gmail.com - * @author Emil Lind - * @author Bogge Bogge - * @author Peter Åström - * @author mikael@mallander.net - * @author Smorkster Andersson smorkster@gmail.com - */ -$lang['menu'] = 'Hantera insticksmoduler'; -$lang['download'] = 'Ladda ned och installera en ny insticksmodul'; -$lang['manage'] = 'Installerade insticksmoduler'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'uppdatera'; -$lang['btn_delete'] = 'radera'; -$lang['btn_settings'] = 'inställningar'; -$lang['btn_download'] = 'Ladda ned'; -$lang['btn_enable'] = 'Spara'; -$lang['url'] = 'Webbadress'; -$lang['installed'] = 'Installerad:'; -$lang['lastupdate'] = 'Senast uppdaterad:'; -$lang['source'] = 'Källa:'; -$lang['unknown'] = 'okänd'; -$lang['updating'] = 'Uppdaterar ...'; -$lang['updated'] = 'Insticksmodulen %s uppdaterades'; -$lang['updates'] = 'Följande Insticksmoduler har uppdaterats'; -$lang['update_none'] = 'Inga uppdateringar hittades.'; -$lang['deleting'] = 'Raderar ...'; -$lang['deleted'] = 'Insticksmodulen %s raderad.'; -$lang['downloading'] = 'Laddar ned ...'; -$lang['downloaded'] = 'Insticksmodulen %s installerades'; -$lang['downloads'] = 'Följande insticksmoduler har installerats:'; -$lang['download_none'] = 'Inga insticksmoduler hittades, eller så har det uppstått ett okänt fel under nedladdning och installation.'; -$lang['plugin'] = 'Insticksmodul:'; -$lang['components'] = 'Komponenter'; -$lang['noinfo'] = 'Den här insticksmodulen returnerade ingen information, den kan vara ogiltig.'; -$lang['name'] = 'Namn:'; -$lang['date'] = 'Datum:'; -$lang['type'] = 'Typ:'; -$lang['desc'] = 'Beskrivning:'; -$lang['author'] = 'Författare:'; -$lang['www'] = 'Webb:'; -$lang['error'] = 'Ett okänt fel har inträffat.'; -$lang['error_download'] = 'Kan inte ladda ned fil till insticksmodul: %s'; -$lang['error_badurl'] = 'Misstänkt felaktig webbadress - kan inte bestämma filnamnet från webbadressen'; -$lang['error_dircreate'] = 'Kan inte skapa tillfällig katalog för nedladdade filer'; -$lang['error_decompress'] = 'Hanteraren för insticksmoduler kunde inte dekomprimera den nedladdade filen. Detta kan vara resultatet av en misslyckad nedladdning, och i så fall bör du försöka igen; eller så kan det komprimerade formatet vara okänt, och då måste du ladda ned och installera insticksmodulen manuellt.'; -$lang['error_copy'] = 'Ett filkopieringsfel uppstod under försöket att installera filerna till insticksmodulen %s: disken kan vara full eller så kan filskyddet vara felaktigt. Detta kan ha lett till en delvis installerad insticksmodul, och gjort din wiki-installation instabil.'; -$lang['error_delete'] = 'Ett fel uppstod vid försöket att radera insticksmodulen %s. Den troligaste orsaken är otillräcklig behörighet till filer eller kataloger'; -$lang['enabled'] = 'Tilläggsmodulen %s är aktiverad.'; -$lang['notenabled'] = 'Tilläggsmodulen %s kunde inte aktiveras, kontrollera filrättigheterna.'; -$lang['disabled'] = 'Tiläggsmodulen %s är avaktiverad.'; -$lang['notdisabled'] = 'Tilläggsmodulen %s kunde inte avaktiveras, kontrollera filrättigheterna.'; -$lang['packageinstalled'] = 'Tilläggs paket (%d tillägg: %s) har installerats.'; diff --git a/lib/plugins/plugin/lang/th/admin_plugin.txt b/lib/plugins/plugin/lang/th/admin_plugin.txt deleted file mode 100644 index 8611654be..000000000 --- a/lib/plugins/plugin/lang/th/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== ตัวจัดการโปรแกรมเสริม ====== - -ในหน้านี้คุณสามารถจัดการทุกๆอย่างที่จะต้องทำงานกับ [[doku>plugins|plugins]]โดกุวิกิ เพื่อที่จะสามารถดาวน์โหลดและติดตั้งโปรแกรมเสริม ตัวโฟลเดอร์โปรแกรมเสริม(plugin) จะต้องสามารถเขียนได้โดยเว็บเซิร์ฟเวอร์ \ No newline at end of file diff --git a/lib/plugins/plugin/lang/th/lang.php b/lib/plugins/plugin/lang/th/lang.php deleted file mode 100644 index dab094bcd..000000000 --- a/lib/plugins/plugin/lang/th/lang.php +++ /dev/null @@ -1,50 +0,0 @@ - - * @author Kittithat Arnontavilas mrtomyum@gmail.com - * @author Arthit Suriyawongkul - * @author Kittithat Arnontavilas - * @author Thanasak Sompaisansin - */ -$lang['menu'] = 'จัดการปลั๊กอิน'; -$lang['download'] = 'ดาวน์โหลดและติดตั้งปลั๊กอินใหม่'; -$lang['manage'] = 'ปลั๊กอินที่ติดตั้งไว้แล้ว'; -$lang['btn_info'] = 'ข้อมูล'; -$lang['btn_update'] = 'ปรับปรุง'; -$lang['btn_delete'] = 'ลบ'; -$lang['btn_settings'] = 'ตั้งค่า'; -$lang['btn_download'] = 'ดาวน์โหลด'; -$lang['btn_enable'] = 'บันทึก'; -$lang['url'] = 'ที่อยู่เว็บ'; -$lang['installed'] = 'ติดตั้งแล้ว:'; -$lang['lastupdate'] = 'ปรับปรุงล่าสุด:'; -$lang['source'] = 'ต้นกำเนิด'; -$lang['unknown'] = 'ไม่มีข้อมูล'; -$lang['updating'] = 'กำลังปรับปรุง ...'; -$lang['updated'] = 'โปรแกรมเสริม %s ได้รับการปรับปรุงสำเร็จแล้ว'; -$lang['updates'] = 'โปรแกรมเสริมต่อไปนี้ได้รับการปรับปรุงสำเร็จแล้ว'; -$lang['update_none'] = 'ไม่พบการปรับปรุงใดๆ'; -$lang['deleting'] = 'กำลังลบ ...'; -$lang['deleted'] = 'โปรแกรมเสริม %s ถูกลบแล้ว'; -$lang['downloading'] = 'กำลังดาวโหลด ...'; -$lang['downloaded'] = 'โปรแกรมเสริม %s ถูกติดตั้งสำเร็จแล้ว'; -$lang['downloads'] = 'โปรแกรมเสริมต่อไปนี้ได้รับการปรับปรุงสำเร็จแล้ว:'; -$lang['download_none'] = 'ไม่พบโปรแกรมเสริม, หรือมีปัญหาบางประการเกิดขึ้นระหว่างการดาวน์โหลด และติดตั้ง'; -$lang['plugin'] = 'โปรแกรมเสริม:'; -$lang['components'] = '่สวนประกอบ'; -$lang['noinfo'] = 'โปรแกรมเสริมนี้ไม่บอกข้อมูล, มันอาจไม่ใช่โปรแกรมเสริมจริง'; -$lang['name'] = 'ชื่อ:'; -$lang['date'] = 'วันที่:'; -$lang['type'] = 'ชนิด:'; -$lang['desc'] = 'รายละเอียด:'; -$lang['author'] = 'ผู้แต่ง:'; -$lang['www'] = 'เว็บ:'; -$lang['error'] = 'เกิดความผิดพลาดที่ระบุไม่ได้'; -$lang['error_download'] = 'ไม่สามารถดาวน์โหลดไฟล์โปรแกรมเสริม: %s'; -$lang['error_dircreate'] = 'ไม่สามารถสร้างโฟลเดอร์ชั่วคราวเพื่อที่จะรองรับการดาวน์โหลด'; -$lang['enabled'] = 'เปิดใช้งานโปรแกรมเสริม %s แล้ว'; -$lang['notenabled'] = 'โปรแกรมเสริม %s ไม่สามารถเปิดใช้งาน, กรุณาตรวจสอบสิทธิ์ของไฟล์'; -$lang['disabled'] = 'ปิดการใช้งานโปรแกรมเสริม %s แล้ว'; -$lang['notdisabled'] = 'โปรแกรมเสริม %s ไม่สามารถปิดการใช้งานได้, กรุณาตรวจสอบสิทธิ์ของไฟล์'; diff --git a/lib/plugins/plugin/lang/tr/admin_plugin.txt b/lib/plugins/plugin/lang/tr/admin_plugin.txt deleted file mode 100644 index 956d701f6..000000000 --- a/lib/plugins/plugin/lang/tr/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Eklenti Yönetimi ====== - -Bu sayfada DokuWiki [[doku>plugins|eklentileri]] ile ilgili herşeyi düzenleyebilirsiniz. Eklenti kurup indirmek için, eklenti dizininin yazılabilir olması gerekmektedir. diff --git a/lib/plugins/plugin/lang/tr/lang.php b/lib/plugins/plugin/lang/tr/lang.php deleted file mode 100644 index a4feea8cd..000000000 --- a/lib/plugins/plugin/lang/tr/lang.php +++ /dev/null @@ -1,55 +0,0 @@ - - * @author Cihan Kahveci - * @author Yavuz Selim - * @author Caleb Maclennan - * @author farukerdemoncel@gmail.com - */ -$lang['menu'] = 'Eklenti Yönetimi'; -$lang['download'] = 'Yeni bir eklenti indirip kur'; -$lang['manage'] = 'Kurulmuş Eklentiler'; -$lang['btn_info'] = 'bilgi'; -$lang['btn_update'] = 'güncelle'; -$lang['btn_delete'] = 'sil'; -$lang['btn_settings'] = 'Ayarlar'; -$lang['btn_download'] = 'İndir'; -$lang['btn_enable'] = 'Kaydet'; -$lang['url'] = 'Web Adresi'; -$lang['installed'] = 'Kuruldu:'; -$lang['lastupdate'] = 'Son güncelleştirme:'; -$lang['source'] = 'Kaynak:'; -$lang['unknown'] = 'bilinmiyor'; -$lang['updating'] = 'Güncelleştiriyor ...'; -$lang['updated'] = '%s eklentisi başarıyla güncellendi'; -$lang['updates'] = 'Şu eklentiler başarıyla güncellendi'; -$lang['update_none'] = 'Yeni bir güncelleme bulunamadı.'; -$lang['deleting'] = 'Siliniyor ...'; -$lang['deleted'] = '%s eklentisi silindi.'; -$lang['downloading'] = 'İndiriyor ...'; -$lang['downloaded'] = '%s eklentisi başarıyla kuruldu'; -$lang['downloads'] = 'Şu eklentiler başarıyla kuruldu:'; -$lang['download_none'] = 'Eklenti bulunamadı veya indirirken/kurarken bilinmeyen bir hata oluştu.'; -$lang['plugin'] = 'Eklenti:'; -$lang['components'] = 'Parçalar'; -$lang['noinfo'] = 'Bu eklentinin bilgileri alınamadı, geçerli bir eklenti olmayabilir.'; -$lang['name'] = 'Ad:'; -$lang['date'] = 'Tarih:'; -$lang['type'] = 'Tür:'; -$lang['desc'] = 'Açıklama:'; -$lang['author'] = 'Yazar:'; -$lang['www'] = 'Web Adresi:'; -$lang['error'] = 'Bilinmeyen bir hata oluştu.'; -$lang['error_download'] = 'Şu eklenti indirilemedi: %s'; -$lang['error_badurl'] = 'Yanlış adres olabilir - verilen adresten dosya adı alınamadı'; -$lang['error_dircreate'] = 'İndirmek için geçici klasör oluşturulamadı'; -$lang['error_decompress'] = 'Eklenti yöneticisi indirilen sıkıştırılmış dosyayı açamadı. Bu yanlış indirmeden kaynaklanabilir (bu durumda tekrar denemelisiniz). Ya da indirilen dosyanın sıkıştırma biçimi bilinmemektedir (bu durumda eklentiyi indirerek kendiniz kurmalısınız).'; -$lang['error_copy'] = '%s eklentisi dosyalarını kurmaya çalışırken kopyalama hatası ortaya çıktı. Sürücü dolu olabilir veya yazma yetkisi bulunmuyor olabilir. Bunun sebebi tam kurulmamış bir eklentinin wiki kurulumunu bozması olabilir.'; -$lang['error_delete'] = '%s eklentisini silerken bir hata oluştu. Bu hata yetersiz dosya/klasör erişim yetkisinden kaynaklanabilir.'; -$lang['enabled'] = '%s eklentisi etkinleştirildi.'; -$lang['notenabled'] = '%s eklentisi etkinleştirilemedi, dosya yetkilerini kontrol edin.'; -$lang['disabled'] = '%s eklentisi devre dışı bırakıldı.'; -$lang['notdisabled'] = '%s eklentisi devre dışı bırakılamadı, dosya yetkilerini kontrol edin.'; diff --git a/lib/plugins/plugin/lang/uk/admin_plugin.txt b/lib/plugins/plugin/lang/uk/admin_plugin.txt deleted file mode 100644 index 7bdf8e5e5..000000000 --- a/lib/plugins/plugin/lang/uk/admin_plugin.txt +++ /dev/null @@ -1,7 +0,0 @@ -====== Керування доданками ====== - -Тут ви можете керувати [[doku>plugins|доданками]] ДокуВікі. Для того, щоб завантажувати та встановлювати доданки, папка доданків повинна бути доступна для запису веб-сервером. - - - - diff --git a/lib/plugins/plugin/lang/uk/lang.php b/lib/plugins/plugin/lang/uk/lang.php deleted file mode 100644 index c6d5990fc..000000000 --- a/lib/plugins/plugin/lang/uk/lang.php +++ /dev/null @@ -1,58 +0,0 @@ - - * @author Uko uko@uar.net - * @author Ulrikhe Lukoie .com - * @author Kate Arzamastseva pshns@ukr.net - */ -$lang['menu'] = 'Керування доданками'; -$lang['download'] = 'Завантажити та встановити новий доданок'; -$lang['manage'] = 'Встановлені доданки'; -$lang['btn_info'] = 'дані'; -$lang['btn_update'] = 'оновити'; -$lang['btn_delete'] = 'видалити'; -$lang['btn_settings'] = 'параметри'; -$lang['btn_download'] = 'Завантажити'; -$lang['btn_enable'] = 'Зберегти'; -$lang['url'] = 'Адреса'; -$lang['installed'] = 'Встановлено:'; -$lang['lastupdate'] = 'Останнє оновлення:'; -$lang['source'] = 'Джерело:'; -$lang['unknown'] = 'невідомо'; -$lang['updating'] = 'Оновлення ...'; -$lang['updated'] = 'Доданок %s успішно оновлено'; -$lang['updates'] = 'Наступні доданки були успішно оновлені'; -$lang['update_none'] = 'Оновлення не знайдено.'; -$lang['deleting'] = 'Видалення ...'; -$lang['deleted'] = 'Доданок %s видалено.'; -$lang['downloading'] = 'Завантаження ...'; -$lang['downloaded'] = 'Доданок %s успішно встановлено'; -$lang['downloads'] = 'Наступні доданки були успішно встановлені:'; -$lang['download_none'] = 'Доданки не знайдено або виникла невідома проблема в процессі завантаження та установки.'; -$lang['plugin'] = 'Доданок:'; -$lang['components'] = 'Компоненти'; -$lang['noinfo'] = 'Цей доданок не повідомив ніяких даних, він може бути не працюючим.'; -$lang['name'] = 'Назва:'; -$lang['date'] = 'Дата:'; -$lang['type'] = 'Тип:'; -$lang['desc'] = 'Опис:'; -$lang['author'] = 'Автор:'; -$lang['www'] = 'Сторінка:'; -$lang['error'] = 'Виникла невідома помилка.'; -$lang['error_download'] = 'Не можу завантажити файл доданка: %s'; -$lang['error_badurl'] = 'Можливо, невірна адреса - не можливо визначити ім\'я файлу з адреси'; -$lang['error_dircreate'] = 'Не можливо створити тимчасову папку для завантаження'; -$lang['error_decompress'] = 'Менеджеру доданків не вдалося розпакувати завантажений файл. Це може бути результатом помилки при завантаженні, в цьому разі ви можете спробувати знову; або ж доданок упакований невідомим архіватором, тоді вам необхідно завантажити та встановити доданок вручну.'; -$lang['error_copy'] = 'Виникла помилка копіювання при спробі установки файлів для доданка %s: переповнення диску або невірні права доступу. Це могло привести до часткової установки доданка и нестійкості вашої Вікі.'; -$lang['error_delete'] = 'При спробі вилучення доданка %s виникла помилка. Найбільш вірогідно, що немає необхідних прав доступу до файлів або директорії'; -$lang['enabled'] = 'Доданок %s увімкнено.'; -$lang['notenabled'] = 'Не вдається увімкнути доданок %s. Перевірте права доступу до файлу.'; -$lang['disabled'] = 'Доданок %s вимкнено.'; -$lang['notdisabled'] = 'Не вдається вимкнути доданок %s. Перевірте права доступу до файлу.'; -$lang['packageinstalled'] = 'Пакет плагінів (%d plugin(s): %s) успішно встановлений.'; diff --git a/lib/plugins/plugin/lang/vi/lang.php b/lib/plugins/plugin/lang/vi/lang.php deleted file mode 100644 index 2933d8875..000000000 --- a/lib/plugins/plugin/lang/vi/lang.php +++ /dev/null @@ -1,5 +0,0 @@ -plugins|附加元件]] 相關的選項。若要正常下載及安裝附加元件,附加元件所在的資料夾必須允許網頁伺服器寫入。 \ No newline at end of file diff --git a/lib/plugins/plugin/lang/zh-tw/lang.php b/lib/plugins/plugin/lang/zh-tw/lang.php deleted file mode 100644 index bc84059fd..000000000 --- a/lib/plugins/plugin/lang/zh-tw/lang.php +++ /dev/null @@ -1,60 +0,0 @@ - - * @author http://www.chinese-tools.com/tools/converter-simptrad.html - * @author Wayne San - * @author Li-Jiun Huang - * @author Cheng-Wei Chien - * @author Danny Lin - * @author Shuo-Ting Jian - * @author syaoranhinata@gmail.com - * @author Ichirou Uchiki - */ -$lang['menu'] = '管理附加元件'; -$lang['download'] = '下載與安裝附加元件'; -$lang['manage'] = '已安裝的附加元件'; -$lang['btn_info'] = '資訊'; -$lang['btn_update'] = '更新'; -$lang['btn_delete'] = '刪除'; -$lang['btn_settings'] = '設定'; -$lang['btn_download'] = '下載'; -$lang['btn_enable'] = '儲存'; -$lang['url'] = 'URL'; -$lang['installed'] = '安裝:'; -$lang['lastupdate'] = '上次更新:'; -$lang['source'] = '來源:'; -$lang['unknown'] = '未知'; -$lang['updating'] = '更新中……'; -$lang['updated'] = '已更新附加元件 %s '; -$lang['updates'] = '已更新下列附加元件'; -$lang['update_none'] = '找不到更新。'; -$lang['deleting'] = '刪除中……'; -$lang['deleted'] = '已刪除附加元件 %s 。'; -$lang['downloading'] = '下載中……'; -$lang['downloaded'] = '已安裝附加元件 %s '; -$lang['downloads'] = '已安裝下列附加元件:'; -$lang['download_none'] = '找不到附加元件,或者在下載與安裝時發生了未知的問題。'; -$lang['plugin'] = '附加元件:'; -$lang['components'] = '元件'; -$lang['noinfo'] = '此附加元件沒有回傳任何資訊,它可能已失效。'; -$lang['name'] = '名稱:'; -$lang['date'] = '日期:'; -$lang['type'] = '類型:'; -$lang['desc'] = '描述:'; -$lang['author'] = '作者:'; -$lang['www'] = '網頁:'; -$lang['error'] = '發生了未知的錯誤。'; -$lang['error_download'] = '無法下載附加元件檔案: %s'; -$lang['error_badurl'] = 'URL 可能有問題 —— 從 URL 中無法得知文件名'; -$lang['error_dircreate'] = '無法建立暫存目錄來接收下載的內容'; -$lang['error_decompress'] = '附加元件管理器無法把下載的文件解壓,這可能是由於下載出現錯誤。遇到這種情況,請您再次嘗試。此外,無法識別壓縮格式也可能導致無法解壓。若是如此,您需要手動下載並安裝該附加元件。'; -$lang['error_copy'] = '嘗試安裝附加元件 %s 的相關文件時,發生複製錯誤。這可能是磁碟空間不足,或檔案存取權限錯誤。未安裝好的附加元件,也許會令wiki系統不穩定。'; -$lang['error_delete'] = '嘗試刪除附加元件 %s 時發生錯誤。最有可能原因是檔案或目錄存取權限不足'; -$lang['enabled'] = '附加元件 %s 已啟用。'; -$lang['notenabled'] = '附加元件 %s 無法啟用,請檢查檔案權限。'; -$lang['disabled'] = '附加元件 %s 已停用。'; -$lang['notdisabled'] = '附加元件 %s 無法停用,請檢查檔案權限。'; -$lang['packageinstalled'] = '附加元件 (%d 附加元件: %s) 已安裝好。'; diff --git a/lib/plugins/plugin/lang/zh/admin_plugin.txt b/lib/plugins/plugin/lang/zh/admin_plugin.txt deleted file mode 100644 index 1618071a4..000000000 --- a/lib/plugins/plugin/lang/zh/admin_plugin.txt +++ /dev/null @@ -1,5 +0,0 @@ -====== 插件管理器 ====== - -本页中您可以管理与 Dokuwiki [[doku>plugins|插件]] 相关的选项。 要通过插件管理器正常下载并安装插件,插件所在的文件夹必须可写。 - - diff --git a/lib/plugins/plugin/lang/zh/lang.php b/lib/plugins/plugin/lang/zh/lang.php deleted file mode 100644 index b39c6b063..000000000 --- a/lib/plugins/plugin/lang/zh/lang.php +++ /dev/null @@ -1,64 +0,0 @@ - - * @author http://www.chinese-tools.com/tools/converter-tradsimp.html - * @author George Sheraton guxd@163.com - * @author Simon zhan - * @author mr.jinyi@gmail.com - * @author ben - * @author lainme - * @author caii - * @author Hiphen Lee - * @author caii, patent agent in China - * @author lainme993@gmail.com - * @author Shuo-Ting Jian - * @author anjianshi - */ -$lang['menu'] = '插件管理器'; -$lang['download'] = '下载并安装新的插件'; -$lang['manage'] = '已安装的插件'; -$lang['btn_info'] = '信息'; -$lang['btn_update'] = '升级'; -$lang['btn_delete'] = '删除'; -$lang['btn_settings'] = '设置'; -$lang['btn_download'] = '下载'; -$lang['btn_enable'] = '保存'; -$lang['url'] = 'URL'; -$lang['installed'] = '安装时间:'; -$lang['lastupdate'] = '最后更新于:'; -$lang['source'] = '来源:'; -$lang['unknown'] = '未知'; -$lang['updating'] = '正在升级...'; -$lang['updated'] = '插件 %s 升级成功'; -$lang['updates'] = '下列插件升级成功:'; -$lang['update_none'] = '未找到更新。'; -$lang['deleting'] = '正在删除...'; -$lang['deleted'] = '插件 %s 已删除'; -$lang['downloading'] = '正在下载...'; -$lang['downloaded'] = '插件 %s 安装成功'; -$lang['downloads'] = '下列插件安装成功:'; -$lang['download_none'] = '未找到插件,或下载和安装过程中出现了未知错误。'; -$lang['plugin'] = '插件:'; -$lang['components'] = '组件'; -$lang['noinfo'] = '该插件没有任何信息,有可能是无效插件。'; -$lang['name'] = '名称:'; -$lang['date'] = '日期:'; -$lang['type'] = '类别:'; -$lang['desc'] = '描述:'; -$lang['author'] = '作者:'; -$lang['www'] = '网址:'; -$lang['error'] = '产生了未知错误。'; -$lang['error_download'] = '无法下载插件:%s'; -$lang['error_badurl'] = 'URL 可能有问题 - 从 URL 中无法得知文件名'; -$lang['error_dircreate'] = '无法创建用于接收下载文件的'; -$lang['error_decompress'] = '插件管理器无法解压下载的文件。这可能是由于下载出现错误,遇到这种情况,请您再次尝试;或者是压缩格式无法识别,遇到这种情况,您需要手动下载并安装该插件。'; -$lang['error_copy'] = '尝试安装插件 %s 的相关文件时产生一个复制错误:磁盘空间已满或文件访问权限错误。这可能是由于一个安装了一部分的插件,并使得您的维基系统不稳定。'; -$lang['error_delete'] = '尝试删除插件 %s 时产生一个错误。最有可能的情况是文件或路径的访问权限不够'; -$lang['enabled'] = '%s 插件启用'; -$lang['notenabled'] = '%s插件启用失败,请检查文件权限。'; -$lang['disabled'] = '%s 插件禁用'; -$lang['notdisabled'] = '%s插件禁用失败,请检查文件权限。'; -$lang['packageinstalled'] = '插件 (%d 插件: %s) 已成功安装。'; diff --git a/lib/plugins/plugin/plugin.info.txt b/lib/plugins/plugin/plugin.info.txt deleted file mode 100644 index cdf866842..000000000 --- a/lib/plugins/plugin/plugin.info.txt +++ /dev/null @@ -1,7 +0,0 @@ -base plugin -author Christopher Smith -email chris@jalakai.co.uk -date 2013-02-20 -name Plugin Manager plugin -desc Manage and install plugins -url http://www.dokuwiki.org/plugin:plugin diff --git a/lib/plugins/plugin/style.css b/lib/plugins/plugin/style.css deleted file mode 100644 index 9433e6001..000000000 --- a/lib/plugins/plugin/style.css +++ /dev/null @@ -1,195 +0,0 @@ -/* - * admin plugin extension - style additions - * - * @author Christopher Smith chris@jalakai.co.uk - * @link http://wiki.jalakai.co.uk/dokuwiki/doku.php/tutorials/adminplugin - */ - -#plugin__manager h2 { - margin-left: 0; -} - -#plugin__manager form { - display: block; - margin: 0; - padding: 0; -} - -#plugin__manager legend { - display: none; -} - -#plugin__manager fieldset { - width: auto; -} - -#plugin__manager .button { - margin: 0; -} - -#plugin__manager p, -#plugin__manager label { - text-align: left; -} - -#plugin__manager .hidden { - display: none; -} - -#plugin__manager .new { - background: #dee7ec; -} - -/* IE won't understand but doesn't require it */ -#plugin__manager input[disabled] { - color: #ccc; - border-color: #ccc; -} - -#plugin__manager .pm_menu, -#plugin__manager .pm_info { - margin-left: 0; - text-align: left; -} - -[dir=rtl] #plugin__manager .pm_menu, -[dir=rtl] #plugin__manager .pm_info, -[dir=rtl] #plugin__manager p, -[dir=rtl] #plugin__manager label { - text-align: right; -} - -#plugin__manager .pm_menu { - float: left; - width: 48%; -} -[dir=rtl] #plugin__manager .pm_menu { - float: right; -} - -#plugin__manager .pm_info { - float: right; - width: 50%; -} -[dir=rtl] #plugin__manager .pm_info { - float: left; -} - -#plugin__manager .common fieldset { - margin: 0; - padding: 0 0 1.0em 0; - text-align: left; - border: none; -} -[dir=rtl] #plugin__manager .common fieldset { - text-align: right; -} - -#plugin__manager .common label { - padding: 0 0 0.5em 0; -} - -#plugin__manager .common input.edit { - width: 24em; - margin: 0.5em; -} - -#plugin__manager .plugins fieldset { - color: #000; - background: #fff; - text-align: right; - border-top: none; - border-right: none; - border-left: none; -} - -#plugin__manager .plugins fieldset.protected { - background: #fdd; - color: #000; -} - -#plugin__manager .plugins fieldset.disabled { - background: #e0e0e0; - color: #a8a8a8; -} - -#plugin__manager .plugins .legend { - color: #000; - background: inherit; - display: block; - margin: 0; - padding: 0; - font-size: 1em; - line-height: 1.4em; - font-weight: normal; - text-align: left; - float: left; - padding: 0; - clear: none; -} -[dir=rtl] #plugin__manager .plugins .legend { - text-align: right; - float: right; -} - -#plugin__manager .plugins .button { - font-size: 95%; -} - -#plugin__manager .plugins fieldset.buttons { - border: none; -} - -#plugin__manager .plugins fieldset.buttons .button { - float: left; -} -[dir=rtl] #plugin__manager .plugins .button { - float: left; - margin-right: 0.5em; -} -[dir=rtl] #plugin__manager .plugins fieldset.buttons .button { - float: right; -} - -#plugin__manager .pm_info h3 { - margin-left: 0; -} - -#plugin__manager .pm_info dl { - margin: 1em 0; - padding: 0; -} - -#plugin__manager .pm_info dt { - width: 6em; - float: left; - clear: left; - margin: 0; - padding: 0; -} -[dir=rtl] #plugin__manager .pm_info dt { - float: right; - clear: right; -} - -#plugin__manager .pm_info dd { - margin: 0 0 0 7em; - padding: 0; - background: none; -} -[dir=rtl] #plugin__manager .pm_info dd { - margin: 0 7em 0 0; -} - -#plugin__manager .plugins .enable { - float: left; - width: auto; - margin-right: 0.5em; -} -[dir=rtl] #plugin__manager .plugins .enable { - float: right; - margin-right: 0; - margin-left: 0.5em; -} - -/* end admin plugin styles */ -- cgit v1.2.3 From 4c005e3f9adeb9180a879cc38518d1cff63e9261 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 5 Jan 2014 21:02:00 +0100 Subject: fixed strict standard error and added some docblock --- lib/plugins/extension/action.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/plugins/extension/action.php b/lib/plugins/extension/action.php index b35c1cb13..0d6e7d996 100644 --- a/lib/plugins/extension/action.php +++ b/lib/plugins/extension/action.php @@ -16,12 +16,18 @@ class action_plugin_extension extends DokuWiki_Action_Plugin { * @param Doku_Event_Handler $controller DokuWiki's event controller object * @return void */ - public function register(Doku_Event_Handler &$controller) { + public function register(Doku_Event_Handler $controller) { $controller->register_hook('AJAX_CALL_UNKNOWN', 'BEFORE', $this, 'info'); } + /** + * Create the detail info for a single plugin + * + * @param Doku_Event $event + * @param $param + */ public function info(Doku_Event &$event, $param){ global $INPUT; if($event->data != 'plugin_extension') return; -- cgit v1.2.3 From a4667104ff9b4131c1aceaea022e65d0976a15d6 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 5 Jan 2014 21:22:31 +0100 Subject: added git warning --- lib/plugins/extension/helper/extension.php | 10 ++++++++++ lib/plugins/extension/helper/list.php | 4 ++++ lib/plugins/extension/lang/en/lang.php | 4 +++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 9cf4848ad..d200d5ab0 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -86,6 +86,16 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { return is_dir($this->getInstallDir()); } + /** + * If the extension is under git control + * + * @return bool + */ + public function isGitControlled() { + if(!$this->isInstalled()) return false; + return is_dir($this->getInstallDir().'/.git'); + } + /** * If the extension is bundled * diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index e33dbfa04..901a4e8fa 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -476,6 +476,10 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { } } + if ($extension->isGitControlled()){ + $errors .= '

    '.$this->getLang('git').'

    '; + } + }else{ if (($canmod = $extension->canModify()) === true) { if ($extension->getDownloadURL()) { diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index 593794ef2..c1e73d023 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -80,4 +80,6 @@ $lang['error_copy'] = 'There was a file copy error while attem $lang['noperms'] = 'Extension directory is not writable'; $lang['notplperms'] = 'Template directory is not writable'; -$lang['nopluginperms'] = 'Plugin directory is not writable'; \ No newline at end of file +$lang['nopluginperms'] = 'Plugin directory is not writable'; + +$lang['git'] = 'This extension was installed via git, you may not want to update it here.'; \ No newline at end of file -- cgit v1.2.3 From 47559c79fedce97add92eb193fb379b8795fc612 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 5 Jan 2014 20:22:40 +0000 Subject: fixed and improved some HTML in extension manager --- lib/plugins/extension/helper/list.php | 47 +++++++++++++++++----------------- lib/plugins/extension/lang/en/lang.php | 3 ++- lib/plugins/extension/style.less | 10 +++----- 3 files changed, 29 insertions(+), 31 deletions(-) diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 901a4e8fa..f387a6de6 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -56,7 +56,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @param int $level The level of the header */ function add_header($id, $header, $level = 2) { - $this->form .=''.hsc($header).''; + $this->form .=''.hsc($header).''.DOKU_LF; } /** @@ -65,7 +65,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @param string $data The content */ function add_p($data) { - $this->form .= '

    '.hsc($data).'

    '; + $this->form .= '

    '.hsc($data).'

    '.DOKU_LF; } /** @@ -77,7 +77,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { foreach ($array as $key => $value) { $this->form .= ''; } - $this->form .= ''; + $this->form .= ''.DOKU_LF; } /** @@ -85,7 +85,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { */ function end_form() { $this->form .= ''; - $this->form .= ''; + $this->form .= ''.DOKU_LF; } /** @@ -110,7 +110,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @param string $html The content */ private function populate_column($class, $html) { - $this->form .= '
    '.$html.'
    '; + $this->form .= '
    '.$html.'
    '.DOKU_LF; } /** @@ -164,13 +164,13 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $mailid = $extension->getEmailID(); if($mailid){ $url = $this->gui->tabURL('search', array('q' => 'authorid:'.$mailid)); - return ' '.hsc($extension->getAuthor()).''; + return ' '.hsc($extension->getAuthor()).''; }else{ return ''.hsc($extension->getAuthor()).''; } } - return "".$this->getLang('unknown_author').""; + return "".$this->getLang('unknown_author')."".DOKU_LF; } /** @@ -181,16 +181,17 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { */ function make_screenshot(helper_plugin_extension_extension $extension) { if($extension->getScreenshotURL()) { - $img = ''. - ''.hsc($extension->getDisplayName()).''. + $title = sprintf($this->getLang('screenshot'), hsc($extension->getDisplayName())); + $img = ''. + ''.$title.''. ''; } elseif($extension->isTemplate()) { - $img = 'template'; + $img = ''; } else { - $img = 'plugin'; + $img = ''; } - return '
    '.$img.'
    '; + return '
    '.$img.'
    '.DOKU_LF; } /** @@ -204,21 +205,21 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $return = '
    '; $return .= '

    '; $return .= sprintf($this->getLang('extensionby'), hsc($extension->getDisplayName()), $this->make_author($extension)); - $return .= '

    '; + $return .= ''.DOKU_LF; $return .= $this->make_screenshot($extension); $popularity = $extension->getPopularity(); if ($popularity !== false && !$extension->isBundled()) { - $popularityText = sprintf($this->getLang('popularity'), $popularity); - $return .= '
    '; + $popularityText = sprintf($this->getLang('popularity'), round($popularity*100, 2)); + $return .= '
    '.$popularityText.'
    '.DOKU_LF; } $return .= '

    '; if($extension->getDescription()) { $return .= hsc($extension->getDescription()).' '; } - $return .= '

    '; + $return .= '

    '.DOKU_LF; $return .= $this->make_linkbar($extension); @@ -229,13 +230,13 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $url = $this->gui->tabURL('', array('info' => $extension->getID())); $class = ''; } - $return .= ''.$this->getLang('btn_info').''; + $return .= ' '.$this->getLang('btn_info').''; if ($showinfo) { $return .= $this->make_info($extension); } $return .= $this->make_noticearea($extension); - $return .= '
    '; + $return .= ''.DOKU_LF; return $return; } @@ -246,7 +247,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @return string The HTML code */ function make_linkbar(helper_plugin_extension_extension $extension) { - $return = ''; + $return = ''.DOKU_LF; return $return; } @@ -308,7 +309,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { sprintf($this->getLang('url_change'), hsc($extension->getDownloadURL()), hsc($extension->getLastDownloadURL())). ''; } - return $return; + return $return.DOKU_LF; } /** @@ -424,7 +425,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $return .= $this->make_linklist($extension->getConflicts()); $return .= ''; } - $return .= ''; + $return .= ''.DOKU_LF; return $return; } @@ -495,7 +496,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $return .= ($extension->getLastUpdate() ? hsc($extension->getLastUpdate()) : $this->getLang('unknown')).''; } - return $return.' '.$errors; + return $return.' '.$errors.DOKU_LF; } /** diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index c1e73d023..fd00b5007 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -35,7 +35,8 @@ $lang['search_for'] = 'Search Extension:'; $lang['search'] = 'Search'; $lang['extensionby'] = '%s by %s'; -$lang['popularity'] = 'Popularity: %s'; +$lang['screenshot'] = 'Screenshot of %s'; +$lang['popularity'] = 'Popularity: %s%%'; $lang['homepage_link'] = 'Docs'; $lang['bugs_features'] = 'Bugs'; $lang['author_hint'] = 'Search extensions by this author'; diff --git a/lib/plugins/extension/style.less b/lib/plugins/extension/style.less index 0d86f5419..a60aac8bf 100644 --- a/lib/plugins/extension/style.less +++ b/lib/plugins/extension/style.less @@ -161,15 +161,11 @@ div { background-color: @ini_border; height: 100%; - - span { - display: none;// @todo: hide accessibly - } } } // Docs, Bugs, Tags - span.linkbar { + div.linkbar { font-size: 85%; span.tags { @@ -180,7 +176,7 @@ // more info button a.info { - background: transparent url(images/up.png) no-repeat 0 0; + background: transparent url(images/down.png) no-repeat 0 0; border-width: 0; height: 13px; width: 13px; @@ -190,7 +186,7 @@ overflow: hidden; &.close { - background: transparent url(images/down.png) no-repeat 0 0; + background: transparent url(images/up.png) no-repeat 0 0; } } -- cgit v1.2.3 From 480a4d375c62fce58c46db400a5ec9617941c3bf Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 5 Jan 2014 20:45:03 +0000 Subject: added basic mobile styles to extension manager (not great, but makes things at least readable) --- lib/plugins/extension/all.less | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lib/plugins/extension/all.less diff --git a/lib/plugins/extension/all.less b/lib/plugins/extension/all.less new file mode 100644 index 000000000..8b2533e2e --- /dev/null +++ b/lib/plugins/extension/all.less @@ -0,0 +1,23 @@ + +@media only screen and (max-width: 600px) { + +#extension__list .legend { + > div { + padding-left: 0; + } + + div.screenshot { + margin: 0 .5em .5em 0; + } + + h2 { + width: auto; + float: none; + } + + div.linkbar { + clear: left; + } +} + +} /* /@media */ -- cgit v1.2.3 From 77da6d6ca677e783f5e104226a179b5f09ab121d Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 5 Jan 2014 22:25:41 +0000 Subject: added css and html changes for RTL scripts to extension manager --- lib/plugins/extension/all.less | 14 ++++++ lib/plugins/extension/helper/extension.php | 4 +- lib/plugins/extension/helper/list.php | 39 +++++++-------- lib/plugins/extension/lang/en/lang.php | 1 + lib/plugins/extension/style.less | 77 ++++++++++++++++++++++++++++-- 5 files changed, 111 insertions(+), 24 deletions(-) diff --git a/lib/plugins/extension/all.less b/lib/plugins/extension/all.less index 8b2533e2e..3d9688e14 100644 --- a/lib/plugins/extension/all.less +++ b/lib/plugins/extension/all.less @@ -20,4 +20,18 @@ } } +[dir=rtl] #extension__list .legend { + > div { + padding-right: 0; + } + + div.screenshot { + margin: 0 0 .5em .5em; + } + + div.linkbar { + clear: right; + } +} + } /* /@media */ diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index d200d5ab0..02c2cc8ad 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -829,7 +829,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { // download if(!$file = io_download($url, $tmp.'/', true, $file, 0)) { $this->dir_delete($tmp); - throw new Exception(sprintf($this->getLang('error_download'), hsc($url))); + throw new Exception(sprintf($this->getLang('error_download'), ''.hsc($url).'')); } return $tmp.'/'.$file; @@ -921,7 +921,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { 'action' => $action ); } else { - throw new Exception(sprintf($this->getLang('error_copy').DOKU_LF, $item['base'])); + throw new Exception(sprintf($this->getLang('error_copy').DOKU_LF, ''.$item['base'].'')); } } diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index f387a6de6..7a08655b7 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -164,10 +164,10 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $mailid = $extension->getEmailID(); if($mailid){ $url = $this->gui->tabURL('search', array('q' => 'authorid:'.$mailid)); - return ' '.hsc($extension->getAuthor()).''; + return ' '.hsc($extension->getAuthor()).''; }else{ - return ''.hsc($extension->getAuthor()).''; + return ''.hsc($extension->getAuthor()).''; } } return "".$this->getLang('unknown_author')."".DOKU_LF; @@ -204,7 +204,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { function make_legend(helper_plugin_extension_extension $extension, $showinfo = false) { $return = '
    '; $return .= '

    '; - $return .= sprintf($this->getLang('extensionby'), hsc($extension->getDisplayName()), $this->make_author($extension)); + $return .= sprintf($this->getLang('extensionby'), ''.hsc($extension->getDisplayName()).'', $this->make_author($extension)); $return .= '

    '.DOKU_LF; $return .= $this->make_screenshot($extension); @@ -215,11 +215,11 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $return .= '
    '.$popularityText.'
    '.DOKU_LF; } - $return .= '

    '; if($extension->getDescription()) { + $return .= '

    '; $return .= hsc($extension->getDescription()).' '; + $return .= '

    '.DOKU_LF; } - $return .= '

    '.DOKU_LF; $return .= $this->make_linkbar($extension); @@ -255,6 +255,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { if($extension->getTags()){ $first = true; $return .= ''; + $return .= ''.$this->getLang('tags').' '; foreach ($extension->getTags() as $tag) { if(!$first){ $return .= ', '; @@ -262,7 +263,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $first = false; } $url = $this->gui->tabURL('search', array('q' => 'tag:'.$tag)); - $return .= ''.hsc($tag).''; + $return .= ''.hsc($tag).''; } $return .= ''; } @@ -281,22 +282,22 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $missing_dependencies = $extension->getMissingDependencies(); if(!empty($missing_dependencies)) { $return .= '
    '. - sprintf($this->getLang('missing_dependency'), implode(', ', /*array_map(array($this->helper, 'make_extensionsearchlink'),*/ $missing_dependencies)). + sprintf($this->getLang('missing_dependency'), ''.implode(', ', /*array_map(array($this->helper, 'make_extensionsearchlink'),*/ $missing_dependencies).''). '
    '; } if($extension->isInWrongFolder()) { $return .= '
    '. - sprintf($this->getLang('wrong_folder'), hsc($extension->getInstallName()), hsc($extension->getBase())). + sprintf($this->getLang('wrong_folder'), ''.hsc($extension->getInstallName()).'', ''.hsc($extension->getBase()).''). '
    '; } if(($securityissue = $extension->getSecurityIssue()) !== false) { $return .= '
    '. - sprintf($this->getLang('security_issue'), hsc($securityissue )). + sprintf($this->getLang('security_issue'), ''.hsc($securityissue).''). '
    '; } if(($securitywarning = $extension->getSecurityWarning()) !== false) { $return .= '
    '. - sprintf($this->getLang('security_warning'), hsc($securitywarning)). + sprintf($this->getLang('security_warning'), ''.hsc($securitywarning).''). '
    '; } if($extension->updateAvailable()) { @@ -306,7 +307,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { } if($extension->hasDownloadURLChanged()) { $return .= '
    '. - sprintf($this->getLang('url_change'), hsc($extension->getDownloadURL()), hsc($extension->getLastDownloadURL())). + sprintf($this->getLang('url_change'), ''.hsc($extension->getDownloadURL()).'', ''.hsc($extension->getLastDownloadURL()).''). '
    '; } return $return.DOKU_LF; @@ -354,14 +355,14 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { if (!$extension->isBundled()) { $return .= '
    '.$this->getLang('downloadurl').'
    '; - $return .= '
    '; + $return .= '
    '; $return .= ($extension->getDownloadURL() ? $this->shortlink($extension->getDownloadURL()) : $default); - $return .= '
    '; + $return .= ''; $return .= '
    '.$this->getLang('repository').'
    '; - $return .= '
    '; + $return .= '
    '; $return .= ($extension->getSourcerepoURL() ? $this->shortlink($extension->getSourcerepoURL()) : $default); - $return .= '
    '; + $return .= ''; } if ($extension->isInstalled()) { @@ -392,15 +393,15 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { } $return .= '
    '.$this->getLang('provides').'
    '; - $return .= '
    '; + $return .= '
    '; $return .= ($extension->getTypes() ? hsc(implode(', ', $extension->getTypes())) : $default); - $return .= '
    '; + $return .= ''; if($extension->getCompatibleVersions()) { $return .= '
    '.$this->getLang('compatible').'
    '; $return .= '
    '; foreach ($extension->getCompatibleVersions() as $date => $version) { - $return .= $version['label'].' ('.$date.'), '; + $return .= ''.$version['label'].' ('.$date.'), '; } $return = rtrim($return, ', '); $return .= '
    '; @@ -438,7 +439,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { function make_linklist($ext) { $return = ''; foreach ($ext as $link) { - $return .= ''.hsc($link).', '; + $return .= ''.hsc($link).', '; } return rtrim($return, ', '); } diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index fd00b5007..83ff19f00 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -39,6 +39,7 @@ $lang['screenshot'] = 'Screenshot of %s'; $lang['popularity'] = 'Popularity: %s%%'; $lang['homepage_link'] = 'Docs'; $lang['bugs_features'] = 'Bugs'; +$lang['tags'] = 'Tags:'; $lang['author_hint'] = 'Search extensions by this author'; $lang['installed'] = 'Installed:'; $lang['downloadurl'] = 'Download URL:'; diff --git a/lib/plugins/extension/style.less b/lib/plugins/extension/style.less index a60aac8bf..d20689099 100644 --- a/lib/plugins/extension/style.less +++ b/lib/plugins/extension/style.less @@ -52,7 +52,6 @@ background-color: @ini_background_alt; margin: 0 0 10px 0; padding: 10px 10px 8px; - text-align: left; overflow: hidden; } @@ -120,8 +119,8 @@ min-height: 24px; min-width: 24px; position: absolute; - left: 0px; - top: 0px; + left: 0; + top: 0; } } @@ -220,6 +219,64 @@ } } +[dir=rtl] #extension__list .legend { + float: right; + + > div { + padding: 0 132px 0 .5em; + border-left: 1px solid @ini_background_alt; + border-right-width: 0; + } + + div.screenshot { + margin-left: 0; + margin-right: -132px; + float: right; + + span { + left: auto; + right: 0; + } + } + + h2 { + float: left; + } + + div.popularity { + right: auto; + left: .5em; + } + + div.linkbar span.tags, + dl.details dd a.donate { + padding-left: 0; + padding-right: 18px; + background-position: top right; + } + + a.info { + float: left; + } + + dl.details { + dt { + clear: right; + float: right; + text-align: left; + padding-left: 5px; + padding-right: 0; + } + + dd { + margin-left: 0; + margin-right: 25%; + padding-left: 0; + padding-right: 5px; + } + } +} + /* * Enabled/Disabled overrides */ @@ -266,6 +323,20 @@ } } +[dir=rtl] #extension__manager .actions { + float: left; + text-align: left; + + p.permerror { + margin-left: 0; + margin-right: 0.4em; + text-align: right; + padding-left: 0; + padding-right: 19px; + background-position: center right; + } +} + /** * Search form */ -- cgit v1.2.3 From 06d8000aa9e10b65a946d58d1cffe41aff987d2b Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 5 Jan 2014 23:11:23 +0000 Subject: added status to info list of extension plugin --- lib/plugins/extension/helper/list.php | 39 ++++++++++++++++++++++++++++------ lib/plugins/extension/lang/en/lang.php | 13 ++++++++++-- 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 7a08655b7..ba3681ce4 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -252,14 +252,13 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { if ($extension->getBugtrackerURL()) { $return .= ' '.$this->getLang('bugs_features').' '; } - if($extension->getTags()){ + if ($extension->getTags()){ $first = true; - $return .= ''; - $return .= ''.$this->getLang('tags').' '; + $return .= ''.$this->getLang('tags').' '; foreach ($extension->getTags() as $tag) { - if(!$first){ + if (!$first){ $return .= ', '; - }else{ + } else { $first = false; } $url = $this->gui->tabURL('search', array('q' => 'tag:'.$tag)); @@ -345,6 +344,9 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $default = $this->getLang('unknown'); $return = '
    '; + $return .= '
    '.$this->getLang('status').'
    '; + $return .= '
    '.$this->make_status($extension).'
    '; + if ($extension->getDonationURL()) { $return .= '
    '.$this->getLang('donate').'
    '; $return .= '
    '; @@ -352,7 +354,6 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $return .= '
    '; } - if (!$extension->isBundled()) { $return .= '
    '.$this->getLang('downloadurl').'
    '; $return .= '
    '; @@ -513,7 +514,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { switch ($action) { case 'install': case 'reinstall': - $title = 'title="'.$extension->getDownloadURL().'"'; + $title = 'title="'.hsc($extension->getDownloadURL()).'"'; break; } @@ -522,4 +523,28 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { return ''; } + + /** + * Plugin/template status + * + * @param helper_plugin_extension_extension $extension The extension + * @return string The description of all relevant statusses + */ + function make_status(helper_plugin_extension_extension $extension) { + $return = ''; + if ($extension->isInstalled()) { + $return .= $this->getLang('status_installed').' '; + if ($extension->isProtected()) { + $return .= $this->getLang('status_protected').' '; + } else { + $return .= $extension->isEnabled() ? $this->getLang('status_enabled').' ' : $this->getLang('status_disabled').' '; + } + } else { + $return .= $this->getLang('status_not_installed').' '; + } + $return .= !$extension->canModify() ? $this->getLang('status_unmodifiable').' ' : ''; + $return .= $extension->isTemplate() ? $this->getLang('status_template') : $this->getLang('status_plugin'); + return $return; + } + } diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index 83ff19f00..06c83a708 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -55,6 +55,16 @@ $lang['conflicts'] = 'Conflicts with:'; $lang['donate'] = 'Like this?'; $lang['donate_action'] = 'Buy the author a coffee!'; $lang['repo_retry'] = 'Retry'; +$lang['provides'] = 'Provides:'; +$lang['status'] = 'Status:'; +$lang['status_installed'] = 'installed'; +$lang['status_not_installed'] = 'not installed'; +$lang['status_protected'] = 'protected'; +$lang['status_enabled'] = 'enabled'; +$lang['status_disabled'] = 'disabled'; +$lang['status_unmodifiable'] = 'unmodifiable'; +$lang['status_plugin'] = 'plugin'; +$lang['status_template'] = 'template'; $lang['msg_enabled'] = 'Plugin %s enabled'; $lang['msg_disabled'] = 'Plugin %s disabled'; @@ -65,7 +75,6 @@ $lang['msg_plugin_install_success'] = 'Plugin %s installed successfully'; $lang['msg_plugin_update_success'] = 'Plugin %s updated successfully'; $lang['msg_upload_failed'] = 'Uploading the file failed'; -$lang['provides'] = 'Provides:'; $lang['missing_dependency'] = 'Missing or disabled dependency: %s'; $lang['security_issue'] = 'Security Issue: %s'; $lang['security_warning'] = 'Security Warning: %s'; @@ -84,4 +93,4 @@ $lang['noperms'] = 'Extension directory is not writable'; $lang['notplperms'] = 'Template directory is not writable'; $lang['nopluginperms'] = 'Plugin directory is not writable'; -$lang['git'] = 'This extension was installed via git, you may not want to update it here.'; \ No newline at end of file +$lang['git'] = 'This extension was installed via git, you may not want to update it here.'; -- cgit v1.2.3 From 4d47e8e3bcbb31435593de9d567723e5d87641bd Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 6 Jan 2014 20:20:15 +0100 Subject: added recursive delete function to io.php --- inc/io.php | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/inc/io.php b/inc/io.php index eff0279ac..30f34ad3c 100644 --- a/inc/io.php +++ b/inc/io.php @@ -400,6 +400,55 @@ function io_mkdir_p($target){ return 0; } +/** + * Recursively delete a directory + * + * @author Andreas Gohr + * @param string $path + * @param bool $removefiles defaults to false which will delete empty directories only + * @return bool + */ +function io_rmdir($path, $removefiles = false) { + if(!is_string($path) || $path == "") return false; + + if(is_dir($path) && !is_link($path)) { + $dirs = array(); + $files = array(); + + if(!$dh = @opendir($path)) return false; + while($f = readdir($dh)) { + if($f == '..' || $f == '.') continue; + + // collect dirs and files first + if(is_dir("$path/$f") && !is_link("$path/$f")) { + $dirs[] = "$path/$f"; + } else if($removefiles) { + $files[] = "$path/$f"; + } else { + return false; // abort when non empty + } + + } + closedir($dh); + + // now traverse into directories first + foreach($dirs as $dir) { + if(!io_rmdir($dir, $removefiles)) return false; // abort on any error + } + + // now delete files + foreach($files as $file) { + if(!@unlink($file)) return false; //abort on any error + } + + // remove self + return @rmdir($path); + } else if($removefiles) { + return @unlink($path); + } + return false; +} + /** * Creates a directory using FTP * -- cgit v1.2.3 From ebec603febbe7426fbb12cbb4fd3cb42128fcbf8 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 6 Jan 2014 20:58:38 +0100 Subject: added tests for io_rmdir --- _test/tests/inc/io_rmdir.test.php | 159 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 _test/tests/inc/io_rmdir.test.php diff --git a/_test/tests/inc/io_rmdir.test.php b/_test/tests/inc/io_rmdir.test.php new file mode 100644 index 000000000..9a122d111 --- /dev/null +++ b/_test/tests/inc/io_rmdir.test.php @@ -0,0 +1,159 @@ +assertTrue($dir !== false); + $this->assertTrue(is_dir($dir)); + + // delete successfully + $this->assertTrue(io_rmdir($dir, false)); + + // check result + clearstatcache(); + $this->assertFalse(is_dir($dir)); + $this->assertTrue(is_dir($top)); + + // same again with deletefiles + + // set up test dir + $dir = io_mktmpdir(); + $this->assertTrue($dir !== false); + $this->assertTrue(is_dir($dir)); + + // delete successfully + $this->assertTrue(io_rmdir($dir, true)); + + // check result + clearstatcache(); + $this->assertFalse(is_dir($dir)); + $this->assertTrue(is_dir($top)); + } + + + function test_empty_hierarchy(){ + // setup hierachy and test it exists + $dir = io_mktmpdir(); + $top = dirname($dir); + $this->assertTrue($dir !== false); + $this->assertTrue(is_dir($dir)); + $this->assertTrue(io_mkdir_p("$dir/foo/bar/baz")); + $this->assertTrue(is_dir("$dir/foo/bar/baz")); + $this->assertTrue(io_mkdir_p("$dir/foobar/bar/baz")); + $this->assertTrue(is_dir("$dir/foobar/bar/baz")); + + // delete successfully + $this->assertTrue(io_rmdir($dir, false)); + + // check result + clearstatcache(); + $this->assertFalse(is_dir("$dir/foo/bar/baz")); + $this->assertFalse(is_dir("$dir/foobar/bar/baz")); + $this->assertFalse(is_dir($dir)); + $this->assertTrue(is_dir($top)); + + // same again with deletefiles + + // setup hierachy and test it exists + $dir = io_mktmpdir(); + $this->assertTrue($dir !== false); + $this->assertTrue(is_dir($dir)); + $this->assertTrue(io_mkdir_p("$dir/foo/bar/baz")); + $this->assertTrue(is_dir("$dir/foo/bar/baz")); + $this->assertTrue(io_mkdir_p("$dir/foobar/bar/baz")); + $this->assertTrue(is_dir("$dir/foobar/bar/baz")); + + // delete successfully + $this->assertTrue(io_rmdir($dir, true)); + + // check result + clearstatcache(); + $this->assertFalse(is_dir("$dir/foo/bar/baz")); + $this->assertFalse(is_dir("$dir/foobar/bar/baz")); + $this->assertFalse(is_dir($dir)); + $this->assertTrue(is_dir($top)); + } + + function test_full_single(){ + // set up test dir + $dir = io_mktmpdir(); + $top = dirname($dir); + $this->assertTrue($dir !== false); + $this->assertTrue(is_dir($dir)); + + // put file + $this->assertTrue(io_saveFile("$dir/testfile.txt", 'foobar')); + $this->assertFileExists("$dir/testfile.txt"); + + // delete unsuccessfully + $this->assertFalse(io_rmdir($dir, false)); + + // check result + clearstatcache(); + $this->assertFileExists("$dir/testfile.txt"); + $this->assertTrue(is_dir($dir)); + $this->assertTrue(is_dir($top)); + + // same again with deletefiles + + // delete successfully + $this->assertTrue(io_rmdir($dir, true)); + + // check result + clearstatcache(); + $this->assertFileNotExists("$dir/testfile.txt"); + $this->assertFalse(is_dir($dir)); + $this->assertTrue(is_dir($top)); + } + + function test_full_hierarchy(){ + // setup hierachy and test it exists + $dir = io_mktmpdir(); + $top = dirname($dir); + $this->assertTrue($dir !== false); + $this->assertTrue(is_dir($dir)); + $this->assertTrue(io_mkdir_p("$dir/foo/bar/baz")); + $this->assertTrue(is_dir("$dir/foo/bar/baz")); + $this->assertTrue(io_mkdir_p("$dir/foobar/bar/baz")); + $this->assertTrue(is_dir("$dir/foobar/bar/baz")); + + // put files + $this->assertTrue(io_saveFile("$dir/testfile.txt", 'foobar')); + $this->assertFileExists("$dir/testfile.txt"); + $this->assertTrue(io_saveFile("$dir/foo/testfile.txt", 'foobar')); + $this->assertFileExists("$dir/foo/testfile.txt"); + $this->assertTrue(io_saveFile("$dir/foo/bar/baz/testfile.txt", 'foobar')); + $this->assertFileExists("$dir/foo/bar/baz/testfile.txt"); + + // delete unsuccessfully + $this->assertFalse(io_rmdir($dir, false)); + + // check result + clearstatcache(); + $this->assertFileExists("$dir/testfile.txt"); + $this->assertFileExists("$dir/foo/testfile.txt"); + $this->assertFileExists("$dir/foo/bar/baz/testfile.txt"); + $this->assertTrue(is_dir("$dir/foo/bar/baz")); + $this->assertTrue(is_dir("$dir/foobar/bar/baz")); + $this->assertTrue(is_dir($dir)); + $this->assertTrue(is_dir($top)); + + // delete successfully + $this->assertTrue(io_rmdir($dir, true)); + + // check result + clearstatcache(); + $this->assertFileNotExists("$dir/testfile.txt"); + $this->assertFileNotExists("$dir/foo/testfile.txt"); + $this->assertFileNotExists("$dir/foo/bar/baz/testfile.txt"); + $this->assertFalse(is_dir("$dir/foo/bar/baz")); + $this->assertFalse(is_dir("$dir/foobar/bar/baz")); + $this->assertFalse(is_dir($dir)); + $this->assertTrue(is_dir($top)); + } + +} \ No newline at end of file -- cgit v1.2.3 From 0826f6cbd906e92fd040dfd3377f1b2a9db13873 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 6 Jan 2014 21:06:09 +0100 Subject: now use new core funtion to recursively delete --- lib/plugins/extension/helper/extension.php | 32 ++++-------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 02c2cc8ad..f91d237f7 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -33,7 +33,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { */ public function __destruct() { foreach($this->temporary as $dir){ - $this->dir_delete($dir); + io_rmdir($dir, true); } } @@ -640,7 +640,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { */ public function uninstall() { $this->purgeCache(); - return $this->dir_delete($this->getInstallDir()); + return io_rmdir($this->getInstallDir(), true); } /** @@ -768,30 +768,6 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { io_saveFile($managerpath, $data); } - /** - * delete, with recursive sub-directory support - * - * @param string $path The path that shall be deleted - * @return bool If the directory has been successfully deleted - */ - protected function dir_delete($path) { - if(!is_string($path) || $path == "") return false; - - if(is_dir($path) && !is_link($path)) { - if(!$dh = @opendir($path)) return false; - - while ($f = readdir($dh)) { - if($f == '..' || $f == '.') continue; - $this->dir_delete("$path/$f"); - } - - closedir($dh); - return @rmdir($path); - } else { - return @unlink($path); - } - } - /** * Returns a temporary directory * @@ -828,7 +804,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { // download if(!$file = io_download($url, $tmp.'/', true, $file, 0)) { - $this->dir_delete($tmp); + io_rmdir($tmp, true); throw new Exception(sprintf($this->getLang('error_download'), ''.hsc($url).'')); } @@ -926,7 +902,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { } // cleanup - if($tmp) $this->dir_delete($tmp); + if($tmp) io_rmdir($tmp, true); return $installed_extensions; } -- cgit v1.2.3 From d8cf4dd43ecd37c371acf9bc6c17998b65d42ba4 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 6 Jan 2014 21:15:50 +0100 Subject: treat non-existing files as success on delete --- _test/tests/inc/io_rmdir.test.php | 60 +++++++++++++++++++++++++++++++++++++++ inc/io.php | 1 + 2 files changed, 61 insertions(+) diff --git a/_test/tests/inc/io_rmdir.test.php b/_test/tests/inc/io_rmdir.test.php index 9a122d111..3de57fa86 100644 --- a/_test/tests/inc/io_rmdir.test.php +++ b/_test/tests/inc/io_rmdir.test.php @@ -2,6 +2,66 @@ class io_rmdir_test extends DokuWikiTest { + function test_nopes(){ + // set up test dir + $dir = io_mktmpdir(); + $top = dirname($dir); + $this->assertTrue($dir !== false); + $this->assertTrue(is_dir($dir)); + + // switch into it + $this->assertTrue(chdir($dir)); + $this->assertEquals($dir, getcwd()); + + + $this->assertFalse(io_rmdir('', false)); + clearstatcache(); + $this->assertTrue(is_dir($dir)); + $this->assertTrue(is_dir($top)); + + $this->assertFalse(io_rmdir('', true)); + clearstatcache(); + $this->assertTrue(is_dir($dir)); + $this->assertTrue(is_dir($top)); + + $this->assertFalse(io_rmdir(null, false)); + clearstatcache(); + $this->assertTrue(is_dir($dir)); + $this->assertTrue(is_dir($top)); + + $this->assertFalse(io_rmdir(null, true)); + clearstatcache(); + $this->assertTrue(is_dir($dir)); + $this->assertTrue(is_dir($top)); + + $this->assertFalse(io_rmdir(false, false)); + clearstatcache(); + $this->assertTrue(is_dir($dir)); + $this->assertTrue(is_dir($top)); + + $this->assertFalse(io_rmdir(false, true)); + clearstatcache(); + $this->assertTrue(is_dir($dir)); + $this->assertTrue(is_dir($top)); + + $this->assertFalse(io_rmdir(array(), false)); + clearstatcache(); + $this->assertTrue(is_dir($dir)); + $this->assertTrue(is_dir($top)); + + $this->assertFalse(io_rmdir(array(), true)); + clearstatcache(); + $this->assertTrue(is_dir($dir)); + $this->assertTrue(is_dir($top)); + + $this->assertFileNotExists("$dir/this/does/not/exist"); + $this->assertTrue(io_rmdir("$dir/this/does/not/exist")); + clearstatcache(); + $this->assertFileNotExists("$dir/this/does/not/exist"); + $this->assertTrue(is_dir($dir)); + $this->assertTrue(is_dir($top)); + } + function test_empty_single(){ // set up test dir diff --git a/inc/io.php b/inc/io.php index 30f34ad3c..892f93759 100644 --- a/inc/io.php +++ b/inc/io.php @@ -410,6 +410,7 @@ function io_mkdir_p($target){ */ function io_rmdir($path, $removefiles = false) { if(!is_string($path) || $path == "") return false; + if(!file_exists($path)) return true; // it's already gone or was never there, count as success if(is_dir($path) && !is_link($path)) { $dirs = array(); -- cgit v1.2.3 From da5f0eee25838368de375eb14d345b70ae3cbc7a Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 6 Jan 2014 21:25:59 +0100 Subject: check for admin in AJAX backend --- lib/plugins/extension/action.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/plugins/extension/action.php b/lib/plugins/extension/action.php index 0d6e7d996..9dd1648ff 100644 --- a/lib/plugins/extension/action.php +++ b/lib/plugins/extension/action.php @@ -29,7 +29,15 @@ class action_plugin_extension extends DokuWiki_Action_Plugin { * @param $param */ public function info(Doku_Event &$event, $param){ + global $USERINFO; global $INPUT; + + if(empty($_SERVER['REMOTE_USER']) || !auth_isadmin($_SERVER['REMOTE_USER'], $USERINFO['grps'])){ + http_status(403); + echo 'Forbidden'; + exit; + } + if($event->data != 'plugin_extension') return; $event->preventDefault(); $event->stopPropagation(); -- cgit v1.2.3 From 189c9cabe204e2493f7d44f66361ad167f7e1c02 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 6 Jan 2014 21:29:52 +0100 Subject: purge cache only once on install this is not a extension specific cache but a global one. no need to purge for each installed extension --- lib/plugins/extension/helper/extension.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index f91d237f7..3f4906463 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -575,12 +575,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { try { $installed = $this->installArchive("$tmp/upload.archive", true, $basename); - - // purge caches - foreach($installed as $ext => $info){ - $this->setExtension($ext); - $this->purgeCache(); - } + // purge cache + $this->purgeCache(); }catch (Exception $e){ throw $e; } -- cgit v1.2.3 From cf37525f0abe7425193f3ec2bf426cf834a949a3 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 6 Jan 2014 21:31:14 +0100 Subject: typo fix --- lib/plugins/extension/helper/extension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 3f4906463..1676e3962 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -632,7 +632,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { /** * Uninstall the extension * - * @return bool If the plugin was sucessfully installed + * @return bool If the plugin was sucessfully uninstalled */ public function uninstall() { $this->purgeCache(); -- cgit v1.2.3 From 72d89f96f31af5c92f96fa16f0d1adf15c0bf4e8 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 7 Jan 2014 19:16:54 +0100 Subject: remove duplicate plugin code for syntax plugins This makes Doku_Parser_Mode inherit from DokuWiki_Plugin which allows for the removal of a bunch of duplicate code form DokuWiki_Syntax_Plugin. This makes the code easier to maintain and makes sure all DokuWiki plugins are actual instances of DokuWiki_Plugin. However this adds a bunch of functions to the "normal" parser modes that don't need them which could have performance/RAM implications. --- inc/parser/parser.php | 12 ++-- lib/plugins/syntax.php | 186 ------------------------------------------------- 2 files changed, 5 insertions(+), 193 deletions(-) diff --git a/inc/parser/parser.php b/inc/parser/parser.php index 1f14b98a3..43a1c22fa 100644 --- a/inc/parser/parser.php +++ b/inc/parser/parser.php @@ -126,16 +126,14 @@ class Doku_Parser { //------------------------------------------------------------------- /** - * This class and all the subclasses below are - * used to reduce the effort required to register - * modes with the Lexer. For performance these - * could all be eliminated later perhaps, or - * the Parser could be serialized to a file once - * all modes are registered + * This class and all the subclasses below are used to reduce the effort required to register + * modes with the Lexer. + * + * Inherits from DokuWiki_Plugin for giving additional functions to syntax plugins * * @author Harry Fuecks */ -class Doku_Parser_Mode { +class Doku_Parser_Mode extends DokuWiki_Plugin { /** * @var Doku_Lexer $Lexer diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php index 8df5abb08..bc2c6447c 100644 --- a/lib/plugins/syntax.php +++ b/lib/plugins/syntax.php @@ -15,30 +15,6 @@ if(!defined('DOKU_INC')) die(); class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode { var $allowedModesSetup = false; - var $localised = false; // set to true by setupLocale() after loading language dependent strings - var $lang = array(); // array to hold language dependent strings, best accessed via ->getLang() - var $configloaded = false; // set to true by loadConfig() after loading plugin configuration variables - var $conf = array(); // array to hold plugin settings, best accessed via ->getConf() - - /** - * General Info - * - * Needs to return a associative array with the following values: - * - * author - Author of the plugin - * email - Email address to contact the author - * date - Last modified date of the plugin in YYYY-MM-DD format - * name - Name of the plugin - * desc - Short description of the plugin (Text only) - * url - Website with more information on the plugin (eg. syntax description) - */ - function getInfo(){ - $parts = explode('_',get_class($this)); - $info = DOKU_PLUGIN.'/'.$parts[2].'/plugin.info.txt'; - if(@file_exists($info)) return confToHash($info); - trigger_error('getInfo() not implemented in '.get_class($this).' and '.$info.' not found', E_USER_WARNING); - return array(); - } /** * Syntax Type @@ -144,167 +120,5 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode { return parent::accepts($mode); } - - // plugin introspection methods - // extract from class name, format = _plugin_[_] - function getPluginType() { list($t) = explode('_', get_class($this), 2); return $t; } - function getPluginName() { list($t, $p, $n) = explode('_', get_class($this), 4); return $n; } - - /** - * Get the name of the component of the current class - * - * @return string component name - */ - function getPluginComponent() { list($t, $p, $n, $c) = explode('_', get_class($this), 4); return (isset($c)?$c:''); } - - // localisation methods - /** - * getLang($id) - * - * use this function to access plugin language strings - * to try to minimise unnecessary loading of the strings when the plugin doesn't require them - * e.g. when info plugin is querying plugins for information about themselves. - * - * @param string $id id of the string to be retrieved - * @return string string in appropriate language or english if not available - */ - function getLang($id) { - if (!$this->localised) $this->setupLocale(); - - return (isset($this->lang[$id]) ? $this->lang[$id] : ''); - } - - /** - * locale_xhtml($id) - * - * retrieve a language dependent wiki page and pass to xhtml renderer for display - * plugin equivalent of p_locale_xhtml() - * - * @param string $id id of language dependent wiki page - * @return string parsed contents of the wiki page in xhtml format - */ - function locale_xhtml($id) { - return p_cached_output($this->localFN($id)); - } - - /** - * localFN($id) - * prepends appropriate path for a language dependent filename - * plugin equivalent of localFN() - */ - function localFN($id) { - global $conf; - $plugin = $this->getPluginName(); - $file = DOKU_CONF.'/plugin_lang/'.$plugin.'/'.$conf['lang'].'/'.$id.'.txt'; - if (!@file_exists($file)){ - $file = DOKU_PLUGIN.$plugin.'/lang/'.$conf['lang'].'/'.$id.'.txt'; - if(!@file_exists($file)){ - //fall back to english - $file = DOKU_PLUGIN.$plugin.'/lang/en/'.$id.'.txt'; - } - } - return $file; - } - - /** - * setupLocale() - * reads all the plugins language dependent strings into $this->lang - * this function is automatically called by getLang() - */ - function setupLocale() { - if ($this->localised) return; - - global $conf; // definitely don't invoke "global $lang" - $path = DOKU_PLUGIN.$this->getPluginName().'/lang/'; - - $lang = array(); - // don't include once, in case several plugin components require the same language file - @include($path.'en/lang.php'); - if ($conf['lang'] != 'en') @include($path.$conf['lang'].'/lang.php'); - - $this->lang = $lang; - $this->localised = true; - } - - // configuration methods - /** - * getConf($setting) - * - * use this function to access plugin configuration variables - */ - function getConf($setting) { - - if(!$this->configloaded) { $this->loadConfig(); } - - return $this->conf[$setting]; - } - - /** - * loadConfig() - * merges the plugin's default settings with any local settings - * this function is automatically called through getConf() - */ - function loadConfig() { - global $conf; - - $defaults = $this->readDefaultSettings(); - $plugin = $this->getPluginName(); - - foreach($defaults as $key => $value) { - if(isset($conf['plugin'][$plugin][$key])) continue; - $conf['plugin'][$plugin][$key] = $value; - } - - $this->configloaded = true; - $this->conf =& $conf['plugin'][$plugin]; - } - - /** - * read the plugin's default configuration settings from conf/default.php - * this function is automatically called through getConf() - * - * @return array setting => value - */ - function readDefaultSettings() { - - $path = DOKU_PLUGIN.$this->getPluginName().'/conf/'; - $conf = array(); - - if(@file_exists($path.'default.php')) { - include($path.'default.php'); - } - - return $conf; - } - - /** - * Loads a given helper plugin (if enabled) - * - * @author Esther Brunner - * - * @param string $name name of plugin to load - * @param bool $msg if a message should be displayed in case the plugin is not available - * - * @return object helper plugin object - */ - function loadHelper($name, $msg = true) { - if(!plugin_isdisabled($name)) { - $obj = plugin_load('helper', $name); - } else { - $obj = null; - } - if(is_null($obj) && $msg) msg("Helper plugin $name is not available or invalid.", -1); - return $obj; - } - - /** - * Allow the plugin to prevent DokuWiki from reusing an instance - * - * @return bool false if the plugin has to be instantiated - */ - function isSingleton() { - return true; - } - } //Setup VIM: ex: et ts=4 : -- cgit v1.2.3 From 5a3e1f53b18728d500b3505f4fbd8c78848120e0 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 7 Jan 2014 19:35:57 +0100 Subject: reintroduce a tiny bit of duplication This reads some duplication in the from of haveing a Doku_Parser_Mode and Doku_Parser_Mode_Plugin class which are basically the same but only the latter extends DokuWiki_Plugin. This avoids the performance/RAM problems mentioned in my previous commit. An interface keeps both logically together. With PHP 5.4 further deduplication could be done via Traits. --- inc/parser/parser.php | 74 ++++++++++++++++++++++++++++++++++++++++++-------- lib/plugins/syntax.php | 2 +- 2 files changed, 63 insertions(+), 13 deletions(-) diff --git a/inc/parser/parser.php b/inc/parser/parser.php index 43a1c22fa..252bd9170 100644 --- a/inc/parser/parser.php +++ b/inc/parser/parser.php @@ -125,41 +125,91 @@ class Doku_Parser { } //------------------------------------------------------------------- + +/** + * Class Doku_Parser_Mode_Interface + * + * Defines a mode (syntax component) in the Parser + */ +interface Doku_Parser_Mode_Interface { + /** + * returns a number used to determine in which order modes are added + */ + public function getSort(); + + /** + * Called before any calls to connectTo + */ + function preConnect(); + + /** + * Connects the mode + * + * @param string $mode + */ + function connectTo($mode); + + /** + * Called after all calls to connectTo + */ + function postConnect(); + + /** + * Check if given mode is accepted inside this mode + * + * @param string $mode + * @return bool + */ + function accepts($mode); +} + /** * This class and all the subclasses below are used to reduce the effort required to register * modes with the Lexer. * - * Inherits from DokuWiki_Plugin for giving additional functions to syntax plugins - * * @author Harry Fuecks */ -class Doku_Parser_Mode extends DokuWiki_Plugin { - +class Doku_Parser_Mode implements Doku_Parser_Mode_Interface { /** * @var Doku_Lexer $Lexer */ var $Lexer; - var $allowedModes = array(); - // returns a number used to determine in which order modes are added function getSort() { trigger_error('getSort() not implemented in '.get_class($this), E_USER_WARNING); } - // Called before any calls to connectTo function preConnect() {} - - // Connects the mode function connectTo($mode) {} - - // Called after all calls to connectTo function postConnect() {} - function accepts($mode) { return in_array($mode, (array) $this->allowedModes ); } +} +/** + * Basically the same as Doku_Parser_Mode but extends from DokuWiki_Plugin + * + * Adds additional functions to syntax plugins + */ +class Doku_Parser_Mode_Plugin extends DokuWiki_Plugin implements Doku_Parser_Mode_Interface { + /** + * @var Doku_Lexer $Lexer + */ + var $Lexer; + var $allowedModes = array(); + + function getSort() { + trigger_error('getSort() not implemented in '.get_class($this), E_USER_WARNING); + } + + function preConnect() {} + function connectTo($mode) {} + function postConnect() {} + function accepts($mode) { + return in_array($mode, (array) $this->allowedModes ); + } } //------------------------------------------------------------------- diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php index bc2c6447c..7ab9c30e1 100644 --- a/lib/plugins/syntax.php +++ b/lib/plugins/syntax.php @@ -12,7 +12,7 @@ if(!defined('DOKU_INC')) die(); * All DokuWiki plugins to extend the parser/rendering mechanism * need to inherit from this class */ -class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode { +class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode_Plugin { var $allowedModesSetup = false; -- cgit v1.2.3 From ec8911d4970372f2a513cf4f1fe78c46c29ed67c Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 8 Jan 2014 20:18:04 +0100 Subject: remove unneeded try/catch blocks they were just catching and rethrowing --- lib/plugins/extension/helper/extension.php | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 1676e3962..3ff2ebcd8 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -613,19 +613,15 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return array The list of installed extensions */ public function installOrUpdate() { - try { - $path = $this->download($this->getDownloadURL()); - $installed = $this->installArchive($path, $this->isInstalled(), $this->getBase()); + $path = $this->download($this->getDownloadURL()); + $installed = $this->installArchive($path, $this->isInstalled(), $this->getBase()); - // refresh extension information - if (!isset($installed[$this->getID()])) { - throw new Exception('Error, the requested extension hasn\'t been installed or updated'); - } - $this->setExtension($this->getID()); - $this->purgeCache(); - }catch (Exception $e){ - throw $e; + // refresh extension information + if (!isset($installed[$this->getID()])) { + throw new Exception('Error, the requested extension hasn\'t been installed or updated'); } + $this->setExtension($this->getID()); + $this->purgeCache(); return $installed; } @@ -828,11 +824,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { } // decompress - try{ - $this->decompress($file, "$tmp/".$base); - } catch (Exception $e) { - throw $e; - } + $this->decompress($file, "$tmp/".$base); // search $tmp/$base for the folder(s) that has been created // move the folder(s) to lib/.. -- cgit v1.2.3 From 4bad83d828217dc64292223b268c6a3674984070 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 8 Jan 2014 20:18:55 +0100 Subject: use DOKU_LF PHP_EOL is platform dependent, so you get in trouble while migrating between platforms. --- lib/plugins/extension/helper/extension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 3ff2ebcd8..c13aa983d 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -737,7 +737,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { $file = @file($managerpath); if(!empty($file)) { foreach($file as $line) { - list($key, $value) = explode('=', trim($line, PHP_EOL), 2); + list($key, $value) = explode('=', trim($line, DOKU_LF), 2); $key = trim($key); $value = trim($value); // backwards compatible with old plugin manager -- cgit v1.2.3 From bc1b7a8a0fdd1812e352cab5e2362bd5770d5b3b Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 8 Jan 2014 20:28:17 +0100 Subject: better filename parsing The filename found in the URL will be used for old plugins missing a base entry in their plugin.info.txt and lacking a subdirectory inside the archive as well. This patch makes sure possible query strings aren't included in the filename. Note: io_download() will also try to get a filename from any content-disposition header. If no filename can be found we simply use an md5 sum of the URL and hope the plugin will contain it's own hint for naming. --- lib/plugins/extension/helper/extension.php | 12 +++++++++--- lib/plugins/extension/lang/en/lang.php | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index c13aa983d..7958cd2da 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -783,11 +783,17 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { */ public function download($url) { // check the url - $matches = array(); - if(!preg_match('/[^\/]*$/', $url, $matches) || !$matches[0]) { + if(!preg_match('/https?:\/\//i', $url)){ throw new Exception($this->getLang('error_badurl')); } - $file = $matches[0]; + + // try to get the file from the path (used as plugin name fallback) + $file = parse_url($url, PHP_URL_PATH); + if(is_null($file)){ + $file = md5($url); + }else{ + $file = utf8_basename($file); + } // create tmp directory for download if(!($tmp = $this->mkTmpDir())) { diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index 06c83a708..b11490c0c 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -82,7 +82,7 @@ $lang['update_available'] = 'Update: New version %s $lang['wrong_folder'] = 'Plugin installed incorrectly: Rename plugin directory "%s" to "%s".'; $lang['url_change'] = 'URL changed: Download URL has changed since last download. Check if the new URL is valid before updating the extension.
    New: %s
    Old: %s'; -$lang['error_badurl'] = 'URL ends with slash - unable to determine file name from the url'; +$lang['error_badurl'] = 'URLs should start with http or https'; $lang['error_dircreate'] = 'Unable to create temporary folder to receive download'; $lang['error_download'] = 'Unable to download the file: %s'; $lang['error_decompress'] = 'Unable to decompress the downloaded file. This maybe as a result of a bad download, in which case you should try again; or the compression format may be unknown, in which case you will need to download and install manually.'; -- cgit v1.2.3 From c837868af892ada4c25333bec46583a0d42a240d Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 8 Jan 2014 20:29:17 +0100 Subject: added missing localization --- lib/plugins/extension/helper/gui.php | 6 +++--- lib/plugins/extension/lang/en/lang.php | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/plugins/extension/helper/gui.php b/lib/plugins/extension/helper/gui.php index 76651515c..953d50fa6 100644 --- a/lib/plugins/extension/helper/gui.php +++ b/lib/plugins/extension/helper/gui.php @@ -124,9 +124,9 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { echo '
    '; $form = new Doku_Form(array('action' => $this->tabURL('', array(), '&'), 'enctype' => 'multipart/form-data', 'class' => 'install')); - $form->addElement(form_makeTextField('installurl', '', 'Install from URL:', '', 'block')); - $form->addElement(form_makeFileField('installfile', 'Upload Extension:', '', 'block')); - $form->addElement(form_makeButton('submit', '', 'Install')); + $form->addElement(form_makeTextField('installurl', '', $this->getLang('install_url'), '', 'block')); + $form->addElement(form_makeFileField('installfile', $this->getLang('install_upload'), '', 'block')); + $form->addElement(form_makeButton('submit', '', $this->getLang('btn_install'))); $form->printForm(); } diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index b11490c0c..c0550c951 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -92,5 +92,7 @@ $lang['error_copy'] = 'There was a file copy error while attem $lang['noperms'] = 'Extension directory is not writable'; $lang['notplperms'] = 'Template directory is not writable'; $lang['nopluginperms'] = 'Plugin directory is not writable'; - $lang['git'] = 'This extension was installed via git, you may not want to update it here.'; + +$lang['install_url'] = 'Install from URL:'; +$lang['install_upload'] = 'Upload Extension:'; \ No newline at end of file -- cgit v1.2.3 From b1e758012b3d801d5ab266e53e830fb7091508a2 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 8 Jan 2014 20:38:23 +0100 Subject: show a message when search returns no results --- lib/plugins/extension/helper/gui.php | 10 +++++++--- lib/plugins/extension/helper/list.php | 8 ++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/plugins/extension/helper/gui.php b/lib/plugins/extension/helper/gui.php index 953d50fa6..3a0f0c589 100644 --- a/lib/plugins/extension/helper/gui.php +++ b/lib/plugins/extension/helper/gui.php @@ -106,9 +106,13 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { /* @var helper_plugin_extension_list $list */ $list = $this->loadHelper('extension_list'); $list->start_form(); - foreach($result as $name) { - $extension->setExtension($name); - $list->add_row($extension, $extension->getID() == $this->infoFor); + if($result){ + foreach($result as $name) { + $extension->setExtension($name); + $list->add_row($extension, $extension->getID() == $this->infoFor); + } + } else { + $list->nothing_found(); } $list->end_form(); $list->render(); diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index ba3681ce4..8cc303fbe 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -88,6 +88,14 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $this->form .= ''.DOKU_LF; } + /** + * Show message when no results are found + */ + function nothing_found() { + global $lang; + $this->form .= '
  • '.$lang['nothingfound'].'
  • '; + } + /** * Print the form */ -- cgit v1.2.3 From b5f365b32820bb760e8c3729affce219f696d1ba Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 12 Jan 2014 22:45:08 +0100 Subject: dokuwiki template: Fix the preview width on small screens FS#2914 --- lib/tpl/dokuwiki/css/mobile.less | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/tpl/dokuwiki/css/mobile.less b/lib/tpl/dokuwiki/css/mobile.less index 289f5afa3..0fbd0e8fe 100644 --- a/lib/tpl/dokuwiki/css/mobile.less +++ b/lib/tpl/dokuwiki/css/mobile.less @@ -65,6 +65,15 @@ margin-right: 0; } +/* preview */ +.dokuwiki.hasSidebar div.preview { + border-right: none; +} + +[dir=rtl] .dokuwiki.hasSidebar div.preview { + border-left: none; +} + /* toc */ #dw__toc { float: none; -- cgit v1.2.3 From 30b90257784ae25a5e30c968b4c9391bb47ff1a1 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 14 Jan 2014 08:21:22 +0100 Subject: added plugins group to test --- lib/plugins/extension/_test/extension.test.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/plugins/extension/_test/extension.test.php b/lib/plugins/extension/_test/extension.test.php index 97726d212..453b95e79 100644 --- a/lib/plugins/extension/_test/extension.test.php +++ b/lib/plugins/extension/_test/extension.test.php @@ -14,6 +14,7 @@ class mock_helper_plugin_extension_extension extends helper_plugin_extension_ext /** * @group plugin_extension + * @group plugins */ class helper_plugin_extension_extension_test extends DokuWikiTest { -- cgit v1.2.3 From 8426a3ee6fca3bd0fc582d6c405f5d30e12028d0 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 19 Jan 2014 20:10:49 +0100 Subject: check for false in readdir --- inc/io.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/io.php b/inc/io.php index 892f93759..c5225a2e0 100644 --- a/inc/io.php +++ b/inc/io.php @@ -417,7 +417,7 @@ function io_rmdir($path, $removefiles = false) { $files = array(); if(!$dh = @opendir($path)) return false; - while($f = readdir($dh)) { + while(false !== ($f = readdir($dh))) { if($f == '..' || $f == '.') continue; // collect dirs and files first -- cgit v1.2.3 From 1093058c04263725937daf750bfe776178f80f04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Jan=20Czocha=C5=84ski?= Date: Tue, 21 Jan 2014 22:21:08 +0100 Subject: translation update --- inc/lang/pl/lang.php | 2 + lib/plugins/authad/lang/pl/settings.php | 7 ++++ lib/plugins/authldap/lang/pl/settings.php | 8 ++++ lib/plugins/authmysql/lang/pl/settings.php | 3 ++ lib/plugins/plugin/lang/pl/admin_plugin.txt | 5 +++ lib/plugins/plugin/lang/pl/lang.php | 63 +++++++++++++++++++++++++++++ 6 files changed, 88 insertions(+) create mode 100644 lib/plugins/plugin/lang/pl/admin_plugin.txt create mode 100644 lib/plugins/plugin/lang/pl/lang.php diff --git a/inc/lang/pl/lang.php b/inc/lang/pl/lang.php index 142dd3baa..0a544a056 100644 --- a/inc/lang/pl/lang.php +++ b/inc/lang/pl/lang.php @@ -15,6 +15,7 @@ * @author Begina Felicysym * @author Aoi Karasu * @author Tomasz Bosak + * @author Paweł Jan Czochański */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -340,3 +341,4 @@ $lang['media_restore'] = 'Odtwórz tą wersję'; $lang['currentns'] = 'Obecna przestrzeń nazw.'; $lang['searchresult'] = 'Wyniki wyszukiwania'; $lang['plainhtml'] = 'Czysty HTML'; +$lang['wikimarkup'] = 'Znaczniki'; diff --git a/lib/plugins/authad/lang/pl/settings.php b/lib/plugins/authad/lang/pl/settings.php index ad051b0ac..4e397fc98 100644 --- a/lib/plugins/authad/lang/pl/settings.php +++ b/lib/plugins/authad/lang/pl/settings.php @@ -4,10 +4,17 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Tomasz Bosak + * @author Paweł Jan Czochański */ $lang['account_suffix'] = 'Przyrostek twojej nazwy konta np. @my.domain.org'; $lang['base_dn'] = 'Twoje bazowe DN. Na przykład: DC=my,DC=domain,DC=org'; +$lang['domain_controllers'] = 'Podzielona przecinkami lista kontrolerów domen np. srv1.domena.pl,srv2.domena.pl'; +$lang['admin_username'] = 'Uprawniony użytkownik katalogu Active Directory z dostępem do danych wszystkich użytkowników. +Opcjonalne, ale wymagane dla niektórych akcji np. wysyłania emailowych subskrypcji.'; $lang['admin_password'] = 'Hasło dla powyższego użytkownika.'; +$lang['sso'] = 'Czy pojedyncze logowanie powinno korzystać z Kerberos czy NTML?'; +$lang['sso_charset'] = 'Kodowanie znaków wykorzystywane do przesyłania nazwy użytkownika dla Kerberos lub NTLM. Pozostaw puste dla UTF-8 lub latin-1. Wymaga rozszerzenia iconv.'; $lang['use_ssl'] = 'Użyć połączenie SSL? Jeśli tak to nie aktywuj TLS poniżej.'; $lang['use_tls'] = 'Użyć połączenie TLS? Jeśli tak to nie aktywuj SSL powyżej.'; +$lang['debug'] = 'Wyświetlać dodatkowe informacje do debugowania w przypadku błędów?'; $lang['expirywarn'] = 'Dni poprzedzających powiadomienie użytkownika o wygasającym haśle. 0 aby wyłączyć.'; diff --git a/lib/plugins/authldap/lang/pl/settings.php b/lib/plugins/authldap/lang/pl/settings.php index 084521e0d..7010988e6 100644 --- a/lib/plugins/authldap/lang/pl/settings.php +++ b/lib/plugins/authldap/lang/pl/settings.php @@ -3,6 +3,14 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Paweł Jan Czochański */ +$lang['server'] = 'Twój serwer LDAP. Podaj nazwę hosta (localhost) albo pełen adres URL (ldap://server.tld:389).'; +$lang['port'] = 'Port serwera LDAP jeżeli nie podano pełnego adresu URL wyżej.'; +$lang['usertree'] = 'Gdzie szukać kont użytkownika? np. ou=People, dc=server, dc=tld'; +$lang['grouptree'] = 'Gdzie szukać grup użytkowników? np. ou=Group, dc=server, dc=tld'; +$lang['userfilter'] = 'Filtr LDAP wykorzystany przy szukaniu kont użytkowników np. (&(uid=%{user})(objectClass=posixAccount))'; +$lang['groupfilter'] = 'Filtr LDAP wykorzystany przy szukaniu grup użytkowników np. (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))'; +$lang['version'] = 'Wykorzystywana wersja protokołu. Być może konieczne jest ustawienie tego na 3.'; $lang['starttls'] = 'Użyć połączeń TLS?'; $lang['bindpw'] = 'Hasło powyższego użytkownika'; diff --git a/lib/plugins/authmysql/lang/pl/settings.php b/lib/plugins/authmysql/lang/pl/settings.php index 5ae6bf168..88cbd5d6f 100644 --- a/lib/plugins/authmysql/lang/pl/settings.php +++ b/lib/plugins/authmysql/lang/pl/settings.php @@ -3,9 +3,12 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Paweł Jan Czochański */ $lang['server'] = 'Twój server MySQL'; $lang['user'] = 'Nazwa użytkownika MySQL'; $lang['password'] = 'Hasło dla powyższego użytkownika'; $lang['database'] = 'Używana baza danych'; $lang['charset'] = 'Zestaw znaków uzyty w bazie danych'; +$lang['debug'] = 'Wyświetlaj dodatkowe informacje do debugowania.'; +$lang['checkPass'] = 'Zapytanie SQL wykorzystywane do sprawdzania haseł.'; diff --git a/lib/plugins/plugin/lang/pl/admin_plugin.txt b/lib/plugins/plugin/lang/pl/admin_plugin.txt new file mode 100644 index 000000000..f01048198 --- /dev/null +++ b/lib/plugins/plugin/lang/pl/admin_plugin.txt @@ -0,0 +1,5 @@ +====== Menadżer wtyczek ====== + +Na tej stronie możesz zarządzać wszystkim co jest związane z [[doku>plugins|wtyczkami]] Dokuwiki. Aby móc ściągnąć i zainstalować wtyczkę, serwer WWW musi mieć prawo do zapisu w katalogu ''plugins''. + + diff --git a/lib/plugins/plugin/lang/pl/lang.php b/lib/plugins/plugin/lang/pl/lang.php new file mode 100644 index 000000000..eae91f33e --- /dev/null +++ b/lib/plugins/plugin/lang/pl/lang.php @@ -0,0 +1,63 @@ + + * @author Grzegorz Żur + * @author Mariusz Kujawski + * @author Maciej Kurczewski + * @author Sławomir Boczek + * @author sleshek@wp.pl + * @author Leszek Stachowski + * @author maros + * @author Grzegorz Widła + * @author Łukasz Chmaj + * @author Begina Felicysym + * @author Aoi Karasu + */ +$lang['menu'] = 'Menadżer wtyczek'; +$lang['download'] = 'Ściągnij i zainstaluj nową wtyczkę'; +$lang['manage'] = 'Zainstalowane Wtyczki'; +$lang['btn_info'] = 'Informacje'; +$lang['btn_update'] = 'Aktualizuj'; +$lang['btn_delete'] = 'Usuń'; +$lang['btn_settings'] = 'Ustawienia'; +$lang['btn_download'] = 'Pobierz'; +$lang['btn_enable'] = 'Zapisz'; +$lang['url'] = 'Adres URL'; +$lang['installed'] = 'Instalacja:'; +$lang['lastupdate'] = 'Ostatnio zaktualizowana:'; +$lang['source'] = 'Źródło:'; +$lang['unknown'] = 'nieznane'; +$lang['updating'] = 'Aktualizuję...'; +$lang['updated'] = 'Aktualizacja wtyczki %s pomyślnie ściągnięta'; +$lang['updates'] = 'Aktualizacje następujących wtyczek zostały pomyślnie ściągnięte'; +$lang['update_none'] = 'Nie znaleziono aktualizacji.'; +$lang['deleting'] = 'Usuwam...'; +$lang['deleted'] = 'Wtyczka %s usunięta.'; +$lang['downloading'] = 'Pobieram...'; +$lang['downloaded'] = 'Wtyczka %s pomyślnie zainstalowana'; +$lang['downloads'] = 'Następujące wtyczki zostały pomyślnie zainstalowane:'; +$lang['download_none'] = 'Nie znaleziono wtyczek lub wystąpił nieznany problem podczas ściągania i instalacji.'; +$lang['plugin'] = 'Wtyczka:'; +$lang['components'] = 'Składniki'; +$lang['noinfo'] = 'Ta wtyczka nie zwróciła żadnych informacji, może być niepoprawna.'; +$lang['name'] = 'Nazwa:'; +$lang['date'] = 'Data:'; +$lang['type'] = 'Typ:'; +$lang['desc'] = 'Opis:'; +$lang['author'] = 'Autor:'; +$lang['www'] = 'WWW:'; +$lang['error'] = 'Wystąpił nieznany błąd.'; +$lang['error_download'] = 'Nie powiodło się ściągnięcie pliku wtyczki: %s'; +$lang['error_badurl'] = 'Prawdopodobnie zły url - nie da się ustalić nazwy pliku na podstawie urla'; +$lang['error_dircreate'] = 'Nie powiodło się stworzenie tymczasowego katalogu na pobrane pliki'; +$lang['error_decompress'] = 'Menadżer wtyczek nie był w stanie rozpakować ściągniętego pliku. Może to być spowodowane przez nieudany transfer (w takim przypadku powinieneś spróbować ponownie) lub nieznany format kompresji (w takim przypadku będziesz musiał ściągnąć i zainstalować wtyczkę ręcznie).'; +$lang['error_copy'] = 'Wystąpił błąd podczas kopiowania pliku w trakcie instalacji wtyczki %s: być może dysk jest pełny lub prawa dostępu są niepoprawne. Efektem może być częściowo zainstalowana wtyczka co może spowodować niestabilność Twojej instalacji wiki.'; +$lang['error_delete'] = 'Wystąpił błąd przy próbie usunięcia wtyczki %s. Prawdopodobną przyczyną są niewystarczające uprawnienia do katalogu.'; +$lang['enabled'] = 'Wtyczka %s włączona.'; +$lang['notenabled'] = 'Nie udało się uruchomić wtyczki %s, sprawdź uprawnienia dostępu do plików.'; +$lang['disabled'] = 'Wtyczka %s wyłączona.'; +$lang['notdisabled'] = 'Nie udało się wyłączyć wtyczki %s, sprawdź uprawnienia dostępu do plików.'; +$lang['packageinstalled'] = 'Pakiet wtyczek (%d wtyczki: %s) zainstalowany pomyślnie.'; -- cgit v1.2.3 From a18d5a45ddf6db8f235df0f115cd33c2211edf4e Mon Sep 17 00:00:00 2001 From: cross Date: Wed, 22 Jan 2014 04:00:55 +0100 Subject: translation update --- inc/lang/el/lang.php | 1 + lib/plugins/plugin/lang/el/admin_plugin.txt | 5 +++ lib/plugins/plugin/lang/el/lang.php | 58 +++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 lib/plugins/plugin/lang/el/admin_plugin.txt create mode 100644 lib/plugins/plugin/lang/el/lang.php diff --git a/inc/lang/el/lang.php b/inc/lang/el/lang.php index 8007f2b23..170e101a5 100644 --- a/inc/lang/el/lang.php +++ b/inc/lang/el/lang.php @@ -11,6 +11,7 @@ * @author Vasileios Karavasilis vasileioskaravasilis@gmail.com * @author Constantinos Xanthopoulos * @author chris taklis + * @author cross */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/lib/plugins/plugin/lang/el/admin_plugin.txt b/lib/plugins/plugin/lang/el/admin_plugin.txt new file mode 100644 index 000000000..8b292935d --- /dev/null +++ b/lib/plugins/plugin/lang/el/admin_plugin.txt @@ -0,0 +1,5 @@ +====== Διαχείριση Επεκτάσεων ====== + +Σε αυτή την σελίδα μπορείτε να διαχειριστείτε τις [[doku>plugins|επεκτάσεις]] του Dokuwiki σας. Για να μπορέσετε να εγκαταστήσετε νέες επεκτάσεις, ο αντίστοιχος φάκελος συστήματος θα πρέπει να είναι εγγράψιμος από τον χρήστη κάτω από τον οποίο εκτελείται η εφαρμογή του εξυπηρετητή σας. + + diff --git a/lib/plugins/plugin/lang/el/lang.php b/lib/plugins/plugin/lang/el/lang.php new file mode 100644 index 000000000..f50e26c46 --- /dev/null +++ b/lib/plugins/plugin/lang/el/lang.php @@ -0,0 +1,58 @@ + + * @author Thanos Massias + * @author Αθανάσιος Νταής + * @author Konstantinos Koryllos + * @author George Petsagourakis + * @author Petros Vidalis + * @author Vasileios Karavasilis vasileioskaravasilis@gmail.com + */ +$lang['menu'] = 'Διαχείριση Επεκτάσεων'; +$lang['download'] = 'Κατεβάστε και εγκαταστήστε μια νέα επέκταση (plugin)'; +$lang['manage'] = 'Εγκατεστημένες επεκτάσεις'; +$lang['btn_info'] = 'πληροφορίες'; +$lang['btn_update'] = 'ενημέρωση'; +$lang['btn_delete'] = 'διαγραφή'; +$lang['btn_settings'] = 'ρυθμίσεις'; +$lang['btn_download'] = 'Μεταφόρτωση'; +$lang['btn_enable'] = 'Αποθήκευση'; +$lang['url'] = 'URL'; +$lang['installed'] = 'Εγκατεστημένη:'; +$lang['lastupdate'] = 'Τελευταία ενημέρωση:'; +$lang['source'] = 'Προέλευση:'; +$lang['unknown'] = 'άγνωστο'; +$lang['updating'] = 'Σε διαδικασία ενημέρωσης ...'; +$lang['updated'] = 'Η επέκταση %s ενημερώθηκε με επιτυχία'; +$lang['updates'] = 'Οι παρακάτω επεκτάσεις ενημερώθηκαν με επιτυχία:'; +$lang['update_none'] = 'Δεν βρέθηκαν ενημερώσεις.'; +$lang['deleting'] = 'Σε διαδικασία διαγραφής ...'; +$lang['deleted'] = 'Η επέκταση %s διαγράφηκε.'; +$lang['downloading'] = 'Σε διαδικασία μεταφόρτωσης ...'; +$lang['downloaded'] = 'Η επέκταση %s εγκαταστάθηκε με επιτυχία'; +$lang['downloads'] = 'Οι παρακάτω επεκτάσεις εγκαταστάθηκαν με επιτυχία:'; +$lang['download_none'] = 'Δεν βρέθηκαν επεκτάσεις ή εμφανίστηκε κάποιο πρόβλημα κατά την σχετική διαδικασία.'; +$lang['plugin'] = 'Επέκταση:'; +$lang['components'] = 'Συστατικά'; +$lang['noinfo'] = 'Αυτή η επέκταση δεν επέστρεψε κάποια πληροφορία - η επέκταση μπορεί να μην λειτουργεί κανονικά.'; +$lang['name'] = 'Όνομα:'; +$lang['date'] = 'Ημερομηνία:'; +$lang['type'] = 'Τύπος:'; +$lang['desc'] = 'Περιγραφή:'; +$lang['author'] = 'Συγγραφέας:'; +$lang['www'] = 'Διεύθυνση στο διαδίκτυο:'; +$lang['error'] = 'Εμφανίστηκε άγνωστο σφάλμα.'; +$lang['error_download'] = 'Δεν είναι δυνατή η μεταφόρτωση του αρχείου: %s'; +$lang['error_badurl'] = 'Το URL είναι μάλλον λανθασμένο - είναι αδύνατον να εξαχθεί το όνομα αρχείου από αυτό το URL'; +$lang['error_dircreate'] = 'Δεν είναι δυνατή η δημιουργία ενός προσωρινού φακέλου αποθήκευσης των μεταφορτώσεων'; +$lang['error_decompress'] = 'Δεν είναι δυνατή η αποσυμπίεση των μεταφορτώσεων. Αυτό μπορεί να οφείλεται σε μερική λήψη των μεταφορτώσεων, οπότε θα πρέπει να επαναλάβετε την διαδικασία ή το σύστημά σας δεν μπορεί να διαχειριστεί το συγκεκριμένο είδος συμπίεσης, οπότε θα πρέπει να εγκαταστήσετε την επέκταση χειροκίνητα.'; +$lang['error_copy'] = 'Εμφανίστηκε ένα σφάλμα αντιγραφής αρχείων κατά την διάρκεια εγκατάστασης της επέκτασης %s: ο δίσκος μπορεί να είναι γεμάτος ή να μην είναι σωστά ρυθμισμένα τα δικαιώματα πρόσβασης. Αυτό το γεγονός μπορεί να οδήγησε σε μερική εγκατάσταση της επέκτασης και άρα η DokuWiki εγκατάστασή σας να εμφανίσει προβλήματα σταθερότητας.'; +$lang['error_delete'] = 'Εμφανίστηκε ένα σφάλμα κατά την διαδικασία διαγραφής της επέκτασης %s. Η πιθανότερη αιτία είναι να μην είναι σωστά ρυθμισμένα τα δικαιώματα πρόσβασης.'; +$lang['enabled'] = 'Η επέκταση %s ενεργοποιήθηκε.'; +$lang['notenabled'] = 'Η επέκταση %s δεν μπορεί να ενεργοποιηθεί. Ελέγξτε τα δικαιώματα πρόσβασης.'; +$lang['disabled'] = 'Η επέκταση %s απενεργοποιήθηκε.'; +$lang['notdisabled'] = 'Η επέκταση %s δεν μπορεί να απενεργοποιηθεί. Ελέγξτε τα δικαιώματα πρόσβασης.'; +$lang['packageinstalled'] = 'Το πακέτο της επέκτασης (%d επέκταση(εις): %s) εγκαστήθηκε επιτυχημένα.'; -- cgit v1.2.3 From 36e8c6378a4357420f4e42950358c6728c528d51 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 22 Jan 2014 09:54:03 +0100 Subject: add missing autoloader entry for Doku_Parser_Mode_Plugin #496 --- inc/load.php | 1 + 1 file changed, 1 insertion(+) diff --git a/inc/load.php b/inc/load.php index c5b40ffd8..497dd6921 100644 --- a/inc/load.php +++ b/inc/load.php @@ -76,6 +76,7 @@ function load_autoload($name){ 'ZipLib' => DOKU_INC.'inc/ZipLib.class.php', 'DokuWikiFeedCreator' => DOKU_INC.'inc/feedcreator.class.php', 'Doku_Parser_Mode' => DOKU_INC.'inc/parser/parser.php', + 'Doku_Parser_Mode_Plugin' => DOKU_INC.'inc/parser/parser.php', 'SafeFN' => DOKU_INC.'inc/SafeFN.class.php', 'Sitemapper' => DOKU_INC.'inc/Sitemapper.php', 'PassHash' => DOKU_INC.'inc/PassHash.class.php', -- cgit v1.2.3 From 1843bbd051a3e72e7180cf0851f53d4cebb4853f Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 22 Jan 2014 10:07:21 +0100 Subject: rename render() to render_text() in Doku_Plugin. #496 --- inc/plugin.php | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/inc/plugin.php b/inc/plugin.php index dccd37bd9..95bdaee2b 100644 --- a/inc/plugin.php +++ b/inc/plugin.php @@ -238,11 +238,36 @@ class DokuWiki_Plugin { return "$title"; } + /** + * A fallback to provide access to the old render() method + * + * Since syntax plugins provide their own render method with a different signature and they now + * inherit from Doku_Plugin we can no longer have a render() method here (Strict Standards Violation). + * Instead use render_text() + * + * @deprecated 2014-01-22 + * @param $name + * @param $arguments + * @return null|string + */ + function __call($name, $arguments) { + if($name == 'render'){ + if(!isset($arguments[1])) $arguments[1] = 'xhtml'; + return $this->render_text($arguments[0], $arguments[1]); + } + trigger_error("no such method $name", E_ERROR); + return null; + } + /** * output text string through the parser, allows dokuwiki markup to be used * very ineffecient for small pieces of data - try not to use + * + * @param string $text wiki markup to parse + * @param string $format output format + * @return null|string */ - function render($text, $format='xhtml') { + function render_text($text, $format='xhtml') { return p_render($format, p_get_instructions($text),$info); } -- cgit v1.2.3 From 2b37b3b688bee97cc698c01923227e31a6d2dfe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Jan=20Czocha=C5=84ski?= Date: Wed, 22 Jan 2014 21:46:24 +0100 Subject: translation update --- inc/lang/pl/lang.php | 5 ++- lib/plugins/plugin/lang/pl/admin_plugin.txt | 5 +++ lib/plugins/plugin/lang/pl/lang.php | 63 +++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 lib/plugins/plugin/lang/pl/admin_plugin.txt create mode 100644 lib/plugins/plugin/lang/pl/lang.php diff --git a/inc/lang/pl/lang.php b/inc/lang/pl/lang.php index 142dd3baa..a1dcc6bbd 100644 --- a/inc/lang/pl/lang.php +++ b/inc/lang/pl/lang.php @@ -15,6 +15,7 @@ * @author Begina Felicysym * @author Aoi Karasu * @author Tomasz Bosak + * @author Paweł Jan Czochański */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -324,7 +325,7 @@ $lang['media_list_thumbs'] = 'Miniatury'; $lang['media_list_rows'] = 'Wiersze'; $lang['media_sort_name'] = 'Nazwa'; $lang['media_sort_date'] = 'Data'; -$lang['media_namespaces'] = 'Wybierz przestrzeń nazw'; +$lang['media_namespaces'] = 'Wybierz katalog'; $lang['media_files'] = 'Pliki w %s'; $lang['media_upload'] = 'Przesyłanie plików na %s'; $lang['media_search'] = 'Znajdź w %s'; @@ -337,6 +338,6 @@ $lang['media_perm_read'] = 'Przepraszamy, nie masz wystarczających uprawn $lang['media_perm_upload'] = 'Przepraszamy, nie masz wystarczających uprawnień do przesyłania plików.'; $lang['media_update'] = 'Prześlij nową wersję'; $lang['media_restore'] = 'Odtwórz tą wersję'; -$lang['currentns'] = 'Obecna przestrzeń nazw.'; +$lang['currentns'] = 'Obecny katalog'; $lang['searchresult'] = 'Wyniki wyszukiwania'; $lang['plainhtml'] = 'Czysty HTML'; diff --git a/lib/plugins/plugin/lang/pl/admin_plugin.txt b/lib/plugins/plugin/lang/pl/admin_plugin.txt new file mode 100644 index 000000000..f01048198 --- /dev/null +++ b/lib/plugins/plugin/lang/pl/admin_plugin.txt @@ -0,0 +1,5 @@ +====== Menadżer wtyczek ====== + +Na tej stronie możesz zarządzać wszystkim co jest związane z [[doku>plugins|wtyczkami]] Dokuwiki. Aby móc ściągnąć i zainstalować wtyczkę, serwer WWW musi mieć prawo do zapisu w katalogu ''plugins''. + + diff --git a/lib/plugins/plugin/lang/pl/lang.php b/lib/plugins/plugin/lang/pl/lang.php new file mode 100644 index 000000000..eae91f33e --- /dev/null +++ b/lib/plugins/plugin/lang/pl/lang.php @@ -0,0 +1,63 @@ + + * @author Grzegorz Żur + * @author Mariusz Kujawski + * @author Maciej Kurczewski + * @author Sławomir Boczek + * @author sleshek@wp.pl + * @author Leszek Stachowski + * @author maros + * @author Grzegorz Widła + * @author Łukasz Chmaj + * @author Begina Felicysym + * @author Aoi Karasu + */ +$lang['menu'] = 'Menadżer wtyczek'; +$lang['download'] = 'Ściągnij i zainstaluj nową wtyczkę'; +$lang['manage'] = 'Zainstalowane Wtyczki'; +$lang['btn_info'] = 'Informacje'; +$lang['btn_update'] = 'Aktualizuj'; +$lang['btn_delete'] = 'Usuń'; +$lang['btn_settings'] = 'Ustawienia'; +$lang['btn_download'] = 'Pobierz'; +$lang['btn_enable'] = 'Zapisz'; +$lang['url'] = 'Adres URL'; +$lang['installed'] = 'Instalacja:'; +$lang['lastupdate'] = 'Ostatnio zaktualizowana:'; +$lang['source'] = 'Źródło:'; +$lang['unknown'] = 'nieznane'; +$lang['updating'] = 'Aktualizuję...'; +$lang['updated'] = 'Aktualizacja wtyczki %s pomyślnie ściągnięta'; +$lang['updates'] = 'Aktualizacje następujących wtyczek zostały pomyślnie ściągnięte'; +$lang['update_none'] = 'Nie znaleziono aktualizacji.'; +$lang['deleting'] = 'Usuwam...'; +$lang['deleted'] = 'Wtyczka %s usunięta.'; +$lang['downloading'] = 'Pobieram...'; +$lang['downloaded'] = 'Wtyczka %s pomyślnie zainstalowana'; +$lang['downloads'] = 'Następujące wtyczki zostały pomyślnie zainstalowane:'; +$lang['download_none'] = 'Nie znaleziono wtyczek lub wystąpił nieznany problem podczas ściągania i instalacji.'; +$lang['plugin'] = 'Wtyczka:'; +$lang['components'] = 'Składniki'; +$lang['noinfo'] = 'Ta wtyczka nie zwróciła żadnych informacji, może być niepoprawna.'; +$lang['name'] = 'Nazwa:'; +$lang['date'] = 'Data:'; +$lang['type'] = 'Typ:'; +$lang['desc'] = 'Opis:'; +$lang['author'] = 'Autor:'; +$lang['www'] = 'WWW:'; +$lang['error'] = 'Wystąpił nieznany błąd.'; +$lang['error_download'] = 'Nie powiodło się ściągnięcie pliku wtyczki: %s'; +$lang['error_badurl'] = 'Prawdopodobnie zły url - nie da się ustalić nazwy pliku na podstawie urla'; +$lang['error_dircreate'] = 'Nie powiodło się stworzenie tymczasowego katalogu na pobrane pliki'; +$lang['error_decompress'] = 'Menadżer wtyczek nie był w stanie rozpakować ściągniętego pliku. Może to być spowodowane przez nieudany transfer (w takim przypadku powinieneś spróbować ponownie) lub nieznany format kompresji (w takim przypadku będziesz musiał ściągnąć i zainstalować wtyczkę ręcznie).'; +$lang['error_copy'] = 'Wystąpił błąd podczas kopiowania pliku w trakcie instalacji wtyczki %s: być może dysk jest pełny lub prawa dostępu są niepoprawne. Efektem może być częściowo zainstalowana wtyczka co może spowodować niestabilność Twojej instalacji wiki.'; +$lang['error_delete'] = 'Wystąpił błąd przy próbie usunięcia wtyczki %s. Prawdopodobną przyczyną są niewystarczające uprawnienia do katalogu.'; +$lang['enabled'] = 'Wtyczka %s włączona.'; +$lang['notenabled'] = 'Nie udało się uruchomić wtyczki %s, sprawdź uprawnienia dostępu do plików.'; +$lang['disabled'] = 'Wtyczka %s wyłączona.'; +$lang['notdisabled'] = 'Nie udało się wyłączyć wtyczki %s, sprawdź uprawnienia dostępu do plików.'; +$lang['packageinstalled'] = 'Pakiet wtyczek (%d wtyczki: %s) zainstalowany pomyślnie.'; -- cgit v1.2.3 From 975e2a1982518e206667387f0540ce46e5c482ca Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 24 Jan 2014 17:33:18 +0100 Subject: removed empty language files our translation interface used to submit empty files for a while but no longer does, so these can go --- lib/plugins/acl/lang/hi/lang.php | 7 ------- lib/plugins/acl/lang/id-ni/lang.php | 7 ------- lib/plugins/acl/lang/lb/lang.php | 6 ------ lib/plugins/acl/lang/ms/lang.php | 6 ------ lib/plugins/authad/lang/lv/settings.php | 6 ------ lib/plugins/authldap/lang/lv/settings.php | 6 ------ lib/plugins/authmysql/lang/fi/settings.php | 6 ------ lib/plugins/authmysql/lang/lv/settings.php | 6 ------ lib/plugins/authpgsql/lang/fi/settings.php | 6 ------ lib/plugins/authpgsql/lang/it/settings.php | 5 ----- lib/plugins/authpgsql/lang/lv/settings.php | 6 ------ lib/plugins/authpgsql/lang/pl/settings.php | 5 ----- lib/plugins/config/lang/hr/lang.php | 8 -------- lib/plugins/config/lang/id/lang.php | 7 ------- lib/plugins/config/lang/kk/lang.php | 6 ------ lib/plugins/config/lang/lb/lang.php | 6 ------ lib/plugins/config/lang/mk/lang.php | 6 ------ lib/plugins/config/lang/ms/lang.php | 6 ------ lib/plugins/config/lang/vi/lang.php | 5 ----- lib/plugins/popularity/lang/et/lang.php | 7 ------- lib/plugins/popularity/lang/hr/lang.php | 8 -------- lib/plugins/popularity/lang/id/lang.php | 6 ------ lib/plugins/popularity/lang/kk/lang.php | 6 ------ lib/plugins/popularity/lang/lb/lang.php | 6 ------ lib/plugins/popularity/lang/mk/lang.php | 6 ------ lib/plugins/popularity/lang/ms/lang.php | 6 ------ lib/plugins/popularity/lang/vi/lang.php | 5 ----- lib/plugins/revert/lang/af/lang.php | 5 ----- lib/plugins/revert/lang/et/lang.php | 7 ------- lib/plugins/revert/lang/hi/lang.php | 7 ------- lib/plugins/revert/lang/hr/lang.php | 8 -------- lib/plugins/revert/lang/id-ni/lang.php | 7 ------- lib/plugins/revert/lang/id/lang.php | 7 ------- lib/plugins/revert/lang/kk/lang.php | 6 ------ lib/plugins/revert/lang/lb/lang.php | 6 ------ lib/plugins/revert/lang/lt/lang.php | 7 ------- lib/plugins/revert/lang/mk/lang.php | 6 ------ lib/plugins/revert/lang/ms/lang.php | 6 ------ lib/plugins/revert/lang/vi/lang.php | 5 ----- lib/plugins/usermanager/lang/hi/lang.php | 7 ------- lib/plugins/usermanager/lang/hr/lang.php | 8 -------- lib/plugins/usermanager/lang/id-ni/lang.php | 7 ------- lib/plugins/usermanager/lang/lb/lang.php | 6 ------ lib/plugins/usermanager/lang/ms/lang.php | 6 ------ lib/plugins/usermanager/lang/vi/lang.php | 5 ----- 45 files changed, 282 deletions(-) delete mode 100644 lib/plugins/acl/lang/hi/lang.php delete mode 100644 lib/plugins/acl/lang/id-ni/lang.php delete mode 100644 lib/plugins/acl/lang/lb/lang.php delete mode 100644 lib/plugins/acl/lang/ms/lang.php delete mode 100644 lib/plugins/authad/lang/lv/settings.php delete mode 100644 lib/plugins/authldap/lang/lv/settings.php delete mode 100644 lib/plugins/authmysql/lang/fi/settings.php delete mode 100644 lib/plugins/authmysql/lang/lv/settings.php delete mode 100644 lib/plugins/authpgsql/lang/fi/settings.php delete mode 100644 lib/plugins/authpgsql/lang/it/settings.php delete mode 100644 lib/plugins/authpgsql/lang/lv/settings.php delete mode 100644 lib/plugins/authpgsql/lang/pl/settings.php delete mode 100644 lib/plugins/config/lang/hr/lang.php delete mode 100644 lib/plugins/config/lang/id/lang.php delete mode 100644 lib/plugins/config/lang/kk/lang.php delete mode 100644 lib/plugins/config/lang/lb/lang.php delete mode 100644 lib/plugins/config/lang/mk/lang.php delete mode 100644 lib/plugins/config/lang/ms/lang.php delete mode 100644 lib/plugins/config/lang/vi/lang.php delete mode 100644 lib/plugins/popularity/lang/et/lang.php delete mode 100644 lib/plugins/popularity/lang/hr/lang.php delete mode 100644 lib/plugins/popularity/lang/id/lang.php delete mode 100644 lib/plugins/popularity/lang/kk/lang.php delete mode 100644 lib/plugins/popularity/lang/lb/lang.php delete mode 100644 lib/plugins/popularity/lang/mk/lang.php delete mode 100644 lib/plugins/popularity/lang/ms/lang.php delete mode 100644 lib/plugins/popularity/lang/vi/lang.php delete mode 100644 lib/plugins/revert/lang/af/lang.php delete mode 100644 lib/plugins/revert/lang/et/lang.php delete mode 100644 lib/plugins/revert/lang/hi/lang.php delete mode 100644 lib/plugins/revert/lang/hr/lang.php delete mode 100644 lib/plugins/revert/lang/id-ni/lang.php delete mode 100644 lib/plugins/revert/lang/id/lang.php delete mode 100644 lib/plugins/revert/lang/kk/lang.php delete mode 100644 lib/plugins/revert/lang/lb/lang.php delete mode 100644 lib/plugins/revert/lang/lt/lang.php delete mode 100644 lib/plugins/revert/lang/mk/lang.php delete mode 100644 lib/plugins/revert/lang/ms/lang.php delete mode 100644 lib/plugins/revert/lang/vi/lang.php delete mode 100644 lib/plugins/usermanager/lang/hi/lang.php delete mode 100644 lib/plugins/usermanager/lang/hr/lang.php delete mode 100644 lib/plugins/usermanager/lang/id-ni/lang.php delete mode 100644 lib/plugins/usermanager/lang/lb/lang.php delete mode 100644 lib/plugins/usermanager/lang/ms/lang.php delete mode 100644 lib/plugins/usermanager/lang/vi/lang.php diff --git a/lib/plugins/acl/lang/hi/lang.php b/lib/plugins/acl/lang/hi/lang.php deleted file mode 100644 index d6f78ffd6..000000000 --- a/lib/plugins/acl/lang/hi/lang.php +++ /dev/null @@ -1,7 +0,0 @@ - - * @author yndesai@gmail.com - */ diff --git a/lib/plugins/acl/lang/id-ni/lang.php b/lib/plugins/acl/lang/id-ni/lang.php deleted file mode 100644 index d367340b7..000000000 --- a/lib/plugins/acl/lang/id-ni/lang.php +++ /dev/null @@ -1,7 +0,0 @@ - - * @author Yustinus Waruwu - */ diff --git a/lib/plugins/acl/lang/lb/lang.php b/lib/plugins/acl/lang/lb/lang.php deleted file mode 100644 index 59acdf7a8..000000000 --- a/lib/plugins/acl/lang/lb/lang.php +++ /dev/null @@ -1,6 +0,0 @@ - - */ diff --git a/lib/plugins/authldap/lang/lv/settings.php b/lib/plugins/authldap/lang/lv/settings.php deleted file mode 100644 index ced5dabf8..000000000 --- a/lib/plugins/authldap/lang/lv/settings.php +++ /dev/null @@ -1,6 +0,0 @@ - - */ diff --git a/lib/plugins/authmysql/lang/fi/settings.php b/lib/plugins/authmysql/lang/fi/settings.php deleted file mode 100644 index d3aa13e07..000000000 --- a/lib/plugins/authmysql/lang/fi/settings.php +++ /dev/null @@ -1,6 +0,0 @@ - - */ diff --git a/lib/plugins/authmysql/lang/lv/settings.php b/lib/plugins/authmysql/lang/lv/settings.php deleted file mode 100644 index ced5dabf8..000000000 --- a/lib/plugins/authmysql/lang/lv/settings.php +++ /dev/null @@ -1,6 +0,0 @@ - - */ diff --git a/lib/plugins/authpgsql/lang/fi/settings.php b/lib/plugins/authpgsql/lang/fi/settings.php deleted file mode 100644 index d3aa13e07..000000000 --- a/lib/plugins/authpgsql/lang/fi/settings.php +++ /dev/null @@ -1,6 +0,0 @@ - - */ diff --git a/lib/plugins/authpgsql/lang/it/settings.php b/lib/plugins/authpgsql/lang/it/settings.php deleted file mode 100644 index 10ae72f87..000000000 --- a/lib/plugins/authpgsql/lang/it/settings.php +++ /dev/null @@ -1,5 +0,0 @@ - - */ diff --git a/lib/plugins/authpgsql/lang/pl/settings.php b/lib/plugins/authpgsql/lang/pl/settings.php deleted file mode 100644 index 37afb252d..000000000 --- a/lib/plugins/authpgsql/lang/pl/settings.php +++ /dev/null @@ -1,5 +0,0 @@ - - * @author Dražen Odobašić - * @author Dejan Igrec dejan.igrec@gmail.com - */ diff --git a/lib/plugins/config/lang/id/lang.php b/lib/plugins/config/lang/id/lang.php deleted file mode 100644 index c3d485930..000000000 --- a/lib/plugins/config/lang/id/lang.php +++ /dev/null @@ -1,7 +0,0 @@ - - * @author Yustinus Waruwu - */ diff --git a/lib/plugins/config/lang/kk/lang.php b/lib/plugins/config/lang/kk/lang.php deleted file mode 100644 index dde5b9577..000000000 --- a/lib/plugins/config/lang/kk/lang.php +++ /dev/null @@ -1,6 +0,0 @@ - - */ diff --git a/lib/plugins/config/lang/ms/lang.php b/lib/plugins/config/lang/ms/lang.php deleted file mode 100644 index 77ad2a1c1..000000000 --- a/lib/plugins/config/lang/ms/lang.php +++ /dev/null @@ -1,6 +0,0 @@ - - */ diff --git a/lib/plugins/popularity/lang/hr/lang.php b/lib/plugins/popularity/lang/hr/lang.php deleted file mode 100644 index 96f1d6afe..000000000 --- a/lib/plugins/popularity/lang/hr/lang.php +++ /dev/null @@ -1,8 +0,0 @@ - - * @author Dražen Odobašić - * @author Dejan Igrec dejan.igrec@gmail.com - */ diff --git a/lib/plugins/popularity/lang/id/lang.php b/lib/plugins/popularity/lang/id/lang.php deleted file mode 100644 index 1867f0f69..000000000 --- a/lib/plugins/popularity/lang/id/lang.php +++ /dev/null @@ -1,6 +0,0 @@ - - */ diff --git a/lib/plugins/popularity/lang/kk/lang.php b/lib/plugins/popularity/lang/kk/lang.php deleted file mode 100644 index dde5b9577..000000000 --- a/lib/plugins/popularity/lang/kk/lang.php +++ /dev/null @@ -1,6 +0,0 @@ - - */ diff --git a/lib/plugins/popularity/lang/ms/lang.php b/lib/plugins/popularity/lang/ms/lang.php deleted file mode 100644 index 77ad2a1c1..000000000 --- a/lib/plugins/popularity/lang/ms/lang.php +++ /dev/null @@ -1,6 +0,0 @@ - - */ diff --git a/lib/plugins/revert/lang/hi/lang.php b/lib/plugins/revert/lang/hi/lang.php deleted file mode 100644 index d6f78ffd6..000000000 --- a/lib/plugins/revert/lang/hi/lang.php +++ /dev/null @@ -1,7 +0,0 @@ - - * @author yndesai@gmail.com - */ diff --git a/lib/plugins/revert/lang/hr/lang.php b/lib/plugins/revert/lang/hr/lang.php deleted file mode 100644 index 96f1d6afe..000000000 --- a/lib/plugins/revert/lang/hr/lang.php +++ /dev/null @@ -1,8 +0,0 @@ - - * @author Dražen Odobašić - * @author Dejan Igrec dejan.igrec@gmail.com - */ diff --git a/lib/plugins/revert/lang/id-ni/lang.php b/lib/plugins/revert/lang/id-ni/lang.php deleted file mode 100644 index d367340b7..000000000 --- a/lib/plugins/revert/lang/id-ni/lang.php +++ /dev/null @@ -1,7 +0,0 @@ - - * @author Yustinus Waruwu - */ diff --git a/lib/plugins/revert/lang/id/lang.php b/lib/plugins/revert/lang/id/lang.php deleted file mode 100644 index c3d485930..000000000 --- a/lib/plugins/revert/lang/id/lang.php +++ /dev/null @@ -1,7 +0,0 @@ - - * @author Yustinus Waruwu - */ diff --git a/lib/plugins/revert/lang/kk/lang.php b/lib/plugins/revert/lang/kk/lang.php deleted file mode 100644 index dde5b9577..000000000 --- a/lib/plugins/revert/lang/kk/lang.php +++ /dev/null @@ -1,6 +0,0 @@ - - */ diff --git a/lib/plugins/revert/lang/mk/lang.php b/lib/plugins/revert/lang/mk/lang.php deleted file mode 100644 index 6d4530f79..000000000 --- a/lib/plugins/revert/lang/mk/lang.php +++ /dev/null @@ -1,6 +0,0 @@ - - */ diff --git a/lib/plugins/revert/lang/ms/lang.php b/lib/plugins/revert/lang/ms/lang.php deleted file mode 100644 index 77ad2a1c1..000000000 --- a/lib/plugins/revert/lang/ms/lang.php +++ /dev/null @@ -1,6 +0,0 @@ - - * @author yndesai@gmail.com - */ diff --git a/lib/plugins/usermanager/lang/hr/lang.php b/lib/plugins/usermanager/lang/hr/lang.php deleted file mode 100644 index 96f1d6afe..000000000 --- a/lib/plugins/usermanager/lang/hr/lang.php +++ /dev/null @@ -1,8 +0,0 @@ - - * @author Dražen Odobašić - * @author Dejan Igrec dejan.igrec@gmail.com - */ diff --git a/lib/plugins/usermanager/lang/id-ni/lang.php b/lib/plugins/usermanager/lang/id-ni/lang.php deleted file mode 100644 index d367340b7..000000000 --- a/lib/plugins/usermanager/lang/id-ni/lang.php +++ /dev/null @@ -1,7 +0,0 @@ - - * @author Yustinus Waruwu - */ diff --git a/lib/plugins/usermanager/lang/lb/lang.php b/lib/plugins/usermanager/lang/lb/lang.php deleted file mode 100644 index 59acdf7a8..000000000 --- a/lib/plugins/usermanager/lang/lb/lang.php +++ /dev/null @@ -1,6 +0,0 @@ - Date: Fri, 24 Jan 2014 17:50:40 +0100 Subject: add unit test to check language files for validity this should help with applying pull requests that do come not from the translation interface as it makes sure the files will be at least syntactically correct. --- _test/tests/general/general_languagelint.php | 47 ++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 _test/tests/general/general_languagelint.php diff --git a/_test/tests/general/general_languagelint.php b/_test/tests/general/general_languagelint.php new file mode 100644 index 000000000..c11462640 --- /dev/null +++ b/_test/tests/general/general_languagelint.php @@ -0,0 +1,47 @@ +checkFiles(glob(DOKU_INC.'inc/lang/*/*.php')); + } + + function test_plugins() { + $this->checkFiles(glob(DOKU_INC.'lib/plugins/*/lang/*/*.php')); + } + + /** + * Run checks over the given PHP language files + * + * @param $files + */ + private function checkFiles($files){ + foreach($files as $file){ + // try to load the file + include $file; + // check it defines an array + $this->assertTrue(is_array($lang), $file); + unset($lang); + + $this->checkUgly($file); + } + } + + /** + * Checks if the file contains any ugly things like leading whitespace, BOM or trailing + * PHP closing mark + * + * @param $file + * @throws Exception + */ + private function checkUgly($file){ + $content = rtrim(file_get_contents($file)); + if(substr($content,0,5) != '') + throw new Exception("$file ends with '?>' - remove it!"); + } + +} -- cgit v1.2.3 From 58e8fa00c247b8a7a4a1c12aff0223d73325c4d3 Mon Sep 17 00:00:00 2001 From: Martin Michalek Date: Sat, 25 Jan 2014 06:41:06 +0100 Subject: translation update --- inc/lang/sk/lang.php | 1 + lib/plugins/authad/lang/sk/settings.php | 2 +- lib/plugins/authldap/lang/sk/settings.php | 2 +- lib/plugins/authmysql/lang/sk/settings.php | 2 +- lib/plugins/authpgsql/lang/sk/settings.php | 2 +- lib/plugins/plugin/lang/sk/admin_plugin.txt | 4 +++ lib/plugins/plugin/lang/sk/lang.php | 55 +++++++++++++++++++++++++++++ lib/plugins/usermanager/lang/sk/lang.php | 2 +- 8 files changed, 65 insertions(+), 5 deletions(-) create mode 100644 lib/plugins/plugin/lang/sk/admin_plugin.txt create mode 100644 lib/plugins/plugin/lang/sk/lang.php diff --git a/inc/lang/sk/lang.php b/inc/lang/sk/lang.php index a5fc47f5f..aa823b074 100644 --- a/inc/lang/sk/lang.php +++ b/inc/lang/sk/lang.php @@ -290,6 +290,7 @@ $lang['i_policy'] = 'Počiatočná ACL politika'; $lang['i_pol0'] = 'Otvorená Wiki (čítanie, zápis a nahrávanie pre každého)'; $lang['i_pol1'] = 'Verejná Wiki (čítanie pre každého, zápis a nahrávanie pre registrovaných užívateľov)'; $lang['i_pol2'] = 'Uzatvorená Wiki (čítanie, zápis a nahrávanie len pre registrovaných užívateľov)'; +$lang['i_allowreg'] = 'Povolenie samostanej registrácie používateľov'; $lang['i_retry'] = 'Skúsiť znovu'; $lang['i_license'] = 'Vyberte licenciu, pod ktorou chcete uložiť váš obsah:'; $lang['i_license_none'] = 'Nezobrazovať žiadne licenčné informácie'; diff --git a/lib/plugins/authad/lang/sk/settings.php b/lib/plugins/authad/lang/sk/settings.php index b7d822f7e..266b372bb 100644 --- a/lib/plugins/authad/lang/sk/settings.php +++ b/lib/plugins/authad/lang/sk/settings.php @@ -15,6 +15,6 @@ $lang['sso_charset'] = 'Znaková sada, v ktorej bude webserver prená $lang['real_primarygroup'] = 'Použiť skutočnú primárnu skupinu používateľa namiesto "Doménoví používatelia" (pomalšie).'; $lang['use_ssl'] = 'Použiť SSL pripojenie? Ak áno, nepovoľte TLS nižšie.'; $lang['use_tls'] = 'Použiť TLS pripojenie? Ak áno, nepovoľte SSL vyššie.'; -$lang['debug'] = 'Zobraziť doplňujúce ladiace informácie pri chybe?'; +$lang['debug'] = 'Zobraziť dodatočné ladiace informácie pri chybe?'; $lang['expirywarn'] = 'Počet dní pred uplynutím platnosti hesla, počas ktorých používateľ dostáva upozornenie. 0 deaktivuje túto voľbu.'; $lang['additional'] = 'Zoznam dodatočných AD atribútov oddelených čiarkou získaných z údajov používateľa. Používané niektorými pluginmi.'; diff --git a/lib/plugins/authldap/lang/sk/settings.php b/lib/plugins/authldap/lang/sk/settings.php index c44f07e97..26c8d9edd 100644 --- a/lib/plugins/authldap/lang/sk/settings.php +++ b/lib/plugins/authldap/lang/sk/settings.php @@ -20,7 +20,7 @@ $lang['bindpw'] = 'Heslo vyššie uvedeného používateľa'; $lang['userscope'] = 'Obmedzenie oblasti pri vyhľadávaní používateľa'; $lang['groupscope'] = 'Obmedzenie oblasti pri vyhľadávaní skupiny'; $lang['groupkey'] = 'Príslušnost k skupine určená z daného atribútu používateľa (namiesto štandardnej AD skupiny) napr. skupiny podľa oddelenia alebo telefónneho čísla'; -$lang['debug'] = 'Zobraziť doplňujúce ladiace informácie pri chybe'; +$lang['debug'] = 'Zobraziť dodatočné ladiace informácie pri chybe'; $lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; $lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; $lang['deref_o_2'] = 'LDAP_DEREF_FINDING'; diff --git a/lib/plugins/authmysql/lang/sk/settings.php b/lib/plugins/authmysql/lang/sk/settings.php index d7e8cb286..8042c6902 100644 --- a/lib/plugins/authmysql/lang/sk/settings.php +++ b/lib/plugins/authmysql/lang/sk/settings.php @@ -10,7 +10,7 @@ $lang['user'] = 'Meno používateľa MySQL'; $lang['password'] = 'Heslo pre vyššie uvedeného používateľa'; $lang['database'] = 'Použiť databázu'; $lang['charset'] = 'Znaková sada databázy'; -$lang['debug'] = 'Zobraziť doplňujúce ladiace informácie'; +$lang['debug'] = 'Zobraziť dodatočné ladiace informácie'; $lang['forwardClearPass'] = 'Posielať heslo ako nezakódovaný text nižšie uvedenému SQL príkazu namiesto použitia kódovania'; $lang['TablesToLock'] = 'Zoznam tabuliek oddelených čiarkou, ktoré by mali byť uzamknuté pri operáciách zápisu'; $lang['checkPass'] = 'SQL príkaz pre kontrolu hesla'; diff --git a/lib/plugins/authpgsql/lang/sk/settings.php b/lib/plugins/authpgsql/lang/sk/settings.php index 861d1237d..9013a752b 100644 --- a/lib/plugins/authpgsql/lang/sk/settings.php +++ b/lib/plugins/authpgsql/lang/sk/settings.php @@ -10,7 +10,7 @@ $lang['port'] = 'Port PostgreSQL servera'; $lang['user'] = 'Meno používateľa PostgreSQL'; $lang['password'] = 'Heslo pre vyššie uvedeného používateľa'; $lang['database'] = 'Použiť databázu'; -$lang['debug'] = 'Zobraziť doplňujúce ladiace informácie'; +$lang['debug'] = 'Zobraziť dodatočné ladiace informácie'; $lang['forwardClearPass'] = 'Posielať heslo ako nezakódovaný text nižšie uvedenému SQL príkazu namiesto použitia kódovania'; $lang['checkPass'] = 'SQL príkaz pre kontrolu hesla'; $lang['getUserInfo'] = 'SQL príkaz pre získanie informácií o používateľovi'; diff --git a/lib/plugins/plugin/lang/sk/admin_plugin.txt b/lib/plugins/plugin/lang/sk/admin_plugin.txt new file mode 100644 index 000000000..ad3ae7f58 --- /dev/null +++ b/lib/plugins/plugin/lang/sk/admin_plugin.txt @@ -0,0 +1,4 @@ +====== Správa pluginov ====== + +Na tejto stránke je možné spravovať [[doku>plugins|pluginy]] Dokuwiki. Aby bolo možné sťahovať a inštalovať pluginy, musí mať webový server prístup pre zápis do adresára //plugin//. + diff --git a/lib/plugins/plugin/lang/sk/lang.php b/lib/plugins/plugin/lang/sk/lang.php new file mode 100644 index 000000000..35c07cf80 --- /dev/null +++ b/lib/plugins/plugin/lang/sk/lang.php @@ -0,0 +1,55 @@ + + * @author Michal Mesko + * @author exusik@gmail.com + * @author Martin Michalek + */ +$lang['menu'] = 'Správa pluginov'; +$lang['download'] = 'Stiahnuť a nainštalovať plugin'; +$lang['manage'] = 'Nainštalované pluginy'; +$lang['btn_info'] = 'info'; +$lang['btn_update'] = 'aktualizovať'; +$lang['btn_delete'] = 'zmazať'; +$lang['btn_settings'] = 'nastavenia'; +$lang['btn_download'] = 'Stiahnuť'; +$lang['btn_enable'] = 'Uložiť'; +$lang['url'] = 'URL'; +$lang['installed'] = 'Nainštalovaný:'; +$lang['lastupdate'] = 'Aktualizovaný:'; +$lang['source'] = 'Zdroj:'; +$lang['unknown'] = 'neznámy'; +$lang['updating'] = 'Aktualizuje sa ...'; +$lang['updated'] = 'Plugin %s bol úspešne aktualizovaný'; +$lang['updates'] = 'Nasledujúce pluginy bol úspešne aktualizované:'; +$lang['update_none'] = 'Neboli nájdené žiadne aktualizácie.'; +$lang['deleting'] = 'Vymazáva sa ...'; +$lang['deleted'] = 'Plugin %s bol zmazaný.'; +$lang['downloading'] = 'Sťahuje sa ...'; +$lang['downloaded'] = 'Plugin %s bol úspešne stiahnutý'; +$lang['downloads'] = 'Nasledujúce pluginy bol úspešne stiahnuté:'; +$lang['download_none'] = 'Neboli nájdené žiadne pluginy alebo nastal neznámy problém počas sťahovania a inštalácie pluginov.'; +$lang['plugin'] = 'Plugin:'; +$lang['components'] = 'Súčasti'; +$lang['noinfo'] = 'Tento plugin neobsahuje žiadne informácie, je možné, že je chybný.'; +$lang['name'] = 'názov:'; +$lang['date'] = 'Dátum:'; +$lang['type'] = 'Typ:'; +$lang['desc'] = 'Popis:'; +$lang['author'] = 'Autor:'; +$lang['www'] = 'Web:'; +$lang['error'] = 'Nastala neznáma chyba.'; +$lang['error_download'] = 'Nie je možné stiahnuť súbor pluginu: %s'; +$lang['error_badurl'] = 'Pravdepodobne zlá url adresa - nie je možné z nej určiť meno súboru'; +$lang['error_dircreate'] = 'Nie je možné vytvoriť dočasný adresár pre uloženie sťahovaného súboru'; +$lang['error_decompress'] = 'Správca pluginov nedokáže dekomprimovať stiahnutý súbor. Môže to byť dôsledok zlého stiahnutia, v tom prípade to skúste znovu, alebo môže ísť o neznámy formát súboru, v tom prípade musíte stiahnuť a nainštalovať plugin manuálne.'; +$lang['error_copy'] = 'Nastala chyba kopírovania súboru počas pokusu inštalovať súbory pluginu%s: disk môže byť plný alebo prístupové práva k súboru môžu byť nesprávne. Toto môže mať za následok čiastočne nainštalovanie pluginu a nestabilitu vašej DokuWiki.'; +$lang['error_delete'] = 'Nastala chyba počas pokusu o zmazanie pluginu %s. Najpravdepodobnejším dôvodom môžu byť nedostatočné prístupové práva pre súbor alebo adresár'; +$lang['enabled'] = 'Plugin %s aktivovaný.'; +$lang['notenabled'] = 'Plugin %s nemôže byť aktivovaný, skontrolujte prístupové práva.'; +$lang['disabled'] = 'Plugin %s deaktivovaný.'; +$lang['notdisabled'] = 'Plugin %s nemôže byť deaktivovaný, skontrolujte prístupové práva.'; +$lang['packageinstalled'] = 'Plugin package (%d plugin(s): %s) úspešne inštalovaný.'; diff --git a/lib/plugins/usermanager/lang/sk/lang.php b/lib/plugins/usermanager/lang/sk/lang.php index 9aadbb53a..535f77972 100644 --- a/lib/plugins/usermanager/lang/sk/lang.php +++ b/lib/plugins/usermanager/lang/sk/lang.php @@ -51,7 +51,7 @@ $lang['note_notify'] = 'Notifikačné e-maily iba vtedy, ak dostane u $lang['note_group'] = 'Noví užívatelia budú pridaní do východzej skupiny (%s), ak nie je pre nich špecifikovaná iná skupina.'; $lang['note_pass'] = 'Heslo bude vygenerované automaticky, ak bude pole prázdne a je zapnutá notifikácia používateľa.'; $lang['add_ok'] = 'Používateľ úspešne pridaný'; -$lang['add_fail'] = 'Pridávanie užívateľa nebolo úspešné'; +$lang['add_fail'] = 'Pridanie používateľa bolo neúspešné'; $lang['notify_ok'] = 'Notifikačný e-mail bol poslaný'; $lang['notify_fail'] = 'Notifikačný e-mail nemohol byť poslaný'; $lang['import_userlistcsv'] = 'Súbor so zoznamov používateľov (CSV):'; -- cgit v1.2.3 From d02f9f2ee154cb5ee9683b63d6c7bdf6e9c02236 Mon Sep 17 00:00:00 2001 From: Momo50 Date: Sat, 25 Jan 2014 16:16:10 +0100 Subject: translation update --- lib/plugins/authad/lang/fr/settings.php | 2 + lib/plugins/plugin/lang/fr/admin_plugin.txt | 4 ++ lib/plugins/plugin/lang/fr/lang.php | 69 +++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 lib/plugins/plugin/lang/fr/admin_plugin.txt create mode 100644 lib/plugins/plugin/lang/fr/lang.php diff --git a/lib/plugins/authad/lang/fr/settings.php b/lib/plugins/authad/lang/fr/settings.php index d05390efc..84e0d00d9 100644 --- a/lib/plugins/authad/lang/fr/settings.php +++ b/lib/plugins/authad/lang/fr/settings.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Bruno Veilleux + * @author Momo50 */ $lang['account_suffix'] = 'Le suffixe de votre compte. Ex.: @mon.domaine.org'; $lang['base_dn'] = 'Votre nom de domaine de base. DC=mon,DC=domaine,DC=org'; @@ -11,6 +12,7 @@ $lang['domain_controllers'] = 'Une liste de contrôleurs de domaine séparés $lang['admin_username'] = 'Un utilisateur Active Directory avec accès aux données de tous les autres utilisateurs. Facultatif, mais nécessaire pour certaines actions telles que l\'envoi de courriels d\'abonnement.'; $lang['admin_password'] = 'Le mot de passe de l\'utilisateur ci-dessus.'; $lang['sso'] = 'Est-ce que la connexion unique (Single-Sign-On) par Kerberos ou NTLM doit être utilisée?'; +$lang['sso_charset'] = 'Le jeu de caractères de votre serveur web va passer le nom d\'utilisateur Kerberos ou NTLM. Vide pour UTF-8 ou latin-1. Nécessite l\'extension iconv.'; $lang['real_primarygroup'] = 'Est-ce que le véritable groupe principal doit être résolu au lieu de présumer "Domain Users" (plus lent)?'; $lang['use_ssl'] = 'Utiliser une connexion SSL? Si utilisée, n\'activez pas TLS ci-dessous.'; $lang['use_tls'] = 'Utiliser une connexion TLS? Si utilisée, n\'activez pas SSL ci-dessus.'; diff --git a/lib/plugins/plugin/lang/fr/admin_plugin.txt b/lib/plugins/plugin/lang/fr/admin_plugin.txt new file mode 100644 index 000000000..b7beba25a --- /dev/null +++ b/lib/plugins/plugin/lang/fr/admin_plugin.txt @@ -0,0 +1,4 @@ +====== Gestion des extensions ====== + +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 new file mode 100644 index 000000000..0592f3c7d --- /dev/null +++ b/lib/plugins/plugin/lang/fr/lang.php @@ -0,0 +1,69 @@ + + * @author Delassaux Julien + * @author Maurice A. LeBlanc + * @author stephane.gully@gmail.com + * @author Guillaume Turri + * @author Erik Pedersen + * @author olivier duperray + * @author Vincent Feltz + * @author Philippe Bajoit + * @author Florian Gaub + * @author Samuel Dorsaz samuel.dorsaz@novelion.net + * @author Johan Guilbaud + * @author schplurtz@laposte.net + * @author skimpax@gmail.com + * @author Yannick Aure + * @author Olivier DUVAL + * @author Anael Mobilia + * @author Bruno Veilleux + */ +$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'; +$lang['btn_settings'] = 'Paramètres'; +$lang['btn_download'] = 'Télécharger'; +$lang['btn_enable'] = 'Enregistrer'; +$lang['url'] = 'URL'; +$lang['installed'] = 'Installé :'; +$lang['lastupdate'] = 'Dernière mise à jour :'; +$lang['source'] = 'Source :'; +$lang['unknown'] = 'inconnu'; +$lang['updating'] = 'Mise à jour…'; +$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'] = 'Extension %s supprimée.'; +$lang['downloading'] = 'Téléchargement…'; +$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'] = 'Cette extension n\'a transmis aucune information, elle pourrait être invalide.'; +$lang['name'] = 'Nom :'; +$lang['date'] = 'Date :'; +$lang['type'] = 'Type :'; +$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 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 %s : 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 %s. 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.'; -- cgit v1.2.3 From 56305e5a7a8dafd9dc51350d2e39888f852f5638 Mon Sep 17 00:00:00 2001 From: huseyin can Date: Mon, 27 Jan 2014 11:05:49 +0100 Subject: translation update --- inc/lang/tr/lang.php | 13 +++++++ lib/plugins/plugin/lang/tr/admin_plugin.txt | 3 ++ lib/plugins/plugin/lang/tr/lang.php | 55 +++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 lib/plugins/plugin/lang/tr/admin_plugin.txt create mode 100644 lib/plugins/plugin/lang/tr/lang.php diff --git a/inc/lang/tr/lang.php b/inc/lang/tr/lang.php index 6b9e0dd44..210a82530 100644 --- a/inc/lang/tr/lang.php +++ b/inc/lang/tr/lang.php @@ -10,6 +10,7 @@ * @author Caleb Maclennan * @author farukerdemoncel@gmail.com * @author Mustafa Aslan + * @author huseyin can */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -179,6 +180,7 @@ $lang['yours'] = 'Senin Sürümün'; $lang['diff'] = 'Kullanılan sürüm ile farkları göster'; $lang['diff2'] = 'Seçili sürümler arasındaki farkı göster'; $lang['difflink'] = 'Karşılaştırma görünümüne bağlantı'; +$lang['diff_type'] = 'farklı görünüş'; $lang['line'] = 'Satır'; $lang['breadcrumb'] = 'İz'; $lang['youarehere'] = 'Buradasınız'; @@ -191,10 +193,17 @@ $lang['external_edit'] = 'Dışarıdan düzenle'; $lang['summary'] = 'Özeti düzenle'; $lang['noflash'] = 'Bu içeriği göstermek için Adobe Flash Eklentisi gerekmektedir.'; $lang['download'] = 'Parçacığı indir'; +$lang['tools'] = 'Alet'; +$lang['user_tools'] = 'Kullanıcı Aletleri'; +$lang['site_tools'] = 'Site Aletleri'; +$lang['page_tools'] = 'Sayfa Aletleri'; +$lang['skip_to_content'] = 'Bağlanmak için kaydır'; +$lang['sidebar'] = 'kaydırma çubuğu'; $lang['mail_newpage'] = 'sayfa eklenme:'; $lang['mail_changed'] = 'sayfa değiştirilme:'; $lang['mail_new_user'] = 'yeni kullanıcı'; $lang['mail_upload'] = 'dosya yüklendi:'; +$lang['changes_type'] = 'görünüşü değiştir'; $lang['pages_changes'] = 'Sayfalar'; $lang['media_changes'] = 'Çokluortam dosyaları'; $lang['both_changes'] = 'Sayfalar ve çoklu ortam dosyaları'; @@ -238,6 +247,9 @@ $lang['img_keywords'] = 'Anahtar Sözcükler'; $lang['img_width'] = 'Genişlik'; $lang['img_height'] = 'Yükseklik'; $lang['img_manager'] = 'Ortam oynatıcısında göster'; +$lang['subscr_m_new_header'] = 'Üyelik ekle'; +$lang['subscr_m_current_header'] = 'Üyeliğini onayla'; +$lang['subscr_m_unsubscribe'] = 'Üyelik iptali'; $lang['subscr_m_subscribe'] = 'Kayıt ol'; $lang['subscr_m_receive'] = 'Al'; $lang['authtempfail'] = 'Kullanıcı doğrulama geçici olarak yapılamıyor. Eğer bu durum devam ederse lütfen Wiki yöneticine haber veriniz.'; @@ -290,4 +302,5 @@ $lang['media_view'] = '%s'; $lang['media_edit'] = 'Düzenle %s'; $lang['media_history'] = 'Geçmiş %s'; $lang['media_perm_upload'] = 'Üzgünüm, karşıya dosya yükleme yetkiniz yok.'; +$lang['media_update'] = 'Yeni versiyonu yükleyin'; $lang['media_restore'] = 'Bu sürümü eski haline getir'; diff --git a/lib/plugins/plugin/lang/tr/admin_plugin.txt b/lib/plugins/plugin/lang/tr/admin_plugin.txt new file mode 100644 index 000000000..956d701f6 --- /dev/null +++ b/lib/plugins/plugin/lang/tr/admin_plugin.txt @@ -0,0 +1,3 @@ +====== Eklenti Yönetimi ====== + +Bu sayfada DokuWiki [[doku>plugins|eklentileri]] ile ilgili herşeyi düzenleyebilirsiniz. Eklenti kurup indirmek için, eklenti dizininin yazılabilir olması gerekmektedir. diff --git a/lib/plugins/plugin/lang/tr/lang.php b/lib/plugins/plugin/lang/tr/lang.php new file mode 100644 index 000000000..a4feea8cd --- /dev/null +++ b/lib/plugins/plugin/lang/tr/lang.php @@ -0,0 +1,55 @@ + + * @author Cihan Kahveci + * @author Yavuz Selim + * @author Caleb Maclennan + * @author farukerdemoncel@gmail.com + */ +$lang['menu'] = 'Eklenti Yönetimi'; +$lang['download'] = 'Yeni bir eklenti indirip kur'; +$lang['manage'] = 'Kurulmuş Eklentiler'; +$lang['btn_info'] = 'bilgi'; +$lang['btn_update'] = 'güncelle'; +$lang['btn_delete'] = 'sil'; +$lang['btn_settings'] = 'Ayarlar'; +$lang['btn_download'] = 'İndir'; +$lang['btn_enable'] = 'Kaydet'; +$lang['url'] = 'Web Adresi'; +$lang['installed'] = 'Kuruldu:'; +$lang['lastupdate'] = 'Son güncelleştirme:'; +$lang['source'] = 'Kaynak:'; +$lang['unknown'] = 'bilinmiyor'; +$lang['updating'] = 'Güncelleştiriyor ...'; +$lang['updated'] = '%s eklentisi başarıyla güncellendi'; +$lang['updates'] = 'Şu eklentiler başarıyla güncellendi'; +$lang['update_none'] = 'Yeni bir güncelleme bulunamadı.'; +$lang['deleting'] = 'Siliniyor ...'; +$lang['deleted'] = '%s eklentisi silindi.'; +$lang['downloading'] = 'İndiriyor ...'; +$lang['downloaded'] = '%s eklentisi başarıyla kuruldu'; +$lang['downloads'] = 'Şu eklentiler başarıyla kuruldu:'; +$lang['download_none'] = 'Eklenti bulunamadı veya indirirken/kurarken bilinmeyen bir hata oluştu.'; +$lang['plugin'] = 'Eklenti:'; +$lang['components'] = 'Parçalar'; +$lang['noinfo'] = 'Bu eklentinin bilgileri alınamadı, geçerli bir eklenti olmayabilir.'; +$lang['name'] = 'Ad:'; +$lang['date'] = 'Tarih:'; +$lang['type'] = 'Tür:'; +$lang['desc'] = 'Açıklama:'; +$lang['author'] = 'Yazar:'; +$lang['www'] = 'Web Adresi:'; +$lang['error'] = 'Bilinmeyen bir hata oluştu.'; +$lang['error_download'] = 'Şu eklenti indirilemedi: %s'; +$lang['error_badurl'] = 'Yanlış adres olabilir - verilen adresten dosya adı alınamadı'; +$lang['error_dircreate'] = 'İndirmek için geçici klasör oluşturulamadı'; +$lang['error_decompress'] = 'Eklenti yöneticisi indirilen sıkıştırılmış dosyayı açamadı. Bu yanlış indirmeden kaynaklanabilir (bu durumda tekrar denemelisiniz). Ya da indirilen dosyanın sıkıştırma biçimi bilinmemektedir (bu durumda eklentiyi indirerek kendiniz kurmalısınız).'; +$lang['error_copy'] = '%s eklentisi dosyalarını kurmaya çalışırken kopyalama hatası ortaya çıktı. Sürücü dolu olabilir veya yazma yetkisi bulunmuyor olabilir. Bunun sebebi tam kurulmamış bir eklentinin wiki kurulumunu bozması olabilir.'; +$lang['error_delete'] = '%s eklentisini silerken bir hata oluştu. Bu hata yetersiz dosya/klasör erişim yetkisinden kaynaklanabilir.'; +$lang['enabled'] = '%s eklentisi etkinleştirildi.'; +$lang['notenabled'] = '%s eklentisi etkinleştirilemedi, dosya yetkilerini kontrol edin.'; +$lang['disabled'] = '%s eklentisi devre dışı bırakıldı.'; +$lang['notdisabled'] = '%s eklentisi devre dışı bırakılamadı, dosya yetkilerini kontrol edin.'; -- cgit v1.2.3 From b15cd32d2f75fbf943eda38a7b90f05d2806dae5 Mon Sep 17 00:00:00 2001 From: jgpcx Date: Tue, 28 Jan 2014 17:02:25 +0100 Subject: Update action.php fix bug that only allows admins any AJAX calls --- lib/plugins/extension/action.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/plugins/extension/action.php b/lib/plugins/extension/action.php index 9dd1648ff..3f2ccaace 100644 --- a/lib/plugins/extension/action.php +++ b/lib/plugins/extension/action.php @@ -32,16 +32,17 @@ class action_plugin_extension extends DokuWiki_Action_Plugin { global $USERINFO; global $INPUT; + + if($event->data != 'plugin_extension') return; + $event->preventDefault(); + $event->stopPropagation(); + if(empty($_SERVER['REMOTE_USER']) || !auth_isadmin($_SERVER['REMOTE_USER'], $USERINFO['grps'])){ http_status(403); echo 'Forbidden'; exit; } - if($event->data != 'plugin_extension') return; - $event->preventDefault(); - $event->stopPropagation(); - header('Content-Type: text/html; charset=utf-8'); $ext = $INPUT->str('ext'); -- cgit v1.2.3 From d149d9d62faeb1cb6a3a50d6cc384a424856a9a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Kl=C3=ADma?= Date: Wed, 29 Jan 2014 08:25:58 +0100 Subject: translation update --- inc/lang/cs/lang.php | 6 +++ lib/plugins/plugin/lang/cs/admin_plugin.txt | 3 ++ lib/plugins/plugin/lang/cs/lang.php | 66 +++++++++++++++++++++++++++++ lib/plugins/revert/lang/cs/lang.php | 1 + 4 files changed, 76 insertions(+) create mode 100644 lib/plugins/plugin/lang/cs/admin_plugin.txt create mode 100644 lib/plugins/plugin/lang/cs/lang.php diff --git a/inc/lang/cs/lang.php b/inc/lang/cs/lang.php index 56ffd91de..a0f69b3dc 100644 --- a/inc/lang/cs/lang.php +++ b/inc/lang/cs/lang.php @@ -16,6 +16,7 @@ * @author mkucera66@seznam.cz * @author Zbyněk Křivka * @author Gerrit Uitslag + * @author Petr Klíma */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -299,6 +300,7 @@ $lang['i_policy'] = 'Úvodní politika ACL'; $lang['i_pol0'] = 'Otevřená wiki (čtení, zápis a upload pro všechny)'; $lang['i_pol1'] = 'Veřejná wiki (čtení pro všechny, zápis a upload pro registrované uživatele)'; $lang['i_pol2'] = 'Uzavřená wiki (čtení, zápis a upload pouze pro registrované uživatele)'; +$lang['i_allowreg'] = 'Povol uživatelům registraci'; $lang['i_retry'] = 'Zkusit znovu'; $lang['i_license'] = 'Vyberte prosím licenci obsahu:'; $lang['i_license_none'] = 'Nezobrazovat žádné licenční informace'; @@ -336,3 +338,7 @@ $lang['media_perm_read'] = 'Bohužel, nemáte práva číst soubory.'; $lang['media_perm_upload'] = 'Bohužel, nemáte práva nahrávat soubory.'; $lang['media_update'] = 'Nahrát novou verzi'; $lang['media_restore'] = 'Obnovit tuto verzi'; +$lang['currentns'] = 'Aktuální jmenný prostor'; +$lang['searchresult'] = 'Výsledek hledání'; +$lang['plainhtml'] = 'Čisté HTML'; +$lang['wikimarkup'] = 'Wiki jazyk'; diff --git a/lib/plugins/plugin/lang/cs/admin_plugin.txt b/lib/plugins/plugin/lang/cs/admin_plugin.txt new file mode 100644 index 000000000..6ebf1e78f --- /dev/null +++ b/lib/plugins/plugin/lang/cs/admin_plugin.txt @@ -0,0 +1,3 @@ +====== Správa pluginů ====== + +Na této stránce lze spravovat pluginy DokuWiki [[doku>plugins|plugins]]. Aby bylo možné stahovat a instalovat pluginy, musí mít webový server přístup pro zápis do adresáře //plugin//. diff --git a/lib/plugins/plugin/lang/cs/lang.php b/lib/plugins/plugin/lang/cs/lang.php new file mode 100644 index 000000000..8917f8ef6 --- /dev/null +++ b/lib/plugins/plugin/lang/cs/lang.php @@ -0,0 +1,66 @@ + + * @author Zbynek Krivka + * @author Bohumir Zamecnik + * @author tomas@valenta.cz + * @author Marek Sacha + * @author Lefty + * @author Vojta Beran + * @author zbynek.krivka@seznam.cz + * @author Bohumir Zamecnik + * @author Jakub A. Těšínský (j@kub.cz) + * @author mkucera66@seznam.cz + * @author Zbyněk Křivka + * @author Gerrit Uitslag + * @author Petr Klíma + */ +$lang['menu'] = 'Správa pluginů'; +$lang['download'] = 'Stáhnout a instalovat plugin'; +$lang['manage'] = 'Seznam instalovaných pluginů'; +$lang['btn_info'] = 'info'; +$lang['btn_update'] = 'aktualizovat'; +$lang['btn_delete'] = 'smazat'; +$lang['btn_settings'] = 'nastavení'; +$lang['btn_download'] = 'Stáhnout'; +$lang['btn_enable'] = 'Uložit'; +$lang['url'] = 'URL'; +$lang['installed'] = 'Instalován:'; +$lang['lastupdate'] = 'Poslední aktualizace:'; +$lang['source'] = 'Zdroj:'; +$lang['unknown'] = 'neznámý'; +$lang['updating'] = 'Aktualizuji ...'; +$lang['updated'] = 'Modul %s úspěšně aktualizován'; +$lang['updates'] = 'Následující pluginy byly úspěšně aktualizovány'; +$lang['update_none'] = 'Žádné aktualizace nenalezeny.'; +$lang['deleting'] = 'Probíhá mazání ...'; +$lang['deleted'] = 'Plugin %s smazán.'; +$lang['downloading'] = 'Stahuji ...'; +$lang['downloaded'] = 'Plugin %s nainstalován'; +$lang['downloads'] = 'Následující pluginy byly úspěšně instalovány:'; +$lang['download_none'] = 'Žádné pluginy nebyly nenalezeny, nebo se vyskytla nějaká chyba při +stahování a instalaci.'; +$lang['plugin'] = 'Plugin:'; +$lang['components'] = 'Součásti'; +$lang['noinfo'] = 'Plugin nevrátil žádné informace. Může být poškozen nebo špatný.'; +$lang['name'] = 'Jméno:'; +$lang['date'] = 'Datum:'; +$lang['type'] = 'Typ:'; +$lang['desc'] = 'Popis:'; +$lang['author'] = 'Autor:'; +$lang['www'] = 'Web:'; +$lang['error'] = 'Nastala neznámá chyba.'; +$lang['error_download'] = 'Nelze stáhnout soubor s pluginem: %s'; +$lang['error_badurl'] = 'URL je zřejmě chybná - nelze z ní určit název souboru'; +$lang['error_dircreate'] = 'Nelze vytvořit dočasný adresář ke stažení dat'; +$lang['error_decompress'] = 'Správce pluginů nemůže rozbalit stažený soubor. Toto může být způsobeno chybou při stahování. Můžete se pokusit stahování opakovat. Chyba může být také v kompresním formátu souboru. V tom případě bude nutné stáhnout a nainstalovat plugin ručně.'; +$lang['error_copy'] = 'Došlo k chybě při instalaci pluginu %s. Je možné, že na disku není volné místo, nebo mohou být špatně nastavena přístupová práva. Pozor, mohlo dojít k částečné a tudíž chybné instalaci pluginu a tím může být ohrožena stabilita wiki.'; +$lang['error_delete'] = 'Došlo k chybě při pokusu o smazání pluginu %s. Nejspíše je chyba v nastavení přístupových práv k některým souborům či adresářům.'; +$lang['enabled'] = 'Plugin %s aktivován.'; +$lang['notenabled'] = 'Plugin %s nelze aktivovat, zkontrolujte práva k souborům.'; +$lang['disabled'] = 'Plugin %s deaktivován.'; +$lang['notdisabled'] = 'Plugin %s nelze deaktivovat, zkontrolujte práva k souborům.'; +$lang['packageinstalled'] = 'Balíček pluginů (%d plugin(ů): %s) úspěšně nainstalován.'; diff --git a/lib/plugins/revert/lang/cs/lang.php b/lib/plugins/revert/lang/cs/lang.php index b9e7284d4..69abaaade 100644 --- a/lib/plugins/revert/lang/cs/lang.php +++ b/lib/plugins/revert/lang/cs/lang.php @@ -15,6 +15,7 @@ * @author mkucera66@seznam.cz * @author Zbyněk Křivka * @author Gerrit Uitslag + * @author Petr Klíma */ $lang['menu'] = 'Obnova zaspamovaných stránek'; $lang['filter'] = 'Hledat zaspamované stránky'; -- cgit v1.2.3 From 73d93f2bf6cd03cd82558c91faf42dddbdef1d32 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 30 Jan 2014 23:58:43 +0100 Subject: extension manager: some minor tweaks in the info screen --- lib/plugins/extension/helper/list.php | 21 ++++++++++++--------- lib/plugins/extension/lang/en/lang.php | 1 + 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 8cc303fbe..01a5c516a 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -406,7 +406,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $return .= ($extension->getTypes() ? hsc(implode(', ', $extension->getTypes())) : $default); $return .= ''; - if($extension->getCompatibleVersions()) { + if(!$extension->isBundled() && $extension->getCompatibleVersions()) { $return .= '
    '.$this->getLang('compatible').'
    '; $return .= '
    '; foreach ($extension->getCompatibleVersions() as $date => $version) { @@ -539,20 +539,23 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @return string The description of all relevant statusses */ function make_status(helper_plugin_extension_extension $extension) { - $return = ''; + $status = array(); + + if ($extension->isInstalled()) { - $return .= $this->getLang('status_installed').' '; + $status[] = $this->getLang('status_installed'); if ($extension->isProtected()) { - $return .= $this->getLang('status_protected').' '; + $status[] = $this->getLang('status_protected'); } else { - $return .= $extension->isEnabled() ? $this->getLang('status_enabled').' ' : $this->getLang('status_disabled').' '; + $status[] = $extension->isEnabled() ? $this->getLang('status_enabled') : $this->getLang('status_disabled'); } } else { - $return .= $this->getLang('status_not_installed').' '; + $status[] = $this->getLang('status_not_installed'); } - $return .= !$extension->canModify() ? $this->getLang('status_unmodifiable').' ' : ''; - $return .= $extension->isTemplate() ? $this->getLang('status_template') : $this->getLang('status_plugin'); - return $return; + if(!$extension->canModify()) $status[] = $this->getLang('status_unmodifiable'); + if($extension->isBundled()) $status[] = $this->getLang('status_bundled'); + $status[] = $extension->isTemplate() ? $this->getLang('status_template') : $this->getLang('status_plugin'); + return join(', ', $status); } } diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index c0550c951..5224f694a 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -65,6 +65,7 @@ $lang['status_disabled'] = 'disabled'; $lang['status_unmodifiable'] = 'unmodifiable'; $lang['status_plugin'] = 'plugin'; $lang['status_template'] = 'template'; +$lang['status_bundled'] = 'bundled'; $lang['msg_enabled'] = 'Plugin %s enabled'; $lang['msg_disabled'] = 'Plugin %s disabled'; -- cgit v1.2.3 From e4928db0b5d9004465515f79d942bdc68b15ef95 Mon Sep 17 00:00:00 2001 From: umriya afini Date: Fri, 31 Jan 2014 04:35:42 +0100 Subject: translation update --- inc/lang/id/adminplugins.txt | 1 + inc/lang/id/lang.php | 28 ++++++++++++++++++++++++++++ lib/plugins/plugin/lang/id/lang.php | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 inc/lang/id/adminplugins.txt create mode 100644 lib/plugins/plugin/lang/id/lang.php diff --git a/inc/lang/id/adminplugins.txt b/inc/lang/id/adminplugins.txt new file mode 100644 index 000000000..2a91b3d1a --- /dev/null +++ b/inc/lang/id/adminplugins.txt @@ -0,0 +1 @@ +=====Plugin Tambahan===== \ No newline at end of file diff --git a/inc/lang/id/lang.php b/inc/lang/id/lang.php index 3d99c9a22..5cb5cb6ea 100644 --- a/inc/lang/id/lang.php +++ b/inc/lang/id/lang.php @@ -7,6 +7,7 @@ * @author Irwan Butar Butar * @author Yustinus Waruwu * @author zamroni + * @author umriya afini */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -42,9 +43,14 @@ $lang['btn_backtomedia'] = 'Kembali ke Pilihan Mediafile'; $lang['btn_subscribe'] = 'Ikuti Perubahan'; $lang['btn_profile'] = 'Ubah Profil'; $lang['btn_reset'] = 'Reset'; +$lang['btn_resendpwd'] = 'Atur password baru'; $lang['btn_draft'] = 'Edit draft'; +$lang['btn_recover'] = 'Cadangkan draf'; $lang['btn_draftdel'] = 'Hapus draft'; +$lang['btn_revert'] = 'Kembalikan'; $lang['btn_register'] = 'Daftar'; +$lang['btn_apply'] = 'Terapkan'; +$lang['btn_deleteuser'] = 'Hapus Akun Saya'; $lang['loggedinas'] = 'Login sebagai '; $lang['user'] = 'Username'; $lang['pass'] = 'Password'; @@ -56,6 +62,7 @@ $lang['fullname'] = 'Nama lengkap'; $lang['email'] = 'E-Mail'; $lang['profile'] = 'Profil User'; $lang['badlogin'] = 'Maaf, username atau password salah.'; +$lang['badpassconfirm'] = 'Maaf, password salah'; $lang['minoredit'] = 'Perubahan Minor'; $lang['draftdate'] = 'Simpan draft secara otomatis'; $lang['regmissing'] = 'Maaf, Anda harus mengisi semua field.'; @@ -71,13 +78,20 @@ $lang['profna'] = 'Wiki ini tidak mengijinkan perubahan profil.'; $lang['profnochange'] = 'Tidak ada perubahan.'; $lang['profnoempty'] = 'Mohon mengisikan nama atau alamat email.'; $lang['profchanged'] = 'Profil User berhasil diubah.'; +$lang['profdeleteuser'] = 'Hapus Akun'; +$lang['profdeleted'] = 'Akun anda telah dihapus dari wiki ini'; +$lang['profconfdelete'] = 'Saya berharap menghapus akun saya dari wiki ini. +Aksi ini tidak bisa diselesaikan.'; +$lang['profconfdeletemissing'] = 'Knfirmasi check box tidak tercentang'; $lang['pwdforget'] = 'Lupa Password? Dapatkan yang baru'; $lang['resendna'] = 'Wiki ini tidak mendukung pengiriman ulang password.'; +$lang['resendpwd'] = 'Atur password baru'; $lang['resendpwdmissing'] = 'Maaf, Anda harus mengisikan semua field.'; $lang['resendpwdnouser'] = 'Maaf, user ini tidak ditemukan.'; $lang['resendpwdbadauth'] = 'Maaf, kode autentikasi tidak valid. Pastikan Anda menggunakan keseluruhan link konfirmasi.'; $lang['resendpwdconfirm'] = 'Link konfirmasi telah dikirim melalui email.'; $lang['resendpwdsuccess'] = 'Password baru Anda telah dikirim melalui email.'; +$lang['searchmedia'] = 'Cari nama file:'; $lang['txt_upload'] = 'File yang akan diupload'; $lang['txt_filename'] = 'Masukkan nama wiki (opsional)'; $lang['txt_overwrt'] = 'File yang telah ada akan ditindih'; @@ -85,11 +99,22 @@ $lang['lockedby'] = 'Sedang dikunci oleh'; $lang['lockexpire'] = 'Penguncian artikel sampai dengan'; $lang['js']['willexpire'] = 'Halaman yang sedang Anda kunci akan berakhir dalam waktu kurang lebih satu menit.\nUntuk menghindari konflik, gunakan tombol Preview untuk me-reset timer pengunci.'; $lang['js']['notsavedyet'] = 'Perubahan yang belum disimpan akan hilang.\nYakin akan dilanjutkan?'; +$lang['js']['searchmedia'] = 'Cari file'; $lang['js']['keepopen'] = 'Biarkan window terbuka dalam pemilihan'; $lang['js']['hidedetails'] = 'Sembunyikan detil'; +$lang['js']['mediatitle'] = 'Pengaturan Link'; +$lang['js']['mediasize'] = 'Ukuran gambar'; +$lang['js']['mediaclose'] = 'Tutup'; +$lang['js']['mediadisplayimg'] = 'Lihat gambar'; +$lang['js']['mediadisplaylnk'] = 'Lihat hanya link'; $lang['js']['nosmblinks'] = 'Link ke share Windows hanya bekerja di Microsoft Internet Explorer. Anda masih dapat mengcopy and paste linknya.'; $lang['js']['del_confirm'] = 'Hapus tulisan ini?'; +$lang['js']['media_select'] = 'Pilih file...'; +$lang['js']['media_upload_btn'] = 'Unggah'; +$lang['js']['media_done_btn'] = 'Selesai'; +$lang['js']['media_drop'] = 'Tarik file disini untuk mengunggah'; +$lang['js']['media_cancel'] = 'Buang'; $lang['rssfailed'] = 'Error terjadi saat mengambil feed: '; $lang['nothingfound'] = 'Tidak menemukan samasekali.'; $lang['mediaselect'] = 'Pilihan Mediafile'; @@ -101,11 +126,13 @@ $lang['uploadexist'] = 'File telah ada. Tidak mengerjakan apa-apa.'; $lang['uploadbadcontent'] = 'Isi file yang diupload tidak cocok dengan ekstensi file %s.'; $lang['uploadspam'] = 'File yang diupload diblok oleh spam blacklist.'; $lang['uploadxss'] = 'File yang diupload diblok karena kemungkinan isi yang berbahaya.'; +$lang['uploadsize'] = 'File yang diupload terlalu besar. (max.%)'; $lang['deletesucc'] = 'File "%s" telah dihapus.'; $lang['deletefail'] = '"%s" tidak dapat dihapus - cek hak aksesnya.'; $lang['mediainuse'] = 'File "%s" belum dihapus - file ini sedang digunakan.'; $lang['namespaces'] = 'Namespaces'; $lang['mediafiles'] = 'File tersedia didalam'; +$lang['accessdenied'] = 'Anda tidak diperbolehkan melihat halaman ini'; $lang['mediausage'] = 'Gunakan sintaks berikut untuk me-refer ke file ini'; $lang['mediaview'] = 'Tampilkan file asli'; $lang['mediaroot'] = 'root'; @@ -135,6 +162,7 @@ $lang['mail_newpage'] = 'Halaman ditambahkan:'; $lang['mail_changed'] = 'Halaman diubah:'; $lang['mail_new_user'] = 'User baru:'; $lang['mail_upload'] = 'Berkas di-upload:'; +$lang['pages_changes'] = 'Halaman'; $lang['qb_bold'] = 'Tebal'; $lang['qb_italic'] = 'Miring'; $lang['qb_underl'] = 'Garis Bawah'; diff --git a/lib/plugins/plugin/lang/id/lang.php b/lib/plugins/plugin/lang/id/lang.php new file mode 100644 index 000000000..2653b075e --- /dev/null +++ b/lib/plugins/plugin/lang/id/lang.php @@ -0,0 +1,32 @@ + + * @author Yustinus Waruwu + */ +$lang['btn_info'] = 'Info'; +$lang['btn_update'] = 'Baharui'; +$lang['btn_delete'] = 'Hapus'; +$lang['btn_settings'] = 'Pengaturan'; +$lang['btn_download'] = 'Unduh'; +$lang['btn_enable'] = 'Simpan'; +$lang['url'] = 'URL'; +$lang['installed'] = 'Instal'; +$lang['lastupdate'] = 'Pembaharuan terakhir:'; +$lang['source'] = 'Sumber:'; +$lang['unknown'] = 'Tidak kenal'; +$lang['updating'] = 'Terbaharui ...'; +$lang['update_none'] = 'Tidak ditemukan pembaharuan'; +$lang['deleting'] = 'Terhapus ...'; +$lang['deleted'] = 'Hapus Plugin %s.'; +$lang['downloading'] = 'Unduh ...'; +$lang['plugin'] = 'Plugin:'; +$lang['components'] = 'Komponen'; +$lang['name'] = 'Nama:'; +$lang['date'] = 'Tanggal:'; +$lang['type'] = 'Tipe:'; +$lang['desc'] = 'Penjelasan:'; +$lang['author'] = 'Autor:'; +$lang['www'] = 'Web:'; -- cgit v1.2.3