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