r93403 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93402‎ | r93403 | r93404 >
Date:17:47, 28 July 2011
Author:kipcool
Status:deferred
Tags:
Comment:
removed unused function
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/languages.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/languages.php
@@ -85,7 +85,10 @@
8686
8787 }
8888
89 -/* Return SQL query string for fetching language names. */
 89+/**
 90+ * Returns a SQL query string for fetching language names in a given language.
 91+ * @param $lang_code the language in which to retrieve the language names
 92+ **/
9093 function getSQLForLanguageNames( $lang_code ) {
9194 /* Use a simpler query if the user's language is English. */
9295 /* getLanguageIdForCode( 'en' ) = 85 */
@@ -104,15 +107,3 @@
105108 ' AND language_id NOT IN ( SELECT language_id FROM language_names WHERE name_language_id = ' . $lang_id .
106109 ' ) ) ' ;
107110 }
108 -
109 -function getLanguageIdForName( $name ) {
110 - $dbr = wfGetDB( DB_SLAVE );
111 - $queryResult = $dbr->query( "SELECT language_id FROM language_names WHERE language_name=" . $dbr->addQuotes( $name ) );
112 -
113 - if ( $languageId = $dbr->fetchObject( $queryResult ) )
114 - return $languageId->language_id;
115 - else
116 - return 0;
117 -}
118 -
119 -

Status & tagging log