[Fusionforge-commits] r7254 - in trunk: . gforge/debian gforge/debian/patches gforge/plugins/mediawiki/common gforge/plugins/mediawiki/mediawiki-skin gforge/plugins/scmcvs/etc/plugins/scmcvs gforge/plugins/scmsvn/etc/plugins/scmsvn

Roland Mas lolando at libremir.placard.fr.eu.org
Thu Mar 26 17:31:05 CET 2009


Author: lolando
Date: 2009-03-26 17:31:05 +0100 (Thu, 26 Mar 2009)
New Revision: 7254

Modified:
   trunk/
   trunk/gforge/debian/changelog
   trunk/gforge/debian/patches/disable-dav.dpatch
   trunk/gforge/plugins/mediawiki/common/MediaWikiPlugin.class.php
   trunk/gforge/plugins/mediawiki/mediawiki-skin/GForge.php
   trunk/gforge/plugins/scmcvs/etc/plugins/scmcvs/config.php
   trunk/gforge/plugins/scmsvn/etc/plugins/scmsvn/config.php
Log:
Merged from 4.7: more Mediawiki plugin fixes


Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/Branch_4_7:6879,6881,6884,6897,6899,6902,6904,6906,6909,6911,6922,6932,6936,6939,6942,6944,6946-6948,6954,6956,6959,7000-7001,7012,7111,7130-7131,7133-7134,7138,7140-7142,7147-7148,7159-7160,7163,7168,7177,7179,7203,7205,7207,7210,7212

   + /branches/Branch_4_7:6879,6881,6884,6897,6899,6902,6904,6906,6909,6911,6922,6932,6936,6939,6942,6944,6946-6948,6954,6956,6959,7000-7001,7012,7111,7130-7131,7133-7134,7138,7140-7142,7147-7148,7159-7160,7163,7168,7177,7179,7203,7205,7207,7210,7212,7251-7253


Modified: trunk/gforge/debian/changelog
===================================================================
--- trunk/gforge/debian/changelog	2009-03-26 16:16:00 UTC (rev 7253)
+++ trunk/gforge/debian/changelog	2009-03-26 16:31:05 UTC (rev 7254)
@@ -1,18 +1,26 @@
 gforge (4.7.2.50-2) experimental; urgency=low
 
+  [ Christian Bayle ]
   * Removed all files from /usr/lib/gforge and put them in /usr/share/gforge
   * cron scripts ar now in /usr/share/gforge/cronjobs
   * Now generate *.cron.d *.dirs *.install from cron.d/dirs/install dirs
   * Use dh_install instead of copy in rules
 
- -- Christian Bayle <bayle at debian.org>  Tue, 24 Mar 2009 00:38:26 +0100
+  [ Roland Mas ]
+  * New package: gforge-plugin-scmbzr (not complete yet!).
 
-gforge (4.7.1.99.2-1) experimental; urgency=low
+ -- Roland Mas <lolando at debian.org>  Thu, 26 Mar 2009 17:29:27 +0100
 
-  * New package: gforge-plugin-scmbzr (not complete yet!).
+gforge (4.7.2-2) experimental; urgency=low
 
- -- Roland Mas <lolando at debian.org>  Thu, 05 Feb 2009 22:14:45 +0100
+  * Removed automatic creation of the Mediawiki users on session opening
+    (since it caused problems and users are authenticated on the fly when
+    they access a MW page).
+  * Also removed a few error messages that were displayed above the wiki
+    pages.
 
+ -- Roland Mas <lolando at debian.org>  Thu, 26 Mar 2009 17:00:09 +0100
+
 gforge (4.7.2-1) experimental; urgency=low
 
   * New upstream bugfix release.

Modified: trunk/gforge/debian/patches/disable-dav.dpatch
===================================================================
--- trunk/gforge/debian/patches/disable-dav.dpatch	2009-03-26 16:16:00 UTC (rev 7253)
+++ trunk/gforge/debian/patches/disable-dav.dpatch	2009-03-26 16:31:05 UTC (rev 7254)
@@ -1,17 +1,17 @@
 #! /bin/sh /usr/share/dpatch/dpatch-run
-## 99-unnamed.dpatch by Christian Bayle <bayle at debian.org> and/or Roland Mas <lolando at debian.org>
+## disable-dav.dpatch by Roland Mas <lolando at debian.org>
 ##
 ## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
+## DP: Disable SVN-over-WebDAV
 
 @DPATCH@
 diff -urNad gforge~/plugins/scmsvn/etc/plugins/scmsvn/config.php gforge/plugins/scmsvn/etc/plugins/scmsvn/config.php
---- gforge~/plugins/scmsvn/etc/plugins/scmsvn/config.php	2008-03-19 20:21:12.000000000 +0100
-+++ gforge/plugins/scmsvn/etc/plugins/scmsvn/config.php	2008-09-22 11:39:39.000000000 +0200
-@@ -3,10 +3,10 @@
- //$default_svn_server = $GLOBALS['sys_default_domain'] ;
- //$default_svn_server = "svn." . $GLOBALS['sys_default_domain'] ;
- $default_svn_server = $GLOBALS['sys_scm_host'];
+--- gforge~/plugins/scmsvn/etc/plugins/scmsvn/config.php	2009-03-26 16:57:34.000000000 +0100
++++ gforge/plugins/scmsvn/etc/plugins/scmsvn/config.php	2009-03-26 17:14:01.000000000 +0100
+@@ -7,10 +7,10 @@
+ } else {
+ 	$default_svn_server = 'scm';
+ }
 -$use_ssh = false;
 -$use_dav = true;
 +$use_ssh = true;

Modified: trunk/gforge/plugins/mediawiki/common/MediaWikiPlugin.class.php
===================================================================
--- trunk/gforge/plugins/mediawiki/common/MediaWikiPlugin.class.php	2009-03-26 16:16:00 UTC (rev 7253)
+++ trunk/gforge/plugins/mediawiki/common/MediaWikiPlugin.class.php	2009-03-26 16:31:05 UTC (rev 7254)
@@ -35,7 +35,6 @@
 		$this->hooks[] = "userisactivecheckbox" ; // The "use ..." checkbox in user account
 		$this->hooks[] = "userisactivecheckboxpost" ; //
 		$this->hooks[] = "project_admin_plugins"; // to show up in the admin page for group
-		$this->hooks[] = "session_before_login" ; // to register GF users in the MW database
 	}
 
 	function CallHook ($hookname, $params) {
@@ -155,49 +154,6 @@
 				echo '</p>';
 			}
 		}												    
-		elseif ($hookname == "session_before_login") {
-			$loginname = $params['loginname'] ;
-			$passwd = $params['passwd'] ;
-			if (! session_login_valid_dbonly ($loginname, $passwd, false)) {
-				return ;
-			}
-			$u = user_get_object_by_name ($loginname) ;
-			
-			define ('MEDIAWIKI', true);
-			if (is_file('/var/lib/mediawiki/LocalSettings.php')){
-                        	require_once ('/var/lib/mediawiki/LocalSettings.php');
-			} elseif (is_file('/var/lib/mediawiki1.10/LocalSettings.php')){
-                        	require_once ('/var/lib/mediawiki1.10/LocalSettings.php');
-			} else {
-				return 1;
-			}
-			if (is_dir('/usr/share/mediawiki')){
-				$mw_share_path="/usr/share/mediawiki";
-			} elseif (is_dir('/usr/share/mediawiki1.10')){
-				$mw_share_path="/usr/share/mediawiki1.10";
-			} else {
-				return 1;
-			}
-                        require_once ($mw_share_path.'/includes/Defines.php');
-                        require_once ($mw_share_path.'/includes/Exception.php');
-                        require_once ($mw_share_path.'/includes/GlobalFunctions.php');
-                        require_once ($mw_share_path.'/StartProfiler.php');
-                        require_once ($mw_share_path.'/includes/Database.php');
-
-                        $mwdb = new Database() ;
-                        $mwdb->open($wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname) ;
-                        $sql = "select count(*) from user where user_name=?";
-                        $res = $mwdb->safeQuery ($sql, ucfirst($loginname));
-			$row = $mwdb->fetchRow ($res) ;
-			if ($row[0] == 1) {
-				$sql = "update user set user_password=?, user_email=?, user_real_name=? where user_name=?" ;
-				$res = $mwdb->safeQuery ($sql, md5($passwd), $u->getEmail(), $u->getRealName(), array(ucfirst($loginname))) ;
-			} else {
-				$sql = "insert into user (user_name, user_real_name, user_password, user_email, user_options) values (?, ?, ?, ?, ?)" ;
-				$res = $mwdb->safeQuery ($sql, array(ucfirst($loginname), $u->getRealName(), md5($passwd), $u->getEmail(), "skin=gforge\ncols=80\nrows=25")) ;
-			}
-		} 
-
 		elseif ($hookname == "blahblahblah") {
 			// ...
 		} 

Modified: trunk/gforge/plugins/mediawiki/mediawiki-skin/GForge.php
===================================================================
--- trunk/gforge/plugins/mediawiki/mediawiki-skin/GForge.php	2009-03-26 16:16:00 UTC (rev 7253)
+++ trunk/gforge/plugins/mediawiki/mediawiki-skin/GForge.php	2009-03-26 16:31:05 UTC (rev 7254)
@@ -14,8 +14,8 @@
 	die( -1 );
 
 $no_gz_buffer = 1 ;
-require_once ('/etc/gforge/local.inc') ;
-require_once '/usr/share/gforge/www/env.inc.php';
+require ('/etc/gforge/local.inc') ;
+require ('/usr/share/gforge/www/env.inc.php') ;
 $GLOBALS['sys_dbhost'] = $sys_dbhost ;
 $GLOBALS['sys_dbport'] = $sys_dbport ;
 $GLOBALS['sys_dbname'] = $sys_dbname ;
@@ -29,14 +29,13 @@
 $GLOBALS['gfwww'] = $gfwww ;
 $GLOBALS['gfplugins'] = $gfplugins ;
 $GLOBALS['sys_lang'] = $sys_lang ;
-require_once $gfwww.'include/pre.php';
+require ($gfwww.'include/pre.php') ;
 $GLOBALS['sys_urlroot'] = $sys_urlroot;
 $GLOBALS['sys_session_key'] = $sys_session_key;
 $GLOBALS['sys_session_expire'] = $sys_session_expire;
 $GLOBALS['REMOTE_ADDR'] = getStringFromServer('REMOTE_ADDR') ;
 $GLOBALS['HTTP_USER_AGENT'] = getStringFromServer('HTTP_USER_AGENT') ;
 
-require_once('includes/SkinTemplate.php');
 function GforgeRegisterMWHook() {
 	$GLOBALS['wgHooks']['AutoAuthenticate'][]='GforgeMWAuth';
 }

Modified: trunk/gforge/plugins/scmcvs/etc/plugins/scmcvs/config.php
===================================================================
--- trunk/gforge/plugins/scmcvs/etc/plugins/scmcvs/config.php	2009-03-26 16:16:00 UTC (rev 7253)
+++ trunk/gforge/plugins/scmcvs/etc/plugins/scmcvs/config.php	2009-03-26 16:31:05 UTC (rev 7254)
@@ -1,6 +1,10 @@
 <?php
  
-$default_cvs_server = "cvs." . $GLOBALS['sys_default_domain'];
+if (isset ($GLOBALS['sys_scm_host'])) {
+	$default_cvs_server = "cvs." . $GLOBALS['sys_default_domain'];
+} else {
+	$default_cvs_server = 'scm';
+}
 $enabled_by_default = true;
 $cvs_binary_version='1.12';
 $use_ssl=false;

Modified: trunk/gforge/plugins/scmsvn/etc/plugins/scmsvn/config.php
===================================================================
--- trunk/gforge/plugins/scmsvn/etc/plugins/scmsvn/config.php	2009-03-26 16:16:00 UTC (rev 7253)
+++ trunk/gforge/plugins/scmsvn/etc/plugins/scmsvn/config.php	2009-03-26 16:31:05 UTC (rev 7254)
@@ -2,7 +2,11 @@
  
 //$default_svn_server = $GLOBALS['sys_default_domain'] ;
 //$default_svn_server = "svn." . $GLOBALS['sys_default_domain'] ;
-$default_svn_server = $GLOBALS['sys_scm_host'];
+if (isset ($GLOBALS['sys_scm_host'])) {
+	$default_svn_server = $GLOBALS['sys_scm_host'];
+} else {
+	$default_svn_server = 'scm';
+}
 $use_ssh = false;
 $use_dav = true;
 $use_ssl = true;




More information about the Fusionforge-commits mailing list