public function getcontent()
 {
     $result = parent::getcontent();
     $plugin = tsourcefiles::i();
     $result .= $plugin->getcachecontent('', '');
     return $result;
 }
 public function processform()
 {
     $plugin = tsourcefiles::i();
     if (isset($_POST['download'])) {
         set_time_limit(300);
         $version = litepublisher::$options->version;
         if (!(($s = http::get("http://litepublisher.googlecode.com/files/litepublisher.{$version}.tar.gz")) || ($s = http::get("http://litepublisher.com/download/litepublisher.{$version}.tar.gz")))) {
             return 'Error download';
         }
         tbackuper::include_tar();
         $tar = new tar();
         $tar->loadfromstring($s);
         if (!is_array($tar->files)) {
             unset($tar);
             return 'Invalid file archive';
         }
         tfiler::delete($plugin->root, true, false);
         foreach ($tar->files as $item) {
             $filename = $plugin->root . $item['name'];
             $dir = dirname($filename);
             if (!is_dir($dir)) {
                 $this->mkdir($dir);
             }
             file_put_contents($filename, $item['file']);
             @chmod($filename, 0666);
         }
         unset($tar);
         $plugin->reread();
     } elseif (isset($_POST['reread'])) {
         $plugin->reread();
     } else {
         $plugin->root = $_POST['root'];
         $plugin->save();
     }
 }