[evolvis-commits] r18423: upstream pending merges:↵ Roland Mas 2012-05-23 Uploading 5.1.1-7 to Debian↵ Roland Mas 2012-05-23 Conditional adaptation to phpunit 3.6 (should still work with 3.4)↵ Roland Mas 2012-05-23 Adapt to phpunit 3.6↵ Roland Mas 2012-05-23 Adapt to phpunit 3.6↵ Roland Mas 2012-05-23 Adapt to phpunit 3.6↵ Roland Mas 2012-05-23 Fixed postinst for mediawiki upgrading↵ lolando 2012-05-23 RBAC bugfix for scm_* groups and external (including global) roles↵ Roland Mas 2012-05-23 Run the Mediawiki upgrade on postinst configure as well as postinst triggered↵ Roland Mas 2012-05-22 Set up a dpkg trigger to handle Mediawiki upgrades↵ lolando 2012-05-21 Renamed doc files to avoid potentially unsafe characters in filenames

mirabilos at evolvis.org mirabilos at evolvis.org
Wed May 23 17:17:47 CEST 2012


Author: mirabilos
Date: 2012-05-23 17:17:46 +0200 (Wed, 23 May 2012)
New Revision: 18423

Added:
   trunk/gforge_base/evolvisforge-5.1/src/docs/README.html-elements
   trunk/gforge_base/evolvisforge-5.1/src/docs/README.html-utils
   trunk/gforge_base/evolvisforge-5.1/src/plugins/mediawiki/debian/
   trunk/gforge_base/evolvisforge-5.1/src/plugins/mediawiki/debian/plugin-mediawiki.postinst
   trunk/gforge_base/evolvisforge-5.1/src/plugins/mediawiki/debian/plugin-mediawiki.triggers
   trunk/gforge_base/evolvisforge-5.1/src/utils/list-projects-using-plugin.php
Modified:
   trunk/gforge_base/evolvisforge-5.1/src/common/include/RBAC.php
   trunk/gforge_base/evolvisforge-5.1/src/debian/changelog
   trunk/gforge_base/evolvisforge-5.1/src/debian/rules
   trunk/gforge_base/evolvisforge-5.1/src/packaging/install/common
   trunk/gforge_base/evolvisforge-5.1/tests/AllFullTests.php
   trunk/gforge_base/evolvisforge-5.1/tests/AllTests.php
   trunk/gforge_base/evolvisforge-5.1/tests/DEBDebian60Tests.php
   trunk/gforge_base/evolvisforge-5.1/tests/RPMCentos52Tests.php
   trunk/gforge_base/evolvisforge-5.1/tests/SeleniumTests.php
   trunk/gforge_base/evolvisforge-5.1/tests/TarCentos52Tests.php
   trunk/gforge_base/evolvisforge-5.1/tests/func/AllTests.php
   trunk/gforge_base/evolvisforge-5.1/tests/func/Soap/AllTests.php
Log:
upstream pending merges:
  Roland Mas 2012-05-23 Uploading 5.1.1-7 to Debian
    Roland Mas 2012-05-23 Conditional adaptation to phpunit 3.6 (should still work with 3.4)
    Roland Mas 2012-05-23 Adapt to phpunit 3.6
    Roland Mas 2012-05-23 Adapt to phpunit 3.6
    Roland Mas 2012-05-23 Adapt to phpunit 3.6
    Roland Mas 2012-05-23 Fixed postinst for mediawiki upgrading
    lolando 2012-05-23 RBAC bugfix for scm_* groups and external (including global) roles
    Roland Mas 2012-05-23 Run the Mediawiki upgrade on postinst configure as well as postinst triggered
    Roland Mas 2012-05-22 Set up a dpkg trigger to handle Mediawiki upgrades
    lolando 2012-05-21 Renamed doc files to avoid potentially unsafe characters in filenames

Modified: trunk/gforge_base/evolvisforge-5.1/src/common/include/RBAC.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/include/RBAC.php	2012-05-23 15:17:42 UTC (rev 18422)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/include/RBAC.php	2012-05-23 15:17:46 UTC (rev 18423)
@@ -301,6 +301,13 @@
 		}
 		$this->normalizeData();
 
+		foreach ($this->getUsers() as $u) {
+			if (!$SYS->sysCheckCreateUser($u->getID())) {
+				$this->setError($SYS->getErrorMessage());
+				return false;
+			}
+		}
+
 		return true ;
 	}
 
@@ -323,12 +330,11 @@
 
 		$this->removeObsoleteSettings () ;
 
-		foreach ($this->getUsers() as $member) {
-			if (!$SYS->sysGroupCheckUser($project->getID(),
-			    $member->getID())) {
+		foreach ($this->getUsers() as $u) {
+			if (!$SYS->sysCheckCreateUser($u->getID())) {
 				$this->setError('unlinkProject(' .
-				    $project->getID() .'):CheckUser(' .
-				    $member->getUnixName() . ') ' .
+				    $project->getID() .'):CheckCreateUser(' .
+				    $u->getUnixName() . ') ' .
 				    $SYS->getErrorMessage());
 				return false;
 			}
@@ -980,16 +986,6 @@
 			foreach ($data as $sect => $refs) {
 				foreach ($refs as $refid => $value) {
 					$this->setSetting ($sect, $refid, $value) ;
-					if ($sect == 'scm') {
-						$this->refetchData();
-						foreach ($this->getUsers() as $u) {
-							if (!$SYS->sysGroupCheckUser($refid,$u->getID())) {
-								$this->setError($SYS->getErrorMessage());
-								db_rollback();
-								return false;
-							}
-						}
-					}
 				}
 			}
 		} else {
@@ -1014,16 +1010,7 @@
 				 array ($this->getID(),
 					'pm',
 					db_int_array_to_any_clause (array_keys ($data['pm'])))) ;
-		
 
-
-
-
-
-
-
-
-
 ////$data['section_name']['ref_id']=$val
 		$arr1 = array_keys($data);
 		for ($i=0; $i<count($arr1); $i++) {	
@@ -1177,6 +1164,14 @@
 
 		db_commit();
 		$this->fetchData($this->getID());
+
+		foreach ($this->getUsers() as $u) {
+			if (!$SYS->sysCheckCreateUser($u->getID())) {
+				$this->setError($SYS->getErrorMessage());
+				return false;
+			}
+		}
+
 		return true;
 	}
 
@@ -1216,6 +1211,7 @@
 					'forum')) ;
 
 		db_commit () ;
+		$this->fetchData($this->getID());
 		return true ;
 	}
 

Modified: trunk/gforge_base/evolvisforge-5.1/src/debian/changelog
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/debian/changelog	2012-05-23 15:17:42 UTC (rev 18422)
+++ trunk/gforge_base/evolvisforge-5.1/src/debian/changelog	2012-05-23 15:17:46 UTC (rev 18423)
@@ -87,6 +87,14 @@
 
  -- Thorsten Glaser <t.glaser at tarent.de>  Wed, 02 May 2012 14:47:10 +0200
 
+fusionforge (5.1.1-7) unstable; urgency=low
+
+  * Many fixes from the 5.1 upstream branch.
+  * Set up a dpkg trigger to handle Mediawiki upgrades and update the
+    database schemas accordingly (closes: #673125).
+
+ -- Roland Mas <lolando at debian.org>  Wed, 23 May 2012 13:54:10 +0200
+
 fusionforge (5.1.1-6) unstable; urgency=low
 
   * Fixes in search.

Modified: trunk/gforge_base/evolvisforge-5.1/src/debian/rules
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/debian/rules	2012-05-23 15:17:42 UTC (rev 18422)
+++ trunk/gforge_base/evolvisforge-5.1/src/debian/rules	2012-05-23 15:17:46 UTC (rev 18423)
@@ -45,6 +45,8 @@
 INSTALLFILES=$(patsubst packaging/install/%,debian/$(OLDPACKAGE)-%.install,$(wildcard packaging/install/[a-z]*))
 PINSTALLFILES=$(foreach i,$(ENABLED_PLUGINS),$(if $(wildcard plugins/$i/packaging/install/[a-z]*),debian/$(PACKAGE)-plugin-$i.install))
 
+PTRIGGERSFILES=$(foreach i,$(ENABLED_PLUGINS),$(if $(wildcard plugins/$i/debian/[a-z]*.triggers),debian/$(PACKAGE)-plugin-$i.triggers))
+
 DOCSFILES=$(patsubst packaging/docs/%,debian/$(OLDPACKAGE)-%.docs,$(wildcard packaging/docs/[a-z]*)) \
 		$(patsubst packaging/docs/%,debian/$(PACKAGE)-%.docs,$(wildcard packaging/docs/[a-z]*))
 PDOCSFILES=$(foreach i,$(ENABLED_PLUGINS),$(if $(wildcard plugins/$i/packaging/docs/[a-z]*),debian/$(PACKAGE)-plugin-$i.docs))
@@ -77,13 +79,19 @@
 	sh $(CURDIR)/deb-specific/manage-uufiles.sh clean
 
 .PHONY: conffiles
-conffiles: $(PPOSTINST) $(PPRERM) $(CRONDFILES) $(DIRSFILES) $(LINKSFILES) $(INSTALLFILES) $(DOCSFILES) $(READMEFILES) $(PCRONDFILES) $(PDIRSFILES) $(PLINKSFILES) $(PINSTALLFILES) $(PDOCSFILES) debian/control
+conffiles: $(PPOSTINST) $(PPRERM) $(CRONDFILES) $(DIRSFILES) $(LINKSFILES) $(INSTALLFILES) $(DOCSFILES) $(READMEFILES) $(PCRONDFILES) $(PDIRSFILES) $(PLINKSFILES) $(PINSTALLFILES) $(PDOCSFILES) $(PTRIGGERSFILES) debian/control
 
 debian/$(PACKAGE)-plugin-%.postinst:
-	export PLUGLONGNAME="`cat $(CURDIR)/plugins/$*/NAME`"; $(SED_REPLACE) -e 's/@PLUGSHORTNAME@/$*/g' -e "s/@PLUGLONGNAME@/$$PLUGLONGNAME/g" $(CURDIR)/debian/dsf-in/plugin.postinst > $@
+	export PLUGLONGNAME="`cat $(CURDIR)/plugins/$*/NAME`"; \
+		[ -e $(CURDIR)/plugins/$*/debian/plugin-$*.postinst ] \
+		&& $(SED_REPLACE) -e 's/@PLUGSHORTNAME@/$*/g' -e "s/@PLUGLONGNAME@/$$PLUGLONGNAME/g" $(CURDIR)/plugins/$*/debian/plugin-$*.postinst > $@ \
+		|| $(SED_REPLACE) -e 's/@PLUGSHORTNAME@/$*/g' -e "s/@PLUGLONGNAME@/$$PLUGLONGNAME/g" $(CURDIR)/debian/dsf-in/plugin.postinst > $@
 
 debian/$(PACKAGE)-plugin-%.prerm:
-	export PLUGLONGNAME="`cat $(CURDIR)/plugins/$*/NAME`"; $(SED_REPLACE) -e 's/@PLUGSHORTNAME@/$*/g' -e "s/@PLUGLONGNAME@/$$PLUGLONGNAME/g" $(CURDIR)/debian/dsf-in/plugin.prerm > $@
+	export PLUGLONGNAME="`cat $(CURDIR)/plugins/$*/NAME`"; \
+		[ -e $(CURDIR)/plugins/$*/debian/plugin-$*.prerm ] \
+		&& $(SED_REPLACE) -e 's/@PLUGSHORTNAME@/$*/g' -e "s/@PLUGLONGNAME@/$$PLUGLONGNAME/g" $(CURDIR)/plugins/$*/debian/plugin-$*.prerm > $@ \
+		|| $(SED_REPLACE) -e 's/@PLUGSHORTNAME@/$*/g' -e "s/@PLUGLONGNAME@/$$PLUGLONGNAME/g" $(CURDIR)/debian/dsf-in/plugin.prerm > $@
 
 debian/$(PACKAGE)-plugin-%.cron.d:
 	(cat $(CURDIR)/packaging/cron.d/00phpcron ; $(SED_REPLACE) -e 's/\$$FFUSER/$(OLDPACKAGE)/g' $(CURDIR)/plugins/$*/packaging/cron.d/plugin-$*) | $(SED_REPLACE) > $@
@@ -91,6 +99,7 @@
 debian/$(OLDPACKAGE)-%.cron.d:
 	(cat $(CURDIR)/packaging/cron.d/00phpcron ; $(SED_REPLACE) -e 's/\$$FFUSER/$(OLDPACKAGE)/g' $(CURDIR)/packaging/cron.d/$*) | $(SED_REPLACE) > $@
 
+# Perform subsitutions on 'dirs', 'links', 'install', 'docs', 'triggers' files
 debian/$(PACKAGE)-plugin-%.dirs:
 	$(SED_REPLACE) $(CURDIR)/plugins/$*/packaging/dirs/plugin-$* > $@
 
@@ -106,6 +115,9 @@
 debian/$(PACKAGE)-plugin-%.install:
 	$(SED_REPLACE) $(CURDIR)/plugins/$*/packaging/install/plugin-$* > $@
 
+debian/$(PACKAGE)-plugin-%.triggers:
+	$(SED_REPLACE) $(CURDIR)/plugins/$*/debian/plugin-$*.triggers > $@
+
 debian/$(OLDPACKAGE)-%.install:
 	$(SED_REPLACE) $(CURDIR)/packaging/install/$* > $@ 
 

Added: trunk/gforge_base/evolvisforge-5.1/src/docs/README.html-elements
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/docs/README.html-elements	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/src/docs/README.html-elements	2012-05-23 15:17:46 UTC (rev 18423)
@@ -0,0 +1,142 @@
+Documentation of new HTML element creation functions
+────────────────────────────────────────────────────
+
+Functions defined in src/www/include/html.php → available: always.
+
+
+‣ Element emission functions (do not echo anything)
+
+
+• string html_eo(string $name, optional(empty) array $attrs)
+
+	html_eo('b')
+	⇒ '<b>'
+
+	html_eo('td', array('colspan' => 2))
+	⇒ '<td colspan="2">'
+
+	html_eo('div', array('class' => array('ff', 'important')))
+	⇒ '<div class="ff important">'
+
+	html_eo('img', array(
+		'src' => '…',
+		'ref' => false,
+		'class' => array(),
+		'alt' => "",
+	    ))
+	⇒ '<img src="…" alt="">'
+
+  Generate an XHTML E̲lement O̲pen tag for $name, with attributes
+  defined by key/value pairs properly inserted. Attribute values
+  are coerced into strings from integers (by casting) or arrays
+  (by concatenating the array elements with spaces); if the value
+  is === false or an empty array (count($attrs[n]) == 0), the
+  attribute is not output at all, but for empty values it is; see
+  the img example (admittedly bad, you’d use html_e() for "img").
+
+• string html_e(string $name, optional(empty) array $attrs,
+    optional(empty) string $content, optional(true) bool $shortform)
+
+	html_e('br')
+	⇒ '<br />'
+
+	html_e('a', array('href' => '/foo.php?a=1&b=2'), 'täxt')
+	⇒ '<a href="/foo.php?a=1&b=2">täxt</a>'
+
+	html_e('script', array(
+		'type' => 'text/javascript',
+		'src' => '/js/foo.js',
+	    ), "", false)
+	⇒ '<script type="text/javascript" src="/js/foo.js"></script>'
+	/* needed because <script ... /> does not work */
+
+	html_e('tr', array(), html_e('td', array(), 'bla'))
+	⇒ '<tr><td>bla</td></tr>'
+
+  As with html_eo() the first two arguments define the tag to open.
+  The third argument will be placed between the opening and closing
+  tags but – in contrast to attribute values – not entity-encoded.
+  If the third argument is empty, either a self-closing (default)
+  tag, or, if the fourth argument is false, an open-close sequence,
+  is emitted.
+
+
+‣ Autoclose stack functions
+
+	$spos = html_ap();
+	$s = html_ao('p');
+	if ($foo) {
+		$s .= html_ao('strong');
+	}
+	$s .= html_ao('a', array('href' => '/'));
+	$s .= somefunc();
+	$s .= html_ac($spos);
+	⇒ '<p><strong><a href="/">somefuncreturnvalue</a></strong></p>'
+	⇒ '<p><a href="/">somefuncreturnvalue</a></p>'
+
+• integer html_ap(void)
+
+  Return the a̲utoclose stack’s current p̲osition.
+
+• string html_ao(string $name, optional(empty) array $attrs)
+
+  Works the same as html_eo() but pushes $name onto the a̲utoclose
+  element stack when o̲pening it.
+
+• string html_ac(integer $spos)
+
+  Return a set of closing elements until the a̲utoc̲lose stack
+  has reached the position it had when html_ap() returned $spos.
+
+  If $spos === false: an empty string is returned, for html_aonce().
+
+  If $spos < current stack position, an Exception is raised.
+
+• string html_aonce(ByRef integer $sptr, string $name,
+    optional(empty) array $attrs)
+
+	$spos = false;
+	foreach ($row in $rows) {
+		echo html_aonce('table');
+		echo html_e('tr', array(), html_e('td', array(),
+		    util_html_secure($row['data'])));
+	}
+	echo html_ac($spos);
+	⇒ ''  // if $rows is empty
+	⇒ '<table><tr><td>content1</td></tr><tr><td>content2</td></tr></table>'
+
+  If $sptr is not false, do nothing. Otherwise, set it to
+  the current html_ap() then do html_ao($name, $attrs).
+
+  This function can easily be used to open an enclosing element
+  with mandatory inner elements, such as a table, only once except
+  if no table row were to be generated.
+
+‣ Autoclose stack copy functions
+
+	$spos = html_ap();
+	echo html_ao('tr', array('bgcolor' => '#FF0000'));
+	echo html_ao('td');
+	echo "content 1";
+	$scopy = html_a_copy($spos);
+	echo html_ac($spos);
+	echo html_e('tr', array(), html_e('td', array(), "intermediate"));
+	echo html_a_apply($scopy);
+	echo "content 2";
+	echo html_ac($spos);
+	echo html_a_apply($scopy);
+	echo "content 3";
+	echo html_ac($spos);
+
+	⇒ <tr bgcolor="#FF0000"><td>content 1</td></tr>
+	  <tr><td>intermediate</td></tr>
+	  <tr bgcolor="#FF0000"><td>content 2</td></tr>
+	  <tr bgcolor="#FF0000"><td>content 3</td></tr>
+
+• opaque html_a_copy(integer $spos)
+• string html_a_apply(opaque $scopy)
+
+  Before autoclosing the stack down to a level $spos, you can
+  retrieve a copy of the stack in an opaque format, which can
+  later be used to (re-)open the same elements, with the same
+  attributes, even in a different nesting state.

Added: trunk/gforge_base/evolvisforge-5.1/src/docs/README.html-utils
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/docs/README.html-utils	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/src/docs/README.html-utils	2012-05-23 15:17:46 UTC (rev 18423)
@@ -0,0 +1,102 @@
+Documentation of common HTML utility functions
+──────────────────────────────────────────────
+
+Functions defined in src/common/include/utils.php → available: always.
+
+
+• string util_html_encode(string $s)
+
+	util_html_secure('a=1&b=2')
+	⇒ 'a=1&b=2'        // HTML-encoded
+
+	util_html_secure('a=1&b=2')
+	⇒ 'a=1&amp;b=2'    // changed!
+
+  Encode a string for use in XHTML even if it is already encoded.
+
+• string util_html_secure(string $s)
+
+	util_html_secure('a=1&b=2')
+	⇒ 'a=1&b=2'    // HTML-encoded
+
+	util_html_secure('a=1&b=2')
+	⇒ 'a=1&b=2'    // unchanged
+
+  Encode a string for use in XHTML if it is not already encoded.
+  (So, if you use this for output sanitising, other than a slight
+  performance penalty no harm is done if the output was already
+  sane.)
+
+• string util_unconvert_htmlspecialchars(string $s)
+
+	util_unconvert_htmlspecialchars('a=1&b=2')
+	⇒ 'a=1&b=2'    // unchanged
+
+	util_unconvert_htmlspecialchars('a=1&b=2')
+	⇒ 'a=1&b=2'    // HTML-decoded
+
+  Undo util_html_encode; be careful, this can decode partially.
+
+
+• string util_gethref(optional(false) string $baseurl,
+    optional(empty) array $args, optional(true) bool $ashtml,
+    optional('&') string $sep)
+
+	util_gethref("/x.php", array(
+		'foo' => 'a+b&c',
+		'bar' => 'd+b&e',
+	    ));
+	⇒ "/x.php?foo=a%2Bb%26c&bar=d%2Bb%26e"
+
+	util_gethref("/x.php", array(
+		'foo' => 'a+b&c',
+		'bar' => 'd+b&e',
+	    ), false);
+	⇒ /x.php?foo=a%2Bb%26c&bar=d%2Bb%26e
+
+	util_gethref("/x.php", array(
+		'foo' => 'a+b&c',
+		'bar' => 'd+b&e',
+	    ), true, ';')
+	⇒ "/x.php?foo=a%2Bb%26c;bar=d%2Bb%26e"
+
+  Construct an URI for use with util_make_url, session_redirect,
+  html_e('a', array('href' => …)), and similar. The first argument
+  ($baseurl) is passed through as-is but, if falsy, defaults to
+  getStringFromServer('PHP_SELF'); the arguments (both keys and
+  values) are urlencoded (entries while values is false are not
+  emitted at all) and appended, with a question mark in front and
+  the $sep separator in between.
+
+  If $ashtml is true (default), the result will then be run through
+  util_html_encode; set this to false when using in html_e href as
+  value (since html_e will html-encode itself).
+
+• string util_make_url(string $path)
+
+	util_make_url('/foo.php?a=1&b=2')
+	⇒ 'https://forge.domain.com/fusionforge/foo.php?a=1&b=2'
+
+  Return an absolute URI for the path in question, containing the
+  system-defined protocol, hostname and (if defined) webroot prefix.
+
+  Both html-encoded and not html-encoded return values of util_gethref
+  are safe to pass as arguments, if their baseurl was only a path.
+
+• integer|false util_nat0(ByRef string $s)
+
+  If and only if $s is the normalised positive integer (ℕ₀)
+  representation of a number, return that number; false otherwise.
+  Limited by system constraints, i.e. usually [0;2³¹-1].
+
+
+‣ common non-HTML utility functions
+
+
+• mixed util_ifsetor(ByRef mixed $val, optional(false) mixed $default)
+
+  If isset($val), return $val, otherwise (no warning) $default.
+
+• string debug_string_backtrace(void)
+
+  Return the current debugging backtrace as string.

Modified: trunk/gforge_base/evolvisforge-5.1/src/packaging/install/common
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/packaging/install/common	2012-05-23 15:17:42 UTC (rev 18422)
+++ trunk/gforge_base/evolvisforge-5.1/src/packaging/install/common	2012-05-23 15:17:46 UTC (rev 18423)
@@ -35,3 +35,4 @@
 utils/scm-newsubrepo.php               usr/share/@OLDPACKAGE@/bin/
 utils/unlocale.sh                      usr/share/@OLDPACKAGE@/bin/
 utils/list-admins.php                  usr/share/@OLDPACKAGE@/bin/
+utils/list-projects-using-plugin.php   usr/share/@OLDPACKAGE@/bin/

Added: trunk/gforge_base/evolvisforge-5.1/src/plugins/mediawiki/debian/plugin-mediawiki.postinst
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/mediawiki/debian/plugin-mediawiki.postinst	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/mediawiki/debian/plugin-mediawiki.postinst	2012-05-23 15:17:46 UTC (rev 18423)
@@ -0,0 +1,35 @@
+#! /bin/sh
+# postinst script for @PACKAGE at -plugin-mediawiki
+
+set -e
+
+upgrade_mediawikis () {
+    # Upgrade Mediawiki database schemas
+    /usr/share/gforge/bin/list-projects-using-plugin.php mediawiki | while read i ; do
+	/usr/share/gforge/plugins/mediawiki/bin/mw-wrapper.php $i update.php
+    done
+}
+
+case "$1" in
+    triggered)
+	if [ "$2" = /usr/share/mediawiki/maintenance/postgres ] ; then
+	    upgrade_mediawikis
+	fi
+	;;
+    
+    configure)
+	upgrade_mediawikis
+	;;
+    
+    abort-upgrade|abort-remove|abort-deconfigure)
+	;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+	;;
+esac
+
+#DEBHELPER#
+
+exit 0

Added: trunk/gforge_base/evolvisforge-5.1/src/plugins/mediawiki/debian/plugin-mediawiki.triggers
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/mediawiki/debian/plugin-mediawiki.triggers	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/mediawiki/debian/plugin-mediawiki.triggers	2012-05-23 15:17:46 UTC (rev 18423)
@@ -0,0 +1,2 @@
+# Triggers for @PACKAGE at -plugin-mediawiki
+interest /usr/share/mediawiki/maintenance/postgres

Added: trunk/gforge_base/evolvisforge-5.1/src/utils/list-projects-using-plugin.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/utils/list-projects-using-plugin.php	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/src/utils/list-projects-using-plugin.php	2012-05-23 15:17:46 UTC (rev 18423)
@@ -0,0 +1,52 @@
+#!/usr/bin/php -f
+<?php
+/**
+ * FusionForge
+ *
+ * Copyright 2012, 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 License,
+ * 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 this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+if (count ($argv) < 2) {
+        echo "Usage: .../list-projects-using-plugin.php <plugin>
+For instance: .../list-projects-using-plugin.php mediawiki
+" ;
+        exit (1) ;
+}
+
+$pname = $argv[1] ;
+
+require (dirname(__FILE__).'/../common/include/env.inc.php');
+require_once $gfcommon.'include/pre.php';
+require_once $gfcommon.'include/cron_utils.php';
+
+// Plugins subsystem
+require_once($gfcommon.'include/Plugin.class.php');
+require_once($gfcommon.'include/PluginManager.class.php');
+
+setup_plugin_manager () ;
+
+$plugin = plugin_get_object($pname);
+
+if (!$plugin) {
+	die ("Wrong plugin name\n") ;
+}
+
+foreach ($plugin->getGroups() as $p) {
+	print $p->getUnixName()."\n";
+}

Modified: trunk/gforge_base/evolvisforge-5.1/tests/AllFullTests.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/AllFullTests.php	2012-05-23 15:17:42 UTC (rev 18422)
+++ trunk/gforge_base/evolvisforge-5.1/tests/AllFullTests.php	2012-05-23 15:17:46 UTC (rev 18423)
@@ -3,8 +3,10 @@
 	define('PHPUnit_MAIN_METHOD', 'AllTests::main');
 }
 
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
+if (!@include_once 'PHPUnit/Autoload.php') {
+	include_once 'PHPUnit/Framework.php';
+	require_once 'PHPUnit/TextUI/TestRunner.php';
+}
 
 class AllTests
 {

Modified: trunk/gforge_base/evolvisforge-5.1/tests/AllTests.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/AllTests.php	2012-05-23 15:17:42 UTC (rev 18422)
+++ trunk/gforge_base/evolvisforge-5.1/tests/AllTests.php	2012-05-23 15:17:46 UTC (rev 18423)
@@ -3,8 +3,10 @@
 	define('PHPUnit_MAIN_METHOD', 'AllTests::main');
 }
 
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
+if (!@include_once 'PHPUnit/Autoload.php') {
+	include_once 'PHPUnit/Framework.php';
+	require_once 'PHPUnit/TextUI/TestRunner.php';
+}
 
 class AllTests
 {

Modified: trunk/gforge_base/evolvisforge-5.1/tests/DEBDebian60Tests.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/DEBDebian60Tests.php	2012-05-23 15:17:42 UTC (rev 18422)
+++ trunk/gforge_base/evolvisforge-5.1/tests/DEBDebian60Tests.php	2012-05-23 15:17:46 UTC (rev 18423)
@@ -3,8 +3,11 @@
 	define('PHPUnit_MAIN_METHOD', 'AllTests::main');
 }
 
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
+if (!@include_once 'PHPUnit/Autoload.php') {
+	include_once 'PHPUnit/Framework.php';
+	require_once 'PHPUnit/TextUI/TestRunner.php';
+}
+
 require_once 'func/Testing/DEBSeleniumRemoteSuite.php';
 
 class DEBDebian60Tests

Modified: trunk/gforge_base/evolvisforge-5.1/tests/RPMCentos52Tests.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/RPMCentos52Tests.php	2012-05-23 15:17:42 UTC (rev 18422)
+++ trunk/gforge_base/evolvisforge-5.1/tests/RPMCentos52Tests.php	2012-05-23 15:17:46 UTC (rev 18423)
@@ -3,8 +3,11 @@
 	define('PHPUnit_MAIN_METHOD', 'AllTests::main');
 }
 
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
+if (!@include_once 'PHPUnit/Autoload.php') {
+	include_once 'PHPUnit/Framework.php';
+	require_once 'PHPUnit/TextUI/TestRunner.php';
+}
+
 require_once 'func/Testing/RPMSeleniumRemoteSuite.php';
 
 class RPMCentos52Tests

Modified: trunk/gforge_base/evolvisforge-5.1/tests/SeleniumTests.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/SeleniumTests.php	2012-05-23 15:17:42 UTC (rev 18422)
+++ trunk/gforge_base/evolvisforge-5.1/tests/SeleniumTests.php	2012-05-23 15:17:46 UTC (rev 18423)
@@ -3,8 +3,10 @@
 	define('PHPUnit_MAIN_METHOD', 'AllTests::main');
 }
 
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
+if (!@include_once 'PHPUnit/Autoload.php') {
+	include_once 'PHPUnit/Framework.php';
+	require_once 'PHPUnit/TextUI/TestRunner.php';
+}
 
 class AllTests
 {

Modified: trunk/gforge_base/evolvisforge-5.1/tests/TarCentos52Tests.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/TarCentos52Tests.php	2012-05-23 15:17:42 UTC (rev 18422)
+++ trunk/gforge_base/evolvisforge-5.1/tests/TarCentos52Tests.php	2012-05-23 15:17:46 UTC (rev 18423)
@@ -3,8 +3,11 @@
 	define('PHPUnit_MAIN_METHOD', 'AllTests::main');
 }
 
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
+if (!@include_once 'PHPUnit/Autoload.php') {
+	include_once 'PHPUnit/Framework.php';
+	require_once 'PHPUnit/TextUI/TestRunner.php';
+}
+
 require_once 'func/Testing/TarSeleniumRemoteSuite.php';
 
 class TarCentos52Tests

Modified: trunk/gforge_base/evolvisforge-5.1/tests/func/AllTests.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/func/AllTests.php	2012-05-23 15:17:42 UTC (rev 18422)
+++ trunk/gforge_base/evolvisforge-5.1/tests/func/AllTests.php	2012-05-23 15:17:46 UTC (rev 18423)
@@ -3,8 +3,10 @@
 	define('PHPUnit_MAIN_METHOD', 'AllTests::main');
 }
 
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
+if (!@include_once 'PHPUnit/Autoload.php') {
+	include_once 'PHPUnit/Framework.php';
+	require_once 'PHPUnit/TextUI/TestRunner.php';
+}
 
 // Unit tests
 //require_once 'ACL/AllTests.php';

Modified: trunk/gforge_base/evolvisforge-5.1/tests/func/Soap/AllTests.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/func/Soap/AllTests.php	2012-05-23 15:17:42 UTC (rev 18422)
+++ trunk/gforge_base/evolvisforge-5.1/tests/func/Soap/AllTests.php	2012-05-23 15:17:46 UTC (rev 18423)
@@ -47,8 +47,10 @@
     define('PHPUnit_MAIN_METHOD', 'Site_AllTests::main');
 }
  
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
+if (!@include_once 'PHPUnit/Autoload.php') {
+	include_once 'PHPUnit/Framework.php';
+	require_once 'PHPUnit/TextUI/TestRunner.php';
+}
  
 require_once 'func/config.php';
 require_once 'func/Soap/checks.php';



More information about the evolvis-commits mailing list