summaryrefslogtreecommitdiff
path: root/maintenance/deleteBatch.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-01-18 16:46:04 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-01-18 16:46:04 +0100
commit63601400e476c6cf43d985f3e7b9864681695ed4 (patch)
treef7846203a952e38aaf66989d0a4702779f549962 /maintenance/deleteBatch.php
parent8ff01378c9e0207f9169b81966a51def645b6a51 (diff)
Update to MediaWiki 1.20.2
this update includes: * adjusted Arch Linux skin * updated FluxBBAuthPlugin * patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024
Diffstat (limited to 'maintenance/deleteBatch.php')
-rw-r--r--maintenance/deleteBatch.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/maintenance/deleteBatch.php b/maintenance/deleteBatch.php
index 56fe13a4..936a52b8 100644
--- a/maintenance/deleteBatch.php
+++ b/maintenance/deleteBatch.php
@@ -1,6 +1,6 @@
<?php
/**
- * Deletes a batch of pages
+ * Deletes a batch of pages.
* Usage: php deleteBatch.php [-u <user>] [-r <reason>] [-i <interval>] [listfile]
* where
* [listfile] is a file where each line contains the title of a page to be
@@ -24,11 +24,17 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
+ * @file
* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
+/**
+ * Maintenance script to delete a batch of pages.
+ *
+ * @ingroup Maintenance
+ */
class DeleteBatch extends Maintenance {
public function __construct() {
@@ -89,7 +95,7 @@ class DeleteBatch extends Maintenance {
}
$this->output( $title->getPrefixedText() );
- $dbw->begin();
+ $dbw->begin( __METHOD__ );
if ( $title->getNamespace() == NS_FILE ) {
$img = wfFindFile( $title );
if ( $img && $img->isLocal() && !$img->delete( $reason ) ) {
@@ -99,7 +105,7 @@ class DeleteBatch extends Maintenance {
$page = WikiPage::factory( $title );
$error = '';
$success = $page->doDeleteArticle( $reason, false, 0, false, $error, $user );
- $dbw->commit();
+ $dbw->commit( __METHOD__ );
if ( $success ) {
$this->output( " Deleted!\n" );
} else {