/**
* Constructor
*/
- public function __construct( ) {
+ public function __construct() {
# noop
}
* @param varargs
* @return String
*/
-function wfEscapeShellArg( ) {
+function wfEscapeShellArg() {
wfInitShellLocale();
$args = func_get_args();
public function __construct( $withTransaction = true ) {
global $wgAntiLockFlags;
- parent::__construct( );
+ parent::__construct();
if ( $wgAntiLockFlags & ALF_NO_LINK_LOCK ) {
$this->mOptions = array();
/**
* @return bool
*/
- public function isRedirect( ) {
+ public function isRedirect() {
$this->loadFile();
if ( $this->mFile->isLocal() ) {
return parent::isRedirect();
*
* @return bool
*/
- public function isRedirect( ) {
+ public function isRedirect() {
$content = $this->getContent();
if ( !$content ) return false;
$content = $this->getContent();
}
- if ( !$content || $content->isRedirect( ) ) {
+ if ( !$content || $content->isRedirect() ) {
return false;
}
// Check if the uploaded file is sane
if ( $this->mParams['chunk'] ) {
- $maxSize = $this->mUpload->getMaxUploadSize( );
+ $maxSize = $this->mUpload->getMaxUploadSize();
if( $this->mParams['filesize'] > $maxSize ) {
$this->dieUsage( 'The file you submitted was too large', 'file-too-large' );
}
/**
* Performs file verification, dies on error.
*/
- protected function verifyUpload( ) {
- $verification = $this->mUpload->verifyUpload( );
+ protected function verifyUpload() {
+ $verification = $this->mUpload->verifyUpload();
if ( $verification['status'] === UploadBase::OK ) {
return;
} else {
*
* @return Content. A copy of this object
*/
- public function copy( );
+ public function copy();
/**
* Returns true if this content is countable as a "real" wiki page, provided
return new CssContent( $pst );
}
- protected function getHtml( ) {
+ protected function getHtml() {
$html = "";
$html .= "<pre class=\"mw-code mw-css\" dir=\"ltr\">\n";
- $html .= $this->getHighlightHtml( );
+ $html .= $this->getHighlightHtml();
$html .= "\n</pre>\n";
return $html;
return new JavaScriptContent( $pst );
}
- protected function getHtml( ) {
+ protected function getHtml() {
$html = "";
$html .= "<pre class=\"mw-code mw-js\" dir=\"ltr\">\n";
- $html .= $this->getHighlightHtml( );
+ $html .= $this->getHighlightHtml();
$html .= "\n</pre>\n";
return $html;
*
* @return int The size
*/
- public function getSize( ) {
- $text = $this->getNativeData( );
+ public function getSize() {
+ $text = $this->getNativeData();
return strlen( $text );
}
public function isCountable( $hasLinks = null ) {
global $wgArticleCountMethod;
- if ( $this->isRedirect( ) ) {
+ if ( $this->isRedirect() ) {
return false;
}
*
* @return string: the raw text
*/
- public function getNativeData( ) {
+ public function getNativeData() {
$text = $this->mText;
return $text;
}
*
* @return string: the raw text
*/
- public function getTextForSearchIndex( ) {
+ public function getTextForSearchIndex() {
return $this->getNativeData();
}
*
* @return string|false: the raw text, or null if the conversion failed
*/
- public function getWikitextForTransclusion( ) {
+ public function getWikitextForTransclusion() {
$wikitext = $this->convert( CONTENT_MODEL_WIKITEXT, 'lossy' );
if ( $wikitext ) {
*
* @return string an HTML representation of the content's markup
*/
- protected function getHighlightHtml( ) {
+ protected function getHighlightHtml() {
# TODO: make Highlighter interface, use highlighter here, if available
return htmlspecialchars( $this->getNativeData() );
}
public function isCountable( $hasLinks = null, Title $title = null ) {
global $wgArticleCountMethod;
- if ( $this->isRedirect( ) ) {
+ if ( $this->isRedirect() ) {
return false;
}
}
}
- public function envCheckPath( ) {
+ public function envCheckPath() {
if ( !$this->specifiedScriptPath ) {
$this->showMessage( 'config-no-cli-uri', $this->getVar( "wgScriptPath" ) );
}
if( $this->fileHandle ) {
$this->skipSchema = false;
- $this->writeSchemaUpdateFile( );
+ $this->writeSchemaUpdateFile();
$this->setAppliedUpdates( "$wgVersion-schema", $this->updatesSkipped );
}
/**
* @return bool
*/
- public function envCheckPath( ) {
+ public function envCheckPath() {
// PHP_SELF isn't available sometimes, such as when PHP is CGI but
// cgi.fix_pathinfo is disabled. In that case, fall back to SCRIPT_NAME
// to get the path to the current script... hopefully it's reliable. SIGH
* "<link>" to index.php?css=foobar for the "<head>"
* @return String
*/
- private function getCssUrl( ) {
+ private function getCssUrl() {
return Html::linkedStyle( $_SERVER['PHP_SELF'] . '?css=' . $this->getDir() );
}
* As an alternative approach, some of this could be done in the validate phase
* if we make up our own types like Exif::DATE.
*/
- function collapseData( ) {
+ function collapseData() {
$this->exifGPStoNumber( 'GPSLatitude' );
$this->exifGPStoNumber( 'GPSDestLatitude' );
*
* @deprecated since 1.18
*/
- function makeFormattedData( ) {
+ function makeFormattedData() {
wfDeprecated( __METHOD__, '1.18' );
$this->mFormattedExifData = FormatMetadata::getFormattedData(
$this->mFilteredExifData );
*
* The parser has to be in the start element of "<svg>"
*/
- private function handleSVGAttribs( ) {
+ private function handleSVGAttribs() {
$defaultWidth = self::DEFAULT_WIDTH;
$defaultHeight = self::DEFAULT_HEIGHT;
$aspect = 1.0;
/** get the items array
* @return Array XMP item configuration array.
*/
- public static function getItems ( ) {
+ public static function getItems () {
if( !self::$ranHooks ) {
// This is for if someone makes a custom metadata extension.
// For example, a medical wiki might want to decode DICOM xmp properties.
/**
* @return string
*/
- function getPageHeader( ) {
+ function getPageHeader() {
global $wgScript;
list( $self ) = explode( '/', $this->getTitle()->getPrefixedDBkey() );
/**
* Resets all of the namespace caches. Mainly used for testing
*/
- public function resetNamespaces( ) {
+ public function resetNamespaces() {
$this->namespaceNames = null;
$this->mNamespaceIds = null;
$this->namespaceAliases = null;
}
}
- public function getFormattedResults( ) {
+ public function getFormattedResults() {
$ret = '';
foreach( $this->results as $res ) {
// show function with args
*/
private function getHooksFromDoc( $doc ) {
if ( $this->hasOption( 'online' ) ) {
- return $this->getHooksFromOnlineDoc( );
+ return $this->getHooksFromOnlineDoc();
} else {
return $this->getHooksFromLocalDoc( $doc );
}
* Get hooks from www.mediawiki.org using the API
* @return array of documented hooks
*/
- private function getHooksFromOnlineDoc( ) {
+ private function getHooksFromOnlineDoc() {
// All hooks
$allhookdata = Http::get( 'http://www.mediawiki.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:MediaWiki_hooks&cmlimit=500&format=php' );
$allhookdata = unserialize( $allhookdata );
function __construct() {
$this->pagePath = "index.php?title=Special:Blockme";
- $this->params = array ( );
+ $this->params = array ();
// sometimes we specify "ip", and sometimes we don't.
if ( wikiFuzz::randnum( 1 ) == 0 ) {
*
* @return Title object
*/
- protected function getTitle( ) {
+ protected function getTitle() {
$title =
$this->getOption( 'title' )
? $this->getOption( 'title' )
return false;
}
- $this->{ $this->mMode } ( );
+ $this->{ $this->mMode } ();
return true;
}
#
/** List default options and their value */
- private function LISTER( ) {
+ private function LISTER() {
$def = User::getDefaultOptions();
ksort( $def );
$maxOpt = 0;
}
/** List options usage */
- private function USAGER( ) {
+ private function USAGER() {
$ret = array();
$defaultOptions = User::getDefaultOptions();
/** Change our users options */
- private function CHANGER( ) {
+ private function CHANGER() {
$this->warn();
// We list user by user_id from one of the slave database