Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js |
— | — | @@ -85,7 +85,7 @@ |
86 | 86 | |
87 | 87 | // Process anything we found in the URL hash |
88 | 88 | // Permalinks. |
89 | | - var id = window.location.href.match(/(.+)\/(\d+)$/) |
| 89 | + var id = window.location.href.match(/\/(\d+)$/) |
90 | 90 | if( id ) { |
91 | 91 | $.articleFeedbackv5special.listControls.filter = 'id'; |
92 | 92 | $.articleFeedbackv5special.listControls.filterValue = id[2]; |
Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php |
— | — | @@ -468,36 +468,34 @@ |
469 | 469 | } |
470 | 470 | |
471 | 471 | private function renderPermalinkTimestamp( $record ) { |
472 | | - global $wgLang; |
473 | | - $id = $record->af_id; |
| 472 | + global $wgLang; |
| 473 | + $id = $record->af_id; |
474 | 474 | $title = $record->page_title; |
475 | 475 | |
476 | | - // Taken from the Moodbar extension. |
477 | | - $now = wfTimestamp( TS_UNIX ); |
478 | | - $timestamp = wfTimestamp( TS_UNIX, $record->af_created ); |
479 | | - $date = ''; |
| 476 | + // Taken from the Moodbar extension. |
| 477 | + $now = wfTimestamp( TS_UNIX ); |
| 478 | + $timestamp = wfTimestamp( TS_UNIX, $record->af_created ); |
| 479 | + $date = ''; |
480 | 480 | |
481 | | - // Relative dates for 48 hours, normal timestamps later. |
482 | | - if ( $timestamp > ( $now - ( 86400 * 2 ) ) ) { |
483 | | - $time = $wgLang->formatTimePeriod( |
484 | | - ( $now - $timestamp ), 'avoidseconds' |
485 | | - ); |
486 | | - $date = wfMessage( 'articleFeedbackv5-comment-ago', $time )->escaped(); |
487 | | - } elseif( $timestamp ) { |
488 | | - $date = $wgLang->timeanddate($record->af_created ); |
489 | | - } |
| 481 | + // Relative dates for 48 hours, normal timestamps later. |
| 482 | + if ( $timestamp > ( $now - ( 86400 * 2 ) ) ) { |
| 483 | + $time = $wgLang->formatTimePeriod( |
| 484 | + ( $now - $timestamp ), 'avoidseconds' |
| 485 | + ); |
| 486 | + $date = wfMessage( 'articleFeedbackv5-comment-ago', $time )->escaped(); |
| 487 | + } elseif( $timestamp ) { |
| 488 | + $date = $wgLang->timeanddate($record->af_created ); |
| 489 | + } |
490 | 490 | |
491 | | - // format the element |
492 | | - return Html::openElement( 'span', array( |
493 | | - 'class' => 'articleFeedbackv5-comment-details-date' |
494 | | - ) ) |
| 491 | + // format the element |
| 492 | + return Html::openElement( 'span', array( |
| 493 | + 'class' => 'articleFeedbackv5-comment-details-date' |
| 494 | + ) ) |
495 | 495 | . Linker::link( |
496 | | - Title::newFromText( |
497 | | - "Special:ArticleFeedbackv5/$title/$id" |
498 | | - ), |
| 496 | + SpecialPage::getTitleFor( 'ArticleFeedbackv5', "$title/$id" ), |
499 | 497 | $date |
500 | 498 | ) |
501 | | - . Html::closeElement( 'span' ); |
| 499 | + . Html::closeElement( 'span' ); |
502 | 500 | } |
503 | 501 | |
504 | 502 | private function renderBucket1( $record ) { |