| Conditions | 5 |
| Paths | 16 |
| Total Lines | 47 |
| Lines | 47 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | function b_waiting_wfdownloads() |
||
| 18 | { |
||
| 19 | /** @var \XoopsMySQLDatabase $xoopsDB */ |
||
| 20 | $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection(); |
||
| 21 | $ret = []; |
||
| 22 | |||
| 23 | // wfdownloads pending |
||
| 24 | $block = []; |
||
| 25 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('wfdownloads_downloads') . ' WHERE status=0'); |
||
|
|
|||
| 26 | if ($result) { |
||
| 27 | $block['adminlink'] = XOOPS_URL . '/modules/wfdownloads/admin/newdownloads.php'; |
||
| 28 | list($block['pendingnum']) = $xoopsDB->fetchRow($result); |
||
| 29 | $block['lang_linkname'] = _PI_WAITING_WAITINGS; |
||
| 30 | } |
||
| 31 | $ret[] = $block; |
||
| 32 | |||
| 33 | // wfdownloads broken |
||
| 34 | $block = []; |
||
| 35 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('wfdownloads_broken')); |
||
| 36 | if ($result) { |
||
| 37 | $block['adminlink'] = XOOPS_URL . '/modules/wfdownloads/admin/brokendown.php'; |
||
| 38 | list($block['pendingnum']) = $xoopsDB->fetchRow($result); |
||
| 39 | $block['lang_linkname'] = _PI_WAITING_BROKENS; |
||
| 40 | } |
||
| 41 | $ret[] = $block; |
||
| 42 | |||
| 43 | // wfdownloads modreq |
||
| 44 | $block = []; |
||
| 45 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('wfdownloads_mod')); |
||
| 46 | if ($result) { |
||
| 47 | $block['adminlink'] = XOOPS_URL . '/modules/wfdownloads/admin/modifications.php'; |
||
| 48 | list($block['pendingnum']) = $xoopsDB->fetchRow($result); |
||
| 49 | $block['lang_linkname'] = _PI_WAITING_MODREQS; |
||
| 50 | } |
||
| 51 | $ret[] = $block; |
||
| 52 | |||
| 53 | // wfdownloads reviews |
||
| 54 | $block = []; |
||
| 55 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('wfdownloads_reviews') . ' WHERE submit=0'); |
||
| 56 | if ($result) { |
||
| 57 | $block['adminlink'] = XOOPS_URL . '/modules/wfdownloads/admin/index.php?op=reviews'; |
||
| 58 | list($block['pendingnum']) = $xoopsDB->fetchRow($result); |
||
| 59 | $block['lang_linkname'] = _PI_WAITING_REVIEWS; |
||
| 60 | } |
||
| 61 | $ret[] = $block; |
||
| 62 | |||
| 63 | return $ret; |
||
| 64 | } |
||
| 65 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.