summaryrefslogtreecommitdiff
path: root/lib/plugins/extension
diff options
context:
space:
mode:
Diffstat (limited to 'lib/plugins/extension')
-rw-r--r--lib/plugins/extension/admin.php3
-rw-r--r--lib/plugins/extension/helper/extension.php2
-rw-r--r--lib/plugins/extension/helper/gui.php11
-rw-r--r--lib/plugins/extension/lang/en/intro_install.txt1
-rw-r--r--lib/plugins/extension/lang/en/lang.php1
5 files changed, 15 insertions, 3 deletions
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 = '';
@@ -99,13 +99,20 @@ 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
*
* @fixme style active one
*/
public function tabNavigation() {
echo '<ul class="tabs">';
- 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';