Conditions | 4 |
Paths | 6 |
Total Lines | 23 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | function smarty_compiler_xoAdminIcons($params, $smarty) |
||
|
|||
24 | { |
||
25 | global $xoops, $xoTheme; |
||
26 | |||
27 | $argStr = reset($params); |
||
28 | $argStr = trim($argStr,"' \t\n\r\0"); |
||
29 | |||
30 | $icons = xoops_getModuleOption('typeicons', 'system'); |
||
31 | if ($icons == '') { |
||
32 | $icons = 'default'; |
||
33 | } |
||
34 | |||
35 | if (file_exists($xoops->path('modules/system/images/icons/' . $icons . '/index.php'))) { |
||
36 | $url = $xoops->url('modules/system/images/icons/' . $icons . '/' . $argStr); |
||
37 | } else { |
||
38 | if (file_exists($xoops->path('modules/system/images/icons/default/' . $argStr))) { |
||
39 | $url = $xoops->url('modules/system/images/icons/default/' . $argStr); |
||
40 | } else { |
||
41 | $url = $xoops->url('modules/system/images/icons/default/xoops/xoops.png'); |
||
42 | } |
||
43 | } |
||
44 | |||
45 | return "<?php echo '" . addslashes($url) . "'; ?>"; |
||
46 | } |
||
47 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.