[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] phpgwapi/inc/class.Template.inc.php, 1.12.4.3.2.1
From: |
nomail |
Subject: |
[Phpgroupware-cvs] phpgwapi/inc/class.Template.inc.php, 1.12.4.3.2.1 |
Date: |
Thu, 30 Dec 2004 03:23:29 +0100 |
Update of /phpgwapi/inc
Modified Files:
Branch: proposed-0_9_18-branch
class.Template.inc.php
date: 2004/12/30 02:23:29; author: skwashd; state: Exp; lines: +20 -15
Log Message:
new layout and crud removal
=====================================================================
Index: phpgwapi/inc/class.Template.inc.php
diff -u phpgwapi/inc/class.Template.inc.php:1.12.4.3
phpgwapi/inc/class.Template.inc.php:1.12.4.3.2.1
--- phpgwapi/inc/class.Template.inc.php:1.12.4.3 Tue Feb 10 13:51:17 2004
+++ phpgwapi/inc/class.Template.inc.php Thu Dec 30 02:23:29 2004
@@ -101,8 +101,7 @@
}
else
{
- reset($handle);
- while(list($h, $f) = each($handle))
+ foreach($handle as $h => $f)
{
$this->file[$h] = $this->filename($f);
}
@@ -155,8 +154,7 @@
}
else
{
- reset($varname);
- while(list($k, $v) = each($varname))
+ foreach($varname as $k => $v)
{
if (!empty($k))
{
@@ -183,8 +181,13 @@
}
$str = $this->get_var($handle);
- reset($this->varkeys);
- while (list($k, $v) = each($this->varkeys))
+
+ if( !is_array($this->varkeys) )
+ {
+ return $str;
+ }
+
+ foreach($this->varkeys as $k => $v)
{
$str = str_replace($v, $this->varvals[$k],
$str);
}
@@ -222,8 +225,7 @@
}
else
{
- reset($handle);
- while(list($i, $h) = each($handle))
+ foreach($handle as $i => $h)
{
$str = $this->subst($h);
$this->set_var($target, $str);
@@ -254,8 +256,12 @@
*/
function get_vars()
{
- reset($this->varkeys);
- while(list($k, $v) = each($this->varkeys))
+ if( !is_array($this->varkeys) )
+ {
+ $this->varkeys = array();
+ }
+
+ foreach($this->varkeys as $k => $v)
{
$result[$k] = $this->varvals[$k];
}
@@ -277,7 +283,7 @@
else
{
reset($varname);
- while(list($k, $v) = each($varname))
+ foreach($varname as $k => $v)
{
$result[$k] = $this->varvals[$k];
}
@@ -302,8 +308,7 @@
{
return false;
}
- reset($m);
- while(list($k, $v) = each($m))
+ foreach($m as $k => $v)
{
if (!isset($this->varkeys[$v]))
{
@@ -381,7 +386,7 @@
}
else
{
- $new_root =
str_replace($GLOBALS['phpgw_info']['server']['template_set'],'default',$root);
+ $new_root =
str_replace($GLOBALS['phpgw_info']['server']['template_set'],'simple',$root);
$new_filename =
$this->filename(str_replace($root.'/','',$new_filename),$new_root,2);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] phpgwapi/inc/class.Template.inc.php, 1.12.4.3.2.1,
nomail <=