From 0ef95f3d2c295b225c3d3e09786d7e28abcdfe95 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 25 Jul 2009 17:21:05 +0200 Subject: restructured plugin manager Ignore-this: 4007248aa01f09990612c844c8a83900 This patch moves the different classes of the plugin manager into their own files and moves formerly global utility functions into the appropriate class scopes. darcs-hash:20090725152105-7ad00-89801e811b7eb0d0db25a825d6065aed8ef95c33.gz --- lib/plugins/plugin/classes/ap_update.class.php | 38 ++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 lib/plugins/plugin/classes/ap_update.class.php (limited to 'lib/plugins/plugin/classes/ap_update.class.php') diff --git a/lib/plugins/plugin/classes/ap_update.class.php b/lib/plugins/plugin/classes/ap_update.class.php new file mode 100644 index 000000000..9ac002991 --- /dev/null +++ b/lib/plugins/plugin/classes/ap_update.class.php @@ -0,0 +1,38 @@ +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(''); + } else { // none found in download + ptln('

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

'); + } + ptln('
'); + } +} + -- cgit v1.2.3