/**
  * executeViewSuccess
  *
  * @param	XCube_RenderTarget	&$render
  *
  * @return	void
  **/
 public function executeViewSuccess(&$render)
 {
     $xupdateFtpModuleInstall = new Xupdate_FtpModuleInstall();
     // Xupdate instance
     //setup
     $xupdateFtpModuleInstall->downloadDirPath = $this->Xupdate->params['temp_path'];
     $xupdateFtpModuleInstall->downloadUrlFormat = $this->mActionForm->get('addon_url');
     $xupdateFtpModuleInstall->target_key = $this->mActionForm->get('target_key');
     $xupdateFtpModuleInstall->target_type = $this->mActionForm->get('target_type');
     $xupdateFtpModuleInstall->trust_dirname = $this->mActionForm->get('trust_dirname');
     $xupdateFtpModuleInstall->dirname = $this->mActionForm->get('dirname');
     $xupdateFtpModuleInstall->unzipdirlevel = $this->mActionForm->get('unzipdirlevel');
     //execute
     $result = $xupdateFtpModuleInstall->execute('theme');
     //--------------------------------//
     $render->setTemplateName('admin_theme_install.html');
     $render->setAttribute('mod_config', $this->mod_config);
     $render->setAttribute('xupdate_writable', $this->Xupdate->params['is_writable']);
     $render->setAttribute('xupdate_nextlink', $xupdateFtpModuleInstall->nextlink);
     $render->setAttribute('xupdate_content', $xupdateFtpModuleInstall->content);
     $render->setAttribute('xupdate_message', $xupdateFtpModuleInstall->Ftp->getMes());
     $render->setAttribute('adminMenu', $this->mModule->getAdminMenu());
     $render->setAttribute('actionForm', $this->mActionForm);
 }
 /**
  * executeViewSuccess
  *
  * @param	XCube_RenderTarget	&$render
  *
  * @return	void
  **/
 public function executeViewSuccess(&$render)
 {
     $xupdateFtpModuleInstall = new Xupdate_FtpModuleInstall();
     // Xupdate instance
     //setup
     $xupdateFtpModuleInstall->downloadDirPath = $this->Xupdate->params['temp_path'];
     $xupdateFtpModuleInstall->downloadUrlFormat = $this->mActionForm->get('addon_url');
     $xupdateFtpModuleInstall->target_key = $this->mActionForm->get('target_key');
     $xupdateFtpModuleInstall->target_type = $this->mActionForm->get('target_type');
     $xupdateFtpModuleInstall->trust_dirname = $this->mActionForm->get('trust_dirname');
     $xupdateFtpModuleInstall->dirname = $this->mActionForm->get('dirname');
     $xupdateFtpModuleInstall->unzipdirlevel = $this->mActionForm->get('unzipdirlevel');
     $this->id = intval($this->Xupdate->get('id'));
     $modHand =& $this->_getModuleStoreHandler();
     $mobj =& $modHand->get($this->id);
     if (is_object($mobj)) {
         $this->dirname = $mobj->get('dirname');
         $this->options = $this->_unserialize_options($mobj, $this->dirname);
         //adump($this->options);
         $_arr = $this->Xupdate->get('writable_dir');
         if (!empty($_arr) && count($_arr) > 0) {
             foreach ($_arr as $item) {
                 if (in_array($item, $this->options['writable_dir'])) {
                     $xupdateFtpModuleInstall->options['writable_dir'][] = $item;
                 }
             }
         }
         $_arr = $this->Xupdate->get('writable_file');
         if (!empty($_arr) && count($_arr) > 0) {
             foreach ($_arr as $item) {
                 if (in_array($item, $this->options['writable_file'])) {
                     $xupdateFtpModuleInstall->options['writable_file'][] = $item;
                 }
             }
         }
         $_arr = $this->Xupdate->get('install_only');
         if (!empty($this->options['install_only']) && count($this->options['install_only']) > 0) {
             // checked means allow overwrite
             $xupdateFtpModuleInstall->options['install_only'] = array();
             //if ( isset($mobj->mModule) && $mobj->mModule->get('isactive')==true ){
             if (isset($mobj->mModule)) {
                 foreach ($this->options['install_only'] as $item) {
                     if (!is_array($_arr) || is_array($_arr) && !in_array($item, $_arr)) {
                         $xupdateFtpModuleInstall->options['no_overwrite'][] = $item;
                     }
                 }
             }
         }
         //adump($_arr, $this->options['install_only'], $xupdateFtpModuleInstall->options['install_only']);
     }
     //execute
     $result = $xupdateFtpModuleInstall->execute('module');
     //--------------------------------//
     $render->setTemplateName('admin_module_install.html');
     $render->setAttribute('mod_config', $this->mod_config);
     $render->setAttribute('xupdate_writable', $this->Xupdate->params['is_writable']);
     $render->setAttribute('xupdate_nextlink', $xupdateFtpModuleInstall->nextlink);
     $render->setAttribute('xupdate_content', $xupdateFtpModuleInstall->content);
     $render->setAttribute('xupdate_message', $xupdateFtpModuleInstall->Ftp->getMes());
     $render->setAttribute('adminMenu', $this->mModule->getAdminMenu());
     $render->setAttribute('actionForm', $this->mActionForm);
 }