Whitespace
Documentation Other related stuffs
This commit is contained in:
parent
f8d56fe7ae
commit
b214f9dd40
6 changed files with 38 additions and 15 deletions
|
|
@ -37,7 +37,10 @@ class ChangesList {
|
|||
* @var Skin
|
||||
*/
|
||||
public $skin;
|
||||
|
||||
protected $watchlist = false;
|
||||
|
||||
protected $message = array();
|
||||
|
||||
/**
|
||||
* Changeslist contructor
|
||||
|
|
@ -53,7 +56,7 @@ class ChangesList {
|
|||
* Some users might want to use an enhanced list format, for instance
|
||||
*
|
||||
* @param $user User to fetch the list class for
|
||||
* @return ChangesList derivative
|
||||
* @return ChangesList|EnhancedChangesList|OldChangesList derivative
|
||||
*/
|
||||
public static function newFromUser( $user ) {
|
||||
global $wgRequest;
|
||||
|
|
@ -111,7 +114,7 @@ class ChangesList {
|
|||
* unpatrolled edit. By default in English it will contain "N", "m", "b",
|
||||
* "!" respectively, plus it will have an appropriate title and class.
|
||||
*
|
||||
* @param $key String: 'newpage', 'unpatrolled', 'minor', or 'bot'
|
||||
* @param $flag String: 'newpage', 'unpatrolled', 'minor', or 'bot'
|
||||
* @return String: Raw HTML
|
||||
*/
|
||||
public static function flag( $flag ) {
|
||||
|
|
@ -160,7 +163,7 @@ class ChangesList {
|
|||
* Show formatted char difference
|
||||
* @param $old Integer: bytes
|
||||
* @param $new Integer: bytes
|
||||
* @returns String
|
||||
* @return String
|
||||
*/
|
||||
public static function showCharacterDifference( $old, $new ) {
|
||||
global $wgRCChangedSizeThreshold, $wgLang, $wgMiserMode;
|
||||
|
|
@ -638,6 +641,9 @@ class EnhancedChangesList extends ChangesList {
|
|||
* Format a line for enhanced recentchange (aka with javascript and block of lines).
|
||||
*
|
||||
* @param $baseRC RecentChange
|
||||
* @param $watched bool
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function recentChangesLine( &$baseRC, $watched = false ) {
|
||||
global $wgLang, $wgUser;
|
||||
|
|
@ -1201,6 +1207,8 @@ class EnhancedChangesList extends ChangesList {
|
|||
/**
|
||||
* If enhanced RC is in use, this function takes the previously cached
|
||||
* RC lines, arranges them, and outputs the HTML
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function recentChangesBlock() {
|
||||
if( count ( $this->rc_cache ) == 0 ) {
|
||||
|
|
|
|||
|
|
@ -176,6 +176,14 @@ class ApiImport extends ApiBase {
|
|||
class ApiImportReporter extends ImportReporter {
|
||||
private $mResultArr = array();
|
||||
|
||||
/**
|
||||
* @param $title Title
|
||||
* @param $origTitle Title
|
||||
* @param $revisionCount int
|
||||
* @param $successCount int
|
||||
* @param $pageInfo
|
||||
* @return void
|
||||
*/
|
||||
function reportPage( $title, $origTitle, $revisionCount, $successCount, $pageInfo ) {
|
||||
// Add a result entry
|
||||
$r = array();
|
||||
|
|
|
|||
|
|
@ -80,6 +80,11 @@ class PageArchive {
|
|||
return self::listPages( $dbr, $conds );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $dbr DatabaseBase
|
||||
* @param $condition
|
||||
* @return bool|ResultWrapper
|
||||
*/
|
||||
protected static function listPages( $dbr, $condition ) {
|
||||
return $dbr->resultObject(
|
||||
$dbr->select(
|
||||
|
|
@ -981,7 +986,7 @@ class SpecialUndelete extends SpecialPage {
|
|||
$targetQuery = array( 'oldid' => $rev->getId() );
|
||||
}
|
||||
// Add show/hide deletion links if available
|
||||
$del .= $this->revDeleteLink( $rev );
|
||||
$del = $this->revDeleteLink( $rev );
|
||||
return
|
||||
'<div id="mw-diff-' . $prefix . 'title1"><strong>' .
|
||||
$sk->link(
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class SpecialWatchlist extends SpecialPage {
|
|||
|
||||
// Add feed links
|
||||
$wlToken = $wgUser->getOption( 'watchlisttoken' );
|
||||
if (!$wlToken) {
|
||||
if ( !$wlToken ) {
|
||||
$wlToken = sha1( mt_rand() . microtime( true ) );
|
||||
$wgUser->setOption( 'watchlisttoken', $wlToken );
|
||||
$wgUser->saveSettings();
|
||||
|
|
@ -82,7 +82,8 @@ class SpecialWatchlist extends SpecialPage {
|
|||
);
|
||||
$wgOut->setSubtitle( $sub );
|
||||
|
||||
if( ( $mode = SpecialEditWatchlist::getMode( $wgRequest, $par ) ) !== false ) {
|
||||
$mode = SpecialEditWatchlist::getMode( $wgRequest, $par );
|
||||
if( $mode !== false ) {
|
||||
# TODO: localise?
|
||||
switch( $mode ){
|
||||
case SpecialEditWatchlist::EDIT_CLEAR:
|
||||
|
|
@ -100,7 +101,7 @@ class SpecialWatchlist extends SpecialPage {
|
|||
}
|
||||
|
||||
$uid = $wgUser->getId();
|
||||
if( ($wgEnotifWatchlist || $wgShowUpdatedMarker) && $wgRequest->getVal( 'reset' ) &&
|
||||
if( ( $wgEnotifWatchlist || $wgShowUpdatedMarker ) && $wgRequest->getVal( 'reset' ) &&
|
||||
$wgRequest->wasPosted() )
|
||||
{
|
||||
$wgUser->clearAllNotifications( $uid );
|
||||
|
|
@ -172,7 +173,7 @@ class SpecialWatchlist extends SpecialPage {
|
|||
$days = $defaults['days']; # default cutoff for shortlisters
|
||||
}
|
||||
} else {
|
||||
$days = floatval($days);
|
||||
$days = floatval( $days );
|
||||
}
|
||||
|
||||
// Dump everything here
|
||||
|
|
@ -284,7 +285,7 @@ class SpecialWatchlist extends SpecialPage {
|
|||
if ( $usePage || $rollbacker ) {
|
||||
$tables[] = 'page';
|
||||
$join_conds['page'] = array('LEFT JOIN','rc_cur_id=page_id');
|
||||
if ($rollbacker) {
|
||||
if ( $rollbacker ) {
|
||||
$fields[] = 'page_latest';
|
||||
}
|
||||
}
|
||||
|
|
@ -309,7 +310,7 @@ class SpecialWatchlist extends SpecialPage {
|
|||
} elseif( $days > 0 ) {
|
||||
$wlInfo = wfMsgExt( 'wlnote', 'parseinline',
|
||||
$wgLang->formatNum( $numRows ),
|
||||
$wgLang->formatNum( round($days*24) )
|
||||
$wgLang->formatNum( round( $days * 24 ) )
|
||||
) . '<br />';
|
||||
}
|
||||
|
||||
|
|
@ -396,7 +397,7 @@ class SpecialWatchlist extends SpecialPage {
|
|||
$updated = false;
|
||||
}
|
||||
|
||||
if ($wgRCShowWatchingUsers && $wgUser->getOption( 'shownumberswatching' )) {
|
||||
if ( $wgRCShowWatchingUsers && $wgUser->getOption( 'shownumberswatching' ) ) {
|
||||
$rc->numberofWatchingusers = $dbr->selectField( 'watchlist',
|
||||
'COUNT(*)',
|
||||
array(
|
||||
|
|
@ -434,7 +435,7 @@ class SpecialWatchlist extends SpecialPage {
|
|||
|
||||
$sk = $wgUser->getSkin();
|
||||
$title = Title::newFromText( $wgContLang->specialPage( $page ) );
|
||||
$options['days'] = ($h / 24.0);
|
||||
$options['days'] = ( $h / 24.0 );
|
||||
|
||||
return $sk->linkKnown(
|
||||
$title,
|
||||
|
|
@ -450,7 +451,7 @@ class SpecialWatchlist extends SpecialPage {
|
|||
$sk = $wgUser->getSkin();
|
||||
$title = Title::newFromText( $wgContLang->specialPage( $page ) );
|
||||
$options['days'] = $d;
|
||||
$message = ($d ? $wgLang->formatNum( $d ) : wfMsgHtml( 'watchlistall2' ) );
|
||||
$message = ( $d ? $wgLang->formatNum( $d ) : wfMsgHtml( 'watchlistall2' ) );
|
||||
|
||||
return $sk->linkKnown(
|
||||
$title,
|
||||
|
|
@ -462,6 +463,8 @@ class SpecialWatchlist extends SpecialPage {
|
|||
|
||||
/**
|
||||
* Returns html
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected static function cutoffLinks( $days, $page = 'Watchlist', $options = array() ) {
|
||||
global $wgLang;
|
||||
|
|
|
|||
|
|
@ -133,7 +133,6 @@ class GenerateSitemap extends Maintenance {
|
|||
*/
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
global $wgDBname;
|
||||
$this->mDescription = "Creates a sitemap for the site";
|
||||
$this->addOption( 'fspath', 'The file system path to save to, e.g. /tmp/sitemap; defaults to current directory', false, true );
|
||||
$this->addOption( 'urlpath', 'The URL path corresponding to --fspath, prepended to filenames in the index; defaults to an empty string', false, true );
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class languages {
|
|||
/**
|
||||
* Load the language file.
|
||||
*
|
||||
* @param $code The language code.
|
||||
* @param $code string The language code.
|
||||
*/
|
||||
protected function loadFile( $code ) {
|
||||
if ( isset( $this->mRawMessages[$code] ) &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue