private function updatePluginListCache() { $this->pluginListCache = array(); $dbData = $this->pluginDao->findAll(); /* @var $plugin BOL_Plugin */ foreach ($dbData as $plugin) { $this->pluginListCache[$plugin->getKey()] = $plugin; } }
public function checkManualUpdates() { if (defined('OW_PLUGIN_XP')) { return; } $timestamp = OW::getConfig()->getValue('base', 'check_mupdates_ts'); if (time() - (int) $timestamp < 30) { return; } $plugins = $this->pluginDao->findAll(); $xmlInfo = $this->getPluginsXmlInfo(); /* @var $plugin BOL_Plugin */ foreach ($plugins as $plugin) { if (!empty($xmlInfo[$plugin->getKey()]) && (int) $plugin->getBuild() < (int) $xmlInfo[$plugin->getKey()]['build']) { $plugin->setUpdate(2); $this->pluginDao->save($plugin); } } OW::getConfig()->saveConfig('base', 'check_mupdates_ts', time()); }