From: <sy...@us...> - 2006-03-13 13:48:24
|
Update of /cvsroot/tikiwiki/tiki/lib/contribution In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31090/lib/contribution Modified Files: contributionlib.php Log Message: mysql 3 compliance Index: contributionlib.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/lib/contribution/contributionlib.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- contributionlib.php 10 Mar 2006 16:06:27 -0000 1.4 +++ contributionlib.php 13 Mar 2006 13:48:20 -0000 1.5 @@ -80,8 +80,11 @@ } } function remove_assigned_contributions($itemId, $objectType) { - $query = 'delete tca from `tiki_contributions_assigned` tca left join `tiki_objects`tob on tob.`objectId`=tca.`objectId` where tob.`itemId`= ? and tob.`type`= ?'; - $this->query($query, array($itemId, $objectType)); + // works only if mysql> 4 $query = 'delete tca from `tiki_contributions_assigned` tca left join `tiki_objects`tob on tob.`objectId`=tca.`objectId` where tob.`itemId`= ? and tob.`type`= ?'; + global $objectlib; include_once('lib/objectlib.php'); + $objectId = $objectlib->get_object_id($objectType, $itemId); + $query = 'delete from `tiki_contributions_assigned` where `objectId`= ?'; + $this->query($query, array($objectId)); } function remove_page($page) { global $objectlib; include_once('lib/objectlib.php'); |