diff options
Diffstat (limited to 'MLEB/Translate/api/ApiTranslationReview.php')
-rw-r--r-- | MLEB/Translate/api/ApiTranslationReview.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/MLEB/Translate/api/ApiTranslationReview.php b/MLEB/Translate/api/ApiTranslationReview.php index fcdd7ffb..3ed2a4da 100644 --- a/MLEB/Translate/api/ApiTranslationReview.php +++ b/MLEB/Translate/api/ApiTranslationReview.php @@ -36,19 +36,19 @@ class ApiTranslationReview extends ApiBase { break; case 'permissiondenied': $this->dieWithError( 'apierror-permissiondenied-generic', 'permissiondenied' ); - break; // Unreachable, but throws off code analyzer. + // dieWithError prevents continuation case 'blocked': $this->dieBlocked( $this->getUser()->getBlock() ); - break; // Unreachable, but throws off code analyzer. + // dieBlocked prevents continuation case 'unknownmessage': $this->dieWithError( 'apierror-translate-unknownmessage', $error ); - break; // Unreachable, but throws off code analyzer. + // dieWithError prevents continuation case 'owntranslation': $this->dieWithError( 'apierror-translate-owntranslation', $error ); - break; // Unreachable, but throws off code analyzer. + // dieWithError prevents continuation case 'fuzzymessage': $this->dieWithError( 'apierror-translate-fuzzymessage', $error ); - break; // Unreachable, but throws off code analyzer. + // dieWithError prevents continuation default: $this->dieWithError( [ 'apierror-unknownerror', $error ], $error ); } @@ -78,7 +78,7 @@ class ApiTranslationReview extends ApiBase { * @return bool whether the action was recorded. */ public static function doReview( User $user, RevisionRecord $revRecord, $comment = null ) { - $dbw = wfGetDB( DB_MASTER ); + $dbw = wfGetDB( DB_PRIMARY ); $table = 'translate_reviews'; $row = [ 'trr_user' => $user->getId(), |