Skip to content

Commit

Permalink
Merge pull request #111 from internetarchive/hot-fix
Browse files Browse the repository at this point in the history
Update pagefunctions.php
  • Loading branch information
cyberpower678 authored Sep 26, 2023
2 parents ae89d9b + 48df93d commit 17fb869
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions app/src/html/Includes/pagefunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2149,19 +2149,21 @@ function loadURLInterface() {
MYSQLI_CLIENT_SSL : 0 )
)
) {
try {
$wikiSQL = "SELECT * FROM page WHERE `page_id` IN (" . implode( ",", $toFetch ) . ");";
$res = mysqli_query( $db, $wikiSQL );
} catch (mysqli_sql_exception $e ) {
$res = false;

$mainHTML->setMessageBox( "warning", "{{{dberror}}}",
"{{{dbqueryerror}}}"
);
$mainHTML->assignAfterElement( "sqlquery", $wikiSQL );
$mainHTML->assignAfterElement( "errno", mysqli_errno( $db ) );
$mainHTML->assignAfterElement( "errormessage", mysqli_error( $db ) );
}
if( !empty( $toFetch ) ) {
try {
$wikiSQL = "SELECT * FROM page WHERE `page_id` IN (" . implode( ",", $toFetch ) . ");";
$res = mysqli_query( $db, $wikiSQL );
} catch( mysqli_sql_exception $e ) {
$res = false;

$mainHTML->setMessageBox( "warning", "{{{dberror}}}",
"{{{dbqueryerror}}}"
);
$mainHTML->assignAfterElement( "sqlquery", $wikiSQL );
$mainHTML->assignAfterElement( "errno", mysqli_errno( $db ) );
$mainHTML->assignAfterElement( "errormessage", mysqli_error( $db ) );
}
} else $res = false;

if( $res ) {
while( $result = $res->fetch_assoc() ) {
Expand Down

0 comments on commit 17fb869

Please sign in to comment.