Exemplo n.º 1
0
 /**
  * Set up config appropriately on engine boot.
  *
  * @return void
  */
 function init()
 {
     $lastcache = $this->config->get('lastcache');
     if (!defined('UPGRADING') && empty($lastcache)) {
         $this->config->set('lastcache', (int) $this->datalist->get('simplecache_lastupdate'));
     }
 }
Exemplo n.º 2
0
 /**
  * Upgrades Elgg Database and code
  *
  * @return bool
  */
 protected function processUpgrades()
 {
     $dbversion = (int) $this->datalist->get('version');
     if ($this->upgradeCode($dbversion)) {
         system_message($this->translator->translate('upgrade:core'));
         // Now we trigger an event to give the option for plugins to do something
         $upgrade_details = new \stdClass();
         $upgrade_details->from = $dbversion;
         $upgrade_details->to = elgg_get_version();
         $this->events->trigger('upgrade', 'upgrade', $upgrade_details);
         return true;
     }
     return false;
 }