Skip to content

Commit

Permalink
More patches
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberpower678 committed Jun 3, 2023
1 parent 69f0eb3 commit 6e32659
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions app/src/Core/APII.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@ public static function getBatchText( $objects, $objectType = 'pagetitle' ) {
break;
}
}

if( isset( $batch ) ) $batch = array_slice( $objects, 0, $limit );
}

return $returnArray;
Expand Down
6 changes: 3 additions & 3 deletions app/src/Core/DB.php
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +1448,7 @@ public function updateDBValues() {
unset( $values['createpaywall'] );
if( empty( $insertQueryPaywall ) ) {
$insertQueryPaywall =
"INSERT INTO `externallinks_paywall`\n\t(`domain`, `paywall_status`)\nVALUES\n";
"INSERT IGNORE INTO `externallinks_paywall`\n\t(`domain`, `paywall_status`)\nVALUES\n";
}
// Aggregate unique domain names to insert into externallinks_paywall
if( !isset( $tipAssigned ) || !in_array( $domain, $tipAssigned ) ) {
Expand All @@ -1464,7 +1464,7 @@ public function updateDBValues() {
'archivable', 'archived', 'archive_failure', 'access_time', 'archive_time', 'paywall_id'
];
$insertQueryGlobal =
"INSERT INTO `externallinks_global`\n\t(`" . implode( "`, `", $tigFields ) . "`)\nVALUES\n";
"INSERT IGNORE INTO `externallinks_global`\n\t(`" . implode( "`, `", $tigFields ) . "`)\nVALUES\n";
if( !isset( $tigAssigned ) || !in_array( $values['url'], $tigAssigned ) ) {
$temp = [];
foreach( $tigFields as $field ) {
Expand All @@ -1478,7 +1478,7 @@ public function updateDBValues() {
}
$tilFields = [ 'notified', 'pageid', 'url_id' ];
$insertQueryLocal =
"INSERT INTO `externallinks_" . WIKIPEDIA . "`\n\t(`" . implode( "`, `", $tilFields ) .
"INSERT IGNORE INTO `externallinks_" . WIKIPEDIA . "`\n\t(`" . implode( "`, `", $tilFields ) .
"`)\nVALUES\n";
if( !isset( $tilAssigned ) || !in_array( $values['url'], $tilAssigned ) ) {
$temp = [];
Expand Down

0 comments on commit 6e32659

Please sign in to comment.