Changeset 1771 in subversion


Ignore:
Timestamp:
Sep 12, 2008 10:01:52 AM (5 years ago)
Author:
thomasb
Message:

Fix rcmail::url(), don't use comm_path

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/rcmail.php

    r1748 r1771  
    892892    if (!is_array($p)) 
    893893      $p = array('_action' => @func_get_arg(0)); 
    894      
    895     if ($p['task'] && in_array($p['task'], rcmail::$main_tasks)) 
    896       $url = './?_task='.$p['task']; 
    897     else 
    898       $url = $this->comm_path; 
    899      
    900     unset($p['task']); 
    901     foreach ($p as $par => $val) 
    902       if (isset($val)) 
    903         $url .= '&'.urlencode($par).'='.urlencode($val); 
    904      
     894 
     895    if (!$p['task'] || !in_array($p['task'], rcmail::$main_tasks)) 
     896      $p['task'] = $this->task; 
     897 
     898    $url = './'; 
     899    $delm = '?'; 
     900    foreach (array_reverse($p) as $par => $val) 
     901    { 
     902      if (!empty($val)) { 
     903        $url .= $delm.urlencode($par).'='.urlencode($val); 
     904        $delm = '&'; 
     905      } 
     906    } 
    905907    return $url; 
    906908  } 
Note: See TracChangeset for help on using the changeset viewer.