phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] etemplate/inc class.xul_io.inc.php


From: Sigurd Nes
Subject: [Phpgroupware-cvs] etemplate/inc class.xul_io.inc.php
Date: Mon, 12 Feb 2007 22:39:32 +0000

CVSROOT:        /sources/phpgroupware
Module name:    etemplate
Changes by:     Sigurd Nes <sigurdne>   07/02/12 22:39:32

Modified files:
        inc            : class.xul_io.inc.php 

Log message:
        notices

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/etemplate/inc/class.xul_io.inc.php?cvsroot=phpgroupware&r1=1.26&r2=1.27

Patches:
Index: class.xul_io.inc.php
===================================================================
RCS file: /sources/phpgroupware/etemplate/inc/class.xul_io.inc.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- class.xul_io.inc.php        10 Feb 2007 16:03:46 -0000      1.26
+++ class.xul_io.inc.php        12 Feb 2007 22:39:32 -0000      1.27
@@ -13,7 +13,7 @@
  * the Free Software Foundation; either version 2 of the License, or   *
  * at your option) any later version.                                  *
  \**********************************************************************/
- /* $Id: class.xul_io.inc.php,v 1.26 2007/02/10 16:03:46 sigurdne Exp $ */
+ /* $Id: class.xul_io.inc.php,v 1.27 2007/02/12 22:39:32 sigurdne Exp $ */
 
 
        if (!function_exists('var2xml'))
@@ -33,6 +33,7 @@
                var $widget2xul;
                var $attr2xul;
                var $xul2widget;
+               var $debug;
 
                function xul_io()
                {
@@ -390,7 +391,7 @@
                        }
                        xml_parser_free($parser);
 
-                       if ($err != '')
+                       if (isset($err) && $err != '')
                        {
                                return $err;
                        }
@@ -398,8 +399,8 @@
                        {
                                $type = $node['type'];
                                $tag = $node['tag'];
-                               $attr = is_array($node['attributes']) ? 
$node['attributes'] : array();
-                               if ($attr['id'])
+                               $attr = isset($node['attributes']) && 
is_array($node['attributes']) ? $node['attributes'] : array();
+                               if (isset($attr['id']) && $attr['id'])
                                {
                                        $attr['name'] = $attr['id']; 
unset($attr['id']);
                                }
@@ -413,7 +414,7 @@
                                }
                                if ($tag != 'textbox' && !isset($attr['type']))
                                {
-                                       $attr['type'] = $this->xul2widget[$tag] 
? $this->xul2widget[$tag] : $tag;
+                                       $attr['type'] = 
isset($this->xul2widget[$tag]) && $this->xul2widget[$tag] ? 
$this->xul2widget[$tag] : $tag;
                                }
                                if ($this->debug)
                                {
@@ -424,7 +425,7 @@
                                        case 'overlay':
                                                break;
                                        case 'grid':
-                                               if ($type != 'close' && 
is_array($tab_attr))
+                                               if ($type != 'close' && 
isset($tab_attr) && is_array($tab_attr))
                                                {
                                                        $tab_names[] = 
$attr['name'];
                                                        break;
@@ -437,7 +438,7 @@
                                                {
                                                        break;
                                                }
-                                               if ($grid_started)      // more 
than one grid in the file --> place it into the cache
+                                               if (isset($grid_started) && 
$grid_started)      // more than one grid in the file --> place it into the 
cache
                                                {
                                                        $cname = 
($etempl->template == '' ? 'default' : $etempl->template).'/'.$etempl->name.
                                                                 ($etempl->lang 
== '' ? '' : '.'.$etempl->lang);
@@ -463,8 +464,8 @@
                                                {
                                                        return 'place widgets 
in <row> and not in <column> !!!';
                                                }
-                                               
$etempl->data[0][$etempl->num2chrs($etempl->cols++)] = $attr['width'] .
-                                                       ($attr['disabled'] ? 
','.$attr['disabled'] : '');
+                                               
$etempl->data[0][$etempl->num2chrs($etempl->cols++)] = (isset($attr['width']) ? 
$attr['width'] : '') .
+                                                       
(isset($attr['disabled']) && $attr['disabled'] ? ','.$attr['disabled'] : '');
                                                break;
                                        case 'row':
                                                if ($type != 'open')
@@ -473,9 +474,9 @@
                                                }
                                                $r = ++$etempl->rows;
                                                $col = 0;
-                                               $etempl->data[0]["c$r"] = 
$attr['class'] . ($attr['valign'] ? ','.$attr['valign'] : '');
-                                               $etempl->data[0]["h$r"] = 
$attr['height'] .
-                                                       ($attr['disabled'] ? 
','.$attr['disabled'] : '');
+                                               $etempl->data[0]["c$r"] = 
$attr['class'] . (isset($attr['valign']) && $attr['valign'] ? 
','.$attr['valign'] : '');
+                                               $etempl->data[0]["h$r"] = 
isset($attr['height']) ? $attr['height'] : '' .
+                                                       
(isset($attr['disabled']) && $attr['disabled'] ? ','.$attr['disabled'] : '');
                                                break;
                                        case 'styles':
                                                $etempl->style = 
trim($node['value']);
@@ -592,7 +593,7 @@
                                                                }
                                                                break;
                                                }
-                                               $attr['help'] = 
$attr['statustext']; unset($attr['statustext']);
+                                               $attr['help'] = 
isset($attr['statustext']) ? $attr['statustext'] : ''; 
unset($attr['statustext']);
                                                $attr['span'] .= $attr['class'] 
? ','.$attr['class'] : ''; unset($attr['class']);
                                                if ($type == 'close')
                                                {




reply via email to

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