[Fusionforge-commits] FusionForge branch master updated. v6.0.5-1913-g861f9ff

Franck Villaume nerville at libremir.placard.fr.eu.org
Thu Jun 8 14:14:33 CEST 2017


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

The branch, master has been updated
       via  861f9fff3905641929041b6ac36aa6b50021b2a3 (commit)
      from  97885bc0b05ffc416c2cfcbbb79e9562ff0392a8 (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 -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=861f9fff3905641929041b6ac36aa6b50021b2a3

commit 861f9fff3905641929041b6ac36aa6b50021b2a3
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Thu Jun 8 12:14:28 2017 +0000

    mediawiki plugin: re-enable in source install + sync skin with Monobook 1.23

diff --git a/autoinstall/install-src.sh b/autoinstall/install-src.sh
index a07664e..1479ee2 100755
--- a/autoinstall/install-src.sh
+++ b/autoinstall/install-src.sh
@@ -35,7 +35,8 @@ if [ -e /etc/debian_version ]; then
 	apache2 postgresql postgresql-contrib libnss-pgsql2 unscd \
 	cvs subversion viewvc python-pycurl git xinetd \
 	python-moinmoin libapache2-mod-wsgi python-psycopg2 \
-	unoconv poppler-utils dpkg-dev
+	unoconv poppler-utils dpkg-dev \
+        mediawiki
     if ! dpkg-vendor --is Ubuntu; then
 	apt-get install locales-all  # https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1394929
     fi
@@ -61,7 +62,8 @@ else
 	httpd mod_dav_svn mod_ssl postgresql-server postgresql-contrib nscd \
 	cvs subversion viewvc python-pycurl git gitweb xinetd \
 	moin mod_wsgi python-psycopg2 \
-	unoconv poppler-utils libreoffice-headless
+	unoconv poppler-utils libreoffice-headless \
+        mediawiki
 fi
 
 (
@@ -71,6 +73,7 @@ fi
         install-plugin-scmcvs install-plugin-scmsvn install-plugin-scmgit \
         install-plugin-blocks install-plugin-moinmoin \
         install-plugin-taskboard install-plugin-message \
-	install-plugin-repositoryapi
+	install-plugin-repositoryapi \
+        install-plugin-mediawiki
     make post-install
 )
diff --git a/src/plugins/mediawiki/mediawiki-skin/FusionForge.php b/src/plugins/mediawiki/mediawiki-skin/FusionForge.php
index 6058bd4..f5ac2ce 100644
--- a/src/plugins/mediawiki/mediawiki-skin/FusionForge.php
+++ b/src/plugins/mediawiki/mediawiki-skin/FusionForge.php
@@ -1,17 +1,33 @@
 <?php
 /**
- * FusionForge nouveau
+ * FusionForge nouveau.
  *
  * Translated from gwicke's previous TAL template version to remove
  * dependency on PHPTAL.
  *
+ * This program 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.
+ *
+ * This program 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.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
  * @todo document
  * @file
  * @ingroup Skins
  */
 
-if( !defined( 'MEDIAWIKI' ) )
+if ( !defined( 'MEDIAWIKI' ) ) {
 	die( -1 );
+}
 
 /**
  * Inherit main code from SkinTemplate, set the CSS and template filter.
@@ -28,9 +44,9 @@ class SkinFusionForge extends SkinTemplate {
 
 		$tc->params = array();
 		if (($tc->project = $project =
-		    group_get_object_by_name($GLOBALS['fusionforgeproject']))) {
+			group_get_object_by_name($GLOBALS['fusionforgeproject']))) {
 			$tc->params['group'] = $GLOBALS['group_id'] =
-			    $project->getID();
+			$project->getID();
 			$tc->params['toptab'] = 'mediawiki';
 		}
 
@@ -41,22 +57,14 @@ class SkinFusionForge extends SkinTemplate {
 	 * @param $out OutputPage
 	 */
 	function setupSkinUserCss( OutputPage $out ) {
-		global $wgHandheldStyle;
+		parent::setupSkinUserCss( $out );
 
 		/* add FusionForge styles */
 		foreach ($GLOBALS['HTML']->stylesheets as $sheet) {
 			$out->addStyle($sheet['css'], $sheet['media']);
 		}
 
-		parent::setupSkinUserCss( $out );
-
-		$out->addModuleStyles( 'skins.monobook' );
-
-		// Ugh. Can't do this properly because $wgHandheldStyle may be a URL
-		if( $wgHandheldStyle ) {
-			// Currently in testing... try 'chick/main.css'
-			$out->addStyle( $wgHandheldStyle, 'handheld' );
-		}
+		$out->addModuleStyles( array( 'mediawiki.skinning.interface', 'skins.monobook.styles' ) );
 
 		// TODO: Migrate all of these
 		$out->addStyle( 'monobook/IE60Fixes.css', 'screen', 'IE 6' );
@@ -82,71 +90,63 @@ class FusionForgeTemplate extends BaseTemplate {
 	 * @access private
 	 */
 	function execute() {
-		global $wgHtml5;
-
 		// Suppress warnings to prevent notices about missing indexes in $this->data
 		wfSuppressWarnings();
 
 		$this->html( 'headelement' );
 
 		echo "\n<!-- FUSIONFORGE BodyHeader BEGIN -->\n";
-		html_ao('body'); // don't print, makes "html helpers" stack consistent
 		$GLOBALS['HTML']->bodyHeader($this->params);
 		echo "<div id=\"ff-mw-wrapper\"><div style=\"font-size:x-small;\">\n";
 		echo "<!-- FUSIONFORGE BodyHeader END -->\n";
 
 ?><div id="globalWrapper">
-<div id="column-content"><div id="content">
+<div id="column-content"><div id="content" class="mw-body-primary" role="main">
 	<a id="top"></a>
-	<?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
+	<?php if ( $this->data['sitenotice'] ) { ?><div id="siteNotice"><?php $this->html( 'sitenotice' ) ?></div><?php } ?>
 
-	<h1 id="firstHeading" class="firstHeading"><span<?php if ($wgHtml5) echo ' dir="auto"'; ?>><?php $this->html('title') ?></span></h1>
+	<h1 id="firstHeading" class="firstHeading" lang="<?php
+		$this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
+		$this->text( 'pageLanguage' );
+	?>"><span dir="auto"><?php $this->html( 'title' ) ?></span></h1>
 	<div id="bodyContent" class="mw-body">
-		<div id="siteSub"><?php $this->msg('tagline') ?></div>
-		<div id="contentSub"<?php $this->html('userlangattributes') ?>><?php $this->html('subtitle') ?></div>
-<?php if($this->data['undelete']) { ?>
-		<div id="contentSub2"><?php $this->html('undelete') ?></div>
-<?php } ?><?php if($this->data['newtalk'] ) { ?>
-		<div class="usermessage"><?php $this->html('newtalk')  ?></div>
-<?php } ?><?php if($this->data['showjumplinks']) { ?>
-		<div id="jump-to-nav" class="mw-jump"><?php $this->msg('jumpto') ?> <a href="#column-one"><?php $this->msg('jumptonavigation') ?></a>, <a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div>
+		<div id="siteSub"><?php $this->msg( 'tagline' ) ?></div>
+		<div id="contentSub"<?php $this->html( 'userlangattributes' ) ?>><?php $this->html( 'subtitle' ) ?></div>
+<?php if ( $this->data['undelete'] ) { ?>
+		<div id="contentSub2"><?php $this->html( 'undelete' ) ?></div>
+<?php } ?><?php if ( $this->data['newtalk'] ) { ?>
+		<div class="usermessage"><?php $this->html( 'newtalk' ) ?></div>
 <?php } ?>
+		<div id="jump-to-nav" class="mw-jump"><?php $this->msg( 'jumpto' ) ?> <a href="#column-one"><?php $this->msg( 'jumptonavigation' ) ?></a><?php $this->msg( 'comma-separator' ) ?><a href="#searchInput"><?php $this->msg( 'jumptosearch' ) ?></a></div>
+
 		<!-- start content -->
-<?php $this->html('bodytext') ?>
-		<?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>
+<?php $this->html( 'bodytext' ) ?>
+		<?php if ( $this->data['catlinks'] ) { $this->html( 'catlinks' ); } ?>
 		<!-- end content -->
-		<?php if($this->data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?>
+		<?php if ( $this->data['dataAfterContent'] ) { $this->html( 'dataAfterContent' ); } ?>
 		<div class="visualClear"></div>
 	</div>
 </div></div>
-<div id="column-one"<?php $this->html('userlangattributes')  ?>>
+<div id="column-one"<?php $this->html( 'userlangattributes' ) ?>>
+	<h2><?php $this->msg( 'navigation-heading' ) ?></h2>
 <?php $this->cactions(); ?>
-	<div class="portlet" id="p-personal">
-		<h5><?php $this->msg('personaltools') ?></h5>
+	<div class="portlet" id="p-personal" role="navigation">
+		<h3><?php $this->msg( 'personaltools' ) ?></h3>
 		<div class="pBody">
-<?php
-	$ul_shown = false;
-	foreach ($this->getPersonalTools() as $key => $item) {
-		if (!$ul_shown) {
-?>
-			<ul<?php $this->html('userlangattributes') ?>>
-<?php
-			$ul_shown = true;
-		}
-		echo "\n" . $this->makeListItem($key, $item);
-	}
-	if ($ul_shown) {
-		echo "\n</ul>\n";
-	}
-?>
+			<ul<?php $this->html( 'userlangattributes' ) ?>>
+<?php		foreach ( $this->getPersonalTools() as $key => $item ) { ?>
+				<?php echo $this->makeListItem( $key, $item ); ?>
+
+<?php		} ?>
+			</ul>
 		</div>
 	</div>
-	<div class="portlet" id="p-logo">
+	<div class="portlet" id="p-logo" role="banner">
 <?php
 			echo Html::element( 'a', array(
 				'href' => $this->data['nav_urls']['mainpage']['href'],
 				'style' => "background-image: url({$this->data['logopath']});" )
-				+ Linker::tooltipAndAccesskeyAttribs('p-logo') ); ?>
+				+ Linker::tooltipAndAccesskeyAttribs( 'p-logo' ) ); ?>
 
 	</div>
 <?php
@@ -159,14 +159,14 @@ class FusionForgeTemplate extends BaseTemplate {
 	$validFooterLinks = $this->getFooterLinks( "flat" ); // Additional footer links
 
 	if ( count( $validFooterIcons ) + count( $validFooterLinks ) > 0 ) { ?>
-<div id="footer"<?php $this->html('userlangattributes') ?>>
+<div id="footer" role="contentinfo"<?php $this->html( 'userlangattributes' ) ?>>
 <?php
 		$footerEnd = '</div>';
 	} else {
 		$footerEnd = '';
 	}
 	foreach ( $validFooterIcons as $blockName => $footerIcons ) { ?>
-	<div id="f-<?php echo htmlspecialchars($blockName); ?>ico">
+	<div id="f-<?php echo htmlspecialchars( $blockName ); ?>ico">
 <?php foreach ( $footerIcons as $icon ) { ?>
 		<?php echo $this->getSkin()->makeFooterIcon( $icon ); ?>
 
@@ -178,8 +178,8 @@ class FusionForgeTemplate extends BaseTemplate {
 		if ( count( $validFooterLinks ) > 0 ) {
 ?>	<ul id="f-list">
 <?php
-			foreach( $validFooterLinks as $aLink ) { ?>
-		<li id="<?php echo $aLink ?>"><?php $this->html($aLink) ?></li>
+			foreach ( $validFooterLinks as $aLink ) { ?>
+		<li id="<?php echo $aLink ?>"><?php $this->html( $aLink ) ?></li>
 <?php
 			}
 ?>
@@ -191,6 +191,8 @@ echo $footerEnd;
 </div>
 <?php
 		$this->printTrail();
+		echo Html::closeElement( 'body' );
+		echo Html::closeElement( 'html' );
 		echo "</div></div>\n";
 		$GLOBALS['HTML']->footer($this->params);
 		wfRestoreWarnings();
@@ -198,38 +200,46 @@ echo $footerEnd;
 
 	/*************************************************************************************************/
 
+	/**
+	 * @param $sidebar array
+	 */
 	protected function renderPortals( $sidebar ) {
-		if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true;
-		if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true;
-		if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true;
+		if ( !isset( $sidebar['SEARCH'] ) ) {
+			$sidebar['SEARCH'] = true;
+		}
+		if ( !isset( $sidebar['TOOLBOX'] ) ) {
+			$sidebar['TOOLBOX'] = true;
+		}
+		if ( !isset( $sidebar['LANGUAGES'] ) ) {
+			$sidebar['LANGUAGES'] = true;
+		}
 
 		if (session_loggedin()) {
 			$efbox_log_text = _('Log Out');
-			$efbox_log_link = "/account/logout.php?return_to=" .
-			    urlencode(getStringFromServer('REQUEST_URI'));
+			$efbox_log_link = "/account/logout.php?return_to=" . urlencode(getStringFromServer('REQUEST_URI'));
 		} else {
 			$efbox_log_text = _('Log In');
-			$efbox_log_link = "/account/login.php?return_to=" .
-			    urlencode(getStringFromServer('REQUEST_URI'));
+			$efbox_log_link = "/account/login.php?return_to=" . urlencode(getStringFromServer('REQUEST_URI'));
 		}
-		$efbox_prj_link = "/projects/" .
-		    $this->project->getUnixName() . "/";
+		$efbox_prj_link = "/projects/" . $this->project->getUnixName() . "/";
+
 		$this->customBox("FusionForge", array(
 			"project" => array(
-				"id" => "fusionforge_project",
-				"href" => $efbox_prj_link,
-				"text" => _("Project Summary"),
-			    ),
+			"id" => "fusionforge_project",
+			"href" => $efbox_prj_link,
+			"text" => _("Project Summary"),
+			),
 			"loginout" => array(
-				"id" => "fusionforge_loginout",
-				"href" => $efbox_log_link,
-				"text" => $efbox_log_text,
-			    ),
-		    ));
-
-		foreach( $sidebar as $boxName => $content ) {
-			if ( $content === false )
+			"id" => "fusionforge_loginout",
+			"href" => $efbox_log_link,
+			"text" => $efbox_log_text,
+			),
+		));
+
+		foreach ( $sidebar as $boxName => $content ) {
+			if ( $content === false ) {
 				continue;
+			}
 
 			if ( $boxName == 'SEARCH' ) {
 				$this->searchBox();
@@ -246,22 +256,24 @@ echo $footerEnd;
 	function searchBox() {
 		global $wgUseTwoButtonsSearchForm;
 ?>
-	<div id="p-search" class="portlet">
-		<h5><label for="searchInput"><?php $this->msg('search') ?></label></h5>
+	<div id="p-search" class="portlet" role="search">
+		<h3><label for="searchInput"><?php $this->msg( 'search' ) ?></label></h3>
 		<div id="searchBody" class="pBody">
-			<form action="<?php $this->text('wgScript') ?>" id="searchform">
-				<input type='hidden' name="title" value="<?php $this->text('searchtitle') ?>"/>
-				<?php echo $this->makeSearchInput(array( "id" => "searchInput" )); ?>
+			<form action="<?php $this->text( 'wgScript' ) ?>" id="searchform">
+				<input type='hidden' name="title" value="<?php $this->text( 'searchtitle' ) ?>"/>
+				<?php echo $this->makeSearchInput( array( "id" => "searchInput" ) ); ?>
 
-				<?php echo $this->makeSearchButton("go", array( "id" => "searchGoButton", "class" => "searchButton" ));
-				if ($wgUseTwoButtonsSearchForm): ?> 
-				<?php echo $this->makeSearchButton("fulltext", array( "id" => "mw-searchButton", "class" => "searchButton" ));
-				else: ?>
+				<?php echo $this->makeSearchButton( "go", array( "id" => "searchGoButton", "class" => "searchButton" ) );
+				if ( $wgUseTwoButtonsSearchForm ) { ?> 
+				<?php echo $this->makeSearchButton( "fulltext", array( "id" => "mw-searchButton", "class" => "searchButton" ) );
+				} else { ?>
 
-				<div><a href="<?php $this->text('searchaction') ?>" rel="search"><?php $this->msg('powersearch-legend') ?></a></div><?php
-				endif; ?>
+				<div><a href="<?php $this->text( 'searchaction' ) ?>" rel="search"><?php $this->msg( 'powersearch-legend' ) ?></a></div><?php
+				} ?>
 
 			</form>
+
+			<?php $this->renderAfterPortlet( 'search' ); ?>
 		</div>
 	</div>
 <?php
@@ -273,16 +285,17 @@ echo $footerEnd;
 	 */
 	function cactions() {
 ?>
-	<div id="p-cactions" class="portlet">
-		<h5><?php $this->msg('views') ?></h5>
+	<div id="p-cactions" class="portlet" role="navigation">
+		<h3><?php $this->msg( 'views' ) ?></h3>
 		<div class="pBody">
 			<ul><?php
-				foreach($this->data['content_actions'] as $key => $tab) {
+				foreach ( $this->data['content_actions'] as $key => $tab ) {
 					echo '
 				' . $this->makeListItem( $key, $tab );
 				} ?>
 
 			</ul>
+<?php		$this->renderAfterPortlet( 'cactions' ); ?>
 		</div>
 	</div>
 <?php
@@ -290,13 +303,13 @@ echo $footerEnd;
 	/*************************************************************************************************/
 	function toolbox() {
 ?>
-	<div class="portlet" id="p-tb">
-		<h5><?php $this->msg('toolbox') ?></h5>
+	<div class="portlet" id="p-tb" role="navigation">
+		<h3><?php $this->msg( 'toolbox' ) ?></h3>
 		<div class="pBody">
 			<ul>
 <?php
 		foreach ( $this->getToolbox() as $key => $tbitem ) { ?>
-				<?php echo $this->makeListItem($key, $tbitem); ?>
+				<?php echo $this->makeListItem( $key, $tbitem ); ?>
 
 <?php
 		}
@@ -304,6 +317,7 @@ echo $footerEnd;
 		wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this, true ) );
 ?>
 			</ul>
+<?php		$this->renderAfterPortlet( 'tb' ); ?>
 		</div>
 	</div>
 <?php
@@ -311,17 +325,19 @@ echo $footerEnd;
 
 	/*************************************************************************************************/
 	function languageBox() {
-		if( $this->data['language_urls'] ) {
+		if ( $this->data['language_urls'] !== false ) {
 ?>
-	<div id="p-lang" class="portlet">
-		<h5<?php $this->html('userlangattributes') ?>><?php $this->msg('otherlanguages') ?></h5>
+	<div id="p-lang" class="portlet" role="navigation">
+		<h3<?php $this->html( 'userlangattributes' ) ?>><?php $this->msg( 'otherlanguages' ) ?></h3>
 		<div class="pBody">
 			<ul>
-<?php		foreach($this->data['language_urls'] as $key => $langlink) { ?>
-				<?php echo $this->makeListItem($key, $langlink); ?>
+<?php		foreach ( $this->data['language_urls'] as $key => $langlink ) { ?>
+				<?php echo $this->makeListItem( $key, $langlink ); ?>
 
 <?php		} ?>
 			</ul>
+
+<?php		$this->renderAfterPortlet( 'lang' ); ?>
 		</div>
 	</div>
 <?php
@@ -329,21 +345,26 @@ echo $footerEnd;
 	}
 
 	/*************************************************************************************************/
+	/**
+	 * @param $bar string
+	 * @param $cont array|string
+	 */
 	function customBox( $bar, $cont ) {
-		$portletAttribs = array( 'class' => 'generated-sidebar portlet', 'id' => Sanitizer::escapeId( "p-$bar" ) );
+		$portletAttribs = array( 'class' => 'generated-sidebar portlet', 'id' => Sanitizer::escapeId( "p-$bar" ), 'role' => 'navigation' );
 		$tooltip = Linker::titleAttrib( "p-$bar" );
 		if ( $tooltip !== false ) {
 			$portletAttribs['title'] = $tooltip;
 		}
 		echo '	' . Html::openElement( 'div', $portletAttribs );
+		$msgObj = wfMessage( $bar );
 ?>
 
-		<h5><?php $msg = wfMessage( $bar ); echo htmlspecialchars( $msg->exists() ? $msg->text() : $bar ); ?></h5>
+		<h3><?php echo htmlspecialchars( $msgObj->exists() ? $msgObj->text() : $bar ); ?></h3>
 		<div class='pBody'>
 <?php   if ( is_array( $cont ) ) { ?>
 			<ul>
-<?php 			foreach($cont as $key => $val) { ?>
-				<?php echo $this->makeListItem($key, $val); ?>
+<?php 			foreach ( $cont as $key => $val ) { ?>
+				<?php echo $this->makeListItem( $key, $val ); ?>
 
 <?php			} ?>
 			</ul>
@@ -351,9 +372,12 @@ echo $footerEnd;
 			# allow raw HTML block to be defined by extensions
 			print $cont;
 		}
+
+		$this->renderAfterPortlet( $bar );
 ?>
 		</div>
 	</div>
 <?php
 	}
+
 } // end of class
diff --git a/src/plugins/mediawiki/mediawiki-skin/FusionForge.php.patch b/src/plugins/mediawiki/mediawiki-skin/FusionForge.php.patch
index 54cf6b2..d0033b8 100644
--- a/src/plugins/mediawiki/mediawiki-skin/FusionForge.php.patch
+++ b/src/plugins/mediawiki/mediawiki-skin/FusionForge.php.patch
@@ -1,6 +1,6 @@
---- FusionForge.php.renamed	2012-08-06 11:35:42.000000000 +0200
-+++ FusionForge.php	2012-08-07 10:52:00.000000000 +0200
-@@ -23,11 +23,31 @@
+--- FusionForge.php.renamed	2017-06-08 12:10:54.904065528 +0000
++++ FusionForge.php	2017-06-08 12:05:33.287459609 +0000
+@@ -39,12 +39,31 @@
  	var $skinname = 'fusionforge', $stylename = 'fusionforge',
  		$template = 'FusionForgeTemplate', $useHeadElement = true;
  
@@ -9,9 +9,9 @@
 +
 +		$tc->params = array();
 +		if (($tc->project = $project =
-+		    group_get_object_by_name($GLOBALS['fusionforgeproject']))) {
++			group_get_object_by_name($GLOBALS['fusionforgeproject']))) {
 +			$tc->params['group'] = $GLOBALS['group_id'] =
-+			    $project->getID();
++			$project->getID();
 +			$tc->params['toptab'] = 'mediawiki';
 +		}
 +
@@ -22,17 +22,17 @@
  	 * @param $out OutputPage
  	 */
  	function setupSkinUserCss( OutputPage $out ) {
- 		global $wgHandheldStyle;
-+
+ 		parent::setupSkinUserCss( $out );
+ 
 +		/* add FusionForge styles */
 +		foreach ($GLOBALS['HTML']->stylesheets as $sheet) {
 +			$out->addStyle($sheet['css'], $sheet['media']);
 +		}
 +
- 		parent::setupSkinUserCss( $out );
+ 		$out->addModuleStyles( array( 'mediawiki.skinning.interface', 'skins.monobook.styles' ) );
  
- 		$out->addModuleStyles( 'skins.monobook' );
-@@ -51,6 +71,8 @@
+ 		// TODO: Migrate all of these
+@@ -60,6 +79,8 @@
   */
  class FusionForgeTemplate extends BaseTemplate {
  
@@ -41,7 +41,7 @@
  	/**
  	 * Template filter callback for FusionForge skin.
  	 * Takes an associative array of data set from a SkinTemplate-based
-@@ -66,6 +88,12 @@
+@@ -73,6 +94,12 @@
  		wfSuppressWarnings();
  
  		$this->html( 'headelement' );
@@ -52,47 +52,43 @@
 +		echo "<!-- FUSIONFORGE BodyHeader END -->\n";
 +
  ?><div id="globalWrapper">
- <div id="column-content"><div id="content">
+ <div id="column-content"><div id="content" class="mw-body-primary" role="main">
  	<a id="top"></a>
-@@ -162,8 +190,8 @@
- </div>
- <?php
+@@ -166,6 +193,8 @@
  		$this->printTrail();
--		echo Html::closeElement( 'body' );
--		echo Html::closeElement( 'html' );
+ 		echo Html::closeElement( 'body' );
+ 		echo Html::closeElement( 'html' );
 +		echo "</div></div>\n";
 +		$GLOBALS['HTML']->footer($this->params);
  		wfRestoreWarnings();
  	} // end of execute() method
  
-@@ -174,6 +202,30 @@
- 		if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true;
- 		if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true;
+@@ -185,6 +214,28 @@
+ 			$sidebar['LANGUAGES'] = true;
+ 		}
  
 +		if (session_loggedin()) {
 +			$efbox_log_text = _('Log Out');
-+			$efbox_log_link = "/account/logout.php?return_to=" .
-+			    urlencode(getStringFromServer('REQUEST_URI'));
++			$efbox_log_link = "/account/logout.php?return_to=" . urlencode(getStringFromServer('REQUEST_URI'));
 +		} else {
 +			$efbox_log_text = _('Log In');
-+			$efbox_log_link = "/account/login.php?return_to=" .
-+			    urlencode(getStringFromServer('REQUEST_URI'));
++			$efbox_log_link = "/account/login.php?return_to=" . urlencode(getStringFromServer('REQUEST_URI'));
 +		}
-+		$efbox_prj_link = "/projects/" .
-+		    $this->project->getUnixName() . "/";
++		$efbox_prj_link = "/projects/" . $this->project->getUnixName() . "/";
++
 +		$this->customBox("FusionForge", array(
 +			"project" => array(
-+				"id" => "fusionforge_project",
-+				"href" => $efbox_prj_link,
-+				"text" => _("Project Summary"),
-+			    ),
++			"id" => "fusionforge_project",
++			"href" => $efbox_prj_link,
++			"text" => _("Project Summary"),
++			),
 +			"loginout" => array(
-+				"id" => "fusionforge_loginout",
-+				"href" => $efbox_log_link,
-+				"text" => $efbox_log_text,
-+			    ),
-+		    ));
++			"id" => "fusionforge_loginout",
++			"href" => $efbox_log_link,
++			"text" => $efbox_log_text,
++			),
++		));
 +
- 		foreach( $sidebar as $boxName => $content ) {
- 			if ( $content === false )
+ 		foreach ( $sidebar as $boxName => $content ) {
+ 			if ( $content === false ) {
  				continue;
diff --git a/src/plugins/mediawiki/mediawiki-skin/FusionForge.php.renamed b/src/plugins/mediawiki/mediawiki-skin/FusionForge.php.renamed
index 8a4dcf5..0320c2f 100644
--- a/src/plugins/mediawiki/mediawiki-skin/FusionForge.php.renamed
+++ b/src/plugins/mediawiki/mediawiki-skin/FusionForge.php.renamed
@@ -1,17 +1,33 @@
 <?php
 /**
- * FusionForge nouveau
+ * FusionForge nouveau.
  *
  * Translated from gwicke's previous TAL template version to remove
  * dependency on PHPTAL.
  *
+ * This program 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.
+ *
+ * This program 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.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
  * @todo document
  * @file
  * @ingroup Skins
  */
 
-if( !defined( 'MEDIAWIKI' ) )
+if ( !defined( 'MEDIAWIKI' ) ) {
 	die( -1 );
+}
 
 /**
  * Inherit main code from SkinTemplate, set the CSS and template filter.
@@ -27,16 +43,9 @@ class SkinFusionForge extends SkinTemplate {
 	 * @param $out OutputPage
 	 */
 	function setupSkinUserCss( OutputPage $out ) {
-		global $wgHandheldStyle;
 		parent::setupSkinUserCss( $out );
 
-		$out->addModuleStyles( 'skins.monobook' );
-
-		// Ugh. Can't do this properly because $wgHandheldStyle may be a URL
-		if( $wgHandheldStyle ) {
-			// Currently in testing... try 'chick/main.css'
-			$out->addStyle( $wgHandheldStyle, 'handheld' );
-		}
+		$out->addModuleStyles( array( 'mediawiki.skinning.interface', 'skins.monobook.styles' ) );
 
 		// TODO: Migrate all of these
 		$out->addStyle( 'monobook/IE60Fixes.css', 'screen', 'IE 6' );
@@ -60,64 +69,57 @@ class FusionForgeTemplate extends BaseTemplate {
 	 * @access private
 	 */
 	function execute() {
-		global $wgHtml5;
-
 		// Suppress warnings to prevent notices about missing indexes in $this->data
 		wfSuppressWarnings();
 
 		$this->html( 'headelement' );
 ?><div id="globalWrapper">
-<div id="column-content"><div id="content">
+<div id="column-content"><div id="content" class="mw-body-primary" role="main">
 	<a id="top"></a>
-	<?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
+	<?php if ( $this->data['sitenotice'] ) { ?><div id="siteNotice"><?php $this->html( 'sitenotice' ) ?></div><?php } ?>
 
-	<h1 id="firstHeading" class="firstHeading"><span<?php if ($wgHtml5) echo ' dir="auto"'; ?>><?php $this->html('title') ?></span></h1>
+	<h1 id="firstHeading" class="firstHeading" lang="<?php
+		$this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
+		$this->text( 'pageLanguage' );
+	?>"><span dir="auto"><?php $this->html( 'title' ) ?></span></h1>
 	<div id="bodyContent" class="mw-body">
-		<div id="siteSub"><?php $this->msg('tagline') ?></div>
-		<div id="contentSub"<?php $this->html('userlangattributes') ?>><?php $this->html('subtitle') ?></div>
-<?php if($this->data['undelete']) { ?>
-		<div id="contentSub2"><?php $this->html('undelete') ?></div>
-<?php } ?><?php if($this->data['newtalk'] ) { ?>
-		<div class="usermessage"><?php $this->html('newtalk')  ?></div>
-<?php } ?><?php if($this->data['showjumplinks']) { ?>
-		<div id="jump-to-nav" class="mw-jump"><?php $this->msg('jumpto') ?> <a href="#column-one"><?php $this->msg('jumptonavigation') ?></a>, <a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div>
+		<div id="siteSub"><?php $this->msg( 'tagline' ) ?></div>
+		<div id="contentSub"<?php $this->html( 'userlangattributes' ) ?>><?php $this->html( 'subtitle' ) ?></div>
+<?php if ( $this->data['undelete'] ) { ?>
+		<div id="contentSub2"><?php $this->html( 'undelete' ) ?></div>
+<?php } ?><?php if ( $this->data['newtalk'] ) { ?>
+		<div class="usermessage"><?php $this->html( 'newtalk' ) ?></div>
 <?php } ?>
+		<div id="jump-to-nav" class="mw-jump"><?php $this->msg( 'jumpto' ) ?> <a href="#column-one"><?php $this->msg( 'jumptonavigation' ) ?></a><?php $this->msg( 'comma-separator' ) ?><a href="#searchInput"><?php $this->msg( 'jumptosearch' ) ?></a></div>
+
 		<!-- start content -->
-<?php $this->html('bodytext') ?>
-		<?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>
+<?php $this->html( 'bodytext' ) ?>
+		<?php if ( $this->data['catlinks'] ) { $this->html( 'catlinks' ); } ?>
 		<!-- end content -->
-		<?php if($this->data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?>
+		<?php if ( $this->data['dataAfterContent'] ) { $this->html( 'dataAfterContent' ); } ?>
 		<div class="visualClear"></div>
 	</div>
 </div></div>
-<div id="column-one"<?php $this->html('userlangattributes')  ?>>
+<div id="column-one"<?php $this->html( 'userlangattributes' ) ?>>
+	<h2><?php $this->msg( 'navigation-heading' ) ?></h2>
 <?php $this->cactions(); ?>
-	<div class="portlet" id="p-personal">
-		<h5><?php $this->msg('personaltools') ?></h5>
+	<div class="portlet" id="p-personal" role="navigation">
+		<h3><?php $this->msg( 'personaltools' ) ?></h3>
 		<div class="pBody">
-<?php
-	$ul_shown = false;
-	foreach ($this->getPersonalTools() as $key => $item) {
-		if (!$ul_shown) {
-?>
-			<ul<?php $this->html('userlangattributes') ?>>
-<?php
-			$ul_shown = true;
-		}
-		echo "\n" . $this->makeListItem($key, $item);
-	}
-	if ($ul_shown) {
-		echo "\n</ul>\n";
-	}
-?>
+			<ul<?php $this->html( 'userlangattributes' ) ?>>
+<?php		foreach ( $this->getPersonalTools() as $key => $item ) { ?>
+				<?php echo $this->makeListItem( $key, $item ); ?>
+
+<?php		} ?>
+			</ul>
 		</div>
 	</div>
-	<div class="portlet" id="p-logo">
+	<div class="portlet" id="p-logo" role="banner">
 <?php
 			echo Html::element( 'a', array(
 				'href' => $this->data['nav_urls']['mainpage']['href'],
 				'style' => "background-image: url({$this->data['logopath']});" )
-				+ Linker::tooltipAndAccesskeyAttribs('p-logo') ); ?>
+				+ Linker::tooltipAndAccesskeyAttribs( 'p-logo' ) ); ?>
 
 	</div>
 <?php
@@ -130,14 +132,14 @@ class FusionForgeTemplate extends BaseTemplate {
 	$validFooterLinks = $this->getFooterLinks( "flat" ); // Additional footer links
 
 	if ( count( $validFooterIcons ) + count( $validFooterLinks ) > 0 ) { ?>
-<div id="footer"<?php $this->html('userlangattributes') ?>>
+<div id="footer" role="contentinfo"<?php $this->html( 'userlangattributes' ) ?>>
 <?php
 		$footerEnd = '</div>';
 	} else {
 		$footerEnd = '';
 	}
 	foreach ( $validFooterIcons as $blockName => $footerIcons ) { ?>
-	<div id="f-<?php echo htmlspecialchars($blockName); ?>ico">
+	<div id="f-<?php echo htmlspecialchars( $blockName ); ?>ico">
 <?php foreach ( $footerIcons as $icon ) { ?>
 		<?php echo $this->getSkin()->makeFooterIcon( $icon ); ?>
 
@@ -149,8 +151,8 @@ class FusionForgeTemplate extends BaseTemplate {
 		if ( count( $validFooterLinks ) > 0 ) {
 ?>	<ul id="f-list">
 <?php
-			foreach( $validFooterLinks as $aLink ) { ?>
-		<li id="<?php echo $aLink ?>"><?php $this->html($aLink) ?></li>
+			foreach ( $validFooterLinks as $aLink ) { ?>
+		<li id="<?php echo $aLink ?>"><?php $this->html( $aLink ) ?></li>
 <?php
 			}
 ?>
@@ -169,14 +171,24 @@ echo $footerEnd;
 
 	/*************************************************************************************************/
 
+	/**
+	 * @param $sidebar array
+	 */
 	protected function renderPortals( $sidebar ) {
-		if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true;
-		if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true;
-		if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true;
+		if ( !isset( $sidebar['SEARCH'] ) ) {
+			$sidebar['SEARCH'] = true;
+		}
+		if ( !isset( $sidebar['TOOLBOX'] ) ) {
+			$sidebar['TOOLBOX'] = true;
+		}
+		if ( !isset( $sidebar['LANGUAGES'] ) ) {
+			$sidebar['LANGUAGES'] = true;
+		}
 
-		foreach( $sidebar as $boxName => $content ) {
-			if ( $content === false )
+		foreach ( $sidebar as $boxName => $content ) {
+			if ( $content === false ) {
 				continue;
+			}
 
 			if ( $boxName == 'SEARCH' ) {
 				$this->searchBox();
@@ -193,22 +205,24 @@ echo $footerEnd;
 	function searchBox() {
 		global $wgUseTwoButtonsSearchForm;
 ?>
-	<div id="p-search" class="portlet">
-		<h5><label for="searchInput"><?php $this->msg('search') ?></label></h5>
+	<div id="p-search" class="portlet" role="search">
+		<h3><label for="searchInput"><?php $this->msg( 'search' ) ?></label></h3>
 		<div id="searchBody" class="pBody">
-			<form action="<?php $this->text('wgScript') ?>" id="searchform">
-				<input type='hidden' name="title" value="<?php $this->text('searchtitle') ?>"/>
-				<?php echo $this->makeSearchInput(array( "id" => "searchInput" )); ?>
+			<form action="<?php $this->text( 'wgScript' ) ?>" id="searchform">
+				<input type='hidden' name="title" value="<?php $this->text( 'searchtitle' ) ?>"/>
+				<?php echo $this->makeSearchInput( array( "id" => "searchInput" ) ); ?>
 
-				<?php echo $this->makeSearchButton("go", array( "id" => "searchGoButton", "class" => "searchButton" ));
-				if ($wgUseTwoButtonsSearchForm): ?> 
-				<?php echo $this->makeSearchButton("fulltext", array( "id" => "mw-searchButton", "class" => "searchButton" ));
-				else: ?>
+				<?php echo $this->makeSearchButton( "go", array( "id" => "searchGoButton", "class" => "searchButton" ) );
+				if ( $wgUseTwoButtonsSearchForm ) { ?> 
+				<?php echo $this->makeSearchButton( "fulltext", array( "id" => "mw-searchButton", "class" => "searchButton" ) );
+				} else { ?>
 
-				<div><a href="<?php $this->text('searchaction') ?>" rel="search"><?php $this->msg('powersearch-legend') ?></a></div><?php
-				endif; ?>
+				<div><a href="<?php $this->text( 'searchaction' ) ?>" rel="search"><?php $this->msg( 'powersearch-legend' ) ?></a></div><?php
+				} ?>
 
 			</form>
+
+			<?php $this->renderAfterPortlet( 'search' ); ?>
 		</div>
 	</div>
 <?php
@@ -220,16 +234,17 @@ echo $footerEnd;
 	 */
 	function cactions() {
 ?>
-	<div id="p-cactions" class="portlet">
-		<h5><?php $this->msg('views') ?></h5>
+	<div id="p-cactions" class="portlet" role="navigation">
+		<h3><?php $this->msg( 'views' ) ?></h3>
 		<div class="pBody">
 			<ul><?php
-				foreach($this->data['content_actions'] as $key => $tab) {
+				foreach ( $this->data['content_actions'] as $key => $tab ) {
 					echo '
 				' . $this->makeListItem( $key, $tab );
 				} ?>
 
 			</ul>
+<?php		$this->renderAfterPortlet( 'cactions' ); ?>
 		</div>
 	</div>
 <?php
@@ -237,13 +252,13 @@ echo $footerEnd;
 	/*************************************************************************************************/
 	function toolbox() {
 ?>
-	<div class="portlet" id="p-tb">
-		<h5><?php $this->msg('toolbox') ?></h5>
+	<div class="portlet" id="p-tb" role="navigation">
+		<h3><?php $this->msg( 'toolbox' ) ?></h3>
 		<div class="pBody">
 			<ul>
 <?php
 		foreach ( $this->getToolbox() as $key => $tbitem ) { ?>
-				<?php echo $this->makeListItem($key, $tbitem); ?>
+				<?php echo $this->makeListItem( $key, $tbitem ); ?>
 
 <?php
 		}
@@ -251,6 +266,7 @@ echo $footerEnd;
 		wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this, true ) );
 ?>
 			</ul>
+<?php		$this->renderAfterPortlet( 'tb' ); ?>
 		</div>
 	</div>
 <?php
@@ -258,17 +274,19 @@ echo $footerEnd;
 
 	/*************************************************************************************************/
 	function languageBox() {
-		if( $this->data['language_urls'] ) {
+		if ( $this->data['language_urls'] !== false ) {
 ?>
-	<div id="p-lang" class="portlet">
-		<h5<?php $this->html('userlangattributes') ?>><?php $this->msg('otherlanguages') ?></h5>
+	<div id="p-lang" class="portlet" role="navigation">
+		<h3<?php $this->html( 'userlangattributes' ) ?>><?php $this->msg( 'otherlanguages' ) ?></h3>
 		<div class="pBody">
 			<ul>
-<?php		foreach($this->data['language_urls'] as $key => $langlink) { ?>
-				<?php echo $this->makeListItem($key, $langlink); ?>
+<?php		foreach ( $this->data['language_urls'] as $key => $langlink ) { ?>
+				<?php echo $this->makeListItem( $key, $langlink ); ?>
 
 <?php		} ?>
 			</ul>
+
+<?php		$this->renderAfterPortlet( 'lang' ); ?>
 		</div>
 	</div>
 <?php
@@ -276,21 +294,26 @@ echo $footerEnd;
 	}
 
 	/*************************************************************************************************/
+	/**
+	 * @param $bar string
+	 * @param $cont array|string
+	 */
 	function customBox( $bar, $cont ) {
-		$portletAttribs = array( 'class' => 'generated-sidebar portlet', 'id' => Sanitizer::escapeId( "p-$bar" ) );
+		$portletAttribs = array( 'class' => 'generated-sidebar portlet', 'id' => Sanitizer::escapeId( "p-$bar" ), 'role' => 'navigation' );
 		$tooltip = Linker::titleAttrib( "p-$bar" );
 		if ( $tooltip !== false ) {
 			$portletAttribs['title'] = $tooltip;
 		}
 		echo '	' . Html::openElement( 'div', $portletAttribs );
+		$msgObj = wfMessage( $bar );
 ?>
 
-		<h5><?php $msg = wfMessage( $bar ); echo htmlspecialchars( $msg->exists() ? $msg->text() : $bar ); ?></h5>
+		<h3><?php echo htmlspecialchars( $msgObj->exists() ? $msgObj->text() : $bar ); ?></h3>
 		<div class='pBody'>
 <?php   if ( is_array( $cont ) ) { ?>
 			<ul>
-<?php 			foreach($cont as $key => $val) { ?>
-				<?php echo $this->makeListItem($key, $val); ?>
+<?php 			foreach ( $cont as $key => $val ) { ?>
+				<?php echo $this->makeListItem( $key, $val ); ?>
 
 <?php			} ?>
 			</ul>
@@ -298,9 +321,12 @@ echo $footerEnd;
 			# allow raw HTML block to be defined by extensions
 			print $cont;
 		}
+
+		$this->renderAfterPortlet( $bar );
 ?>
 		</div>
 	</div>
 <?php
 	}
+
 } // end of class

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

Summary of changes:
 autoinstall/install-src.sh                         |   9 +-
 .../mediawiki/mediawiki-skin/FusionForge.php       | 228 ++++++++++++---------
 .../mediawiki/mediawiki-skin/FusionForge.php.patch |  70 +++----
 .../mediawiki-skin/FusionForge.php.renamed         | 188 +++++++++--------
 4 files changed, 272 insertions(+), 223 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list