aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance
diff options
context:
space:
mode:
authorTim Starling <tstarling@wikimedia.org>2021-06-24 16:20:43 +1000
committerTim Starling <tstarling@wikimedia.org>2021-06-24 16:21:53 +1000
commit855593d2037c660630cd7b45e20ec708815718c2 (patch)
tree7772e11c9df9c3f29f78246add465fe0ef460c95 /maintenance
parent47d70dbfbae83827169bf39a21c8d32541dd94e6 (diff)
downloadmediawikicore-855593d2037c660630cd7b45e20ec708815718c2.tar.gz
mediawikicore-855593d2037c660630cd7b45e20ec708815718c2.zip
Factor out LoggedUpdateMaintenance::setForce()
It's logically part of LoggedUpdateMaintenance. There are two copies already, and I was considering adding a third. Change-Id: Ib3686cb3d408a017cd17cde624df71edb379f07e
Diffstat (limited to 'maintenance')
-rw-r--r--maintenance/includes/LoggedUpdateMaintenance.php8
-rw-r--r--maintenance/migrateArchiveText.php8
-rw-r--r--maintenance/migrateImageCommentTemp.php8
3 files changed, 8 insertions, 16 deletions
diff --git a/maintenance/includes/LoggedUpdateMaintenance.php b/maintenance/includes/LoggedUpdateMaintenance.php
index 9700bbefb346..1b872425c6cc 100644
--- a/maintenance/includes/LoggedUpdateMaintenance.php
+++ b/maintenance/includes/LoggedUpdateMaintenance.php
@@ -52,6 +52,14 @@ abstract class LoggedUpdateMaintenance extends Maintenance {
}
/**
+ * Sets whether a run of this maintenance script has the force parameter set
+ * @param bool $forced
+ */
+ public function setForce( $forced = true ) {
+ $this->mOptions['force'] = $forced;
+ }
+
+ /**
* Message to show that the update was done already and was just skipped
* @return string
*/
diff --git a/maintenance/migrateArchiveText.php b/maintenance/migrateArchiveText.php
index 7577ec5e958d..bb1c28c91ff0 100644
--- a/maintenance/migrateArchiveText.php
+++ b/maintenance/migrateArchiveText.php
@@ -44,14 +44,6 @@ class MigrateArchiveText extends LoggedUpdateMaintenance {
);
}
- /**
- * Sets whether a run of this maintenance script has the force parameter set
- * @param bool $forced
- */
- public function setForce( $forced = true ) {
- $this->mOptions['force'] = $forced;
- }
-
protected function getUpdateKey() {
return __CLASS__;
}
diff --git a/maintenance/migrateImageCommentTemp.php b/maintenance/migrateImageCommentTemp.php
index 52c370a74243..f8b45058db1d 100644
--- a/maintenance/migrateImageCommentTemp.php
+++ b/maintenance/migrateImageCommentTemp.php
@@ -37,14 +37,6 @@ class MigrateImageCommentTemp extends LoggedUpdateMaintenance {
);
}
- /**
- * Sets whether a run of this maintenance script has the force parameter set
- * @param bool $forced
- */
- public function setForce( $forced = true ) {
- $this->mOptions['force'] = $forced;
- }
-
protected function getUpdateKey() {
return __CLASS__;
}