r32014 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32013‎ | r32014 | r32015 >
Date:10:50, 15 March 2008
Author:nikerabbit
Status:old
Tags:
Comment:
* Throw some E_USER_NOTICES that developers may actually notice if they are still using deprecated functions
Modified paths:
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/User.php
@@ -699,6 +699,7 @@
700700 * @deprecated use wfSetupSession()
701701 */
702702 function SetupSession() {
 703+ trigger_error( 'Use of ' . __METHOD__ . ' is deprecated', E_USER_NOTICE );
703704 wfSetupSession();
704705 }
705706
@@ -1163,6 +1164,7 @@
11641165 * @deprecated use User::newFromId()
11651166 */
11661167 function setID( $v ) {
 1168+ trigger_error( 'Use of ' . __METHOD__ . ' is deprecated', E_USER_NOTICE );
11671169 $this->mId = $v;
11681170 $this->clearInstanceCache( 'id' );
11691171 }
@@ -1758,6 +1760,7 @@
17591761 * @deprecated
17601762 */
17611763 function isBot() {
 1764+ trigger_error( 'Use of ' . __METHOD__ . ' is deprecated', E_USER_NOTICE );
17621765 return $this->isAllowed( 'bot' );
17631766 }
17641767
@@ -2208,7 +2211,9 @@
22092212 /**
22102213 * @deprecated
22112214 */
2212 - function setLoaded( $loaded ) {}
 2215+ function setLoaded( $loaded ) {
 2216+ trigger_error( 'Use of ' . __METHOD__ . ' is deprecated', E_USER_NOTICE );
 2217+ }
22132218
22142219 /**
22152220 * Get this user's personal page title.

Follow-up revisions

RevisionCommit summaryAuthorDate
r32027Improve on r32014 with a helper function to avoid code duplication/possible i...simetrical00:50, 16 March 2008

Status & tagging log