| | |
| | | public function autoselect_host() |
| | | { |
| | | $default_host = $this->config->get('default_host'); |
| | | $host = !empty($default_host) ? get_input_value('_host', RCUBE_INPUT_POST) : $default_host; |
| | | $host = empty($default_host) ? get_input_value('_host', RCUBE_INPUT_POST) : $default_host; |
| | | |
| | | if (is_array($host)) { |
| | | list($user, $domain) = explode('@', get_input_value('_user', RCUBE_INPUT_POST)); |
| | |
| | | public function url($p) |
| | | { |
| | | if (!is_array($p)) |
| | | $p = array('action' => @func_get_arg(0)); |
| | | |
| | | $url = $p['task'] ? './?_task=' . $p['task'] : $this->comm_path; |
| | | unset($p['task']); |
| | | $p = array('_action' => @func_get_arg(0)); |
| | | |
| | | if ($p['task'] && in_array($p['task'], rcmail::$main_tasks)) |
| | | $url = './?_task='.$p['task']; |
| | | else |
| | | $url = $this->comm_path; |
| | | |
| | | unset($p['task']); |
| | | foreach ($p as $par => $val) |
| | | $url .= sprintf('&%s=%s', urlencode($par), urlencode($val)); |
| | | $url .= '&'.urlencode($par).'='.urlencode($val); |
| | | |
| | | return $url; |
| | | } |