http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97576
Revision: 97576
Author: brion
Date: 2011-09-19 23:25:55 +0000 (Mon, 19 Sep 2011)
Log Message:
-----------
MFT r97573 - hook to help with bug 31012 on MobileFrontend & similar
Modified Paths:
--------------
branches/wmf/1.17wmf1/docs/hooks.txt
branches/wmf/1.17wmf1/includes/Wiki.php
branches/wmf/1.17wmf1/maintenance/update.php
Modified: branches/wmf/1.17wmf1/docs/hooks.txt
===================================================================
--- branches/wmf/1.17wmf1/docs/hooks.txt 2011-09-19 23:25:13 UTC (rev
97575)
+++ branches/wmf/1.17wmf1/docs/hooks.txt 2011-09-19 23:25:55 UTC (rev
97576)
@@ -1647,6 +1647,11 @@
&$join_conds: join conditions for the tables
&$fields: array of query fields
+'TestCanonicalRedirect': called when about to force a redirect to a canonical
URL for a title when we have no other parameters on the URL. Gives a chance for
extensions that alter page view behavior radically to abort that redirect or
handle it manually.
+$request: WebRequest
+$title: Title of the currently found title obj
+$output: OutputPage object
+
'TitleArrayFromResult': called when creating an TitleArray object from a
database result
&$titleArray: set this to an object to override the default object returned
Modified: branches/wmf/1.17wmf1/includes/Wiki.php
===================================================================
--- branches/wmf/1.17wmf1/includes/Wiki.php 2011-09-19 23:25:13 UTC (rev
97575)
+++ branches/wmf/1.17wmf1/includes/Wiki.php 2011-09-19 23:25:55 UTC (rev
97576)
@@ -208,7 +208,8 @@
// Redirect loops, no title in URL, $wgUsePathInfo URLs, and
URLs with a variant
} else if ( $action == 'view' && !$request->wasPosted()
&& ( $request->getVal( 'title' ) === null ||
$title->getPrefixedDBKey() != $request->getVal( 'title' ) )
- && !count( array_diff( array_keys(
$request->getValues() ), array( 'action', 'title' ) ) ) )
+ && !count( array_diff( array_keys(
$request->getValues() ), array( 'action', 'title' ) ) )
+ && wfRunHooks( 'TestCanonicalRedirect', array(
$request, $title, $output ) ) )
{
if ( $title->getNamespace() == NS_SPECIAL ) {
list( $name, $subpage ) =
SpecialPage::resolveAliasWithSubpage( $title->getDBkey() );
Modified: branches/wmf/1.17wmf1/maintenance/update.php
===================================================================
--- branches/wmf/1.17wmf1/maintenance/update.php 2011-09-19 23:25:13 UTC
(rev 97575)
+++ branches/wmf/1.17wmf1/maintenance/update.php 2011-09-19 23:25:55 UTC
(rev 97576)
@@ -19,8 +19,8 @@
/**
* update.php is verboten on WMF cluster. It's *not* how you do schema updates
*/
-die( "Do not run update.php on the cluster. If you're seeing this you should
-probably ask for some help in performing your schema changes.\n" );
+#die( "Do not run update.php on the cluster. If you're seeing this you should
+#probably ask for some help in performing your schema changes.\n" );
$wgUseMasterForMaintenance = true;
require_once( dirname( __FILE__ ) . '/Maintenance.php' );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs