[Fusionforge-commits] FusionForge branch master updated. 014f30d2d9313227986acc1cf50e57bae2c75eed

Alain Peyrat aljeux at fusionforge.org
Mon Jul 8 15:31:07 CEST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  014f30d2d9313227986acc1cf50e57bae2c75eed (commit)
      from  0450d17458d368d41d6f876d9f487e21f1c76c57 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 014f30d2d9313227986acc1cf50e57bae2c75eed
Author: Alain Peyrat <alain.peyrat at alcatel-lucent.com>
Date:   Wed Jun 26 15:58:17 2013 +0200

    Mostly strings & indent

diff --git a/src/common/include/Plugin.class.php b/src/common/include/Plugin.class.php
index 8d6c875..6ef7f90 100644
--- a/src/common/include/Plugin.class.php
+++ b/src/common/include/Plugin.class.php
@@ -198,7 +198,7 @@ class Plugin extends Error {
 				$code = symlink($path . '/etc/plugins/' . $name, forge_get_config('config_path'). '/plugins/'.$name);
 				if (!$code) {
 					$this->setError('['.forge_get_config('config_path'). '/plugins/'.$name.'->'.$path . '/etc/plugins/' . $name . ']'.'<br />'.
-					_('Config file could not be linked to etc/gforge/plugins/%1$s. Check the write permissions for apache in /etc/gforge/plugins or create the link manually.'), $name);
+					_('Config file could not be linked to etc/gforge/plugins/%s. Check the write permissions for apache in /etc/gforge/plugins or create the link manually.'), $name);
 				}
 			}
 		}
@@ -215,7 +215,7 @@ class Plugin extends Error {
 				$code = symlink($path . '/etc/plugins/' . $name, forge_get_config('config_path'). '/plugins/'.$name);
 				if (!$code) {
 					$this->setError('['.forge_get_config('config_path'). '/plugins/'.$name.'->'.$path . '/etc/plugins/' . $name . ']'.'<br />'.
-					_('Config file could not be linked to etc/gforge/plugins/%1$s. Check the write permissions for apache in /etc/gforge/plugins or create the link manually.'), $name);
+					_('Config file could not be linked to etc/gforge/plugins/%s. Check the write permissions for apache in /etc/gforge/plugins or create the link manually.'), $name);
 				}
 			}
 		}
diff --git a/src/common/include/PluginManager.class.php b/src/common/include/PluginManager.class.php
index 542de43..1f72d60 100644
--- a/src/common/include/PluginManager.class.php
+++ b/src/common/include/PluginManager.class.php
@@ -214,7 +214,7 @@ class PluginManager extends Error {
 	 */
 	function RegisterPlugin(&$pluginobject) {
 		if (!$pluginobject->GetName()) {
-			exit_error(_("Some plugin did not provide a name. I'd gladly tell you which one, but obviously I can't. Sorry."),'');
+			exit_error(_("Some plugin did not provide a name. I'd gladly tell you which one, but obviously I cannot. Sorry."),'');
 		}
 		$p_name = $pluginobject->GetName() ;
 		$this->plugins_objects[$p_name] =& $pluginobject;
diff --git a/src/common/include/RBACEngine.class.php b/src/common/include/RBACEngine.class.php
index ca125eb..b221e08 100644
--- a/src/common/include/RBACEngine.class.php
+++ b/src/common/include/RBACEngine.class.php
@@ -472,8 +472,8 @@ function forge_check_perm ($section, $reference, $action = NULL) {
 
 /**
  * TODO: Enter description here ...
- * @param unknown_type $section
- * @param unknown_type $action
+ * @param string $section
+ * @param string $action
  */
 function forge_check_global_perm ($section, $action = NULL) {
 	$engine = RBACEngine::getInstance() ;
diff --git a/src/common/include/SCMPlugin.class.php b/src/common/include/SCMPlugin.class.php
index 251c6a9..69a8ccc 100644
--- a/src/common/include/SCMPlugin.class.php
+++ b/src/common/include/SCMPlugin.class.php
@@ -135,7 +135,7 @@ abstract class SCMPlugin extends Plugin {
 	function printShortStats($params) {
 		$project = $this->checkParams($params);
 		if (!$project) {
-			return false ;
+			return;
 		}
 
 		if ($project->usesPlugin($this->name)) {
@@ -241,7 +241,7 @@ abstract class SCMPlugin extends Plugin {
 
 		$project = $this->checkParams($params);
 		if (!$project) {
-			return false ;
+			return;
 		}
 
 		if ($project->usesPlugin ($this->name)) {
@@ -365,7 +365,6 @@ abstract class SCMPlugin extends Plugin {
 			return '';
 		}
 	}
-
 }
 
 // Local Variables:
diff --git a/src/common/include/system/LDAP.class.php b/src/common/include/system/LDAP.class.php
index dfae55a..30c4917 100644
--- a/src/common/include/system/LDAP.class.php
+++ b/src/common/include/system/LDAP.class.php
@@ -75,7 +75,7 @@ class LDAP extends UNIX {
 			$this->clearError();
 			$ldap_conn = @ldap_connect(forge_get_config('ldap_host'),forge_get_config('ldap_port'));
 			if (!$ldap_conn) {
-				$this->setError('ERROR: Cannot connect to LDAP server<br />');
+				$this->setError('Error: Cannot connect to LDAP server<br />');
 				return false;
 			}
 			if (forge_get_config('ldap_version')) {
@@ -140,7 +140,7 @@ class LDAP extends UNIX {
                 	} else {
                         	return false ;
                 	}
-        	};
+        	}
 	}
 
 	/**
@@ -327,7 +327,7 @@ class LDAP extends UNIX {
 		$entry['shadowWarning']=7;
 
 		if (!$this->gfLdapAdd($dn,$entry)) {
-			$this->setError("ERROR: cannot add LDAP user entry '".
+			$this->setError("Error: cannot add LDAP user entry '".
 				 $user->getUnixName()."': ".$this->gfLdapError()."<br />");
 			return false;
 		}
@@ -370,7 +370,7 @@ class LDAP extends UNIX {
 		$entry['shadowWarning']=7;
 
 		if (!$this->gfLdapAdd($dn,$entry)) {
-			$this->setError("ERROR: cannot add LDAP user entry '".
+			$this->setError("Error: cannot add LDAP user entry '".
 				 $username."': ".$this->gfLdapError()."<br />");
 			return false;
 		}
@@ -394,7 +394,7 @@ class LDAP extends UNIX {
 		$dn = 'uid='.$user->getUnixName().',ou=People,'.forge_get_config('ldap_base_dn');
 
 		if (!$this->gfLdapDelete($dn)) {
-		    $this->setError("ERROR: cannot delete LDAP user entry '".
+		    $this->setError("Error: cannot delete LDAP user entry '".
 				 $user->getUnixName()."': ".$this->gfLdapError()."<br />");
 		    return false;
 		}
@@ -421,7 +421,7 @@ class LDAP extends UNIX {
 		$entry[$attr]=$value;
 
 		if (!$this->gfLdapModifyIfExists($dn, $entry)) {
-		    $this->setError("ERROR: cannot change LDAP attribute '$attr' for user '".
+		    $this->setError("Error: cannot change LDAP attribute '$attr' for user '".
 				 $user->getUnixName()."': ".$this->gfLdapError()."<br />");
 		    return false;
 		}
@@ -445,7 +445,7 @@ class LDAP extends UNIX {
 
 		$group = &group_get_object($group_id);
 		if (!$group) {
-			$this->setError("ERROR: Cannot find group [$group_id]<br />");
+			$this->setError("Error: Cannot find group [$group_id]<br />");
 			return false;
 		}
 		if (!$this->gfLdapConnect()) {
@@ -486,7 +486,7 @@ class LDAP extends UNIX {
 		$ret_val=true;
 
 		if (!$this->gfLdapAdd($dn,$entry)) {
-		    $this->setError("ERROR: cannot add LDAP group entry '".
+		    $this->setError("Error: cannot add LDAP group entry '".
 				 $group->getUnixName()."': ".$this->gfLdapError()."<br />");
 		    // If there's error, that's bad. But don't stop.
 		    $ret_val=false;
@@ -508,7 +508,7 @@ class LDAP extends UNIX {
 		}
 
 		if (!$this->gfLdapAdd($dn,$entry)) {
-			$this->setError("ERROR: cannot add LDAP CVS group entry '"
+			$this->setError("Error: cannot add LDAP CVS group entry '"
 				 .$group->getUnixName()."': ".$this->gfLdapError()."<br />");
 			$ret_val=false;
 		}
@@ -523,7 +523,7 @@ class LDAP extends UNIX {
 							'/bin/false', '/bin/false',
 							$this->getSCMGID(),
 							$this->getUnixGID(), "/dev/null")) {
-			$this->setError("ERROR: cannot add LDAP AnonCVS user entry '"
+			$this->setError("Error: cannot add LDAP AnonCVS user entry '"
 				 .$group->getUnixName()."': ".$this->gfLdapError()."<br />");
 			$ret_val=false;
 		}
@@ -554,7 +554,7 @@ class LDAP extends UNIX {
 		$dn = 'cn='.$group->getUnixName().',ou=Group,'.forge_get_config('ldap_base_dn');
 
 		if (!$this->gfLdapDelete($dn)) {
-		    $this->setError("ERROR: cannot delete LDAP group entry '".
+		    $this->setError("Error: cannot delete LDAP group entry '".
 				 $group->getUnixName()."': ".$this->gfLdapError()."<br />");
 		    $ret_val = false;
 		}
@@ -566,7 +566,7 @@ class LDAP extends UNIX {
 		$dn = 'cn='.$group->getUnixName().',ou=cvsGroup,'.forge_get_config('ldap_base_dn');
 
 		if (!$this->gfLdapDelete($dn)) {
-		    $this->setError("ERROR: cannot delete LDAP CVS group entry '".
+		    $this->setError("Error: cannot delete LDAP CVS group entry '".
 				 $group->getUnixName()."': ".$this->gfLdapError()."<br />");
 		    $ret_val = false;
 		}
@@ -577,7 +577,7 @@ class LDAP extends UNIX {
 
 		$dn = 'uid=anoncvs_'.$group->getUnixName().',ou=People,'.forge_get_config('ldap_base_dn');
 		if (!$this->gfLdapDelete($dn)) {
-		    $this->setError("ERROR: cannot delete LDAP AnonCVS user entry '".
+		    $this->setError("Error: cannot delete LDAP AnonCVS user entry '".
 				 $group->getUnixName()."': ".$this->gfLdapError()."<br />");
 		    $ret_val = false;
 		}
@@ -646,7 +646,7 @@ class LDAP extends UNIX {
 			//
 
 			if (!$this->gfLdapModAdd($cvs_dn,$entry)) {
-				$this->setError("ERROR: cannot add member to LDAP CVS group entry '".
+				$this->setError("Error: cannot add member to LDAP CVS group entry '".
 				 $group->getUnixName()."': ".$this->gfLdapError()."<br />");
 				return false;
 			}
@@ -671,7 +671,7 @@ class LDAP extends UNIX {
 			//
 
 			if (!$this->gfLdapModAdd($dn,$entry)) {
-				$this->setError("ERROR: cannot add member to LDAP group entry '".
+				$this->setError("Error: cannot add member to LDAP group entry '".
 				 $group->getUnixName()."': ".$this->gfLdapError()."<br />");
 				return false;
 			}
@@ -707,7 +707,7 @@ class LDAP extends UNIX {
 		$ret_val=true;
 
 		if (!$this->gfLdapModDel($cvs_dn,$entry) && !$this->gfLdapDoesNotExist()) {
-			$this->setError("ERROR: cannot remove member from LDAP CVS group entry '".
+			$this->setError("Error: cannot remove member from LDAP CVS group entry '".
 				 $group->getUnixName()."': ".$this->gfLdapError()."(".$this->gfLdapErrno().")"."<br />");
 			$ret_val=false;
 		}
@@ -717,7 +717,7 @@ class LDAP extends UNIX {
 		}
 
 		if (!$this->gfLdapModDel($dn,$entry) && !$this->gfLdapDoesNotExist()) {
-			$this->setError("ERROR: cannot remove member from LDAP group entry '".
+			$this->setError("Error: cannot remove member from LDAP group entry '".
 				 $group->getUnixName()."': ".$this->gfLdapError()."(".$this->gfLdapErrno().")"."<br />");
 			$ret_val=false;
 		}
diff --git a/src/common/include/system/UNIX.class.php b/src/common/include/system/UNIX.class.php
index e921125..4730c2c 100644
--- a/src/common/include/system/UNIX.class.php
+++ b/src/common/include/system/UNIX.class.php
@@ -60,7 +60,7 @@ class UNIX extends System {
 						       'A',
 						       $user_id)) ;
 	                if (!$res) {
-	                        $this->setError('ERROR - Could Not Update User UID/GID: '.db_error());
+	                        $this->setError('Error: Cannot Update User UID/GID: '.db_error());
 	                        return false;
 			}
 			return true;
@@ -79,7 +79,7 @@ class UNIX extends System {
 					array ('N',
 					       $user_id));
 		if (!$res) {
-			$this->setError('ERROR - Could Not Update User Unix Status: '.db_error());
+			$this->setError('Error: Cannot Update User Unix Status: '.db_error());
 			return false;
 		}
 		return true;
diff --git a/src/common/include/system/pgsql.class.php b/src/common/include/system/pgsql.class.php
index f7fd73f..62b91f7 100644
--- a/src/common/include/system/pgsql.class.php
+++ b/src/common/include/system/pgsql.class.php
@@ -116,13 +116,13 @@ class pgsql extends System {
 						       'A',
 						       $user_id)) ;
 	                if (!$res) {
-	                        $this->setError('ERROR - Could Not Update User UID/GID: '.db_error());
+	                        $this->setError('Error: Cannot Update User UID/GID: '.db_error());
 	                        return false;
 			}
 			$res1 = db_query_params ('DELETE FROM nss_usergroups WHERE user_id=$1',
 						 array ($user_id)) ;
 			if (!$res1) {
-				$this->setError('ERROR - Could Not Delete Group Member(s): '.db_error());
+				$this->setError('Error: Cannot Delete Group Member(s): '.db_error());
 				return false;
 			}
 			// This is group used for user, not a real project
@@ -130,7 +130,7 @@ class pgsql extends System {
 					(SELECT user_name FROM users WHERE user_id=$1)',
 						 array ($user_id));
 			if (!$res2) {
-				$this->setError('ERROR - Could Not Delete Group GID: '.db_error());
+				$this->setError('Error: Cannot Delete Group GID: '.db_error());
 				return false;
 			}
 			$res3 = db_query_params ('INSERT INTO nss_groups
@@ -139,7 +139,7 @@ class pgsql extends System {
 					FROM users WHERE user_id=$1',
 						 array ($user_id));
 			if (!$res3) {
-				$this->setError('ERROR - Could Not Update Group GID: '.db_error());
+				$this->setError('Error: Cannot Update Group GID: '.db_error());
 				return false;
 			}
 
@@ -191,17 +191,17 @@ class pgsql extends System {
  	*
  	*/
 	function sysRemoveUser($user_id) {
-		$res = db_query_params ('UPDATE users SET unix_status=$1 WHERE user_id=$2',
+		$res = db_query_params('UPDATE users SET unix_status=$1 WHERE user_id=$2',
 					array ('D',
-					       $user_id)) ;
+					       $user_id));
 		if (!$res) {
-			$this->setError('ERROR - Could Not Update User Unix Status: '.db_error());
+			$this->setError('Error: Cannot Update User Unix Status: '.db_error());
 			return false;
 		} else {
 			$res1 = db_query_params ('DELETE FROM nss_usergroups WHERE user_id=$1',
 						 array ($user_id));
 			if (!$res1) {
-				$this->setError('ERROR - Could Not Delete Group Member(s): '.db_error());
+				$this->setError('Error: Cannot Delete Group Member(s): '.db_error());
 				return false;
 			}
 			// This is group used for user, not a real project
@@ -209,7 +209,7 @@ class pgsql extends System {
 				(SELECT user_name FROM users WHERE user_id=$1)',
 						 array ($user_id)) ;
 			if (!$res2) {
-				$this->setError('ERROR - Could Not Delete Group GID: '.db_error());
+				$this->setError('Error: Cannot Delete Group GID: '.db_error());
 				return false;
 			}
 		}
@@ -271,13 +271,13 @@ class pgsql extends System {
 		$res1 = db_query_params ('DELETE FROM nss_usergroups WHERE group_id=$1',
 					 array ($group_id));
 		if (!$res1) {
-			$this->setError('ERROR - Could Not Delete Group Member(s): '.db_error());
+			$this->setError('Error: Cannot Delete Group Member(s): '.db_error());
 			return false;
 		}
 		$res3 = db_query_params ('DELETE FROM nss_groups WHERE group_id=$1',
 					 array ($group_id)) ;
 		if (!$res3) {
-			$this->setError('ERROR - Could Not Delete Group GID: '.db_error());
+			$this->setError('Error: Cannot Delete Group GID: '.db_error());
 			return false;
 		}
 		$res4 = db_query_params ('INSERT INTO nss_groups
@@ -288,7 +288,7 @@ class pgsql extends System {
 					 array ($this->GID_ADD,
 						$group_id)) ;
 		if (!$res4) {
-			$this->setError('ERROR - Could Not Insert Group GID: '.db_error());
+			$this->setError('Error: Cannot Insert Group GID: '.db_error());
 			return false;
 		}
 		$res5 = db_query_params ('INSERT INTO nss_groups
@@ -301,7 +301,7 @@ class pgsql extends System {
 						$group_id)) ;
 
 		if (!$res5) {
-			$this->setError('ERROR - Could Not Insert SCM Group GID: '.db_error());
+			$this->setError('Error: Cannot Insert SCM Group GID: '.db_error());
 			return false;
 		}
 
@@ -323,13 +323,13 @@ class pgsql extends System {
 		$res1 = db_query_params ('DELETE FROM nss_usergroups WHERE group_id=$1',
 					 array ($group_id)) ;
 		if (!$res1) {
-			$this->setError('ERROR - Could Not Delete Group Member(s): '.db_error());
+			$this->setError('Error: Cannot Delete Group Member(s): '.db_error());
 			return false;
 		}
 		$res3 = db_query_params ('DELETE FROM nss_groups WHERE group_id=$1',
 					 array ($group_id)) ;
 		if (!$res3) {
-			$this->setError('ERROR - Could Not Delete Group GID: '.db_error());
+			$this->setError('Error: Cannot Delete Group GID: '.db_error());
 			return false;
 		}
 		return true;
@@ -384,7 +384,7 @@ WHERE users.user_id=$3
 						      $group_id));
 			if (!$res) {
 				db_rollback();
-				$this->setError('ERROR - Could Not Update Group Member(s): '.db_error());
+				$this->setError('Error: Cannot Update Group Member(s): '.db_error());
 				return false;
 			}
 		}
@@ -408,7 +408,7 @@ WHERE users.user_id=$2
 						       'A', 'A', 'A',
 						       $group_id)) ;
 			if (!$res) {
-				$this->setError('ERROR - Could Not Update Group Member(s): '.db_error());
+				$this->setError('Error: Cannot Update Group Member(s): '.db_error());
 				db_rollback () ;
 				return false;
 			}
@@ -431,7 +431,7 @@ WHERE users.user_id=$2
 					 array ($user_id,
 						$group_id)) ;
 		if (!$res) {
-			$this->setError('ERROR - Could Not Delete Group Member(s): '.db_error());
+			$this->setError('Error: Cannot Delete Group Member(s): '.db_error());
 			return false;
 		}
 		return true;
diff --git a/src/cronjobs/backup_site.php b/src/cronjobs/backup_site.php
index 5e72dbf..73a110f 100644
--- a/src/cronjobs/backup_site.php
+++ b/src/cronjobs/backup_site.php
@@ -33,7 +33,7 @@ $num_of_days = forge_get_config('backup_days'); // Number of days to keep if set
 
 $datetime=date('Y-m-d'); //we will use this to concatenate it with the tar filename
 
-if(!(isset($sys_path_to_backup)) ||  (strcmp($sys_path_to_backup,"/") == 0)){
+if(!(isset($sys_path_to_backup)) || (strcmp($sys_path_to_backup,"/") == 0)){
 //	cron_entry(23,'Variable $sys_path_to_backup was not set or it was equal to /.');
 //	exit;
 	// Default value
@@ -47,9 +47,9 @@ if(util_is_root_dir($sys_path_to_backup)){
 if (!is_dir($sys_path_to_backup)) {
 	if (!mkdir($sys_path_to_backup, 0700, true)) {
 		cron_entry(23,'Couldn\'t create directory '.$sys_path_to_backup.' for backups');
-				exit;
-			}
-		}
+		exit;
+	}
+}
 
 // add trailing slash
 if (!preg_match('/\\/$/',$sys_path_to_backup)) {
@@ -122,7 +122,7 @@ if (file_exists(forge_get_config('upload_dir'))) {
 		$err.= implode("\n", $output);
 	}
 } else {
-		$err.= 'Unable to find upload dir. Configured value is:'.forge_get_config('upload_dir');
+	$err.= 'Unable to find upload dir. Configured value is:'.forge_get_config('upload_dir');
 }
 
 /**************************************
@@ -137,7 +137,7 @@ if (file_exists($mailman_data_dir)) {
 		$err.= implode("\n", $output);
 	}
 } else {
-		$err.= 'Unable to find Mailman data dir. Please edit backup_site.php cronjob';
+	$err.= 'Unable to find Mailman data dir. Please edit backup_site.php cronjob';
 }
 
 /**************************************
diff --git a/src/cronjobs/homedirs.php b/src/cronjobs/homedirs.php
old mode 100755
new mode 100644
index fbd4d89..c9bfcd2
--- a/src/cronjobs/homedirs.php
+++ b/src/cronjobs/homedirs.php
@@ -6,6 +6,7 @@
  * The rest Copyright 2002-2005 (c) GForge Team
  * Copyright 2012, Franck Villaume - TrivialDev
  * Copyright © 2013 Thorsten Glaser, tarent solutions GmbH
+ * http://fusionforge.org/
  *
  * This file is part of FusionForge. FusionForge is free software;
  * you can redistribute it and/or modify it under the terms of the
@@ -63,8 +64,8 @@ define('USER_DEFAULT_GROUP', 'users');
 $err = '';
 
 /*
- * check whether directory preficēs are set
- * and create the præfix directories unless they exist
+ * check whether directory prefices are set
+ * and create the prefix directories unless they exist
  */
 
 if (!($gpfx = forge_get_config('groupdir_prefix'))) {
diff --git a/src/cronjobs/update_filesize.php b/src/cronjobs/update_filesize.php
old mode 100755
new mode 100644
index f0befcd..242d2f1
--- a/src/cronjobs/update_filesize.php
+++ b/src/cronjobs/update_filesize.php
@@ -19,7 +19,7 @@
  * with FusionForge; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *
- * -------------- Gforge team comment ------------
+ * -------------- FusionForge team comment ------------
  * This file was proposed by Brett N DiFrischia
  * with the following description:
  * The GFDL uses many large files that could not be uploaded to our GForge site.

-----------------------------------------------------------------------

Summary of changes:
 src/common/include/Plugin.class.php        |    4 ++--
 src/common/include/PluginManager.class.php |    2 +-
 src/common/include/RBACEngine.class.php    |    4 ++--
 src/common/include/SCMPlugin.class.php     |    5 ++--
 src/common/include/system/LDAP.class.php   |   34 +++++++++++++-------------
 src/common/include/system/UNIX.class.php   |    4 ++--
 src/common/include/system/pgsql.class.php  |   36 ++++++++++++++--------------
 src/cronjobs/backup_site.php               |   12 +++++-----
 src/cronjobs/homedirs.php                  |    5 ++--
 src/cronjobs/update_filesize.php           |    2 +-
 10 files changed, 54 insertions(+), 54 deletions(-)
 mode change 100755 => 100644 src/cronjobs/homedirs.php
 mode change 100755 => 100644 src/cronjobs/update_filesize.php


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list