r87579 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87578‎ | r87579 | r87580 >
Date:21:09, 6 May 2011
Author:reedy
Status:ok
Tags:
Comment:
Kill some more long deprecated unused functions

Add more @deprecated since where appropriate
Modified paths:
  • /trunk/phase3/includes/Revision.php (modified) (history)
  • /trunk/phase3/includes/SiteStats.php (modified) (history)
  • /trunk/phase3/includes/WikiError.php (modified) (history)
  • /trunk/phase3/includes/db/Database.php (modified) (history)
  • /trunk/phase3/includes/filerepo/File.php (modified) (history)
  • /trunk/phase3/includes/media/Exif.php (modified) (history)
  • /trunk/phase3/includes/media/FormatMetadata.php (modified) (history)
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)
  • /trunk/phase3/includes/parser/ParserOptions.php (modified) (history)
  • /trunk/phase3/languages/Language.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SiteStats.php
@@ -100,14 +100,6 @@
101101 }
102102
103103 /**
104 - * @deprecated Use self::numberingroup('sysop') instead
105 - */
106 - static function admins() {
107 - wfDeprecated(__METHOD__);
108 - return self::numberingroup( 'sysop' );
109 - }
110 -
111 - /**
112104 * Find the number of users in a given user group.
113105 * @param $group String: name of group
114106 * @return Integer
Index: trunk/phase3/includes/parser/Parser.php
@@ -802,15 +802,6 @@
803803 }
804804
805805 /**
806 - * Interface with html tidy
807 - * @deprecated Use MWTidy::tidy()
808 - */
809 - public static function tidy( $text ) {
810 - wfDeprecated( __METHOD__ );
811 - return MWTidy::tidy( $text );
812 - }
813 -
814 - /**
815806 * parse the wiki syntax used to render tables
816807 *
817808 * @private
Index: trunk/phase3/includes/parser/ParserOptions.php
@@ -93,7 +93,7 @@
9494 /**
9595 * @param $title Title
9696 * @return Skin
97 - * @deprecated Use Linker::* instead
 97+ * @deprecated since 1.18 Use Linker::* instead
9898 */
9999 function getSkin( $title = null ) {
100100 wfDeprecated( __METHOD__ );
Index: trunk/phase3/includes/db/Database.php
@@ -521,7 +521,7 @@
522522
523523 /**
524524 * Same as new DatabaseMysql( ... ), kept for backward compatibility
525 - * @deprecated
 525+ * @deprecated since 1.17
526526 */
527527 static function newFromParams( $server, $user, $password, $dbName, $flags = 0 ) {
528528 wfDeprecated( __METHOD__ );
@@ -1769,7 +1769,7 @@
17701770 * Backwards compatibility, identifier quoting originated in DatabasePostgres
17711771 * which used quote_ident which does not follow our naming conventions
17721772 * was renamed to addIdentifierQuotes.
1773 - * @deprecated use addIdentifierQuotes
 1773+ * @deprecated since 1.18 use addIdentifierQuotes
17741774 */
17751775 function quote_ident( $s ) {
17761776 wfDeprecated( __METHOD__ );
@@ -1780,7 +1780,7 @@
17811781 * Escape string for safe LIKE usage.
17821782 * WARNING: you should almost never use this function directly,
17831783 * instead use buildLike() that escapes everything automatically
1784 - * Deprecated in 1.17, warnings in 1.17, removed in ???
 1784+ * @deprecated since 1.17, warnings in 1.17, removed in ???
17851785 */
17861786 public function escapeLike( $s ) {
17871787 wfDeprecated( __METHOD__ );
@@ -2307,24 +2307,6 @@
23082308 }
23092309
23102310 /**
2311 - * Begin a transaction, committing any previously open transaction
2312 - * @deprecated use begin()
2313 - */
2314 - function immediateBegin( $fname = 'DatabaseBase::immediateBegin' ) {
2315 - wfDeprecated( __METHOD__ );
2316 - $this->begin();
2317 - }
2318 -
2319 - /**
2320 - * Commit transaction, if one is open
2321 - * @deprecated use commit()
2322 - */
2323 - function immediateCommit( $fname = 'DatabaseBase::immediateCommit' ) {
2324 - wfDeprecated( __METHOD__ );
2325 - $this->commit();
2326 - }
2327 -
2328 - /**
23292311 * Creates a new table with structure copied from existing table
23302312 * Note that unlike most database abstraction functions, this function does not
23312313 * automatically append database prefix, because it works at a lower
Index: trunk/phase3/includes/filerepo/File.php
@@ -242,7 +242,7 @@
243243 /**
244244 * Alias for getPath()
245245 *
246 - * @deprecated Use getPath().
 246+ * @deprecated since 1.18 Use getPath().
247247 */
248248 public function getFullPath() {
249249 wfDeprecated( __METHOD__ );
@@ -905,47 +905,6 @@
906906 $this->readOnlyError();
907907 }
908908
909 - /**
910 - * Get an array of Title objects which are articles which use this file
911 - * Also adds their IDs to the link cache
912 - *
913 - * This is mostly copied from Title::getLinksTo()
914 - *
915 - * @deprecated Use HTMLCacheUpdate, this function uses too much memory
916 - */
917 - function getLinksTo( $options = array() ) {
918 - wfDeprecated( __METHOD__ );
919 - wfProfileIn( __METHOD__ );
920 -
921 - // Note: use local DB not repo DB, we want to know local links
922 - if ( count( $options ) > 0 ) {
923 - $db = wfGetDB( DB_MASTER );
924 - } else {
925 - $db = wfGetDB( DB_SLAVE );
926 - }
927 - $linkCache = LinkCache::singleton();
928 -
929 - $encName = $db->addQuotes( $this->getName() );
930 - $res = $db->select( array( 'page', 'imagelinks'),
931 - array( 'page_namespace', 'page_title', 'page_id', 'page_len', 'page_is_redirect', 'page_latest' ),
932 - array( 'page_id=il_from', 'il_to' => $encName ),
933 - __METHOD__,
934 - $options );
935 -
936 - $retVal = array();
937 - if ( $db->numRows( $res ) ) {
938 - foreach ( $res as $row ) {
939 - $titleObj = Title::newFromRow( $row );
940 - if ( $titleObj ) {
941 - $linkCache->addGoodLinkObj( $row->page_id, $titleObj, $row->page_len, $row->page_is_redirect, $row->page_latest );
942 - $retVal[] = $titleObj;
943 - }
944 - }
945 - }
946 - wfProfileOut( __METHOD__ );
947 - return $retVal;
948 - }
949 -
950909 function formatMetadata() {
951910 if ( !$this->getHandler() ) {
952911 return false;
Index: trunk/phase3/includes/media/FormatMetadata.php
@@ -1336,7 +1336,7 @@
13371337 /** For compatability with old FormatExif class
13381338 * which some extensions use.
13391339 *
1340 - *@deprecated
 1340+ * @deprecated since 1.18
13411341 *
13421342 **/
13431343 class FormatExif {
Index: trunk/phase3/includes/media/Exif.php
@@ -510,6 +510,8 @@
511511 /**
512512 * Use FormatMetadata to create formatted values for display to user
513513 * (is this ever used?)
 514+ *
 515+ * @deprecated since 1.18
514516 */
515517 function makeFormattedData( ) {
516518 wfDeprecated( __METHOD__ );
@@ -540,6 +542,8 @@
541543 *
542544 * This returns the data for display to user.
543545 * Its unclear if this is ever used.
 546+ *
 547+ * @deprecated since 1.18
544548 */
545549 function getFormattedData() {
546550 wfDeprecated( __METHOD__ );
Index: trunk/phase3/includes/Revision.php
@@ -602,7 +602,7 @@
603603 /**
604604 * Alias for getText(Revision::FOR_THIS_USER)
605605 *
606 - * @deprecated
 606+ * @deprecated since 1.17
607607 * @return String
608608 */
609609 public function revText() {
Index: trunk/phase3/includes/WikiError.php
@@ -31,6 +31,8 @@
3232 class WikiError {
3333 /**
3434 * @param $message string
 35+ *
 36+ * @deprecated since 1.17
3537 */
3638 function __construct( $message ) {
3739 wfDeprecated( __METHOD__ );
@@ -59,6 +61,8 @@
6062 *
6163 * @param $object mixed
6264 * @return bool
 65+ *
 66+ * @deprecated since 1.17
6367 */
6468 public static function isError( $object ) {
6569 wfDeprecated( __METHOD__ );
@@ -80,6 +84,8 @@
8185 /**
8286 * @param $message String: wiki message name
8387 * @param ... parameters to pass to wfMsg()
 88+ *
 89+ * @deprecated since 1.17
8490 */
8591 function __construct( $message/*, ... */ ) {
8692 wfDeprecated( __METHOD__ );
@@ -110,6 +116,8 @@
111117 * @param $message string
112118 * @param $context
113119 * @param $offset Int
 120+ *
 121+ * @deprecated since 1.17
114122 */
115123 function __construct( $parser, $message = 'XML parsing error', $context = null, $offset = 0 ) {
116124 wfDeprecated( __METHOD__ );
Index: trunk/phase3/languages/Language.php
@@ -264,15 +264,6 @@
265265 */
266266 function initContLang() { }
267267
268 - /**
269 - * @deprecated Use User::getDefaultOptions()
270 - * @return array
271 - */
272 - function getDefaultUserOptions() {
273 - wfDeprecated( __METHOD__ );
274 - return User::getDefaultOptions();
275 - }
276 -
277268 function getFallbackLanguageCode() {
278269 if ( $this->mCode === 'en' ) {
279270 return false;

Status & tagging log