phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] etemplate/inc class.editor.inc.php class.nextma...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] etemplate/inc class.editor.inc.php class.nextma...
Date: Tue, 13 Feb 2007 15:30:46 +0000

CVSROOT:        /sources/phpgroupware
Module name:    etemplate
Changes by:     Sigurd Nes <sigurdne>   07/02/13 15:30:45

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

Log message:
        notices

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/etemplate/inc/class.editor.inc.php?cvsroot=phpgroupware&r1=1.43&r2=1.44
http://cvs.savannah.gnu.org/viewcvs/etemplate/inc/class.nextmatch_widget.inc.php?cvsroot=phpgroupware&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/etemplate/inc/class.xul_io.inc.php?cvsroot=phpgroupware&r1=1.28&r2=1.29

Patches:
Index: class.editor.inc.php
===================================================================
RCS file: /sources/phpgroupware/etemplate/inc/class.editor.inc.php,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- class.editor.inc.php        13 Feb 2007 12:59:32 -0000      1.43
+++ class.editor.inc.php        13 Feb 2007 15:30:45 -0000      1.44
@@ -5,7 +5,7 @@
 * @author Ralf Becker <address@hidden>
 * @license http://www.gnu.org/licenses/gpl.html GNU General Public License
 * @package etemplate
-* @version $Id: class.editor.inc.php,v 1.43 2007/02/13 12:59:32 sigurdne Exp $
+* @version $Id: class.editor.inc.php,v 1.44 2007/02/13 15:30:45 sigurdne Exp $
 */
 
                  
@@ -75,12 +75,12 @@
                                $GLOBALS['phpgw']->translation->add_app($app);  
// load translations for app
                        }
                        if ($app && $app != 'etemplate' && 
is_array($this->extensions) &&
-                               (!is_array($this->extensions['**loaded**']) || 
(!isset($this->extensions['**loaded**'][$app]) || 
!$this->extensions['**loaded**'][$app])))
+                               (!isset($this->extensions['**loaded**']) || 
!is_array($this->extensions['**loaded**']) || 
(!isset($this->extensions['**loaded**'][$app]) || 
!$this->extensions['**loaded**'][$app])))
                        {
                                $extensions = $this->scan_for_extensions($app);
                                if (count($extensions))
                                {
-                                       $msg .= 
(!$msg_ext_loaded?lang('Extensions loaded:').' ':', ') . implode(', 
',$extensions);
+                                       $msg .= (!isset($msg_ext_loaded) || 
!$msg_ext_loaded?lang('Extensions loaded:').' ':', ') . implode(', 
',$extensions);
                                        $this->extensions += $extensions;
                                }
                                $this->extensions['**loaded**'][$app] = True;
@@ -122,11 +122,14 @@
                                        }
                                        if (--$spanned > 0)     // preserv 
spanned cells
                                        {
+                                               if(isset($cell) && 
is_array($cell))
+                                               {
                                                while(list($k,$v) = 
each($cell))                // so spanned (not shown) cells got
                                                {                               
    // reported back like regular one
                                                        
$cols_spanned[$col.$row][$k] = $v;
                                                }
                                        }
+                                       }
                                        else
                                        {
                                                if(isset($cell['span']))
@@ -545,7 +548,7 @@
                        $xul = fread ($f, filesize ($file));
                        fclose($f);
 
-                       if (!is_object($this->etemplate->xul_io))
+                       if (!isset($this->etemplate->xul_io) || 
!is_object($this->etemplate->xul_io))
                        {
                                $this->etemplate->xul_io = 
CreateObject('etemplate.xul_io');
                        }

Index: class.nextmatch_widget.inc.php
===================================================================
RCS file: /sources/phpgroupware/etemplate/inc/class.nextmatch_widget.inc.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- class.nextmatch_widget.inc.php      13 Feb 2007 12:59:32 -0000      1.18
+++ class.nextmatch_widget.inc.php      13 Feb 2007 15:30:45 -0000      1.19
@@ -5,7 +5,7 @@
 * @author Ralf Becker <address@hidden>
 * @license http://www.gnu.org/licenses/gpl.html GNU General Public License
 * @package etemplate
-* @version $Id: class.nextmatch_widget.inc.php,v 1.18 2007/02/13 12:59:32 
sigurdne Exp $
+* @version $Id: class.nextmatch_widget.inc.php,v 1.19 2007/02/13 15:30:45 
sigurdne Exp $
 */
 
        /**
@@ -84,15 +84,15 @@
                        {
                                $nextmatch = new 
etemplate('etemplate.nextmatch_widget');
 
-                               if ($value['no_cat'])
+                               if (isset($value['no_cat']) && $value['no_cat'])
                                {
                                        $nextmatch->disable_cells('cat_id');
                                }
-                               if ($value['no_filter'])
+                               if (isset($value['no_filter']) && 
$value['no_filter'])
                                {
                                        $nextmatch->disable_cells('filter');
                                }
-                               if ($value['no_filter2'])
+                               if (isset($value['no_filter2']) && 
$value['no_filter2'])
                                {
                                        $nextmatch->disable_cells('filter2');
                                }

Index: class.xul_io.inc.php
===================================================================
RCS file: /sources/phpgroupware/etemplate/inc/class.xul_io.inc.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- class.xul_io.inc.php        13 Feb 2007 12:59:32 -0000      1.28
+++ class.xul_io.inc.php        13 Feb 2007 15:30:45 -0000      1.29
@@ -5,7 +5,7 @@
 * @author Ralf Becker <address@hidden>
 * @license http://www.gnu.org/licenses/gpl.html GNU General Public License
 * @package etemplate
-* @version $Id: class.xul_io.inc.php,v 1.28 2007/02/13 12:59:32 sigurdne Exp $
+* @version $Id: class.xul_io.inc.php,v 1.29 2007/02/13 15:30:45 sigurdne Exp $
 */
 
        if (!function_exists('var2xml'))
@@ -392,6 +392,7 @@
                                $type = $node['type'];
                                $tag = $node['tag'];
                                $attr = isset($node['attributes']) && 
is_array($node['attributes']) ? $node['attributes'] : array();
+                               $attr['span'] = isset($attr['span']) ? 
$attr['span'] : ''; //Fix this
                                if (isset($attr['id']) && $attr['id'])
                                {
                                        $attr['name'] = $attr['id']; 
unset($attr['id']);
@@ -400,7 +401,7 @@
                                {
                                        $attr['size'] = $attr['options']; 
unset($attr['options']);
                                }
-                               if ($tag == 'grid' && $type == 'complete' && 
!is_array($tab_attr))
+                               if ($tag == 'grid' && $type == 'complete' && 
(!isset($tab_attr) || !is_array($tab_attr)))
                                {
                                        $tag = 'template';
                                }
@@ -442,7 +443,7 @@
                                                $size_opts = 
array('padding','spacing','class','border','height','width');
                                                for ($size = ''; list(,$opt) = 
each($size_opts); )
                                                {
-                                                       $size = $attr[$opt] . 
($size != '' ? ",$size" : '');
+                                                       $size = 
(isset($attr[$opt]) ? $attr[$opt] : '') . ($size != '' ? ",$size" : '');
                                                }
                                                $etempl->size = $size;
                                                $etempl->cols = $etempl->rows = 
0;
@@ -466,7 +467,7 @@
                                                }
                                                $r = ++$etempl->rows;
                                                $col = 0;
-                                               $etempl->data[0]["c$r"] = 
$attr['class'] . (isset($attr['valign']) && $attr['valign'] ? 
','.$attr['valign'] : '');
+                                               $etempl->data[0]["c$r"] = 
(isset($attr['class']) ? $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;
@@ -505,7 +506,8 @@
                                        case 'menupopup':
                                                if (is_array($menulist_attr))
                                                {
-                                                       $attr['help'] = 
$attr['statustext']; unset($attr['statustext']);
+                                                       $attr['help'] = 
isset($attr['statustext']) ? $attr['statustext'] : '';
+                                                       
unset($attr['statustext']);
                                                        
unset($menulist_attr['type']);
                                                        $menulist_attr += $attr;
                                                }
@@ -530,7 +532,7 @@
                                                else
                                                {
                                                        $cell = 
&$box[$node['level']];
-                                                       $cell['size'] = 
$cell['anz'] . ($cell['size'] != '' ? ','.$cell['size'] : '');
+                                                       $cell['size'] = 
$cell['anz'] . (isset($cell['size']) && $cell['size'] != '' ? ','.$cell['size'] 
: '');
                                                        unset($cell['anz']);
                                                        
$this->add_cell($etempl,$cell,&$box,&$col,$node['level']);
                                                        
unset($box[$node['level']]);
@@ -562,7 +564,7 @@
                                                {
                                                        case 'description':
                                                        case 'label':
-                                                               $attr['label'] 
= $attr['value'];
+                                                               $attr['label'] 
= isset($attr['value']) ? $attr['value'] : '';
                                                                
unset($attr['value']);
                                                                break;
                                                        case 'template':
@@ -578,15 +580,15 @@
                                                                
unset($attr['rows']);
                                                                break;
                                                        case 'button':
-                                                               if 
($attr['image'] || $attr['ro_image'])
+                                                               if 
((isset($attr['image']) && $attr['image']) || (isset($attr['ro_image']) && 
$attr['ro_image']))
                                                                {
-                                                                       
$attr['size'] = $attr['image'] . ($attr['ro_image'] ? ','.$attr['ro_image'] : 
'');
+                                                                       
$attr['size'] = $attr['image'] . (isset($attr['ro_image']) && $attr['ro_image'] 
? ','.$attr['ro_image'] : '');
                                                                        
unset($attr['image']); unset($attr['ro_image']);
                                                                }
                                                                break;
                                                }
                                                $attr['help'] = 
isset($attr['statustext']) ? $attr['statustext'] : ''; 
unset($attr['statustext']);
-                                               $attr['span'] .= $attr['class'] 
? ','.$attr['class'] : ''; unset($attr['class']);
+                                               $attr['span'] .= 
isset($attr['class']) && $attr['class'] ? ','.$attr['class'] : ''; 
unset($attr['class']);
                                                if ($type == 'close')
                                                {
                                                        break;




reply via email to

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