* page ID is already in use.
*/
public function insertOn( $dbw, $pageId = null ) {
- $pageIdForInsert = $pageId ?: $dbw->nextSequenceValue( 'page_page_id_seq' );
+ $pageIdForInsert = $pageId ? [ 'page_id' => $pageId ] : [];
$dbw->insert(
'page',
[
- 'page_id' => $pageIdForInsert,
'page_namespace' => $this->mTitle->getNamespace(),
'page_title' => $this->mTitle->getDBkey(),
'page_restrictions' => '',
'page_touched' => $dbw->timestamp(),
'page_latest' => 0, // Fill this in shortly...
'page_len' => 0, // Fill this in shortly...
- ],
+ ] + $pageIdForInsert,
__METHOD__,
'IGNORE'
);
$dbw->insert(
'page_restrictions',
[
- 'pr_id' => $dbw->nextSequenceValue( 'page_restrictions_pr_id_seq' ),
'pr_page' => $id,
'pr_type' => $action,
'pr_level' => $restrictions,