| Conditions | 4 |
| Paths | 8 |
| Total Lines | 37 |
| Code Lines | 24 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 6 | function b_waiting_mylinks() |
||
| 7 | { |
||
| 8 | /** @var \XoopsMySQLDatabase $xoopsDB */ |
||
| 9 | $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection(); |
||
| 10 | $ret = []; |
||
| 11 | |||
| 12 | // mylinks links |
||
| 13 | $block = []; |
||
| 14 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('mylinks_links') . ' WHERE status=0'); |
||
| 15 | if ($result) { |
||
| 16 | $block['adminlink'] = XOOPS_URL . '/modules/mylinks/admin/index.php?op=listNewLinks'; |
||
| 17 | [$block['pendingnum']] = $xoopsDB->fetchRow($result); |
||
|
|
|||
| 18 | $block['lang_linkname'] = _PI_WAITING_WAITINGS; |
||
| 19 | } |
||
| 20 | $ret[] = $block; |
||
| 21 | |||
| 22 | // mylinks broken |
||
| 23 | $block = []; |
||
| 24 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('mylinks_broken')); |
||
| 25 | if ($result) { |
||
| 26 | $block['adminlink'] = XOOPS_URL . '/modules/mylinks/admin/index.php?op=listBrokenLinks'; |
||
| 27 | [$block['pendingnum']] = $xoopsDB->fetchRow($result); |
||
| 28 | $block['lang_linkname'] = _PI_WAITING_BROKENS; |
||
| 29 | } |
||
| 30 | $ret[] = $block; |
||
| 31 | |||
| 32 | // mylinks modreq |
||
| 33 | $block = []; |
||
| 34 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('mylinks_mod')); |
||
| 35 | if ($result) { |
||
| 36 | $block['adminlink'] = XOOPS_URL . '/modules/mylinks/admin/index.php?op=listModReq'; |
||
| 37 | [$block['pendingnum']] = $xoopsDB->fetchRow($result); |
||
| 38 | $block['lang_linkname'] = _PI_WAITING_MODREQS; |
||
| 39 | } |
||
| 40 | $ret[] = $block; |
||
| 41 | |||
| 42 | return $ret; |
||
| 43 | } |
||
| 44 |