Roland Mas, 2008-09-03 21:11:52 +0200 : > Would it be okay for me to upload a -3 package? And should I > first wait for -2 to migrate to testing (2 days old for now)? > Here's the full diff:
Blah. I found more instances of this implicit cast. Updated patch follows, rest of request unchanged :-)
=== modified file 'gforge/ChangeLog' --- gforge/ChangeLog 2008-07-20 16:41:30 +0000 +++ gforge/ChangeLog 2008-09-03 19:29:51 +0000 @@ -1,3 +1,19 @@ +2008-09-03 Roland Mas <[EMAIL PROTECTED]> + + + * common/tracker/ArtifactType.class.php: Fixed PostgreSQL 8.3 + compatibility by explicitly converting role_setting.value to an + integer. + * common/tracker/ArtifactTypeFactory.class.php: Ditto. + * common/pm/ProjectGroup.class.php: Ditto. + * common/pm/ProjectGroupFactory.class.php: Ditto. + * common/forum/Forum.class.php: Ditto. + * common/forum/ForumFactory.class.php: Ditto. + * plugins/webcalendar/www/index2.php: Ditto. + * www/pm/msproject/msp.php: Ditto. + * www/tracker/admin/form-extrafieldcopy.php: Ditto. + * www/tracker/mod.php: Ditto. + 2008-07-20 Roland Mas <[EMAIL PROTECTED]> * common/reporting/report_utils.php: Search user by the initial === modified file 'gforge/common/forum/Forum.class.php' --- gforge/common/forum/Forum.class.php 2008-05-27 20:56:57 +0000 +++ gforge/common/forum/Forum.class.php 2008-09-03 19:22:52 +0000 @@ -421,7 +421,7 @@ FROM user_group, role_setting WHERE role_setting.section_name='forum' AND role_setting.ref_id='".$this->getID()."' - AND role_setting.value > 1 + AND role_setting.value::integer > 1 AND user_group.role_id = role_setting.role_id"; $result = db_query($sql); return util_result_column_to_array($result); @@ -771,7 +771,7 @@ return -1; } else { if (!isset($this->current_user_perm)) { - $sql="SELECT role_setting.value + $sql="SELECT role_setting.value::integer FROM role_setting, user_group WHERE role_setting.ref_id='". $this->getID() ."' AND user_group.role_id = role_setting.role_id === modified file 'gforge/common/forum/ForumFactory.class.php' --- gforge/common/forum/ForumFactory.class.php 2008-05-27 20:56:57 +0000 +++ gforge/common/forum/ForumFactory.class.php 2008-09-03 18:48:12 +0000 @@ -106,7 +106,7 @@ } else { $exists=" AND group_forum_id IN (SELECT role_setting.ref_id FROM role_setting, user_group - WHERE role_setting.value >= 0 + WHERE role_setting.value::integer >= 0 AND role_setting.section_name = 'forum' AND role_setting.ref_id=forum_group_list_vw.group_forum_id === modified file 'gforge/common/pm/ProjectGroup.class.php' --- gforge/common/pm/ProjectGroup.class.php 2008-05-27 20:56:57 +0000 +++ gforge/common/pm/ProjectGroup.class.php 2008-09-03 19:22:32 +0000 @@ -323,7 +323,7 @@ WHERE users.user_id=user_group.user_id AND role_setting.role_id=user_group.role_id AND role_setting.ref_id='". $this->getID() ."' - AND role_setting.value IN (1,2) + AND role_setting.value::integer IN (1,2) AND role_setting.section_name='pm' ORDER BY users.realname"; $this->technicians=db_query($sql); @@ -602,7 +602,7 @@ return -1; } else { if (!isset($this->current_user_perm)) { - $sql="SELECT role_setting.value + $sql="SELECT role_setting.value::integer FROM role_setting, user_group WHERE role_setting.ref_id='". $this->getID() ."' AND user_group.role_id = role_setting.role_id === modified file 'gforge/common/pm/ProjectGroupFactory.class.php' --- gforge/common/pm/ProjectGroupFactory.class.php 2008-05-27 20:56:57 +0000 +++ gforge/common/pm/ProjectGroupFactory.class.php 2008-09-03 18:46:33 +0000 @@ -102,7 +102,7 @@ } else { $exists=" AND group_project_id IN (SELECT role_setting.ref_id FROM role_setting, user_group - WHERE role_setting.value >= 0 + WHERE role_setting.value::integer >= 0 AND role_setting.section_name = 'pm' AND role_setting.ref_id=project_group_list_vw.group_project_id === modified file 'gforge/common/tracker/ArtifactType.class.php' --- gforge/common/tracker/ArtifactType.class.php 2008-05-27 20:56:57 +0000 +++ gforge/common/tracker/ArtifactType.class.php 2008-09-03 18:47:06 +0000 @@ -1015,7 +1015,7 @@ return 0; } else { if (!isset($this->current_user_perm)) { - $sql="SELECT role_setting.value + $sql="SELECT role_setting.value::integer FROM role_setting, user_group WHERE role_setting.ref_id='". $this->getID() ."' AND user_group.role_id = role_setting.role_id === modified file 'gforge/common/tracker/ArtifactTypeFactory.class.php' --- gforge/common/tracker/ArtifactTypeFactory.class.php 2008-05-31 14:03:38 +0000 +++ gforge/common/tracker/ArtifactTypeFactory.class.php 2008-09-03 18:43:18 +0000 @@ -101,7 +101,7 @@ } else { $exists=" AND group_artifact_id IN (SELECT role_setting.ref_id FROM role_setting, user_group - WHERE role_setting.value >= 0 + WHERE role_setting.value::integer >= 0 AND role_setting.section_name = 'tracker' AND role_setting.ref_id=artifact_group_list_vw.group_artifact_id === modified file 'gforge/debian/changelog' --- gforge/debian/changelog 2008-08-31 18:50:02 +0000 +++ gforge/debian/changelog 2008-09-03 19:29:57 +0000 @@ -1,3 +1,10 @@ +gforge (4.7~rc2-3) unstable; urgency=low + + * Added explicit cast to fix PostgreSQL 8.3 compatibility (closes: + #497512). + + -- Roland Mas <[EMAIL PROTECTED]> Wed, 03 Sep 2008 21:29:57 +0200 + gforge (4.7~rc2-2) unstable; urgency=low * Fixed chroot setup on amd64 (closes: #495728). === modified file 'gforge/plugins/webcalendar/www/index2.php' --- gforge/plugins/webcalendar/www/index2.php 2008-05-27 20:56:57 +0000 +++ gforge/plugins/webcalendar/www/index2.php 2008-09-03 19:23:38 +0000 @@ -30,7 +30,7 @@ function user_belongs_to_group($user_id,$group_id){ global $HTML; -$sql = "SELECT value,admin_flags FROM user_group,role_setting WHERE role_setting.role_id = user_group.role_id AND user_group.user_id = '".$user_id."' AND user_group.group_id = '".$group_id."' AND role_setting.section_name = 'webcal'"; +$sql = "SELECT value::integer,admin_flags FROM user_group,role_setting WHERE role_setting.role_id = user_group.role_id AND user_group.user_id = '".$user_id."' AND user_group.group_id = '".$group_id."' AND role_setting.section_name = 'webcal'"; //$sql = "SELECT COUNT(*) FROM user_group WHERE user_id = '".$user_id."' AND group_id = '".$group_id."'"; $res = db_query($sql); === modified file 'gforge/www/pm/msproject/msp.php' --- gforge/www/pm/msproject/msp.php 2008-05-27 20:56:57 +0000 +++ gforge/www/pm/msproject/msp.php 2008-09-03 19:23:13 +0000 @@ -47,7 +47,7 @@ FROM groups g, project_group_list pgl, role_setting rs, user_group ug WHERE ug.user_id='".user_getid()."' AND g.group_id=pgl.group_id - AND rs.value > 0 + AND rs.value::integer > 0 AND rs.group_project_id = pgl.group_project_id AND ug.role_id = rs.role_id AND rs.section_name='pm'"; === modified file 'gforge/www/tracker/admin/form-extrafieldcopy.php' --- gforge/www/tracker/admin/form-extrafieldcopy.php 2007-12-01 16:58:26 +0000 +++ gforge/www/tracker/admin/form-extrafieldcopy.php 2008-09-03 19:24:05 +0000 @@ -44,8 +44,8 @@ WHERE ( (rs.section_name = 'projectadmin' AND rs.value = 'A') - OR (rs.section_name = 'trackeradmin' AND rs.value = 2) - OR (rs.section_name = 'tracker' AND rs.value >= 2 AND rs.ref_id = agl.group_artifact_id) + OR (rs.section_name = 'trackeradmin' AND rs.value = '2') + OR (rs.section_name = 'tracker' AND rs.value::integer >= 2 AND rs.ref_id = agl.group_artifact_id) ) AND ug.user_id='".user_getid()."' AND ug.group_id=g.group_id === modified file 'gforge/www/tracker/mod.php' --- gforge/www/tracker/mod.php 2008-05-31 14:04:29 +0000 +++ gforge/www/tracker/mod.php 2008-09-03 19:24:29 +0000 @@ -103,7 +103,7 @@ FROM artifact_group_list agl, role_setting rs, user_group ug WHERE agl.group_artifact_id=rs.ref_id AND ug.user_id='". user_getid() ."' - AND rs.value $alevel + AND rs.value::integer $alevel AND agl.group_id='$group_id' AND ug.role_id = rs.role_id AND rs.section_name='tracker'";
Roland. -- Roland Mas Time passed, which, basically, is its job. -- in Equal Rites (Terry Pratchett)