/** * 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')); } }
/** * 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; }