r10905 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r10904‎ | r10905 | r10906 >
Date:02:22, 5 September 2005
Author:timstarling
Status:old
Tags:
Comment:
Deferred initialisation of $wgIP, because it's potentially slow, especially if and when we add the 200 NTL proxies to the trusted XFF list. I was hoping to avoid initialisation altogether for anonymous page views, but that turns out to be difficult because of user_newtalk. It is, however, avoided for action=raw. Tested page view, newtalk, IP registration in history and recentchanges, IP block, autoblock and Special:Version.

Also moved the old proxy scan code from EditPage.php to a more appropriate location in ProxyTools.php.
Modified paths:
  • /trunk/extensions/LatexDoc/README (modified) (history)
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/includes/ProxyTools.php (modified) (history)
  • /trunk/phase3/includes/RecentChange.php (modified) (history)
  • /trunk/phase3/includes/Setup.php (modified) (history)
  • /trunk/phase3/includes/Skin.php (modified) (history)
  • /trunk/phase3/includes/SpecialBlockme.php (modified) (history)
  • /trunk/phase3/includes/SpecialUserlogin.php (modified) (history)
  • /trunk/phase3/includes/SpecialVersion.php (modified) (history)
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ProxyTools.php
@@ -10,8 +10,13 @@
1111
1212 /** Work out the IP address based on various globals */
1313 function wfGetIP() {
14 - global $wgSquidServers, $wgSquidServersNoPurge;
 14+ global $wgSquidServers, $wgSquidServersNoPurge, $wgIP;
1515
 16+ # Return cached result
 17+ if ( !empty( $wgIP ) ) {
 18+ return $wgIP;
 19+ }
 20+
1621 /* collect the originating ips */
1722 # Client connecting to this webserver
1823 if ( isset( $_SERVER['REMOTE_ADDR'] ) ) {
@@ -45,6 +50,8 @@
4651 }
4752 }
4853
 54+ wfDebug( "IP: $ip\n" );
 55+ $wgIP = $ip;
4956 return $ip;
5057 }
5158
@@ -89,5 +96,51 @@
9097 }
9198 return true;
9299 }
 100+
 101+/**
 102+ * Forks processes to scan the originating IP for an open proxy server
 103+ * MemCached can be used to skip IPs that have already been scanned
 104+ */
 105+function wfProxyCheck() {
 106+ global $wgBlockOpenProxies, $wgProxyPorts, $wgProxyScriptPath;
 107+ global $wgUseMemCached, $wgMemc, $wgDBname, $wgProxyMemcExpiry;
 108+
 109+ if ( !$wgBlockOpenProxies ) {
 110+ return;
 111+ }
 112+
 113+ $ip = wfGetIP();
93114
 115+ # Get MemCached key
 116+ $skip = false;
 117+ if ( $wgUseMemCached ) {
 118+ $mcKey = "$wgDBname:proxy:ip:$ip";
 119+ $mcValue = $wgMemc->get( $mcKey );
 120+ if ( $mcValue ) {
 121+ $skip = true;
 122+ }
 123+ }
 124+
 125+ # Fork the processes
 126+ if ( !$skip ) {
 127+ $title = Title::makeTitle( NS_SPECIAL, 'Blockme' );
 128+ $iphash = md5( $ip . $wgProxyKey );
 129+ $url = $title->getFullURL( 'ip='.$iphash );
 130+
 131+ foreach ( $wgProxyPorts as $port ) {
 132+ $params = implode( ' ', array(
 133+ escapeshellarg( $wgProxyScriptPath ),
 134+ escapeshellarg( $ip ),
 135+ escapeshellarg( $port ),
 136+ escapeshellarg( $url )
 137+ ));
 138+ exec( "php $params &>/dev/null &" );
 139+ }
 140+ # Set MemCached key
 141+ if ( $wgUseMemCached ) {
 142+ $wgMemc->set( $mcKey, 1, $wgProxyMemcExpiry );
 143+ }
 144+ }
 145+}
 146+
94147 ?>
Index: trunk/phase3/includes/User.php
@@ -273,12 +273,12 @@
274274 $fname = 'User::loadDefaults' . $n;
275275 wfProfileIn( $fname );
276276
277 - global $wgContLang, $wgIP, $wgDBname;
 277+ global $wgContLang, $wgDBname;
278278 global $wgNamespacesToBeSearchedDefault;
279279
280280 $this->mId = 0;
281281 $this->mNewtalk = -1;
282 - $this->mName = $wgIP;
 282+ $this->mName = false;
283283 $this->mRealName = $this->mEmail = '';
284284 $this->mEmailAuthenticated = null;
285285 $this->mPassword = $this->mNewpassword = '';
@@ -360,7 +360,7 @@
361361 * And it's cheaper to check slave first, then master if needed, than master always.
362362 */
363363 function getBlockedStatus( $bFromSlave = true ) {
364 - global $wgIP, $wgBlockCache, $wgProxyList, $wgEnableSorbs, $wgProxyWhitelist;
 364+ global $wgBlockCache, $wgProxyList, $wgEnableSorbs, $wgProxyWhitelist;
365365
366366 if ( -1 != $this->mBlockedby ) {
367367 wfDebug( "User::getBlockedStatus: already loaded.\n" );
@@ -372,11 +372,12 @@
373373 wfDebug( "$fname: checking...\n" );
374374
375375 $this->mBlockedby = 0;
 376+ $ip = wfGetIP();
376377
377378 # User/IP blocking
378379 $block = new Block();
379380 $block->forUpdate( $bFromSlave );
380 - if ( $block->load( $wgIP , $this->mId ) ) {
 381+ if ( $block->load( $ip , $this->mId ) ) {
381382 wfDebug( "$fname: Found block.\n" );
382383 $this->mBlockedby = $block->mBy;
383384 $this->mBlockreason = $block->mReason;
@@ -391,12 +392,12 @@
392393 if ( !$this->mBlockedby ) {
393394 # Check first against slave, and optionally from master.
394395 wfDebug( "$fname: Checking range blocks\n" );
395 - $block = $wgBlockCache->get( $wgIP, true );
 396+ $block = $wgBlockCache->get( $ip, true );
396397 if ( !$block && !$bFromSlave )
397398 {
398399 # Not blocked: check against master, to make sure.
399400 $wgBlockCache->clearLocal( );
400 - $block = $wgBlockCache->get( $wgIP, false );
 401+ $block = $wgBlockCache->get( $ip, false );
401402 }
402403 if ( $block !== false ) {
403404 $this->mBlockedby = $block->mBy;
@@ -405,17 +406,17 @@
406407 }
407408
408409 # Proxy blocking
409 - if ( !$this->isSysop() && !in_array( $wgIP, $wgProxyWhitelist ) ) {
 410+ if ( !$this->isSysop() && !in_array( $ip, $wgProxyWhitelist ) ) {
410411
411412 # Local list
412 - if ( array_key_exists( $wgIP, $wgProxyList ) ) {
 413+ if ( array_key_exists( $ip, $wgProxyList ) ) {
413414 $this->mBlockedby = wfMsg( 'proxyblocker' );
414415 $this->mBlockreason = wfMsg( 'proxyblockreason' );
415416 }
416417
417418 # DNSBL
418419 if ( !$this->mBlockedby && $wgEnableSorbs && !$this->getID() ) {
419 - if ( $this->inSorbsBlacklist( $wgIP ) ) {
 420+ if ( $this->inSorbsBlacklist( $ip ) ) {
420421 $this->mBlockedby = wfMsg( 'sorbs' );
421422 $this->mBlockreason = wfMsg( 'sorbsreason' );
422423 }
@@ -485,13 +486,14 @@
486487 return false;
487488 }
488489
489 - global $wgMemc, $wgIP, $wgDBname, $wgRateLimitLog;
 490+ global $wgMemc, $wgDBname, $wgRateLimitLog;
490491 $fname = 'User::pingLimiter';
491492 wfProfileIn( $fname );
492493
493494 $limits = $wgRateLimits[$action];
494495 $keys = array();
495496 $id = $this->getId();
 497+ $ip = wfGetIP();
496498
497499 if( isset( $limits['anon'] ) && $id == 0 ) {
498500 $keys["$wgDBname:limiter:$action:anon"] = $limits['anon'];
@@ -505,9 +507,9 @@
506508 $keys["$wgDBname:limiter:$action:user:$id"] = $limits['newbie'];
507509 }
508510 if( isset( $limits['ip'] ) ) {
509 - $keys["mediawiki:limiter:$action:ip:$wgIP"] = $limits['ip'];
 511+ $keys["mediawiki:limiter:$action:ip:$ip"] = $limits['ip'];
510512 }
511 - if( isset( $limits['subnet'] ) && preg_match( '/^(\d+\.\d+\.\d+)\.\d+$/', $wgIP, $matches ) ) {
 513+ if( isset( $limits['subnet'] ) && preg_match( '/^(\d+\.\d+\.\d+)\.\d+$/', $ip, $matches ) ) {
512514 $subnet = $matches[1];
513515 $keys["mediawiki:limiter:$action:subnet:$subnet"] = $limits['subnet'];
514516 }
@@ -607,7 +609,7 @@
608610 }
609611
610612 /**
611 - * Read datas from session
 613+ * Create a new user object using data from session
612614 * @static
613615 */
614616 function loadFromSession() {
@@ -734,6 +736,9 @@
735737
736738 function getName() {
737739 $this->loadFromDatabase();
 740+ if ( $this->mName === false ) {
 741+ $this->mName = wfGetIP();
 742+ }
738743 return $this->mName;
739744 }
740745
@@ -765,7 +770,7 @@
766771 # entire User object stored in there.
767772 if( !$this->mId ) {
768773 global $wgDBname, $wgMemc;
769 - $key = "$wgDBname:newtalk:ip:{$this->mName}";
 774+ $key = "$wgDBname:newtalk:ip:" . $this->getName();
770775 $newtalk = $wgMemc->get( $key );
771776 if( is_integer( $newtalk ) ) {
772777 $this->mNewtalk = $newtalk ? 1 : 0;
@@ -794,7 +799,7 @@
795800 }
796801 $dbr->freeResult( $res );
797802 } else {
798 - $res = $dbr->select( 'user_newtalk', 1, array( 'user_ip' => $this->mName ), $fname );
 803+ $res = $dbr->select( 'user_newtalk', 1, array( 'user_ip' => $this->getName() ), $fname );
799804 $this->mNewtalk = $dbr->numRows( $res ) > 0 ? 1 : 0;
800805 $dbr->freeResult( $res );
801806 }
@@ -1250,8 +1255,8 @@
12511256 $_SESSION['wsUserID'] = $this->mId;
12521257 setcookie( $wgDBname.'UserID', $this->mId, $exp, $wgCookiePath, $wgCookieDomain );
12531258
1254 - $_SESSION['wsUserName'] = $this->mName;
1255 - setcookie( $wgDBname.'UserName', $this->mName, $exp, $wgCookiePath, $wgCookieDomain );
 1259+ $_SESSION['wsUserName'] = $this->getName();
 1260+ setcookie( $wgDBname.'UserName', $this->getName(), $exp, $wgCookiePath, $wgCookieDomain );
12561261
12571262 $_SESSION['wsToken'] = $this->mToken;
12581263 if ( 1 == $this->getOption( 'rememberpassword' ) ) {
@@ -1266,7 +1271,7 @@
12671272 * It will clean the session cookie
12681273 */
12691274 function logout() {
1270 - global $wgCookiePath, $wgCookieDomain, $wgDBname, $wgIP;
 1275+ global $wgCookiePath, $wgCookieDomain, $wgDBname;
12711276 $this->loadDefaults();
12721277 $this->setLoaded( true );
12731278
@@ -1337,7 +1342,7 @@
13381343 if( !$this->mId ) {
13391344 # Anon users have a separate memcache space for newtalk
13401345 # since they don't store their own info. Trim...
1341 - $wgMemc->delete( "$wgDBname:newtalk:ip:{$this->mName}" );
 1346+ $wgMemc->delete( "$wgDBname:newtalk:ip:" . $this->getName() );
13421347 }
13431348 }
13441349 } else {
@@ -1347,8 +1352,8 @@
13481353 $key = false;
13491354 } else {
13501355 $field = 'user_ip';
1351 - $value = $this->mName;
1352 - $key = "$wgDBname:newtalk:ip:$this->mName";
 1356+ $value = $this->getName();
 1357+ $key = "$wgDBname:newtalk:ip:$value";
13531358 }
13541359
13551360 $dbr =& wfGetDB( DB_SLAVE );
@@ -1390,7 +1395,7 @@
13911396 $fname = 'User::idForName';
13921397
13931398 $gotid = 0;
1394 - $s = trim( $this->mName );
 1399+ $s = trim( $this->getName() );
13951400 if ( 0 == strcmp( '', $s ) ) return 0;
13961401
13971402 $dbr =& wfGetDB( DB_SLAVE );
@@ -1425,7 +1430,6 @@
14261431 }
14271432
14281433 function spreadBlock() {
1429 - global $wgIP;
14301434 # If the (non-anonymous) user is blocked, this function will block any IP address
14311435 # that they successfully log on from.
14321436 $fname = 'User::spreadBlock';
@@ -1441,7 +1445,7 @@
14421446 }
14431447
14441448 # Check if this IP address is already blocked
1445 - $ipblock = Block::newFromDB( $wgIP );
 1449+ $ipblock = Block::newFromDB( wfGetIP() );
14461450 if ( $ipblock->isValid() ) {
14471451 # Just update the timestamp
14481452 $ipblock->updateTimestamp();
@@ -1449,8 +1453,8 @@
14501454 }
14511455
14521456 # Make a new block object with the desired properties
1453 - wfDebug( "Autoblocking {$this->mName}@{$wgIP}\n" );
1454 - $ipblock->mAddress = $wgIP;
 1457+ wfDebug( "Autoblocking {$this->mName}@" . wfGetIP() . "\n" );
 1458+ $ipblock->mAddress = wfGetIP();
14551459 $ipblock->mUser = 0;
14561460 $ipblock->mBy = $userblock->mBy;
14571461 $ipblock->mReason = wfMsg( 'autoblocker', $this->getName(), $userblock->mReason );
@@ -1511,7 +1515,7 @@
15121516 * @access public
15131517 */
15141518 function getUserPage() {
1515 - return Title::makeTitle( NS_USER, $this->mName );
 1519+ return Title::makeTitle( NS_USER, $this->getName() );
15161520 }
15171521
15181522 /**
@@ -1656,11 +1660,11 @@
16571661 * @return mixed True on success, a WikiError object on failure.
16581662 */
16591663 function sendConfirmationMail() {
1660 - global $wgIP, $wgContLang;
 1664+ global $wgContLang;
16611665 $url = $this->confirmationTokenUrl( $expiration );
16621666 return $this->sendMail( wfMsg( 'confirmemail_subject' ),
16631667 wfMsg( 'confirmemail_body',
1664 - $wgIP,
 1668+ wfGetIP(),
16651669 $this->getName(),
16661670 $url,
16671671 $wgContLang->timeanddate( $expiration, false ) ) );
Index: trunk/phase3/includes/RecentChange.php
@@ -194,8 +194,10 @@
195195 }
196196
197197 if ( !$ip ) {
198 - global $wgIP;
199 - $ip = empty( $wgIP ) ? '' : $wgIP;
 198+ $ip = wfGetIP();
 199+ if ( !$ip ) {
 200+ $ip = '';
 201+ }
200202 }
201203
202204 $rc = new RecentChange;
@@ -235,8 +237,10 @@
236238 $ip='', $size = 0, $newId = 0 )
237239 {
238240 if ( !$ip ) {
239 - global $wgIP;
240 - $ip = empty( $wgIP ) ? '' : $wgIP;
 241+ $ip = wfGetIP();
 242+ if ( !$ip ) {
 243+ $ip = '';
 244+ }
241245 }
242246 if ( $bot == 'default' ) {
243247 $bot = $user->isBot();
@@ -277,9 +281,12 @@
278282 /*static*/ function notifyMove( $timestamp, &$oldTitle, &$newTitle, &$user, $comment, $ip='', $overRedir = false )
279283 {
280284 if ( !$ip ) {
281 - global $wgIP;
282 - $ip = empty( $wgIP ) ? '' : $wgIP;
 285+ $ip = wfGetIP();
 286+ if ( !$ip ) {
 287+ $ip = '';
 288+ }
283289 }
 290+
284291 $rc = new RecentChange;
285292 $rc->mAttribs = array(
286293 'rc_timestamp' => $timestamp,
@@ -323,9 +330,12 @@
324331 /*static*/ function notifyLog( $timestamp, &$title, &$user, $comment, $ip='' )
325332 {
326333 if ( !$ip ) {
327 - global $wgIP;
328 - $ip = empty( $wgIP ) ? '' : $wgIP;
 334+ $ip = wfGetIP();
 335+ if ( !$ip ) {
 336+ $ip = '';
 337+ }
329338 }
 339+
330340 $rc = new RecentChange;
331341 $rc->mAttribs = array(
332342 'rc_timestamp' => $timestamp,
Index: trunk/phase3/includes/SpecialUserlogin.php
@@ -162,7 +162,7 @@
163163 function addNewAccountInternal() {
164164 global $wgUser, $wgOut;
165165 global $wgUseLatin1, $wgEnableSorbs, $wgProxyWhitelist;
166 - global $wgMemc, $wgAccountCreationThrottle, $wgDBname, $wgIP;
 166+ global $wgMemc, $wgAccountCreationThrottle, $wgDBname;
167167 global $wgAuth;
168168
169169 // If the user passes an invalid domain, something is fishy
@@ -189,10 +189,11 @@
190190 return false;
191191 }
192192
193 - if ( $wgEnableSorbs && !in_array( $wgIP, $wgProxyWhitelist ) &&
194 - $wgUser->inSorbsBlacklist( $wgIP ) )
 193+ $ip = wfGetIP();
 194+ if ( $wgEnableSorbs && !in_array( $ip, $wgProxyWhitelist ) &&
 195+ $wgUser->inSorbsBlacklist( $ip ) )
195196 {
196 - $this->mainLoginForm( wfMsg( 'sorbs_create_account_reason' ) . ' (' . htmlspecialchars( $wgIP ) . ')' );
 197+ $this->mainLoginForm( wfMsg( 'sorbs_create_account_reason' ) . ' (' . htmlspecialchars( $ip ) . ')' );
197198 return;
198199 }
199200
@@ -225,7 +226,7 @@
226227 }
227228
228229 if ( $wgAccountCreationThrottle ) {
229 - $key = $wgDBname.':acctcreate:ip:'.$wgIP;
 230+ $key = $wgDBname.':acctcreate:ip:'.$ip;
230231 $value = $wgMemc->incr( $key );
231232 if ( !$value ) {
232233 $wgMemc->set( $key, 1, 86400 );
@@ -376,7 +377,7 @@
377378 * @access private
378379 */
379380 function mailPasswordInternal( $u ) {
380 - global $wgPasswordSender, $wgDBname, $wgIP;
 381+ global $wgPasswordSender, $wgDBname;
381382 global $wgCookiePath, $wgCookieDomain;
382383
383384 if ( '' == $u->getEmail() ) {
@@ -390,7 +391,7 @@
391392
392393 $u->saveSettings();
393394
394 - $ip = $wgIP;
 395+ $ip = wfGetIP();
395396 if ( '' == $ip ) { $ip = '(Unknown)'; }
396397
397398 $m = wfMsg( 'passwordremindertext', $ip, $u->getName(), $np );
Index: trunk/phase3/includes/Setup.php
@@ -80,7 +80,7 @@
8181 wfProfileOut( $fname.'-includes' );
8282 wfProfileIn( $fname.'-misc1' );
8383
84 -$wgIP = wfGetIP();
 84+$wgIP = false; # Load on demand
8585 $wgRequest = new WebRequest();
8686
8787 # Useful debug output
Index: trunk/phase3/includes/SpecialBlockme.php
@@ -10,9 +10,11 @@
1111 */
1212 function wfSpecialBlockme()
1313 {
14 - global $wgIP, $wgBlockOpenProxies, $wgOut, $wgProxyKey;
 14+ global $wgBlockOpenProxies, $wgOut, $wgProxyKey;
1515
16 - if ( !$wgBlockOpenProxies || $_REQUEST['ip'] != md5( $wgIP . $wgProxyKey ) ) {
 16+ $ip = wfGetIP();
 17+
 18+ if ( !$wgBlockOpenProxies || $_REQUEST['ip'] != md5( $ip . $wgProxyKey ) ) {
1719 $wgOut->addWikiText( wfMsg( "disabled" ) );
1820 return;
1921 }
@@ -31,7 +33,7 @@
3234 $id = $u->getID();
3335 }
3436
35 - $block = new Block( $wgIP, 0, $id, $reason, wfTimestampNow() );
 37+ $block = new Block( $ip, 0, $id, $reason, wfTimestampNow() );
3638 $block->insert();
3739
3840 $wgOut->addWikiText( $success );
Index: trunk/phase3/includes/EditPage.php
@@ -587,7 +587,7 @@
588588 $this->edittime = $this->mArticle->getTimestamp();
589589 $this->textbox1 = $this->mArticle->getContent( true );
590590 $this->summary = '';
591 - $this->proxyCheck();
 591+ wfProxyCheck();
592592 }
593593
594594 /**
@@ -1015,7 +1015,7 @@
10161016 * @todo document
10171017 */
10181018 function blockedIPpage() {
1019 - global $wgOut, $wgUser, $wgContLang, $wgIP;
 1019+ global $wgOut, $wgUser, $wgContLang;
10201020
10211021 $wgOut->setPageTitle( wfMsg( 'blockedtitle' ) );
10221022 $wgOut->setRobotpolicy( 'noindex,nofollow' );
@@ -1023,7 +1023,7 @@
10241024
10251025 $id = $wgUser->blockedBy();
10261026 $reason = $wgUser->blockedFor();
1027 - $ip = $wgIP;
 1027+ $ip = wfGetIP();
10281028
10291029 if ( is_numeric( $id ) ) {
10301030 $name = User::whoIs( $id );
@@ -1069,50 +1069,6 @@
10701070 }
10711071
10721072 /**
1073 - * Forks processes to scan the originating IP for an open proxy server
1074 - * MemCached can be used to skip IPs that have already been scanned
1075 - */
1076 - function proxyCheck() {
1077 - global $wgBlockOpenProxies, $wgProxyPorts, $wgProxyScriptPath;
1078 - global $wgIP, $wgUseMemCached, $wgMemc, $wgDBname, $wgProxyMemcExpiry;
1079 -
1080 - if ( !$wgBlockOpenProxies ) {
1081 - return;
1082 - }
1083 -
1084 - # Get MemCached key
1085 - $skip = false;
1086 - if ( $wgUseMemCached ) {
1087 - $mcKey = $wgDBname.':proxy:ip:'.$wgIP;
1088 - $mcValue = $wgMemc->get( $mcKey );
1089 - if ( $mcValue ) {
1090 - $skip = true;
1091 - }
1092 - }
1093 -
1094 - # Fork the processes
1095 - if ( !$skip ) {
1096 - $title = Title::makeTitle( NS_SPECIAL, 'Blockme' );
1097 - $iphash = md5( $wgIP . $wgProxyKey );
1098 - $url = $title->getFullURL( 'ip='.$iphash );
1099 -
1100 - foreach ( $wgProxyPorts as $port ) {
1101 - $params = implode( ' ', array(
1102 - escapeshellarg( $wgProxyScriptPath ),
1103 - escapeshellarg( $wgIP ),
1104 - escapeshellarg( $port ),
1105 - escapeshellarg( $url )
1106 - ));
1107 - exec( "php $params &>/dev/null &" );
1108 - }
1109 - # Set MemCached key
1110 - if ( $wgUseMemCached ) {
1111 - $wgMemc->set( $mcKey, 1, $wgProxyMemcExpiry );
1112 - }
1113 - }
1114 - }
1115 -
1116 - /**
11171073 * @access private
11181074 * @todo document
11191075 */
Index: trunk/phase3/includes/Skin.php
@@ -646,7 +646,7 @@
647647 }
648648
649649 function nameAndLogin() {
650 - global $wgUser, $wgTitle, $wgLang, $wgContLang, $wgShowIPinHeader, $wgIP;
 650+ global $wgUser, $wgTitle, $wgLang, $wgContLang, $wgShowIPinHeader;
651651
652652 $li = $wgContLang->specialPage( 'Userlogin' );
653653 $lo = $wgContLang->specialPage( 'Userlogout' );
@@ -654,7 +654,7 @@
655655 $s = '';
656656 if ( $wgUser->isAnon() ) {
657657 if( $wgShowIPinHeader && isset( $_COOKIE[ini_get('session.name')] ) ) {
658 - $n = $wgIP;
 658+ $n = wfGetIP();
659659
660660 $tl = $this->makeKnownLinkObj( $wgUser->getTalkPage(),
661661 $wgLang->getNsText( NS_TALK ) );
Index: trunk/phase3/includes/SpecialVersion.php
@@ -139,9 +139,8 @@
140140 }
141141
142142 function IPInfo() {
143 - global $wgIP;
144143
145 - $ip = str_replace( '--', ' - - ', htmlspecialchars( $wgIP ) );
 144+ $ip = str_replace( '--', ' - - ', htmlspecialchars( wfGetIP() ) );
146145 return "<!-- visited from $ip -->\n";
147146 }
148147 }
Index: trunk/extensions/LatexDoc/README
@@ -47,8 +47,8 @@
4848 COPYING
4949 -------
5050
51 -This extension is copyright Tim Starling (2005). You may choose one of the
52 -following two licenses, at your option:
 51+LatexDoc.php and this documentation were written by Tim Starling, (c) 2005. You
 52+may choose one of the following two licenses, at your option:
5353
5454 1) The GNU General Public License
5555

Status & tagging log