예제 #1
0
 function postUpdate()
 {
     // The lxclient postupdate which checks for change of skin...
     if ($this->subaction === 'createtemplate') {
         if ($this->isXen()) {
             $stem = explode("-", $this->ostemplate);
             if ($this->isWindows()) {
                 $name = "{$stem[0]}-";
             } else {
                 $name = "{$stem[0]}-{$stem[1]}-{$stem[2]}-";
             }
             $templatename = "{$name}{$this->newostemplate_name_f}";
             if ($this->isWindows()) {
                 $tempfpath = "__path_program_home/xen/template/{$templatename}.img";
             } else {
                 $tempfpath = "__path_program_home/xen/template/{$templatename}.tar.gz";
             }
             if (lxfile_exists($tempfpath)) {
                 throw new lxException("template_already_exists");
             }
         } else {
             $stem = explode("-", $this->ostemplate);
             $name = "{$stem[0]}-{$stem[1]}-{$stem[2]}-";
             $templatename = "{$name}{$this->newostemplate_name_f}";
             if (lxfile_exists("/vz/template/cache/{$templatename}.tar.gz")) {
                 throw new lxException("template_already_exists");
             }
         }
     }
     if ($this->subaction === 'rebuild' || $this->subaction === 'installkloxo') {
         if_demo_throw_exception();
         $this->setUpOsTemplateDownloadParam();
     }
     parent::postUpdate();
 }
예제 #2
0
 static function createListAlist($parent, $class)
 {
     /*
     	if ($parent->isLogin() && !$parent->priv->isOn('domain_add_flag')) {
     		return null;
     	}
     */
     return parent::createListAlist($parent, $class);
 }