| 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_wfsection() |
||
| 10 | { |
||
| 11 | /** @var \XoopsMySQLDatabase $xoopsDB */ |
||
| 12 | $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection(); |
||
| 13 | $ret = []; |
||
| 14 | |||
| 15 | // wf-section articles - new |
||
| 16 | $block = []; |
||
| 17 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('wfs_article') . ' WHERE published=0'); |
||
| 18 | if ($result) { |
||
| 19 | $block['adminlink'] = XOOPS_URL . '/modules/wfsection/admin/allarticles.php?action=submitted'; |
||
| 20 | [$block['pendingnum']] = $xoopsDB->fetchRow($result); |
||
|
|
|||
| 21 | $block['lang_linkname'] = _PI_WAITING_WAITINGS; |
||
| 22 | } |
||
| 23 | $ret[] = $block; |
||
| 24 | |||
| 25 | // wf-section articles - modified |
||
| 26 | $block = []; |
||
| 27 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('wfs_article_mod') . ''); |
||
| 28 | if ($result) { |
||
| 29 | $block['adminlink'] = XOOPS_URL . '/modules/wfsection/admin/modified.php'; |
||
| 30 | [$block['pendingnum']] = $xoopsDB->fetchRow($result); |
||
| 31 | $block['lang_linkname'] = _PI_WAITING_MODREQS; |
||
| 32 | } |
||
| 33 | $ret[] = $block; |
||
| 34 | |||
| 35 | return $ret; |
||
| 36 | } |
||
| 37 |