7zip.inc : $stream is really a private property.
userDupes.inc : still only used by MysqlUpdater, added a comment about
it and made the properties private.
sql.php : make sure we actually do nothing in some method. Previously we
just had an empty IF statement.
purgeList : a private method was named the same as the class, that is
how we declared constructor with PHP4. Renamed it to doPurge() to make
it clear that it is not the constructor.
Rests are whitespaces fixes.
Change-Id: I0b83f83ee3af37c770817ebfce3e804082c2fb41
* @ingroup Maintenance
*/
class SevenZipStream {
- var $stream;
+ protected $stream;
private function stripPath( $path ) {
$prefix = 'mediawiki.compress.7z://';
require_once( __DIR__ . '/Benchmarker.php' );
function bfNormalizeTitleStrTr( $str ) {
- return strtr( $str, '_', ' ' );
+ return strtr( $str, '_', ' ' );
}
function bfNormalizeTitleStrReplace( $str ) {
- return str_replace( '_', ' ', $str );
+ return str_replace( '_', ' ', $str );
}
/**
if( $this->hasOption( 'namespace' ) ) {
$this->purgeNamespace();
} else {
- $this->purgeList();
+ $this->doPurge();
}
$this->output( "Done!\n" );
}
/** Purge URL coming from stdin */
- private function purgeList() {
+ private function doPurge() {
$stdin = $this->getStdin();
$urls = array();
public function sqlPrintResult( $res, $db ) {
if ( !$res ) {
// Do nothing
+ return;
} elseif ( is_object( $res ) && $res->numRows() ) {
foreach ( $res as $row ) {
$this->output( print_r( $row, true ) );
/**
* Look for duplicate user table entries and optionally prune them.
+ *
+ * This is still used by our MysqlUpdater at:
+ * includes/installer/MysqlUpdater.php
+ *
* @ingroup Maintenance
*/
class UserDupes {
- var $db;
- var $reassigned;
- var $trimmed;
- var $failed;
+ private $db;
+ private $reassigned;
+ private $trimmed;
+ private $failed;
private $outputCallback;
function __construct( &$database, $outputCallback ) {