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() {
|
public function getTotalPages() {
|
||||||
|
|
||||||
$query = $this->_db->prepare('SELECT COUNT(*) AS `total` FROM `page`');
|
$query = $this->_db->prepare('SELECT COUNT(*) AS `total` FROM `page`');
|
||||||
|
@ -177,6 +177,9 @@ if (!empty($q)) {
|
|||||||
<?php if ($results) { ?>
|
<?php if ($results) { ?>
|
||||||
<div>
|
<div>
|
||||||
<?php echo sprintf(_('Total found: %s'), $resultsTotal) ?>
|
<?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>
|
</div>
|
||||||
<?php foreach ($results as $result) { ?>
|
<?php foreach ($results as $result) { ?>
|
||||||
<div>
|
<div>
|
||||||
@ -190,6 +193,9 @@ if (!empty($q)) {
|
|||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<div style="text-align:center">
|
<div style="text-align:center">
|
||||||
<?php echo sprintf(_('Total found: %s'), $resultsTotal) ?>
|
<?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>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</main>
|
</main>
|
||||||
|
Loading…
Reference in New Issue
Block a user