gforge-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gforge-commits] gforge/common/frs FRSFile.class,1.12,1.13


From: mpeltier
Subject: [Gforge-commits] gforge/common/frs FRSFile.class,1.12,1.13
Date: Sun, 12 Dec 2004 08:57:31 -0600

Update of /cvsroot/gforge/gforge/common/frs
In directory db.perdue.net:/tmp/cvs-serv10071/common/frs

Modified Files:
        FRSFile.class 
Log Message:
Rollbacked my previous commits that did not resolve properly the bug
[#663]. Sorry about that - will send only patchs in the future.


Index: FRSFile.class
===================================================================
RCS file: /cvsroot/gforge/gforge/common/frs/FRSFile.class,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- FRSFile.class       12 Dec 2004 00:08:09 -0000      1.12
+++ FRSFile.class       12 Dec 2004 14:57:28 -0000      1.13
@@ -321,11 +321,10 @@
         *      @param  int     The type_id of this file from the 
frs-file-types table.
         *      @param  int     The processor_id of this file from the 
frs-processor-types table.
         *      @param  int     The release_date of this file in unix time 
(seconds).
-        *      @param  int     The package_id of the package the release of 
this file belongs to.
-        *      @param  int     The release_id of the release this file belongs 
to.
         *      @return boolean success.
         */
-       function 
update($type_id,$processor_id,$release_time,$package_id,$release_id) {
+       function update($type_id,$processor_id,$release_time) {
+
                $perm =& $this->FRSRelease->FRSPackage->Group->getPermission( 
session_get_user() );
 
                if (!$perm || !is_object($perm) || 
!$perm->isReleaseTechnician()) {
@@ -333,28 +332,12 @@
                        return false;
                }
 
-               // Does the new package id value really correspond to a package 
of this group?
-               $frsp = new 
FRSPackage($this->FRSRelease->FRSPackage->Group,$package_id);
-               if (!$frsp || !is_object($frsp)) {
-                       exit_error('Error','Could Not Get New FRSPackage');
-               } elseif ($frsp->isError()) {
-                       exit_error('Error',$frsp->getErrorMessage());
-               }
-
-               // Does the new release id value really correspond to a release 
of the new package?
-               $frsr = new FRSRelease($frsp,$release_id);
-               if (!$frsr || !is_object($frsr)) {
-                       exit_error('Error','Could Not Get New FRSRelease');
-               } elseif ($frsr->isError()) {
-                       exit_error('Error',$frsr->getErrorMessage());
-               }
-
                $res=db_query("UPDATE frs_file SET
                        type_id='$type_id',
                        processor_id='$processor_id',
-                       release_time='$release_time',
-                       release_id='$release_id'
-                       WHERE file_id='".$this->getID()."'");
+                       release_time='$release_time'
+                       WHERE release_id='".$this->FRSRelease->getID()."'
+                       AND file_id='".$this->getID()."'");
 
                if (!$res || db_affected_rows($res) < 1) {
                        $this->setError('FRSFile::update() Error On Update: 
'.db_error());
@@ -362,7 +345,9 @@
                }
 
                return true;
+
        }
+
 }
 
 ?>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]