phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: etemplate/inc class.boetemplate.inc.php,1.15,1.1


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: etemplate/inc class.boetemplate.inc.php,1.15,1.16
Date: Wed, 18 Sep 2002 10:15:06 -0400

Update of /cvsroot/phpgroupware/etemplate/inc
In directory subversions:/tmp/cvs-serv29863

Modified Files:
        class.boetemplate.inc.php 
Log Message:
set_cell_attributes searches now in sub-templates, which get automaticall loaded

Index: class.boetemplate.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.boetemplate.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** class.boetemplate.inc.php   17 Sep 2002 12:26:08 -0000      1.15
--- class.boetemplate.inc.php   18 Sep 2002 14:15:04 -0000      1.16
***************
*** 251,254 ****
--- 251,256 ----
                function set_cell_attribute($name,$attr,$val)
                {
+                       //echo "<p>set_cell_attribute(tpl->name=$this->name, 
name='$name', attr='$attr',val='$val')</p>\n";
+ 
                        reset($this->data);
                        $n = 0;
***************
*** 262,291 ****
                                                ++$n;
                                        }
!                               }
!                       }
!                       reset($this->data);
! 
!                       return $n;
!               }
! 
!               /*!
!               @function set_cell_attribute
!               @syntax set_cell_attribute( $name,$attr,$val )
!               @author ralfbecker
!               @abstract set an attribute in a named cell
!               @result the number of changed cells
!               */
!               function set_cell_attribute($name,$attr,$val)
!               {
!                       reset($this->data);
!                       $n = 0;
!          while(list($row,$cols) = each($this->data))
!                       {
!                               while(list($col,$cell) = each($cols))
!                               {
!                                       if ($cell['name'] == $name)
                                        {
!                                               $this->data[$row][$col][$attr] 
= $val;
!                                               ++$n;
                                        }
                                }
--- 264,274 ----
                                                ++$n;
                                        }
!                                       if ($cell['type'] == 'template' && 
(is_object($cell['name']) || $cell['name'][0] != '@'))
                                        {
!                                               if (!is_object($cell['name']))
!                                               {
!                                                       
$this->data[$row][$col]['name'] = 
CreateObject('etemplate.etemplate',$cell['name']);
!                                               }
!                                               $n += 
$this->data[$row][$col]['name']->set_cell_attribute($name,$attr,$val);
                                        }
                                }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]