<commit_before><?php

// namespace SpellingDictionary;

class AdminRights {
	public function displayAllWords() {
		global $wgSpellingDictionaryDatabase;
		$dbr = wfGetDB( DB_SLAVE, array(), $wgSpellingDictionaryDatabase );
		$rows = $dbr->select(
			'spell_dict_word_list',
			'*',
			1,
			__METHOD__
		);
		$result = array();
		$words = '<b>Spelling &nbsp;&nbsp;&nbsp;&nbsp;Language</b><br>';
		foreach ( $rows as $row ) {
			$words .= "<span class = \"spelling\">".$row->sd_word .
			"</span><span class = \"language\">" . $row->sd_language . "</span><br>";
		}
		return $words;
	}

	public function displayByLanguage( $formData ) {
		global $wgSpellingDictionaryDatabase;
		$dbr = wfGetDB( DB_SLAVE, array(), $wgSpellingDictionaryDatabase );
		$rows = $dbr->select(
			'spell_dict_word_list',
			'*',
			array(
				'sd_language' => $formData['language'],
			),
			__METHOD__
		);
		$result = array();
		$words = "";
		foreach ( $rows as $row ) {
			$words .= $row->sd_word . " of language " . $row->sd_language;
			$words .= "\t<a href=''>Edit</a> \t<a href='' id = 'deleteSpelling'>Delete</a> <br>";
		}<commit_msg>Passed the language only as the function parameter<commit_after><?php

// namespace SpellingDictionary;

class AdminRights {
	public function displayAllWords() {
		global $wgSpellingDictionaryDatabase;
		$dbr = wfGetDB( DB_SLAVE, array(), $wgSpellingDictionaryDatabase );
		$rows = $dbr->select(
			'spell_dict_word_list',
			'*',
			1,
			__METHOD__
		);
		$result = array();
		$words = '<b>Spelling &nbsp;&nbsp;&nbsp;&nbsp;Language</b><br>';
		foreach ( $rows as $row ) {
			$words .= "<span class = \"spelling\">".$row->sd_word .
			"&nbsp;&nbsp;&nbsp;&nbsp;" .
			"</span><span class = \"language\">" . $row->sd_language . "</span><br>";
		}
		return $words;
	}

	public function displayByLanguage( $language ) {
		global $wgSpellingDictionaryDatabase;
		$dbr = wfGetDB( DB_SLAVE, array(), $wgSpellingDictionaryDatabase );
		$rows = $dbr->select(
			'spell_dict_word_list',
			'*',
			array(
				'sd_language' => $language,
			),
			__METHOD__
		);
		$result = array();
		$words = "";
		foreach ( $rows as $row ) {
			$words .= $row->sd_word . " of language " . $row->sd_language;
			$words .= "\t<a href=''>Edit</a> \t<a href='' id = 'deleteSpelling'>Delete</a> <br>";
		}
{'fraction_non_alphanumeric': 0.1937309534175011, 'fraction_numerical': 0.0008707009142359599, 'mean_word_length': 3.807531380753138, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '888399', 'n_tokens_mistral': 926, 'n_tokens_neox': 828, 'n_words': 164}