@@ 1016-1050 (lines=35) @@ | ||
1013 | return $count; |
|
1014 | } |
|
1015 | ||
1016 | function tep_count_payment_modules() { |
|
1017 | $count = 0; |
|
1018 | ||
1019 | $modules_array = explode(';', MODULE_PAYMENT_INSTALLED); |
|
1020 | ||
1021 | for ($i=0, $n=sizeof($modules_array); $i<$n; $i++) { |
|
1022 | $m = $modules_array[$i]; |
|
1023 | ||
1024 | $OSCOM_PM = null; |
|
1025 | ||
1026 | if (strpos($m, '\\') !== false) { |
|
1027 | list($vendor, $app, $module) = explode('\\', $m); |
|
1028 | ||
1029 | $module = $vendor . '\\' . $app . '\\' . $module; |
|
1030 | ||
1031 | $code = 'Payment_' . str_replace('\\', '_', $module); |
|
1032 | ||
1033 | if (Registry::exists($code)) { |
|
1034 | $OSCOM_PM = Registry::get($code); |
|
1035 | } |
|
1036 | } else { |
|
1037 | $module = substr($m, 0, strrpos($m, '.')); |
|
1038 | ||
1039 | if (is_object($GLOBALS[$module])) { |
|
1040 | $OSCOM_PM = $GLOBALS[$module]; |
|
1041 | } |
|
1042 | } |
|
1043 | ||
1044 | if (isset($OSCOM_PM) && $OSCOM_PM->enabled) { |
|
1045 | $count++; |
|
1046 | } |
|
1047 | } |
|
1048 | ||
1049 | return $count; |
|
1050 | } |
|
1051 | ||
1052 | function tep_count_shipping_modules() { |
|
1053 | $count = 0; |
|
@@ 1052-1086 (lines=35) @@ | ||
1049 | return $count; |
|
1050 | } |
|
1051 | ||
1052 | function tep_count_shipping_modules() { |
|
1053 | $count = 0; |
|
1054 | ||
1055 | $modules_array = explode(';', MODULE_SHIPPING_INSTALLED); |
|
1056 | ||
1057 | for ($i=0, $n=sizeof($modules_array); $i<$n; $i++) { |
|
1058 | $m = $modules_array[$i]; |
|
1059 | ||
1060 | $OSCOM_SM = null; |
|
1061 | ||
1062 | if (strpos($m, '\\') !== false) { |
|
1063 | list($vendor, $app, $module) = explode('\\', $m); |
|
1064 | ||
1065 | $module = $vendor . '\\' . $app . '\\' . $module; |
|
1066 | ||
1067 | $code = 'Shipping_' . str_replace('\\', '_', $module); |
|
1068 | ||
1069 | if (Registry::exists($code)) { |
|
1070 | $OSCOM_SM = Registry::get($code); |
|
1071 | } |
|
1072 | } else { |
|
1073 | $module = substr($m, 0, strrpos($m, '.')); |
|
1074 | ||
1075 | if (is_object($GLOBALS[$module])) { |
|
1076 | $OSCOM_SM = $GLOBALS[$module]; |
|
1077 | } |
|
1078 | } |
|
1079 | ||
1080 | if (isset($OSCOM_SM) && $OSCOM_SM->enabled) { |
|
1081 | $count++; |
|
1082 | } |
|
1083 | } |
|
1084 | ||
1085 | return $count; |
|
1086 | } |
|
1087 | ||
1088 | function tep_array_to_string($array, $exclude = '', $equals = '=', $separator = '&') { |
|
1089 | if (!is_array($exclude)) $exclude = array(); |