| Conditions | 3 |
| Paths | 4 |
| Total Lines | 26 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 6 | function b_waiting_yomi() |
||
| 7 | { |
||
| 8 | $log_path = XOOPS_ROOT_PATH . '/modules/yomi/log/'; |
||
| 9 | $log_file = 'ys4_temp.cgi'; |
||
| 10 | $lang_linkname = 'Yomi'; |
||
|
|
|||
| 11 | $ret = []; |
||
| 12 | $block = []; |
||
| 13 | $cTemp = 0; |
||
| 14 | $fp = fopen("{$log_path}{$log_file}", 'rb'); |
||
| 15 | |||
| 16 | while ($tmp = fgets($fp, 4096)) { |
||
| 17 | ++$cTemp; |
||
| 18 | } |
||
| 19 | fclose($fp); |
||
| 20 | |||
| 21 | if (0 !== $cTemp) { |
||
| 22 | $block = [ |
||
| 23 | 'adminlink' => XOOPS_URL . '/modules/yomi/admin.php', |
||
| 24 | 'pendingnum' => $cTemp, |
||
| 25 | 'lang_linkname' => _PI_WAITING_WAITINGS, |
||
| 26 | ]; |
||
| 27 | } |
||
| 28 | |||
| 29 | $ret[] = $block; |
||
| 30 | |||
| 31 | return $ret; |
||
| 32 | } |
||
| 33 |