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