protected function extendApplications(&$applications) { parent::extendApplications($applications); $system_plugins = array(); foreach (array_keys($applications) as $id) { if (strpos($id, 'wa-plugins/') === 0) { $system_plugins[str_replace('wa-plugins/', '', $id)] = $id; } } if (!empty($system_plugins)) { $applicable = array(); foreach ($applications as $id => &$info) { if (!isset($info['system_plugins'])) { $info['system_plugins'] = array(); } foreach ($system_plugins as $type => $slug) { if (!empty($info['installed'][$type . '_plugins'])) { $applicable[$slug] = true; $info['system_plugins'][$slug] = $slug; } } unset($info); } foreach ($system_plugins as $slug) { if (empty($applicable[$slug])) { unset($applications[$slug]); } } } }
public function execute() { parent::execute(); $this->view->assign('systemplugins', installerHelper::getSystemPlugins($messages, $this->update_counter)); if (waRequest::get('subject') == 'systemplugins') { $this->view->assign('selected_type', waRequest::get('slug')); } $this->getConfig()->setCount($this->update_counter ? $this->update_counter : null); $this->view->assign('update_counter', $this->update_counter); }
public function execute() { parent::execute(); $return_url = waRequest::get('return_url', waRequest::server('HTTP_REFERER')); if ($return_hash = waRequest::get('return_hash')) { if ($return_hash = preg_replace('@^#@', '', $return_hash)) { $return_url .= '#' . $return_hash; } } $this->view->assign('top', !!preg_match('@^[^/]+$@', waRequest::get('slug')) && !waRequest::get('filter')); $this->view->assign('return_url', $return_url); }