/** * retrieve proxy settings * @return array */ public function getAction() { $result = array(); if ($this->request->isGet()) { $mdlProxy = new Proxy(); // Define array for selected interfaces $selopt = array(); // Get ConfigObject $configObj = Config::getInstance()->object(); // Iterate over all interfaces configuration // TODO: replace for <interfaces> helper foreach ($configObj->interfaces->children() as $key => $value) { // Check if interface is enabled, if tag is <enable/> treat as enabled. if (isset($value->enable) && $value->enable != '0') { // Check if interface has static ip if ($value->ipaddr != 'dhcp') { if ($value->descr == '') { $description = strtoupper($key); // Use interface name as description if none is given } else { $description = $value->descr; } $selopt[$key] = (string) $description; // Add Interface to selectable options. } } } $mdlProxy->forward->interfaces->setSelectOptions($selopt); $mdlProxy->forward->ftpInterfaces->setSelectOptions($selopt); $result['proxy'] = $mdlProxy->getNodes(); } return $result; }
/** * retrieve proxy settings * @return array */ public function getAction() { $result = array(); if ($this->request->isGet()) { $mdlProxy = new Proxy(); $result['proxy'] = $mdlProxy->getNodes(); } return $result; }