[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-tracker] [patch #1683] [Patch #1683] Template str_replace
From: |
noreply |
Subject: |
[Phpgroupware-tracker] [patch #1683] [Patch #1683] Template str_replace bug |
Date: |
Mon, 30 Jun 2003 00:51:59 -0400 |
User-agent: |
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3.1) Gecko/20030425 |
Patch #1683 has been updated.
Project:
Category: API - phpGWapi
Status: Open
Summary: Template str_replace bug
Follow-Ups:
Date: Mon 06/30/2003 at 14:47
By: adamhull
Comment:
when a template does not exist in the active template directory, phpgw looks in
the default template folder. to do so it currently does the following in
function filename() in class.Template.inc.php:
$new_root =
str_replace($GLOBALS['phpgw_info']['server']['template_set'],'default',$root);
-------------------------------------------------------
Date: Mon 06/30/2003 at 14:49
By: adamhull
Comment:
The above comment got truncated.
when a template does not exist in the active template directory, phpgw looks in
the default template folder. to do so it currently does the following in
function filename() in class.Template.inc.php:
$new_root =
str_replace($GLOBALS['phpgw_info']['server']['template_set'],'default',$root);
-------------------------------------------------------
Date: Mon 06/30/2003 at 14:50
By: adamhull
Comment:
it currently replaces every occurance of the template name. this is prone to
error.
this way more accurate and arguably faster because it only replaces the end of
the string:
$new_root =
ereg_replace($GLOBALS['phpgw_info']['server']['template_set'].'$','default',$root);
-------------------------------------------------------
Date: Mon 06/30/2003 at 14:51
By: skwashd
Comment:
ceb, can you have a look at this one. I think it is good, just want a second
opinion :)
-------------------------------------------------------
-------------------------------------------------------
For more info, visit:
http://savannah.gnu.org/patch/?func=detailpatch&patch_id=1683&group_id=509
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/