[Fusionforge-commits] FusionForge branch Branch_5_2 updated. 0a856c771f9cd081b5ab3386ff15247bcb1ffc5e

Thorsten Glaser mirabilos at fusionforge.org
Mon Jul 22 12:29:27 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, Branch_5_2 has been updated
       via  0a856c771f9cd081b5ab3386ff15247bcb1ffc5e (commit)
       via  c0408b7cdbe5c4234d0460deadae2f0ec57cdd1b (commit)
       via  45504fb308617a9797c74223adfda29fc7c3670d (commit)
       via  f99a7bedd3782e7fb0fe140c24fe8305c1606db2 (commit)
      from  424a795b5bf749a142af726b8c708ab4ada986fd (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 0a856c771f9cd081b5ab3386ff15247bcb1ffc5e
Merge: c0408b7 45504fb
Author: Thorsten Glaser <t.glaser at tarent.de>
Date:   Mon Jul 22 12:29:18 2013 +0200

    Merge remote-tracking branch 'origin/Branch_5_1' into Branch_5_2

diff --cc src/common/include/User.class.php
index 1149dc8,17b7f95..3f1341b
--- a/src/common/include/User.class.php
+++ b/src/common/include/User.class.php
@@@ -223,11 -216,11 +223,11 @@@ class GFUser extends Error 
  	 * @param	string	The users preferred default timezone.
  	 * @param	string	The users preference for receiving site updates by email.
  	 * @param	string	The users preference for receiving community updates by email.
 -	 * @param	int		The ID of the language preference.
 +	 * @param	int	The ID of the language preference.
  	 * @param	string	The users preferred timezone.
- 	 * @param	string	The users Jabber address.
- 	 * @param	int	The users Jabber preference.
+ 	 * @param	ignored	(no longer used)
+ 	 * @param	ignored	(no longer used)
 -	 * @param	int		The users theme_id.
 +	 * @param	int	The users theme_id.
  	 * @param	string	The users unix_box.
  	 * @param	string	The users address.
  	 * @param	string	The users address part 2.
@@@ -236,13 -229,12 +236,13 @@@
  	 * @param	string	The users title.
  	 * @param	char(2)	The users ISO country_code.
  	 * @param	bool	Whether to send an email or not
 -	 * @returns The newly created user ID
 +	 * @param	int	The users preference for tooltips
 +	 * @returns		The newly created user ID
  	 *
  	 */
 -	function create($unix_name,$firstname,$lastname,$password1,$password2,$email,
 -		$mail_site,$mail_va,$language_id,$timezone,$dummy1,$dummy2,$theme_id,
 -		$unix_box='shell',$address='',$address2='',$phone='',$fax='',$title='',$ccode='US',$send_mail=true) {
 +	function create($unix_name, $firstname, $lastname, $password1, $password2, $email,
- 		$mail_site, $mail_va, $language_id, $timezone, $jabber_address, $jabber_only, $theme_id,
++		$mail_site, $mail_va, $language_id, $timezone, $dummy1, $dummy2, $theme_id,
 +		$unix_box = 'shell', $address = '', $address2 = '', $phone = '', $fax = '', $title = '', $ccode = 'US', $send_mail = true, $tooltips = true) {
  		global $SYS;
  		if (!$theme_id) {
  			$this->setError(_('You must supply a theme'));
@@@ -284,20 -276,11 +284,11 @@@
  			return false;
  		}
  		if (!validate_email($email)) {
 -			$this->setError(_('Invalid Email Address') . $email);
 +			$this->setError(_('Invalid Email Address:') .' '. $email);
  			return false;
  		}
- 		if ($jabber_address && !validate_email($jabber_address)) {
- 			$this->setError(_('Invalid Jabber Address'));
- 			return false;
- 		}
- 		if (!$jabber_only) {
- 			$jabber_only=0;
- 		} else {
- 			$jabber_only=1;
- 		}
  		if ($unix_name && db_numrows(db_query_params('SELECT user_id FROM users WHERE user_name LIKE $1',
 -							     array ($unix_name))) > 0) {
 +							     array($unix_name))) > 0) {
  			$this->setError(_('That username already exists.'));
  			return false;
  		}
@@@ -351,33 -334,29 +342,31 @@@
  		// if we got this far, it must be good
  		$confirm_hash = substr(md5($password1 . util_randbytes() . microtime()),0,16);
  		db_begin();
- 		$result = db_query_params('INSERT INTO users (user_name,user_pw,unix_pw,realname,firstname,lastname,email,add_date,status,confirm_hash,mail_siteupdates,mail_va,language,timezone,jabber_address,jabber_only,unix_box,address,address2,phone,fax,title,ccode,theme_id,tooltips)
- 							VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25)',
 -		$result = db_query_params ('INSERT INTO users (user_name,user_pw,unix_pw,realname,firstname,lastname,email,add_date,status,confirm_hash,mail_siteupdates,mail_va,language,timezone,unix_box,address,address2,phone,fax,title,ccode,theme_id) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22)',
 -					   array ($unix_name,
 -						  md5($password1),
 -						  account_genunixpw($password1),
 -						  htmlspecialchars($firstname.' '.$lastname),
 -						  htmlspecialchars($firstname),
 -						  htmlspecialchars($lastname),
 -						  $email,
 -						  time(),
 -						  'P',
 -						  $confirm_hash,
 -						  (($mail_site)?"1":"0"),
 -						  (($mail_va)?"1":"0"),
 -						  $language_id,
 -						  $timezone,
 -						  $unix_box,
 -						  htmlspecialchars($address),
 -						  htmlspecialchars($address2),
 -						  htmlspecialchars($phone),
 -						  htmlspecialchars($fax),
 -						  htmlspecialchars($title),
 -						  $ccode,
 -						  $theme_id)) ;
++		$result = db_query_params('INSERT INTO users (user_name,user_pw,unix_pw,realname,firstname,lastname,email,add_date,status,confirm_hash,mail_siteupdates,mail_va,language,timezone,unix_box,address,address2,phone,fax,title,ccode,theme_id,tooltips)
++							VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23)',
 +					   array($unix_name,
 +						 md5($password1),
 +						 account_genunixpw($password1),
 +						 htmlspecialchars($firstname.' '.$lastname),
 +						 htmlspecialchars($firstname),
 +						 htmlspecialchars($lastname),
 +						 $email,
 +						 time(),
 +						 'P',
 +						 $confirm_hash,
 +						 (($mail_site)?"1":"0"),
 +						 (($mail_va)?"1":"0"),
 +						 $language_id,
 +						 $timezone,
- 						 $jabber_address,
- 						 $jabber_only,
 +						 $unix_box,
 +						 htmlspecialchars($address),
 +						 htmlspecialchars($address2),
 +						 htmlspecialchars($phone),
 +						 htmlspecialchars($fax),
 +						 htmlspecialchars($title),
 +						 $ccode,
 +						 $theme_id,
 +						 $tooltips));
  		if (!$result) {
  			$this->setError(_('Insert Failed: ') . db_error());
  			db_rollback();
@@@ -509,89 -488,71 +498,75 @@@ Enjoy the site
  	}
  
  	/**
 -	 *	update() - update *common* properties of GFUser object.
 -	 *
 -	 *	Use specific setter to change other properties.
 -	 *
 -	 *  @param	string	The users first name.
 -	 *  @param	string	The users last name.
 -	 *  @param	int		The ID of the users language preference.
 -	 *  @param	string	The useres timezone preference.
 -	 *  @param	string	The users preference for receiving site updates by email.
 -	 *  @param	string	The users preference for receiving community updates by email.
 -	 *	@param	string	The users preference for being participating in "peer ratings".
 -	 *	@param	ignored	(no longer used)
 -	 *	@param	ignored	(no longer used)
 -	 *	@param	int	The users theme_id preference.
 -	 *	@param	string	The users address.
 -	 *	@param	string	The users address2.
 -	 *	@param	string	The users phone.
 -	 *	@param	string	The users fax.
 -	 *	@param	string	The users title.
 -	 *	@param	string	The users ccode.
 +	 * update() - update *common* properties of GFUser object.
 +	 *
 +	 * Use specific setter to change other properties.
 +	 *
 +	 * @param	string	The users first name.
 +	 * @param	string	The users last name.
 +	 * @param	int	The ID of the users language preference.
 +	 * @param	string	The useres timezone preference.
 +	 * @param	string	The users preference for receiving site updates by email.
 +	 * @param	string	The users preference for receiving community updates by email.
 +	 * @param	string	The users preference for being participating in "peer ratings".
- 	 * @param	string	The users Jabber account address.
- 	 * @param	int	The users Jabber preference.
++	 * @param	ignored	(no longer used)
++	 * @param	ignored	(no longer used)
 +	 * @param	int	The users theme_id preference.
 +	 * @param	string	The users address.
 +	 * @param	string	The users address2.
 +	 * @param	string	The users phone.
 +	 * @param	string	The users fax.
 +	 * @param	string	The users title.
 +	 * @param	string	The users ccode.
 +	 * @param	int	The users preference for tooltips.
 +	 * @param	string	The users email.
  	 */
 -	function update($firstname,$lastname,$language_id,$timezone,$mail_site,$mail_va,$use_ratings,
 -		$dummy1,$dummy2,$theme_id,$address,$address2,$phone,$fax,$title,$ccode) {
 +	function update($firstname, $lastname, $language_id, $timezone, $mail_site, $mail_va, $use_ratings,
- 			$jabber_address, $jabber_only, $theme_id, $address, $address2, $phone, $fax, $title, $ccode, $tooltips, $email='') {
++			$dummy1, $dummy2, $theme_id, $address, $address2, $phone, $fax, $title, $ccode, $tooltips, $email='') {
  		$mail_site = $mail_site ? 1 : 0;
  		$mail_va   = $mail_va   ? 1 : 0;
  		$block_ratings = $use_ratings ? 0 : 1;
  
- 		if ($jabber_address && !validate_email($jabber_address)) {
- 			$this->setError(_('Invalid Jabber Address'));
- 			return false;
- 		}
- 		if (!$jabber_only) {
- 			$jabber_only = 0;
- 		} else {
- 			$jabber_only = 1;
- 		}
- 
  		db_begin();
  
 -		$res = db_query_params ('
 -			UPDATE users
 -			SET
 -			realname=$1,
 -			firstname=$2,
 -			lastname=$3,
 -			language=$4,
 -			timezone=$5,
 -			mail_siteupdates=$6,
 -			mail_va=$7,
 -			block_ratings=$8,
 -			address=$9,
 -			address2=$10,
 -			phone=$11,
 -			fax=$12,
 -			title=$13,
 -			ccode=$14,
 -			theme_id=$15
 -			WHERE user_id=$16',
 -					array (
 -						htmlspecialchars($firstname . ' ' .$lastname),
 -						htmlspecialchars($firstname),
 -						htmlspecialchars($lastname),
 -						$language_id,
 -						$timezone,
 -						$mail_site,
 -						$mail_va,
 -						$block_ratings,
 -						htmlspecialchars($address) ,
 -						htmlspecialchars($address2) ,
 -						htmlspecialchars($phone) ,
 -						htmlspecialchars($fax) ,
 -						htmlspecialchars($title) ,
 -						$ccode,
 -						$theme_id,
 -						$this->getID())) ;
 +		$res = db_query_params('
 +				UPDATE users
 +				SET
 +				realname=$1,
 +				firstname=$2,
 +				lastname=$3,
 +				language=$4,
 +				timezone=$5,
 +				mail_siteupdates=$6,
 +				mail_va=$7,
 +				block_ratings=$8,
- 				jabber_address=$9,
- 				jabber_only=$10,
- 				address=$11,
- 				address2=$12,
- 				phone=$13,
- 				fax=$14,
- 				title=$15,
- 				ccode=$16,
- 				theme_id=$17,
- 				tooltips=$18
- 				WHERE user_id=$19',
++				address=$9,
++				address2=$10,
++				phone=$11,
++				fax=$12,
++				title=$13,
++				ccode=$14,
++				theme_id=$15,
++				tooltips=$16
++				WHERE user_id=$17',
 +			array (
 +				htmlspecialchars($firstname . ' ' .$lastname),
 +				htmlspecialchars($firstname),
 +				htmlspecialchars($lastname),
 +				$language_id,
 +				$timezone,
 +				$mail_site,
 +				$mail_va,
 +				$block_ratings,
- 				$jabber_address,
- 				$jabber_only,
 +				htmlspecialchars($address),
 +				htmlspecialchars($address2),
 +				htmlspecialchars($phone),
 +				htmlspecialchars($fax),
 +				htmlspecialchars($title),
 +				$ccode,
 +				$theme_id,
 +				$tooltips,
 +				$this->getID()));
  
  		if (!$res) {
  			$this->setError(_('ERROR - Could Not Update User Object:'). ' ' .db_error());
@@@ -1092,27 -1047,9 +1067,9 @@@
  	}
  
  	/**
- 	 * getJabberAddress - this user's optional jabber address.
- 	 *
- 	 * @return	string	This user's jabber address.
- 	 */
- 	function getJabberAddress() {
- 		return $this->data_array['jabber_address'];
- 	}
- 
- 	/**
- 	 * getJabberOnly - whether this person wants updates sent ONLY to jabber.
- 	 *
- 	 * @return	boolean	This user's jabber preference.
- 	 */
- 	function getJabberOnly() {
- 		return $this->data_array['jabber_only'];
- 	}
- 
- 	/**
 -	 *	getAddress - get this user's address.
 +	 * getAddress - get this user's address.
  	 *
 -	 *	@return text	This user's address.
 +	 * @return	text	This user's address.
  	 */
  	function getAddress() {
  		return $this->data_array['address'];
diff --cc src/common/include/config-vars.php
index 9c159d4,45dd5a7..46941e3
--- a/src/common/include/config-vars.php
+++ b/src/common/include/config-vars.php
@@@ -21,131 -21,411 +21,125 @@@
   * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
   */
  
 -if (isset ($GLOBALS['sys_name'])) {
 +if (file_exists($gfcgfile)) {
  	forge_define_config_item ('forge_name', 'core', $GLOBALS['sys_name']) ;
 -} else {
 -	forge_define_config_item ('forge_name', 'core', 'FusionForge') ;
 -}
 -if (isset ($GLOBALS['sys_force_login'])) {
  	forge_define_config_item ('force_login', 'core', $GLOBALS['sys_force_login']) ;
 -} else {
 -	forge_define_config_item ('force_login', 'core', false) ;
 -}
 -forge_set_config_item_bool ('force_login', 'core') ;
 -if (isset ($GLOBALS['sys_user_reg_restricted'])) {
 +	forge_set_config_item_bool ('force_login', 'core') ;
  	forge_define_config_item ('user_registration_restricted', 'core', $GLOBALS['sys_user_reg_restricted']) ;
 -} else {
 -	forge_define_config_item ('user_registration_restricted', 'core', false) ;
 -}
 -forge_set_config_item_bool ('user_registration_restricted', 'core') ;
 -if (isset ($GLOBALS['sys_project_reg_restricted'])) {
 +	forge_set_config_item_bool ('user_registration_restricted', 'core') ;
  	forge_define_config_item ('project_registration_restricted', 'core', $GLOBALS['sys_project_reg_restricted']) ;
 -} else {
 -	forge_define_config_item ('project_registration_restricted', 'core', false) ;
 -}
 -forge_set_config_item_bool ('project_registration_restricted', 'core') ;
 -forge_define_config_item ('project_auto_approval', 'core', false) ;
 -forge_set_config_item_bool ('project_auto_approval', 'core') ;
 -forge_define_config_item ('project_auto_approval_user', 'core', 'admin') ;
 -forge_define_config_item ('allow_project_without_template', 'core', true) ;
 -forge_set_config_item_bool ('allow_project_without_template', 'core') ;
 -if (isset ($GLOBALS['sys_default_domain'])) {
 +	forge_set_config_item_bool ('project_registration_restricted', 'core') ;
 +	forge_define_config_item ('project_auto_approval', 'core', false) ;
 +	forge_set_config_item_bool ('project_auto_approval', 'core') ;
 +	forge_define_config_item ('project_auto_approval_user', 'core', 'admin') ;
 +	forge_define_config_item ('allow_project_without_template', 'core', true) ;
 +	forge_set_config_item_bool ('allow_project_without_template', 'core') ;
  	forge_define_config_item ('web_host', 'core', $GLOBALS['sys_default_domain']) ;
 -} else {
 -	forge_define_config_item ('web_host', 'core', '') ;
 -}
 -forge_define_config_item ('http_port', 'core', 80) ;
 -forge_define_config_item ('https_port', 'core', 443) ;
 -if (isset ($GLOBALS['sys_apache_user'])) {
 +	forge_define_config_item ('http_port', 'core', 80) ;
 +	forge_define_config_item ('https_port', 'core', 443) ;
  	forge_define_config_item ('apache_user', 'core', $GLOBALS['sys_apache_user']) ;
 -} else {
 -	forge_define_config_item ('apache_user', 'core', '') ;
 -}
 -if (isset ($GLOBALS['sys_apache_group'])) {
  	forge_define_config_item ('apache_group', 'core', $GLOBALS['sys_apache_group']) ;
 -} else {
 -	forge_define_config_item ('apache_group', 'core', '') ;
 -}
 -forge_define_config_item ('scm_tarballs_path', 'core', '$core/data_path/scmtarballs') ;
 -forge_define_config_item ('scm_snapshots_path', 'core', '$core/data_path/scmsnapshots') ;
 -forge_define_config_item ('plugins_path', 'core', '$core/source_path/plugins') ;
 -forge_define_config_item ('themes_root', 'core', '$core/source_path/www/themes') ;
 -if (isset ($GLOBALS['sys_theme'])) {
 +	forge_define_config_item ('scm_tarballs_path', 'core', '$core/data_path/scmtarballs') ;
 +	forge_define_config_item ('scm_snapshots_path', 'core', '$core/data_path/scmsnapshots') ;
 +	forge_define_config_item ('plugins_path', 'core', '$core/source_path/plugins') ;
 +	forge_define_config_item ('themes_root', 'core', '$core/source_path/www/themes') ;
  	forge_define_config_item ('default_theme', 'core', $GLOBALS['sys_theme']) ;
 -} else {
 -	forge_define_config_item ('default_theme', 'core', 'gforge') ;
 -}
 -if (isset ($GLOBALS['sys_lang'])) {
  	forge_define_config_item ('default_language', 'core', $GLOBALS['sys_lang']) ;
 -} else {
 -	forge_define_config_item ('default_language', 'core', 'en') ;
 -}
 -if (isset ($GLOBALS['sys_default_timezone'])) {
  	forge_define_config_item ('default_timezone', 'core', $GLOBALS['sys_default_timezone']) ;
 -} else {
 -	forge_define_config_item ('default_timezone', 'core', 'UTC') ;
 -}
 -if (isset ($GLOBALS['sys_default_country_code'])) {
  	forge_define_config_item ('default_country_code', 'core', $GLOBALS['sys_default_country_code']) ;
 -} else {
 -	forge_define_config_item ('default_country_code', 'core', 'US') ;
 -}
 -if (isset ($GLOBALS['sys_use_scm'])) {
  	forge_define_config_item ('use_scm', 'core', $GLOBALS['sys_use_scm']) ;
 -} else {
 -	forge_define_config_item ('use_scm', 'core', true) ;
 -}
 -forge_set_config_item_bool ('use_scm', 'core') ;
 -if (isset ($GLOBALS['sys_use_dav'])) {
 -	forge_define_config_item ('use_dav', 'core', $GLOBALS['sys_use_dav']) ;
 -} else {
 -	forge_define_config_item ('use_dav', 'core', true) ;
 -}
 -forge_set_config_item_bool ('use_dav', 'core') ;
 -if (isset ($GLOBALS['sys_use_tracker'])) {
 +	forge_set_config_item_bool ('use_scm', 'core') ;
 +	forge_define_config_item ('use_dav', 'core', @$GLOBALS['sys_use_dav']) ;
 +	forge_set_config_item_bool ('use_dav', 'core') ;
  	forge_define_config_item ('use_tracker', 'core', $GLOBALS['sys_use_tracker']) ;
 -} else {
 -	forge_define_config_item ('use_tracker', 'core', true) ;
 -}
 -forge_set_config_item_bool ('use_tracker', 'core') ;
 -if (isset ($GLOBALS['sys_use_forum'])) {
 +	forge_set_config_item_bool ('use_tracker', 'core') ;
  	forge_define_config_item ('use_forum', 'core', $GLOBALS['sys_use_forum']) ;
 -} else {
 -	forge_define_config_item ('use_forum', 'core', true) ;
 -}
 -forge_set_config_item_bool ('use_forum', 'core') ;
 -if (isset ($GLOBALS['sys_use_pm'])) {
 +	forge_set_config_item_bool ('use_forum', 'core') ;
  	forge_define_config_item ('use_pm', 'core', $GLOBALS['sys_use_pm']) ;
 -} else {
 -	forge_define_config_item ('use_pm', 'core', true) ;
 -}
 -forge_set_config_item_bool ('use_pm', 'core') ;
 -if (isset ($GLOBALS['sys_use_docman'])) {
 +	forge_set_config_item_bool ('use_pm', 'core') ;
  	forge_define_config_item ('use_docman', 'core', $GLOBALS['sys_use_docman']) ;
 -} else {
 -	forge_define_config_item ('use_docman', 'core', true) ;
 -}
 -forge_set_config_item_bool ('use_docman', 'core') ;
 -if (isset ($GLOBALS['sys_use_diary'])) {
 +	forge_set_config_item_bool ('use_docman', 'core') ;
  	forge_define_config_item ('use_diary', 'core', $GLOBALS['sys_use_diary']) ;
 -} else {
 -	forge_define_config_item ('use_diary', 'core', false) ;
 -}
 -forge_set_config_item_bool ('use_diary', 'core') ;
 -if (isset ($GLOBALS['sys_use_news'])) {
 +	forge_set_config_item_bool ('use_diary', 'core') ;
  	forge_define_config_item ('use_news', 'core', $GLOBALS['sys_use_news']) ;
 -} else {
 -	forge_define_config_item ('use_news', 'core', true) ;
 -}
 -forge_set_config_item_bool ('use_news', 'core') ;
 -if (isset ($GLOBALS['sys_use_mail'])) {
 +	forge_set_config_item_bool ('use_news', 'core') ;
  	forge_define_config_item ('use_mail', 'core', $GLOBALS['sys_use_mail']) ;
 -} else {
 -	forge_define_config_item ('use_mail', 'core', true) ;
 -}
 -forge_set_config_item_bool ('use_mail', 'core') ;
 -if (isset ($GLOBALS['sys_use_survey'])) {
 +	forge_set_config_item_bool ('use_mail', 'core') ;
  	forge_define_config_item ('use_survey', 'core', $GLOBALS['sys_use_survey']) ;
 -} else {
 -	forge_define_config_item ('use_survey', 'core', true) ;
 -}
 -forge_set_config_item_bool ('use_survey', 'core') ;
 -if (isset ($GLOBALS['sys_use_frs'])) {
 +	forge_set_config_item_bool ('use_survey', 'core') ;
  	forge_define_config_item ('use_frs', 'core', $GLOBALS['sys_use_frs']) ;
 -} else {
 -	forge_define_config_item ('use_frs', 'core', true) ;
 -}
 -forge_set_config_item_bool ('use_frs', 'core') ;
 -if (isset ($GLOBALS['sys_use_project_tags'])) {
 +	forge_set_config_item_bool ('use_frs', 'core') ;
  	forge_define_config_item ('use_project_tags', 'core', $GLOBALS['sys_use_project_tags']) ;
 -} else {
 -	forge_define_config_item ('use_project_tags', 'core', true) ;
 -}
 -forge_set_config_item_bool ('use_project_tags', 'core') ;
 -if (isset ($GLOBALS['sys_use_project_full_list'])) {
 +	forge_set_config_item_bool ('use_project_tags', 'core') ;
  	forge_define_config_item ('use_project_full_list', 'core', $GLOBALS['sys_use_project_full_list']) ;
 -} else {
 -	forge_define_config_item ('use_project_full_list', 'core', true) ;
 -}
 -forge_set_config_item_bool ('use_project_full_list', 'core') ;
 -if (isset ($GLOBALS['sys_use_fti'])) {
 +	forge_set_config_item_bool ('use_project_full_list', 'core') ;
  	forge_define_config_item ('use_fti', 'core', $GLOBALS['sys_use_fti']) ;
 -} else {
 -	forge_define_config_item ('use_fti', 'core', true) ;
 -}
 -forge_set_config_item_bool ('use_fti', 'core') ;
 -if (isset ($GLOBALS['sys_use_ftp'])) {
 +	forge_set_config_item_bool ('use_fti', 'core') ;
  	forge_define_config_item ('use_ftp', 'core', $GLOBALS['sys_use_ftp']) ;
 -} else {
 -	forge_define_config_item ('use_ftp', 'core', false) ;
 -}
 -forge_set_config_item_bool ('use_ftp', 'core') ;
 -if (isset ($GLOBALS['sys_use_trove'])) {
 +	forge_set_config_item_bool ('use_ftp', 'core') ;
  	forge_define_config_item ('use_trove', 'core', $GLOBALS['sys_use_trove']) ;
 -} else {
 -	forge_define_config_item ('use_trove', 'core', true) ;
 -}
 -forge_set_config_item_bool ('use_trove', 'core') ;
 -if (isset ($GLOBALS['sys_use_snippet'])) {
 +	forge_set_config_item_bool ('use_trove', 'core') ;
  	forge_define_config_item ('use_snippet', 'core', $GLOBALS['sys_use_snippet']) ;
 -} else {
 -	forge_define_config_item ('use_snippet', 'core', true) ;
 -}
 -forge_set_config_item_bool ('use_snippet', 'core') ;
 -if (isset ($GLOBALS['sys_use_ssl'])) {
 +	forge_set_config_item_bool ('use_snippet', 'core') ;
  	forge_define_config_item ('use_ssl', 'core', $GLOBALS['sys_use_ssl']) ;
 -} else {
 -	forge_define_config_item ('use_ssl', 'core', true) ;
 -}
 -forge_set_config_item_bool ('use_ssl', 'core') ;
 -if (isset ($GLOBALS['sys_use_people'])) {
 +	forge_set_config_item_bool ('use_ssl', 'core') ;
  	forge_define_config_item ('use_people', 'core', $GLOBALS['sys_use_people']) ;
 -} else {
 -	forge_define_config_item ('use_people', 'core', false) ;
 -}
 -forge_set_config_item_bool ('use_people', 'core') ;
 -if (isset ($GLOBALS['sys_use_shell'])) {
 +	forge_set_config_item_bool ('use_people', 'core') ;
  	forge_define_config_item ('use_shell', 'core', $GLOBALS['sys_use_shell']) ;
 -} else {
 -	forge_define_config_item ('use_shell', 'core', true) ;
 -}
 -forge_set_config_item_bool ('use_shell', 'core') ;
 -if (isset ($GLOBALS['sys_use_ratings'])) {
 +	forge_set_config_item_bool ('use_shell', 'core') ;
  	forge_define_config_item ('use_ratings', 'core', $GLOBALS['sys_use_ratings']) ;
 -} else {
 -	forge_define_config_item ('use_ratings', 'core', true) ;
 -}
 -forge_set_config_item_bool ('use_ratings', 'core') ;
 -if (isset ($GLOBALS['sys_use_ftpuploads'])) {
 +	forge_set_config_item_bool ('use_ratings', 'core') ;
  	forge_define_config_item ('use_ftp_uploads', 'core', $GLOBALS['sys_use_ftpuploads']) ;
 -} else {
 -	forge_define_config_item ('use_ftp_uploads', 'core', true) ;
 -}
 -forge_set_config_item_bool ('use_ftp_uploads', 'core') ;
 -if (isset ($GLOBALS['sys_ftp_upload_dir'])) {
 +	forge_set_config_item_bool ('use_ftp_uploads', 'core') ;
  	forge_define_config_item ('ftp_upload_dir', 'core', $GLOBALS['sys_ftp_upload_dir']) ;
 -} else {
 -	forge_define_config_item ('ftp_upload_dir', 'core', '') ;
 -}
 -if (isset ($GLOBALS['sys_upload_dir'])) {
  	forge_define_config_item ('upload_dir', 'core', $GLOBALS['sys_upload_dir']) ;
 -} else {
 -	forge_define_config_item ('upload_dir', 'core', '') ;
 -}
 -forge_define_config_item ('use_manual_uploads', 'core', isset ($GLOBALS['sys_use_manual_uploads']) ? $GLOBALS['sys_use_manual_uploads'] : false) ;
 -forge_set_config_item_bool ('use_manual_uploads', 'core') ;
 -if (isset ($GLOBALS['sys_use_gateways'])) {
 +	forge_define_config_item ('use_manual_uploads', 'core', isset ($GLOBALS['sys_use_manual_uploads']) ? $GLOBALS['sys_use_manual_uploads'] : false) ;
 +	forge_set_config_item_bool ('use_manual_uploads', 'core') ;
  	forge_define_config_item ('use_gateways', 'core', $GLOBALS['sys_use_gateways']) ;
 -} else {
 -	forge_define_config_item ('use_gateways', 'core', true) ;
 -}
 -forge_set_config_item_bool ('use_gateways', 'core') ;
 -if (isset ($GLOBALS['sys_use_project_vhost'])) {
 +	forge_set_config_item_bool ('use_gateways', 'core') ;
  	forge_define_config_item ('use_project_vhost', 'core', $GLOBALS['sys_use_project_vhost']) ;
 -} else {
 -	forge_define_config_item ('use_project_vhost', 'core', true) ;
 -}
 -forge_set_config_item_bool ('use_project_vhost', 'core') ;
 -if (isset ($GLOBALS['sys_use_project_database'])) {
 +	forge_set_config_item_bool ('use_project_vhost', 'core') ;
  	forge_define_config_item ('use_project_database', 'core', $GLOBALS['sys_use_project_database']) ;
 -} else {
 -	forge_define_config_item ('use_project_database', 'core', false) ;
 -}
 -forge_set_config_item_bool ('use_project_database', 'core') ;
 -if (isset ($GLOBALS['sys_use_project_multimedia'])) {
 +	forge_set_config_item_bool ('use_project_database', 'core') ;
  	forge_define_config_item ('use_project_multimedia', 'core', $GLOBALS['sys_use_project_multimedia']) ;
 -} else {
 -	forge_define_config_item ('use_project_multimedia', 'core', false) ;
 -}
 -forge_set_config_item_bool ('use_project_multimedia', 'core') ;
 -if (isset ($GLOBALS['sys_download_host'])) {
 -	forge_define_config_item ('download_host', 'core', $GLOBALS['sys_download_host']) ;
 -} else {
 -	forge_define_config_item ('download_host', 'core', '') ;
 -}
 -if (isset ($GLOBALS['sys_shell_host'])) {
 +	forge_set_config_item_bool ('use_project_multimedia', 'core') ;
  	forge_define_config_item ('shell_host', 'core', $GLOBALS['sys_shell_host']) ;
 -} else {
 -	forge_define_config_item ('shell_host', 'core', '') ;
 -}
 -if (isset ($GLOBALS['sys_users_host'])) {
  	forge_define_config_item ('users_host', 'core', $GLOBALS['sys_users_host']) ;
 -} else {
 -	forge_define_config_item ('users_host', 'core', '') ;
 -}
 -if (isset ($GLOBALS['sys_lists_host'])) {
  	forge_define_config_item ('lists_host', 'core', $GLOBALS['sys_lists_host']) ;
 -} else {
 -	forge_define_config_item ('lists_host', 'core', '') ;
 -}
 -if (isset ($GLOBALS['sys_scm_host'])) {
  	forge_define_config_item ('scm_host', 'core', $GLOBALS['sys_scm_host']) ;
 -} else {
 -	forge_define_config_item ('scm_host', 'core', '') ;
 -}
 -if (isset ($GLOBALS['sys_forum_return_domain'])) {
  	forge_define_config_item ('forum_return_domain', 'core', $GLOBALS['sys_forum_return_domain']) ;
- 	forge_define_config_item ('use_jabber', 'core', $GLOBALS['sys_use_jabber']) ;
- 	forge_set_config_item_bool ('use_jabber', 'core') ;
- 	forge_define_config_item ('jabber_host', 'core', $GLOBALS['sys_jabber_server']) ;
- 	forge_define_config_item ('jabber_port', 'core', $GLOBALS['sys_jabber_port']) ;
- 	forge_define_config_item ('jabber_user', 'core', $GLOBALS['sys_jabber_user']) ;
- 	forge_define_config_item ('jabber_password', 'core', isset($GLOBALS['sys_jabber_pass']) ? $GLOBALS['sys_jabber_pass'] : '') ;
 -} else {
 -	forge_define_config_item ('forum_return_domain', 'core', '') ;
 -}
 -if (isset ($GLOBALS['sys_ldap_host'])) {
  	forge_define_config_item ('ldap_host', 'core', $GLOBALS['sys_ldap_host']) ;
 -} else {
 -	forge_define_config_item ('ldap_host', 'core', '') ;
 -}
 -if (isset ($GLOBALS['sys_ldap_port'])) {
  	forge_define_config_item ('ldap_port', 'core', $GLOBALS['sys_ldap_port']) ;
 -} else {
 -	forge_define_config_item ('ldap_port', 'core', '') ;
 -}
 -if (isset ($GLOBALS['sys_ldap_version'])) {
  	forge_define_config_item ('ldap_version', 'core', $GLOBALS['sys_ldap_version']) ;
 -} else {
 -	forge_define_config_item ('ldap_version', 'core', 3) ;
 -}
 -if (isset ($GLOBALS['sys_ldap_base_dn'])) {
  	forge_define_config_item ('ldap_base_dn', 'core', $GLOBALS['sys_ldap_base_dn']) ;
 -} else {
 -	forge_define_config_item ('ldap_base_dn', 'core', '') ;
 -}
 -if (isset ($GLOBALS['sys_ldap_bind_dn'])) {
  	forge_define_config_item ('ldap_bind_dn', 'core', $GLOBALS['sys_ldap_bind_dn']) ;
 -} else {
 -	forge_define_config_item ('ldap_bind_dn', 'core', '') ;
 -}
 -if (isset ($GLOBALS['sys_ldap_admin_dn'])) {
  	forge_define_config_item ('ldap_admin_dn', 'core', $GLOBALS['sys_ldap_admin_dn']) ;
 -} else {
 -	forge_define_config_item ('ldap_admin_dn', 'core', '') ;
 -}
 -forge_define_config_item ('ldap_password', 'core', isset($GLOBALS['sys_ldap_passwd']) ? $GLOBALS['sys_ldap_passwd'] : '') ;
 -if (isset ($GLOBALS['sys_news_group'])) {
 +	forge_define_config_item ('ldap_password', 'core', isset($GLOBALS['sys_ldap_passwd']) ? $GLOBALS['sys_ldap_passwd'] : '') ;
  	forge_define_config_item ('news_group', 'core', $GLOBALS['sys_news_group']) ;
 -} else {
 -	forge_define_config_item ('news_group', 'core', 2) ;
 -}
 -if (isset ($GLOBALS['sys_stats_group'])) {
  	forge_define_config_item ('stats_group', 'core', $GLOBALS['sys_stats_group']) ;
 -} else {
 -	forge_define_config_item ('stats_group', 'core', 3) ;
 -}
 -if (isset ($GLOBALS['sys_peer_rating_group'])) {
  	forge_define_config_item ('peer_rating_group', 'core', $GLOBALS['sys_peer_rating_group']) ;
 -} else {
 -	forge_define_config_item ('peer_rating_group', 'core', 4) ;
 -}
 -if (isset ($GLOBALS['sys_template_group'])) {
  	forge_define_config_item ('template_group', 'core', $GLOBALS['sys_template_group']) ;
 -} else {
 -	forge_define_config_item ('template_group', 'core', 5) ;
 -}
 -if (isset ($GLOBALS['sys_sendmail_path'])) {
  	forge_define_config_item ('sendmail_path', 'core', $GLOBALS['sys_sendmail_path']) ;
 -} else {
 -	forge_define_config_item ('sendmail_path', 'core', '/usr/sbin/sendmail') ;
 -}
 -if (isset ($GLOBALS['sys_path_to_mailman'])) {
  	forge_define_config_item ('mailman_path', 'core', $GLOBALS['sys_path_to_mailman']) ;
 -} else {
 -	forge_define_config_item ('mailman_path', 'core', '') ;
 -}
 -if (isset ($GLOBALS['sys_path_to_jpgraph'])) {
  	forge_define_config_item ('jpgraph_path', 'core', $GLOBALS['sys_path_to_jpgraph']) ;
 -} else {
 -	forge_define_config_item ('jpgraph_path', 'core', '') ;
 -}
 -if (isset ($GLOBALS['sys_account_manager_type'])) {
  	forge_define_config_item ('account_manager_type', 'core', $GLOBALS['sys_account_manager_type']) ;
 -} else {
 -	forge_define_config_item ('account_manager_type', 'core', '') ;
 -}
 -if (isset ($GLOBALS['unix_cipher'])) {
  	forge_define_config_item ('unix_cipher', 'core', $GLOBALS['unix_cipher']) ;
 -} else {
 -	forge_define_config_item ('unix_cipher', 'core', '') ;
 -}
 -if (isset ($GLOBALS['homedir_prefix'])) {
  	forge_define_config_item ('homedir_prefix', 'core', $GLOBALS['homedir_prefix']) ;
 -} else {
 -	forge_define_config_item ('homedir_prefix', 'core', '') ;
 -}
 -if (isset ($GLOBALS['groupdir_prefix'])) {
  	forge_define_config_item ('groupdir_prefix', 'core', $GLOBALS['groupdir_prefix']) ;
 -} else {
 -	forge_define_config_item ('groupdir_prefix', 'core', '') ;
 -}
 -if (isset ($GLOBALS['sys_urlroot'])) {
  	forge_define_config_item ('url_root', 'core', $GLOBALS['sys_urlroot']) ;
 -} else {
 -	forge_define_config_item ('url_root', 'core', '') ;
 -}
 -if (isset ($GLOBALS['sys_urlprefix'])) {
  	forge_define_config_item ('url_prefix', 'core', $GLOBALS['sys_urlprefix']) ;
 -} else {
 -	forge_define_config_item ('url_prefix', 'core', '') ;
 -}
 -if (isset ($GLOBALS['sys_images_url'])) {
  	forge_define_config_item ('images_url', 'core', $GLOBALS['sys_images_url']) ;
 -} else {
 -	forge_define_config_item ('images_url', 'core', '') ;
 -}
 -if (isset ($GLOBALS['sys_images_secure_url'])) {
  	forge_define_config_item ('images_secure_url', 'core', $GLOBALS['sys_images_secure_url']) ;
 -} else {
 -	forge_define_config_item ('images_secure_url', 'core', '') ;
 -}
 -if (isset ($GLOBALS['sys_admin_email'])) {
  	forge_define_config_item ('admin_email', 'core', $GLOBALS['sys_admin_email']) ;
 -} else {
 -	forge_define_config_item ('admin_email', 'core', '') ;
 -}
 -if (isset ($GLOBALS['sys_session_key'])) {
  	forge_define_config_item ('session_key', 'core', $GLOBALS['sys_session_key']) ;
 -} else {
 -	forge_define_config_item ('session_key', 'core', '') ;
 -}
 -if (isset ($GLOBALS['sys_session_expire'])) {
  	forge_define_config_item ('session_expire', 'core', $GLOBALS['sys_session_expire']) ;
 -} else {
 -	forge_define_config_item ('session_expire', 'core', 0) ;
 -}
 -if (isset ($GLOBALS['sys_show_source'])) {
  	forge_define_config_item ('show_source', 'core', $GLOBALS['sys_show_source']) ;
 -} else {
 -	forge_define_config_item ('show_source', 'core', true) ;
 -}
 -forge_set_config_item_bool ('show_source', 'core') ;
 -if (isset ($GLOBALS['default_trove_cat'])) {
 +	forge_set_config_item_bool ('show_source', 'core') ;
  	forge_define_config_item ('default_trove_cat', 'core', $GLOBALS['default_trove_cat']) ;
 -} else {
 -	forge_define_config_item ('default_trove_cat', 'core', 18) ;
 -}
 -if (isset ($GLOBALS['sys_require_accept_conditions'])) {
  	forge_define_config_item ('user_registration_accept_conditions', 'core', $GLOBALS['sys_require_accept_conditions']);
 -} else {
 -	forge_define_config_item ('user_registration_accept_conditions', 'core', false);
 +	forge_set_config_item_bool ('user_registration_accept_conditions', 'core') ;
 +	forge_define_config_item ('compression_method', 'core', 'gzip') ;
  }
 -forge_set_config_item_bool ('user_registration_accept_conditions', 'core') ;
  
  // Arch plugin
  if (file_exists ($gfconfig.'plugins/scmarch/config.php')) {
diff --cc src/common/include/pre.php
index b5f89ac,b5c09ba..b1c4f8f
--- a/src/common/include/pre.php
+++ b/src/common/include/pre.php
@@@ -84,55 -72,33 +84,51 @@@ function setconfigfromoldsources ($sec
  	if (isset ($GLOBALS[$glob])) {
  		forge_define_config_item ($var, $sec,
  					  $GLOBALS[$glob]) ;
 -		return ;
 +		return true;
  	}
 +	return false;
  }
  
 -if (file_exists ($gfcgfile)) {
 +if (isset($gfcgfile) && file_exists ($gfcgfile)) {
  	require_once $gfcgfile ;
 -}
  
 -setconfigfromoldsources ('core', 'database_host',
 -			 'GForgeDbhost', 'sys_gfdbhost', 'sys_dbhost') ;
 -setconfigfromoldsources ('core', 'database_port',
 -			 'GForgeDbport', 'sys_gfdbport', 'sys_dbport') ;
 -setconfigfromoldsources ('core', 'database_name',
 -			 'GForgeDbname', 'sys_gfdbname', 'sys_dbname') ;
 -setconfigfromoldsources ('core', 'database_user',
 -			 'GForgeDbuser', 'sys_gfdbuser', 'sys_dbuser') ;
 -setconfigfromoldsources ('core', 'database_password',
 -			 'GForgeDbpasswd', 'sys_gfdbpasswd', 'sys_dbpasswd') ;
 -setconfigfromoldsources ('core', 'ldap_password',
 -			 'GForgeLdapPasswd', 'sys_gfldap_passwd', NULL) ;
 -
 -forge_define_config_item ('source_path', 'core', $fusionforge_basedir) ;
 -forge_define_config_item ('data_path', 'core', '/var/lib/gforge') ;
 -forge_define_config_item ('chroot', 'core', '$core/data_path/chroot') ;
 -forge_define_config_item ('config_path', 'core', '/etc/gforge') ;
 -
 -require_once $gfcommon.'include/config-vars.php';
 +	setconfigfromoldsources ('core', 'database_host',
 +				 'GForgeDbhost', 'sys_gfdbhost', 'sys_dbhost') ;
 +	setconfigfromoldsources ('core', 'database_port',
 +				 'GForgeDbport', 'sys_gfdbport', 'sys_dbport') ;
 +	setconfigfromoldsources ('core', 'database_name',
 +				 'GForgeDbname', 'sys_gfdbname', 'sys_dbname') ;
 +	setconfigfromoldsources ('core', 'database_user',
 +				 'GForgeDbuser', 'sys_gfdbuser', 'sys_dbuser') ;
 +	setconfigfromoldsources ('core', 'database_password',
 +				 'GForgeDbpasswd', 'sys_gfdbpasswd', 'sys_dbpasswd') ;
 +	setconfigfromoldsources ('core', 'ldap_password',
 +				 'GForgeLdapPasswd', 'sys_gfldap_passwd', NULL) ;
 +	setconfigfromoldsources ('core', 'session_key',
 +				 'GForgeSessionKey', 'sys_session_key', NULL) ;
- 	setconfigfromoldsources ('core', 'jabber_password',
- 				 'GForgeJabberPasswd', 'sys_gfjabber_pass', NULL) ;
 +
 +	forge_define_config_item ('source_path', 'core', $fusionforge_basedir) ;
 +	forge_define_config_item ('data_path', 'core', '/var/lib/gforge') ;
 +	forge_define_config_item ('chroot', 'core', '$core/data_path/chroot') ;
 +	forge_define_config_item ('config_path', 'core', '/etc/gforge') ;
 +
 +	require_once $gfcommon.'include/config-vars.php';
 +} else {
 +	setconfigfromenv ('core', 'database_host',
 +				 'GForgeDbhost', 'sys_gfdbhost') ;
 +	setconfigfromenv ('core', 'database_port',
 +				 'GForgeDbport', 'sys_gfdbport') ;
 +	setconfigfromenv ('core', 'database_name',
 +				 'GForgeDbname', 'sys_gfdbname') ;
 +	setconfigfromenv ('core', 'database_user',
 +				 'GForgeDbuser', 'sys_gfdbuser') ;
 +	setconfigfromenv ('core', 'database_password',
 +				 'GForgeDbpasswd', 'sys_gfdbpasswd') ;
 +	setconfigfromenv ('core', 'ldap_password',
 +				 'GForgeLdapPasswd', 'sys_gfldap_passwd') ;
- 	setconfigfromenv ('core', 'jabber_password',
- 				 'GForgeJabberPasswd', 'sys_gfjabber_pass') ;
 +	setconfigfromenv ('core', 'session_key',
 +				 'GForgeSessionKey', 'sys_session_key') ;
 +}
  
  forge_read_config_file ($gfconfig.'/config.ini') ;
  forge_read_config_dir ($gfconfig.'/config.ini.d/') ;
@@@ -241,61 -206,51 +237,56 @@@ require $gfcommon.'include/constants.ph
  require_once $gfcommon.'include/Error.class.php';
  
  // Database abstraction
 -require_once $gfcommon.'include/database-pgsql.php';
 +// From here database is required
 +if (forge_get_config('database_name') != "") {
 +	require_once $gfcommon.'include/database-pgsql.php';
  
 -// Authentication and access control
 -require_once $gfcommon.'include/session.php';
 -require_once $gfcommon.'include/RBACEngine.class.php';
 +	// Authentication and access control
 +	require_once $gfcommon.'include/session.php';
 +	require_once $gfcommon.'include/RBACEngine.class.php';
  
  
 -// System library
 -require_once $gfcommon.'include/System.class.php';
 -forge_define_config_item('account_manager_type', 'core', 'UNIX') ;
 -require_once $gfcommon.'include/system/'.forge_get_config('account_manager_type').'.class.php';
 -$amt = forge_get_config('account_manager_type') ;
 -$SYS = new $amt();
 +	// System library
 +	require_once $gfcommon.'include/System.class.php';
 +	forge_define_config_item('account_manager_type', 'core', 'UNIX') ;
 +	require_once $gfcommon.'include/system/'.forge_get_config('account_manager_type').'.class.php';
 +	$amt = forge_get_config('account_manager_type') ;
 +	$SYS = new $amt();
  
 -// User-related classes and functions
 -require_once $gfcommon.'include/User.class.php';
 +	// User-related classes and functions
 +	require_once $gfcommon.'include/User.class.php';
  
 -// Project-related classes and functions
 -require_once $gfcommon.'include/Group.class.php';
 +	// Project-related classes and functions
 +	require_once $gfcommon.'include/Group.class.php';
  
 -// Permission-related functions
 -require_once $gfcommon.'include/Permission.class.php';
 +	// Permission-related functions
 +	require_once $gfcommon.'include/Permission.class.php';
  
 -// Plugins subsystem
 -require_once $gfcommon.'include/Plugin.class.php' ;
 -require_once $gfcommon.'include/PluginManager.class.php' ;
 +	// Plugins subsystem
 +	require_once $gfcommon.'include/Plugin.class.php' ;
 +	require_once $gfcommon.'include/PluginManager.class.php' ;
  
 -// SCM-specific plugins subsystem
 -require_once $gfcommon.'include/SCMPlugin.class.php' ;
 +	// SCM-specific plugins subsystem
 +	require_once $gfcommon.'include/SCMPlugin.class.php' ;
  
 -if (getenv ('FUSIONFORGE_NO_PLUGINS') != 'true') {
 -	setup_plugin_manager () ;
 -}
 +	// Authentication-specific plugins subsystem
 +	require_once $gfcommon.'include/AuthPlugin.class.php' ;
  
 -ini_set('date.timezone', forge_get_config ('default_timezone'));
 +	if (getenv ('FUSIONFORGE_NO_PLUGINS') != 'true') {
 +		setup_plugin_manager () ;
 +	}
  
- 	// Jabber subsystem
- 	if (forge_get_config('use_jabber')) {
- 		require_once $gfcommon.'include/Jabber.class.php';
- 	}
- 
 -if (isset($_SERVER['SERVER_SOFTWARE'])) { // We're on the web
 -	// Detect upload larger that upload allowed size.
 -	if ( $_SERVER['REQUEST_METHOD'] == 'POST' && empty($_POST) &&
 -		empty($_FILES) && $_SERVER['CONTENT_LENGTH'] > 0 )
 -	{
 -		$displayMaxSize = ini_get('post_max_size');
 +	ini_set('date.timezone', forge_get_config ('default_timezone'));
  
 -		switch ( substr($displayMaxSize,-1) )
 +	if (isset($_SERVER['SERVER_SOFTWARE'])) { // We're on the web
 +		// Detect upload larger that upload allowed size.
 +		if ( $_SERVER['REQUEST_METHOD'] == 'POST' && empty($_POST) &&
 +		     empty($_FILES) && $_SERVER['CONTENT_LENGTH'] > 0 )
  		{
 +			$displayMaxSize = ini_get('post_max_size');
 +
 +			switch ( substr($displayMaxSize,-1) )
 +			{
  			case 'G':
  				$displayMaxSize = $displayMaxSize * 1024;
  			case 'M':
diff --cc src/docs/docbook/docbook/installation_guide/installation_guide.xml
index 6dd823d,231d2a2..c90fc8f
--- a/src/docs/docbook/docbook/installation_guide/installation_guide.xml
+++ b/src/docs/docbook/docbook/installation_guide/installation_guide.xml
@@@ -886,14 -882,16 +882,9 @@@ DEFINE("USE_CACHE", false)
        <section>
          <title>Perl</title>
          <para>If you want to use some of the Perl scripts that access the database, you'll need the <literal>DBI</literal> and <literal>DBD::Pg</literal> Perl modules.  On Red Hat systems (and variants), you can get them by installing the <literal>libdbi</literal> and <literal>libdbd-pgsql</literal> packages.  On Debian systems (and variants), the packages are called <literal>libdbi-perl</literal> and <literal>libdbd-pg-perl</literal>.</para>
 -        <para>You'll also need to install <filename>utils/include.pl</filename> to <filename class="directory">/usr/share/gforge/lib/</filename>, and put some configuration variables into <filename class="directory">/etc/gforge/local.pl</filename>.  In particular, you'll need something like the following in <filename>local.pl</filename>:</para>
 -        <programlisting>
 -$sys_default_domain = 'gforge.company.com' ;
 -$sys_dbhost = '192.168.12.34' ;
 -$sys_dbname = 'gforge' ;
 -$sys_dbuser = 'gforge' ;
 -$sys_dbpasswd = 'p455w0rd' ;
 -</programlisting>
 +        <para>You'll also need to install <filename>utils/include.pl</filename> to <filename class="directory">/usr/share/gforge/lib/</filename>.</para>
        </section>
        <section>
-         <title>Jabber Support</title>
-         <para>FusionForge supports the sending of messages to jabber accounts. To accomplish this, you must have a user account setup on the jabber server that gforge can connect to and send messages.</para>
-         <para>Once you have that user account, server, and password set up, just edit <filename>/etc/gforge/local.inc</filename> and add the information to the jabber section.</para>
-       </section>
-       <section>
          <title>Peer Ratings</title>
          <para>Add yourself, and any others you wish, to the <quote>Peer Ratings</quote> project, which should be at <literal>/projects/peerrating/</literal> on the website. Make yourself an admininistrator of the project, and then proceed to <quote>rate</quote> other users on the website.</para>
          <para>Members of the <quote>Peer Ratings</quote> project, who are administrator of the project, become the first trusted users. This is the only way to prime the pump for the peer ratings system.</para>
diff --cc src/etc/httpd.conf.d/secrets.inc
index 1006684,7fe3fde..08b50cf
--- a/src/etc/httpd.conf.d/secrets.inc
+++ b/src/etc/httpd.conf.d/secrets.inc
@@@ -18,9 -18,3 +18,6 @@@ RequestHeader append GForgeDbpasswd "{c
  
  RequestHeader unset GForgeLdapPasswd
  RequestHeader append GForgeLdapPasswd "{core/ldap_password}"
 +
- RequestHeader unset GForgeJabberPasswd
- RequestHeader append GForgeJabberPasswd "{core/jabber_password}"
- 
 +RequestHeader unset GForgeSessionKey
 +RequestHeader append GForgeSessionKey "{core/session_key}"
diff --cc src/plugins/authldap/include/AuthLDAPPlugin.class.php
index 77b3b3a,0000000..b756fc7
mode 100644,000000..100644
--- a/src/plugins/authldap/include/AuthLDAPPlugin.class.php
+++ b/src/plugins/authldap/include/AuthLDAPPlugin.class.php
@@@ -1,342 -1,0 +1,342 @@@
 +<?php
 +/** External authentication via LDAP for FusionForge
 + * Copyright 2003, Roland Mas <lolando at debian.org>
 + * Copyright 2004, Roland Mas <roland at gnurandal.com>
 + *                 The Gforge Group, LLC <http://gforgegroup.com/>
 + * Copyright 2004, Christian Bayle <bayle at debian.org>
 + * Copyright 2009-2010, Alain Peyrat, Alcatel-Lucent
 + * Copyright 2009, Chris Dalzell, OpenGameForge.org
 + * Copyright 2011, Roland Mas
 + *
 + * This file is part of FusionForge. FusionForge is free software;
 + * you can redistribute it and/or modify it under the terms of the
 + * GNU General Public License as published by the Free Software
 + * Foundation; either version 2 of the Licence, or (at your option)
 + * any later version.
 + *
 + * FusionForge is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License along
 + * with FusionForge; if not, write to the Free Software Foundation, Inc.,
 + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 + */
 +
 +require_once $GLOBALS['gfcommon'].'include/User.class.php';
 +
 +class AuthLDAPPlugin extends ForgeAuthPlugin {
 +	protected $saved_login;
 +	protected $saved_password;
 +	protected $saved_data;
 +
 +	function AuthLDAPPlugin() {
 +		global $gfconfig;
 +		$this->ForgeAuthPlugin();
 +		$this->name = "authldap";
 +		$this->text = "LDAP authentication";
 +
 +		$this->_addHook('display_auth_form');
 +		$this->_addHook("check_auth_session");
 +		$this->_addHook("fetch_authenticated_user");
 +		$this->_addHook("sync_account_info");
 +		$this->_addHook("close_auth_session");
 +
 +		$this->ldap_conn = false;
 +		$this->saved_login = '';
 +		$this->saved_password = '';
 +		$this->saved_data = array();
 +
 +		$this->declareConfigVars();
 +	}
 +
 +	function syncAccountInfo($params) {
 +		if (!$this->syncDataOn($params['event'])) {
 +			return true;
 +		}
 +		$n = $params['username'];
 +		$data = $this->saved_data;
 +
 +		if (!$data) {
 +			$data = $this->fetchDataForUser($n);
 +		}
 +
 +		if (!$data) {
 +			error_log("No data to sync from LDAP for username ".$n);
 +			return true;
 +		}
 +
 +		$u = user_get_object_by_name($n);
 +
 +		if (!$u) {
 +			// No user by that name yet, let's create it
 +
 +			$u = new GFUser();
 +
 +			$user_data = array();
 +
 +			$user_data['unix_name'] = $n;
 +			$user_data['firstname'] = '';
 +			$user_data['lastname'] = '';
 +			if ($this->saved_password == '') {
 +				$user_data['password1'] = 'INVALID';
 +			} else {
 +				$user_data['password1'] = $this->saved_password;
 +			}
 +			$user_data['password2'] = $user_data['password1'];
 +			$user_data['email'] = '';
 +			$user_data['mail_site'] = 1;
 +			$user_data['mail_va'] = 0;
 +			$user_data['language_id'] = 1;
 +			$user_data['timezone'] = 'GMT';
 +			$user_data['jabber_address'] = '';
 +			$user_data['jabber_only'] = 0;
 +			$user_data['theme_id'] = 1;
 +			$user_data['unix_box'] = '';
 +			$user_data['address'] = '';
 +			$user_data['address2'] = '';
 +			$user_data['phone'] = '';
 +			$user_data['fax'] = '';
 +			$user_data['title'] = '';
 +			$user_data['ccode'] = 'US';
 +			$send_mail = false;
 +
 +			foreach (explode(',', forge_get_config('mapping', $this->name))
 +				 as $map_entry) {
 +				list ($fffield, $ldapfield) = explode('=',$map_entry);
 +				if (array_key_exists($ldapfield, $data)) {
 +					$user_data[$fffield] = $data[$ldapfield][0];
 +				}
 +			}
 +
 +			if (!$u->create ($user_data['unix_name'],
 +					 $user_data['firstname'],
 +					 $user_data['lastname'],
 +					 $user_data['password1'],
 +					 $user_data['password2'],
 +					 $user_data['email'],
 +					 $user_data['mail_site'],
 +					 $user_data['mail_va'],
 +					 $user_data['language_id'],
 +					 $user_data['timezone'],
 +					 $user_data['jabber_address'],
 +					 $user_data['jabber_only'],
 +					 $user_data['theme_id'],
 +					 $user_data['unix_box'],
 +					 $user_data['address'],
 +					 $user_data['address2'],
 +					 $user_data['phone'],
 +					 $user_data['fax'],
 +					 $user_data['title'],
 +					 $user_data['ccode'],
 +					 $send_mail)) {
 +				return false;
 +			}
 +
 +			if (!$u->setStatus ('A')) {
 +				return false;
 +			}
 +		}
 +
 +		if ($u->getStatus() == 'D') {
 +			$u->setStatus('A');
 +		}
 +		if ($this->saved_password != ''
 +		    && !session_check_credentials_in_database($this->saved_login, $this->saved_password, false)) {
 +			$u->setPasswd($this->saved_password);
 +		}
 +
 +		$mapped_data = array(
 +			'username' => $u->getUnixName(),
 +			'md5_password' => '',
 +			'unix_password' => '',
 +			'firstname' => $u->getFirstName(),
 +			'lastname' => $u->getLastName(),
 +			'email' => $u->getEmail(),
 +			'phone' => $u->getPhone()
 +			);
 +
 +		foreach (explode(',', forge_get_config('mapping', $this->name))
 +			 as $map_entry) {
 +			list ($fffield, $ldapfield) = explode('=',$map_entry);
 +			if (array_key_exists($ldapfield, $data)) {
 +				$mapped_data[$fffield] = $data[$ldapfield][0];
 +			}
 +		}
 +
 +		$u->update($mapped_data['firstname'],
 +			   $mapped_data['lastname'],
 +			   $u->getLanguage(),
 +			   $u->getTimeZone(),
 +			   $u->getMailingsPrefs('site'),
 +			   $u->getMailingsPrefs('va'),
 +			   $u->usesRatings(),
- 			   $u->getJabberAddress(),
- 			   $u->getJabberOnly(),
++			   '',
++			   0,
 +			   $u->getThemeID(),
 +			   $u->getAddress(),
 +			   $u->getAddress2(),
 +			   $mapped_data['phone'],
 +			   $u->getFax(),
 +			   $u->getTitle(),
 +			   $u->getCountryCode(),
 +			   $mapped_data['email']);
 +
 +		$u->setMD5Passwd ($mapped_data['md5_password']);
 +		$u->setUnixPasswd ($mapped_data['unix_password']);
 +	}
 +
 +	function displayAuthForm(&$params) {
 +		if (!$this->isRequired() && !$this->isSufficient()) {
 +			return true;
 +		}
 +		$return_to = $params['return_to'];
 +		$loginname = '';
 +
 +		$result = '';
 +
 +		$result .= '<p>';
 +		$result .= _('Cookies must be enabled past this point.');
 +		$result .= '</p>';
 +
 +		$result .= '<form action="' . util_make_url('/plugins/authldap/post-login.php') . '" method="post">
 +<input type="hidden" name="form_key" value="' . form_generate_key() . '"/>
 +<input type="hidden" name="return_to" value="' . htmlspecialchars(stripslashes($return_to)) . '" />
 +<p>';
 +		$result .= _('LDAP Login name:');
 +		$result .= '<br /><input type="text" name="form_loginname" value="' . htmlspecialchars(stripslashes($loginname)) . '" /></p><p>' . _('Password:') . '<br /><input type="password" name="form_pw" /></p><p><input type="submit" name="login" value="' . _('Login') . '" />
 +</p>
 +</form>';
 +
 +		$params['html_snippets'][$this->name] = $result;
 +	}
 +
 +	protected function declareConfigVars() {
 +		parent::declareConfigVars();
 +
 +		forge_define_config_item('start_tls', $this->name, 'no');
 +		forge_set_config_item_bool('start_tls', $this->name);
 +
 +		forge_define_config_item('ldap_server', $this->name, 'ldap.example.com');
 +		forge_define_config_item('ldap_port', $this->name, 389);
 +		forge_define_config_item('base_dn', $this->name, 'ou=users,dc=example,dc=com');
 +		forge_define_config_item('skipped_users', $this->name, '');
 +		forge_define_config_item('manager_dn', $this->name, '');
 +		forge_define_config_item('manager_password', $this->name, '');
 +	}
 +
 +	/// HELPERS
 +
 +	function fetchDataForUser($loginname) {
 +		if (!$this->ConnectLdap()) {
 +			return false;
 +		}
 +
 +		if (forge_get_config('manager_dn', $this->name)) {
 +			ldap_bind($this->ldap_conn,
 +				   forge_get_config('manager_dn', $this->name),
 +				   forge_get_config('ldap_password'));
 +		} else {
 +			ldap_bind($this->ldap_conn);
 +		}
 +
 +		$fieldname = 'uid';
 +		foreach (explode(',', forge_get_config('mapping', $this->name))
 +			 as $map_entry) {
 +			list ($fffield, $ldapfield) = explode('=',$map_entry);
 +			if ($fffield == 'username') {
 +				$fieldname = $ldapfield;
 +			}
 +		}
 +
 +		$res = ldap_search($this->ldap_conn, forge_get_config('base_dn', $this->name), "($fieldname=$loginname)");
 +		if (!$res || ldap_count_entries($this->ldap_conn, $res) == 0) {
 +			// No user by that name in LDAP directory
 +			return false;
 +		}
 +		$info = ldap_get_entries($this->ldap_conn,$res);
 +		$data = $info[0];
 +		return $data;
 +	}
 +
 +	function checkLDAPCredentials($loginname, $passwd) {
 +		if (!$this->ConnectLdap()) {
 +			// No connection to LDAP directory
 +			if ($this->isRequired()) {
 +				return FORGE_AUTH_AUTHORITATIVE_REJECT;
 +			} else {
 +				return FORGE_AUTH_NOT_AUTHORITATIVE;
 +			}
 +		}
 +
 +		$data = $this->fetchDataForUser($loginname);
 +		if (!$data) {
 +			return FORGE_AUTH_AUTHORITATIVE_REJECT;
 +		}
 +
 +		if (@ldap_bind($this->ldap_conn, $data['dn'], $passwd)) {
 +			// OK
 +			$this->saved_data = $data;
 +			$this->saved_password = $passwd;
 +			return FORGE_AUTH_AUTHORITATIVE_ACCEPT;
 +		} else {
 +			// Probably invalid password
 +			return FORGE_AUTH_AUTHORITATIVE_REJECT;
 +		}
 +	}
 +
 +	function ConnectLDAP() {
 +		if ($this->ldap_conn) {
 +			return true;
 +		}
 +
 +		$server = forge_get_config('ldap_server', $this->name);
 +		$port = forge_get_config('ldap_port', $this->name);
 +		if ($port) {
 +			$conn = ldap_connect($server, $port);
 +		} else {
 +			$conn = ldap_connect($server);
 +		}
 +
 +		if (forge_get_config('ldap_version')) {
 +			debuglog("LDAP: ldap_set_option ($this->ldap_conn, LDAP_OPT_PROTOCOL_VERSION, ".forge_get_config('ldap_version').");");
 +			if (!ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION, forge_get_config('ldap_version'))) {
 +				debuglog("LDAP: ldap_set_option() failed: ".ldap_error($this->ldap_conn));
 +				return false;
 +			}
 +		}
 +
 +		if (forge_get_config('start_tls', $this->name)) {
 +			if (!ldap_start_tls($conn)) {
 +				return false;
 +			}
 +		}
 +
 +		// If the ldap server does not allow anonymous bind,
 +		// then authentificate with the server.
 +		if (forge_get_config('manager_dn', $this->name)) {
 +			if (!@ldap_bind($conn, forge_get_config('manager_dn', $this->name),
 +					forge_get_config('ldap_password'))) {
 +				error_log("LDAP application bind failed.");
 +				return false;
 +			}
 +		}
 +
 +		$this->ldap_conn = $conn;
 +		return true;
 +	}
 +}
 +
 +function debuglog($msg) {
 +	$fp = fopen("/tmp/ldap.log", "a+");
 +	fwrite ($fp, $msg."\n");
 +	fclose($fp);
 +}
 +
 +// Local Variables:
 +// mode: php
 +// c-file-style: "bsd"
 +// End:
 +
 +?>
diff --cc src/plugins/projectimport/www/usersimport.php
index 8a51f3c,0000000..6d5a500
mode 100644,000000..100644
--- a/src/plugins/projectimport/www/usersimport.php
+++ b/src/plugins/projectimport/www/usersimport.php
@@@ -1,279 -1,0 +1,279 @@@
 +<?php
 +
 +/**
 + * User importing script for site admin
 + *
 + * Copyright (c) 2011 Olivier Berger & Institut Telecom
 + *
 + * This program was developped in the frame of the COCLICO project
 + * (http://www.coclico-project.org/) with financial support of the Paris
 + * Region council.
 + *
 + * This file is part of FusionForge. FusionForge is free software;
 + * you can redistribute it and/or modify it under the terms of the
 + * GNU General Public License as published by the Free Software
 + * Foundation; either version 2 of the Licence, or (at your option)
 + * any later version.
 + *
 + * FusionForge is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License along
 + * with FusionForge; if not, write to the Free Software Foundation, Inc.,
 + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 + */
 +
 +// Import users from a JSON file (Site Admin tool)
 +// Users are created in the pending queue, and await forge admin moderation
 +
 +// TODO : add confirmation pass instead of batch insertion
 +
 +require_once('../../../www/env.inc.php');
 +require_once $gfwww.'include/pre.php';
 +require_once $gfwww.'admin/admin_utils.php';
 +
 +require_once $gfplugins.'projectimport/common/ProjectImporter.class.php';
 +require_once $gfplugins.'projectimport/common/UploadedFiles.class.php';
 +
 +include_once('arc/ARC2.php');
 +
 +/**
 + * Manages the display of the page : HTML + forms
 + *
 + * @author Olivier Berger
 + *
 + */
 +class UsersImportPage extends FileManagerPage {
 +
 +	protected $importer;
 +
 +	protected $form_header_already_displayed;
 +
 +	function UsersImportPage($HTML) {
 +		$this->form_header_already_displayed = false;
 +
 +		$this->importer = ProjectImporter::getInstance();
 +
 +		$storage = new SiteAdminFilesDirectory($HTML);
 +
 +		parent::FileManagerPage($HTML, $storage);
 +	}
 +
 +	/**
 +	 * Display initial contents of the page
 +	 * @param string $message
 +	 */
 +	function display_headers($message) {
 +		global $feedback;
 +
 +		$params= array();
 +		$params['title']=_('Users importer');
 +		$params['toptab']='projectimport';
 +
 +		site_admin_header($params);
 +
 +		$this->message .= $message;
 +	}
 +
 +	/**
 +	 * Display the page
 +	 */
 +	function display_main() {
 +
 +		global $feedback;
 +
 +		// Do the work, first !
 +		$html = $this->do_work();
 +
 +		if($this->message) {
 +			echo $this->message . '<br />';
 +		}
 +		html_feedback_top($feedback);
 +
 +		echo $html;
 +
 +		// If invoked initially (not on callback) or if more details needed
 +		// display the last part of the form for JSON file upload
 +		if (! $this->form_header_already_displayed) {
 +			echo '<form enctype="multipart/form-data" action="'.getStringFromServer('PHP_SELF').'" method="post">';
 +			$this->form_header_already_displayed = True;
 +		}
 +
 +		$preselected = False;
 +
 +		if (!$feedback) {
 +			if ($this->posted_selecteddumpfile) {
 +				$preselected = basename($this->posted_selecteddumpfile);
 +			}
 +			elseif ($this->posted_uploadedfile) {
 +				$preselected = $this->posted_uploadedfile;
 +			}
 +		}
 +
 +		$selectiondialog = $this->storage->displayFileSelectionForm($preselected);
 +
 +		echo $selectiondialog;
 +
 +		// finally, display the file upload form
 +		echo '<fieldset><legend>Please upload a file :</legend>
 +		       <p><center>
 +                          <input type="file" id="uploaded_file" name="uploaded_file" tabindex="2" size="30" />
 +                       </center></p>
 +                    </fieldset>
 +                    <div style="text-align:center;">
 +                      <input type="submit" name="submit" value="Submit" />
 +                    </div>
 +              </form>';
 +
 +		site_footer(array());
 +	}
 +
 +	/**
 +	 * Initializes data structures from POSTed data coming from the form input
 +	 */
 +	function initialize_from_submitted_data() {
 +		global $feedback;
 +
 +		$filechosen = $this->initialize_chosenfile_from_submitted();
 +		if($filechosen) {
 +			//print_r($filechosen);
 +			$json = fread(fopen($this->posted_selecteddumpfile, 'r'),filesize($this->posted_selecteddumpfile));
 +				if(! $json) {
 +				$feedback = "Error : missing data";
 +			}
 +			else {
 +
 +				//			print_r($imported_file);
 +				$this->importer->parse_OSLCCoreRDFJSON($json);
 +
 +				$debug = FALSE;
 +				if($debug) {
 +				 // Debug the loaded triples
 +				 $triples = $this->importer->parse_OSLCCoreRDFJSON($json);
 +				 $ser = ARC2::getTurtleSerializer();
 +
 +				 if(count($triples)) {
 +					$this->message .= '<pre>'. nl2br(htmlspecialchars($ser->toTurtle($triples))) . '</pre>';
 +					}
 +				}
 +			}
 +		}
 +
 +		if ((! $this->posted_selecteddumpfile) && (! $this->posted_uploadedfile)) {
 +			$this->feedback(_('Please select an existing file to process, or upload a new one'));
 +		}
 +
 +	}
 +
 +
 +	/**
 +	 * Does the main work
 +	 * @return html string
 +	 */
 +	function do_work() {
 +		global $feedback;
 +
 +		$html = '';
 +
 +		// If the posted JSON file indeed contains a project dump, an importer was created,
 +		// and if it has data we can work
 +		// If it indeed has valid data
 +		if ($this->importer->has_project_dump()) {
 +
 +			$this->message .= "Here are the results from your upload :";
 +
 +			// start HTML output
 +			if (! $this->form_header_already_displayed) {
 +				$this->form_header_already_displayed = true;
 +				$html .= '<form enctype="multipart/form-data" action="'.getStringFromServer('PHP_SELF').'" method="post">';
 +			}
 +
 +			$imported_users = $this->importer->get_user_objs();
 +
 +			if (count($imported_users)) {
 +				$html .= $this->html_generator->boxTop(_("Users found in imported file"));
 +
 +				foreach($imported_users as $user => $user_obj) {
 +
 +					$unix_name = $user_obj->getUnixName();
 +					$email = $user_obj->getEmail();
 +
 +					$firstname = $user_obj->getFirstname();
 +					$lastname = $user_obj->getLastname();
 +
 +					$theme_id=$this->html_generator->getThemeIdFromName(forge_get_config('default_theme'));
 +					$password1 = substr(md5($GLOBALS['session_ser'] . time() . util_randbytes()), 0, 8);
 +					$password2 = $password1;
 +					$language_id = language_name_to_lang_id (choose_language_from_context ());
 +
 +					$new_user = new GFUser();
 +					$res = $new_user->create($unix_name,$firstname,$lastname,$password1,$password2,
- 						$email,$mail_site,$mail_va,$language_id,$timezone,$jabber_address,$jabber_only,$theme_id,'',
++						$email,$mail_site,$mail_va,$language_id,$timezone,'',0,$theme_id,'',
 +						$address,$address2,$phone,$fax,$title,$ccode,$send_mail);
 +
 +					if (!$res) {
 +						$error_msg = $new_user->getErrorMessage();
 +						if ($feedback) $feedback .= '<br />';
 +						$feedback .= 'Import of "'. $unix_name . '": '. $error_msg;
 +
 +						$html .= _('Failed to create user'). ': <pre>'. $unix_name .'</pre>';
 +					}
 +					else {
 +						$html .= _('Created user'). ': <pre>'. $unix_name .'</pre>';
 +					}
 +
 +					$html .= 'User :<br />';
 +					$html .= ' account name : '. $unix_name .'<br />';
 +					$html .= ' email : '. $email .'<br />';
 +					$html .= ' firstname : '. $firstname .'<br />';
 +					$html .= ' lastname : '. $lastname .'<br />';
 +					$html .= '<br/>';
 +				}
 +
 +				$html .= $this->html_generator->boxBottom();
 +
 +			}
 +
 +			else {
 +				$feedback .= 'Found no users<br />';
 +			}
 +		}
 +		return $html;
 +	}
 +
 +
 +}
 +
 +// The user should be forge admin
 +session_require_global_perm ('forge_admin');
 +
 +global $group_id, $feedback;
 +
 +$this_page = new UsersImportPage($HTML);
 +
 +//print_r($_POST);
 +
 +$message = '';
 +
 +// when called back by post form we can initialize some elements provided by the user
 +if (getStringFromRequest('submit')) {
 +
 +	$this_page->initialize_from_submitted_data();
 +
 +}
 +else {
 +	$message .= "You can import a list of users from a JSON RDF document compatible with ForgePlucker's dump format.<br />";
 +}
 +
 +$this_page->display_headers($message);
 +
 +$this_page->display_main();
 +
 +
 +
 +// Local Variables:
 +// mode: php
 +// c-file-style: "bsd"
 +// End:
diff --cc src/www/account/index.php
index d46793e,922bda3..4abd09d
--- a/src/www/account/index.php
+++ b/src/www/account/index.php
@@@ -75,7 -75,7 +73,7 @@@ if (getStringFromRequest('submit')) 
  	$refresh = ($language != $u->getLanguage() || $theme_id != $u->getThemeID());
  
  	if (!$u->update($firstname, $lastname, $language, $timezone, $mail_site, $mail_va, $use_ratings,
- 		$jabber_address,$jabber_only,$theme_id,$address,$address2,$phone,$fax,$title,$ccode,$use_tooltips)) {
 -		'',0,$theme_id,$address,$address2,$phone,$fax,$title,$ccode)) {
++		'',0,$theme_id,$address,$address2,$phone,$fax,$title,$ccode,$use_tooltips)) {
  		form_release_key(getStringFromRequest('form_key'));
  		$error_msg = $u->getErrorMessage();
  		$refresh_url = '/account/?error_msg='.urlencode($error_msg);
diff --cc src/www/account/register.php
index 1a665d3,5b619a6..b1f3902
--- a/src/www/account/register.php
+++ b/src/www/account/register.php
@@@ -83,10 -81,10 +81,10 @@@ if (getStringFromRequest('submit')) 
  			$send_mail = true;
  			$activate_immediately = false;
  		}
 -		
 +
  		$new_user = new GFUser();
  		$register = $new_user->create($unix_name,$firstname,$lastname,$password1,$password2,
- 					      $email,$mail_site,$mail_va,$language_id,$timezone,$jabber_address,$jabber_only,$theme_id,'',
+ 					      $email,$mail_site,$mail_va,$language_id,$timezone,'',0,$theme_id,'',
  					      $address,$address2,$phone,$fax,$title,$ccode,$send_mail);
  		if ($register) {
  			site_header(array('title'=>'Register Confirmation'));
diff --cc src/www/admin/configman.php
index 8d369ed,2a95451..b540c8b
--- a/src/www/admin/configman.php
+++ b/src/www/admin/configman.php
@@@ -30,50 -30,6 +30,46 @@@ require_once('../env.inc.php')
  require_once $gfcommon.'include/pre.php';
  require_once $gfwww.'admin/admin_utils.php';
  
 +$config_depends_on = array(
 +	'ftp_upload_dir' => 'use_ftp',
 +	'https_port' => 'use_ssl',
 +	'images_secure_url' => 'use_ssl',
- 	'jabber_host' => 'use_jabber',
- 	'jabber_port' => 'use_jabber',
- 	'jabber_password' => 'use_jabber',
- 	'jabber_user' => 'use_jabber',
 +	'project_auto_approval_user' => 'project_auto_approval',
 +	'shell_host' => 'use_shell',
 +);
 +
 +class configCheck {
 +	static function account_manager_type($v) { return ($v === 'pgsql'); }
 +	static function chroot($v) { return is_dir($v); }
 +	static function config_path($v) { return is_dir($v); }
 +	static function data_path($v) { return is_dir($v); }
 +	static function default_theme($v) { return db_numrows(db_query_params('SELECT * FROM themes WHERE dirname=$1', array($v))) === 1; }
 +	static function extra_config_dirs($v) { return is_dir($v); }
 +	static function ftp_upload_dir($v) { return is_dir($v); }
 +	static function gitweb_cmd($v) { return is_file($v); }
 +	static function groupdir_prefix($v) { return is_dir($v); }
 +	static function homedir_prefix($v) { return is_dir($v); }
 +	static function installation_environment($v) { return in_array($v, array('production', 'integration', 'development')); }
 +	static function jpgraph_path($v) { return is_dir($v); }
 +	static function log_path($v) { return is_dir($v); }
 +	static function mailman_path($v) { return is_dir($v); }
 +	static function plugins_path($v) { return is_dir($v); }
 +	static function project_auto_approval_user($v) { return db_numrows(db_query_params('SELECT * FROM users WHERE user_name=$1', array($v))) === 1; }
 +	static function repos_path($v) { return is_dir($v); }
 +	static function scm_snapshots_path($v) { return is_dir($v); }
 +	static function scm_tarballs_path($v) { return is_dir($v); }
 +	static function sendmail_path($v) { return is_file($v); }
 +	static function session_key($v) { return ($v !== 'foobar'); }
 +	static function source_path($v) { return is_dir($v); }
 +	static function news_group($v) { return db_numrows(db_query_params('SELECT * FROM groups WHERE group_id=$1', array($v))) === 1; }
 +	static function stats_group($v) { return db_numrows(db_query_params('SELECT * FROM groups WHERE group_id=$1', array($v))) === 1; }
 +	static function template_group($v) { return db_numrows(db_query_params('SELECT * FROM groups WHERE group_id=$1', array($v))) === 1; }
 +	static function peer_rating_group($v) { return db_numrows(db_query_params('SELECT * FROM groups WHERE group_id=$1', array($v))) === 1; }
 +	static function themes_root($v) { return is_dir($v); }
 +	static function upload_dir($v) { return is_dir($v); }
 +	static function url_root($v) { return is_dir($v); }
 +}
 +
  site_admin_header(array('title'=>_('Configuration Manager')));
  
  echo "<h2>".sprintf (_('Configuration from the config API (*.ini files)'))."</h2>" ;
diff --cc src/www/include/user_home.php
index 08393d3,1865505..66cc5b4
--- a/src/www/include/user_home.php
+++ b/src/www/include/user_home.php
@@@ -37,17 -33,115 +37,16 @@@ require_once $gfwww.'include/vote_funct
  $title = _('User Profile');
  $HTML->header(array('title'=>$title));
  
 -echo $HTML->boxTop(_('Personal Information'), _('Personal Information')); ?>
 -
 -<div about="" typeof="sioc:UserAccount">
 +echo $HTML->boxTop(_('Personal Information'), _('Personal Information'));
  
 -<table width="100%" cellpadding="2" cellspacing="2" border="0">
 -<tr>
 -	<td width="150"><?php plugin_hook("user_logo", array('user_id' => $user_id, 'size' => 'l')); ?></td>
 -	<td>
 -
 -<table class="my-layout-table" id="user-profile-personal-info">
 -<tr>
 -	<td>
 -		<?php echo _('User Id:') ?>
 -	</td>
 -	<td>
 -		<strong>
 -<?php
 -//print '<div property ="foaf:member" content="fusionforge:ForgeCommunity">';
 -//echo '</div>';
 -// description as a FusionForge Community member
 -//print '<div property ="dc:Identifier" content="'.$user_id.'">';
 -
 -	if (session_loggedin() && user_ismember(1)) {
 -		echo util_make_link ('/admin/useredit.php?user_id='.$user_id,$user_id);
 -	} else {
 -		echo $user_id;
 -//echo '</div>';
 -	}
  ?>
 -		</strong><?php if(forge_get_config('use_people')) { ?>( <?php echo util_make_link ('/people/viewprofile.php?user_id='.$user_id,'<strong>'._('Skills Profile').'</strong>'); ?> )<?php } ?>
 -	</td>
 -</tr>
 -
 -<tr>
 -	<td><?php echo _('Login name:') ?></td>
 -	<td><strong><span property="sioc:name"><?php
 -		print $user->getUnixName();
 -		?></span></strong></td>
 -</tr>
 -
 -<tr>
 -	<td><?php echo _('Real Name:') ?> </td>
 -	<td>
 -		<div rev="foaf:account">
 -			<div about="#me" typeof="foaf:Person">
 -				<strong><span property="foaf:name"><?php
 -				$user_title = $user->getTitle();
 -				print ($user_title ? $user_title .' ' :''). $user->getRealName();
 -				?></span></strong>
 -			</div>
 -		</div>
 -	</td>
 -</tr>
 -
 -<?php if(!isset($GLOBALS['sys_show_contact_info']) || $GLOBALS['sys_show_contact_info']) { ?>
 -<tr>
 -	<td><?php echo _('Email Address:') ?>: </td>
 -	<td>
 -	<strong><?php
 -		$user_mail=$user->getEmail();
 -		$user_mailsha1=$user->getSha1Email();
 -		// Removed for privacy reasons
 -		//print '<span property="sioc:email" content="'. $user_mail .'">';
 -		print '<span property="sioc:email_sha1" content="'. $user_mailsha1 .'">';
 -		echo util_make_link ('/sendmessage.php?touser='.$user_id, str_replace('@',' @nospam@ ',$user_mail));
 -		echo '</span>';
 -	?></strong>
 -	</td>
 -</tr>
 -
 -<?php if ($user->getAddress() || $user->getAddress2()) { ?>
 -<tr>
 -	<td><?php echo _('Address:'); ?></td>
 -	<td><?php echo $user->getAddress().'<br/>'.$user->getAddress2(); ?></td>
 -</tr>
 -<?php } ?>
 -
 -<?php if ($user->getPhone()) { ?>
 -<tr>
 -	<td><?php echo _('Phone:'); ?></td>
 -	<td><?php
 -//print '<div property="foaf:phone" content="'.$user->getPhone().'">';
 -echo $user->getPhone();
 -//echo '</div>';
 -?></td>
 -</tr>
 -<?php } ?>
 -
 -<?php if ($user->getFax()) { ?>
 -<tr>
 -	<td><?php echo _('FAX:'); ?></td>
 -	<td><?php echo $user->getFax(); ?></td>
 -</tr>
 -<?php } ?>
 -<?php } ?>
 -
 -<tr>
 -	<td>
 -	<?php echo _('Site Member Since:') ?>
 -	</td>
 -	<td><strong><?php print date(_('Y-m-d H:i'), $user->getAddDate()); ?></strong>
 -    </td>
 -</tr>
 -</table>
 -</td>
 -</tr>
 -</table>
 +
 +<div about="" typeof="sioc:UserAccount">
  
- 
  	<?php
 +
 +	echo user_personal_information($user);
 +
  	if (forge_get_config('use_ratings')) {
  		echo $HTML->boxMiddle(_('Peer Rating'), _('Peer Rating'));
          echo '<table class="my-layout-table" id="user-profile-rating">';
diff --cc src/www/include/user_profile.php
index e62de4c,0000000..cdc9e09
mode 100644,000000..100644
--- a/src/www/include/user_profile.php
+++ b/src/www/include/user_profile.php
@@@ -1,186 -1,0 +1,176 @@@
 +<?php
 +/**
 + * Developer Profile Info
 + *
 + * Copyright 1999-2001 (c) VA Linux Systems
 + * Copyright 2010, FusionForge Team
 + * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
 + * 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
 + * GNU General Public License as published by the Free Software
 + * Foundation; either version 2 of the Licence, or (at your option)
 + * any later version.
 + *
 + * FusionForge is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License along
 + * with FusionForge; if not, write to the Free Software Foundation, Inc.,
 + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 + */
 +
 +// This code was extracted from user_home.php and factorized in a function
 +
 +/**
 +* Display user's profile / personal info either in compact or extensive way
 +*
 +* @param object $user
 +* @param boolean $compact
 +* @return string HTML
 +*/
 +function user_personal_information($user, $compact = false, $title = false) {
 +
 +	$user_id = $user->getID();
 +
 +	$user_logo = false;
 +	$params = array('user_id' => $user_id, 'size' => 'l', 'content' => '');
 +	plugin_hook_by_reference('user_logo', $params);
 +	if ($params['content']) {
 +		$user_logo = $params['content'];
 +	}
 +
 +	if($compact) {
 +		$html = '<table>';
 +		if($title) {
 +			$html .= '<tr>
 +						<td colspan="2">'. $title . '</td>
 +					  </tr>';
 +		}
 +	} else {
 +		$html = '<table width="100%" cellpadding="2" cellspacing="2" border="0">';
 +	}
 +
 +	$html .= '<tr>';
 +	if($user_logo) {
 +		$html .= '<td width="150">'. $user_logo .'</td>';
 +	}
 +	else {
 +		$html .= '<td></td>';
 +	}
 +	$html .='<td>
 +
 +			<table class="my-layout-table" id="user-profile-personal-info">
 +			<tr>
 +				<td>'. _('User Id:') . '</td>';
 +
 +	//print '<div property ="foaf:member" content="fusionforge:ForgeCommunity">';
 +	//echo '</div>';
 +	// description as a FusionForge Community member
 +	//print '<div property ="dc:Identifier" content="'.$user_id.'">';
 +	$user_id_html = '';
 +	if (session_loggedin() && forge_check_global_perm('forge_admin')) {
 +		$user_id_html = util_make_link('/admin/useredit.php?user_id='.$user_id, $user_id);
 +	} else {
 +		$user_id_html = $user_id;
 +		//echo '</div>';
 +	}
 +	$html .= '<td><strong>'. $user_id_html .'</strong>';
 +	if(!$compact && forge_get_config('use_people')) {
 +		$html .= '(' . util_make_link ('/people/viewprofile.php?user_id='.$user_id,'<strong>'._('Skills Profile').'</strong>') . ')';
 +	}
 +	$html .= '</td>
 +			</tr>
 +			<tr>
 +				<td>'. _('Login name:') .'</td>
 +				<td><strong><span property="sioc:name">' .
 +	$user->getUnixName() . '</span></strong></td>
 +			</tr>
 +			<tr>
 +				<td>'. _('Real Name:') .'</td>';
 +	$user_title = $user->getTitle();
 +	$user_title_name = $user_title ? $user_title .' ' :'' . $user->getRealName();
 +	$html .= '<td>
 +				<div rev="foaf:account">
 +					<div about="#me" typeof="foaf:Person">
 +						<strong><span property="foaf:name">'.
 +	$user_title_name .'</span></strong>
 +					</div>
 +				</div>
 +				</td>
 +			</tr>';
 +	if (!$compact) {
 +		if(!isset($GLOBALS['sys_show_contact_info']) || $GLOBALS['sys_show_contact_info']) {
 +
 +			$user_mail=$user->getEmail();
 +			$user_mailsha1=$user->getSha1Email();
 +
 +			$html .= '<tr>
 +				<td>'. _('Email Address:') .': </td>
 +				<td><strong>'.
 +
 +			// Removed for privacy reasons
 +			//print '<span property="sioc:email" content="'. $user_mail .'">';
 +					'<span property="sioc:email_sha1" content="'. $user_mailsha1 .'">' .
 +			util_make_link ('/sendmessage.php?touser='.$user_id, str_replace('@',' @nospam@ ',$user_mail)) .
 +					'</span>
 +					</strong>
 +				</td>
 +			</tr>';
 +
- 			if ($user->getJabberAddress()) {
- 				$html .= '
- 			<tr>
- 				<td>'. _('Jabber Address') .'</td>
- 				<td>
- 					<a href="jabber:'. $user->getJabberAddress() .'"><strong>'. $user->getJabberAddress() .'</strong></a>
- 				</td>
- 			</tr>';
- 			}
- 
 +			if ($user->getAddress() || $user->getAddress2()) {
 +				$html .= '<tr>
 +				<td><'. _('Address:') .'</td>
 +				<td>'. $user->getAddress() .'<br/>'. $user->getAddress2() .'</td>
 +			</tr>';
 +			}
 +
 +			if ($user->getPhone()) {
 +				$html .= '<tr>
 +				<td>' . _('Phone:') . '</td>
 +				<td>' .
 +				//print '<div property="foaf:phone" content="'.$user->getPhone().'">';
 +				$user->getPhone()
 +				//echo '</div>';
 +				.'</td>
 +			</tr>';
 +			}
 +
 +			if ($user->getFax()) {
 +				$html .= '<tr>
 +				<td>'. _('FAX:') .'</td>
 +				<td>'. $user->getFax() .'</td>
 +			</tr>';
 +			}
 +		}
 +	}
 +	$html .= '
 +			<tr>
 +				<td>'. _('Site Member Since:') .'</td>
 +				<td><strong>'. relative_date($user->getAddDate()). '</strong>
 +    			</td>
 +			</tr>';
 +	if($compact) {
 +		$user_uri = util_make_url ("/users/". $user->getUnixName() . "/");
 +		$html .= '<tr>
 +					<td><small>'. _('URI:') .'</small></td>
 +					<td><small><a href="'. $user_uri .'">'. $user_uri .'</a></small></td>
 +				</tr>';
 +	}
 +	$html .= '</table>
 +	</td>
 +	</tr>
 +	</table>';
 +
 +	return $html;
 +}
 +
 +// Local Variables:
 +// mode: php
 +// c-file-style: "bsd"
 +// End:
 +
 +?>
diff --cc src/www/soap/common/user.php
index e39be43,d952655..0b854cd
--- a/src/www/soap/common/user.php
+++ b/src/www/soap/common/user.php
@@@ -77,84 -77,6 +77,84 @@@ $server->register
      $uri.'#getUsersByName','rpc','encoded'
  );
  
 +//addUser (unix_name,firstname,lastname,password1,password2,email,
- 	//mail_site,mail_va,language_id,timezone,jabber_address,jabber_only,
++	//mail_site,mail_va,language_id,timezone,dummy1,dummy2,
 +	//theme_id,unix_box='shell',address='',address2='',phone='',fax='',
 +	//title='',ccode='US',send_mail)
 +$server->register(
 +    'addUser',
 +    array('unix_name'=>'xsd:string','firstname'=>'xsd:string',
 +	'lastname'=>'xsd:string','password1'=>'xsd:string',
 +	'password2'=>'xsd:string','email'=>'xsd:string',
 +	'mail_site'=>'xsd:string','mail_va'=>'xsd:string',
 +	'language_id'=>'xsd:int','timezone'=>'xsd:string',
 +	'jabber_address'=>'xsd:string','jabber_only'=>'xsd:int',
 +	'theme_id'=>'xsd:int','unix_box'=>'xsd:string',
 +	'address'=>'xsd:string','address2'=>'xsd:string',
 +	'phone'=>'xsd:string','fax'=>'xsd:string',
 +	'title'=>'xsd:string','ccode'=>'xsd:string'),
 +    array('addUserResonse'=>'xsd:int'),
 +    $uri,
 +    $uri.'#addUser','rpc','encoded'
 +);
 +
- //updateUser  (session_ser,user_id,firstname,lastname,language_id,timezone,mail_site,mail_va,use_ratings,jabber_address,$jabber_only,theme_id,address,address2,phone,fax,title,ccode)
++//updateUser  (session_ser,user_id,firstname,lastname,language_id,timezone,mail_site,mail_va,use_ratings,dummy1,dummy2,theme_id,address,address2,phone,fax,title,ccode)
 +$server->register(
 +    'updateUser',
 +    array('session_ser'=>'xsd:string',
 +	'user_id'=>'xsd:string',
 +	'firstname'=>'xsd:string',
 +	'lastname'=>'xsd:string',
 +	'language_id'=>'xsd:int',
 +	'timezone'=>'xsd:string',
 +	'mail_site'=>'xsd:string',
 +	'mail_va'=>'xsd:string',
 +	'use_ratings'=>'xsd:string',
 +	'jabber_address'=>'xsd:string',
 +	'jabber_only'=>'xsd:int',
 +	'theme_id'=>'xsd:int',
 +	'address'=>'xsd:string',
 +	'address2'=>'xsd:string',
 +	'phone'=>'xsd:string',
 +	'fax'=>'xsd:string',
 +	'title'=>'xsd:string',
 +	'ccode'=>'xsd:string'),
 +    array('updateUserResonse'=>'xsd:int'),
 +    $uri,
 +    $uri.'#updateUser','rpc','encoded'
 +);
 +
 +//deleteUser  (session_ser,user_id)
 +$server->register(
 +    'deleteUser',
 +    array('session_ser'=>'xsd:string','user_id'=>'xsd:string'),
 +    array('deleteUserResonse'=>'xsd:boolean'),
 +    $uri,
 +    $uri.'#deleteUser','rpc','encoded'
 +);
 +
 +//changeStatus  (session_ser,user_id,status)
 +$server->register(
 +    'changeStatus',
 +    array('session_ser'=>'xsd:string',
 +	'user_id'=>'xsd:string',
 +	'status'=>'xsd:string'),
 +    array('changeStatusResonse'=>'xsd:boolean'),
 +    $uri,
 +    $uri.'#changeStatus','rpc','encoded'
 +);
 +
 +//changePassword  (session_ser,user_id,password)
 +$server->register(
 +    'changePassword',
 +    array('session_ser'=>'xsd:string',
 +	'user_id'=>'xsd:string',
 +	'password'=>'xsd:string'),
 +    array('changePasswordResonse'=>'xsd:boolean'),
 +    $uri,
 +    $uri.'#changePassword','rpc','encoded'
 +);
 +
  //getGroups (id array)
  $server->register(
      'userGetGroups',

commit c0408b7cdbe5c4234d0460deadae2f0ec57cdd1b
Merge: 424a795 f99a7be
Author: Thorsten Glaser <t.glaser at tarent.de>
Date:   Mon Jul 22 12:17:34 2013 +0200

    Merge branch 'Branch_5_1' into Branch_5_2


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

Summary of changes:
 src/common/frs/FRSRelease.class.php                |    2 +-
 src/common/include/Jabber.class.php                | 1533 --------------------
 src/common/include/User.class.php                  |   77 +-
 src/common/include/config-vars.php                 |    6 -
 src/common/include/pre.php                         |    9 -
 src/common/include/utils.php                       |   61 +-
 src/common/pm/ProjectTask.class.php                |    2 +-
 .../installation_guide/installation_guide.xml      |    9 -
 src/etc/config.ini.d/defaults.ini                  |    1 -
 src/etc/httpd.conf.d/secrets.inc                   |    3 -
 .../authldap/include/AuthLDAPPlugin.class.php      |    4 +-
 src/plugins/projectimport/www/usersimport.php      |    2 +-
 src/utils/migrate-to-ini-files.sh                  |    5 -
 src/www/account/index.php                          |   18 +-
 src/www/account/register.php                       |   15 +-
 src/www/admin/configman.php                        |    4 -
 src/www/include/user_home.php                      |    1 -
 src/www/include/user_profile.php                   |   10 -
 src/www/soap/common/user.php                       |    4 +-
 19 files changed, 31 insertions(+), 1735 deletions(-)
 delete mode 100644 src/common/include/Jabber.class.php


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list