[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: build: Updating mediawiki/mediawiki-codesniffer to 13.0.0

2017-09-24 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/380262 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 13.0.0
..


build: Updating mediawiki/mediawiki-codesniffer to 13.0.0

Change-Id: Icf43e41e3252a4b796408aa413629846e689ad7e
---
M ApiTranscodeReset.php
M SpecialOrphanedTimedText.php
M SpecialTimedMediaHandler.php
M TimedMediaHandler.hooks.php
M WebVideoTranscode/WebVideoTranscode.php
M composer.json
M maintenance/requeueTranscodes.php
7 files changed, 8 insertions(+), 10 deletions(-)

Approvals:
  Umherirrender: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ApiTranscodeReset.php b/ApiTranscodeReset.php
index e691ec4..9a0e05b 100644
--- a/ApiTranscodeReset.php
+++ b/ApiTranscodeReset.php
@@ -142,7 +142,7 @@
 */
public static function getStateResetTime( $state ) {
global $wgWaitTimeForTranscodeReset;
-   $db = wfGetDB( DB_SLAVE );
+   $db = wfGetDB( DB_REPLICA );
// if an error return waitTime +1
if ( !is_null( $state['time_error'] ) ) {
return $wgWaitTimeForTranscodeReset + 1;
diff --git a/SpecialOrphanedTimedText.php b/SpecialOrphanedTimedText.php
index 4420176..d651a74 100644
--- a/SpecialOrphanedTimedText.php
+++ b/SpecialOrphanedTimedText.php
@@ -86,7 +86,7 @@
 * @return bool
 */
private function canExecuteQuery() {
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
return $dbr->getType() === 'mysql';
}
 
diff --git a/SpecialTimedMediaHandler.php b/SpecialTimedMediaHandler.php
index 1622090..99a3b67 100644
--- a/SpecialTimedMediaHandler.php
+++ b/SpecialTimedMediaHandler.php
@@ -110,7 +110,7 @@
$memcKey = wfMemcKey( 'TimedMediaHandler', 'files', $state );
$files = $wgMemc->get( $memcKey );
if ( !$files ) {
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$files = [];
$res = $dbr->select(
'transcode',
@@ -160,7 +160,7 @@
$memcKey = wfMemcKey( 'TimedMediaHandler', 'stats', '1' /* 
version */ );
$stats = $wgMemc->get( $memcKey );
if ( !$stats ) {
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$stats = [];
$stats[ 'videos' ] = [ 'total' => 0 ];
foreach ( $this->formats as $format => $condition ) {
@@ -193,7 +193,7 @@
$memcKey = wfMemcKey( 'TimedMediaHandler', 'states' );
$states = $wgMemc->get( $memcKey );
if ( !$states ) {
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$states = [];
$states[ 'transcodes' ] = [ 'total' => 0 ];
foreach ( $this->transcodeStates as $state => 
$condition ) {
diff --git a/TimedMediaHandler.hooks.php b/TimedMediaHandler.hooks.php
index dea2239..7c8cfbc 100644
--- a/TimedMediaHandler.hooks.php
+++ b/TimedMediaHandler.hooks.php
@@ -1,7 +1,5 @@
 select(
[ 'imagelinks', 'page' ],
[ 'page_namespace', 'page_title' ],
diff --git a/composer.json b/composer.json
index ae9e9ee..1ba520c 100644
--- a/composer.json
+++ b/composer.json
@@ -4,7 +4,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.12.0",
+   "mediawiki/mediawiki-codesniffer": "13.0.0",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/maintenance/requeueTranscodes.php 
b/maintenance/requeueTranscodes.php
index c90f93e..1606b1e 100644
--- a/maintenance/requeueTranscodes.php
+++ b/maintenance/requeueTranscodes.php
@@ -28,7 +28,7 @@
 
public function execute() {
$this->output( "Cleanup transcodes:\n" );
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$types = [];
if ( $this->hasOption( 'audio' ) ) {
$types[] = 'AUDIO';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icf43e41e3252a4b796408aa413629846e689ad7e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>


[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: build: Updating mediawiki/mediawiki-codesniffer to 13.0.0

2017-09-23 Thread Libraryupgrader (Code Review)
Libraryupgrader has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/380262 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 13.0.0
..

build: Updating mediawiki/mediawiki-codesniffer to 13.0.0

Change-Id: Icf43e41e3252a4b796408aa413629846e689ad7e
---
M ApiTranscodeReset.php
M SpecialOrphanedTimedText.php
M SpecialTimedMediaHandler.php
M TimedMediaHandler.hooks.php
M WebVideoTranscode/WebVideoTranscode.php
M composer.json
M maintenance/requeueTranscodes.php
7 files changed, 8 insertions(+), 9 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler 
refs/changes/62/380262/1

diff --git a/ApiTranscodeReset.php b/ApiTranscodeReset.php
index e691ec4..9a0e05b 100644
--- a/ApiTranscodeReset.php
+++ b/ApiTranscodeReset.php
@@ -142,7 +142,7 @@
 */
public static function getStateResetTime( $state ) {
global $wgWaitTimeForTranscodeReset;
-   $db = wfGetDB( DB_SLAVE );
+   $db = wfGetDB( DB_REPLICA );
// if an error return waitTime +1
if ( !is_null( $state['time_error'] ) ) {
return $wgWaitTimeForTranscodeReset + 1;
diff --git a/SpecialOrphanedTimedText.php b/SpecialOrphanedTimedText.php
index 4420176..d651a74 100644
--- a/SpecialOrphanedTimedText.php
+++ b/SpecialOrphanedTimedText.php
@@ -86,7 +86,7 @@
 * @return bool
 */
private function canExecuteQuery() {
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
return $dbr->getType() === 'mysql';
}
 
diff --git a/SpecialTimedMediaHandler.php b/SpecialTimedMediaHandler.php
index 1622090..99a3b67 100644
--- a/SpecialTimedMediaHandler.php
+++ b/SpecialTimedMediaHandler.php
@@ -110,7 +110,7 @@
$memcKey = wfMemcKey( 'TimedMediaHandler', 'files', $state );
$files = $wgMemc->get( $memcKey );
if ( !$files ) {
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$files = [];
$res = $dbr->select(
'transcode',
@@ -160,7 +160,7 @@
$memcKey = wfMemcKey( 'TimedMediaHandler', 'stats', '1' /* 
version */ );
$stats = $wgMemc->get( $memcKey );
if ( !$stats ) {
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$stats = [];
$stats[ 'videos' ] = [ 'total' => 0 ];
foreach ( $this->formats as $format => $condition ) {
@@ -193,7 +193,7 @@
$memcKey = wfMemcKey( 'TimedMediaHandler', 'states' );
$states = $wgMemc->get( $memcKey );
if ( !$states ) {
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$states = [];
$states[ 'transcodes' ] = [ 'total' => 0 ];
foreach ( $this->transcodeStates as $state => 
$condition ) {
diff --git a/TimedMediaHandler.hooks.php b/TimedMediaHandler.hooks.php
index dea2239..0c3478c 100644
--- a/TimedMediaHandler.hooks.php
+++ b/TimedMediaHandler.hooks.php
@@ -1,6 +1,5 @@
 select(
[ 'imagelinks', 'page' ],
[ 'page_namespace', 'page_title' ],
diff --git a/composer.json b/composer.json
index ae9e9ee..1ba520c 100644
--- a/composer.json
+++ b/composer.json
@@ -4,7 +4,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.12.0",
+   "mediawiki/mediawiki-codesniffer": "13.0.0",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/maintenance/requeueTranscodes.php 
b/maintenance/requeueTranscodes.php
index c90f93e..1606b1e 100644
--- a/maintenance/requeueTranscodes.php
+++ b/maintenance/requeueTranscodes.php
@@ -28,7 +28,7 @@
 
public function execute() {
$this->output( "Cleanup transcodes:\n" );
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$types = [];
if ( $this->hasOption( 'audio' ) ) {
$types[] = 'AUDIO';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf43e41e3252a4b796408aa413629846e689ad7e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader 

___
MediaWiki-commits mailing list