* @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
+/**
+ * Maintenance script that updates page_restrictions table from
+ * old page_restriction column.
+ *
+ * @ingroup Maintenance
+ */
class UpdateRestrictions extends Maintenance {
public function __construct() {
parent::__construct();
// old old format should be treated as edit/move restriction
$oldRestrictions["edit"] = trim( $temp[0] );
$oldRestrictions["move"] = trim( $temp[0] );
- } else if ( $temp[1] ) {
+ } elseif ( $temp[1] ) {
$oldRestrictions[$temp[0]] = trim( $temp[1] );
}
}
}
$maintClass = "UpdateRestrictions";
-require_once( RUN_MAINTENANCE_IF_MAIN );
+require_once RUN_MAINTENANCE_IF_MAIN;