source: documentation/trunk/packages/dokuwiki-2011-05-25a/lib/plugins/plugin/classes/ap_update.class.php@ 25027

Last change on this file since 25027 was 25027, checked in by jmt12, 12 years ago

Adding the packages directory, and within it a configured version of dokuwiki all ready to run

File size: 1.2 KB
Line 
1<?php
2require_once(DOKU_PLUGIN."/plugin/classes/ap_download.class.php");
3class ap_update extends ap_download {
4
5 var $overwrite = true;
6
7 function process() {
8 global $lang;
9
10 $plugin_url = $this->plugin_readlog($this->plugin, 'url');
11 $this->download($plugin_url, $this->overwrite);
12 return '';
13 }
14
15 function html() {
16 parent::html();
17
18 ptln('<div class="pm_info">');
19 ptln('<h2>'.$this->lang['updating'].'</h2>');
20
21 if ($this->manager->error) {
22 ptln('<div class="error">'.str_replace("\n","<br />", $this->manager->error).'</div>');
23 } else if (count($this->downloaded) == 1) {
24 ptln('<p>'.sprintf($this->lang['updated'],$this->downloaded[0]).'</p>');
25 } else if (count($this->downloaded)) { // more than one plugin in the download
26 ptln('<p>'.$this->lang['updates'].'</p>');
27 ptln('<ul>');
28 foreach ($this->downloaded as $plugin) {
29 ptln('<li><div class="li">'.$plugin.'</div></li>',2);
30 }
31 ptln('</ul>');
32 } else { // none found in download
33 ptln('<p>'.$this->lang['update_none'].'</p>');
34 }
35 ptln('</div>');
36 }
37}
38
Note: See TracBrowser for help on using the repository browser.