Victorbarbu has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/262080

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(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SpellingDictionary 
refs/changes/80/262080/1

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: newchange
Gerrit-Change-Id: I3ebac4563a015535f3ce5ac65863f9af11f6bc79
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SpellingDictionary
Gerrit-Branch: master
Gerrit-Owner: Victorbarbu <victorbarb...@gmail.com>

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

Reply via email to