Index: trunk/extensions/Translate/api/ApiTranslationReview.php |
— | — | @@ -14,6 +14,7 @@ |
15 | 15 | */ |
16 | 16 | class ApiTranslationReview extends ApiBase { |
17 | 17 | protected static $right = 'translate-messagereview'; |
| 18 | + protected static $salt = 'translate-messagereview'; |
18 | 19 | |
19 | 20 | public function execute() { |
20 | 21 | global $wgUser; |
— | — | @@ -77,7 +78,7 @@ |
78 | 79 | } |
79 | 80 | |
80 | 81 | public function getTokenSalt() { |
81 | | - return 'translate-messagereview'; |
| 82 | + return self::$salt; |
82 | 83 | } |
83 | 84 | |
84 | 85 | public function getAllowedParams() { |
— | — | @@ -136,7 +137,7 @@ |
137 | 138 | return $cachedToken; |
138 | 139 | } |
139 | 140 | |
140 | | - $cachedToken = $wgUser->editToken( $this->getTokenSalt() ); |
| 141 | + $cachedToken = $wgUser->editToken( self::$salt ); |
141 | 142 | return $cachedToken; |
142 | 143 | } |
143 | 144 | |
Index: trunk/extensions/Translate/api/ApiGroupReview.php |
— | — | @@ -14,6 +14,7 @@ |
15 | 15 | */ |
16 | 16 | class ApiGroupReview extends ApiBase { |
17 | 17 | protected static $right = 'translate-groupreview'; |
| 18 | + protected static $salt = 'translate-groupreview'; |
18 | 19 | |
19 | 20 | public function execute() { |
20 | 21 | global $wgUser, $wgTranslateWorkflowStates; |
— | — | @@ -71,7 +72,7 @@ |
72 | 73 | } |
73 | 74 | |
74 | 75 | public function getTokenSalt() { |
75 | | - return 'translate-groupreview'; |
| 76 | + return self::$salt; |
76 | 77 | } |
77 | 78 | |
78 | 79 | public function getAllowedParams() { |
— | — | @@ -142,7 +143,7 @@ |
143 | 144 | return $cachedToken; |
144 | 145 | } |
145 | 146 | |
146 | | - $cachedToken = $wgUser->editToken( $this->getTokenSalt() ); |
| 147 | + $cachedToken = $wgUser->editToken( self::$salt ); |
147 | 148 | return $cachedToken; |
148 | 149 | } |
149 | 150 | |