Changeset 7596968 in github for program/include/main.inc


Ignore:
Timestamp:
Aug 10, 2009 5:32:44 PM (4 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
db52218
Parents:
996f0b4
Message:

Added 'message_compose' hook

File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/include/main.inc

    r1fcad15 r7596968  
    546546 */ 
    547547function get_input_value($fname, $source, $allow_html=FALSE, $charset=NULL) 
    548   { 
     548{ 
    549549  global $OUTPUT; 
    550550  $value = NULL; 
     
    583583  else 
    584584    return $value; 
    585   } 
     585} 
     586 
     587/** 
     588 * Convert array of request parameters (prefixed with _) 
     589 * to a regular array with non-prefixed keys. 
     590 * 
     591 * @param  int   Source to get value from (GPC) 
     592 * @return array Hash array with all request parameters 
     593 */ 
     594function request2param($mode = RCUBE_INPUT_GPC) 
     595{ 
     596  $out = array(); 
     597  $src = $mode == RCUBE_INPUT_GET ? $_GET : ($mode == RCUBE_INPUT_POST ? $_POST : $_REQUEST); 
     598  foreach ($src as $key => $value) { 
     599    $fname = $key[0] == '_' ? substr($key, 1) : $key; 
     600    $out[$fname] = get_input_value($key, $mode); 
     601  } 
     602   
     603  return $out; 
     604} 
    586605 
    587606/** 
     
    959978  $args = func_get_args(); 
    960979 
    961   if (class_exists('rcmail', false)) 
    962     rcmail::get_instance()->plugins->exec_hook('console', $args); 
     980  if (class_exists('rcmail', false)) { 
     981    $rcmail = rcmail::get_instance(); 
     982    if (is_object($rcmail->plugins)) 
     983      $rcmail->plugins->exec_hook('console', $args); 
     984  } 
    963985 
    964986  $msg = array(); 
Note: See TracChangeset for help on using the changeset viewer.