X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=maintenance%2FpopulateBacklinkNamespace.php;h=295dacda99494071cc09349e4097882b564c8d66;hb=df5e7c3aa0b508591cc95781872aac8f7a45b974;hp=054f7921fb2b8d6fc73563fb80980f772dd6bda4;hpb=240a73564c6f8528a35ed100b84088d7afe1bafe;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/populateBacklinkNamespace.php b/maintenance/populateBacklinkNamespace.php index 054f7921fb..295dacda99 100644 --- a/maintenance/populateBacklinkNamespace.php +++ b/maintenance/populateBacklinkNamespace.php @@ -31,7 +31,7 @@ require_once __DIR__ . '/Maintenance.php'; class PopulateBacklinkNamespace extends LoggedUpdateMaintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Populate the *_from_namespace fields"; + $this->addDescription( 'Populate the *_from_namespace fields' ); $this->addOption( 'lastUpdatedId', "Highest page_id with updated links", false, true ); } @@ -67,21 +67,21 @@ class PopulateBacklinkNamespace extends LoggedUpdateMaintenance { while ( $blockEnd <= $end ) { $this->output( "...doing page_id from $blockStart to $blockEnd\n" ); $cond = "page_id BETWEEN $blockStart AND $blockEnd"; - $res = $db->select( 'page', array( 'page_id', 'page_namespace' ), $cond, __METHOD__ ); + $res = $db->select( 'page', [ 'page_id', 'page_namespace' ], $cond, __METHOD__ ); foreach ( $res as $row ) { $db->update( 'pagelinks', - array( 'pl_from_namespace' => $row->page_namespace ), - array( 'pl_from' => $row->page_id ), + [ 'pl_from_namespace' => $row->page_namespace ], + [ 'pl_from' => $row->page_id ], __METHOD__ ); $db->update( 'templatelinks', - array( 'tl_from_namespace' => $row->page_namespace ), - array( 'tl_from' => $row->page_id ), + [ 'tl_from_namespace' => $row->page_namespace ], + [ 'tl_from' => $row->page_id ], __METHOD__ ); $db->update( 'imagelinks', - array( 'il_from_namespace' => $row->page_namespace ), - array( 'il_from' => $row->page_id ), + [ 'il_from_namespace' => $row->page_namespace ], + [ 'il_from' => $row->page_id ], __METHOD__ ); }