diff options
-rw-r--r-- | inc/lang/nl/lang.php | 6 | ||||
-rw-r--r-- | lib/plugins/extension/helper/extension.php | 46 | ||||
-rw-r--r-- | lib/plugins/extension/lang/nl/lang.php | 3 |
3 files changed, 44 insertions, 11 deletions
diff --git a/inc/lang/nl/lang.php b/inc/lang/nl/lang.php index b6cf11968..04e3797be 100644 --- a/inc/lang/nl/lang.php +++ b/inc/lang/nl/lang.php @@ -26,11 +26,11 @@ */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; -$lang['doublequoteopening'] = '„'; +$lang['doublequoteopening'] = '“'; $lang['doublequoteclosing'] = '”'; -$lang['singlequoteopening'] = '‚'; +$lang['singlequoteopening'] = '‘'; $lang['singlequoteclosing'] = '’'; -$lang['apostrophe'] = '\''; +$lang['apostrophe'] = '’'; $lang['btn_edit'] = 'Pagina aanpassen'; $lang['btn_source'] = 'Toon broncode'; $lang['btn_show'] = 'Toon pagina'; diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 43e4452c0..2aca0e218 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -292,7 +292,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { */ public function getUpdateDate() { if (!empty($this->managerData['updated'])) return $this->managerData['updated']; - return false; + return $this->getInstallDate(); } /** @@ -577,6 +577,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { try { $installed = $this->installArchive("$tmp/upload.archive", true, $basename); + $this->updateManagerData('', $installed); // purge cache $this->purgeCache(); }catch (Exception $e){ @@ -596,12 +597,10 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { try { $path = $this->download($url); $installed = $this->installArchive($path, true); + $this->updateManagerData($url, $installed); - // purge caches - foreach($installed as $ext => $info){ - $this->setExtension($ext); - $this->purgeCache(); - } + // purge cache + $this->purgeCache(); }catch (Exception $e){ throw $e; } @@ -615,8 +614,10 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return array The list of installed extensions */ public function installOrUpdate() { - $path = $this->download($this->getDownloadURL()); + $url = $this->getDownloadURL(); + $path = $this->download($url); $installed = $this->installArchive($path, $this->isInstalled(), $this->getBase()); + $this->updateManagerData($url, $installed); // refresh extension information if (!isset($installed[$this->getID()])) { @@ -731,6 +732,37 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { } /** + * Save the given URL and current datetime in the manager.dat file of all installed extensions + * + * @param string $url Where the extension was downloaded from. (empty for manual installs via upload) + * @param array $installed Optional list of installed plugins + */ + protected function updateManagerData($url = '', $installed = null) { + $origID = $this->getID(); + + if(is_null($installed)) { + $installed = array($origID); + } + + foreach($installed as $ext => $info) { + if($this->getID() != $ext) $this->setExtension($ext); + if($url) { + $this->managerData['downloadurl'] = $url; + } elseif(isset($this->managerData['downloadurl'])) { + unset($this->managerData['downloadurl']); + } + if(isset($this->managerData['installed'])) { + $this->managerData['updated'] = date('r'); + } else { + $this->managerData['installed'] = date('r'); + } + $this->writeManagerData(); + } + + if($this->getID() != $origID) $this->setExtension($origID); + } + + /** * Read the manager.dat file */ protected function readManagerData() { diff --git a/lib/plugins/extension/lang/nl/lang.php b/lib/plugins/extension/lang/nl/lang.php index f1dc125da..524c2b2e7 100644 --- a/lib/plugins/extension/lang/nl/lang.php +++ b/lib/plugins/extension/lang/nl/lang.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Rene <wllywlnt@yahoo.com> + * @author Gerrit Uitslag <klapinklapin@gmail.com> */ $lang['menu'] = 'Uitbreidings Beheerder'; $lang['tab_plugins'] = 'Geïnstalleerde Plugins'; @@ -30,7 +31,7 @@ $lang['search'] = 'Zoek'; $lang['extensionby'] = '<strong>%s</strong> by %s'; $lang['screenshot'] = 'Schermafdruk bij %s'; $lang['popularity'] = 'Populariteit:%s%%'; -$lang['homepage_link'] = 'Dokumenten'; +$lang['homepage_link'] = 'Documentatie'; $lang['bugs_features'] = 'Bugs'; $lang['tags'] = 'Tags:'; $lang['author_hint'] = 'Zoek uitbreidingen van deze auteur:'; |