[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: phpgwapi/inc class.categories.inc.php,1.86,1.87
From: |
Bettina Gille <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: phpgwapi/inc class.categories.inc.php,1.86,1.87 |
Date: |
Tue, 03 Sep 2002 20:30:53 -0400 |
Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv3704
Modified Files:
class.categories.inc.php
Log Message:
update cats
Index: class.categories.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.categories.inc.php,v
retrieving revision 1.86
retrieving revision 1.87
diff -C2 -r1.86 -r1.87
*** class.categories.inc.php 3 Sep 2002 02:21:36 -0000 1.86
--- class.categories.inc.php 4 Sep 2002 00:30:50 -0000 1.87
***************
*** 5,10 ****
* and Bettina Gille address@hidden *
* Category manager
*
! * Copyright (C) 2000,2001,2002 Joseph Engo
*
! *
-------------------------------------------------------------------------*
* This library is part of the phpGroupWare API
*
* http://www.phpgroupware.org/api
*
--- 5,10 ----
* and Bettina Gille address@hidden *
* Category manager
*
! * Copyright (C) 2000 - 2002 Joseph Engo
*
! *
------------------------------------------------------------------------ *
* This library is part of the phpGroupWare API
*
* http://www.phpgroupware.org/api
*
***************
*** 71,78 ****
switch ($type)
{
! case 'subs': $s = " AND cat_parent !=
'0'"; break;
! case 'mains': $s = " AND cat_parent =
'0'"; break;
! case 'appandmains': $s = " AND cat_appname='" .
$this->app_name . "' AND cat_parent ='0'"; break;
! case 'appandsubs': $s = " AND cat_appname='" .
$this->app_name . "' AND cat_parent !='0'"; break;
default: return False;
}
--- 71,79 ----
switch ($type)
{
! case 'subs': $s = " AND cat_parent
!= '0'"; break;
! case 'mains': $s = " AND cat_parent =
'0'"; break;
! case 'appandmains': $s = " AND
cat_appname='" . $this->app_name . "' AND cat_parent ='0'"; break;
! case 'appandsubs': $s = " AND
cat_appname='" . $this->app_name . "' AND cat_parent !='0'"; break;
! case 'noapp': $s = " AND cat_appname
!= '" . $this->app_name . "'"; break;
default: return False;
}
***************
*** 537,542 ****
if ($cats[$i]['level'] == 1)
{
! $this->db->query('UPDATE
phpgw_categories set cat_level=0, cat_parent=0, cat_main=' . $cats[$i]['id']
!
. ' WHERE cat_id=' . $cats[$i]['id'],__LINE__,__FILE__);
$new_main = $cats[$i]['id'];
}
--- 538,543 ----
if ($cats[$i]['level'] == 1)
{
! $this->db->query("UPDATE
phpgw_categories set cat_level=0, cat_parent=0, cat_main='" .
intval($cats[$i]['id'])
!
. " WHERE cat_id='" . intval($cats[$i]['id']) . "' AND cat_appname='" .
$this->app_name . "'",__LINE__,__FILE__);
$new_main = $cats[$i]['id'];
}
***************
*** 553,558 ****
}
! $this->db->query('UPDATE
phpgw_categories set cat_level=' . ($cats[$i]['level']-1) . $update_main .
$update_parent
!
. ' WHERE cat_id=' . $cats[$i]['id'],__LINE__,__FILE__);
}
}
--- 554,559 ----
}
! $this->db->query("UPDATE
phpgw_categories set cat_level='" . ($cats[$i]['level']-1) . "'" . $update_main
. $update_parent
!
. " WHERE cat_id='" . intval($cats[$i]['id']) . "' AND cat_appname='" .
$this->app_name . "'",__LINE__,__FILE__);
}
}
***************
*** 663,666 ****
--- 664,677 ----
function exists($type,$cat_name = '',$cat_id = '')
{
+ if(is_array($type))
+ {
+ $temp_type = $type['type'];
+ $cat_name = $type['cat_name'] ?
$type['cat_name'] : '';
+ $cat_id = $type['cat_id'] ? $type['cat_id'] :
'';
+ settype($type,'string');
+ $type = $temp_type;
+ unset($temp_type);
+ }
+
$filter = $this->filter($type);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: phpgwapi/inc class.categories.inc.php,1.86,1.87,
Bettina Gille <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: admin/inc class.bocategories.inc.php,1.8,1.9 class.uicategories.inc.php,1.17,1.18
- Next by Date:
[Phpgroupware-cvs] CVS: phpgwapi/inc class.setup_process.inc.php,1.5,1.6
- Previous by thread:
[Phpgroupware-cvs] CVS: admin/inc class.bocategories.inc.php,1.8,1.9 class.uicategories.inc.php,1.17,1.18
- Next by thread:
[Phpgroupware-cvs] CVS: phpgwapi/inc class.setup_process.inc.php,1.5,1.6
- Index(es):