summaryrefslogtreecommitdiff
path: root/maintenance/rebuildFileCache.php
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/rebuildFileCache.php')
-rw-r--r--maintenance/rebuildFileCache.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/maintenance/rebuildFileCache.php b/maintenance/rebuildFileCache.php
index e7ce3521..3165b97f 100644
--- a/maintenance/rebuildFileCache.php
+++ b/maintenance/rebuildFileCache.php
@@ -17,11 +17,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 that builds file cache for content pages.
+ *
+ * @ingroup Maintenance
+ */
class RebuildFileCache extends Maintenance {
public function __construct() {
parent::__construct();
@@ -93,11 +99,11 @@ class RebuildFileCache extends Maintenance {
array( 'ORDER BY' => 'page_id ASC', 'USE INDEX' => 'PRIMARY' )
);
- $dbw->begin(); // for any changes
+ $dbw->begin( __METHOD__ ); // for any changes
foreach ( $res as $row ) {
$rebuilt = false;
$wgRequestTime = microtime( true ); # bug 22852
-
+
$wgTitle = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
if ( null == $wgTitle ) {
$this->output( "Page {$row->page_id} has bad title\n" );
@@ -139,7 +145,7 @@ class RebuildFileCache extends Maintenance {
$this->output( "Page {$row->page_id} not cacheable\n" );
}
}
- $dbw->commit(); // commit any changes (just for sanity)
+ $dbw->commit( __METHOD__ ); // commit any changes (just for sanity)
$blockStart += $this->mBatchSize;
$blockEnd += $this->mBatchSize;