http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88495
Revision: 88495
Author: reedy
Date: 2011-05-20 22:03:10 +0000 (Fri, 20 May 2011)
Log Message:
-----------
Whitespace
Documentation
Other related stuffs
Modified Paths:
--------------
trunk/phase3/includes/ChangesList.php
trunk/phase3/includes/api/ApiImport.php
trunk/phase3/includes/specials/SpecialUndelete.php
trunk/phase3/includes/specials/SpecialWatchlist.php
trunk/phase3/maintenance/generateSitemap.php
trunk/phase3/maintenance/language/languages.inc
Modified: trunk/phase3/includes/ChangesList.php
===================================================================
--- trunk/phase3/includes/ChangesList.php 2011-05-20 22:01:50 UTC (rev
88494)
+++ trunk/phase3/includes/ChangesList.php 2011-05-20 22:03:10 UTC (rev
88495)
@@ -37,7 +37,10 @@
* @var Skin
*/
public $skin;
+
protected $watchlist = false;
+
+ protected $message = array();
/**
* Changeslist contructor
@@ -53,7 +56,7 @@
* 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 @@
* 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 @@
* 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 @@
* 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 @@
/**
* 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 ) {
Modified: trunk/phase3/includes/api/ApiImport.php
===================================================================
--- trunk/phase3/includes/api/ApiImport.php 2011-05-20 22:01:50 UTC (rev
88494)
+++ trunk/phase3/includes/api/ApiImport.php 2011-05-20 22:03:10 UTC (rev
88495)
@@ -176,6 +176,14 @@
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();
Modified: trunk/phase3/includes/specials/SpecialUndelete.php
===================================================================
--- trunk/phase3/includes/specials/SpecialUndelete.php 2011-05-20 22:01:50 UTC
(rev 88494)
+++ trunk/phase3/includes/specials/SpecialUndelete.php 2011-05-20 22:03:10 UTC
(rev 88495)
@@ -80,6 +80,11 @@
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 @@
$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(
Modified: trunk/phase3/includes/specials/SpecialWatchlist.php
===================================================================
--- trunk/phase3/includes/specials/SpecialWatchlist.php 2011-05-20 22:01:50 UTC
(rev 88494)
+++ trunk/phase3/includes/specials/SpecialWatchlist.php 2011-05-20 22:03:10 UTC
(rev 88495)
@@ -39,7 +39,7 @@
// 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 @@
);
$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 @@
}
$uid = $wgUser->getId();
- if( ($wgEnotifWatchlist || $wgShowUpdatedMarker) &&
$wgRequest->getVal( 'reset' ) &&
+ if( ( $wgEnotifWatchlist || $wgShowUpdatedMarker ) &&
$wgRequest->getVal( 'reset' ) &&
$wgRequest->wasPosted() )
{
$wgUser->clearAllNotifications( $uid );
@@ -172,7 +173,7 @@
$days = $defaults['days']; # default cutoff for
shortlisters
}
} else {
- $days = floatval($days);
+ $days = floatval( $days );
}
// Dump everything here
@@ -284,7 +285,7 @@
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 @@
} 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 @@
$updated = false;
}
- if ($wgRCShowWatchingUsers && $wgUser->getOption(
'shownumberswatching' )) {
+ if ( $wgRCShowWatchingUsers && $wgUser->getOption(
'shownumberswatching' ) ) {
$rc->numberofWatchingusers = $dbr->selectField(
'watchlist',
'COUNT(*)',
array(
@@ -434,7 +435,7 @@
$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 @@
$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 @@
/**
* Returns html
+ *
+ * @return string
*/
protected static function cutoffLinks( $days, $page = 'Watchlist',
$options = array() ) {
global $wgLang;
Modified: trunk/phase3/maintenance/generateSitemap.php
===================================================================
--- trunk/phase3/maintenance/generateSitemap.php 2011-05-20 22:01:50 UTC
(rev 88494)
+++ trunk/phase3/maintenance/generateSitemap.php 2011-05-20 22:03:10 UTC
(rev 88495)
@@ -133,7 +133,6 @@
*/
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 );
Modified: trunk/phase3/maintenance/language/languages.inc
===================================================================
--- trunk/phase3/maintenance/language/languages.inc 2011-05-20 22:01:50 UTC
(rev 88494)
+++ trunk/phase3/maintenance/language/languages.inc 2011-05-20 22:03:10 UTC
(rev 88495)
@@ -88,7 +88,7 @@
/**
* Load the language file.
*
- * @param $code The language code.
+ * @param $code string The language code.
*/
protected function loadFile( $code ) {
if ( isset( $this->mRawMessages[$code] ) &&
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs