|
24 | 24 | if ( (class_exists('JURI')) && (method_exists('JURI','base')) ) |
25 | 25 | $isJoomla=true; |
26 | 26 |
|
27 | | -if ($settings['debug_output']){ |
28 | | - if ($isJoomla) |
29 | | - $CMS=getJoomlaVersion(); |
30 | | - else |
31 | | - $CMS=getWPVersion(); |
32 | | - |
33 | | - $wk_version=getWidgetkitVersion(); |
34 | | - $php_version=@phpversion(); |
35 | | - array_push($debug_info,'Processing widget '.$widget_name.' (version '.$widget_version.') on '.$CMS.' with Widgetkit '.$wk_version.' and PHP '.$php_version.'('.@php_sapi_name().')'); |
36 | | - if (version_compare('5.3',$php_version)>0) |
37 | | - array_push($debug_error,'Your PHP is too old! Upgrade is strongly required! This widget may not work with your version of PHP.'); |
| 27 | +if ($isJoomla) |
| 28 | + $CMS=getJoomlaVersion(); |
| 29 | +else |
| 30 | + $CMS=getWPVersion(); |
| 31 | + |
| 32 | +$wk_version=getWidgetkitVersion(); |
| 33 | +$php_version=@phpversion(); |
| 34 | +array_push($debug_info,'Processing widget '.$widget_name.' (version '.$widget_version.') on '.$CMS.' with Widgetkit '.$wk_version.' and PHP '.$php_version.'('.@php_sapi_name().')'); |
| 35 | +if (version_compare('5.3',$php_version)>0) |
| 36 | + array_push($debug_error,'Your PHP is too old! Upgrade is strongly required! This widget may not work with your version of PHP.'); |
| 37 | +else |
| 38 | + if (version_compare('5.6',$php_version)>0) |
| 39 | + array_push($debug_warning,'Your PHP is quite old. Although this widget can work with your version of PHP, upgrade is recommended to the latest stable version of PHP.'); |
| 40 | + |
| 41 | +if (version_compare('2.5.0',$wk_version)>0) |
| 42 | + array_push($debug_warning,"Your Widgetkit version is quite old. Although this widget may work with your version of Widgetkit, upgrade is recommended to the latest stable version of Widgetkit. Besides, you may experience some issues of missing options in the settings of this widget if you don't upgrade."); |
| 43 | + |
| 44 | +array_push($debug_info,'Host: '.@php_uname()); |
| 45 | +$ipath=dirname(dirname(__FILE__)); |
| 46 | +array_push($debug_info,'Widget installation path: '.$ipath); |
| 47 | +if ($isJoomla) |
| 48 | + if (preg_match_all('@.*\/administrator\/components\/com_widgetkit\/plugins\/widgets\/.+@',$ipath)) |
| 49 | + array_push($debug_info,'Installation path is correct'); |
38 | 50 | else |
39 | | - if (version_compare('5.6',$php_version)>0) |
40 | | - array_push($debug_warning,'Your PHP is quite old. Although this widget can work with your version of PHP, upgrade is recommended to the latest stable version of PHP.'); |
41 | | - |
42 | | - if (version_compare('2.5.0',$wk_version)>0) |
43 | | - array_push($debug_warning,"Your Widgetkit version is quite old. Although this widget may work with your version of Widgetkit, upgrade is recommended to the latest stable version of Widgetkit. Besides, you may experience some issues of missing options in the settings of this widget if you don't upgrade."); |
44 | | - |
45 | | - array_push($debug_info,'Host: '.@php_uname()); |
46 | | - $ipath=dirname(dirname(__FILE__)); |
47 | | - array_push($debug_info,'Widget installation path: '.$ipath); |
48 | | - if ($isJoomla) |
49 | | - if (preg_match_all('@.*\/administrator\/components\/com_widgetkit\/plugins\/widgets\/.+@',$ipath)) |
50 | | - array_push($debug_info,'Installation path is correct'); |
51 | | - else |
52 | | - array_push($debug_error,'Installation path is not correct, please fix it. Read more in the Wiki.'); |
| 51 | + array_push($debug_error,'Installation path is not correct, please fix it. Read more in the Wiki.'); |
| 52 | +else |
| 53 | + if (preg_match_all('@.*\/wp-content\/plugins\/widgetkit\/plugins\/widgets\/.+@',$ipath)) |
| 54 | + array_push($debug_info,'Installation path is correct'); |
53 | 55 | else |
54 | | - if (preg_match_all('@.*\/wp-content\/plugins\/widgetkit\/plugins\/widgets\/.+@',$ipath)) |
55 | | - array_push($debug_info,'Installation path is correct'); |
56 | | - else |
57 | | - array_push($debug_warning,'Installation path is not correct, please fix it. Read more in the Wiki.'); |
| 56 | + array_push($debug_warning,'Installation path is not correct, please fix it. Read more in the Wiki.'); |
58 | 57 |
|
59 | | - if ($isJoomla) |
60 | | - array_push($debug_info,'Detected CMS: Joomla'); |
61 | | - else |
62 | | - array_push($debug_info,'Detected CMS: WordPress'); |
| 58 | +if ($isJoomla) |
| 59 | + array_push($debug_info,'Detected CMS: Joomla'); |
| 60 | +else |
| 61 | + array_push($debug_info,'Detected CMS: WordPress'); |
63 | 62 |
|
64 | | - array_push($debug_info,'Widget settings: '.print_r($settings,true)); |
65 | | -} |
| 63 | +array_push($debug_info,'Widget settings: '.print_r($settings,true)); |
66 | 64 |
|
67 | 65 | function ExtractWidgetInfo(){ |
68 | 66 | global $widget_name; |
|
0 commit comments