[evolvis-commits] r6514: - Optimized to make use of the given database functions. Makes the software more flexible with other DBMS.

papel at evolvis.org papel at evolvis.org
Wed Apr 7 10:49:23 CEST 2010


Author: papel
Date: 2010-04-07 08:49:22 +0000 (Wed, 07 Apr 2010)
New Revision: 6514

Modified:
   trunk/gforge_base/gforge-4.8.1+evolvis/common/frs/FRSRelease.class.php
Log:
- Optimized to make use of the given database functions. Makes the software more flexible with other DBMS.

Modified: trunk/gforge_base/gforge-4.8.1+evolvis/common/frs/FRSRelease.class.php
===================================================================
--- trunk/gforge_base/gforge-4.8.1+evolvis/common/frs/FRSRelease.class.php	2010-04-07 08:11:29 UTC (rev 6513)
+++ trunk/gforge_base/gforge-4.8.1+evolvis/common/frs/FRSRelease.class.php	2010-04-07 08:49:22 UTC (rev 6514)
@@ -115,8 +115,6 @@
  *
  *  You can also determine the newest release on the release_date
  * 
- *  @author Patrick Apel, tarent GmbH
- * 
  *  @param int intPackageId
  *  @return int intReleaseId 
  *
@@ -125,11 +123,11 @@
 function getNewestReleaseId($intPackage_id) {
 
 	$strSqlString= "SELECT MAX(release_id) AS release_id FROM frs_release WHERE package_id='$intPackage_id'";
-	$result = pg_query($strSqlString) OR $this->setError('FRSRelease:: No valid max release id');
+	$result = db_query($strSqlString) OR $this->setError('FRSRelease:: No valid max release id');
 	
 	if(pg_num_rows($result)===1){
-		while($row = pg_fetch_object($result)) {
-			$release_id = $row->release_id;
+		while($row = db_fetch_array($result)) {
+			$release_id = $row['release_id'];
 		}
 	} else {
 		$this->setError('FRSRelease:: No valid max release id');




More information about the evolvis-commits mailing list