Esempio n. 1
0
 function doSimpleRestore($bfile, $param)
 {
     global $gbl, $sgbl, $login, $ghtml;
     $progname = $sgbl->__var_program_name;
     $cprogname = ucfirst($progname);
     if ($this->isLocalhost('syncserver')) {
         $rem = lxbackup::getMetaData($bfile);
     } else {
         $rem = rl_exec_get($this->__masterserver, $this->syncserver, array("lxbackup", "getMetaData"), array($bfile));
     }
     $ob = $rem->bobject;
     dprint($ob->getClName());
     dprint($this->getClName());
     if ($ob->getClName() !== $this->getClName()) {
         throw new lxException('objectclassname_doesnt_match', '');
     }
     if ($gbl->__var_list_flag) {
         print "Contents of the backfile: Owner: {$ob->nname}.....\n";
     } else {
         print "Restoring backup for {$ob->nname}.....\n";
     }
     $ob->checkForConsistency(null, $param['_accountselect'], true);
     // Restore the currenct client's quota. The person who is doing the restoring souldn't able to escape his new quota.
     if ($this->isLogin()) {
         $ob->priv = $this->priv;
         if (isset($this->listpriv)) {
             $ob->listpriv = $this->listpriv;
         }
     }
     $ob->__var_bc_filename = $bfile;
     if (!$gbl->__var_list_flag) {
         $ob->was();
         $ob->simpleRestoreMeUpThere();
     }
 }