[Fusionforge-commits] r8209 - in trunk/gforge/plugins/mediawiki: cronjobs www

Roland Mas lolando at libremir.placard.fr.eu.org
Tue Sep 29 17:08:38 CEST 2009


Author: lolando
Date: 2009-09-29 17:08:38 +0200 (Tue, 29 Sep 2009)
New Revision: 8209

Modified:
   trunk/gforge/plugins/mediawiki/cronjobs/create-wikis.sh
   trunk/gforge/plugins/mediawiki/www/LocalSettings.php
   trunk/gforge/plugins/mediawiki/www/frame.php
Log:
Various fixes

Modified: trunk/gforge/plugins/mediawiki/cronjobs/create-wikis.sh
===================================================================
--- trunk/gforge/plugins/mediawiki/cronjobs/create-wikis.sh	2009-09-29 15:08:30 UTC (rev 8208)
+++ trunk/gforge/plugins/mediawiki/cronjobs/create-wikis.sh	2009-09-29 15:08:38 UTC (rev 8209)
@@ -4,7 +4,7 @@
 perl -e'require "/etc/gforge/local.pl"; print "*:*:$sys_dbname:$sys_dbuser:$sys_dbpasswd\n"' > $tmp3
 
 projects=$(echo "SELECT g.unix_group_name from groups g, group_plugin gp, plugins p where g.group_id = gp.group_id and gp.plugin_id = p.plugin_id and p.plugin_name = 'mediawiki' ;" \
-    | PGPASSFILE=/tmp/tmp.wOirlBjmDn /usr/bin/psql -U gforge gforge \
+    | PGPASSFILE=$tmp3 /usr/bin/psql -U gforge gforge \
     | tail -n +3 \
     | grep '^ ')
 
@@ -13,8 +13,15 @@
 for project in $projects ; do
     if [ ! -d $wdprefix/$project/images ] ; then
 	mkdir -p $wdprefix/$project/images
-	chown www-data $wdprefix/$project/images
-	touch $wdprefix/$project/LocalSettings.php
+    fi
+    if [ ! -e $wdprefix/$project/LocalSettings.php ] ; then
+	cat > $wdprefix/$project/LocalSettings.php <<EOF
+<?php
+// To enable uploads for the wiki, you'll need to edit this value:
+\$wgEnableUploads = false;
+// Don't forget to "chown www-data $wdprefix/$project/images"
+EOF
+
 	filteredprojects="$filteredprojects $project"
     fi
 done

Modified: trunk/gforge/plugins/mediawiki/www/LocalSettings.php
===================================================================
--- trunk/gforge/plugins/mediawiki/www/LocalSettings.php	2009-09-29 15:08:30 UTC (rev 8208)
+++ trunk/gforge/plugins/mediawiki/www/LocalSettings.php	2009-09-29 15:08:38 UTC (rev 8209)
@@ -61,13 +61,10 @@
 $wgMainCacheType = CACHE_NONE;
 $wgMemCachedServers = array();
 
-## To enable image uploads, make sure the 'images' directory
-## is writable, then set this to true:
-$wgEnableUploads       = true;
+$wgEnableUploads = false;
 $wgUploadDirectory = "$wikidata/images";
-# $wgUseImageMagick = true;
-# $wgImageMagickConvertCommand = "/usr/bin/convert";
-# $wgHashedUploadDirectory = false;
+$wgUseImageMagick = true;
+$wgImageMagickConvertCommand = "/usr/bin/convert";
 $wgLocalInterwiki   = $wgSitename;
 $wgShowExceptionDetails = true ;
 

Modified: trunk/gforge/plugins/mediawiki/www/frame.php
===================================================================
--- trunk/gforge/plugins/mediawiki/www/frame.php	2009-09-29 15:08:30 UTC (rev 8208)
+++ trunk/gforge/plugins/mediawiki/www/frame.php	2009-09-29 15:08:38 UTC (rev 8209)
@@ -26,7 +26,7 @@
 $params = array () ;
 $params['toptab']      = $pluginname;
 $params['group']       = $group_id;
-$params['title']       = sprintf ('Mediawiki for project %s', $group->getPublicName()) ;
+$params['title']       = _('wiki') ;
 $params['pagename']    = $pluginname;
 $params['sectionvals'] = array ($group->getPublicName());
 
@@ -35,7 +35,7 @@
 if (file_exists ('/var/lib/gforge/plugins/mediawiki/wikidata/'.$group->getUnixName().'/LocalSettings.php')) {
 	echo '<iframe src="'.util_make_url('/plugins/mediawiki/wiki/'.$group->getUnixName().'/index.php').'" frameborder="no" width=100% height=700></iframe>' ;
 } else {
-	print _('Wiki not created yet, please wait for a few minutes.');
+	print '<h2>'._('Wiki not created yet, please wait for a few minutes.').'</h2>';
 }
 
 site_project_footer(array());




More information about the Fusionforge-commits mailing list