Conditions | 3 |
Paths | 4 |
Total Lines | 27 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
9 | function b_waiting_xfsection() |
||
10 | { |
||
11 | /** @var \XoopsMySQLDatabase $xoopsDB */ |
||
12 | $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection(); |
||
13 | $ret = []; |
||
14 | |||
15 | // xf-section articles - waiting |
||
16 | $block = []; |
||
17 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('xfs_article') . ' WHERE published=0'); |
||
18 | if ($result) { |
||
19 | $block['adminlink'] = XOOPS_URL . '/modules/xfsection/admin/allarticles.php?action=submitted'; |
||
20 | [$block['pendingnum']] = $xoopsDB->fetchRow($result); |
||
|
|||
21 | $block['lang_linkname'] = _PI_WAITING_WAITINGS; |
||
22 | } |
||
23 | $ret[] = $block; |
||
24 | |||
25 | // xf-section articles - attach broken |
||
26 | $block = []; |
||
27 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('xfs_broken') . ''); |
||
28 | if ($result) { |
||
29 | $block['adminlink'] = XOOPS_URL . '/modules/xfsection/admin/brokendown.php?op=listBrokenDownloads'; |
||
30 | [$block['pendingnum']] = $xoopsDB->fetchRow($result); |
||
31 | $block['lang_linkname'] = _PI_WAITING_FILES . ' ' . _PI_WAITING_BROKENS; |
||
32 | } |
||
33 | $ret[] = $block; |
||
34 | |||
35 | return $ret; |
||
36 | } |
||
37 |