mirror of
https://github.com/YGGverse/YGGo.git
synced 2025-01-12 07:48:34 +00:00
add ceawl in queue notification
This commit is contained in:
parent
23ca2ca481
commit
d5f33ad643
@ -59,6 +59,23 @@ class SQLite {
|
||||
');
|
||||
}
|
||||
|
||||
public function getTotalPagesByHttpCode(mixed $httpCode) {
|
||||
|
||||
if (is_null($httpCode)) {
|
||||
|
||||
$query = $this->_db->query('SELECT COUNT(*) AS `total` FROM `page` WHERE `httpCode` IS NULL');
|
||||
|
||||
} else {
|
||||
|
||||
$query = $this->_db->prepare('SELECT COUNT(*) AS `total` FROM `page` WHERE `httpCode` = ?');
|
||||
|
||||
$query->execute([$httpCode]);
|
||||
|
||||
}
|
||||
|
||||
return $query->fetch()->total;
|
||||
}
|
||||
|
||||
public function getTotalPages() {
|
||||
|
||||
$query = $this->_db->prepare('SELECT COUNT(*) AS `total` FROM `page`');
|
||||
|
@ -177,6 +177,9 @@ if (!empty($q)) {
|
||||
<?php if ($results) { ?>
|
||||
<div>
|
||||
<?php echo sprintf(_('Total found: %s'), $resultsTotal) ?>
|
||||
<?php if ($queueTotal = $db->getTotalPagesByHttpCode(null)) { ?>
|
||||
<?php echo sprintf(_('* Please wait for all pages crawl to complete (%s in queue).'), $queueTotal) ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php foreach ($results as $result) { ?>
|
||||
<div>
|
||||
@ -190,6 +193,9 @@ if (!empty($q)) {
|
||||
<?php } else { ?>
|
||||
<div style="text-align:center">
|
||||
<?php echo sprintf(_('Total found: %s'), $resultsTotal) ?>
|
||||
<?php if ($q && $queueTotal = $db->getTotalPagesByHttpCode(null)) { ?>
|
||||
<?php echo sprintf(_('* Please wait for all pages crawl to complete (%s in queue).'), $queueTotal) ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</main>
|
||||
|
Loading…
Reference in New Issue
Block a user