[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: etemplate/inc class.link_widget.inc.php,1.5,1.6
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: etemplate/inc class.link_widget.inc.php,1.5,1.6 |
Date: |
Sat, 22 Feb 2003 07:29:09 -0500 |
Update of /cvsroot/phpgroupware/etemplate/inc
In directory subversions:/tmp/cvs-serv14903
Modified Files:
class.link_widget.inc.php
Log Message:
some docu updates and cleaned up some debug-code
Index: class.link_widget.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.link_widget.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.link_widget.inc.php 20 Oct 2002 15:02:20 -0000 1.5
--- class.link_widget.inc.php 22 Feb 2003 12:29:04 -0000 1.6
***************
*** 31,34 ****
--- 31,35 ----
'link-list' => 'LinkList'
);
+ var $debug = False;
function link_widget($ui)
***************
*** 46,50 ****
);
}
! //echo "<p>start: $cell[type]::pre_process: value =";
_debug_array($value);
switch ($type = $cell['type'])
{
--- 47,55 ----
);
}
! if ($this->debug)
! {
! echo "<p>start:
$cell[type][$name]::pre_process: value ="; _debug_array($value);
! echo "extension_data[$cell[type]][$name] =";
_debug_array($extension_data);
! }
switch ($type = $cell['type'])
{
***************
*** 83,89 ****
case 'link-list':
$app = $value['to_app'];
! $id = $value['to_id'];
! //echo "<p>link-list-widget.preprocess:
value="; _debug_array($value);
!
if (!isset($value['title']))
{
--- 88,96 ----
case 'link-list':
$app = $value['to_app'];
! $id = isset($extension_data['to_id']) ?
$extension_data['to_id'] : $value['to_id'];
! if ($this->debug)
! {
! echo
"<p>link-list-widget[$name].preprocess: value="; _debug_array($value);
! }
if (!isset($value['title']))
{
***************
*** 115,119 ****
$cell['obj'] = &$tpl;
! //echo "<p>end: $type::pre_process: value =";
_debug_array($value);
return True; // extra Label is ok
}
--- 122,129 ----
$cell['obj'] = &$tpl;
! if ($this->debug)
! {
! echo "<p>end: $type"."[$name]::pre_process:
value ="; _debug_array($value);
! }
return True; // extra Label is ok
}
***************
*** 122,128 ****
{
$buttons =
array('search','create','new','upload','attach');
! while (!$button && list(,$name) = each($buttons))
{
! $button = $value[$name] ? $name : '';
}
if (is_array($value['unlink']))
--- 132,138 ----
{
$buttons =
array('search','create','new','upload','attach');
! while (!$button && list(,$bname) = each($buttons))
{
! $button = $value[$bname] ? $bname : '';
}
if (is_array($value['unlink']))
***************
*** 134,141 ****
$value = array_merge($extension_data,$value);
!
if ($button && $this->debug)
{
! echo "<p>start: link_widget::post_process:
button='$button', unlink='$unlink', value ="; _debug_array($value);
}
switch ($button)
--- 144,151 ----
$value = array_merge($extension_data,$value);
!
if ($button && $this->debug)
{
! echo "<p>start:
link_widget[$name]::post_process: button='$button', unlink='$unlink', value =";
_debug_array($value);
}
switch ($button)
***************
*** 146,150 ****
$link_id =
$this->link->link($value['to_app'],$value['to_id'],
$value['app'],$value['id'],$value['remark']);
!
if (isset($value['primary']) &&
!$value['anz_links'] )
{
--- 156,160 ----
$link_id =
$this->link->link($value['to_app'],$value['to_id'],
$value['app'],$value['id'],$value['remark']);
!
if (isset($value['primary']) &&
!$value['anz_links'] )
{
***************
*** 163,169 ****
{
$link_id =
$this->link->link($value['to_app'],$value['to_id'],
!
'vfs',$value['file'],$value['remark']);
unlink($value['file']['tmp_name']);
! unset($value['file']);
}
$extension_data = $value;
--- 173,179 ----
{
$link_id =
$this->link->link($value['to_app'],$value['to_id'],
!
$this->link->vfs_appname,$value['file'],$value['remark']);
unlink($value['file']['tmp_name']);
! unset($value['file']);
}
$extension_data = $value;
***************
*** 172,176 ****
case 'upload': // need to rename file,
as php deletes it otherwise
! if (is_array($value['file']) &&
!empty($value['file']['tmp_name']) &&
$value['file']['tmp_name'] !=
'none')
{
--- 182,186 ----
case 'upload': // need to rename file,
as php deletes it otherwise
! if (is_array($value['file']) &&
!empty($value['file']['tmp_name']) &&
$value['file']['tmp_name'] !=
'none')
{
***************
*** 188,198 ****
case 'unlink':
$this->link->unlink($unlink,$value['to_app'],&$value['to_id']);
! //echo
"<p>unlink(link-id=$unlink,$value[to_app],$value[to_id])</p>\n";
$loop = True;
break;
}
$value['button'] = $button;
! //echo "<p>end: link_widget::post_process: value =";
_debug_array($value);
return True;
}
--- 198,219 ----
case 'unlink':
+ if ($this->debug)
+ {
+ echo
"<p>unlink(link-id=$unlink,$value[to_app],$value[to_id])</p>\n";
+ if (is_array($value['to_id']))
_debug_array($value['to_id']);
+ }
$this->link->unlink($unlink,$value['to_app'],&$value['to_id']);
! if (is_array($value['to_id']))
! {
! $extension_data['to_id'] =
$value['to_id']; // else changes from unlink get lost
! }
$loop = True;
break;
}
$value['button'] = $button;
! if ($this->debug)
! {
! echo "<p>end: link_widget[$name]::post_process:
value ="; _debug_array($value);
! }
return True;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: etemplate/inc class.link_widget.inc.php,1.5,1.6,
Ralf Becker <address@hidden> <=