| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 23 | function b_waiting_xmnews() |
||
| 24 | { |
||
| 25 | /** @var \XoopsMySQLDatabase $xoopsDB */ |
||
| 26 | $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection(); |
||
| 27 | $ret = []; |
||
| 28 | $block = []; |
||
| 29 | $sql = 'SELECT COUNT(*) FROM ' . $xoopsDB->prefix('xmnews_news') . ' WHERE news_status=2'; |
||
| 30 | $result = $xoopsDB->query($sql); |
||
| 31 | if ($result) { |
||
| 32 | $block['adminlink'] = XOOPS_URL . '/modules/xmnews/admin/news.php?news_cid=0&news_status=2'; |
||
| 33 | [$block['pendingnum']] = $xoopsDB->fetchRow($result); |
||
|
|
|||
| 34 | $block['lang_linkname'] = _PI_WAITING_NEWS; |
||
| 35 | } |
||
| 36 | |||
| 37 | $ret[] = $block; |
||
| 38 | |||
| 39 | return $ret; |
||
| 40 | } |
||
| 41 |