Index: trunk/extensions/Wikidata/OmegaWiki/languages.php |
— | — | @@ -85,7 +85,10 @@ |
86 | 86 | |
87 | 87 | } |
88 | 88 | |
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 | + **/ |
90 | 93 | function getSQLForLanguageNames( $lang_code ) { |
91 | 94 | /* Use a simpler query if the user's language is English. */ |
92 | 95 | /* getLanguageIdForCode( 'en' ) = 85 */ |
— | — | @@ -104,15 +107,3 @@ |
105 | 108 | ' AND language_id NOT IN ( SELECT language_id FROM language_names WHERE name_language_id = ' . $lang_id . |
106 | 109 | ' ) ) ' ; |
107 | 110 | } |
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 | | - |