[MediaWiki-commits] [Gerrit] mediawiki...DataTransfer[master]: Removed now-unnecessary support for MW < 1.21

2018-01-08 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/402833 )

Change subject: Removed now-unnecessary support for MW < 1.21
..


Removed now-unnecessary support for MW < 1.21

Change-Id: I5b0faf5219070eb48fbb5c2f7f399658759215ec
---
M specials/DT_ImportCSV.php
M specials/DT_ImportXML.php
2 files changed, 4 insertions(+), 12 deletions(-)

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



diff --git a/specials/DT_ImportCSV.php b/specials/DT_ImportCSV.php
index 71c5651..ec8c4d4 100644
--- a/specials/DT_ImportCSV.php
+++ b/specials/DT_ImportCSV.php
@@ -204,12 +204,8 @@
$jobParams['text'] = $page->createText();
$jobs[] = new DTImportJob( $title, $jobParams );
}
-   // MW 1.21+
-   if ( class_exists( 'JobQueueGroup' ) ) {
-   JobQueueGroup::singleton()->push( $jobs );
-   } else {
-   Job::batchInsert( $jobs );
-   }
+   JobQueueGroup::singleton()->push( $jobs );
+
$text .= $this->msg( 'dt_import_success' )->numParams( count( 
$jobs ) )->params( $this->getFiletype() )->parseAsBlock();
 
return $text;
diff --git a/specials/DT_ImportXML.php b/specials/DT_ImportXML.php
index 20bda5e..42f7d14 100644
--- a/specials/DT_ImportXML.php
+++ b/specials/DT_ImportXML.php
@@ -64,12 +64,8 @@
$job_params['text'] = $page->createText();
$jobs[] = new DTImportJob( $title, $job_params );
}
-   // MW 1.21+
-   if ( class_exists( 'JobQueueGroup' ) ) {
-   JobQueueGroup::singleton()->push( $jobs );
-   } else {
-   Job::batchInsert( $jobs );
-   }
+   JobQueueGroup::singleton()->push( $jobs );
+
$text .= $this->msg( 'dt_import_success' )->numParams( count( 
$jobs ) )->params( 'XML' )
->parseAsBlock();
return $text;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5b0faf5219070eb48fbb5c2f7f399658759215ec
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/DataTransfer
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...DataTransfer[master]: Removed now-unnecessary support for MW < 1.21

2018-01-08 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402833 )

Change subject: Removed now-unnecessary support for MW < 1.21
..

Removed now-unnecessary support for MW < 1.21

Change-Id: I5b0faf5219070eb48fbb5c2f7f399658759215ec
---
M specials/DT_ImportCSV.php
M specials/DT_ImportXML.php
2 files changed, 4 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataTransfer 
refs/changes/33/402833/2

diff --git a/specials/DT_ImportCSV.php b/specials/DT_ImportCSV.php
index 71c5651..ec8c4d4 100644
--- a/specials/DT_ImportCSV.php
+++ b/specials/DT_ImportCSV.php
@@ -204,12 +204,8 @@
$jobParams['text'] = $page->createText();
$jobs[] = new DTImportJob( $title, $jobParams );
}
-   // MW 1.21+
-   if ( class_exists( 'JobQueueGroup' ) ) {
-   JobQueueGroup::singleton()->push( $jobs );
-   } else {
-   Job::batchInsert( $jobs );
-   }
+   JobQueueGroup::singleton()->push( $jobs );
+
$text .= $this->msg( 'dt_import_success' )->numParams( count( 
$jobs ) )->params( $this->getFiletype() )->parseAsBlock();
 
return $text;
diff --git a/specials/DT_ImportXML.php b/specials/DT_ImportXML.php
index 20bda5e..42f7d14 100644
--- a/specials/DT_ImportXML.php
+++ b/specials/DT_ImportXML.php
@@ -64,12 +64,8 @@
$job_params['text'] = $page->createText();
$jobs[] = new DTImportJob( $title, $job_params );
}
-   // MW 1.21+
-   if ( class_exists( 'JobQueueGroup' ) ) {
-   JobQueueGroup::singleton()->push( $jobs );
-   } else {
-   Job::batchInsert( $jobs );
-   }
+   JobQueueGroup::singleton()->push( $jobs );
+
$text .= $this->msg( 'dt_import_success' )->numParams( count( 
$jobs ) )->params( 'XML' )
->parseAsBlock();
return $text;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b0faf5219070eb48fbb5c2f7f399658759215ec
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/DataTransfer
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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