r62428 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62427‎ | r62428 | r62429 >
Date:13:59, 13 February 2010
Author:siebrand
Status:deferred
Tags:
Comment:
Update code formatting, run stylize.php, whitespace updates
Modified paths:
  • /trunk/extensions/AbsenteeLandlord/AbsenteeLandlord.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AbsenteeLandlord/AbsenteeLandlord.php
@@ -3,12 +3,12 @@
44 * \brief Contains code for the AbsenteeLandlord extension by Ryan Schmidt and Tim Laqua.
55 */
66
7 -if(!defined('MEDIAWIKI')) {
8 - echo("This file is an extension to the mediawiki software and cannot be used standalone\n");
 7+if ( !defined( 'MEDIAWIKI' ) ) {
 8+ echo( "This file is an extension to the MediaWiki software and cannot be used standalone\n" );
99 die( 1 );
1010 }
1111
12 -$wgAbsenteeLandlordMaxDays = 90; //how many days do the sysops have to be inactive for?
 12+$wgAbsenteeLandlordMaxDays = 90; // how many days do the sysops have to be inactive for?
1313
1414 $wgExtensionCredits['other'][] = array(
1515 'path' => __FILE__,
@@ -23,23 +23,23 @@
2424 $wgExtensionFunctions[] = 'efAbsenteeLandlord_Setup';
2525 $wgHooks['BeforePageDisplay'][] = 'efAbsenteeLandlord_MaybeDoTouch';
2626
27 -$wgExtensionMessagesFiles['AbsenteeLandlord'] = dirname(__FILE__) . '/AbsenteeLandlord.i18n.php';
 27+$wgExtensionMessagesFiles['AbsenteeLandlord'] = dirname( __FILE__ ) . '/AbsenteeLandlord.i18n.php';
2828
2929 function efAbsenteeLandlord_Setup() {
3030 global $wgAbsenteeLandlordMaxDays;
3131
3232 $timeout = $wgAbsenteeLandlordMaxDays * 24 * 60 * 60; // # days * 24 hours * 60 minutes * 60 seconds
33 - $lasttouched = filemtime(dirname(__FILE__) . '/lasttouched.txt');
 33+ $lasttouched = filemtime( dirname( __FILE__ ) . '/lasttouched.txt' );
3434 $check = time() - $lasttouched;
3535
36 - if( $check >= $timeout ) {
 36+ if ( $check >= $timeout ) {
3737 global $wgUser;
3838 $groups = $wgUser->getGroups();
3939
40 - if( !in_array( 'sysop', $groups ) ) {
 40+ if ( !in_array( 'sysop', $groups ) ) {
4141 global $wgReadOnly;
4242
43 - #Add Messages (don't need them unless we get here)
 43+ # Add Messages (don't need them unless we get here)
4444 wfLoadExtensionMessages( 'AbsenteeLandlord' );
4545 $wgReadOnly = wfMsg( 'absenteelandlord-reason' );
4646 }
@@ -48,11 +48,11 @@
4949 return true;
5050 }
5151
52 -function efAbsenteeLandlord_MaybeDoTouch(&$out, $sk = null) {
 52+function efAbsenteeLandlord_MaybeDoTouch( &$out, $sk = null ) {
5353 global $wgUser;
5454 $groups = $wgUser->getGroups();
55 - if( in_array( 'sysop', $groups ) ) {
56 - touch(dirname(__FILE__) . '/lasttouched.txt');
 55+ if ( in_array( 'sysop', $groups ) ) {
 56+ touch( dirname( __FILE__ ) . '/lasttouched.txt' );
5757 }
5858 return true;
5959 }

Status & tagging log