arrray -> array
Whitespace Other documentation improvements Comment out some unused code (which has a fixme left with it already)
This commit is contained in:
parent
725f780b08
commit
2f23e71490
7 changed files with 29 additions and 5 deletions
|
|
@ -20,6 +20,11 @@
|
|||
|
||||
class MWFunction {
|
||||
|
||||
/**
|
||||
* @param $callback
|
||||
* @return array
|
||||
* @throws MWException
|
||||
*/
|
||||
protected static function cleanCallback( $callback ) {
|
||||
if( is_string( $callback ) ) {
|
||||
if ( strpos( $callback, '::' ) !== false ) {
|
||||
|
|
@ -39,6 +44,10 @@ class MWFunction {
|
|||
return $callback;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $callback
|
||||
* @return mixed
|
||||
*/
|
||||
public static function call( $callback ) {
|
||||
$callback = self::cleanCallback( $callback );
|
||||
|
||||
|
|
@ -47,11 +56,21 @@ class MWFunction {
|
|||
return call_user_func_array( 'call_user_func', $args );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $callback
|
||||
* @param $argsarams
|
||||
* @return mixed
|
||||
*/
|
||||
public static function callArray( $callback, $argsarams ) {
|
||||
$callback = self::cleanCallback( $callback );
|
||||
return call_user_func_array( $callback, $argsarams );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $class
|
||||
* @param $args array
|
||||
* @return object
|
||||
*/
|
||||
public static function newObj( $class, $args = array() ) {
|
||||
if( !count( $args ) ) {
|
||||
return new $class;
|
||||
|
|
|
|||
|
|
@ -748,7 +748,7 @@ class MagicWordArray {
|
|||
* Returns array(magic word ID, parameter value)
|
||||
* If there is no parameter value, that element will be false.
|
||||
*
|
||||
* @param $m arrray
|
||||
* @param $m array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase {
|
|||
$endsortkey = $params['endsortkeyprefix'] !== null ?
|
||||
Collation::singleton()->getSortkey( $params['endsortkeyprefix'] ) :
|
||||
$params['endsortkey'];
|
||||
|
||||
|
||||
// The below produces ORDER BY cl_sortkey, cl_from, possibly with DESC added to each of them
|
||||
$this->addWhereRange( 'cl_sortkey',
|
||||
$dir,
|
||||
|
|
|
|||
|
|
@ -3192,6 +3192,8 @@ abstract class DatabaseBase implements DatabaseType {
|
|||
/**
|
||||
* Get schema variables. If none have been set via setSchemaVars(), then
|
||||
* use some defaults from the current object.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function getSchemaVars() {
|
||||
if ( $this->mSchemaVars ) {
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ application/xhtml+xml xhtml xht
|
|||
application/xslt+xml xslt
|
||||
application/xml xml xsl xsd
|
||||
application/xml-dtd dtd
|
||||
application/zip zip jar xpi sxc stc sxd std sxi sti sxm stm sxw stw
|
||||
application/zip zip jar xpi sxc stc sxd std sxi sti sxm stm sxw stw
|
||||
application/x-rar rar
|
||||
audio/basic au snd
|
||||
audio/midi mid midi kar
|
||||
|
|
|
|||
|
|
@ -39,10 +39,10 @@ class WantedPagesPage extends WantedQueryPage {
|
|||
$parts = explode( '/', $par, 2 );
|
||||
$this->limit = (int)$parts[0];
|
||||
// @todo FIXME: nlinks is ignored
|
||||
$nlinks = isset( $parts[1] ) && $parts[1] === 'nlinks';
|
||||
//$nlinks = isset( $parts[1] ) && $parts[1] === 'nlinks';
|
||||
$this->offset = 0;
|
||||
} else {
|
||||
$nlinks = true;
|
||||
//$nlinks = true;
|
||||
}
|
||||
$this->setListoutput( $inc );
|
||||
$this->shownavigation = !$inc;
|
||||
|
|
|
|||
|
|
@ -456,6 +456,9 @@ abstract class Maintenance {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @var $child Maintenance
|
||||
*/
|
||||
$child = new $maintClass();
|
||||
$child->loadParamsAndArgs( $this->mSelf, $this->mOptions, $this->mArgs );
|
||||
if ( !is_null( $this->mDb ) ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue