/**
  * (non-PHPdoc)
  *
  * @see PwInstall::afterInstall()
  * @param PwInstallApplication $install        	
  */
 public function afterInstall($install)
 {
     list(, $pack) = $this->getStyleType($install);
     $alias = $install->getManifest()->getApplication('alias');
     $targetDir = THEMES_PATH . $pack;
     if (!PwSystemHelper::checkWriteAble($targetDir . '/')) {
         return new PwError('APPCENTER:install.mv.fail', array('{{error}}' => 'THEMES:' . str_replace('/', '.', $pack)));
     }
     $target = $targetDir . '/' . $alias;
     PwApplicationHelper::mvSourcePack($install->getTmpPackage(), $target);
     $install->addInstallLog('packs', $target);
     file_put_contents(DATA_PATH . 'tmp/log', 'afterinstall!', FILE_APPEND);
     return true;
 }
Exemple #2
0
 /**
  *
  * @see iPwInstall::afterInstall()
  * @param PwInstallApplication $install        	
  */
 public function afterInstall($install)
 {
     if ($install->getTmpPackage()) {
         $r = $this->registeResource($install);
         if ($r instanceof PwError) {
             return $r;
         }
         $name = $install->getManifest()->getApplication('alias');
         $writable = PwSystemHelper::checkWriteAble(EXT_PATH . $name . '/');
         if (!$writable) {
             return new PwError('APPCENTER:install.mv.fail', array('{{error}}' => 'EXT:' . $name));
         }
         $targetPath = EXT_PATH . $name;
         PwApplicationHelper::mvSourcePack($install->getTmpPackage(), $targetPath);
         $install->addInstallLog('packs', $targetPath);
     }
     file_put_contents(DATA_PATH . 'tmp/log', 'afterinstall!', FILE_APPEND);
     return true;
 }