Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites
View Statistics - Next Notice - Previous NoticeDirectory filter : [ all ] / postnuke_official / html / modules / categories [ view in CVS ]
| Date | Directory [filter] | File(s) [view] | Author [filter] |
| 29 Jul 2002 09:07:14 | postnuke_official/html/modules/categories | pnadminapi.php,1.6,1.7 | Mike |
| re-fix category delete | |||
Update of /home/cvsroot/postnuke_official/html/modules/categories
In directory ns7.hostnuke.net:/tmp/cvs-serv7032
Modified Files:
pnadminapi.php
Log Message:
re-fix category delete
Index: pnadminapi.php
===================================================================
RCS file: /home/cvsroot/postnuke_official/html/modules/categories/pnadminapi.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** pnadminapi.php 28 Jul 2002 13:28:55 -0000 1.6
--- pnadminapi.php 29 Jul 2002 09:07:12 -0000 1.7
***************
*** 411,433 ****
$args);
! if ($categories == false) {
pnSessionSetVar('errormsg', _CATEGORIESDOESNOTEXIST);
return false;
}
- // This is set to be used later on
- $n=0;
- $cid_concat_or = '';
-
- foreach ($categories as $category) {
- if ($n > 0) {
- $cid_concat_or .= " OR ";
- }
-
- $cid_concat_or .= $category['cid'];
-
- $n++;
- }
-
// Useful Variables set...
--- 411,419 ----
$args);
! if ($categories == false || count($categories) == 0) {
pnSessionSetVar('errormsg', _CATEGORIESDOESNOTEXIST);
return false;
}
// Useful Variables set...
***************
*** 461,466 ****
$categorieslinkagecolumn = &$pntable['categories_linkage_column'];
$sql = "DELETE FROM $categorieslinkagetable
! WHERE $categorieslinkagecolumn[cid] = " . $cid_concat_or;
$dbconn->Execute($sql);
// What is the largest number of bytes a SQL query can have?
--- 447,459 ----
$categorieslinkagecolumn = &$pntable['categories_linkage_column'];
+ $catlist = array();
+ foreach ($categories as $mycat) {
+ $catlist[] = $mycat['cid'];
+ }
+ $cats_comma_separated = implode (',', $catlist);
+
$sql = "DELETE FROM $categorieslinkagetable
! WHERE $categorieslinkagecolumn[cid] IN (" . $cats_comma_separated . ")";
! error_log($sql);
$dbconn->Execute($sql);
// What is the largest number of bytes a SQL query can have?
View Statistics - Next Notice - Previous Notice
| Visit Developer Site - Browse CVS Repository |
Syndicate via backend.rss (max. once per hour please) | Powered by CVSNotice 0.1.3 |