[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] etemplate/inc class.boetemplate.inc.php class.n...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] etemplate/inc class.boetemplate.inc.php class.n... |
Date: |
Thu, 08 Feb 2007 14:07:51 +0000 |
CVSROOT: /sources/phpgroupware
Module name: etemplate
Changes by: Sigurd Nes <sigurdne> 07/02/08 14:07:50
Modified files:
inc : class.boetemplate.inc.php
class.nextmatch_widget.inc.php
class.select_widget.inc.php
class.soetemplate.inc.php
class.uietemplate.inc.php
Log message:
notice
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/etemplate/inc/class.boetemplate.inc.php?cvsroot=phpgroupware&r1=1.39&r2=1.40
http://cvs.savannah.gnu.org/viewcvs/etemplate/inc/class.nextmatch_widget.inc.php?cvsroot=phpgroupware&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/etemplate/inc/class.select_widget.inc.php?cvsroot=phpgroupware&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/etemplate/inc/class.soetemplate.inc.php?cvsroot=phpgroupware&r1=1.32&r2=1.33
http://cvs.savannah.gnu.org/viewcvs/etemplate/inc/class.uietemplate.inc.php?cvsroot=phpgroupware&r1=1.73&r2=1.74
Patches:
Index: class.boetemplate.inc.php
===================================================================
RCS file: /sources/phpgroupware/etemplate/inc/class.boetemplate.inc.php,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- class.boetemplate.inc.php 30 Sep 2006 07:10:52 -0000 1.39
+++ class.boetemplate.inc.php 8 Feb 2007 14:07:50 -0000 1.40
@@ -5,7 +5,7 @@
* @author Ralf Becker <address@hidden>
* @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public
License
* @package etemplate
-* @version $Id: class.boetemplate.inc.php,v 1.39 2006/09/30 07:10:52 skwashd
Exp $
+* @version $Id: class.boetemplate.inc.php,v 1.40 2007/02/08 14:07:50 sigurdne
Exp $
*/
include_once(PHPGW_INCLUDE_ROOT .
'/etemplate/inc/class.soetemplate.inc.php');
@@ -152,7 +152,7 @@
function
autorepeat_idx($cell,$c,$r,&$idx,&$idx_cname,$check_col=False)
{
$org_idx = $idx = '';
- if($cell['type'] == 'template')
+ if(isset($cell['type']) && $cell['type'] == 'template')
{
if(isset($cell['size']))
{
@@ -372,12 +372,12 @@
{
foreach($cols as $col => $cell)
{
- if ($cell['name'] == $name)
+ if (isset($cell['name']) &&
$cell['name'] == $name)
{
$this->data[$row][$col][$attr]
= $val;
++$n;
}
- if ($cell['type'] == 'template' &&
(is_object($cell['obj']) || $cell['name'][0] != '@'))
+ if ($cell['type'] == 'template' &&
isset($cell['obj']) && (is_object($cell['obj']) || $cell['name'][0] != '@'))
{
if (!is_object($cell['obj']))
{
@@ -471,12 +471,12 @@
*/
function loadExtension($type)
{
- list($class,$app) = explode('.',$type);
+ @list($class,$app) = explode('.',$type);
$class .= '_widget';
if ($app == '')
{
- $app =
$GLOBALS['phpgw_info']['flags']['current_app'];
+ $app =
isset($GLOBALS['phpgw_info']['flags']['current_app']) ?
$GLOBALS['phpgw_info']['flags']['current_app'] : '';
}
if
(!file_exists(PHPGW_SERVER_ROOT."/$app/inc/class.$class.inc.php"))
{
@@ -502,8 +502,8 @@
*/
function haveExtension($type,$function='')
{
- return (
(isset($GLOBALS['phpgw_info']['etemplate']['extension'][$type]) &&
$GLOBALS['phpgw_info']['etemplate']['extension'][$type]) ||
$this->loadExtension($type,$ui)) &&
- ($function == '' ||
$GLOBALS['phpgw_info']['etemplate']['extension'][$type]->public_functions[$function]);
+ return (
(isset($GLOBALS['phpgw_info']['etemplate']['extension'][$type]) &&
$GLOBALS['phpgw_info']['etemplate']['extension'][$type]) ||
$this->loadExtension($type)) &&
+ ($function == '' ||
(isset($GLOBALS['phpgw_info']['etemplate']['extension'][$type]->public_functions[$function])
&&
$GLOBALS['phpgw_info']['etemplate']['extension'][$type]->public_functions[$function]));
}
/*
Index: class.nextmatch_widget.inc.php
===================================================================
RCS file: /sources/phpgroupware/etemplate/inc/class.nextmatch_widget.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- class.nextmatch_widget.inc.php 6 Sep 2006 11:13:30 -0000 1.15
+++ class.nextmatch_widget.inc.php 8 Feb 2007 14:07:50 -0000 1.16
@@ -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.15 2006/09/06 11:13:30
skwashd Exp $
+* @version $Id: class.nextmatch_widget.inc.php,v 1.16 2007/02/08 14:07:50
sigurdne Exp $
*/
/**
@@ -61,8 +61,8 @@
}
$max =
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
if ($total <= $max && $options && $value['search'] ==
'' &&
- ($value['no_cat'] || !$value['cat_id']) &&
- ($value['no_filter'] || !$value['filter'] ||
$value['filter'] == 'none') &&
+ ((isset($value['no_cat']) && $value['no_cat'])
|| !$value['cat_id']) &&
+ ((isset($value['no_filter']) &&
$value['no_filter']) || !$value['filter'] || $value['filter'] == 'none') &&
($value['no_filter2'] || !$value['filter2'] ||
$value['filter2'] == 'none'))
{
// disable whole nextmatch line if no scrolling
necessary
if ($value['header_left'] ||
$value['header_right'])
@@ -83,15 +83,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.select_widget.inc.php
===================================================================
RCS file: /sources/phpgroupware/etemplate/inc/class.select_widget.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- class.select_widget.inc.php 6 Sep 2006 11:13:30 -0000 1.9
+++ class.select_widget.inc.php 8 Feb 2007 14:07:50 -0000 1.10
@@ -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.select_widget.inc.php,v 1.9 2006/09/06 11:13:30 skwashd
Exp $
+* @version $Id: class.select_widget.inc.php,v 1.10 2007/02/08 14:07:50
sigurdne Exp $
*/
/**
@@ -372,7 +372,7 @@
function
pre_process($name,&$value,&$cell,&$readonlys,&$extension_data,&$tmpl)
{
- list($rows,$type,$type2,$type3) =
explode(',',$cell['size']);
+ @list($rows,$type,$type2,$type3) =
explode(',',$cell['size']);
switch ($cell['type'])
{
Index: class.soetemplate.inc.php
===================================================================
RCS file: /sources/phpgroupware/etemplate/inc/class.soetemplate.inc.php,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- class.soetemplate.inc.php 30 Sep 2006 07:10:52 -0000 1.32
+++ class.soetemplate.inc.php 8 Feb 2007 14:07:50 -0000 1.33
@@ -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.soetemplate.inc.php,v 1.32 2006/09/30 07:10:52 skwashd
Exp $
+* @version $Id: class.soetemplate.inc.php,v 1.33 2007/02/08 14:07:50 sigurdne
Exp $
*/
/**
@@ -884,7 +884,7 @@
{
list($app) = explode('.',$app);
- if (!$app ||
(isset($GLOBALS['phpgw_info']['etemplate']['import_tested']) &&
$GLOBALS['phpgw_info']['etemplate']['import_tested'][$app]) )
+ if (!$app ||
(isset($GLOBALS['phpgw_info']['etemplate']['import_tested']) &&
isset($GLOBALS['phpgw_info']['etemplate']['import_tested'][$app]) &&
$GLOBALS['phpgw_info']['etemplate']['import_tested'][$app]) )
{
return ''; // ensure test is done only
once per call and app
}
Index: class.uietemplate.inc.php
===================================================================
RCS file: /sources/phpgroupware/etemplate/inc/class.uietemplate.inc.php,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -b -r1.73 -r1.74
--- class.uietemplate.inc.php 8 Feb 2007 09:55:41 -0000 1.73
+++ class.uietemplate.inc.php 8 Feb 2007 14:07:50 -0000 1.74
@@ -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.uietemplate.inc.php,v 1.73 2007/02/08 09:55:41 sigurdne
Exp $
+* @version $Id: class.uietemplate.inc.php,v 1.74 2007/02/08 14:07:50 sigurdne
Exp $
*/
include_once(PHPGW_INCLUDE_ROOT .
'/etemplate/inc/class.boetemplate.inc.php');
@@ -161,7 +161,7 @@
'java_script' =>
isset($GLOBALS['phpgw_info']['etemplate']['java_script']) ?
$GLOBALS['phpgw_info']['etemplate']['java_script'] : '',
'dom_enabled' =>
isset($GLOBALS['phpgw_info']['etemplate']['dom_enabled']) ?
$GLOBALS['phpgw_info']['etemplate']['dom_enabled'] : '',
'method' => $method,
- 'hooked' => $hooked != '' ? $hooked :
$GLOBALS['phpgw_info']['etemplate']['hook_content']
+ 'hooked' => $hooked != '' ? $hooked :
isset($GLOBALS['phpgw_info']['etemplate']['hook_content']) ?
$GLOBALS['phpgw_info']['etemplate']['hook_content'] : ''
),$id);
if ($return_html)
@@ -261,7 +261,7 @@
{
$disabled = substr($disabled,1);
}
- list($val,$check_val) = $vals = explode('=',$disabled);
+ @list($val,$check_val) = $vals = explode('=',$disabled);
if ($val[0] == '@')
{
@@ -332,7 +332,7 @@
if (!(list($r_key) = each($this->data)))
// no further row
{
if
(!($this->autorepeat_idx($cols['A'],0,$r,$idx,$idx_cname) && $idx_cname) &&
-
!($this->autorepeat_idx($cols['B'],1,$r,$idx,$idx_cname) && $idx_cname) ||
+
!($this->autorepeat_idx(isset($cols['B']) ? $cols['B'] :
'',1,$r,$idx,$idx_cname) && $idx_cname) ||
!$this->isset_array($content,$idx))
{
break;
// no auto-row-repeat
@@ -481,7 +481,7 @@
$width = $tmp[0];
if ( count($tmp) == 2 )
{
- $disable =
$tmp[2];
+ $disable =
$tmp[1];
}
unset($tmp);
@@ -553,17 +553,18 @@
$span = '';
}
- $name = '';
+ $name = isset($cell['name']) ? $cell['name'] : '';
+ $name_parts = array();
if(isset($cell['name']))
{
- if ($cell['name'][0] == '@' && $cell['type'] !=
'template')
+ if (isset($cell['name'][0]) && $cell['name'][0]
== '@' && $cell['type'] != 'template')
{
$cell['name'] =
$this->get_array($content,substr($cell['name'],1));
}
- $name =
$this->expand_name($cell['name'],$show_c,$show_row,$content['.c'],$content['.row'],$content);
+ // $name =
$this->expand_name($cell['name'],$show_c,$show_row,$content['.c'],$content['.row'],$content);
+ $name_parts =
explode('[',str_replace(']','',$cell['name']));
}
- $name_parts = explode('[',str_replace(']','',$name));
if (!empty($cname))
{
array_unshift($name_parts,$cname);
@@ -577,6 +578,7 @@
if ( ( isset($cell['readonly']) && $readonly =
$cell['readonly'])
|| (isset($readonlys[$name]) &&
$readonlys[$name] && !is_array($readonlys[$name]))
+ // || (isset($readonlys[$cell['name']]) &&
$readonlys[$cell['name']] && !is_array($readonlys[$cell['name']]))
|| isset($readonlys['__ALL__']) )
{
$options .= ' readonly';
@@ -600,7 +602,7 @@
{
$sub_type = $cell_type[1];
}
- if ((!$this->types[$cell['type']] || !empty($sub_type))
&& $this->haveExtension($type,'pre_process'))
+ if (((!isset($this->types[$cell['type']]) ||
!$this->types[$cell['type']]) || !empty($sub_type)) &&
$this->haveExtension($type,'pre_process'))
{
$ext_type = $type;
$extra_label =
$this->extensionPreProcess($ext_type,$form_name,$value,$cell,$readonlys[$name]);
@@ -691,7 +693,7 @@
}
$html = '';
- switch ($type)
+ switch ($cell['type'])
{
case 'label': // size:
[[b]old][[i]talic][,link]
if (is_array($value))
@@ -821,7 +823,7 @@
if (!empty($img))
{
- $options .= '
title="'.(strlen($label)<=1||$cell['no_lang']?$label:lang($label)).'"';
+ $options .= '
title="'.(strlen($label)<=1||isset($cell['no_lang']) &&
$cell['no_lang']?$label:lang($label)).'"';
}
$html .= ( !isset($readonly) ||
!$readonly )
?
$this->html->submit_button($form_name,$label, isset($cell['onchange']) ?
$cell['onchange'] : '', strlen($label) <= 1 || isset($cell['no_lang'])
,$options, $img, $app)
@@ -949,7 +951,8 @@
else
{
$html .=
$this->html->select($form_name.($multiple > 1 ? '[]' : ''),$value,$sels,
-
$cell['no_lang'],$options,$multiple);
+ isset($cell['no_lang'])
? $cell['no_lang'] : '',
+ $options,$multiple);
$GLOBALS['phpgw_info']['etemplate']['to_process'][$form_name] = $cell['type'];
}
break;
@@ -1257,6 +1260,7 @@
*/
function include_java_script($what = 3)
{
+ $js = '';
// this is to test if javascript is enabled
if ($what & 1 &&
!isset($GLOBALS['phpgw_info']['etemplate']['java_script']))
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] etemplate/inc class.boetemplate.inc.php class.n...,
Sigurd Nes <=