X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FupdateArticleCount.php;h=470647a4c4f9e0c705bd4ddcab1621042d1faba9;hb=5957856c46c3c351b88b6f150ccd39afb5be2c5c;hp=730a1f64e3886d67261835c13befd19d9ae04e3c;hpb=944e196c02efbe6838827d4cf1e332a7919e5cdb;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/updateArticleCount.php b/maintenance/updateArticleCount.php index 730a1f64e3..470647a4c4 100644 --- a/maintenance/updateArticleCount.php +++ b/maintenance/updateArticleCount.php @@ -1,7 +1,7 @@ */ -require_once( __DIR__ . '/Maintenance.php' ); +require_once __DIR__ . '/Maintenance.php'; +/** + * Maintenance script to provide a better count of the number of articles + * and update the site statistics table, if desired. + * + * @ingroup Maintenance + */ class UpdateArticleCount extends Maintenance { public function __construct() { @@ -43,13 +49,19 @@ class UpdateArticleCount extends Maintenance { if ( $this->hasOption( 'update' ) ) { $this->output( "Updating site statistics table... " ); $dbw = wfGetDB( DB_MASTER ); - $dbw->update( 'site_stats', array( 'ss_good_articles' => $result ), array( 'ss_row_id' => 1 ), __METHOD__ ); + $dbw->update( + 'site_stats', + array( 'ss_good_articles' => $result ), + array( 'ss_row_id' => 1 ), + __METHOD__ + ); $this->output( "done.\n" ); } else { - $this->output( "To update the site statistics table, run the script with the --update option.\n" ); + $this->output( "To update the site statistics table, run the script " + . "with the --update option.\n" ); } } } $maintClass = "UpdateArticleCount"; -require_once( RUN_MAINTENANCE_IF_MAIN ); +require_once RUN_MAINTENANCE_IF_MAIN;