| Conditions | 3 |
| Paths | 4 |
| Total Lines | 26 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 6 | function b_waiting_wordbook() |
||
| 7 | { |
||
| 8 | /** @var \XoopsMySQLDatabase $xoopsDB */ |
||
| 9 | $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection(); |
||
| 10 | $ret = []; |
||
| 11 | |||
| 12 | // Waiting |
||
| 13 | $block = []; |
||
| 14 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('wbentries') . ' WHERE submit=1 AND categoryID>0'); |
||
| 15 | if ($result) { |
||
| 16 | $block['adminlink'] = XOOPS_URL . '/modules/wordbook/admin/index.php#esp.'; |
||
| 17 | [$block['pendingnum']] = $xoopsDB->fetchRow($result); |
||
|
|
|||
| 18 | $block['lang_linkname'] = _PI_WAITING_WAITINGS; |
||
| 19 | } |
||
| 20 | $ret[] = $block; |
||
| 21 | |||
| 22 | // Request |
||
| 23 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('wbentries') . ' WHERE submit=1 AND categoryID=0'); |
||
| 24 | if ($result) { |
||
| 25 | $block['adminlink'] = XOOPS_URL . '/modules/wordbook/admin/index.php#sol.'; |
||
| 26 | [$block['pendingnum']] = $xoopsDB->fetchRow($result); |
||
| 27 | $block['lang_linkname'] = _PI_WAITING_REQUESTS; |
||
| 28 | } |
||
| 29 | $ret[] = $block; |
||
| 30 | |||
| 31 | return $ret; |
||
| 32 | } |
||
| 33 |