Conditions | 2 |
Paths | 2 |
Total Lines | 20 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
6 | function b_waiting_tutorials() |
||
7 | { |
||
8 | /** @var \XoopsMySQLDatabase $xoopsDB */ |
||
9 | $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection(); |
||
10 | $ret = []; |
||
11 | $block = []; |
||
12 | |||
13 | // tutorials |
||
14 | $myts = \MyTextSanitizer::getInstance(); |
||
|
|||
15 | |||
16 | $result = $xoopsDB->query('SELECT count(*) FROM ' . $xoopsDB->prefix('tutorials') . ' WHERE status=0 OR status=2 ORDER BY date'); |
||
17 | if ($result) { |
||
18 | $block['adminlink'] = XOOPS_URL . '/modules/tutorials/admin/index.php'; |
||
19 | [$block['pendingnum']] = $xoopsDB->fetchRow($result); |
||
20 | $block['lang_linkname'] = _PI_WAITING_WAITINGS; |
||
21 | } |
||
22 | |||
23 | $ret[] = $block; |
||
24 | |||
25 | return $ret; |
||
26 | } |
||
27 |