r59786 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59785‎ | r59786 | r59787 >
Date:13:20, 7 December 2009
Author:werdna
Status:deferred
Tags:
Comment:
LiquidThreads: Modify getAnchorName() to return <subject>_<threadid> instead of lqt_thread_<threadid>. Might be more useful :)
Modified paths:
  • /trunk/extensions/LiquidThreads/classes/Thread.php (modified) (history)
  • /trunk/extensions/LiquidThreads/classes/View.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/classes/View.php
@@ -224,7 +224,7 @@
225225
226226 // Add fragment if appropriate.
227227 if ( $operand && $includeFragment ) {
228 - $title->mFragment = 'lqt_thread_' . $operand->id();
 228+ $title->mFragment = $operand->getAnchorName();
229229 }
230230
231231 return array( $title, $query );
Index: trunk/extensions/LiquidThreads/classes/Thread.php
@@ -1193,7 +1193,8 @@
11941194 }
11951195
11961196 function getAnchorName() {
1197 - return "lqt_thread_{$this->id()}";
 1197+ $wantedId = $this->subject()."_{$this->id()}";
 1198+ return Sanitizer::escapeId( $wantedId );
11981199 }
11991200
12001201 function updateHistory() {

Status & tagging log