r28531 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r28530‎ | r28531 | r28532 >
Date:00:13, 16 December 2007
Author:tlaqua
Status:old
Tags:
Comment:
Added {PAGE_URL_LOCAL_ESCAPED} token replacement for use in toForum query string argument when linking to wiki from phpbb.
Modified paths:
  • /trunk/extensions/phpbbData/hook_handleFromWikiQuery.php (modified) (history)

Diff [purge]

Index: trunk/extensions/phpbbData/hook_handleFromWikiQuery.php
@@ -33,3 +33,15 @@
3434 }
3535 }
3636 $phpbb_hook->register('BeforePageDisplay', 'efPhpbbData_handleToWiki');
 37+
 38+function efPhpbbData_doTokenReplacement(&$hooks, $outputCache) {
 39+ $tokens = array(
 40+ '{PAGE_URL_LOCAL_ESCAPED}' => urlencode('test') );
 41+
 42+ foreach ($tokens as $key => $value) {
 43+ $outputCache = str_replace($key,$value,$outputCache);
 44+ }
 45+
 46+ return $outputCache;
 47+}
 48+$phpbb_hook->register('BeforePageDisplay', 'efPhpbbData_doTokenReplacement');

Status & tagging log