r60253 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60252‎ | r60253 | r60254 >
Date:07:22, 21 December 2009
Author:tstarling
Status:deferred
Tags:
Comment:
Fix for bug 20818: To make google happy, set a dummy parameter (dpl_id) which does nothing, instead of setting curid which, among other things, suppresses bots.
Modified paths:
  • /trunk/extensions/intersection/DynamicPageList.php (modified) (history)

Diff [purge]

Index: trunk/extensions/intersection/DynamicPageList.php
@@ -87,6 +87,7 @@
8888 $iNamespace = 0;
8989
9090 $bShowCurId = false;
 91+ $bGoogleHack = false;
9192
9293 $bSuppressErrors = false;
9394 $bShowNamespace = true;
@@ -275,6 +276,13 @@
276277 else
277278 $bShowCurId = true;
278279 }
 280+ else if ('googlehack' == $sType)
 281+ {
 282+ if ('false' == $sArg)
 283+ $bGoogleHack = false;
 284+ else
 285+ $bGoogleHack = true;
 286+ }
279287 }
280288
281289 $iCatCount = count($aCategories);
@@ -446,6 +454,8 @@
447455 $query = array();
448456 if (true == $bShowCurId)
449457 $query['curid'] = intval($row->page_id);
 458+ if ($bGoogleHack)
 459+ $query['dpl_id'] = intval($row->page_id);
450460
451461 if (true == $bShowNamespace)
452462 $titleText = $title->getPrefixedText();

Follow-up revisions

RevisionCommit summaryAuthorDate
r60254Merged r60253 from trunktstarling07:24, 21 December 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r60172Added GNSM extension, posted by Amgine as bug 20818 attachment. Not ready for...maxsem20:01, 17 December 2009

Status & tagging log