r105985 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105984‎ | r105985 | r105986 >
Date:05:19, 13 December 2011
Author:jeroendedauw
Status:ok
Tags:
Comment:
add missing deprecation notices and added deprecation version to existing ones
Modified paths:
  • /trunk/phase3/includes/Action.php (modified) (history)
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/Block.php (modified) (history)
  • /trunk/phase3/includes/CategoryViewer.php (modified) (history)
  • /trunk/phase3/includes/ChangesList.php (modified) (history)
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)
  • /trunk/phase3/includes/HTMLForm.php (modified) (history)
  • /trunk/phase3/includes/ImageGallery.php (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/includes/LogEventsList.php (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)
  • /trunk/phase3/includes/actions/RawAction.php (modified) (history)
  • /trunk/phase3/includes/api/ApiBase.php (modified) (history)
  • /trunk/phase3/includes/api/ApiMain.php (modified) (history)
  • /trunk/phase3/includes/api/ApiParse.php (modified) (history)
  • /trunk/phase3/includes/context/ContextSource.php (modified) (history)
  • /trunk/phase3/includes/context/DerivativeContext.php (modified) (history)
  • /trunk/phase3/includes/context/RequestContext.php (modified) (history)
  • /trunk/phase3/includes/db/Database.php (modified) (history)
  • /trunk/phase3/includes/db/DatabaseMysql.php (modified) (history)
  • /trunk/phase3/includes/db/LoadBalancer.php (modified) (history)
  • /trunk/phase3/includes/filerepo/FSRepo.php (modified) (history)
  • /trunk/phase3/includes/media/Exif.php (modified) (history)
  • /trunk/phase3/includes/parser/ParserOptions.php (modified) (history)
  • /trunk/phase3/includes/search/SearchEngine.php (modified) (history)
  • /trunk/phase3/includes/upload/UploadBase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/upload/UploadBase.php
@@ -206,7 +206,7 @@
207207 * @return Status Status
208208 */
209209 protected function appendToUploadFile( $srcPath, $toAppendPath ) {
210 - wfDeprecated(__METHOD__);
 210+ wfDeprecated( __METHOD__, '1.19' );
211211
212212 $repo = RepoGroup::singleton()->getLocalRepo();
213213 $status = $repo->append( $srcPath, $toAppendPath );
@@ -222,7 +222,7 @@
223223 * @return Status Status
224224 */
225225 protected function appendFinish( $toAppendPath ) {
226 - wfDeprecated(__METHOD__);
 226+ wfDeprecated( __METHOD__, '1.19' );
227227
228228 $repo = RepoGroup::singleton()->getLocalRepo();
229229 $status = $repo->appendFinish( $toAppendPath );
Index: trunk/phase3/includes/search/SearchEngine.php
@@ -67,6 +67,7 @@
6868 * @deprecated since 1.18 Call supports( 'list-redirects' );
6969 */
7070 function acceptListRedirects() {
 71+ wfDeprecated( __METHOD__, '1.18' );
7172 return $this->supports( 'list-redirects' );
7273 }
7374
Index: trunk/phase3/includes/Article.php
@@ -270,6 +270,7 @@
271271 * @deprecated in 1.19; use fetchContent()
272272 */
273273 function loadContent() {
 274+ wfDeprecated( __METHOD__, '1.19' );
274275 $this->fetchContent();
275276 }
276277
@@ -338,7 +339,7 @@
339340 * @deprecated since 1.18
340341 */
341342 public function forUpdate() {
342 - wfDeprecated( __METHOD__ );
 343+ wfDeprecated( __METHOD__, '1.18' );
343344 }
344345
345346 /**
@@ -1620,6 +1621,7 @@
16211622 * @deprecated since 1.19
16221623 */
16231624 public function info() {
 1625+ wfDeprecated( __METHOD__, '1.19' );
16241626 Action::factory( 'info', $this )->show();
16251627 }
16261628
@@ -1628,6 +1630,7 @@
16291631 * @deprecated since 1.18
16301632 */
16311633 public function markpatrolled() {
 1634+ wfDeprecated( __METHOD__, '1.18' );
16321635 Action::factory( 'markpatrolled', $this )->show();
16331636 }
16341637
@@ -1644,6 +1647,7 @@
16451648 * @deprecated since 1.19
16461649 */
16471650 public function revert() {
 1651+ wfDeprecated( __METHOD__, '1.19' );
16481652 Action::factory( 'revert', $this )->show();
16491653 }
16501654
@@ -1652,6 +1656,7 @@
16531657 * @deprecated since 1.19
16541658 */
16551659 public function rollback() {
 1660+ wfDeprecated( __METHOD__, '1.19' );
16561661 Action::factory( 'rollback', $this )->show();
16571662 }
16581663
@@ -1661,6 +1666,7 @@
16621667 * @deprecated since 1.18
16631668 */
16641669 public function watch() {
 1670+ wfDeprecated( __METHOD__, '1.18' );
16651671 Action::factory( 'watch', $this )->show();
16661672 }
16671673
@@ -1674,6 +1680,7 @@
16751681 */
16761682 public function doWatch() {
16771683 global $wgUser;
 1684+ wfDeprecated( __METHOD__, '1.18' );
16781685 return WatchAction::doWatch( $this->getTitle(), $wgUser );
16791686 }
16801687
@@ -1683,6 +1690,7 @@
16841691 * @deprecated since 1.18
16851692 */
16861693 public function unwatch() {
 1694+ wfDeprecated( __METHOD__, '1.18' );
16871695 Action::factory( 'unwatch', $this )->show();
16881696 }
16891697
@@ -1693,6 +1701,7 @@
16941702 */
16951703 public function doUnwatch() {
16961704 global $wgUser;
 1705+ wfDeprecated( __METHOD__, '1.18' );
16971706 return WatchAction::doUnwatch( $this->getTitle(), $wgUser );
16981707 }
16991708
@@ -1706,7 +1715,7 @@
17071716 * @param $extraQuery String: extra query params
17081717 */
17091718 public function doRedirect( $noRedir = false, $sectionAnchor = '', $extraQuery = '' ) {
1710 - wfDeprecated( __METHOD__ );
 1719+ wfDeprecated( __METHOD__, '1.18' );
17111720 global $wgOut;
17121721
17131722 if ( $noRedir ) {
Index: trunk/phase3/includes/GlobalFunctions.php
@@ -1153,6 +1153,7 @@
11541154 * @return Language
11551155 */
11561156 function wfUILang() {
 1157+ wfDeprecated( __METHOD__, '1.18' );
11571158 global $wgLang;
11581159 return $wgLang;
11591160 }
@@ -1709,6 +1710,8 @@
17101711 * @deprecated in 1.19; use Language::viewPrevNext() instead
17111712 */
17121713 function wfViewPrevNext( $offset, $limit, $link, $query = '', $atend = false ) {
 1714+ wfDeprecated( __METHOD__, '1.19' );
 1715+
17131716 global $wgLang;
17141717
17151718 $query = wfCgiToArray( $query );
@@ -3024,6 +3027,7 @@
30253028 * @param $commit string
30263029 */
30273030 function wfDoUpdates( $commit = '' ) {
 3031+ wfDeprecated( __METHOD__, '1.19' );
30283032 DeferredUpdates::doUpdates( $commit );
30293033 }
30303034
@@ -3123,7 +3127,7 @@
31243128 * @deprecated since 1.18, warnings in 1.18, removal in 1.20
31253129 */
31263130 function wfCreateObject( $name, $p ) {
3127 - wfDeprecated( __FUNCTION__ );
 3131+ wfDeprecated( __FUNCTION__, '1.18' );
31283132 return MWFunction::newObj( $name, $p );
31293133 }
31303134
@@ -3356,6 +3360,7 @@
33573361 * @deprecated since 1.19
33583362 */
33593363 function wfStreamFile( $fname, $headers = array() ) {
 3364+ wfDeprecated( __FUNCTION__, '1.19' );
33603365 StreamFile::stream( $fname, $headers );
33613366 }
33623367
@@ -3426,7 +3431,7 @@
34273432 * @codeCoverageIgnore
34283433 */
34293434 function wfLoadExtensionMessages() {
3430 - wfDeprecated( __FUNCTION__ );
 3435+ wfDeprecated( __FUNCTION__, '1.16' );
34313436 }
34323437
34333438 /**
@@ -3544,7 +3549,7 @@
35453550 * @deprecated since 1.18, warnings in 1.18, remove in 1.20
35463551 */
35473552 function wfOut( $s ) {
3548 - wfDeprecated( __METHOD__ );
 3553+ wfDeprecated( __FUNCTION__, '1.18' );
35493554 global $wgCommandLineMode;
35503555 if ( $wgCommandLineMode ) {
35513556 echo $s;
Index: trunk/phase3/includes/parser/ParserOptions.php
@@ -96,7 +96,7 @@
9797 * @deprecated since 1.18 Use Linker::* instead
9898 */
9999 function getSkin( $title = null ) {
100 - wfDeprecated( __METHOD__ );
 100+ wfDeprecated( __METHOD__, '1.18' );
101101 return new DummyLinker;
102102 }
103103
Index: trunk/phase3/includes/Linker.php
@@ -23,7 +23,7 @@
2424 * @deprecated since 1.18 Just pass the external class directly to something using Html::expandAttributes
2525 */
2626 static function getExternalLinkAttributes( $class = 'external' ) {
27 - wfDeprecated( __METHOD__ );
 27+ wfDeprecated( __METHOD__, '1.18' );
2828 return self::getLinkAttributesInternal( '', $class );
2929 }
3030
@@ -359,7 +359,7 @@
360360 */
361361 static function makeSizeLinkObj( $size, $nt, $text = '', $query = '', $trail = '', $prefix = '' ) {
362362 global $wgUser;
363 - wfDeprecated( __METHOD__ );
 363+ wfDeprecated( __METHOD__, '1.17' );
364364
365365 $threshold = $wgUser->getStubThreshold();
366366 $colour = ( $size < $threshold ) ? 'stub' : '';
@@ -1873,6 +1873,8 @@
18741874 * the end of the link.
18751875 */
18761876 static function makeBrokenLink( $title, $text = '', $query = '', $trail = '' ) {
 1877+ wfDeprecated( __METHOD__, '1.16' );
 1878+
18771879 $nt = Title::newFromText( $title );
18781880 if ( $nt instanceof Title ) {
18791881 return self::makeBrokenLinkObj( $nt, $text, $query, $trail );
@@ -1899,6 +1901,8 @@
19001902 * @param $prefix String: optional prefix. As trail, only before instead of after.
19011903 */
19021904 static function makeLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) {
 1905+ wfDeprecated( __METHOD__, '1.16' );
 1906+
19031907 wfProfileIn( __METHOD__ );
19041908 $query = wfCgiToArray( $query );
19051909 list( $inside, $trail ) = self::splitTrail( $trail );
@@ -1931,6 +1935,8 @@
19321936 static function makeKnownLinkObj(
19331937 $title, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = ''
19341938 ) {
 1939+ wfDeprecated( __METHOD__, '1.16' );
 1940+
19351941 wfProfileIn( __METHOD__ );
19361942
19371943 if ( $text == '' ) {
@@ -1964,6 +1970,8 @@
19651971 * @param $prefix String: Optional prefix
19661972 */
19671973 static function makeBrokenLinkObj( $title, $text = '', $query = '', $trail = '', $prefix = '' ) {
 1974+ wfDeprecated( __METHOD__, '1.16' );
 1975+
19681976 wfProfileIn( __METHOD__ );
19691977
19701978 list( $inside, $trail ) = self::splitTrail( $trail );
@@ -1993,6 +2001,8 @@
19942002 * @param $prefix String: Optional prefix
19952003 */
19962004 static function makeColouredLinkObj( $nt, $colour, $text = '', $query = '', $trail = '', $prefix = '' ) {
 2005+ wfDeprecated( __METHOD__, '1.16' );
 2006+
19972007 if ( $colour != '' ) {
19982008 $style = self::getInternalLinkAttributesObj( $nt, $text, $colour );
19992009 } else {
@@ -2023,9 +2033,13 @@
20242034
20252035 /**
20262036 * @deprecated since 1.14
 2037+ * TODO: remove?!
 2038+ *
20272039 * Returns raw bits of HTML, use titleAttrib()
20282040 */
20292041 public static function tooltip( $name, $options = null ) {
 2042+ wfDeprecated( __METHOD__, '1.14' );
 2043+
20302044 # @todo FIXME: If Sanitizer::expandAttributes() treated "false" as "output
20312045 # no attribute" instead of "output '' as value for attribute", this
20322046 # would be two lines.
Index: trunk/phase3/includes/db/DatabaseMysql.php
@@ -511,6 +511,7 @@
512512 * @return bool|int
513513 */
514514 function getLagFromProcesslist() {
 515+ wfDeprecated( __METHOD__, '1.19' );
515516 $res = $this->query( 'SHOW PROCESSLIST', __METHOD__ );
516517 if( !$res ) {
517518 return false;
Index: trunk/phase3/includes/db/Database.php
@@ -631,7 +631,7 @@
632632 * @return DatabaseMysql
633633 */
634634 static function newFromParams( $server, $user, $password, $dbName, $flags = 0 ) {
635 - wfDeprecated( __METHOD__ );
 635+ wfDeprecated( __METHOD__, '1.17' );
636636 return new DatabaseMysql( $server, $user, $password, $dbName, $flags );
637637 }
638638
@@ -641,7 +641,7 @@
642642 * @see Database::factory()
643643 */
644644 public final static function newFromType( $dbType, $p = array() ) {
645 - wfDeprecated( __METHOD__ );
 645+ wfDeprecated( __METHOD__, '1.18' );
646646 if ( isset( $p['tableprefix'] ) ) {
647647 $p['tablePrefix'] = $p['tableprefix'];
648648 }
@@ -2204,7 +2204,7 @@
22052205 * @return string
22062206 */
22072207 function quote_ident( $s ) {
2208 - wfDeprecated( __METHOD__ );
 2208+ wfDeprecated( __METHOD__, '1.18' );
22092209 return $this->addIdentifierQuotes( $s );
22102210 }
22112211
@@ -2219,7 +2219,7 @@
22202220 * @return string
22212221 */
22222222 public function escapeLike( $s ) {
2223 - wfDeprecated( __METHOD__ );
 2223+ wfDeprecated( __METHOD__, '1.17' );
22242224 return $this->escapeLikeInternal( $s );
22252225 }
22262226
@@ -3056,6 +3056,7 @@
30573057 * @deprecated since 1.19; use setSessionOptions()
30583058 */
30593059 public function setTimeout( $timeout ) {
 3060+ wfDeprecated( __METHOD__, '1.19' );
30603061 $this->setSessionOptions( array( 'connTimeout' => $timeout ) );
30613062 }
30623063
Index: trunk/phase3/includes/db/LoadBalancer.php
@@ -858,6 +858,7 @@
859859 * @param $conn
860860 */
861861 function closeConnecton( $conn ) {
 862+ wfDeprecated( __METHOD__, '1.18' );
862863 $this->closeConnection( $conn );
863864 }
864865
Index: trunk/phase3/includes/filerepo/FSRepo.php
@@ -368,7 +368,7 @@
369369 * @return Status
370370 */
371371 function append( $srcPath, $toAppendPath, $flags = 0 ) {
372 - wfDeprecated(__METHOD__);
 372+ wfDeprecated( __METHOD__, '1.19' );
373373
374374 $status = $this->newGood();
375375
Index: trunk/phase3/includes/EditPage.php
@@ -406,6 +406,8 @@
407407 * @deprecated in 1.19; use displayPermissionsError() instead
408408 */
409409 function readOnlyPage( $source = null, $protected = false, $reasons = array(), $action = null ) {
 410+ wfDeprecated( __METHOD__, '1.19' );
 411+
410412 global $wgRequest, $wgOut;
411413 if ( $wgRequest->getBool( 'redlink' ) ) {
412414 // The edit page was reached via a red link.
@@ -2752,6 +2754,7 @@
27532755 * @deprecated in 1.19; throw an exception directly instead
27542756 */
27552757 function blockedPage() {
 2758+ wfDeprecated( __METHOD__, '1.19' );
27562759 global $wgUser;
27572760
27582761 throw new UserBlockedError( $wgUser->mBlock );
@@ -2763,6 +2766,7 @@
27642767 * @deprecated in 1.19; throw an exception directly instead
27652768 */
27662769 function userNotLoggedInPage() {
 2770+ wfDeprecated( __METHOD__, '1.19' );
27672771 throw new PermissionsError( 'edit' );
27682772 }
27692773
@@ -2773,6 +2777,7 @@
27742778 * @deprecated in 1.19; throw an exception directly instead
27752779 */
27762780 function noCreatePermission() {
 2781+ wfDeprecated( __METHOD__, '1.19' );
27772782 $permission = $this->mTitle->isTalkPage() ? 'createtalk' : 'createpage';
27782783 throw new PermissionsError( $permission );
27792784 }
@@ -2800,6 +2805,8 @@
28012806 * @deprecated since 1.17 Use method spamPageWithContent() instead
28022807 */
28032808 static function spamPage( $match = false ) {
 2809+ wfDeprecated( __METHOD__, '1.17' );
 2810+
28042811 global $wgOut, $wgTitle;
28052812
28062813 $wgOut->prepareErrorPage( wfMessage( 'spamprotectiontitle' ) );
Index: trunk/phase3/includes/HTMLForm.php
@@ -186,7 +186,7 @@
187187 * done already.
188188 * @deprecated since 1.18 load modules with ResourceLoader instead
189189 */
190 - static function addJS() { }
 190+ static function addJS() { wfDeprecated( __METHOD__, '1.18' ); }
191191
192192 /**
193193 * Initialise a new Object for the field
Index: trunk/phase3/includes/context/RequestContext.php
@@ -170,6 +170,7 @@
171171 * @param $l Mixed Language instance or language code
172172 */
173173 public function setLang( $l ) {
 174+ wfDeprecated( __METHOD__, '1.19' );
174175 $this->setLanguage( $l );
175176 }
176177
@@ -196,6 +197,7 @@
197198 * @return Language
198199 */
199200 public function getLang() {
 201+ wfDeprecated( __METHOD__, '1.19' );
200202 return $this->getLanguage();
201203 }
202204
Index: trunk/phase3/includes/context/ContextSource.php
@@ -100,6 +100,7 @@
101101 * @return Language
102102 */
103103 public function getLang() {
 104+ wfDeprecated( __METHOD__, '1.19' );
104105 return $this->getLanguage();
105106 }
106107
Index: trunk/phase3/includes/context/DerivativeContext.php
@@ -162,6 +162,7 @@
163163 * @param $l Mixed Language instance or language code
164164 */
165165 public function setLang( $l ) {
 166+ wfDeprecated( __METHOD__, '1.19' );
166167 $this->setLanguage( $l );
167168 }
168169
@@ -188,6 +189,7 @@
189190 * @return Language
190191 */
191192 public function getLang() {
 193+ wfDeprecated( __METHOD__, '1.19' );
192194 $this->getLanguage();
193195 }
194196
Index: trunk/phase3/includes/CategoryViewer.php
@@ -159,6 +159,7 @@
160160 * @deprecated since 1.17 kept for compatibility, please use addSubcategoryObject instead
161161 */
162162 function addSubcategory( Title $title, $sortkey, $pageLength ) {
 163+ wfDeprecated( __METHOD__, '1.17' );
163164 $this->addSubcategoryObject( Category::newFromTitle( $title ), $sortkey, $pageLength );
164165 }
165166
Index: trunk/phase3/includes/LogEventsList.php
@@ -77,7 +77,7 @@
7878 * @deprecated in 1.19
7979 */
8080 public function showHeader( $type ) {
81 - wfDeprecated( __METHOD__ );
 81+ wfDeprecated( __METHOD__, '1.19' );
8282 // If only one log type is used, then show a special message...
8383 $headerType = (count($type) == 1) ? $type[0] : '';
8484 if( LogPage::isLogType( $headerType ) ) {
Index: trunk/phase3/includes/actions/RawAction.php
@@ -210,6 +210,7 @@
211211 public $mOldId;
212212
213213 function __construct( Page $page, $request = false ) {
 214+ wfDeprecated( __CLASS__, '1.19' );
214215 parent::__construct( $page );
215216
216217 if ( $request !== false ) {
Index: trunk/phase3/includes/api/ApiParse.php
@@ -382,6 +382,8 @@
383383 * @return string
384384 */
385385 private function languagesHtml( $languages ) {
 386+ wfDeprecated( __METHOD__, '1.18' );
 387+
386388 global $wgContLang, $wgHideInterlanguageLinks;
387389
388390 if ( $wgHideInterlanguageLinks || count( $languages ) == 0 ) {
Index: trunk/phase3/includes/api/ApiMain.php
@@ -286,6 +286,7 @@
287287 * $this->setCacheMode('private')
288288 */
289289 public function setCachePrivate() {
 290+ wfDeprecated( __METHOD__, '1.17' );
290291 $this->setCacheMode( 'private' );
291292 }
292293
@@ -314,6 +315,7 @@
315316 * @deprecated since 1.17 Use setCacheMode( 'anon-public-user-private' )
316317 */
317318 public function setVaryCookie() {
 319+ wfDeprecated( __METHOD__, '1.17' );
318320 $this->setCacheMode( 'anon-public-user-private' );
319321 }
320322
Index: trunk/phase3/includes/api/ApiBase.php
@@ -187,6 +187,7 @@
188188 * @return DerivativeContext
189189 */
190190 public function createContext() {
 191+ wfDeprecated( __METHOD__, '1.19' );
191192 return new DerivativeContext( $this->getContext() );
192193 }
193194
@@ -673,6 +674,7 @@
674675 * @return array
675676 */
676677 public static function getValidNamespaces() {
 678+ wfDeprecated( __METHOD__, '1.17' );
677679 return MWNamespace::getValidNamespaces();
678680 }
679681
Index: trunk/phase3/includes/media/Exif.php
@@ -537,7 +537,7 @@
538538 * @deprecated since 1.18
539539 */
540540 function makeFormattedData( ) {
541 - wfDeprecated( __METHOD__ );
 541+ wfDeprecated( __METHOD__, '1.18' );
542542 $this->mFormattedExifData = FormatMetadata::getFormattedData(
543543 $this->mFilteredExifData );
544544 }
@@ -569,7 +569,7 @@
570570 * @deprecated since 1.18
571571 */
572572 function getFormattedData() {
573 - wfDeprecated( __METHOD__ );
 573+ wfDeprecated( __METHOD__, '1.18' );
574574 if (!$this->mFormattedExifData) {
575575 $this->makeFormattedData();
576576 }
Index: trunk/phase3/includes/ChangesList.php
@@ -67,6 +67,7 @@
6868 * @return ChangesList|EnhancedChangesList|OldChangesList derivative
6969 */
7070 public static function newFromUser( $unused ) {
 71+ wfDeprecated( __METHOD__, '1.18' );
7172 return self::newFromContext( RequestContext::getMain() );
7273 }
7374
Index: trunk/phase3/includes/Title.php
@@ -973,6 +973,7 @@
974974 * @deprecated since 1.17
975975 */
976976 public function isValidCssJsSubpage() {
 977+ wfDeprecated( __METHOD__, '1.17' );
977978 return $this->isCssJsSubpage();
978979 }
979980
@@ -1525,6 +1526,7 @@
15261527 * @todo fold these checks into userCan()
15271528 */
15281529 public function userCanRead() {
 1530+ wfDeprecated( __METHOD__, '1.19' );
15291531 return $this->userCan( 'read' );
15301532 }
15311533
@@ -2131,7 +2133,7 @@
21322134 */
21332135 public function userCanEditCssSubpage() {
21342136 global $wgUser;
2135 - wfDeprecated( __METHOD__ );
 2137+ wfDeprecated( __METHOD__, '1.19' );
21362138 return ( ( $wgUser->isAllowedAll( 'editusercssjs', 'editusercss' ) )
21372139 || preg_match( '/^' . preg_quote( $wgUser->getName(), '/' ) . '\//', $this->mTextform ) );
21382140 }
@@ -2145,7 +2147,7 @@
21462148 */
21472149 public function userCanEditJsSubpage() {
21482150 global $wgUser;
2149 - wfDeprecated( __METHOD__ );
 2151+ wfDeprecated( __METHOD__, '1.19' );
21502152 return ( ( $wgUser->isAllowedAll( 'editusercssjs', 'edituserjs' ) )
21512153 || preg_match( '/^' . preg_quote( $wgUser->getName(), '/' ) . '\//', $this->mTextform ) );
21522154 }
Index: trunk/phase3/includes/Block.php
@@ -105,6 +105,7 @@
106106 * @deprecated since 1.18
107107 */
108108 public static function newFromDB( $address, $user = 0 ) {
 109+ wfDeprecated( __METHOD__, '1.18' );
109110 return self::newFromTarget( User::whoIs( $user ), $address );
110111 }
111112
@@ -159,6 +160,7 @@
160161 * @deprecated since 1.18
161162 */
162163 public function clear() {
 164+ wfDeprecated( __METHOD__, '1.18' );
163165 # Noop
164166 }
165167
@@ -171,7 +173,7 @@
172174 * @deprecated since 1.18
173175 */
174176 public function load( $address = '', $user = 0 ) {
175 - wfDeprecated( __METHOD__ );
 177+ wfDeprecated( __METHOD__, '1.18' );
176178 if( $user ){
177179 $username = User::whoIs( $user );
178180 $block = self::newFromTarget( $username, $address );
@@ -807,6 +809,7 @@
808810 * @param $x Bool
809811 */
810812 public function forUpdate( $x = null ) {
 813+ wfDeprecated( __METHOD__, '1.18' );
811814 # noop
812815 }
813816
@@ -895,6 +898,7 @@
896899 * @deprecated since 1.18; use $dbw->encodeExpiry() instead
897900 */
898901 public static function encodeExpiry( $expiry, $db ) {
 902+ wfDeprecated( __METHOD__, '1.18' );
899903 return $db->encodeExpiry( $expiry );
900904 }
901905
@@ -907,6 +911,7 @@
908912 * @deprecated since 1.18; use $wgLang->formatExpiry() instead
909913 */
910914 public static function decodeExpiry( $expiry, $timestampType = TS_MW ) {
 915+ wfDeprecated( __METHOD__, '1.18' );
911916 global $wgContLang;
912917 return $wgContLang->formatExpiry( $expiry, $timestampType );
913918 }
@@ -931,6 +936,7 @@
932937 * @deprecated since 1.18, call IP::sanitizeRange() directly
933938 */
934939 public static function normaliseRange( $range ) {
 940+ wfDeprecated( __METHOD__, '1.18' );
935941 return IP::sanitizeRange( $range );
936942 }
937943
@@ -950,6 +956,7 @@
951957 * @return String
952958 */
953959 public static function infinity() {
 960+ wfDeprecated( __METHOD__, '1.18' );
954961 return wfGetDB( DB_SLAVE )->getInfinity();
955962 }
956963
@@ -961,6 +968,8 @@
962969 * @deprecated since 1.18; use $wgLang->formatExpiry() instead
963970 */
964971 public static function formatExpiry( $encoded_expiry ) {
 972+ wfDeprecated( __METHOD__, '1.18' );
 973+
965974 global $wgContLang;
966975 static $msg = null;
967976
@@ -994,7 +1003,7 @@
9951004 * @deprecated since 1.18 moved to SpecialBlock::parseExpiryInput()
9961005 */
9971006 public static function parseExpiryInput( $expiry ) {
998 - wfDeprecated( __METHOD__ );
 1007+ wfDeprecated( __METHOD__, '1.18' );
9991008 return SpecialBlock::parseExpiryInput( $expiry );
10001009 }
10011010
Index: trunk/phase3/includes/Action.php
@@ -159,6 +159,7 @@
160160 * @return Skin
161161 */
162162 public final function getLang() {
 163+ wfDeprecated( __METHOD__, '1.19' );
163164 return $this->getLanguage();
164165 }
165166
Index: trunk/phase3/includes/ImageGallery.php
@@ -131,7 +131,7 @@
132132 * @deprecated since 1.18 Not used anymore
133133 */
134134 function useSkin( $skin ) {
135 - wfDeprecated( __METHOD__ );
 135+ wfDeprecated( __METHOD__, '1.18' );
136136 /* no op */
137137 }
138138

Follow-up revisions

RevisionCommit summaryAuthorDate
r106005Partly revert r105985 for now: Flooding of translatewiki.net log/channel:...raymond10:36, 13 December 2011
r106006Partly revert r105985 for now: Flooding of translatewiki.net log/channel:...raymond10:40, 13 December 2011
r106008Fix PHP Notice: Use of Title::userCanRead was deprecated in MediaWiki 1.19. [...raymond10:47, 13 December 2011
r106393default deprecation notice limit to 1.17, so 1.18 and 1.19 notices are not sh...jeroendedauw23:40, 15 December 2011

Status & tagging log