gforge-commits
[Top][All Lists]
Advanced

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

[Gforge-commits] gforge/common/include Group.class,1.56,1.57


From: kikov
Subject: [Gforge-commits] gforge/common/include Group.class,1.56,1.57
Date: Mon, 02 Aug 2004 15:55:23 -0500

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

Modified Files:
        Group.class 
Log Message:
Add a new function to Group.class to allow groupedit.php editing the SCM_BOX.
Fixes [#858]


Index: Group.class
===================================================================
RCS file: /cvsroot/gforge/gforge/common/include/Group.class,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- Group.class 28 Jul 2004 16:24:55 -0000      1.56
+++ Group.class 2 Aug 2004 20:55:20 -0000       1.57
@@ -811,6 +811,30 @@
                        return $this->data_array['scm_box'];
                }
        }
+       /**
+        * setSCMBox - the hostname of the scm box where this project is 
located.
+        *
+        * @param       string The name of the new SCM_BOX
+        */
+       function setSCMBox($scm_box) {
+               if ( $GLOBALS['sys_scm_single_host'] == '1' ) {
+                       $this->setError('Trying to change SCM_BOX when 
sys_scm_single_host selected');
+               } else {
+                       db_begin();
+                       $sql = "UPDATE groups SET scm_box = '$scm_box' WHERE 
group_id = ".$this->getID();
+                       var_dump($sql);
+                       $res = db_query($sql);
+                       if ($res) {
+                               $this->data_array['scm_box']=$scm_box;
+                               db_commit();
+                               return true;
+                       } else {
+                               db_rollback();
+                               $this->setError('Couldn\'t insert SCM_BOX to 
database');
+                               return false;
+                       }
+               }
+       }
 
        /**
         *  getDomain - the hostname.domain where their web page is located.





reply via email to

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