$timestamp = wfTimestampNow();
}
- if( count( func_get_args() ) > 0 ){
+ if( count( func_get_args() ) > 0 ) {
# Soon... :D
# wfDeprecated( __METHOD__ . " with arguments" );
}
* @param $row ResultWrapper row from the ipblocks table
* @return Block
*/
- public static function newFromRow( $row ){
+ public static function newFromRow( $row ) {
$block = new Block;
$block->initFromRow( $row );
return $block;
* @param $db DatabaseBase
* @return Array
*/
- protected function getDatabaseArray( $db = null ){
+ protected function getDatabaseArray( $db = null ) {
if( !$db ){
$db = wfGetDB( DB_SLAVE );
}
* Set the target for this block, and update $this->type accordingly
* @param $target Mixed
*/
- public function setTarget( $target ){
+ public function setTarget( $target ) {
list( $this->target, $this->type ) = self::parseTarget( $target );
}
* Get the user who implemented this block
* @return User|string Local User object or string for a foreign user
*/
- public function getBlocker(){
+ public function getBlocker() {
return $this->blocker;
}
* Set the user who implemented (or will implement) this block
* @param $user User|string Local User object or username string for foriegn users
*/
- public function setBlocker( $user ){
+ public function setBlocker( $user ) {
$this->blocker = $user;
}
}
*
* @return bool
*/
- function getWasModified(){
+ function getWasModified() {
return $this->mModified;
}
*
* @return bool
*/
- function replaceMultiple( $magicarr, $subject, &$result ){
+ function replaceMultiple( $magicarr, $subject, &$result ) {
$search = array();
$replace = array();
foreach( $magicarr as $id => $replacement ){
}
}
- protected function getTerms( $url ){
+ protected function getTerms( $url ) {
global $wgLicenseTerms;
if( $wgLicenseTerms ){
* @param $type string
* @return Array
*/
- protected function filterModules( $modules, $position = null, $type = ResourceLoaderModule::TYPE_COMBINED ){
+ protected function filterModules( $modules, $position = null, $type = ResourceLoaderModule::TYPE_COMBINED ) {
$resourceLoader = $this->getResourceLoader();
$filteredModules = array();
foreach( $modules as $val ){
* @param $type String ResourceLoaderModule TYPE_ constant
* @return Int ResourceLoaderModule ORIGIN_ class constant
*/
- public function getAllowedModules( $type ){
+ public function getAllowedModules( $type ) {
if( $type == ResourceLoaderModule::TYPE_COMBINED ){
return min( array_values( $this->mAllowedModules ) );
} else {
* @param $type String ResourceLoaderModule TYPE_ constant
* @param $level Int ResourceLoaderModule class constant
*/
- public function setAllowedModules( $type, $level ){
+ public function setAllowedModules( $type, $level ) {
$this->mAllowedModules[$type] = $level;
}
* @param $type String
* @param $level Int ResourceLoaderModule class constant
*/
- public function reduceAllowedModules( $type, $level ){
+ public function reduceAllowedModules( $type, $level ) {
$this->mAllowedModules[$type] = min( $this->getAllowedModules($type), $level );
}
* @param $alldata
* @return int
*/
- static function filterIntval( $value, $alldata ){
+ static function filterIntval( $value, $alldata ) {
return intval( $value );
}
* @param $params Array: array of parameters.
* @return Mixed the value of the setting requested.
*/
- protected function getSetting( $settingName, $wiki, /*array*/ $params ){
+ protected function getSetting( $settingName, $wiki, /*array*/ $params ) {
$retval = null;
if( array_key_exists( $settingName, $this->settings ) ) {
$thisSetting =& $this->settings[$settingName];
* @param $wiki String
* @return array
*/
- protected function getWikiParams( $wiki ){
+ protected function getWikiParams( $wiki ) {
static $default = array(
'suffix' => null,
'lang' => null,
* @param $wikiTags Array The tags assigned to the wiki.
* @return array
*/
- protected function mergeParams( $wiki, $suffix, /*array*/ $params, /*array*/ $wikiTags ){
+ protected function mergeParams( $wiki, $suffix, /*array*/ $params, /*array*/ $wikiTags ) {
$ret = $this->getWikiParams( $wiki );
if( is_null( $ret['suffix'] ) ) {
/**
* @return String
*/
- function __toString(){
+ function __toString() {
return $this->getName();
}
*
* @return bool
*/
- public function isAllowedAny( /*...*/ ){
+ public function isAllowedAny( /*...*/ ) {
$permissions = func_get_args();
foreach( $permissions as $permission ){
if( $this->isAllowed( $permission ) ){
* @internal param $varargs string
* @return bool True if the user is allowed to perform *all* of the given actions
*/
- public function isAllowedAll( /*...*/ ){
+ public function isAllowedAll( /*...*/ ) {
$permissions = func_get_args();
foreach( $permissions as $permission ){
if( !$this->isAllowed( $permission ) ){
return 'delete';
}
- public function onView(){
+ public function onView() {
return null;
}
- public function show(){
+ public function show() {
$this->page->delete();
return 'edit';
}
- public function onView(){
+ public function onView() {
return null;
}
- public function show(){
+ public function show() {
$page = $this->page;
$request = $this->getRequest();
$user = $this->getUser();
return 'submit';
}
- public function show(){
+ public function show() {
if ( session_id() == '' ) {
// Send a cookie so anons get talk message notifications
wfSetupSession();
return 'protect';
}
- public function onView(){
+ public function onView() {
return null;
}
- public function show(){
+ public function show() {
$this->page->protect();
return 'unprotect';
}
- public function show(){
+ public function show() {
$this->page->unprotect();
return 'render';
}
- public function onView(){
+ public function onView() {
return null;
}
- public function show(){
+ public function show() {
$this->page->render();
return 'view';
}
- public function onView(){
+ public function onView() {
return null;
}
- public function show(){
+ public function show() {
$this->page->view();
}
* Get the DB2 database extension name
* @return string
*/
- public function getName(){
+ public function getName() {
return 'ibm_db2';
}
}
}
- function getPageText( $image, $page ){
+ function getPageText( $image, $page ) {
$tree = $this->getMetaTree( $image, true );
if ( !$tree ) {
return false;
/**
* Log the whole profiling data into the database.
*/
- public function logData(){
+ public function logData() {
global $wgProfilePerHost, $wgProfileToDatabase;
# Do not log anything if database is readonly (bug 5375)
* @param $index
* @return string
*/
- function getVirtualChunkLocation( $index ){
+ function getVirtualChunkLocation( $index ) {
return $this->repo->getVirtualUrl( 'temp' ) .
'/' .
$this->repo->getHashPath(
/**
* Update the chunk db table with the current status:
*/
- private function updateChunkStatus(){
+ private function updateChunkStatus() {
wfDebug( __METHOD__ . " update chunk status for {$this->mFileKey} offset:" .
$this->getOffset() . ' inx:' . $this->getChunkIndex() . "\n" );
/**
* Get the chunk db state and populate update relevant local values
*/
- private function getChunkStatus(){
+ private function getChunkStatus() {
// get Master db to avoid race conditions.
// Otherwise, if chunk upload time < replag there will be spurious errors
$dbw = $this->repo->getMasterDb();
* Get the current Chunk index
* @return Integer index of the current chunk
*/
- private function getChunkIndex(){
+ private function getChunkIndex() {
if( $this->mChunkIndex !== null ){
return $this->mChunkIndex;
}
* Gets the current offset in fromt the stashedupload table
* @return Integer current byte offset of the chunk file set
*/
- private function getOffset(){
+ private function getOffset() {
if ( $this->mOffset !== null ){
return $this->mOffset;
}
* @throws UploadChunkFileException
* @return FileRepoStatus
*/
- private function outputChunk( $chunkPath ){
+ private function outputChunk( $chunkPath ) {
// Key is fileKey + chunk index
$fileKey = $this->getChunkFileKey();
return $storeStatus;
}
- private function getChunkFileKey( $index = null ){
+ private function getChunkFileKey( $index = null ) {
if( $index === null ){
$index = $this->getChunkIndex();
}
}
function setTimeExceeded() {
- $this->timeExceeded = True;
+ $this->timeExceeded = true;
}
function checkIfTimeExceeded() {
}
// Adds all the elements to the array, using the specified prefix.
- private static function addListParams( &$array, $prefix, $elements ) {
+ private static function addListParams( &$array, $prefix, $elements ) {
foreach ( $elements as $element ) {
$array[$prefix . $element] = self::getParamDetails( $element );
}
# Check default namespace name
if( isset( $this->mNamespaceNames[$code][NS_PROJECT_TALK] ) ) {
$default = $this->mNamespaceNames[$code][NS_PROJECT_TALK];
- if ( strpos( $default, '$1' ) === FALSE ) {
+ if ( strpos( $default, '$1' ) === false ) {
$namespaces[$default] = 'default';
}
}
# Check namespace aliases
foreach( $this->mNamespaceAliases[$code] as $key => $value ) {
- if ( $value == NS_PROJECT_TALK && strpos( $key, '$1' ) === FALSE ) {
+ if ( $value == NS_PROJECT_TALK && strpos( $key, '$1' ) === false ) {
$namespaces[$key] = '';
}
}
/**
* @param $out OutputPage
*/
- function setupSkinUserCss( OutputPage $out ){
+ function setupSkinUserCss( OutputPage $out ) {
parent::setupSkinUserCss( $out );
$out->addModuleStyles( 'skins.chick' );
/**
* @param $out OutputPage
*/
- function setupSkinUserCss( OutputPage $out ){
+ function setupSkinUserCss( OutputPage $out ) {
$out->addModuleStyles( 'mediawiki.legacy.shared' );
$out->addModuleStyles( 'mediawiki.legacy.oldshared' );
$out->addModuleStyles( 'skins.cologneblue' );
/**
* @param $out OutputPage
*/
- function setupSkinUserCss( OutputPage $out ){
+ function setupSkinUserCss( OutputPage $out ) {
parent::setupSkinUserCss( $out );
$out->addModuleStyles ('skins.modern');
}
/**
* @param $out OutputPage
*/
- function setupSkinUserCss( OutputPage $out ){
+ function setupSkinUserCss( OutputPage $out ) {
parent::setupSkinUserCss( $out );
$out->addModuleStyles( 'skins.nostalgia' );
}
/**
* @param $out OutputPage
*/
- function setupSkinUserCss( OutputPage $out ){
+ function setupSkinUserCss( OutputPage $out ) {
parent::setupSkinUserCss( $out );
$out->addModuleStyles( 'skins.standard' );
* fixes bug 22916
* @param $out OutputPage object
*/
- function setupSkinUserCss( OutputPage $out ){
+ function setupSkinUserCss( OutputPage $out ) {
parent::setupSkinUserCss( $out );
$out->addModuleStyles( 'skins.vector' );
}