示例#1
0
 protected function checkInstall($dir)
 {
     if (file_exists('.' . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR . 'install.xml')) {
         $doc = new TXmlDocument();
         $doc->loadFromFile('.' . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR . 'install.xml');
         $type = $doc->getAttribute('type');
         return $type;
     } else {
         $this->recursive_remove_directory('.' . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR . $dir);
         $pBack = array('koMsg' => Prado::localize('This archive does not contain the file install.xml'));
         $this->Response->redirect($this->Service->constructUrl('installation.extensions', $pBack));
     }
 }