Conditions | 4 |
Paths | 5 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | function apcal_comments_update($event_id, $total_num) |
||
32 | { |
||
33 | // record total_num |
||
34 | global $xoopsDB, $cal; |
||
35 | |||
36 | if (is_object($cal)) { |
||
37 | $tablename = $cal->table; |
||
38 | } else { |
||
39 | $moduleDirName = basename(dirname(__DIR__)); |
||
40 | if (!preg_match('/^(\D+)(\d*)$/', $moduleDirName, $regs)) { |
||
41 | echo('invalid dirname: ' . htmlspecialchars($moduleDirName)); |
||
42 | } |
||
43 | $mydirnumber = $regs[2] === '' ? '' : (int)$regs[2]; |
||
44 | $tablename = $GLOBALS['xoopsDB']->prefix("apcal{$mydirnumber}_event"); |
||
45 | } |
||
46 | |||
47 | $ret = $GLOBALS['xoopsDB']->query("UPDATE $tablename SET comments=$total_num WHERE id=$event_id"); |
||
48 | |||
49 | return $ret; |
||
50 | } |
||
51 | |||
60 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.