Skip to content

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
  • Loading branch information
iMarbot committed Apr 21, 2024
1 parent f92dfa2 commit 7ca46da
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions src/SpecialPage/SpecialResourceLoaderArticles.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,21 +158,21 @@ private function addPage() {
*/
public function addPageCB( $formData ) {
$output = $this->getOutput();
$dbw = wfGetDB( DB_PRIMARY );
$dbw->insert(
'resourceloaderarticles',
[
'rla_page' => $formData[ 'Page' ],
'rla_wiki' => $formData[ 'Wiki' ],
'rla_type' => $formData[ 'Type' ],
'rla_priority' => intval( $formData[ 'Priority' ] )
]
);
$output->addWikiTextAsContent(
'<div class="success">'
. $this->msg( 'resourceloaderarticles-success-add' )->text()
. '</div>'
);
$dbw = wfGetDB( DB_PRIMARY );
$dbw->insert(
'resourceloaderarticles',
[
'rla_page' => $formData[ 'Page' ],
'rla_wiki' => $formData[ 'Wiki' ],
'rla_type' => $formData[ 'Type' ],
'rla_priority' => intval( $formData[ 'Priority' ] )
]
);
$output->addWikiTextAsContent(
'<div class="success">'
. $this->msg( 'resourceloaderarticles-success-add' )->text()
. '</div>'
);
}

/**
Expand Down Expand Up @@ -239,24 +239,24 @@ private function editPage( $id ) {
*/
public function editPageCB( $formData ) {
$output = $this->getOutput();
$dbw = wfGetDB( DB_PRIMARY );
$dbw->update(
'resourceloaderarticles',
[
'rla_page' => $formData[ 'Page' ],
'rla_wiki' => $formData[ 'Wiki' ],
'rla_type' => $formData[ 'Type' ],
'rla_priority' => intval( $formData[ 'Priority' ] )
],
[
'rla_id' => $formData[ 'Id' ]
]
);
$output->addWikiTextAsContent(
'<div class="success">'
. $this->msg( 'resourceloaderarticles-success-edit' )->text()
. '</div>'
);
$dbw = wfGetDB( DB_PRIMARY );
$dbw->update(
'resourceloaderarticles',
[
'rla_page' => $formData[ 'Page' ],
'rla_wiki' => $formData[ 'Wiki' ],
'rla_type' => $formData[ 'Type' ],
'rla_priority' => intval( $formData[ 'Priority' ] )
],
[
'rla_id' => $formData[ 'Id' ]
]
);
$output->addWikiTextAsContent(
'<div class="success">'
. $this->msg( 'resourceloaderarticles-success-edit' )->text()
. '</div>'
);
}

/**
Expand Down

0 comments on commit 7ca46da

Please sign in to comment.