summaryrefslogtreecommitdiff
path: root/lib/plugins/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'lib/plugins/plugin')
-rw-r--r--lib/plugins/plugin/admin.php22
-rw-r--r--lib/plugins/plugin/classes/ap_download.class.php4
-rw-r--r--lib/plugins/plugin/classes/ap_manage.class.php6
-rw-r--r--lib/plugins/plugin/classes/ap_update.class.php2
4 files changed, 6 insertions, 28 deletions
diff --git a/lib/plugins/plugin/admin.php b/lib/plugins/plugin/admin.php
index b2108f185..8b1ee3c7d 100644
--- a/lib/plugins/plugin/admin.php
+++ b/lib/plugins/plugin/admin.php
@@ -33,6 +33,10 @@ 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
@@ -43,28 +47,10 @@ class admin_plugin_plugin extends DokuWiki_Admin_Plugin {
var $error = '';
function admin_plugin_plugin() {
- global $conf;
$this->disabled = plugin_isdisabled('plugin');
}
/**
- * return some info
- */
- function getInfo(){
- $disabled = ($this->disabled) ? '(disabled)' : '';
-
- return array(
- 'author' => 'Christopher Smith',
- 'email' => 'chris@jalakai.co.uk',
- 'date' => '2009-11-11',
- 'name' => 'Plugin Manager',
- 'desc' => "Manage Plugins, including automated plugin installer $disabled",
- 'url' => 'http://www.dokuwiki.org/plugin:plugin',
- );
- }
-
-
- /**
* return sort order for position in admin menu
*/
function getMenuSort() {
diff --git a/lib/plugins/plugin/classes/ap_download.class.php b/lib/plugins/plugin/classes/ap_download.class.php
index 0eb567c80..3cc455867 100644
--- a/lib/plugins/plugin/classes/ap_download.class.php
+++ b/lib/plugins/plugin/classes/ap_download.class.php
@@ -7,7 +7,6 @@ class ap_download extends ap_manage {
* Initiate the plugin download
*/
function process() {
- global $lang;
global $INPUT;
$plugin_url = $INPUT->str('url');
@@ -45,7 +44,6 @@ class ap_download extends ap_manage {
* Process the downloaded file
*/
function download($url, $overwrite=false) {
- global $lang;
// check the url
$matches = array();
if (!preg_match("/[^\/]*$/", $url, $matches) || !$matches[0]) {
@@ -241,7 +239,7 @@ class ap_download extends ap_manage {
* if neither bz, gz or zip are recognized, tar is assumed.
*
* @author Andreas Gohr <andi@splitbrain.org>
- * @returns false if the file can't be read, otherwise an "extension"
+ * @returns boolean|string false if the file can't be read, otherwise an "extension"
*/
function guess_archive($file){
$fh = fopen($file,'rb');
diff --git a/lib/plugins/plugin/classes/ap_manage.class.php b/lib/plugins/plugin/classes/ap_manage.class.php
index 28579cbe9..3ec740dae 100644
--- a/lib/plugins/plugin/classes/ap_manage.class.php
+++ b/lib/plugins/plugin/classes/ap_manage.class.php
@@ -69,7 +69,6 @@ class ap_manage {
}
function html_pluginlist() {
- global $ID;
global $plugin_protected;
foreach ($this->manager->plugin_list as $plugin) {
@@ -195,11 +194,8 @@ class ap_manage {
closedir($dh);
return @rmdir($path);
- } else {
- return @unlink($path);
}
-
- return false;
+ return @unlink($path);
}
diff --git a/lib/plugins/plugin/classes/ap_update.class.php b/lib/plugins/plugin/classes/ap_update.class.php
index c43429a1b..5d7f6cb08 100644
--- a/lib/plugins/plugin/classes/ap_update.class.php
+++ b/lib/plugins/plugin/classes/ap_update.class.php
@@ -5,8 +5,6 @@ class ap_update extends ap_download {
var $overwrite = true;
function process() {
- global $lang;
-
$plugin_url = $this->plugin_readlog($this->plugin, 'url');
$this->download($plugin_url, $this->overwrite);
return '';