TTO has submitted this change and it was merged.

Change subject: Change methods in class AdminRights to be static
......................................................................


Change methods in class AdminRights to be static

Bug: T122761
Change-Id: I3ebac4563a015535f3ce5ac65863f9af11f6bc79
---
M includes/AdminRights.php
1 file changed, 3 insertions(+), 4 deletions(-)

Approvals:
  TTO: Verified; Looks good to me, approved



diff --git a/includes/AdminRights.php b/includes/AdminRights.php
index 1efed4c..b1594ab 100644
--- a/includes/AdminRights.php
+++ b/includes/AdminRights.php
@@ -3,7 +3,7 @@
 // namespace SpellingDictionary;
 
 class AdminRights {
-       public function displayAllWords() {
+       public static function displayAllWords() {
                global $wgSpellingDictionaryDatabase;
                $dbr = wfGetDB( DB_SLAVE, array(), 
$wgSpellingDictionaryDatabase );
                $rows = $dbr->select(
@@ -22,7 +22,7 @@
                return $words;
        }
 
-       public function displayByLanguage( $language ) {
+       public static function displayByLanguage( $language ) {
                global $wgSpellingDictionaryDatabase;
                $dbr = wfGetDB( DB_SLAVE, array(), 
$wgSpellingDictionaryDatabase );
                $rows = $dbr->select(
@@ -33,7 +33,6 @@
                        ),
                        __METHOD__
                );
-               $result = array();
                $words = "";
                foreach ( $rows as $row ) {
                        $words .= $row->sd_word . " of language " . 
$row->sd_language;
@@ -42,7 +41,7 @@
                return $words;
        }
 
-       public function deleteSpelling( $spelling ) {
+       public static function deleteSpelling( $spelling ) {
                global $wgSpellingDictionaryDatabase;
                $dbr = wfGetDB( DB_SLAVE, array(), 
$wgSpellingDictionaryDatabase );
                $rows = $dbr->delete(

-- 
To view, visit https://gerrit.wikimedia.org/r/262080
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3ebac4563a015535f3ce5ac65863f9af11f6bc79
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/SpellingDictionary
Gerrit-Branch: master
Gerrit-Owner: Victorbarbu <victorbarb...@gmail.com>
Gerrit-Reviewer: Ankitashukla <ankitashukla...@gmail.com>
Gerrit-Reviewer: TTO <at.li...@live.com.au>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to