| | |
| | | * |
| | | * @see rcmail::text_exists() |
| | | */ |
| | | function rcube_label_exists($name, $domain=null) |
| | | function rcube_label_exists($name, $domain=null, &$ref_domain = null) |
| | | { |
| | | return rcmail::get_instance()->text_exists($name, $domain); |
| | | return rcmail::get_instance()->text_exists($name, $domain, $ref_domain); |
| | | } |
| | | |
| | | |
| | |
| | | * @param int Source to get value from (GPC) |
| | | * @return array Hash array with all request parameters |
| | | */ |
| | | function request2param($mode = RCUBE_INPUT_GPC) |
| | | function request2param($mode = RCUBE_INPUT_GPC, $ignore = 'task|action') |
| | | { |
| | | $out = array(); |
| | | $src = $mode == RCUBE_INPUT_GET ? $_GET : ($mode == RCUBE_INPUT_POST ? $_POST : $_REQUEST); |
| | | foreach ($src as $key => $value) { |
| | | $fname = $key[0] == '_' ? substr($key, 1) : $key; |
| | | $out[$fname] = get_input_value($key, $mode); |
| | | if ($ignore && !preg_match("/($ignore)/", $fname)) |
| | | $out[$fname] = get_input_value($key, $mode); |
| | | } |
| | | |
| | | return $out; |
| | |
| | | // define date format depending on current time |
| | | if (!$format) { |
| | | if ($CONFIG['prettydate'] && $timestamp > $today_limit && $timestamp < $now) { |
| | | $format = $CONFIG['date_today'] ? $CONFIG['date_today'] : 'H:i'; |
| | | $format = $RCMAIL->config->get('date_today', $RCMAIL->config->get('time_format', 'H:i')); |
| | | $today = true; |
| | | } |
| | | else if ($CONFIG['prettydate'] && $timestamp > $week_limit && $timestamp < $now) |
| | | $format = $CONFIG['date_short'] ? $CONFIG['date_short'] : 'D H:i'; |
| | | $format = $RCMAIL->config->get('date_short', 'D H:i'); |
| | | else |
| | | $format = $CONFIG['date_long'] ? $CONFIG['date_long'] : 'd.m.Y H:i'; |
| | | $format = $RCMAIL->config->get('date_long', 'Y-m-d H:i'); |
| | | } |
| | | |
| | | // strftime() format |
| | |
| | | |
| | | $RCMAIL->output->set_env('autocomplete_max', (int)$RCMAIL->config->get('autocomplete_max', 15)); |
| | | $RCMAIL->output->set_env('autocomplete_min_length', $RCMAIL->config->get('autocomplete_min_length')); |
| | | $RCMAIL->output->add_label('autocompletechars'); |
| | | $RCMAIL->output->add_label('autocompletechars', 'autocompletemore'); |
| | | } |