Пример #1
0
 /**
  * Runs after install, update or discover_update. In other words, it executes after Joomla! has finished installing
  * or updating your component. This is the last chance you've got to perform any additional installations, clean-up,
  * database updates and similar housekeeping functions.
  *
  * @param   string     $type   install, update or discover_update
  * @param   JInstaller $parent Parent object
  */
 function postflight($type, $parent)
 {
     $this->isPaid = is_dir($parent->getParent()->getPath('source') . '/plugins/system/srp');
     parent::postflight($type, $parent);
     // Make sure the two plugins folders exist in Core release and are empty
     if (!$this->isPaid) {
         if (!JFolder::exists(JPATH_ADMINISTRATOR . '/components/com_akeeba/plugins')) {
             JFolder::create(JPATH_ADMINISTRATOR . '/components/com_akeeba/plugins');
         }
         if (!JFolder::exists(JPATH_ADMINISTRATOR . '/components/com_akeeba/akeeba/plugins')) {
             JFolder::create(JPATH_ADMINISTRATOR . '/components/com_akeeba/akeeba/plugins');
         }
     }
 }
Пример #2
0
 /**
  * Runs after install, update or discover_update. In other words, it executes after Joomla! has finished installing
  * or updating your component. This is the last chance you've got to perform any additional installations, clean-up,
  * database updates and similar housekeeping functions.
  *
  * @param   string     $type   install, update or discover_update
  * @param   JInstaller $parent Parent object
  */
 function postflight($type, $parent)
 {
     $this->isPaid = is_dir($parent->getParent()->getPath('source') . '/backend/alice');
     // Let's install common tables
     $model = F0FModel::getTmpInstance('Stats', 'AkeebaModel');
     if (method_exists($model, 'checkAndFixCommonTables')) {
         $model->checkAndFixCommonTables();
     }
     parent::postflight($type, $parent);
     $this->uninstallObsoletePostinstallMessages();
     // Make sure the two plugins folders exist in Core release and are empty
     if (!$this->isPaid) {
         if (!JFolder::exists(JPATH_ADMINISTRATOR . '/components/com_akeeba/plugins')) {
             JFolder::create(JPATH_ADMINISTRATOR . '/components/com_akeeba/plugins');
         }
         if (!JFolder::exists(JPATH_ADMINISTRATOR . '/components/com_akeeba/akeeba/plugins')) {
             JFolder::create(JPATH_ADMINISTRATOR . '/components/com_akeeba/akeeba/plugins');
         }
     }
     // If this is a new installation tell it to NOT mark the backup profiles as configured.
     if (defined('AKEEBA_THIS_IS_INSTALLATION_FROM_SCRATCH')) {
         $db = F0FPlatform::getInstance()->getDbo();
         $query = $db->getQuery(true)->select($db->qn('params'))->from($db->qn('#__extensions'))->where($db->qn('type') . ' = ' . $db->q('component'))->where($db->qn('element') . ' = ' . $db->q('com_akeeba'));
         $jsonData = $db->setQuery($query)->loadResult();
         $reg = new JRegistry($jsonData);
         $reg->set('confwiz_upgrade', 1);
         $jsonData = $reg->toString('JSON');
         $query = $db->getQuery()->update($db->qn('#__extensions'))->set($db->qn('params') . ' = ' . $db->q($jsonData))->where($db->qn('type') . ' = ' . $db->q('component'))->where($db->qn('element') . ' = ' . $db->q('com_akeeba'));
         $db->setQuery($query)->execute();
     }
     // This is an update of an existing installation
     if (!defined('AKEEBA_THIS_IS_INSTALLATION_FROM_SCRATCH')) {
         // Migrate profiles if necessary
         $this->migrateProfiles();
     }
 }
Пример #3
0
 /**
  * Runs after install, update or discover_update. In other words, it executes after Joomla! has finished installing
  * or updating your component. This is the last chance you've got to perform any additional installations, clean-up,
  * database updates and similar housekeeping functions.
  *
  * @param   string     $type   install, update or discover_update
  * @param   JInstaller $parent Parent object
  */
 function postflight($type, $parent)
 {
     $this->isPaid = is_dir($parent->getParent()->getPath('source') . '/plugins/system/srp');
     if (!$this->isPaid) {
         unset($this->postInstallationMessages['srp']);
         unset($this->postInstallationMessages['backuponupdate']);
     }
     // Let's install common tables
     $model = F0FModel::getTmpInstance('Stats', 'AkeebaModel');
     if (method_exists($model, 'checkAndFixCommonTables')) {
         $model->checkAndFixCommonTables();
     }
     parent::postflight($type, $parent);
     if (version_compare(JVERSION, '3.2.0', 'ge')) {
         $this->uninstallObsoletePostinstallMessages();
     }
     // Make sure the two plugins folders exist in Core release and are empty
     if (!$this->isPaid) {
         if (!JFolder::exists(JPATH_ADMINISTRATOR . '/components/com_akeeba/plugins')) {
             JFolder::create(JPATH_ADMINISTRATOR . '/components/com_akeeba/plugins');
         }
         if (!JFolder::exists(JPATH_ADMINISTRATOR . '/components/com_akeeba/akeeba/plugins')) {
             JFolder::create(JPATH_ADMINISTRATOR . '/components/com_akeeba/akeeba/plugins');
         }
     }
 }
 /**
  * Runs after install, update or discover_update
  *
  * @param string     $type install, update or discover_update
  * @param JInstaller $parent
  */
 function postflight($type, $parent)
 {
     /** @var AdmintoolsModelStats $model */
     $this->isPaid = is_dir($parent->getParent()->getPath('source') . '/plugins/system/admintools/admintools/pro.php');
     if (!$this->isPaid) {
         unset($this->postInstallationMessages['autojupdate']);
     }
     // Let's install common tables
     $model = F0FModel::getTmpInstance('Stats', 'AdmintoolsModel');
     if (method_exists($model, 'checkAndFixCommonTables')) {
         $model->checkAndFixCommonTables();
     }
     parent::postflight($type, $parent);
 }
Пример #5
0
 /**
  * Runs after install, update or discover_update
  *
  * @param string     $type install, update or discover_update
  * @param JInstaller $parent
  */
 function postflight($type, $parent)
 {
     /** @var AdmintoolsModelStats $model */
     $this->isPaid = is_dir($parent->getParent()->getPath('source') . '/plugins/system/admintools/admintools/pro.php');
     if (!$this->isPaid) {
         unset($this->postInstallationMessages['autojupdate']);
     }
     // Let's install common tables
     $model = F0FModel::getTmpInstance('Stats', 'AdmintoolsModel');
     if (method_exists($model, 'checkAndFixCommonTables')) {
         $model->checkAndFixCommonTables();
     }
     // Set the configuration wizad flag on update (so as not to bother existing users)
     if ($type == 'update') {
         if (!class_exists('AdmintoolsModelStorage')) {
             include_once JPATH_ADMINISTRATOR . '/components/com_admintools/models/storage.php';
         }
         if (class_exists('AdmintoolsModelStorage')) {
             $params = JModelLegacy::getInstance('Storage', 'AdmintoolsModel');
             $params->load();
             $params->setValue('quickstart', 1, true);
         }
     }
     parent::postflight($type, $parent);
 }
Пример #6
0
 /**
  * Runs after install, update or discover_update. In other words, it executes after Joomla! has finished installing
  * or updating your component. This is the last chance you've got to perform any additional installations, clean-up,
  * database updates and similar housekeeping functions.
  *
  * @param   string      $type    install, update or discover_update
  * @param   JInstaller  $parent  Parent object
  *
  * @return void
  */
 public function postflight($type, $parent)
 {
     // Do not process $removeFilesFree
     $this->isPaid = true;
     $this->renderType = $type;
     $this->_fix_createAdminMenus($parent);
     parent::postflight($type, $parent);
 }