-<?
-include_once( "SpecialRecentchanges.php" );
-include_once( "WatchedItem.php" );
+<?php
+require_once( "SpecialRecentchanges.php" );
+require_once( "WatchedItem.php" );
function wfSpecialWatchlist()
{
$wgOut->setSubtitle( $sub );
$wgOut->setRobotpolicy( "noindex,nofollow" );
+ $specialTitle = Title::makeTitle( NS_SPECIAL, "Watchlist" );
+
$uid = $wgUser->getID();
if( $uid == 0 ) {
$wgOut->addHTML( wfMsg( "nowatchlist" ) );
}
if(isset($_REQUEST['magic'])) {
- $wgOut->addHTML( wfMsg( "watchlistcontains", $nitems ) .
+ $wgOut->addHTML( wfMsg( "watchlistcontains", $wgLang->formatNum( $nitems ) ) .
"<p>" . wfMsg( "watcheditlist" ) . "</p>\n" );
$wgOut->addHTML( "<form action='" .
- wfLocalUrl( $wgLang->specialPage( "Watchlist" ), "action=submit" ) .
+ $specialTitle->escapeLocalUrl( "action=submit" ) .
"' method='post'>\n" .
"<ul>\n" );
$sql = "SELECT wl_namespace,wl_title FROM watchlist WHERE wl_user=$uid";
while( $s = wfFetchObject( $res ) ) {
$t = Title::makeTitle( $s->wl_namespace, $s->wl_title );
$t = $t->getPrefixedText();
- $wgOut->addHTML( "<li><input type='checkbox' name='id[]' value=\"" . htmlspecialchars($t) . "\">" .
+ $wgOut->addHTML( "<li><input type='checkbox' name='id[]' value=\"" . htmlspecialchars($t) . "\" />" .
$sk->makeKnownLink( $t, $t ) .
"</li>\n" );
}
$wgOut->addHTML( "</ul>\n" .
"<input type='submit' name='remove' value='" .
- wfMsg( "removechecked" ) . "'>\n" .
+ wfMsg( "removechecked" ) . "' />\n" .
"</form>\n" );
return;
$z = "(wl_namespace=cur_namespace OR wl_namespace+1=cur_namespace)";
}
- $wgOut->addHTML( "<i>" . wfMsg( "watchdetails", $nitems, $npages, $y,
- wfLocalUrl( $wgLang->specialPage("Watchlist"),"magic=yes" ) ) . "</i><br>\n" );
+
+ $wgOut->addHTML( "<i>" . wfMsg( "watchdetails",
+ $wgLang->formatNum( $nitems ), $wgLang->formatNum( $npages ), $y,
+ $specialTitle->escapeLocalUrl( "magic=yes" ) ) . "</i><br />\n" );
$sql = "SELECT
$res = wfQuery( $sql, DB_READ, $fname );
if($days >= 1)
- $note = wfMsg( "rcnote", $limit, $days );
+ $note = wfMsg( "rcnote", $wgLang->formatNum( $limit ), $wgLang->formatNum( $days ) );
elseif($days > 0)
- $note = wfMsg( "wlnote", $limit, round($days*24) );
+ $note = wfMsg( "wlnote", $wgLang->formatNum( $limit ), $wgLang->formatNum( round($days*24) ) );
else
$note = "";
- $wgOut->addHTML( "\n<hr>\n{$note}\n<br>" );
+ $wgOut->addHTML( "\n<hr />\n{$note}\n<br />" );
$note = wlCutoffLinks( $days, $limit );
$wgOut->addHTML( "{$note}\n" );
$sk = $wgUser->getSkin();
$s = $sk->beginRecentChangesList();
-
+ $counter = 1;
while ( $obj = wfFetchObject( $res ) ) {
# Make fake RC entry
$rc = RecentChange::newFromCurRow( $obj );
+ $rc->counter = $counter++;
$s .= $sk->recentChangesLine( $rc, true );
}
$s .= $sk->endRecentChangesList();
$sk = $wgUser->getSkin();
$s = $sk->makeKnownLink(
$wgLang->specialPage( $page ),
- $h, "days=" . ($h / 24.0) );
+ $wgLang->formatNum( $h ),
+ "days=" . ($h / 24.0) );
return $s;
}
$sk = $wgUser->getSkin();
$s = $sk->makeKnownLink(
$wgLang->specialPage( $page ),
- ($d ? $d : wfMsg( "all" ) ), "days=$d" );
+ ($d ? $wgLang->formatNum( $d ) : wfMsg( "all" ) ), "days=$d" );
return $s;
}