<?php
-
-/* Page history
- Split off from Article.php and Skin.php, 2003-12-22
-*/
-
+/**
+ * Page history
+ *
+ * Split off from Article.php and Skin.php, 2003-12-22
+ * @package MediaWiki
+ */
+
+/**
+ * @todo document
+ * @package MediaWiki
+ */
class PageHistory {
var $mArticle, $mTitle, $mSkin;
var $lastline, $lastdate;
# This shares a lot of issues (and code) with Recent Changes
- function history()
- {
+ function history() {
global $wgUser, $wgOut, $wgLang;
# If page hasn't changed, client can cache this
wfProfileOut( $fname );
}
- function beginHistoryList()
- {
+ function beginHistoryList() {
global $wgTitle;
$this->lastdate = $this->lastline = '';
$s = '<p>' . wfMsg( 'histlegend' ) . '</p>';
$s .= '<form action="' . $wgTitle->escapeLocalURL( '-' ) . '" method="get">';
$prefixedkey = htmlspecialchars($wgTitle->getPrefixedDbKey());
- $s .= "<input type='hidden' name='title' value='{$prefixedkey}' />\n";
+ $s .= "<input type='hidden' name='title' value=\"{$prefixedkey}\" />\n";
$s .= !empty($this->submitbuttonhtml1) ? $this->submitbuttonhtml1."\n":'';
$s .= '<ul id="pagehistory">';
return $s;
}
- function endHistoryList( $skip = false )
- {
+ function endHistoryList( $skip = false ) {
$last = wfMsg( 'last' );
$s = $skip ? '' : preg_replace( "/!OLDID![0-9]+!/", $last, $this->lastline );
return $s;
}
- function historyLine( $ts, $u, $ut, $ns, $ttl, $oid, $c, $isminor, $counter = '' )
- {
- global $wgLang;
+ function historyLine( $ts, $u, $ut, $ns, $ttl, $oid, $c, $isminor, $counter = '' ) {
+ global $wgLang, $wgContLang;
$artname = Title::makeName( $ns, $ttl );
$last = wfMsg( 'last' );
$link = $this->mSkin->makeKnownLink( $artname, $dt, $q );
if ( 0 == $u ) {
- $ul = $this->mSkin->makeKnownLink( $wgLang->specialPage( 'Contributions' ),
+ $ul = $this->mSkin->makeKnownLink( $wgContLang->specialPage( 'Contributions' ),
htmlspecialchars( $ut ), 'target=' . urlencode( $ut ) );
} else {
- $ul = $this->mSkin->makeLink( $wgLang->getNsText(
+ $ul = $this->mSkin->makeLink( $wgContLang->getNsText(
Namespace::getUser() ) . ':'.$ut , htmlspecialchars( $ut ) );
}