| Conditions | 4 |
| Paths | 8 |
| Total Lines | 37 |
| Code Lines | 24 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 14 | function b_waiting_xyp4all() |
||
| 15 | { |
||
| 16 | /** @var \XoopsMySQLDatabase $xoopsDB */ |
||
| 17 | $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection(); |
||
| 18 | $ret = []; |
||
| 19 | |||
| 20 | // xyp4all links |
||
| 21 | $block = []; |
||
| 22 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('xyp_links') . ' WHERE status=0'); |
||
| 23 | if ($result) { |
||
| 24 | $block['adminlink'] = XOOPS_URL . '/modules/xyp4all/admin/index.php?op=listNewLinks'; |
||
| 25 | [$block['pendingnum']] = $xoopsDB->fetchRow($result); |
||
|
|
|||
| 26 | $block['lang_linkname'] = _PI_WAITING_LINKS; |
||
| 27 | } |
||
| 28 | $ret[] = $block; |
||
| 29 | |||
| 30 | // xyp4all broken |
||
| 31 | $block = []; |
||
| 32 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('xyp_broken')); |
||
| 33 | if ($result) { |
||
| 34 | $block['adminlink'] = XOOPS_URL . '/modules/xyp4all/admin/index.php?op=listBrokenLinks'; |
||
| 35 | [$block['pendingnum']] = $xoopsDB->fetchRow($result); |
||
| 36 | $block['lang_linkname'] = _PI_WAITING_BROKENS; |
||
| 37 | } |
||
| 38 | $ret[] = $block; |
||
| 39 | |||
| 40 | // xyp4all modreq |
||
| 41 | $block = []; |
||
| 42 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('xyp_mod')); |
||
| 43 | if ($result) { |
||
| 44 | $block['adminlink'] = XOOPS_URL . '/modules/xyp4all/admin/index.php?op=listModReq'; |
||
| 45 | [$block['pendingnum']] = $xoopsDB->fetchRow($result); |
||
| 46 | $block['lang_linkname'] = _PI_WAITING_MODREQS; |
||
| 47 | } |
||
| 48 | $ret[] = $block; |
||
| 49 | |||
| 50 | return $ret; |
||
| 51 | } |
||
| 52 |