[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/lib/plugins/plugin/classes/ -> ap_update.class.php (source)

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


Generated: Sun Jan 19 03:00:05 2014 Cross-referenced by PHPXref 0.7