[Pkg-mediawiki-commits] r213 - in mediawiki/exp-1.16: . patches

Jonathan Wiltshire jmw-guest at alioth.debian.org
Wed Jul 28 20:48:14 UTC 2010


Author: jmw-guest
Date: 2010-07-28 20:48:08 +0000 (Wed, 28 Jul 2010)
New Revision: 213

Added:
   mediawiki/exp-1.16/patches/
   mediawiki/exp-1.16/patches/add_rss_guid.patch
   mediawiki/exp-1.16/patches/backup_documentation.patch
   mediawiki/exp-1.16/patches/debian_specific_config.patch
   mediawiki/exp-1.16/patches/detect_invalid_titles.patch
   mediawiki/exp-1.16/patches/mimetypes.patch
   mediawiki/exp-1.16/patches/series
   mediawiki/exp-1.16/patches/suppress_warnings.patch
   mediawiki/exp-1.16/patches/texvc_location.patch
Log:
Refresh patches for new upstream

Added: mediawiki/exp-1.16/patches/add_rss_guid.patch
===================================================================
--- mediawiki/exp-1.16/patches/add_rss_guid.patch	                        (rev 0)
+++ mediawiki/exp-1.16/patches/add_rss_guid.patch	2010-07-28 20:48:08 UTC (rev 213)
@@ -0,0 +1,77 @@
+Index: mediawiki-1.15.2/includes/Feed.php
+===================================================================
+--- mediawiki-1.15.2.orig/includes/Feed.php	2008-11-18 18:11:14.000000000 -0600
++++ mediawiki-1.15.2/includes/Feed.php	2010-03-15 12:16:49.000000000 -0500
+@@ -37,6 +37,8 @@
+ 	var $Url = '';
+ 	var $Date = '';
+ 	var $Author = '';
++	var $UniqueId = '';
++	var $RSSIsPermalink;
+ 	/**#@-*/
+ 
+ 	/**#@+
+@@ -47,6 +49,8 @@
+ 		$this->Title = $Title;
+ 		$this->Description = $Description;
+ 		$this->Url = $Url;
++		$this->UniqueId = $Url;
++		$this->RSSIsPermalink = false;
+ 		$this->Date = $Date;
+ 		$this->Author = $Author;
+ 		$this->Comments = $Comments;
+@@ -58,6 +62,28 @@
+ 		return htmlspecialchars( $string );
+ 	}
+ 
++	/**
++	 * Get the unique id of this item
++	 *
++	 * @return String
++	 */
++	public function getUniqueId() {
++		if ( $this->UniqueId ) {
++			return $this->xmlEncode( $this->UniqueId );
++		}
++	}
++
++	/**
++	 * set the unique id of an item
++	 *
++	 * @param $uniqueId String: unique id for the item
++	 * @param $RSSisPermalink Boolean: set to true if the guid (unique id) is a permalink (RSS feeds only)
++	 */
++	public function setUniqueId($uniqueId, $RSSisPermalink = False) {
++		$this->UniqueId = $uniqueId;
++		$this->RSSIsPermalink = $isPermalink;
++	}
++
+ 	public function getTitle() {
+ 		return $this->xmlEncode( $this->Title );
+ 	}
+@@ -84,7 +110,7 @@
+ 	public function getComments() {
+ 		return $this->xmlEncode( $this->Comments );
+ 	}
+-	
++
+ 	/**
+ 	 * Quickie hack... strip out wikilinks to more legible form from the comment.
+ 	 */
+@@ -217,6 +243,7 @@
+ 		<item>
+ 			<title><?php print $item->getTitle() ?></title>
+ 			<link><?php print $item->getUrl() ?></link>
++			<guid<?php if( $item->RSSIsPermalink ) print ' isPermaLink="true"' ?>><?php print $item->getUniqueId() ?></guid>
+ 			<description><?php print $item->getDescription() ?></description>
+ 			<?php if( $item->getDate() ) { ?><pubDate><?php print $this->formatTime( $item->getDate() ) ?></pubDate><?php } ?>
+ 			<?php if( $item->getAuthor() ) { ?><dc:creator><?php print $item->getAuthor() ?></dc:creator><?php }?>
+@@ -297,7 +324,7 @@
+ 		global $wgMimeType;
+ 	?>
+ 	<entry>
+-		<id><?php print $item->getUrl() ?></id>
++		<id><?php print $item->getUniqueId() ?></id>
+ 		<title><?php print $item->getTitle() ?></title>
+ 		<link rel="alternate" type="<?php print $wgMimeType ?>" href="<?php print $item->getUrl() ?>"/>
+ 		<?php if( $item->getDate() ) { ?>

Added: mediawiki/exp-1.16/patches/backup_documentation.patch
===================================================================
--- mediawiki/exp-1.16/patches/backup_documentation.patch	                        (rev 0)
+++ mediawiki/exp-1.16/patches/backup_documentation.patch	2010-07-28 20:48:08 UTC (rev 213)
@@ -0,0 +1,33 @@
+Description: expand the inline documentation of maintenance/dumpBackup.php
+Author: Jonathan Wiltshire <debian at jwiltshire.org.uk>
+Bug: https://bugzilla.wikimedia.org/show_bug.cgi?id=24132
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=572355
+Last-Update: 2010-06-26
+--- mediawiki-1.16.0.orig/maintenance/dumpBackup.php
++++ mediawiki-1.16.0/maintenance/dumpBackup.php
+@@ -91,6 +91,13 @@
+   --skip-footer Don't output the </mediawiki> footer
+   --stub      Don't perform old_text lookups; for 2-pass dump
+   --uploads   Include upload records (experimental)
++  --conf      Use the specified configuration file (LocalSettings.php)
++  --aconf     Use the specified admin configuration file (AdminSettings.php)
++
++  --pagelist=<file>
++          Find in the specified <file> a list of pages to be backed up
++
++  --wiki=<wiki>  Only back up the specified <wiki>
+ 
+ Fancy stuff: (Works? Add examples please.)
+   --plugin=<class>[:<file>]   Load a dump plugin class
+--- mediawiki-1.16.0.orig/maintenance/Maintenance.php
++++ mediawiki-1.16.0/maintenance/Maintenance.php
+@@ -741,7 +741,8 @@
+ 
+ 		if ( !is_readable( $settingsFile ) ) {
+ 			$this->error( "A copy of your installation's LocalSettings.php\n" .
+-			  			"must exist and be readable in the source directory.", true );
++			  			"must exist and be readable in the source directory.\n" .
++						"Use --conf to specify it.\n", true );
+ 		}
+ 		$wgCommandLineMode = true;
+ 		$DP = $IP;

Added: mediawiki/exp-1.16/patches/debian_specific_config.patch
===================================================================
--- mediawiki/exp-1.16/patches/debian_specific_config.patch	                        (rev 0)
+++ mediawiki/exp-1.16/patches/debian_specific_config.patch	2010-07-28 20:48:08 UTC (rev 213)
@@ -0,0 +1,73 @@
+--- mediawiki-1.16.0.orig/config/index.php
++++ mediawiki-1.16.0/config/index.php
+@@ -21,7 +21,6 @@
+ 
+ # Attempt to set up the include path, to fix problems with relative includes
+ $IP = dirname( dirname( __FILE__ ) );
+-define( 'MW_INSTALL_PATH', $IP );
+ 
+ # Define an entry point and include some files
+ define( "MEDIAWIKI", true );
+--- mediawiki-1.16.0.orig/config/Installer.php
++++ mediawiki-1.16.0/config/Installer.php
+@@ -258,7 +258,7 @@
+ if( !is_writable( "." ) ) {
+ 	dieout( "<h2>Can't write config file, aborting</h2>
+ 
+-	<p>In order to configure the wiki you have to make the <tt>config</tt> subdirectory
++	<p>In order to configure the wiki you have to make the <tt>/var/lib/mediawiki/config</tt> subdirectory
+ 	writable by the web server. Once configuration is done you'll move the created
+ 	<tt>LocalSettings.php</tt> to the parent directory, and for added safety you can
+ 	then remove the <tt>config</tt> subdirectory entirely.</p>
+@@ -1742,16 +1742,7 @@
+ <div class="success-box">
+ <p>Installation successful!</p>
+ <p>To complete the installation, please do the following:
+-<ol>
+-	<li>Download config/LocalSettings.php with your FTP client or file manager</li>
+-	<li>Upload it to the parent directory</li>
+-	<li>Delete config/LocalSettings.php</li>
+-	<li>Start using <a href='../$script'>your wiki</a>!
+-</ol>
+-<p>If you are in a shared hosting environment, do <strong>not</strong> just move LocalSettings.php
+-remotely. LocalSettings.php is currently owned by the user your webserver is running under,
+-which means that anyone on the same server can read your database password! Downloading
+-it and uploading it again will hopefully change the ownership to a user ID specific to you.</p>
++<p>Move <tt>/var/lib/mediawiki/config/LocalSettings.php</tt> to <tt>/etc/mediawiki/LocalSettings.php</tt> for normal install, root of your install for multisite, with rights 640</p>
+ </div>
+ HTML;
+ 	} else {
+@@ -1759,7 +1750,7 @@
+ <div class="success-box">
+ <p>
+ <span class="success-message">Installation successful!</span>
+-Move the <tt>config/LocalSettings.php</tt> file to the parent directory, then follow
++Move <tt>/var/lib/mediawiki/config/LocalSettings.php</tt> to /etc/mediawiki, then follow
+ <a href="../$script"> this link</a> to your wiki.</p>
+ <p>You should change file permissions for <tt>LocalSettings.php</tt> as required to
+ prevent other users on the server reading passwords and altering configuration data.</p>
+@@ -1921,6 +1912,12 @@
+ 
+ # If you customize your file layout, set \$IP to the directory that contains
+ # the other MediaWiki files. It will be used as a base to locate files.
++
++# We define this to allow the configuration file to be explicitly 
++# located in /etc/mediawiki.
++# Change this if you are setting up multisite wikis on your server.
++define('MW_INSTALL_PATH','/var/lib/mediawiki');
++
+ if( defined( 'MW_INSTALL_PATH' ) ) {
+ 	\$IP = MW_INSTALL_PATH;
+ } else {
+@@ -2029,6 +2026,11 @@
+ 
+ \$wgDiff3 = \"{$slconf['diff3']}\";
+ 
++# debian specific include:
++if (is_file(\"/etc/mediawiki-extensions/extensions.php\")) {
++        include( \"/etc/mediawiki-extensions/extensions.php\" );
++}
++
+ # When you make changes to this configuration file, this will make
+ # sure that cached pages are cleared.
+ \$wgCacheEpoch = max( \$wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );

Added: mediawiki/exp-1.16/patches/detect_invalid_titles.patch
===================================================================
--- mediawiki/exp-1.16/patches/detect_invalid_titles.patch	                        (rev 0)
+++ mediawiki/exp-1.16/patches/detect_invalid_titles.patch	2010-07-28 20:48:08 UTC (rev 213)
@@ -0,0 +1,14 @@
+Index: mediawiki-1.15.2/includes/specials/SpecialMostlinked.php
+===================================================================
+--- mediawiki-1.15.2.orig/includes/specials/SpecialMostlinked.php	2008-07-17 20:31:18.000000000 -0500
++++ mediawiki-1.15.2/includes/specials/SpecialMostlinked.php	2010-03-15 12:02:51.000000000 -0500
+@@ -75,6 +75,9 @@
+ 	function formatResult( $skin, $result ) {
+ 		global $wgLang;
+ 		$title = Title::makeTitleSafe( $result->namespace, $result->title );
++                if ( !$title ) {
++                        return '<!-- ' . htmlspecialchars( "Invalid title: [[$title]]" ) . ' -->';
++                }
+ 		$link = $skin->makeLinkObj( $title );
+ 		$wlh = $this->makeWlhLink( $title,
+ 			wfMsgExt( 'nlinks', array( 'parsemag', 'escape'),

Added: mediawiki/exp-1.16/patches/mimetypes.patch
===================================================================
--- mediawiki/exp-1.16/patches/mimetypes.patch	                        (rev 0)
+++ mediawiki/exp-1.16/patches/mimetypes.patch	2010-07-28 20:48:08 UTC (rev 213)
@@ -0,0 +1,13 @@
+--- mediawiki-1.16.0.orig/includes/DefaultSettings.php
++++ mediawiki-1.16.0/includes/DefaultSettings.php
+@@ -379,8 +379,8 @@
+ $wgVerifyMimeType= true;
+ 
+ /** Sets the mime type definition file to use by MimeMagic.php. */
+-$wgMimeTypeFile= "includes/mime.types";
+-#$wgMimeTypeFile= "/etc/mime.types";
++#$wgMimeTypeFile= "includes/mime.types";
++$wgMimeTypeFile= "/etc/mime.types";
+ #$wgMimeTypeFile= null; #use built-in defaults only.
+ 
+ /** Sets the mime type info file to use by MimeMagic.php. */

Added: mediawiki/exp-1.16/patches/series
===================================================================
--- mediawiki/exp-1.16/patches/series	                        (rev 0)
+++ mediawiki/exp-1.16/patches/series	2010-07-28 20:48:08 UTC (rev 213)
@@ -0,0 +1,7 @@
+texvc_location.patch
+mimetypes.patch
+debian_specific_config.patch
+#detect_invalid_titles.patch
+#add_rss_guid.patch
+backup_documentation.patch
+suppress_warnings.patch

Added: mediawiki/exp-1.16/patches/suppress_warnings.patch
===================================================================
--- mediawiki/exp-1.16/patches/suppress_warnings.patch	                        (rev 0)
+++ mediawiki/exp-1.16/patches/suppress_warnings.patch	2010-07-28 20:48:08 UTC (rev 213)
@@ -0,0 +1,16 @@
+$Id: suppress_warnings.patch 202 2010-07-28 09:53:24Z tg $
+
+Suppress warnings from being run within FusionForge’s gforge-plugin-mediawiki
+
+diff -pruN mediawiki-1.15.4~/includes/GlobalFunctions.php mediawiki-1.15.4/includes/GlobalFunctions.php
+--- mediawiki-1.15.4~/includes/GlobalFunctions.php	2009-03-25 03:07:09.000000000 +0100
++++ mediawiki-1.15.4/includes/GlobalFunctions.php	2010-07-28 11:46:06.000000000 +0200
+@@ -2678,7 +2678,7 @@ function wfSetupSession() {
+ 	}
+ 	session_cache_limiter( 'private, must-revalidate' );
+ 	wfSuppressWarnings();
+-	session_start();
++	@session_start();
+ 	wfRestoreWarnings();
+ }
+ 

Added: mediawiki/exp-1.16/patches/texvc_location.patch
===================================================================
--- mediawiki/exp-1.16/patches/texvc_location.patch	                        (rev 0)
+++ mediawiki/exp-1.16/patches/texvc_location.patch	2010-07-28 20:48:08 UTC (rev 213)
@@ -0,0 +1,11 @@
+--- mediawiki-1.16.0.orig/includes/DefaultSettings.php
++++ mediawiki-1.16.0/includes/DefaultSettings.php
+@@ -1957,7 +1957,7 @@
+  */
+ $wgUseTeX = false;
+ /** Location of the texvc binary */
+-$wgTexvc = './math/texvc';
++$wgTexvc = '/usr/bin/texvc';
+ /**
+   * Texvc background color
+   * use LaTeX color format as used in \special function




More information about the Pkg-mediawiki-commits mailing list