Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/219475
Change subject: Fix phpcs warnnings ...................................................................... Fix phpcs warnnings Change-Id: Ifcde58dea9c63e05d8072e9a2635b915ee1f9062 --- M api/ApiContentTranslationConfiguration.php M api/ApiContentTranslationPublish.php M api/ApiQueryContentTranslation.php M includes/Stats.php M includes/Translation.php M includes/Translator.php M modules/stats/ext.cx.stats.js M specials/SpecialContentTranslation.php 8 files changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/75/219475/1 diff --git a/api/ApiContentTranslationConfiguration.php b/api/ApiContentTranslationConfiguration.php index 1402978..af82a52 100644 --- a/api/ApiContentTranslationConfiguration.php +++ b/api/ApiContentTranslationConfiguration.php @@ -18,7 +18,7 @@ $params = $this->extractRequestParams(); $source = $params['from']; $target = $params['to']; - if ( !Language::isValidBuiltInCode( $source ) || !Language::isValidBuiltInCode( $target ) ) { + if ( !Language::isValidBuiltInCode( $source ) || !Language::isValidBuiltInCode( $target ) ) { $this->dieUsage( 'Invalid language', 'invalidlanguage' ); } // Read common configuraiton diff --git a/api/ApiContentTranslationPublish.php b/api/ApiContentTranslationPublish.php index 740ddc6..113353c 100755 --- a/api/ApiContentTranslationPublish.php +++ b/api/ApiContentTranslationPublish.php @@ -283,7 +283,7 @@ $cxtranslation = new ContentTranslation\Translation( $translation ); $cxtranslation->save(); $translationId = $cxtranslation->getTranslationId(); - $translator->addTranslation( $translationId ); + $translator->addTranslation( $translationId ); if ( $params['status'] === 'draft' ) { // Save the draft ContentTranslation\Draft::save( $translationId, $params['html'] ); diff --git a/api/ApiQueryContentTranslation.php b/api/ApiQueryContentTranslation.php index 55bb5d0..2b56614 100644 --- a/api/ApiQueryContentTranslation.php +++ b/api/ApiQueryContentTranslation.php @@ -56,7 +56,7 @@ $translation->translation ); } else { - $this->dieUsage( 'Draft does not exist', $params['translationid'] ); + $this->dieUsage( 'Draft does not exist', $params['translationid'] ); } } else { $translator = new ContentTranslation\Translator( $user ); diff --git a/includes/Stats.php b/includes/Stats.php index 3b92812..21c5e82 100644 --- a/includes/Stats.php +++ b/includes/Stats.php @@ -34,7 +34,7 @@ 'ct_params', 'rev_user', ), - array ( + array( 'ct_tag' => 'contenttranslation', 'rev_id = ct_rev_id', 'rev_page = page_id', diff --git a/includes/Translation.php b/includes/Translation.php index ff2486e..0eedb85 100644 --- a/includes/Translation.php +++ b/includes/Translation.php @@ -338,7 +338,7 @@ $conditions['translation_target_language'] = $to; } - $options = array ( 'LIMIT' => $limit ); + $options = array( 'LIMIT' => $limit ); if ( $offset ) { $options['OFFSET'] = $offset; diff --git a/includes/Translator.php b/includes/Translator.php index 4dcdd88..1372625 100644 --- a/includes/Translator.php +++ b/includes/Translator.php @@ -31,7 +31,7 @@ $dbw = Database::getConnection( DB_MASTER ); $dbw->delete( 'cx_translators', - array( 'translator_translation_id' => $translationId ), + array( 'translator_translation_id' => $translationId ), __METHOD__ ); } diff --git a/modules/stats/ext.cx.stats.js b/modules/stats/ext.cx.stats.js index 12d93ed..ea25254 100644 --- a/modules/stats/ext.cx.stats.js +++ b/modules/stats/ext.cx.stats.js @@ -34,7 +34,7 @@ this.$highlights = $( '<div>' ).addClass( 'cx-stats-highlights' ); this.$graph = $( '<canvas>' ).attr( { id: 'cxtrend', - width: this.$container.width() - 100, // Leave a 100px margin at right + width: this.$container.width() - 200, // Leave a 200px margin buffer to avoid overflow height: 400 } ); diff --git a/specials/SpecialContentTranslation.php b/specials/SpecialContentTranslation.php index 1fdb2a5..dee45d9 100644 --- a/specials/SpecialContentTranslation.php +++ b/specials/SpecialContentTranslation.php @@ -36,7 +36,7 @@ public function isValidCampaign( $campaign ) { global $wgContentTranslationCampaigns; - if ( $this->getUser()->isAnon() ) { + if ( $this->getUser()->isAnon() ) { // Campigns are only for logged in users. return false; } -- To view, visit https://gerrit.wikimedia.org/r/219475 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifcde58dea9c63e05d8072e9a2635b915ee1f9062 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Paladox <thomasmulhall...@yahoo.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits