Version Notes
Updated bridge.
Download this release
Release Info
Developer | Webinterpret |
Extension | Webinterpret_Connector |
Version | 1.3.4.0 |
Comparing to | |
See all releases |
Code changes from version 1.3.1.1 to 1.3.4.0
- app/code/community/Webinterpret/Connector/Helper/Autoloader.php +174 -0
- app/code/community/Webinterpret/Connector/Helper/Data.php +4 -51
- app/code/community/Webinterpret/Connector/Helper/Verifier.php +68 -0
- app/code/community/Webinterpret/Connector/Lib/Webinterpret/Toolkit/StatusApi/AbstractStatusApiDiagnostics.php +64 -0
- app/code/community/Webinterpret/Connector/Lib/Webinterpret/Toolkit/StatusApi/PlatformDiagnostics.php +98 -0
- app/code/community/Webinterpret/Connector/Lib/Webinterpret/Toolkit/StatusApi/PluginDiagnostics.php +107 -0
- app/code/community/Webinterpret/Connector/Lib/Webinterpret/Toolkit/StatusApi/StatusApi.php +43 -0
- app/code/community/Webinterpret/Connector/Lib/Webinterpret/Toolkit/StatusApi/StatusApiConfigurator.php +70 -0
- app/code/community/Webinterpret/Connector/Lib/Webinterpret/Toolkit/StatusApi/SystemDiagnostics.php +260 -0
- app/code/community/Webinterpret/Connector/Lib/autoload.php +2 -2
- app/code/community/Webinterpret/Connector/Lib/composer/ClassLoader.php +7 -5
- app/code/community/Webinterpret/Connector/Lib/composer/LICENSE +16 -428
- app/code/community/Webinterpret/Connector/Lib/composer/autoload_real.php +24 -17
- app/code/community/Webinterpret/Connector/Lib/composer/autoload_static.php +65 -0
- app/code/community/Webinterpret/Connector/Lib/composer/installed.json +50 -50
- app/code/community/Webinterpret/Connector/bridge2cart/bridge.php +1472 -701
- app/code/community/Webinterpret/Connector/controllers/ConfigurationController.php +66 -0
- app/code/community/Webinterpret/Connector/controllers/DiagnosticsController.php +40 -0
- app/code/community/Webinterpret/Connector/etc/config.xml +26 -17
- package.xml +8 -8
app/code/community/Webinterpret/Connector/Helper/Autoloader.php
ADDED
@@ -0,0 +1,174 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Autoloader helper
|
5 |
+
*
|
6 |
+
* @category Webinterpret
|
7 |
+
* @package Webinterpret_Connector
|
8 |
+
* @author Webinterpret Team <info@webinterpret.com>
|
9 |
+
* @see https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader-examples.md
|
10 |
+
* @license http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*/
|
12 |
+
class Webinterpret_Connector_Helper_Autoloader extends Mage_Core_Helper_Abstract
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* An associative array where the key is a namespace prefix and the value
|
16 |
+
* is an array of base directories for classes in that namespace.
|
17 |
+
*
|
18 |
+
* @var array
|
19 |
+
*/
|
20 |
+
protected $prefixes = array();
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Register loader with SPL autoloader stack.
|
24 |
+
*
|
25 |
+
* @return void
|
26 |
+
*/
|
27 |
+
public function register()
|
28 |
+
{
|
29 |
+
spl_autoload_register(array($this, 'loadClass'));
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Adds a base directory for a namespace prefix.
|
34 |
+
*
|
35 |
+
* @param string $prefix The namespace prefix.
|
36 |
+
* @param string $base_dir A base directory for class files in the
|
37 |
+
* namespace.
|
38 |
+
* @param bool $prepend If true, prepend the base directory to the stack
|
39 |
+
* instead of appending it; this causes it to be searched first rather
|
40 |
+
* than last.
|
41 |
+
*
|
42 |
+
* @return void
|
43 |
+
*/
|
44 |
+
public function addNamespace($prefix, $base_dir, $prepend = false)
|
45 |
+
{
|
46 |
+
// normalize namespace prefix
|
47 |
+
$prefix = trim($prefix, '\\').'\\';
|
48 |
+
|
49 |
+
// normalize the base directory with a trailing separator
|
50 |
+
$base_dir = rtrim($base_dir, DIRECTORY_SEPARATOR).'/';
|
51 |
+
|
52 |
+
// initialize the namespace prefix array
|
53 |
+
if (isset($this->prefixes[$prefix]) === false) {
|
54 |
+
$this->prefixes[$prefix] = array();
|
55 |
+
}
|
56 |
+
|
57 |
+
// retain the base directory for the namespace prefix
|
58 |
+
if ($prepend) {
|
59 |
+
array_unshift($this->prefixes[$prefix], $base_dir);
|
60 |
+
} else {
|
61 |
+
array_push($this->prefixes[$prefix], $base_dir);
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Loads the class file for a given class name.
|
67 |
+
*
|
68 |
+
* @param string $class The fully-qualified class name.
|
69 |
+
*
|
70 |
+
* @return mixed The mapped file name on success, or boolean false on
|
71 |
+
* failure.
|
72 |
+
*/
|
73 |
+
public function loadClass($class)
|
74 |
+
{
|
75 |
+
// the current namespace prefix
|
76 |
+
$prefix = $class;
|
77 |
+
|
78 |
+
// work backwards through the namespace names of the fully-qualified
|
79 |
+
// class name to find a mapped file name
|
80 |
+
while (false !== $pos = strrpos($prefix, '\\')) {
|
81 |
+
|
82 |
+
// retain the trailing namespace separator in the prefix
|
83 |
+
$prefix = substr($class, 0, $pos + 1);
|
84 |
+
|
85 |
+
// the rest is the relative class name
|
86 |
+
$relative_class = substr($class, $pos + 1);
|
87 |
+
|
88 |
+
// try to load a mapped file for the prefix and relative class
|
89 |
+
$mapped_file = $this->loadMappedFile($prefix, $relative_class);
|
90 |
+
if ($mapped_file) {
|
91 |
+
return $mapped_file;
|
92 |
+
}
|
93 |
+
|
94 |
+
// remove the trailing namespace separator for the next iteration
|
95 |
+
// of strrpos()
|
96 |
+
$prefix = rtrim($prefix, '\\');
|
97 |
+
}
|
98 |
+
|
99 |
+
// never found a mapped file
|
100 |
+
return false;
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Load the mapped file for a namespace prefix and relative class.
|
105 |
+
*
|
106 |
+
* @param string $prefix The namespace prefix.
|
107 |
+
* @param string $relative_class The relative class name.
|
108 |
+
*
|
109 |
+
* @return mixed Boolean false if no mapped file can be loaded, or the
|
110 |
+
* name of the mapped file that was loaded.
|
111 |
+
*/
|
112 |
+
protected function loadMappedFile($prefix, $relative_class)
|
113 |
+
{
|
114 |
+
// are there any base directories for this namespace prefix?
|
115 |
+
if (isset($this->prefixes[$prefix]) === false) {
|
116 |
+
return false;
|
117 |
+
}
|
118 |
+
|
119 |
+
// look through base directories for this namespace prefix
|
120 |
+
foreach ($this->prefixes[$prefix] as $base_dir) {
|
121 |
+
|
122 |
+
// replace the namespace prefix with the base directory,
|
123 |
+
// replace namespace separators with directory separators
|
124 |
+
// in the relative class name, append with .php
|
125 |
+
$file = $base_dir
|
126 |
+
.str_replace('\\', '/', $relative_class)
|
127 |
+
.'.php';
|
128 |
+
|
129 |
+
// if the mapped file exists, require it
|
130 |
+
if ($this->requireFile($file)) {
|
131 |
+
// yes, we're done
|
132 |
+
return $file;
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
// never found it
|
137 |
+
return false;
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* If a file exists, require it from the file system.
|
142 |
+
*
|
143 |
+
* @param string $file The file to require.
|
144 |
+
*
|
145 |
+
* @return bool True if the file exists, false if not.
|
146 |
+
*/
|
147 |
+
protected function requireFile($file)
|
148 |
+
{
|
149 |
+
if (file_exists($file)) {
|
150 |
+
require $file;
|
151 |
+
|
152 |
+
return true;
|
153 |
+
}
|
154 |
+
|
155 |
+
return false;
|
156 |
+
}
|
157 |
+
|
158 |
+
public static function createAndRegister()
|
159 |
+
{
|
160 |
+
$libBaseDir = Mage::getModuleDir('', 'Webinterpret_Connector') . '/Lib';
|
161 |
+
self::createAndRegisterWithBaseDir($libBaseDir);
|
162 |
+
}
|
163 |
+
|
164 |
+
public static function createAndRegisterWithBaseDir($libBaseDir)
|
165 |
+
{
|
166 |
+
static $registered = false;
|
167 |
+
if (!$registered) {
|
168 |
+
$autoloader = new self;
|
169 |
+
$autoloader->addNamespace('WebInterpret\\Toolkit\\StatusApi\\', $libBaseDir.'/Webinterpret/Toolkit/StatusApi/');
|
170 |
+
$autoloader->register();
|
171 |
+
$registered = true;
|
172 |
+
}
|
173 |
+
}
|
174 |
+
}
|
app/code/community/Webinterpret/Connector/Helper/Data.php
CHANGED
@@ -180,10 +180,11 @@ class Webinterpret_Connector_Helper_Data extends Mage_Core_Helper_Abstract
|
|
180 |
*/
|
181 |
public function isUserNotAllowSaveCookie()
|
182 |
{
|
183 |
-
if (
|
184 |
-
return
|
185 |
}
|
186 |
-
|
|
|
187 |
}
|
188 |
|
189 |
public function getMagentoVersionString()
|
@@ -463,54 +464,6 @@ class Webinterpret_Connector_Helper_Data extends Mage_Core_Helper_Abstract
|
|
463 |
return (string) Mage::getConfig()->getNode()->modules->Webinterpret_Connector->version;
|
464 |
}
|
465 |
|
466 |
-
/**
|
467 |
-
* @return bool
|
468 |
-
* @throws \Exception
|
469 |
-
*/
|
470 |
-
public function verifyRequest() {
|
471 |
-
if (!function_exists( 'openssl_verify')) {
|
472 |
-
throw new \Exception('OpenSSL is required.');
|
473 |
-
}
|
474 |
-
|
475 |
-
$requestId = $_SERVER['HTTP_WEBINTERPRET_REQUEST_ID'];
|
476 |
-
$signature = $_SERVER['HTTP_WEBINTERPRET_SIGNATURE'];
|
477 |
-
$signature = base64_decode( $signature );
|
478 |
-
|
479 |
-
$version = $_SERVER['HTTP_WEBINTERPRET_SIGNATURE_VERSION'];
|
480 |
-
if (empty( $version )) {
|
481 |
-
$version = 1;
|
482 |
-
}
|
483 |
-
|
484 |
-
// Data
|
485 |
-
$data = $requestId;
|
486 |
-
if ($version == 2) {
|
487 |
-
// Query data
|
488 |
-
$queryArray = $_GET;
|
489 |
-
ksort($queryArray);
|
490 |
-
$queryData = serialize($queryArray);
|
491 |
-
|
492 |
-
// Post data
|
493 |
-
$postData = $_POST;
|
494 |
-
ksort($postData);
|
495 |
-
$postData = serialize($postData);
|
496 |
-
|
497 |
-
$data = $requestId . $queryData . $postData;
|
498 |
-
}
|
499 |
-
|
500 |
-
// Verify signature
|
501 |
-
$public_key = Mage::getStoreConfig('webinterpret_connector/public_key');
|
502 |
-
$ok = openssl_verify($data, $signature, $public_key, OPENSSL_ALGO_SHA1);
|
503 |
-
|
504 |
-
if ($ok == 1) {
|
505 |
-
return true;
|
506 |
-
}
|
507 |
-
if ($ok == 0) {
|
508 |
-
throw new \Exception('Incorrect signature.');
|
509 |
-
}
|
510 |
-
|
511 |
-
throw new \Exception('Error checking signature');
|
512 |
-
}
|
513 |
-
|
514 |
public function getGeoip2DbPath()
|
515 |
{
|
516 |
return Mage::getModuleDir('', 'Webinterpret_Connector') . '/resources/geoip/GeoIP2-Country.mmdb';
|
180 |
*/
|
181 |
public function isUserNotAllowSaveCookie()
|
182 |
{
|
183 |
+
if (Mage::getVersion() < '1.7.0.0') {
|
184 |
+
return false;
|
185 |
}
|
186 |
+
|
187 |
+
return Mage::helper('core/cookie')->isUserNotAllowSaveCookie();
|
188 |
}
|
189 |
|
190 |
public function getMagentoVersionString()
|
464 |
return (string) Mage::getConfig()->getNode()->modules->Webinterpret_Connector->version;
|
465 |
}
|
466 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
467 |
public function getGeoip2DbPath()
|
468 |
{
|
469 |
return Mage::getModuleDir('', 'Webinterpret_Connector') . '/resources/geoip/GeoIP2-Country.mmdb';
|
app/code/community/Webinterpret/Connector/Helper/Verifier.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Verifier helper
|
5 |
+
*
|
6 |
+
* @category Webinterpret
|
7 |
+
* @package Webinterpret_Connector
|
8 |
+
* @author Webinterpret Team <info@webinterpret.com>
|
9 |
+
* @license http://opensource.org/licenses/osl-3.0.php
|
10 |
+
*/
|
11 |
+
class Webinterpret_Connector_Helper_Verifier extends Mage_Core_Helper_Abstract
|
12 |
+
{
|
13 |
+
/**
|
14 |
+
* Verifies if the current request has been correctly signed by WebInterpret
|
15 |
+
*
|
16 |
+
* @return bool
|
17 |
+
* @throws Exception
|
18 |
+
*/
|
19 |
+
public static function verifyRequestWebInterpretSignature()
|
20 |
+
{
|
21 |
+
if (!function_exists('openssl_verify')) {
|
22 |
+
throw new Exception('OpenSSL is required.');
|
23 |
+
}
|
24 |
+
|
25 |
+
if (empty($_SERVER['HTTP_WEBINTERPRET_REQUEST_ID']) || empty ($_SERVER['HTTP_WEBINTERPRET_SIGNATURE']) || empty ($_SERVER['HTTP_WEBINTERPRET_SIGNATURE_VERSION'])) {
|
26 |
+
throw new Exception('Request needs to be signed by WebInterpret.');
|
27 |
+
}
|
28 |
+
|
29 |
+
$requestId = $_SERVER['HTTP_WEBINTERPRET_REQUEST_ID'];
|
30 |
+
$signature = $_SERVER['HTTP_WEBINTERPRET_SIGNATURE'];
|
31 |
+
$signature = base64_decode($signature);
|
32 |
+
|
33 |
+
$version = $_SERVER['HTTP_WEBINTERPRET_SIGNATURE_VERSION'];
|
34 |
+
if (empty($version)) {
|
35 |
+
$version = 1;
|
36 |
+
}
|
37 |
+
|
38 |
+
// Data
|
39 |
+
$data = $requestId;
|
40 |
+
if ($version == 2) {
|
41 |
+
// Query data
|
42 |
+
$queryArray = $_GET;
|
43 |
+
ksort($queryArray);
|
44 |
+
$queryData = serialize($queryArray);
|
45 |
+
|
46 |
+
// Post data
|
47 |
+
$postData = $_POST;
|
48 |
+
ksort($postData);
|
49 |
+
$postData = serialize($postData);
|
50 |
+
|
51 |
+
$data = $requestId.$queryData.$postData;
|
52 |
+
}
|
53 |
+
|
54 |
+
// Verify signature
|
55 |
+
$publicKey = Mage::getStoreConfig('webinterpret_connector/public_key');
|
56 |
+
|
57 |
+
$ok = openssl_verify($data, $signature, $publicKey, OPENSSL_ALGO_SHA1);
|
58 |
+
|
59 |
+
if ($ok == 1) {
|
60 |
+
return true;
|
61 |
+
}
|
62 |
+
if ($ok == 0) {
|
63 |
+
throw new Exception('Incorrect signature.');
|
64 |
+
}
|
65 |
+
|
66 |
+
throw new Exception('Error checking signature');
|
67 |
+
}
|
68 |
+
}
|
app/code/community/Webinterpret/Connector/Lib/Webinterpret/Toolkit/StatusApi/AbstractStatusApiDiagnostics.php
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebInterpret\Toolkit\StatusApi;
|
4 |
+
|
5 |
+
abstract class AbstractStatusApiDiagnostics
|
6 |
+
{
|
7 |
+
|
8 |
+
/**
|
9 |
+
* @var bool
|
10 |
+
*/
|
11 |
+
protected $testsCompleted = false;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* @var array Associative array with test results
|
15 |
+
*/
|
16 |
+
protected $testsResults = array();
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Gets the name of the testing unit (used when combining responses from multiple testers)
|
20 |
+
*
|
21 |
+
* @return string
|
22 |
+
*/
|
23 |
+
abstract public function getName();
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Returns array with tests results. If tests were not run yet, they will be launched automatically
|
27 |
+
*
|
28 |
+
* @return array
|
29 |
+
*/
|
30 |
+
public function getTestsResults()
|
31 |
+
{
|
32 |
+
if (!$this->testsCompleted) {
|
33 |
+
$this->runDiagnostics();
|
34 |
+
}
|
35 |
+
|
36 |
+
return $this->testsResults;
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Returns tests results
|
41 |
+
*
|
42 |
+
* @return array
|
43 |
+
*/
|
44 |
+
abstract protected function getTestsResult();
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Runs all of the tests and stores the result (can be used to re-run tests to update results if needed)
|
48 |
+
*
|
49 |
+
* @return bool
|
50 |
+
*/
|
51 |
+
protected function runDiagnostics()
|
52 |
+
{
|
53 |
+
try {
|
54 |
+
$this->testsResults = $this->getTestsResult();
|
55 |
+
|
56 |
+
$this->testsCompleted = true;
|
57 |
+
} catch (\Exception $e) {
|
58 |
+
// fixme log & handle error
|
59 |
+
return false;
|
60 |
+
}
|
61 |
+
|
62 |
+
return true;
|
63 |
+
}
|
64 |
+
}
|
app/code/community/Webinterpret/Connector/Lib/Webinterpret/Toolkit/StatusApi/PlatformDiagnostics.php
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebInterpret\Toolkit\StatusApi;
|
4 |
+
|
5 |
+
use WebInterpret\Bridge\eCommercePlatformBridge;
|
6 |
+
use WebInterpret\Bridge\WordpressBridge;
|
7 |
+
|
8 |
+
class PlatformDiagnostics extends AbstractStatusApiDiagnostics
|
9 |
+
{
|
10 |
+
|
11 |
+
/**
|
12 |
+
* @inheritdoc
|
13 |
+
*/
|
14 |
+
public function getName()
|
15 |
+
{
|
16 |
+
return 'platform';
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* @inheritdoc
|
21 |
+
*/
|
22 |
+
protected function getTestsResult()
|
23 |
+
{
|
24 |
+
return array(
|
25 |
+
'platform_name' => 'magento',
|
26 |
+
'platform_version' => \Mage::getVersion(),
|
27 |
+
'magento' => $this->getMagentoInfo(),
|
28 |
+
);
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* @return array
|
33 |
+
*/
|
34 |
+
private function getMagentoInfo()
|
35 |
+
{
|
36 |
+
return array(
|
37 |
+
'compiler_enabled' => defined('COMPILER_INCLUDE_PATH') ? true : false,
|
38 |
+
'stores' => $this->getStoresInfo(),
|
39 |
+
'websites' => $this->getWebsitesInfo(),
|
40 |
+
'modules' => $this->getModulesInfo(),
|
41 |
+
);
|
42 |
+
}
|
43 |
+
|
44 |
+
private function getStoresInfo()
|
45 |
+
{
|
46 |
+
$storesInfo = array();
|
47 |
+
|
48 |
+
$stores = \Mage::app()->getStores();
|
49 |
+
/**
|
50 |
+
* @var \Mage_Core_Model_Store $store
|
51 |
+
*/
|
52 |
+
foreach ($stores as $store) {
|
53 |
+
$storeLocale = \Mage::getStoreConfig(\Mage_Core_Model_Locale::XML_PATH_DEFAULT_LOCALE, $store->getId());
|
54 |
+
$storeBaseCountry = \Mage::getStoreConfig('general/country/default', $store->getId());
|
55 |
+
|
56 |
+
$storesInfo[] = array(
|
57 |
+
'store_id' => $store->getId(),
|
58 |
+
'store_code' => $store->getCode(),
|
59 |
+
'store_name' => $store->getName(),
|
60 |
+
'store_base_url' => $store->getBaseUrl(),
|
61 |
+
'store_locale' => $storeLocale,
|
62 |
+
'store_base_country' => $storeBaseCountry,
|
63 |
+
'store_website_id' => $store->getWebsiteId(),
|
64 |
+
'store_group_id' => $store->getGroupId(),
|
65 |
+
'store_active' => $store->getIsActive(),
|
66 |
+
);
|
67 |
+
}
|
68 |
+
|
69 |
+
return $storesInfo;
|
70 |
+
}
|
71 |
+
|
72 |
+
private function getWebsitesInfo()
|
73 |
+
{
|
74 |
+
$websitesInfo = array();
|
75 |
+
|
76 |
+
$websites = \Mage::app()->getWebsites();
|
77 |
+
/**
|
78 |
+
* @var \Mage_Core_Model_Website $website
|
79 |
+
*/
|
80 |
+
foreach ($websites as $website) {
|
81 |
+
$websitesInfo = array(
|
82 |
+
'website_id' => $website->getId(),
|
83 |
+
'website_code' => $website->getCode(),
|
84 |
+
'website_name' => $website->getName(),
|
85 |
+
'website_is_default' => $website->getIsDefault(),
|
86 |
+
);
|
87 |
+
}
|
88 |
+
|
89 |
+
return $websitesInfo;
|
90 |
+
}
|
91 |
+
|
92 |
+
private function getModulesInfo()
|
93 |
+
{
|
94 |
+
$modules = (array)\Mage::getConfig()->getNode('modules')->children();
|
95 |
+
|
96 |
+
return array_keys($modules);
|
97 |
+
}
|
98 |
+
}
|
app/code/community/Webinterpret/Connector/Lib/Webinterpret/Toolkit/StatusApi/PluginDiagnostics.php
ADDED
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebInterpret\Toolkit\StatusApi;
|
4 |
+
|
5 |
+
class PluginDiagnostics extends AbstractStatusApiDiagnostics
|
6 |
+
{
|
7 |
+
|
8 |
+
/**
|
9 |
+
* @var \Mage_Core_Model_App
|
10 |
+
*/
|
11 |
+
private $app;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* @var \Mage_Core_Model_Config
|
15 |
+
*/
|
16 |
+
private $config;
|
17 |
+
|
18 |
+
/**
|
19 |
+
* @param \Mage_Core_Model_Config $config
|
20 |
+
*/
|
21 |
+
public function __construct(\Mage_Core_Model_App $app, \Mage_Core_Model_Config $config)
|
22 |
+
{
|
23 |
+
$this->app = $app;
|
24 |
+
$this->config = $config;
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* @inheritdoc
|
29 |
+
*/
|
30 |
+
public function getName()
|
31 |
+
{
|
32 |
+
return 'plugin';
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* @inheritdoc
|
37 |
+
*/
|
38 |
+
protected function getTestsResult()
|
39 |
+
{
|
40 |
+
return array(
|
41 |
+
'plugin_version' => $this->getPluginVersion(),
|
42 |
+
'plugin_enabled' => $this->isPluginEnabled(),
|
43 |
+
'store_token' => $this->getStoreToken(),
|
44 |
+
'store_extender_enabled' => $this->isStoreExtenderEnabled(),
|
45 |
+
'backend_redirector_enabled' => $this->isBackendRedirectorEnabled(),
|
46 |
+
'updates_dir' => null,
|
47 |
+
'is_updatable' => $this->isUpdatable(),
|
48 |
+
'active_settings' => $this->getDatabaseSettings(),
|
49 |
+
);
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* @return string
|
54 |
+
*/
|
55 |
+
private function getPluginVersion()
|
56 |
+
{
|
57 |
+
return (string)$this->config->getNode()->modules->Webinterpret_Connector->version;
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* @return bool
|
62 |
+
*/
|
63 |
+
private function isUpdatable()
|
64 |
+
{
|
65 |
+
return (bool)$this->app->getStore()->getConfig('webinterpret_connector/automatic_updates_enabled');
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* @return bool
|
70 |
+
*/
|
71 |
+
private function isPluginEnabled()
|
72 |
+
{
|
73 |
+
return (bool)$this->app->getStore()->getConfig('webinterpret_connector/enabled');
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* @return string|null
|
78 |
+
*/
|
79 |
+
private function getStoreToken()
|
80 |
+
{
|
81 |
+
return (string)$this->app->getStore()->getConfig('webinterpret_connector/key');
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* @return bool
|
86 |
+
*/
|
87 |
+
private function isStoreExtenderEnabled()
|
88 |
+
{
|
89 |
+
return (bool)$this->app->getStore()->getConfig('webinterpret_connector/store_extender_enabled"');
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* @return bool
|
94 |
+
*/
|
95 |
+
private function isBackendRedirectorEnabled()
|
96 |
+
{
|
97 |
+
return (bool)$this->app->getStore()->getConfig('webinterpret_connector/backend_redirector_enabled');
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* @return array
|
102 |
+
*/
|
103 |
+
private function getDatabaseSettings()
|
104 |
+
{
|
105 |
+
return $this->app->getStore()->getConfig('webinterpret_connector');
|
106 |
+
}
|
107 |
+
}
|
app/code/community/Webinterpret/Connector/Lib/Webinterpret/Toolkit/StatusApi/StatusApi.php
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebInterpret\Toolkit\StatusApi;
|
4 |
+
|
5 |
+
class StatusApi
|
6 |
+
{
|
7 |
+
|
8 |
+
/**
|
9 |
+
* @var array of AbstractStatusApiDiagnostics testers
|
10 |
+
*/
|
11 |
+
private $testers;
|
12 |
+
|
13 |
+
public function __construct()
|
14 |
+
{
|
15 |
+
$this->testers = array();
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Adds a tester to the testing suite
|
20 |
+
*
|
21 |
+
* @param AbstractStatusApiDiagnostics $tester
|
22 |
+
*/
|
23 |
+
public function addTester(AbstractStatusApiDiagnostics $tester)
|
24 |
+
{
|
25 |
+
$this->testers[] = $tester;
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Runs tests on all of the attached testers and returns the result
|
30 |
+
*
|
31 |
+
* @return string JSON encoded array with diagnostics information
|
32 |
+
*/
|
33 |
+
public function getJsonTestResults()
|
34 |
+
{
|
35 |
+
$result = array();
|
36 |
+
|
37 |
+
foreach ($this->testers as $tester) {
|
38 |
+
$result[$tester->getName()] = $tester->getTestsResults();
|
39 |
+
}
|
40 |
+
|
41 |
+
return json_encode($result);
|
42 |
+
}
|
43 |
+
}
|
app/code/community/Webinterpret/Connector/Lib/Webinterpret/Toolkit/StatusApi/StatusApiConfigurator.php
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebInterpret\Toolkit\StatusApi;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Factory for preconfigured StatusApi objects
|
7 |
+
*/
|
8 |
+
class StatusApiConfigurator
|
9 |
+
{
|
10 |
+
/**
|
11 |
+
* @var \Mage_Core_Model_App
|
12 |
+
*/
|
13 |
+
private $app;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* @var \Mage_Core_Model_Config
|
17 |
+
*/
|
18 |
+
private $config;
|
19 |
+
|
20 |
+
public function __construct(\Mage_Core_Model_App $app, \Mage_Core_Model_Config $config)
|
21 |
+
{
|
22 |
+
$this->app = $app;
|
23 |
+
$this->config = $config;
|
24 |
+
}
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Returns StatusApi with full suite of diagnostics testers preconfigured
|
28 |
+
*
|
29 |
+
* @return StatusApi
|
30 |
+
*/
|
31 |
+
public function getExtendedStatusApi()
|
32 |
+
{
|
33 |
+
$statusApi = new StatusApi();
|
34 |
+
$statusApi->addTester($this->getPluginDiagnosticsTester());
|
35 |
+
$statusApi->addTester($this->getPlatformDiagnosticsTester());
|
36 |
+
$statusApi->addTester($this->getSystemDiagnosticsTester());
|
37 |
+
|
38 |
+
return $statusApi;
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* @return PluginDiagnostics
|
43 |
+
*/
|
44 |
+
private function getPluginDiagnosticsTester()
|
45 |
+
{
|
46 |
+
$tester = new PluginDiagnostics($this->app, $this->config);
|
47 |
+
|
48 |
+
return $tester;
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* @return PlatformDiagnostics
|
53 |
+
*/
|
54 |
+
private function getPlatformDiagnosticsTester()
|
55 |
+
{
|
56 |
+
$tester = new PlatformDiagnostics();
|
57 |
+
|
58 |
+
return $tester;
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* @return SystemDiagnostics
|
63 |
+
*/
|
64 |
+
private function getSystemDiagnosticsTester()
|
65 |
+
{
|
66 |
+
$tester = new SystemDiagnostics();
|
67 |
+
|
68 |
+
return $tester;
|
69 |
+
}
|
70 |
+
}
|
app/code/community/Webinterpret/Connector/Lib/Webinterpret/Toolkit/StatusApi/SystemDiagnostics.php
ADDED
@@ -0,0 +1,260 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebInterpret\Toolkit\StatusApi;
|
4 |
+
|
5 |
+
class SystemDiagnostics extends AbstractStatusApiDiagnostics {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* @inheritdoc
|
9 |
+
*/
|
10 |
+
public function getName() {
|
11 |
+
return 'system';
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @inheritdoc
|
16 |
+
*/
|
17 |
+
protected function getTestsResult() {
|
18 |
+
return array(
|
19 |
+
'php_version' => $this->getPhpVersion(),
|
20 |
+
'curl_available' => $this->isCurlAvailable(),
|
21 |
+
'curl_version' => $this->isCurlAvailable() ? $this->getCurlVersion() : null,
|
22 |
+
'curl_ssl_support_enabled' => $this->isCurlAvailable() ? $this->isCurlSSLSupportEnabled() : null,
|
23 |
+
'curl_ssl_version' => $this->isCurlSSLSupportEnabled() ? $this->getCurlSSLVersion() : null,
|
24 |
+
'openssl_available' => $this->isOpenSSLAvailable(),
|
25 |
+
'openssl_version' => $this->isOpenSSLAvailable() ? $this->getOpenSSLVersion() : null,
|
26 |
+
'db_support' => $this->getDbSupport(),
|
27 |
+
'allow_url_fopen_enabled' => $this->isAllowUrlFopenEnabled(),
|
28 |
+
'register_globals_enabled' => $this->isRegisterGlobalsEnabled(),
|
29 |
+
'post_max_size' => $this->getPostMaxSize(),
|
30 |
+
'php_time_limit' => $this->getMaxExecutionTime(),
|
31 |
+
'opcache_enabled' => $this->isOpcacheEnabled(),
|
32 |
+
'apc_enabled' => $this->isApcEnabled(),
|
33 |
+
'current_datetime' => date( 'Y-m-d H:i:s' ),
|
34 |
+
'timezone' => date_default_timezone_get(),
|
35 |
+
'php_sapi_name' => $this->getPhpSapiName(),
|
36 |
+
'is_hhvm' => $this->isHhvm(),
|
37 |
+
'is_suhosin' => $this->isSuhosin(),
|
38 |
+
'operating_system' => $this->getOsInfo(),
|
39 |
+
'server' => $this->getServerInfo(),
|
40 |
+
'apache' => $this->getApacheInfo(),
|
41 |
+
'php' => $this->getPhpInformation(),
|
42 |
+
'php_extensions' => get_loaded_extensions(),
|
43 |
+
|
44 |
+
);
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* @return string
|
49 |
+
*/
|
50 |
+
private function getPhpVersion() {
|
51 |
+
return phpversion();
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* @return bool
|
56 |
+
*/
|
57 |
+
private function isCurlAvailable() {
|
58 |
+
return extension_loaded( 'curl' ) && function_exists( 'curl_version' ) ? true : false;
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* @return array|null
|
63 |
+
*/
|
64 |
+
private function getCurlVersionInfoArray() {
|
65 |
+
if ( ! function_exists( 'curl_version' ) ) {
|
66 |
+
return null;
|
67 |
+
}
|
68 |
+
|
69 |
+
return curl_version();
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* @return string|null
|
74 |
+
*/
|
75 |
+
private function getCurlVersion() {
|
76 |
+
$curlVersion = $this->getCurlVersionInfoArray();
|
77 |
+
|
78 |
+
if ( ! is_array( $curlVersion ) || ! isset( $curlVersion['version'] ) ) {
|
79 |
+
return null;
|
80 |
+
}
|
81 |
+
|
82 |
+
return $curlVersion['version'];
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* @return bool|null
|
87 |
+
*/
|
88 |
+
private function isCurlSSLSupportEnabled() {
|
89 |
+
$curlVersion = $this->getCurlVersionInfoArray();
|
90 |
+
|
91 |
+
if ( ! is_array( $curlVersion ) || ! isset( $curlVersion['features'] ) || ! defined( 'CURL_VERSION_SSL' ) ) {
|
92 |
+
return null;
|
93 |
+
}
|
94 |
+
|
95 |
+
// checks if the CURL_VERSION_SSL bitwise flag is enabled
|
96 |
+
return ( $curlVersion['features'] & CURL_VERSION_SSL ) == CURL_VERSION_SSL;
|
97 |
+
}
|
98 |
+
|
99 |
+
private function getCurlSSLVersion() {
|
100 |
+
if ( ! $this->isOpenSSLAvailable() ) {
|
101 |
+
return null;
|
102 |
+
}
|
103 |
+
|
104 |
+
$curl_version = $this->getCurlVersionInfoArray();
|
105 |
+
|
106 |
+
if ( ! is_array( $curl_version ) || ! isset( $curl_version['ssl_version'] ) ) {
|
107 |
+
return null;
|
108 |
+
}
|
109 |
+
|
110 |
+
return $curl_version['ssl_version'];
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* @return bool
|
115 |
+
*/
|
116 |
+
private function isOpenSSLAvailable() {
|
117 |
+
return extension_loaded( 'openssl' );
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* @return null|string
|
122 |
+
*/
|
123 |
+
private function getOpenSSLVersion() {
|
124 |
+
if ( ! $this->isOpenSSLAvailable() || ! defined( 'OPENSSL_VERSION_TEXT' ) ) {
|
125 |
+
return null;
|
126 |
+
}
|
127 |
+
|
128 |
+
return OPENSSL_VERSION_TEXT;
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* @return array
|
133 |
+
*/
|
134 |
+
private function getDbSupport() {
|
135 |
+
return array(
|
136 |
+
'mysql' => function_exists( 'mysql_connect' ),
|
137 |
+
'mysqli' => function_exists( 'mysqli_connect' ),
|
138 |
+
'pg' => function_exists( 'pg_connect' ),
|
139 |
+
'pdo' => extension_loaded( 'PDO' ),
|
140 |
+
'pdo_mysql' => extension_loaded( 'pdo_mysql' ),
|
141 |
+
'pdo_pgsql' => extension_loaded( 'pdo_pgsql' ),
|
142 |
+
'pdo_drivers' => extension_loaded( 'PDO' ) ? \PDO::getAvailableDrivers() : null
|
143 |
+
);
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* @return bool
|
148 |
+
*/
|
149 |
+
private function isAllowUrlFopenEnabled() {
|
150 |
+
return ini_get( 'allow_url_fopen' ) == true;
|
151 |
+
}
|
152 |
+
|
153 |
+
/**
|
154 |
+
* @return bool
|
155 |
+
*/
|
156 |
+
private function isRegisterGlobalsEnabled() {
|
157 |
+
return ini_get( 'register_globals' ) == true;
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* @return string
|
162 |
+
*/
|
163 |
+
private function getPostMaxSize() {
|
164 |
+
return ini_get( 'post_max_size' );
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* @return string
|
169 |
+
*/
|
170 |
+
private function getMaxExecutionTime() {
|
171 |
+
return ini_get( 'max_execution_time' );
|
172 |
+
}
|
173 |
+
|
174 |
+
/**
|
175 |
+
* @return bool
|
176 |
+
*/
|
177 |
+
private function isOpcacheEnabled() {
|
178 |
+
return extension_loaded( 'Zend OPcache' ) && ini_get( 'opcache.enable' ) ? true : false;
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* @return bool
|
183 |
+
*/
|
184 |
+
private function isApcEnabled() {
|
185 |
+
return extension_loaded( 'apc' ) && ini_get( 'apc.enabled' ) ? true : false;
|
186 |
+
}
|
187 |
+
|
188 |
+
/**
|
189 |
+
* @return string
|
190 |
+
*/
|
191 |
+
private function getPhpSapiName() {
|
192 |
+
return php_sapi_name();
|
193 |
+
}
|
194 |
+
|
195 |
+
/**
|
196 |
+
* @return bool
|
197 |
+
*/
|
198 |
+
private function isHhvm() {
|
199 |
+
return defined( 'HHVM_VERSION' ) ? true : false;
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* @return bool
|
204 |
+
*/
|
205 |
+
private function isSuhosin() {
|
206 |
+
return extension_loaded( 'suhosin' );
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* @return array
|
211 |
+
*/
|
212 |
+
private function getOsInfo() {
|
213 |
+
return array(
|
214 |
+
'os_name' => php_uname( 's' ),
|
215 |
+
'release_name' => php_uname( 'r' ),
|
216 |
+
'version' => php_uname( 'v' ),
|
217 |
+
'machine_type' => php_uname( 'm' ),
|
218 |
+
'os_host_name' => php_uname( 'n' ),
|
219 |
+
);
|
220 |
+
}
|
221 |
+
|
222 |
+
/**
|
223 |
+
* @return array
|
224 |
+
*/
|
225 |
+
private function getServerInfo() {
|
226 |
+
return array(
|
227 |
+
'server_software' => isset( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] : null,
|
228 |
+
'server_name' => isset( $_SERVER['SERVER_NAME'] ) ? $_SERVER['SERVER_NAME'] : null,
|
229 |
+
'server_addr' => isset( $_SERVER['SERVER_ADDR'] ) ? $_SERVER['SERVER_ADDR'] : null,
|
230 |
+
'server_port' => isset( $_SERVER['SERVER_PORT'] ) ? $_SERVER['SERVER_PORT'] : null,
|
231 |
+
'https' => isset( $_SERVER['HTTPS'] ) ? $_SERVER['HTTPS'] : false,
|
232 |
+
'document_root' => isset( $_SERVER['DOCUMENT_ROOT'] ) ? $_SERVER['DOCUMENT_ROOT'] : null,
|
233 |
+
'script_filename' => isset( $_SERVER['SCRIPT_FILENAME'] ) ? $_SERVER['SCRIPT_FILENAME'] : null,
|
234 |
+
);
|
235 |
+
}
|
236 |
+
|
237 |
+
/**
|
238 |
+
* @return array
|
239 |
+
*/
|
240 |
+
private function getApacheInfo() {
|
241 |
+
if(!function_exists('apache_get_version') || !function_exists('apache_get_modules')) {
|
242 |
+
return array();
|
243 |
+
}
|
244 |
+
return array(
|
245 |
+
'version' => apache_get_version(),
|
246 |
+
'modules' => apache_get_modules()
|
247 |
+
);
|
248 |
+
}
|
249 |
+
|
250 |
+
/**
|
251 |
+
* @return array
|
252 |
+
*/
|
253 |
+
private function getPhpInformation() {
|
254 |
+
return array(
|
255 |
+
'php_ini' => php_ini_loaded_file(),
|
256 |
+
'parsed_ini_files' => php_ini_scanned_files()
|
257 |
+
);
|
258 |
+
}
|
259 |
+
|
260 |
+
}
|
app/code/community/Webinterpret/Connector/Lib/autoload.php
CHANGED
@@ -2,6 +2,6 @@
|
|
2 |
|
3 |
// autoload.php @generated by Composer
|
4 |
|
5 |
-
require_once __DIR__ . '/composer
|
6 |
|
7 |
-
return
|
2 |
|
3 |
// autoload.php @generated by Composer
|
4 |
|
5 |
+
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInita645de5498819440995422a042fbf08c::getLoader();
|
app/code/community/Webinterpret/Connector/Lib/composer/ClassLoader.php
CHANGED
@@ -53,8 +53,8 @@ class ClassLoader
|
|
53 |
|
54 |
private $useIncludePath = false;
|
55 |
private $classMap = array();
|
56 |
-
|
57 |
private $classMapAuthoritative = false;
|
|
|
58 |
|
59 |
public function getPrefixes()
|
60 |
{
|
@@ -322,20 +322,20 @@ class ClassLoader
|
|
322 |
if (isset($this->classMap[$class])) {
|
323 |
return $this->classMap[$class];
|
324 |
}
|
325 |
-
if ($this->classMapAuthoritative) {
|
326 |
return false;
|
327 |
}
|
328 |
|
329 |
$file = $this->findFileWithExtension($class, '.php');
|
330 |
|
331 |
// Search for Hack files if we are running on HHVM
|
332 |
-
if (
|
333 |
$file = $this->findFileWithExtension($class, '.hh');
|
334 |
}
|
335 |
|
336 |
-
if (
|
337 |
// Remember that this class does not exist.
|
338 |
-
|
339 |
}
|
340 |
|
341 |
return $file;
|
@@ -399,6 +399,8 @@ class ClassLoader
|
|
399 |
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
|
400 |
return $file;
|
401 |
}
|
|
|
|
|
402 |
}
|
403 |
}
|
404 |
|
53 |
|
54 |
private $useIncludePath = false;
|
55 |
private $classMap = array();
|
|
|
56 |
private $classMapAuthoritative = false;
|
57 |
+
private $missingClasses = array();
|
58 |
|
59 |
public function getPrefixes()
|
60 |
{
|
322 |
if (isset($this->classMap[$class])) {
|
323 |
return $this->classMap[$class];
|
324 |
}
|
325 |
+
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
|
326 |
return false;
|
327 |
}
|
328 |
|
329 |
$file = $this->findFileWithExtension($class, '.php');
|
330 |
|
331 |
// Search for Hack files if we are running on HHVM
|
332 |
+
if (false === $file && defined('HHVM_VERSION')) {
|
333 |
$file = $this->findFileWithExtension($class, '.hh');
|
334 |
}
|
335 |
|
336 |
+
if (false === $file) {
|
337 |
// Remember that this class does not exist.
|
338 |
+
$this->missingClasses[$class] = true;
|
339 |
}
|
340 |
|
341 |
return $file;
|
399 |
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
|
400 |
return $file;
|
401 |
}
|
402 |
+
|
403 |
+
return false;
|
404 |
}
|
405 |
}
|
406 |
|
app/code/community/Webinterpret/Connector/Lib/composer/LICENSE
CHANGED
@@ -1,433 +1,21 @@
|
|
1 |
-
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
2 |
-
Upstream-Name: Composer
|
3 |
-
Upstream-Contact: Jordi Boggiano <j.boggiano@seld.be>
|
4 |
-
Source: https://github.com/composer/composer
|
5 |
|
6 |
-
|
7 |
-
Copyright: 2016, Nils Adermann <naderman@naderman.de>
|
8 |
-
2016, Jordi Boggiano <j.boggiano@seld.be>
|
9 |
-
License: Expat
|
10 |
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
Copyright: 2016, Nils Adermann <naderman@naderman.de>
|
18 |
-
2016, Jordi Boggiano <j.boggiano@seld.be>
|
19 |
-
2013, Evan Coury <me@evancoury.com>
|
20 |
-
License: Expat and BSD-2-Clause
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
.
|
29 |
-
* Redistributions in binary form must reproduce the above copyright notice,
|
30 |
-
this list of conditions and the following disclaimer in the documentation
|
31 |
-
and/or other materials provided with the distribution.
|
32 |
-
.
|
33 |
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
34 |
-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
35 |
-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
36 |
-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
37 |
-
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
38 |
-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
39 |
-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
40 |
-
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
41 |
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
42 |
-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
43 |
|
44 |
-
License: Expat
|
45 |
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
46 |
-
of this software and associated documentation files (the "Software"), to deal
|
47 |
-
in the Software without restriction, including without limitation the rights
|
48 |
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
49 |
-
copies of the Software, and to permit persons to whom the Software is furnished
|
50 |
-
to do so, subject to the following conditions:
|
51 |
-
.
|
52 |
-
The above copyright notice and this permission notice shall be included in all
|
53 |
-
copies or substantial portions of the Software.
|
54 |
-
.
|
55 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
56 |
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
57 |
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
58 |
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
59 |
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
60 |
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
61 |
-
THE SOFTWARE.
|
62 |
-
|
63 |
-
License: MPL-2.0
|
64 |
-
1. Definitions
|
65 |
-
--------------
|
66 |
-
.
|
67 |
-
1.1. "Contributor"
|
68 |
-
means each individual or legal entity that creates, contributes to
|
69 |
-
the creation of, or owns Covered Software.
|
70 |
-
.
|
71 |
-
1.2. "Contributor Version"
|
72 |
-
means the combination of the Contributions of others (if any) used
|
73 |
-
by a Contributor and that particular Contributor's Contribution.
|
74 |
-
.
|
75 |
-
1.3. "Contribution"
|
76 |
-
means Covered Software of a particular Contributor.
|
77 |
-
.
|
78 |
-
1.4. "Covered Software"
|
79 |
-
means Source Code Form to which the initial Contributor has attached
|
80 |
-
the notice in Exhibit A, the Executable Form of such Source Code
|
81 |
-
Form, and Modifications of such Source Code Form, in each case
|
82 |
-
including portions thereof.
|
83 |
-
.
|
84 |
-
1.5. "Incompatible With Secondary Licenses"
|
85 |
-
means
|
86 |
-
.
|
87 |
-
(a) that the initial Contributor has attached the notice described
|
88 |
-
in Exhibit B to the Covered Software; or
|
89 |
-
.
|
90 |
-
(b) that the Covered Software was made available under the terms of
|
91 |
-
version 1.1 or earlier of the License, but not also under the
|
92 |
-
terms of a Secondary License.
|
93 |
-
.
|
94 |
-
1.6. "Executable Form"
|
95 |
-
means any form of the work other than Source Code Form.
|
96 |
-
.
|
97 |
-
1.7. "Larger Work"
|
98 |
-
means a work that combines Covered Software with other material, in
|
99 |
-
a separate file or files, that is not Covered Software.
|
100 |
-
.
|
101 |
-
1.8. "License"
|
102 |
-
means this document.
|
103 |
-
.
|
104 |
-
1.9. "Licensable"
|
105 |
-
means having the right to grant, to the maximum extent possible,
|
106 |
-
whether at the time of the initial grant or subsequently, any and
|
107 |
-
all of the rights conveyed by this License.
|
108 |
-
.
|
109 |
-
1.10. "Modifications"
|
110 |
-
means any of the following:
|
111 |
-
.
|
112 |
-
(a) any file in Source Code Form that results from an addition to,
|
113 |
-
deletion from, or modification of the contents of Covered
|
114 |
-
Software; or
|
115 |
-
.
|
116 |
-
(b) any new file in Source Code Form that contains any Covered
|
117 |
-
Software.
|
118 |
-
.
|
119 |
-
1.11. "Patent Claims" of a Contributor
|
120 |
-
means any patent claim(s), including without limitation, method,
|
121 |
-
process, and apparatus claims, in any patent Licensable by such
|
122 |
-
Contributor that would be infringed, but for the grant of the
|
123 |
-
License, by the making, using, selling, offering for sale, having
|
124 |
-
made, import, or transfer of either its Contributions or its
|
125 |
-
Contributor Version.
|
126 |
-
.
|
127 |
-
1.12. "Secondary License"
|
128 |
-
means either the GNU General Public License, Version 2.0, the GNU
|
129 |
-
Lesser General Public License, Version 2.1, the GNU Affero General
|
130 |
-
Public License, Version 3.0, or any later versions of those
|
131 |
-
licenses.
|
132 |
-
.
|
133 |
-
1.13. "Source Code Form"
|
134 |
-
means the form of the work preferred for making modifications.
|
135 |
-
.
|
136 |
-
1.14. "You" (or "Your")
|
137 |
-
means an individual or a legal entity exercising rights under this
|
138 |
-
License. For legal entities, "You" includes any entity that
|
139 |
-
controls, is controlled by, or is under common control with You. For
|
140 |
-
purposes of this definition, "control" means (a) the power, direct
|
141 |
-
or indirect, to cause the direction or management of such entity,
|
142 |
-
whether by contract or otherwise, or (b) ownership of more than
|
143 |
-
fifty percent (50%) of the outstanding shares or beneficial
|
144 |
-
ownership of such entity.
|
145 |
-
.
|
146 |
-
2. License Grants and Conditions
|
147 |
-
--------------------------------
|
148 |
-
.
|
149 |
-
2.1. Grants
|
150 |
-
.
|
151 |
-
Each Contributor hereby grants You a world-wide, royalty-free,
|
152 |
-
non-exclusive license:
|
153 |
-
.
|
154 |
-
(a) under intellectual property rights (other than patent or trademark)
|
155 |
-
Licensable by such Contributor to use, reproduce, make available,
|
156 |
-
modify, display, perform, distribute, and otherwise exploit its
|
157 |
-
Contributions, either on an unmodified basis, with Modifications, or
|
158 |
-
as part of a Larger Work; and
|
159 |
-
.
|
160 |
-
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
161 |
-
for sale, have made, import, and otherwise transfer either its
|
162 |
-
Contributions or its Contributor Version.
|
163 |
-
.
|
164 |
-
2.2. Effective Date
|
165 |
-
.
|
166 |
-
The licenses granted in Section 2.1 with respect to any Contribution
|
167 |
-
become effective for each Contribution on the date the Contributor first
|
168 |
-
distributes such Contribution.
|
169 |
-
.
|
170 |
-
2.3. Limitations on Grant Scope
|
171 |
-
.
|
172 |
-
The licenses granted in this Section 2 are the only rights granted under
|
173 |
-
this License. No additional rights or licenses will be implied from the
|
174 |
-
distribution or licensing of Covered Software under this License.
|
175 |
-
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
176 |
-
Contributor:
|
177 |
-
.
|
178 |
-
(a) for any code that a Contributor has removed from Covered Software;
|
179 |
-
or
|
180 |
-
.
|
181 |
-
(b) for infringements caused by: (i) Your and any other third party's
|
182 |
-
modifications of Covered Software, or (ii) the combination of its
|
183 |
-
Contributions with other software (except as part of its Contributor
|
184 |
-
Version); or
|
185 |
-
.
|
186 |
-
(c) under Patent Claims infringed by Covered Software in the absence of
|
187 |
-
its Contributions.
|
188 |
-
.
|
189 |
-
This License does not grant any rights in the trademarks, service marks,
|
190 |
-
or logos of any Contributor (except as may be necessary to comply with
|
191 |
-
the notice requirements in Section 3.4).
|
192 |
-
.
|
193 |
-
2.4. Subsequent Licenses
|
194 |
-
.
|
195 |
-
No Contributor makes additional grants as a result of Your choice to
|
196 |
-
distribute the Covered Software under a subsequent version of this
|
197 |
-
License (see Section 10.2) or under the terms of a Secondary License (if
|
198 |
-
permitted under the terms of Section 3.3).
|
199 |
-
.
|
200 |
-
2.5. Representation
|
201 |
-
.
|
202 |
-
Each Contributor represents that the Contributor believes its
|
203 |
-
Contributions are its original creation(s) or it has sufficient rights
|
204 |
-
to grant the rights to its Contributions conveyed by this License.
|
205 |
-
.
|
206 |
-
2.6. Fair Use
|
207 |
-
.
|
208 |
-
This License is not intended to limit any rights You have under
|
209 |
-
applicable copyright doctrines of fair use, fair dealing, or other
|
210 |
-
equivalents.
|
211 |
-
.
|
212 |
-
2.7. Conditions
|
213 |
-
.
|
214 |
-
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
215 |
-
in Section 2.1.
|
216 |
-
.
|
217 |
-
3. Responsibilities
|
218 |
-
-------------------
|
219 |
-
.
|
220 |
-
3.1. Distribution of Source Form
|
221 |
-
.
|
222 |
-
All distribution of Covered Software in Source Code Form, including any
|
223 |
-
Modifications that You create or to which You contribute, must be under
|
224 |
-
the terms of this License. You must inform recipients that the Source
|
225 |
-
Code Form of the Covered Software is governed by the terms of this
|
226 |
-
License, and how they can obtain a copy of this License. You may not
|
227 |
-
attempt to alter or restrict the recipients' rights in the Source Code
|
228 |
-
Form.
|
229 |
-
.
|
230 |
-
3.2. Distribution of Executable Form
|
231 |
-
.
|
232 |
-
If You distribute Covered Software in Executable Form then:
|
233 |
-
.
|
234 |
-
(a) such Covered Software must also be made available in Source Code
|
235 |
-
Form, as described in Section 3.1, and You must inform recipients of
|
236 |
-
the Executable Form how they can obtain a copy of such Source Code
|
237 |
-
Form by reasonable means in a timely manner, at a charge no more
|
238 |
-
than the cost of distribution to the recipient; and
|
239 |
-
.
|
240 |
-
(b) You may distribute such Executable Form under the terms of this
|
241 |
-
License, or sublicense it under different terms, provided that the
|
242 |
-
license for the Executable Form does not attempt to limit or alter
|
243 |
-
the recipients' rights in the Source Code Form under this License.
|
244 |
-
.
|
245 |
-
3.3. Distribution of a Larger Work
|
246 |
-
.
|
247 |
-
You may create and distribute a Larger Work under terms of Your choice,
|
248 |
-
provided that You also comply with the requirements of this License for
|
249 |
-
the Covered Software. If the Larger Work is a combination of Covered
|
250 |
-
Software with a work governed by one or more Secondary Licenses, and the
|
251 |
-
Covered Software is not Incompatible With Secondary Licenses, this
|
252 |
-
License permits You to additionally distribute such Covered Software
|
253 |
-
under the terms of such Secondary License(s), so that the recipient of
|
254 |
-
the Larger Work may, at their option, further distribute the Covered
|
255 |
-
Software under the terms of either this License or such Secondary
|
256 |
-
License(s).
|
257 |
-
.
|
258 |
-
3.4. Notices
|
259 |
-
.
|
260 |
-
You may not remove or alter the substance of any license notices
|
261 |
-
(including copyright notices, patent notices, disclaimers of warranty,
|
262 |
-
or limitations of liability) contained within the Source Code Form of
|
263 |
-
the Covered Software, except that You may alter any license notices to
|
264 |
-
the extent required to remedy known factual inaccuracies.
|
265 |
-
.
|
266 |
-
3.5. Application of Additional Terms
|
267 |
-
.
|
268 |
-
You may choose to offer, and to charge a fee for, warranty, support,
|
269 |
-
indemnity or liability obligations to one or more recipients of Covered
|
270 |
-
Software. However, You may do so only on Your own behalf, and not on
|
271 |
-
behalf of any Contributor. You must make it absolutely clear that any
|
272 |
-
such warranty, support, indemnity, or liability obligation is offered by
|
273 |
-
You alone, and You hereby agree to indemnify every Contributor for any
|
274 |
-
liability incurred by such Contributor as a result of warranty, support,
|
275 |
-
indemnity or liability terms You offer. You may include additional
|
276 |
-
disclaimers of warranty and limitations of liability specific to any
|
277 |
-
jurisdiction.
|
278 |
-
.
|
279 |
-
4. Inability to Comply Due to Statute or Regulation
|
280 |
-
---------------------------------------------------
|
281 |
-
.
|
282 |
-
If it is impossible for You to comply with any of the terms of this
|
283 |
-
License with respect to some or all of the Covered Software due to
|
284 |
-
statute, judicial order, or regulation then You must: (a) comply with
|
285 |
-
the terms of this License to the maximum extent possible; and (b)
|
286 |
-
describe the limitations and the code they affect. Such description must
|
287 |
-
be placed in a text file included with all distributions of the Covered
|
288 |
-
Software under this License. Except to the extent prohibited by statute
|
289 |
-
or regulation, such description must be sufficiently detailed for a
|
290 |
-
recipient of ordinary skill to be able to understand it.
|
291 |
-
.
|
292 |
-
5. Termination
|
293 |
-
--------------
|
294 |
-
.
|
295 |
-
5.1. The rights granted under this License will terminate automatically
|
296 |
-
if You fail to comply with any of its terms. However, if You become
|
297 |
-
compliant, then the rights granted under this License from a particular
|
298 |
-
Contributor are reinstated (a) provisionally, unless and until such
|
299 |
-
Contributor explicitly and finally terminates Your grants, and (b) on an
|
300 |
-
ongoing basis, if such Contributor fails to notify You of the
|
301 |
-
non-compliance by some reasonable means prior to 60 days after You have
|
302 |
-
come back into compliance. Moreover, Your grants from a particular
|
303 |
-
Contributor are reinstated on an ongoing basis if such Contributor
|
304 |
-
notifies You of the non-compliance by some reasonable means, this is the
|
305 |
-
first time You have received notice of non-compliance with this License
|
306 |
-
from such Contributor, and You become compliant prior to 30 days after
|
307 |
-
Your receipt of the notice.
|
308 |
-
.
|
309 |
-
5.2. If You initiate litigation against any entity by asserting a patent
|
310 |
-
infringement claim (excluding declaratory judgment actions,
|
311 |
-
counter-claims, and cross-claims) alleging that a Contributor Version
|
312 |
-
directly or indirectly infringes any patent, then the rights granted to
|
313 |
-
You by any and all Contributors for the Covered Software under Section
|
314 |
-
2.1 of this License shall terminate.
|
315 |
-
.
|
316 |
-
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
317 |
-
end user license agreements (excluding distributors and resellers) which
|
318 |
-
have been validly granted by You or Your distributors under this License
|
319 |
-
prior to termination shall survive termination.
|
320 |
-
.
|
321 |
-
************************************************************************
|
322 |
-
* *
|
323 |
-
* 6. Disclaimer of Warranty *
|
324 |
-
* ------------------------- *
|
325 |
-
* *
|
326 |
-
* Covered Software is provided under this License on an "as is" *
|
327 |
-
* basis, without warranty of any kind, either expressed, implied, or *
|
328 |
-
* statutory, including, without limitation, warranties that the *
|
329 |
-
* Covered Software is free of defects, merchantable, fit for a *
|
330 |
-
* particular purpose or non-infringing. The entire risk as to the *
|
331 |
-
* quality and performance of the Covered Software is with You. *
|
332 |
-
* Should any Covered Software prove defective in any respect, You *
|
333 |
-
* (not any Contributor) assume the cost of any necessary servicing, *
|
334 |
-
* repair, or correction. This disclaimer of warranty constitutes an *
|
335 |
-
* essential part of this License. No use of any Covered Software is *
|
336 |
-
* authorized under this License except under this disclaimer. *
|
337 |
-
* *
|
338 |
-
************************************************************************
|
339 |
-
.
|
340 |
-
************************************************************************
|
341 |
-
* *
|
342 |
-
* 7. Limitation of Liability *
|
343 |
-
* -------------------------- *
|
344 |
-
* *
|
345 |
-
* Under no circumstances and under no legal theory, whether tort *
|
346 |
-
* (including negligence), contract, or otherwise, shall any *
|
347 |
-
* Contributor, or anyone who distributes Covered Software as *
|
348 |
-
* permitted above, be liable to You for any direct, indirect, *
|
349 |
-
* special, incidental, or consequential damages of any character *
|
350 |
-
* including, without limitation, damages for lost profits, loss of *
|
351 |
-
* goodwill, work stoppage, computer failure or malfunction, or any *
|
352 |
-
* and all other commercial damages or losses, even if such party *
|
353 |
-
* shall have been informed of the possibility of such damages. This *
|
354 |
-
* limitation of liability shall not apply to liability for death or *
|
355 |
-
* personal injury resulting from such party's negligence to the *
|
356 |
-
* extent applicable law prohibits such limitation. Some *
|
357 |
-
* jurisdictions do not allow the exclusion or limitation of *
|
358 |
-
* incidental or consequential damages, so this exclusion and *
|
359 |
-
* limitation may not apply to You. *
|
360 |
-
* *
|
361 |
-
************************************************************************
|
362 |
-
.
|
363 |
-
8. Litigation
|
364 |
-
-------------
|
365 |
-
.
|
366 |
-
Any litigation relating to this License may be brought only in the
|
367 |
-
courts of a jurisdiction where the defendant maintains its principal
|
368 |
-
place of business and such litigation shall be governed by laws of that
|
369 |
-
jurisdiction, without reference to its conflict-of-law provisions.
|
370 |
-
Nothing in this Section shall prevent a party's ability to bring
|
371 |
-
cross-claims or counter-claims.
|
372 |
-
.
|
373 |
-
9. Miscellaneous
|
374 |
-
----------------
|
375 |
-
.
|
376 |
-
This License represents the complete agreement concerning the subject
|
377 |
-
matter hereof. If any provision of this License is held to be
|
378 |
-
unenforceable, such provision shall be reformed only to the extent
|
379 |
-
necessary to make it enforceable. Any law or regulation which provides
|
380 |
-
that the language of a contract shall be construed against the drafter
|
381 |
-
shall not be used to construe this License against a Contributor.
|
382 |
-
.
|
383 |
-
10. Versions of the License
|
384 |
-
---------------------------
|
385 |
-
.
|
386 |
-
10.1. New Versions
|
387 |
-
.
|
388 |
-
Mozilla Foundation is the license steward. Except as provided in Section
|
389 |
-
10.3, no one other than the license steward has the right to modify or
|
390 |
-
publish new versions of this License. Each version will be given a
|
391 |
-
distinguishing version number.
|
392 |
-
.
|
393 |
-
10.2. Effect of New Versions
|
394 |
-
.
|
395 |
-
You may distribute the Covered Software under the terms of the version
|
396 |
-
of the License under which You originally received the Covered Software,
|
397 |
-
or under the terms of any subsequent version published by the license
|
398 |
-
steward.
|
399 |
-
.
|
400 |
-
10.3. Modified Versions
|
401 |
-
.
|
402 |
-
If you create software not governed by this License, and you want to
|
403 |
-
create a new license for such software, you may create and use a
|
404 |
-
modified version of this License if you rename the license and remove
|
405 |
-
any references to the name of the license steward (except to note that
|
406 |
-
such modified license differs from this License).
|
407 |
-
.
|
408 |
-
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
409 |
-
Licenses
|
410 |
-
.
|
411 |
-
If You choose to distribute Source Code Form that is Incompatible With
|
412 |
-
Secondary Licenses under the terms of this version of the License, the
|
413 |
-
notice described in Exhibit B of this License must be attached.
|
414 |
-
.
|
415 |
-
Exhibit A - Source Code Form License Notice
|
416 |
-
-------------------------------------------
|
417 |
-
.
|
418 |
-
This Source Code Form is subject to the terms of the Mozilla Public
|
419 |
-
License, v. 2.0. If a copy of the MPL was not distributed with this
|
420 |
-
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
421 |
-
.
|
422 |
-
If it is not possible or desirable to put the notice in a particular
|
423 |
-
file, then You may include the notice in a location (such as a LICENSE
|
424 |
-
file in a relevant directory) where a recipient would be likely to look
|
425 |
-
for such a notice.
|
426 |
-
.
|
427 |
-
You may add additional accurate notices of copyright ownership.
|
428 |
-
.
|
429 |
-
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
430 |
-
---------------------------------------------------------
|
431 |
-
.
|
432 |
-
This Source Code Form is "Incompatible With Secondary Licenses", as
|
433 |
-
defined by the Mozilla Public License, v. 2.0.
|
|
|
|
|
|
|
|
|
1 |
|
2 |
+
Copyright (c) 2016 Nils Adermann, Jordi Boggiano
|
|
|
|
|
|
|
3 |
|
4 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5 |
+
of this software and associated documentation files (the "Software"), to deal
|
6 |
+
in the Software without restriction, including without limitation the rights
|
7 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8 |
+
copies of the Software, and to permit persons to whom the Software is furnished
|
9 |
+
to do so, subject to the following conditions:
|
10 |
|
11 |
+
The above copyright notice and this permission notice shall be included in all
|
12 |
+
copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
|
13 |
|
14 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20 |
+
THE SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Webinterpret/Connector/Lib/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,23 +19,30 @@ class ComposerAutoloaderInit6212b1904c1c4e85b10547bad70ddde1
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
-
|
26 |
-
$
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
}
|
40 |
|
41 |
$loader->register(true);
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInita645de5498819440995422a042fbf08c
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInita645de5498819440995422a042fbf08c', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInita645de5498819440995422a042fbf08c', 'loadClassLoader'));
|
25 |
+
|
26 |
+
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
|
27 |
+
if ($useStaticLoader) {
|
28 |
+
require_once __DIR__ . '/autoload_static.php';
|
29 |
+
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInita645de5498819440995422a042fbf08c::getInitializer($loader));
|
31 |
+
} else {
|
32 |
+
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
+
foreach ($map as $namespace => $path) {
|
34 |
+
$loader->set($namespace, $path);
|
35 |
+
}
|
36 |
+
|
37 |
+
$map = require __DIR__ . '/autoload_psr4.php';
|
38 |
+
foreach ($map as $namespace => $path) {
|
39 |
+
$loader->setPsr4($namespace, $path);
|
40 |
+
}
|
41 |
+
|
42 |
+
$classMap = require __DIR__ . '/autoload_classmap.php';
|
43 |
+
if ($classMap) {
|
44 |
+
$loader->addClassMap($classMap);
|
45 |
+
}
|
46 |
}
|
47 |
|
48 |
$loader->register(true);
|
app/code/community/Webinterpret/Connector/Lib/composer/autoload_static.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_static.php @generated by Composer
|
4 |
+
|
5 |
+
namespace Composer\Autoload;
|
6 |
+
|
7 |
+
class ComposerStaticInita645de5498819440995422a042fbf08c
|
8 |
+
{
|
9 |
+
public static $prefixLengthsPsr4 = array (
|
10 |
+
'M' =>
|
11 |
+
array (
|
12 |
+
'MaxMind\\' => 8,
|
13 |
+
),
|
14 |
+
'G' =>
|
15 |
+
array (
|
16 |
+
'GeoIp2\\' => 7,
|
17 |
+
),
|
18 |
+
'C' =>
|
19 |
+
array (
|
20 |
+
'Composer\\CaBundle\\' => 18,
|
21 |
+
),
|
22 |
+
);
|
23 |
+
|
24 |
+
public static $prefixDirsPsr4 = array (
|
25 |
+
'MaxMind\\' =>
|
26 |
+
array (
|
27 |
+
0 => __DIR__ . '/..' . '/maxmind/web-service-common/src',
|
28 |
+
),
|
29 |
+
'GeoIp2\\' =>
|
30 |
+
array (
|
31 |
+
0 => __DIR__ . '/..' . '/geoip2/geoip2/src',
|
32 |
+
),
|
33 |
+
'Composer\\CaBundle\\' =>
|
34 |
+
array (
|
35 |
+
0 => __DIR__ . '/..' . '/composer/ca-bundle/src',
|
36 |
+
),
|
37 |
+
);
|
38 |
+
|
39 |
+
public static $prefixesPsr0 = array (
|
40 |
+
'M' =>
|
41 |
+
array (
|
42 |
+
'MaxMind' =>
|
43 |
+
array (
|
44 |
+
0 => __DIR__ . '/..' . '/maxmind-db/reader/src',
|
45 |
+
),
|
46 |
+
),
|
47 |
+
'B' =>
|
48 |
+
array (
|
49 |
+
'Buzz' =>
|
50 |
+
array (
|
51 |
+
0 => __DIR__ . '/..' . '/kriswallsmith/buzz/lib',
|
52 |
+
),
|
53 |
+
),
|
54 |
+
);
|
55 |
+
|
56 |
+
public static function getInitializer(ClassLoader $loader)
|
57 |
+
{
|
58 |
+
return \Closure::bind(function () use ($loader) {
|
59 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInita645de5498819440995422a042fbf08c::$prefixLengthsPsr4;
|
60 |
+
$loader->prefixDirsPsr4 = ComposerStaticInita645de5498819440995422a042fbf08c::$prefixDirsPsr4;
|
61 |
+
$loader->prefixesPsr0 = ComposerStaticInita645de5498819440995422a042fbf08c::$prefixesPsr0;
|
62 |
+
|
63 |
+
}, null, ClassLoader::class);
|
64 |
+
}
|
65 |
+
}
|
app/code/community/Webinterpret/Connector/Lib/composer/installed.json
CHANGED
@@ -1,54 +1,4 @@
|
|
1 |
[
|
2 |
-
{
|
3 |
-
"name": "kriswallsmith/buzz",
|
4 |
-
"version": "v0.15",
|
5 |
-
"version_normalized": "0.15.0.0",
|
6 |
-
"source": {
|
7 |
-
"type": "git",
|
8 |
-
"url": "https://github.com/kriswallsmith/Buzz.git",
|
9 |
-
"reference": "d4041666c3ffb379af02a92dabe81c904b35fab8"
|
10 |
-
},
|
11 |
-
"dist": {
|
12 |
-
"type": "zip",
|
13 |
-
"url": "https://api.github.com/repos/kriswallsmith/Buzz/zipball/d4041666c3ffb379af02a92dabe81c904b35fab8",
|
14 |
-
"reference": "d4041666c3ffb379af02a92dabe81c904b35fab8",
|
15 |
-
"shasum": ""
|
16 |
-
},
|
17 |
-
"require": {
|
18 |
-
"php": ">=5.3.0"
|
19 |
-
},
|
20 |
-
"require-dev": {
|
21 |
-
"phpunit/phpunit": "3.7.*"
|
22 |
-
},
|
23 |
-
"suggest": {
|
24 |
-
"ext-curl": "*"
|
25 |
-
},
|
26 |
-
"time": "2015-06-25 17:26:56",
|
27 |
-
"type": "library",
|
28 |
-
"installation-source": "dist",
|
29 |
-
"autoload": {
|
30 |
-
"psr-0": {
|
31 |
-
"Buzz": "lib/"
|
32 |
-
}
|
33 |
-
},
|
34 |
-
"notification-url": "https://packagist.org/downloads/",
|
35 |
-
"license": [
|
36 |
-
"MIT"
|
37 |
-
],
|
38 |
-
"authors": [
|
39 |
-
{
|
40 |
-
"name": "Kris Wallsmith",
|
41 |
-
"email": "kris.wallsmith@gmail.com",
|
42 |
-
"homepage": "http://kriswallsmith.net/"
|
43 |
-
}
|
44 |
-
],
|
45 |
-
"description": "Lightweight HTTP client",
|
46 |
-
"homepage": "https://github.com/kriswallsmith/Buzz",
|
47 |
-
"keywords": [
|
48 |
-
"curl",
|
49 |
-
"http client"
|
50 |
-
]
|
51 |
-
},
|
52 |
{
|
53 |
"name": "composer/ca-bundle",
|
54 |
"version": "1.0.4",
|
@@ -259,5 +209,55 @@
|
|
259 |
"geolocation",
|
260 |
"maxmind"
|
261 |
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
}
|
263 |
]
|
1 |
[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
{
|
3 |
"name": "composer/ca-bundle",
|
4 |
"version": "1.0.4",
|
209 |
"geolocation",
|
210 |
"maxmind"
|
211 |
]
|
212 |
+
},
|
213 |
+
{
|
214 |
+
"name": "kriswallsmith/buzz",
|
215 |
+
"version": "v0.15",
|
216 |
+
"version_normalized": "0.15.0.0",
|
217 |
+
"source": {
|
218 |
+
"type": "git",
|
219 |
+
"url": "https://github.com/kriswallsmith/Buzz.git",
|
220 |
+
"reference": "d4041666c3ffb379af02a92dabe81c904b35fab8"
|
221 |
+
},
|
222 |
+
"dist": {
|
223 |
+
"type": "zip",
|
224 |
+
"url": "https://api.github.com/repos/kriswallsmith/Buzz/zipball/d4041666c3ffb379af02a92dabe81c904b35fab8",
|
225 |
+
"reference": "d4041666c3ffb379af02a92dabe81c904b35fab8",
|
226 |
+
"shasum": ""
|
227 |
+
},
|
228 |
+
"require": {
|
229 |
+
"php": ">=5.3.0"
|
230 |
+
},
|
231 |
+
"require-dev": {
|
232 |
+
"phpunit/phpunit": "3.7.*"
|
233 |
+
},
|
234 |
+
"suggest": {
|
235 |
+
"ext-curl": "*"
|
236 |
+
},
|
237 |
+
"time": "2015-06-25 17:26:56",
|
238 |
+
"type": "library",
|
239 |
+
"installation-source": "dist",
|
240 |
+
"autoload": {
|
241 |
+
"psr-0": {
|
242 |
+
"Buzz": "lib/"
|
243 |
+
}
|
244 |
+
},
|
245 |
+
"notification-url": "https://packagist.org/downloads/",
|
246 |
+
"license": [
|
247 |
+
"MIT"
|
248 |
+
],
|
249 |
+
"authors": [
|
250 |
+
{
|
251 |
+
"name": "Kris Wallsmith",
|
252 |
+
"email": "kris.wallsmith@gmail.com",
|
253 |
+
"homepage": "http://kriswallsmith.net/"
|
254 |
+
}
|
255 |
+
],
|
256 |
+
"description": "Lightweight HTTP client",
|
257 |
+
"homepage": "https://github.com/kriswallsmith/Buzz",
|
258 |
+
"keywords": [
|
259 |
+
"curl",
|
260 |
+
"http client"
|
261 |
+
]
|
262 |
}
|
263 |
]
|
app/code/community/Webinterpret/Connector/bridge2cart/bridge.php
CHANGED
@@ -1,57 +1,104 @@
|
|
1 |
<?php
|
2 |
-
/**
|
3 |
-
* Bridge
|
4 |
-
*
|
5 |
-
* @category Webinterpret
|
6 |
-
* @package Webinterpret_Connector
|
7 |
-
* @author Webinterpret Team <info@webinterpret.com>
|
8 |
-
* @license http://opensource.org/licenses/osl-3.0.php
|
9 |
-
*/
|
10 |
|
11 |
require_once 'preloader.php';
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
class M1_Bridge_Action_Update
|
14 |
{
|
15 |
-
|
|
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
function M1_Bridge_Action_Update()
|
22 |
{
|
23 |
-
$this->
|
24 |
}
|
25 |
|
26 |
-
|
|
|
|
|
|
|
27 |
{
|
28 |
$response = new stdClass();
|
29 |
-
if (
|
30 |
-
$response->
|
31 |
-
$response->message = "Bridge Update couldn't be performed.
|
32 |
-
|
|
|
|
|
33 |
}
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
$response->
|
38 |
-
|
39 |
-
echo serialize($response);
|
|
|
40 |
}
|
41 |
|
42 |
-
if (
|
43 |
-
$response->
|
44 |
$response->message = "Couln't create file in temporary folder or file is write protected.";
|
45 |
-
echo serialize($response);
|
|
|
46 |
}
|
47 |
|
48 |
-
$response->
|
49 |
$response->message = "Bridge successfully updated to latest version";
|
50 |
-
echo
|
51 |
die;
|
52 |
}
|
53 |
|
54 |
-
|
|
|
|
|
|
|
|
|
55 |
{
|
56 |
$ch = curl_init();
|
57 |
|
@@ -61,17 +108,20 @@ class M1_Bridge_Action_Update
|
|
61 |
|
62 |
$response = new stdClass();
|
63 |
|
64 |
-
$response->body
|
65 |
-
$response->
|
66 |
-
$response->
|
67 |
-
$response->
|
68 |
|
69 |
curl_close($ch);
|
70 |
|
71 |
return $response;
|
72 |
}
|
73 |
|
74 |
-
|
|
|
|
|
|
|
75 |
{
|
76 |
if (!is_writeable(dirname(__FILE__))) {
|
77 |
@chmod(dirname(__FILE__), 0777);
|
@@ -79,7 +129,10 @@ class M1_Bridge_Action_Update
|
|
79 |
return is_writeable(dirname(__FILE__));
|
80 |
}
|
81 |
|
82 |
-
|
|
|
|
|
|
|
83 |
{
|
84 |
$pathToFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bridge.php";
|
85 |
if (!is_writeable($pathToFile)) {
|
@@ -88,48 +141,70 @@ class M1_Bridge_Action_Update
|
|
88 |
return is_writeable($pathToFile);
|
89 |
}
|
90 |
|
91 |
-
|
|
|
|
|
|
|
92 |
{
|
93 |
-
@mkdir($this->
|
94 |
-
return file_exists($this->
|
95 |
}
|
96 |
|
97 |
-
|
|
|
|
|
|
|
98 |
{
|
99 |
-
@unlink($this->
|
100 |
-
@rmdir($this->
|
101 |
-
return !file_exists($this->
|
102 |
}
|
103 |
|
104 |
-
|
|
|
|
|
|
|
105 |
{
|
106 |
-
$file = $this->_fetch(
|
107 |
-
if (
|
108 |
return $file;
|
109 |
}
|
110 |
return false;
|
111 |
}
|
112 |
|
113 |
-
|
|
|
|
|
|
|
|
|
|
|
114 |
{
|
115 |
if (function_exists("file_put_contents")) {
|
116 |
$bytes = file_put_contents($file, $data->body);
|
117 |
-
return $bytes == $data->
|
118 |
}
|
119 |
|
120 |
$handle = @fopen($file, 'w+');
|
121 |
$bytes = fwrite($handle, $data->body);
|
122 |
@fclose($handle);
|
123 |
|
124 |
-
return $bytes == $data->
|
125 |
|
126 |
}
|
127 |
|
128 |
}
|
129 |
|
|
|
|
|
|
|
130 |
class M1_Bridge_Action_Query
|
131 |
{
|
132 |
-
|
|
|
|
|
|
|
|
|
|
|
133 |
{
|
134 |
if (isset($_POST['query']) && isset($_POST['fetchMode'])) {
|
135 |
$query = base64_decode($_POST['query']);
|
@@ -154,10 +229,17 @@ class M1_Bridge_Action_Query
|
|
154 |
}
|
155 |
}
|
156 |
|
|
|
|
|
|
|
157 |
class M1_Bridge_Action_Getconfig
|
158 |
{
|
159 |
|
160 |
-
|
|
|
|
|
|
|
|
|
161 |
{
|
162 |
$last = strtolower($val[strlen($val)-1]);
|
163 |
switch($last) {
|
@@ -172,7 +254,10 @@ class M1_Bridge_Action_Getconfig
|
|
172 |
return $val;
|
173 |
}
|
174 |
|
175 |
-
|
|
|
|
|
|
|
176 |
{
|
177 |
$memoryLimit = trim(@ini_get('memory_limit'));
|
178 |
if (strlen($memoryLimit) === 0) {
|
@@ -203,12 +288,18 @@ class M1_Bridge_Action_Getconfig
|
|
203 |
return min($suhosinMaxPostSize, $maxPostSize, $memoryLimit);
|
204 |
}
|
205 |
|
206 |
-
|
|
|
|
|
|
|
207 |
{
|
208 |
return function_exists('gzdecode');
|
209 |
}
|
210 |
|
211 |
-
|
|
|
|
|
|
|
212 |
{
|
213 |
if (!defined("DEFAULT_LANGUAGE_ISO2")) {
|
214 |
define("DEFAULT_LANGUAGE_ISO2", ""); //variable for Interspire cart
|
@@ -226,8 +317,9 @@ class M1_Bridge_Action_Getconfig
|
|
226 |
),
|
227 |
"languages" => $bridge->config->languages,
|
228 |
"baseDirFs" => M1_STORE_BASE_DIR, // filesystem path to store root
|
|
|
229 |
"defaultLanguageIso2" => DEFAULT_LANGUAGE_ISO2,
|
230 |
-
"databaseName" => $bridge->config->
|
231 |
"memoryLimit" => $this->getMemoryLimit(),
|
232 |
"zlibSupported" => $this->isZlibSupported(),
|
233 |
//"orderStatus" => $bridge->config->orderStatus,
|
@@ -239,10 +331,17 @@ class M1_Bridge_Action_Getconfig
|
|
239 |
|
240 |
}
|
241 |
|
242 |
-
|
|
|
|
|
243 |
class M1_Bridge_Action_Batchsavefile extends M1_Bridge_Action_Savefile
|
244 |
{
|
245 |
-
|
|
|
|
|
|
|
|
|
|
|
246 |
$result = array();
|
247 |
|
248 |
foreach ($_POST['files'] as $fileInfo) {
|
@@ -260,24 +359,34 @@ class M1_Bridge_Action_Batchsavefile extends M1_Bridge_Action_Savefile
|
|
260 |
|
261 |
}
|
262 |
|
|
|
|
|
|
|
263 |
class M1_Bridge_Action_Deleteimages
|
264 |
{
|
265 |
-
|
|
|
|
|
|
|
|
|
266 |
{
|
267 |
switch($bridge->config->cartType) {
|
268 |
case "Pinnacle361":
|
269 |
-
$this->
|
270 |
-
|
271 |
case "Prestashop11":
|
272 |
-
$this->
|
273 |
-
|
274 |
case 'Summercart3' :
|
275 |
-
$this->
|
276 |
-
|
277 |
}
|
278 |
}
|
279 |
|
280 |
-
|
|
|
|
|
|
|
281 |
{
|
282 |
$dirs = array(
|
283 |
M1_STORE_BASE_DIR . $bridge->config->imagesDir . 'catalog/',
|
@@ -290,9 +399,9 @@ class M1_Bridge_Action_Deleteimages
|
|
290 |
|
291 |
$ok = true;
|
292 |
|
293 |
-
foreach($dirs as $dir) {
|
294 |
|
295 |
-
if(
|
296 |
continue;
|
297 |
}
|
298 |
|
@@ -315,7 +424,10 @@ class M1_Bridge_Action_Deleteimages
|
|
315 |
else print "ERROR";
|
316 |
}
|
317 |
|
318 |
-
|
|
|
|
|
|
|
319 |
{
|
320 |
$dirs = array(
|
321 |
M1_STORE_BASE_DIR . $bridge->config->imagesDir . 'c/',
|
@@ -325,19 +437,19 @@ class M1_Bridge_Action_Deleteimages
|
|
325 |
|
326 |
$ok = true;
|
327 |
|
328 |
-
foreach($dirs as $dir) {
|
329 |
|
330 |
-
if(
|
331 |
continue;
|
332 |
}
|
333 |
|
334 |
$dirHandle = opendir($dir);
|
335 |
|
336 |
while (false !== ($file = readdir($dirHandle))) {
|
337 |
-
if ($file != "." && $file != ".." && preg_match(
|
338 |
$file_path = $dir . $file;
|
339 |
-
if(
|
340 |
-
if(!rename($file_path, $file_path.".bak")) $ok = false;
|
341 |
}
|
342 |
}
|
343 |
}
|
@@ -350,7 +462,10 @@ class M1_Bridge_Action_Deleteimages
|
|
350 |
else print "ERROR";
|
351 |
}
|
352 |
|
353 |
-
|
|
|
|
|
|
|
354 |
{
|
355 |
$dirs = array(
|
356 |
M1_STORE_BASE_DIR . $bridge->config->imagesDir . 'categoryimages/',
|
@@ -363,9 +478,9 @@ class M1_Bridge_Action_Deleteimages
|
|
363 |
|
364 |
$ok = true;
|
365 |
|
366 |
-
foreach($dirs as $dir) {
|
367 |
|
368 |
-
if(
|
369 |
continue;
|
370 |
}
|
371 |
|
@@ -389,16 +504,25 @@ class M1_Bridge_Action_Deleteimages
|
|
389 |
}
|
390 |
}
|
391 |
|
|
|
|
|
|
|
392 |
class M1_Bridge_Action_Cubecart
|
393 |
{
|
394 |
-
|
|
|
|
|
|
|
|
|
395 |
{
|
396 |
$dirHandle = opendir(M1_STORE_BASE_DIR . 'language/');
|
397 |
|
398 |
$languages = array();
|
399 |
|
400 |
while ($dirEntry = readdir($dirHandle)) {
|
401 |
-
if (!is_dir(M1_STORE_BASE_DIR . 'language/' . $dirEntry) || $dirEntry == '.'
|
|
|
|
|
402 |
continue;
|
403 |
}
|
404 |
|
@@ -428,75 +552,89 @@ class M1_Bridge_Action_Cubecart
|
|
428 |
}
|
429 |
}
|
430 |
|
|
|
|
|
|
|
431 |
class M1_Bridge_Action_Mysqlver
|
432 |
{
|
433 |
-
|
|
|
|
|
|
|
|
|
434 |
{
|
435 |
-
$
|
436 |
-
preg_match('/^(\d+)\.(\d+)\.(\d+)/', mysql_get_server_info($bridge->getLink()), $
|
437 |
-
echo sprintf("%d%02d%02d", $
|
438 |
}
|
439 |
}
|
440 |
|
|
|
|
|
|
|
441 |
class M1_Bridge_Action_Clearcache
|
442 |
{
|
443 |
-
|
|
|
|
|
|
|
|
|
444 |
{
|
445 |
switch($bridge->config->cartType) {
|
446 |
case "Cubecart":
|
447 |
$this->_CubecartClearCache();
|
448 |
-
|
449 |
case "Prestashop11":
|
450 |
$this->_PrestashopClearCache();
|
451 |
-
|
452 |
case "Interspire":
|
453 |
$this->_InterspireClearCache();
|
454 |
-
|
455 |
case "Opencart14" :
|
456 |
$this->_OpencartClearCache();
|
457 |
-
|
458 |
case "XtcommerceVeyton" :
|
459 |
$this->_Xtcommerce4ClearCache();
|
460 |
-
|
461 |
case "Ubercart" :
|
462 |
$this->_ubercartClearCache();
|
463 |
-
|
464 |
case "Tomatocart" :
|
465 |
$this->_tomatocartClearCache();
|
466 |
-
|
467 |
case "Virtuemart113" :
|
468 |
$this->_virtuemartClearCache();
|
469 |
-
|
470 |
case "Magento1212" :
|
471 |
//$this->_magentoClearCache();
|
472 |
-
|
473 |
case "Oscommerce3":
|
474 |
$this->_Oscommerce3ClearCache();
|
475 |
-
|
476 |
case "Oxid":
|
477 |
$this->_OxidClearCache();
|
478 |
-
|
479 |
case "XCart":
|
480 |
$this->_XcartClearCache();
|
481 |
-
|
482 |
case "Cscart203":
|
483 |
$this->_CscartClearCache();
|
484 |
-
|
485 |
case "Prestashop15":
|
486 |
$this->_Prestashop15ClearCache();
|
487 |
-
|
488 |
case "Gambio":
|
489 |
$this->_GambioClearCache();
|
490 |
-
|
491 |
}
|
492 |
}
|
493 |
|
494 |
/**
|
495 |
-
*
|
496 |
-
* @
|
|
|
497 |
*/
|
498 |
-
|
499 |
-
function _removeGarbage($dirs = array(), $fileExclude = '')
|
500 |
{
|
501 |
$result = true;
|
502 |
|
@@ -538,7 +676,7 @@ class M1_Bridge_Action_Clearcache
|
|
538 |
return $result;
|
539 |
}
|
540 |
|
541 |
-
function _magentoClearCache()
|
542 |
{
|
543 |
chdir('../');
|
544 |
|
@@ -567,7 +705,7 @@ class M1_Bridge_Action_Clearcache
|
|
567 |
echo 'OK';
|
568 |
}
|
569 |
|
570 |
-
function _InterspireClearCache()
|
571 |
{
|
572 |
$res = true;
|
573 |
$file = M1_STORE_BASE_DIR . 'cache' . DIRECTORY_SEPARATOR . 'datastore' . DIRECTORY_SEPARATOR . 'RootCategories.php';
|
@@ -583,7 +721,7 @@ class M1_Bridge_Action_Clearcache
|
|
583 |
}
|
584 |
}
|
585 |
|
586 |
-
function _CubecartClearCache()
|
587 |
{
|
588 |
$ok = true;
|
589 |
|
@@ -614,7 +752,7 @@ class M1_Bridge_Action_Clearcache
|
|
614 |
}
|
615 |
}
|
616 |
|
617 |
-
function _PrestashopClearCache()
|
618 |
{
|
619 |
$dirs = array(
|
620 |
M1_STORE_BASE_DIR . 'tools/smarty/compile/',
|
@@ -625,7 +763,7 @@ class M1_Bridge_Action_Clearcache
|
|
625 |
$this->_removeGarbage($dirs, 'index\.php');
|
626 |
}
|
627 |
|
628 |
-
function _OpencartClearCache()
|
629 |
{
|
630 |
$dirs = array(
|
631 |
M1_STORE_BASE_DIR . 'system/cache/',
|
@@ -634,7 +772,7 @@ class M1_Bridge_Action_Clearcache
|
|
634 |
$this->_removeGarbage($dirs, 'index\.html');
|
635 |
}
|
636 |
|
637 |
-
function _Xtcommerce4ClearCache()
|
638 |
{
|
639 |
$dirs = array(
|
640 |
M1_STORE_BASE_DIR . 'cache/',
|
@@ -643,7 +781,7 @@ class M1_Bridge_Action_Clearcache
|
|
643 |
$this->_removeGarbage($dirs, 'index\.html');
|
644 |
}
|
645 |
|
646 |
-
function _ubercartClearCache()
|
647 |
{
|
648 |
$dirs = array(
|
649 |
M1_STORE_BASE_DIR . 'sites/default/files/imagecache/product/',
|
@@ -656,7 +794,7 @@ class M1_Bridge_Action_Clearcache
|
|
656 |
$this->_removeGarbage($dirs);
|
657 |
}
|
658 |
|
659 |
-
function _tomatocartClearCache()
|
660 |
{
|
661 |
$dirs = array(
|
662 |
M1_STORE_BASE_DIR . 'includes/work/',
|
@@ -668,7 +806,7 @@ class M1_Bridge_Action_Clearcache
|
|
668 |
/**
|
669 |
* Try chage permissions actually :)
|
670 |
*/
|
671 |
-
function _virtuemartClearCache()
|
672 |
{
|
673 |
$pathToImages = 'components/com_virtuemart/shop_image';
|
674 |
|
@@ -684,7 +822,7 @@ class M1_Bridge_Action_Clearcache
|
|
684 |
}
|
685 |
}
|
686 |
|
687 |
-
function _Oscommerce3ClearCache()
|
688 |
{
|
689 |
$dirs = array(
|
690 |
M1_STORE_BASE_DIR . 'osCommerce/OM/Work/Cache/',
|
@@ -693,7 +831,7 @@ class M1_Bridge_Action_Clearcache
|
|
693 |
$this->_removeGarbage($dirs, '\.htaccess');
|
694 |
}
|
695 |
|
696 |
-
function _GambioClearCache()
|
697 |
{
|
698 |
$dirs = array(
|
699 |
M1_STORE_BASE_DIR . 'cache/',
|
@@ -702,7 +840,7 @@ class M1_Bridge_Action_Clearcache
|
|
702 |
$this->_removeGarbage($dirs, 'index\.html');
|
703 |
}
|
704 |
|
705 |
-
function _OxidClearCache()
|
706 |
{
|
707 |
$dirs = array(
|
708 |
M1_STORE_BASE_DIR . 'tmp/',
|
@@ -711,7 +849,7 @@ class M1_Bridge_Action_Clearcache
|
|
711 |
$this->_removeGarbage($dirs, '\.htaccess');
|
712 |
}
|
713 |
|
714 |
-
function _XcartClearCache()
|
715 |
{
|
716 |
$dirs = array(
|
717 |
M1_STORE_BASE_DIR . 'var/cache/',
|
@@ -720,7 +858,7 @@ class M1_Bridge_Action_Clearcache
|
|
720 |
$this->_removeGarbage($dirs, '\.htaccess');
|
721 |
}
|
722 |
|
723 |
-
function _CscartClearCache()
|
724 |
{
|
725 |
$dir = M1_STORE_BASE_DIR . 'var/cache/';
|
726 |
$res = $this->removeDirRec($dir);
|
@@ -732,7 +870,7 @@ class M1_Bridge_Action_Clearcache
|
|
732 |
}
|
733 |
}
|
734 |
|
735 |
-
function _Prestashop15ClearCache()
|
736 |
{
|
737 |
$dirs = array(
|
738 |
M1_STORE_BASE_DIR . 'cache/smarty/compile/',
|
@@ -743,7 +881,11 @@ class M1_Bridge_Action_Clearcache
|
|
743 |
$this->_removeGarbage($dirs, 'index\.php');
|
744 |
}
|
745 |
|
746 |
-
|
|
|
|
|
|
|
|
|
747 |
{
|
748 |
$result = true;
|
749 |
|
@@ -769,29 +911,105 @@ class M1_Bridge_Action_Clearcache
|
|
769 |
}
|
770 |
}
|
771 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
772 |
|
|
|
|
|
|
|
773 |
class M1_Bridge_Action_Basedirfs
|
774 |
{
|
775 |
-
|
|
|
|
|
|
|
|
|
776 |
{
|
777 |
echo M1_STORE_BASE_DIR;
|
778 |
}
|
779 |
}
|
780 |
|
|
|
|
|
|
|
781 |
class M1_Bridge_Action_Phpinfo
|
782 |
{
|
783 |
-
|
|
|
|
|
|
|
|
|
784 |
{
|
785 |
phpinfo();
|
786 |
}
|
787 |
}
|
788 |
|
789 |
|
|
|
|
|
|
|
790 |
class M1_Bridge_Action_Savefile
|
791 |
{
|
792 |
-
|
793 |
|
794 |
-
|
|
|
|
|
|
|
795 |
{
|
796 |
$source = $_POST['src'];
|
797 |
$destination = $_POST['dst'];
|
@@ -802,7 +1020,15 @@ class M1_Bridge_Action_Savefile
|
|
802 |
echo $this->_saveFile($source, $destination, $width, $height, $local);
|
803 |
}
|
804 |
|
805 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
806 |
{
|
807 |
if (trim($local) != '') {
|
808 |
|
@@ -846,7 +1072,14 @@ class M1_Bridge_Action_Savefile
|
|
846 |
return $result;
|
847 |
}
|
848 |
|
849 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
850 |
{
|
851 |
$source = M1_STORE_BASE_DIR . $source;
|
852 |
$destination = M1_STORE_BASE_DIR . $destination;
|
@@ -862,7 +1095,12 @@ class M1_Bridge_Action_Savefile
|
|
862 |
return true;
|
863 |
}
|
864 |
|
865 |
-
|
|
|
|
|
|
|
|
|
|
|
866 |
{
|
867 |
$imageInfo = @getimagesize($filename);
|
868 |
if ($imageInfo === false) {
|
@@ -892,7 +1130,15 @@ class M1_Bridge_Action_Savefile
|
|
892 |
return $image;
|
893 |
}
|
894 |
|
895 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
896 |
{
|
897 |
$result = true;
|
898 |
if ($imageType == IMAGETYPE_JPEG) {
|
@@ -912,9 +1158,14 @@ class M1_Bridge_Action_Savefile
|
|
912 |
return $result;
|
913 |
}
|
914 |
|
915 |
-
|
|
|
|
|
|
|
|
|
|
|
916 |
{
|
917 |
-
if ($this->
|
918 |
$destination = M1_STORE_BASE_DIR . $destination;
|
919 |
$body = base64_decode($source);
|
920 |
if ($body === false || file_put_contents($destination, $body) === false) {
|
@@ -927,12 +1178,17 @@ class M1_Bridge_Action_Savefile
|
|
927 |
return '[BRIDGE ERROR] Directory creation failed!';
|
928 |
}
|
929 |
|
930 |
-
|
|
|
|
|
|
|
|
|
|
|
931 |
{
|
932 |
$srcInfo = parse_url($source);
|
933 |
$src = rtrim($_SERVER['DOCUMENT_ROOT'], "/") . $srcInfo['path'];
|
934 |
|
935 |
-
if ($this->
|
936 |
$dst = M1_STORE_BASE_DIR . $destination;
|
937 |
|
938 |
if (!@copy($src, $dst)) {
|
@@ -946,10 +1202,15 @@ class M1_Bridge_Action_Savefile
|
|
946 |
return "OK";
|
947 |
}
|
948 |
|
949 |
-
|
|
|
|
|
|
|
|
|
|
|
950 |
{
|
951 |
$source = $this->_escapeSource($source);
|
952 |
-
if ($this->
|
953 |
$destination = M1_STORE_BASE_DIR . $destination;
|
954 |
|
955 |
$ch = curl_init();
|
@@ -958,6 +1219,7 @@ class M1_Bridge_Action_Savefile
|
|
958 |
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
|
959 |
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1");
|
960 |
curl_setopt($ch, CURLOPT_NOBODY, true);
|
|
|
961 |
curl_exec($ch);
|
962 |
$httpResponseCode = (int)curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
963 |
|
@@ -978,7 +1240,7 @@ class M1_Bridge_Action_Savefile
|
|
978 |
return "[BRIDGE ERROR] $error_no: " . curl_error($ch);
|
979 |
}
|
980 |
curl_close($ch);
|
981 |
-
@chmod($destination,
|
982 |
|
983 |
return "OK";
|
984 |
|
@@ -987,12 +1249,21 @@ class M1_Bridge_Action_Savefile
|
|
987 |
}
|
988 |
}
|
989 |
|
990 |
-
|
|
|
|
|
|
|
|
|
991 |
{
|
992 |
return str_replace(" ", "%20", $source);
|
993 |
}
|
994 |
|
995 |
-
|
|
|
|
|
|
|
|
|
|
|
996 |
$dirParts = explode("/", $dir);
|
997 |
$path = M1_STORE_BASE_DIR;
|
998 |
foreach ($dirParts as $item) {
|
@@ -1011,7 +1282,11 @@ class M1_Bridge_Action_Savefile
|
|
1011 |
return true;
|
1012 |
}
|
1013 |
|
1014 |
-
|
|
|
|
|
|
|
|
|
1015 |
{
|
1016 |
$srcInfo = parse_url($source);
|
1017 |
|
@@ -1028,14 +1303,14 @@ class M1_Bridge_Action_Savefile
|
|
1028 |
}
|
1029 |
|
1030 |
/**
|
1031 |
-
* @param $image - GD image object
|
1032 |
-
* @param $filename - store sorce pathfile ex. M1_STORE_BASE_DIR . '/img/c/2.gif';
|
1033 |
-
* @param $type - IMAGETYPE_JPEG, IMAGETYPE_GIF or IMAGETYPE_PNG
|
1034 |
-
* @param $extension - file extension, this use for jpg or jpeg extension in prestashop
|
1035 |
*
|
1036 |
* @return true if success or false if no
|
1037 |
*/
|
1038 |
-
function _convert($image, $filename, $type = IMAGETYPE_JPEG, $extension = '')
|
1039 |
{
|
1040 |
$end = pathinfo($filename, PATHINFO_EXTENSION);
|
1041 |
|
@@ -1065,7 +1340,13 @@ class M1_Bridge_Action_Savefile
|
|
1065 |
return $this->_saveImage($newImage, $pathSave, $type);
|
1066 |
}
|
1067 |
|
1068 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1069 |
{
|
1070 |
$image = $this->_loadImage($destination, false);
|
1071 |
|
@@ -1094,8 +1375,15 @@ class M1_Bridge_Action_Savefile
|
|
1094 |
return $this->_saveImage($newImage, $destination, $this->_imageType, 100) ? "OK" : "CAN'T SCALE IMAGE";
|
1095 |
}
|
1096 |
|
1097 |
-
|
1098 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1099 |
{
|
1100 |
$method = 0;
|
1101 |
|
@@ -1150,9 +1438,9 @@ class M1_Bridge_Action_Savefile
|
|
1150 |
|
1151 |
class M1_Mysqli
|
1152 |
{
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
|
1157 |
/**
|
1158 |
* mysql constructor
|
@@ -1160,7 +1448,7 @@ class M1_Mysqli
|
|
1160 |
* @param M1_Config_Adapter $config
|
1161 |
* @return M1_Mysql
|
1162 |
*/
|
1163 |
-
function
|
1164 |
{
|
1165 |
$this->config = $config;
|
1166 |
}
|
@@ -1168,7 +1456,7 @@ class M1_Mysqli
|
|
1168 |
/**
|
1169 |
* @return bool|null|resource
|
1170 |
*/
|
1171 |
-
function getDataBaseHandle()
|
1172 |
{
|
1173 |
if ($this->dataBaseHandle) {
|
1174 |
return $this->dataBaseHandle;
|
@@ -1186,26 +1474,26 @@ class M1_Mysqli
|
|
1186 |
/**
|
1187 |
* @return bool|null|resource
|
1188 |
*/
|
1189 |
-
function connect()
|
1190 |
{
|
1191 |
$triesCount = 10;
|
1192 |
$link = null;
|
1193 |
-
$host = $this->config->
|
1194 |
-
$password = stripslashes($this->config->
|
1195 |
|
1196 |
while (!$link) {
|
1197 |
if (!$triesCount--) {
|
1198 |
break;
|
1199 |
}
|
1200 |
|
1201 |
-
$link = @mysqli_connect($host, $this->config->
|
1202 |
if (!$link) {
|
1203 |
sleep(5);
|
1204 |
}
|
1205 |
}
|
1206 |
|
1207 |
if ($link) {
|
1208 |
-
mysqli_select_db($link, $this->config->
|
1209 |
} else {
|
1210 |
return false;
|
1211 |
}
|
@@ -1218,7 +1506,7 @@ class M1_Mysqli
|
|
1218 |
*
|
1219 |
* @return array|bool|mysqli_result
|
1220 |
*/
|
1221 |
-
function localQuery($sql)
|
1222 |
{
|
1223 |
$result = array();
|
1224 |
$dataBaseHandle = $this->getDataBaseHandle();
|
@@ -1242,11 +1530,12 @@ class M1_Mysqli
|
|
1242 |
*
|
1243 |
* @return array
|
1244 |
*/
|
1245 |
-
function query($sql, $fetchType)
|
1246 |
{
|
1247 |
$result = array(
|
1248 |
'result' => null,
|
1249 |
-
'message' => ''
|
|
|
1250 |
);
|
1251 |
|
1252 |
$dataBaseHandle = $this->getDataBaseHandle();
|
@@ -1309,6 +1598,11 @@ class M1_Mysqli
|
|
1309 |
return $result;
|
1310 |
}
|
1311 |
|
|
|
|
|
|
|
|
|
|
|
1312 |
$fetchedFields = array();
|
1313 |
while ($field = mysqli_fetch_field($res)) {
|
1314 |
$fetchedFields[] = $field;
|
@@ -1335,7 +1629,7 @@ class M1_Mysqli
|
|
1335 |
/**
|
1336 |
* @return int
|
1337 |
*/
|
1338 |
-
function getLastInsertId()
|
1339 |
{
|
1340 |
return mysqli_insert_id($this->dataBaseHandle);
|
1341 |
}
|
@@ -1343,7 +1637,7 @@ class M1_Mysqli
|
|
1343 |
/**
|
1344 |
* @return int
|
1345 |
*/
|
1346 |
-
function getAffectedRows()
|
1347 |
{
|
1348 |
return mysqli_affected_rows($this->dataBaseHandle);
|
1349 |
}
|
@@ -1351,7 +1645,7 @@ class M1_Mysqli
|
|
1351 |
/**
|
1352 |
* @return void
|
1353 |
*/
|
1354 |
-
function __destruct()
|
1355 |
{
|
1356 |
if ($this->dataBaseHandle) {
|
1357 |
mysqli_close($this->dataBaseHandle);
|
@@ -1363,47 +1657,16 @@ class M1_Mysqli
|
|
1363 |
}
|
1364 |
|
1365 |
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
{
|
1370 |
-
//@include_once M1_STORE_BASE_DIR . "wp-config.php";
|
1371 |
-
if (file_exists(M1_STORE_BASE_DIR . 'wp-config.php')) {
|
1372 |
-
$config = file_get_contents(M1_STORE_BASE_DIR . 'wp-config.php');
|
1373 |
-
} else {
|
1374 |
-
$config = file_get_contents(dirname(M1_STORE_BASE_DIR) . '/wp-config.php');
|
1375 |
-
}
|
1376 |
-
|
1377 |
-
preg_match('/define\s*\(\s*\'DB_NAME\',\s*\'(.+)\'\s*\)\s*;/', $config, $match);
|
1378 |
-
$this->Dbname = $match[1];
|
1379 |
-
preg_match('/define\s*\(\s*\'DB_USER\',\s*\'(.+)\'\s*\)\s*;/', $config, $match);
|
1380 |
-
$this->Username = $match[1];
|
1381 |
-
preg_match('/define\s*\(\s*\'DB_PASSWORD\',\s*\'(.*)\'\s*\)\s*;/', $config, $match);
|
1382 |
-
$this->Password = $match[1];
|
1383 |
-
preg_match('/define\s*\(\s*\'DB_HOST\',\s*\'(.+)\'\s*\)\s*;/', $config, $match);
|
1384 |
-
$this->setHostPort( $match[1] );
|
1385 |
-
preg_match('/\$table_prefix\s*=\s*\'(.*)\'\s*;/', $config, $match);
|
1386 |
-
$this->TblPrefix = $match[1];
|
1387 |
-
$version = $this->getCartVersionFromDb("option_value", "options", "option_name = 'woocommerce_db_version'");
|
1388 |
-
|
1389 |
-
if ( $version != '' ) {
|
1390 |
-
$this->cartVars['dbVersion'] = $version;
|
1391 |
-
}
|
1392 |
-
|
1393 |
-
$this->cartVars['categoriesDirRelative'] = 'images/categories/';
|
1394 |
-
$this->cartVars['productsDirRelative'] = 'images/products/';
|
1395 |
-
$this->imagesDir = "wp-content/uploads/images/";
|
1396 |
-
$this->categoriesImagesDir = $this->imagesDir . 'categories/';
|
1397 |
-
$this->productsImagesDir = $this->imagesDir . 'products/';
|
1398 |
-
$this->manufacturersImagesDir = $this->imagesDir;
|
1399 |
-
}
|
1400 |
-
}
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
class M1_Config_Adapter_Ubercart extends M1_Config_Adapter
|
1405 |
{
|
1406 |
-
|
|
|
|
|
|
|
|
|
1407 |
{
|
1408 |
@include_once M1_STORE_BASE_DIR . "sites/default/settings.php";
|
1409 |
|
@@ -1420,18 +1683,18 @@ class M1_Config_Adapter_Ubercart extends M1_Config_Adapter
|
|
1420 |
}
|
1421 |
|
1422 |
$this->setHostPort( $url['host'] );
|
1423 |
-
$this->
|
1424 |
-
$this->
|
1425 |
-
$this->
|
1426 |
|
1427 |
$this->imagesDir = "/sites/default/files/";
|
1428 |
-
if(
|
1429 |
$this->imagesDir = "/files";
|
1430 |
}
|
1431 |
|
1432 |
-
if (
|
1433 |
$str = file_get_contents(M1_STORE_BASE_DIR . "/modules/ubercart/uc_cart/uc_cart.info");
|
1434 |
-
if (
|
1435 |
$this->cartVars['dbVersion'] = $match[1];
|
1436 |
unset($match);
|
1437 |
}
|
@@ -1441,20 +1704,28 @@ class M1_Config_Adapter_Ubercart extends M1_Config_Adapter
|
|
1441 |
$this->productsImagesDir = $this->imagesDir;
|
1442 |
$this->manufacturersImagesDir = $this->imagesDir;
|
1443 |
}
|
|
|
1444 |
}
|
1445 |
|
1446 |
|
1447 |
|
|
|
|
|
|
|
1448 |
class M1_Config_Adapter_Cubecart3 extends M1_Config_Adapter
|
1449 |
{
|
1450 |
-
|
|
|
|
|
|
|
|
|
1451 |
{
|
1452 |
include_once(M1_STORE_BASE_DIR . 'includes/global.inc.php');
|
1453 |
|
1454 |
$this->setHostPort($glob['dbhost']);
|
1455 |
-
$this->
|
1456 |
-
$this->
|
1457 |
-
$this->
|
1458 |
|
1459 |
$this->imagesDir = 'images/uploads';
|
1460 |
$this->categoriesImagesDir = $this->imagesDir;
|
@@ -1463,9 +1734,16 @@ class M1_Config_Adapter_Cubecart3 extends M1_Config_Adapter
|
|
1463 |
}
|
1464 |
}
|
1465 |
|
|
|
|
|
|
|
1466 |
class M1_Config_Adapter_JooCart extends M1_Config_Adapter
|
1467 |
{
|
1468 |
-
|
|
|
|
|
|
|
|
|
1469 |
{
|
1470 |
require_once M1_STORE_BASE_DIR . "/configuration.php";
|
1471 |
|
@@ -1474,30 +1752,37 @@ class M1_Config_Adapter_JooCart extends M1_Config_Adapter
|
|
1474 |
$jconfig = new JConfig();
|
1475 |
|
1476 |
$this->setHostPort($jconfig->host);
|
1477 |
-
$this->
|
1478 |
-
$this->
|
1479 |
-
$this->
|
1480 |
|
1481 |
} else {
|
1482 |
|
1483 |
$this->setHostPort($mosConfig_host);
|
1484 |
-
$this->
|
1485 |
-
$this->
|
1486 |
-
$this->
|
1487 |
}
|
1488 |
|
1489 |
-
|
1490 |
$this->imagesDir = "components/com_opencart/image/";
|
1491 |
$this->categoriesImagesDir = $this->imagesDir;
|
1492 |
$this->productsImagesDir = $this->imagesDir;
|
1493 |
$this->manufacturersImagesDir = $this->imagesDir;
|
1494 |
}
|
|
|
1495 |
}
|
1496 |
|
1497 |
|
|
|
|
|
|
|
1498 |
class M1_Config_Adapter_Prestashop11 extends M1_Config_Adapter
|
1499 |
{
|
1500 |
-
|
|
|
|
|
|
|
|
|
1501 |
{
|
1502 |
$confFileOne = file_get_contents(M1_STORE_BASE_DIR . "/config/settings.inc.php");
|
1503 |
$confFileTwo = file_get_contents(M1_STORE_BASE_DIR . "/config/config.inc.php");
|
@@ -1525,7 +1810,9 @@ class M1_Config_Adapter_Prestashop11 extends M1_Config_Adapter
|
|
1525 |
}
|
1526 |
|
1527 |
if (preg_match("/^(\s*)define\(/i", $line)) {
|
1528 |
-
if ((strpos($line, '_DB_') !== false) || (strpos($line, '_PS_IMG_DIR_') !== false)
|
|
|
|
|
1529 |
$execute .= " " . $line;
|
1530 |
}
|
1531 |
}
|
@@ -1535,9 +1822,9 @@ class M1_Config_Adapter_Prestashop11 extends M1_Config_Adapter
|
|
1535 |
eval($execute);
|
1536 |
|
1537 |
$this->setHostPort(_DB_SERVER_);
|
1538 |
-
$this->
|
1539 |
-
$this->
|
1540 |
-
$this->
|
1541 |
|
1542 |
if (defined('_PS_IMG_DIR_') && defined('_PS_ROOT_DIR_')) {
|
1543 |
|
@@ -1556,13 +1843,21 @@ class M1_Config_Adapter_Prestashop11 extends M1_Config_Adapter
|
|
1556 |
$this->cartVars['dbVersion'] = _PS_VERSION_;
|
1557 |
}
|
1558 |
}
|
|
|
1559 |
}
|
1560 |
|
1561 |
|
1562 |
|
|
|
|
|
|
|
1563 |
class M1_Config_Adapter_Ubercart3 extends M1_Config_Adapter
|
1564 |
{
|
1565 |
-
|
|
|
|
|
|
|
|
|
1566 |
{
|
1567 |
@include_once M1_STORE_BASE_DIR . "sites/default/settings.php";
|
1568 |
|
@@ -1577,9 +1872,9 @@ class M1_Config_Adapter_Ubercart3 extends M1_Config_Adapter
|
|
1577 |
}
|
1578 |
|
1579 |
$this->setHostPort( $url['host'] );
|
1580 |
-
$this->
|
1581 |
-
$this->
|
1582 |
-
$this->
|
1583 |
|
1584 |
$this->imagesDir = "/sites/default/files/";
|
1585 |
if (!file_exists( M1_STORE_BASE_DIR . $this->imagesDir )) {
|
@@ -1599,49 +1894,68 @@ class M1_Config_Adapter_Ubercart3 extends M1_Config_Adapter
|
|
1599 |
$this->productsImagesDir = $this->imagesDir;
|
1600 |
$this->manufacturersImagesDir = $this->imagesDir;
|
1601 |
}
|
|
|
1602 |
}
|
1603 |
|
1604 |
|
|
|
|
|
|
|
1605 |
class M1_Config_Adapter_XCart extends M1_Config_Adapter
|
1606 |
{
|
1607 |
-
|
|
|
|
|
|
|
|
|
1608 |
{
|
1609 |
define('XCART_START', 1);
|
1610 |
|
1611 |
$config = file_get_contents(M1_STORE_BASE_DIR . "config.php");
|
1612 |
|
1613 |
-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
|
|
|
|
|
|
|
|
1622 |
$this->imagesDir = 'images/'; // xcart starting from 4.1.x hardcodes images location
|
1623 |
$this->categoriesImagesDir = $this->imagesDir;
|
1624 |
$this->productsImagesDir = $this->imagesDir;
|
1625 |
$this->manufacturersImagesDir = $this->imagesDir;
|
1626 |
|
1627 |
-
if(file_exists(M1_STORE_BASE_DIR . "VERSION")) {
|
1628 |
$version = file_get_contents(M1_STORE_BASE_DIR . "VERSION");
|
1629 |
-
$this->cartVars['dbVersion'] = preg_replace('/(Version| |\\n)/',''
|
1630 |
}
|
1631 |
|
1632 |
}
|
1633 |
}
|
1634 |
|
|
|
|
|
|
|
1635 |
class M1_Config_Adapter_Cubecart extends M1_Config_Adapter
|
1636 |
{
|
1637 |
-
|
|
|
|
|
|
|
|
|
1638 |
{
|
1639 |
include_once(M1_STORE_BASE_DIR . 'includes/global.inc.php');
|
1640 |
|
1641 |
$this->setHostPort($glob['dbhost']);
|
1642 |
-
$this->
|
1643 |
-
$this->
|
1644 |
-
$this->
|
1645 |
|
1646 |
$this->imagesDir = 'images';
|
1647 |
$this->categoriesImagesDir = $this->imagesDir;
|
@@ -1661,35 +1975,35 @@ class M1_Config_Adapter_Cubecart extends M1_Config_Adapter
|
|
1661 |
continue;
|
1662 |
}
|
1663 |
$configXml = simplexml_load_file(M1_STORE_BASE_DIR . 'language/'.$dirEntry);
|
1664 |
-
if ($configXml->info->title){
|
1665 |
$lang['name'] = (string)$configXml->info->title;
|
1666 |
-
$lang['code'] = substr((string)$configXml->info->code,0,2);
|
1667 |
-
$lang['locale'] = substr((string)$configXml->info->code,0,2);
|
1668 |
$lang['currency'] = (string)$configXml->info->default_currency;
|
1669 |
-
$lang['fileName'] = str_replace(".xml",""
|
1670 |
$languages[] = $lang;
|
1671 |
}
|
1672 |
}
|
1673 |
if (!empty($languages)) {
|
1674 |
$this->cartVars['languages'] = $languages;
|
1675 |
}
|
1676 |
-
if (
|
1677 |
$conf = file_get_contents (M1_STORE_BASE_DIR . 'ini.inc.php');
|
1678 |
preg_match("/ini\['ver'\].*/", $conf, $match);
|
1679 |
if (isset($match[0]) && !empty($match[0])) {
|
1680 |
preg_match("/\d.*/", $match[0], $project);
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
} else {
|
1689 |
preg_match("/define\('CC_VERSION.*/", $conf, $match);
|
1690 |
if (isset($match[0]) && !empty($match[0])) {
|
1691 |
preg_match("/\d.*/", $match[0], $project);
|
1692 |
-
if (isset($project[0]) && !empty($project[0])){
|
1693 |
$version = $project[0];
|
1694 |
$version = str_replace(array(" ","-","_","'",");",";",")"), "", $version);
|
1695 |
if ($version != '') {
|
@@ -1699,7 +2013,7 @@ class M1_Config_Adapter_Cubecart extends M1_Config_Adapter
|
|
1699 |
}
|
1700 |
|
1701 |
}
|
1702 |
-
} elseif (
|
1703 |
$conf = file_get_contents (M1_STORE_BASE_DIR . "includes" . DIRECTORY_SEPARATOR . 'ini.inc.php');
|
1704 |
preg_match("/ini\['ver'\].*/", $conf, $match);
|
1705 |
if (isset($match[0]) && !empty($match[0])) {
|
@@ -1728,9 +2042,16 @@ class M1_Config_Adapter_Cubecart extends M1_Config_Adapter
|
|
1728 |
}
|
1729 |
}
|
1730 |
|
|
|
|
|
|
|
1731 |
class M1_Config_Adapter_WebAsyst extends M1_Config_Adapter
|
1732 |
{
|
1733 |
-
|
|
|
|
|
|
|
|
|
1734 |
{
|
1735 |
$config = simplexml_load_file(M1_STORE_BASE_DIR . 'kernel/wbs.xml');
|
1736 |
|
@@ -1741,32 +2062,39 @@ class M1_Config_Adapter_WebAsyst extends M1_Config_Adapter
|
|
1741 |
$host = (string)$config->DBSETTINGS['SQLSERVER'];
|
1742 |
|
1743 |
$this->setHostPort($host);
|
1744 |
-
$this->
|
1745 |
-
$this->
|
1746 |
-
$this->
|
1747 |
|
1748 |
$this->imagesDir = 'published/publicdata/'.strtoupper($dbKey).'/attachments/SC/products_pictures';
|
1749 |
$this->categoriesImagesDir = $this->imagesDir;
|
1750 |
$this->productsImagesDir = $this->imagesDir;
|
1751 |
$this->manufacturersImagesDir = $this->imagesDir;
|
1752 |
|
1753 |
-
if (
|
1754 |
$this->cartVars['dbVersion'] = (string)$config->VERSIONS['SYSTEM'];
|
1755 |
}
|
1756 |
}
|
1757 |
|
1758 |
}
|
1759 |
|
|
|
|
|
|
|
1760 |
class M1_Config_Adapter_Squirrelcart242 extends M1_Config_Adapter
|
1761 |
{
|
1762 |
-
|
|
|
|
|
|
|
|
|
1763 |
{
|
1764 |
include_once(M1_STORE_BASE_DIR . 'squirrelcart/config.php');
|
1765 |
|
1766 |
$this->setHostPort($sql_host);
|
1767 |
-
$this->
|
1768 |
-
$this->
|
1769 |
-
$this->
|
1770 |
|
1771 |
$this->imagesDir = $img_path;
|
1772 |
$this->categoriesImagesDir = $img_path . "/categories";
|
@@ -1774,42 +2102,49 @@ class M1_Config_Adapter_Squirrelcart242 extends M1_Config_Adapter
|
|
1774 |
$this->manufacturersImagesDir = $img_path;
|
1775 |
|
1776 |
$version = $this->getCartVersionFromDb("DB_Version", "Store_Information", "record_number = 1");
|
1777 |
-
if (
|
1778 |
$this->cartVars['dbVersion'] = $version;
|
1779 |
}
|
1780 |
}
|
1781 |
}
|
1782 |
|
|
|
|
|
|
|
1783 |
class M1_Config_Adapter_Opencart14 extends M1_Config_Adapter
|
1784 |
{
|
1785 |
-
|
|
|
|
|
|
|
|
|
1786 |
{
|
1787 |
-
include_once(
|
1788 |
|
1789 |
-
if(
|
1790 |
$this->setHostPort(DB_HOST);
|
1791 |
} else {
|
1792 |
$this->setHostPort(DB_HOSTNAME);
|
1793 |
}
|
1794 |
|
1795 |
-
if(
|
1796 |
-
$this->
|
1797 |
} else {
|
1798 |
-
$this->
|
1799 |
}
|
1800 |
|
1801 |
-
$this->
|
1802 |
|
1803 |
-
if(
|
1804 |
-
$this->
|
1805 |
} else {
|
1806 |
-
$this->
|
1807 |
}
|
1808 |
|
1809 |
$indexFileContent = '';
|
1810 |
$startupFileContent = '';
|
1811 |
|
1812 |
-
if (
|
1813 |
$indexFileContent = file_get_contents(M1_STORE_BASE_DIR . "/index.php");
|
1814 |
}
|
1815 |
|
@@ -1817,11 +2152,11 @@ class M1_Config_Adapter_Opencart14 extends M1_Config_Adapter
|
|
1817 |
$startupFileContent = file_get_contents(M1_STORE_BASE_DIR . "/system/startup.php");
|
1818 |
}
|
1819 |
|
1820 |
-
if (
|
1821 |
preg_match("/define\('\VERSION\'\, \'(.+)\'\)/", $startupFileContent, $match);
|
1822 |
-
}
|
1823 |
|
1824 |
-
if (
|
1825 |
$this->cartVars['dbVersion'] = $match[1];
|
1826 |
unset($match);
|
1827 |
}
|
@@ -1832,59 +2167,80 @@ class M1_Config_Adapter_Opencart14 extends M1_Config_Adapter
|
|
1832 |
$this->manufacturersImagesDir = $this->imagesDir;
|
1833 |
|
1834 |
}
|
|
|
1835 |
}
|
1836 |
|
1837 |
|
1838 |
|
|
|
|
|
|
|
1839 |
class M1_Config_Adapter_Litecommerce extends M1_Config_Adapter
|
1840 |
{
|
1841 |
-
|
|
|
|
|
|
|
|
|
1842 |
{
|
1843 |
-
if ((file_exists(M1_STORE_BASE_DIR .'/etc/config.php'))){
|
1844 |
$file = M1_STORE_BASE_DIR .'/etc/config.php';
|
1845 |
-
$this->imagesDir = "/images";
|
1846 |
$this->categoriesImagesDir = $this->imagesDir."/category";
|
1847 |
$this->productsImagesDir = $this->imagesDir."/product";
|
1848 |
$this->manufacturersImagesDir = $this->imagesDir;
|
1849 |
-
} elseif(file_exists(M1_STORE_BASE_DIR .'/modules/lc_connector/litecommerce/etc/config.php')) {
|
1850 |
$file = M1_STORE_BASE_DIR .'/modules/lc_connector/litecommerce/etc/config.php';
|
1851 |
-
$this->imagesDir = "/modules/lc_connector/litecommerce/images";
|
1852 |
$this->categoriesImagesDir = $this->imagesDir."/category";
|
1853 |
$this->productsImagesDir = $this->imagesDir."/product";
|
1854 |
$this->manufacturersImagesDir = $this->imagesDir;
|
1855 |
}
|
1856 |
|
1857 |
-
$settings = parse_ini_file($file);
|
1858 |
-
$
|
|
|
1859 |
$this->setHostPort($settings['hostspec']);
|
1860 |
-
$this->
|
1861 |
-
$this->
|
1862 |
-
$this->
|
1863 |
-
$this->
|
1864 |
|
1865 |
-
$version = $this->getCartVersionFromDb("value", "config", "name = 'version'");
|
1866 |
-
if (
|
1867 |
$this->cartVars['dbVersion'] = $version;
|
1868 |
}
|
1869 |
}
|
|
|
1870 |
}
|
1871 |
|
1872 |
|
1873 |
|
|
|
|
|
|
|
1874 |
class M1_Config_Adapter_Oxid extends M1_Config_Adapter
|
1875 |
{
|
1876 |
-
|
|
|
|
|
|
|
|
|
1877 |
{
|
1878 |
//@include_once M1_STORE_BASE_DIR . "config.inc.php";
|
1879 |
$config = file_get_contents(M1_STORE_BASE_DIR . "config.inc.php");
|
1880 |
-
|
1881 |
-
|
1882 |
-
|
1883 |
-
|
1884 |
-
|
1885 |
-
|
1886 |
-
|
1887 |
-
|
|
|
|
|
|
|
|
|
1888 |
|
1889 |
//check about last slash
|
1890 |
$this->imagesDir = "out/pictures/";
|
@@ -1894,21 +2250,29 @@ class M1_Config_Adapter_Oxid extends M1_Config_Adapter
|
|
1894 |
|
1895 |
//add key for decoding config values in oxid db
|
1896 |
//check slash
|
1897 |
-
$
|
1898 |
-
preg_match("/sConfigKey(.+)?=(.+)?\"(.+)?\";/", $
|
1899 |
$this->cartVars['sConfigKey'] = $match[3];
|
1900 |
$version = $this->getCartVersionFromDb("OXVERSION", "oxshops", "OXACTIVE=1 LIMIT 1" );
|
1901 |
-
if (
|
1902 |
$this->cartVars['dbVersion'] = $version;
|
1903 |
-
}
|
1904 |
}
|
|
|
1905 |
}
|
1906 |
|
1907 |
|
1908 |
|
|
|
|
|
|
|
1909 |
class M1_Config_Adapter_XtcommerceVeyton extends M1_Config_Adapter
|
1910 |
{
|
1911 |
-
|
|
|
|
|
|
|
|
|
1912 |
{
|
1913 |
define('_VALID_CALL','TRUE');
|
1914 |
define('_SRV_WEBROOT','TRUE');
|
@@ -1923,14 +2287,14 @@ class M1_Config_Adapter_XtcommerceVeyton extends M1_Config_Adapter
|
|
1923 |
. 'paths.php';
|
1924 |
|
1925 |
$this->setHostPort(_SYSTEM_DATABASE_HOST);
|
1926 |
-
$this->
|
1927 |
-
$this->
|
1928 |
-
$this->
|
1929 |
$this->imagesDir = _SRV_WEB_IMAGES;
|
1930 |
-
$this->
|
1931 |
|
1932 |
$version = $this->getCartVersionFromDb("config_value", "config", "config_key = '_SYSTEM_VERSION'");
|
1933 |
-
if (
|
1934 |
$this->cartVars['dbVersion'] = $version;
|
1935 |
}
|
1936 |
|
@@ -1938,21 +2302,29 @@ class M1_Config_Adapter_XtcommerceVeyton extends M1_Config_Adapter
|
|
1938 |
$this->productsImagesDir = $this->imagesDir;
|
1939 |
$this->manufacturersImagesDir = $this->imagesDir;
|
1940 |
}
|
|
|
1941 |
}
|
1942 |
|
1943 |
|
|
|
|
|
|
|
1944 |
class M1_Config_Adapter_SSPremium extends M1_Config_Adapter
|
1945 |
{
|
1946 |
-
|
|
|
|
|
|
|
|
|
1947 |
{
|
1948 |
-
if (
|
1949 |
$config = file_get_contents(M1_STORE_BASE_DIR . 'cfg/connect.inc.php');
|
1950 |
preg_match("/define\(\'DB_NAME\', \'(.+)\'\);/", $config, $match);
|
1951 |
-
$this->
|
1952 |
preg_match("/define\(\'DB_USER\', \'(.+)\'\);/", $config, $match);
|
1953 |
-
$this->
|
1954 |
preg_match("/define\(\'DB_PASS\', \'(.*)\'\);/", $config, $match);
|
1955 |
-
$this->
|
1956 |
preg_match("/define\(\'DB_HOST\', \'(.+)\'\);/", $config, $match);
|
1957 |
$this->setHostPort( $match[1] );
|
1958 |
|
@@ -1962,14 +2334,14 @@ class M1_Config_Adapter_SSPremium extends M1_Config_Adapter
|
|
1962 |
$this->manufacturersImagesDir = $this->imagesDir;
|
1963 |
|
1964 |
$version = $this->getCartVersionFromDb("value", "SS_system", "varName = 'version_number'");
|
1965 |
-
if (
|
1966 |
$this->cartVars['dbVersion'] = $version;
|
1967 |
}
|
1968 |
} else {
|
1969 |
$config = include M1_STORE_BASE_DIR . "wa-config/db.php";
|
1970 |
-
$this->
|
1971 |
-
$this->
|
1972 |
-
$this->
|
1973 |
$this->setHostPort($config['default']['host']);
|
1974 |
|
1975 |
$this->imagesDir = "products_pictures/";
|
@@ -1983,9 +2355,16 @@ class M1_Config_Adapter_SSPremium extends M1_Config_Adapter
|
|
1983 |
|
1984 |
}
|
1985 |
|
|
|
|
|
|
|
1986 |
class M1_Config_Adapter_Virtuemart113 extends M1_Config_Adapter
|
1987 |
{
|
1988 |
-
|
|
|
|
|
|
|
|
|
1989 |
{
|
1990 |
require_once M1_STORE_BASE_DIR . "/configuration.php";
|
1991 |
|
@@ -1994,19 +2373,19 @@ class M1_Config_Adapter_Virtuemart113 extends M1_Config_Adapter
|
|
1994 |
$jconfig = new JConfig();
|
1995 |
|
1996 |
$this->setHostPort($jconfig->host);
|
1997 |
-
$this->
|
1998 |
-
$this->
|
1999 |
-
$this->
|
2000 |
|
2001 |
} else {
|
2002 |
|
2003 |
$this->setHostPort($mosConfig_host);
|
2004 |
-
$this->
|
2005 |
-
$this->
|
2006 |
-
$this->
|
2007 |
}
|
2008 |
|
2009 |
-
if (
|
2010 |
$ver = file_get_contents(M1_STORE_BASE_DIR . "/administrator/components/com_virtuemart/version.php");
|
2011 |
if (preg_match('/\$RELEASE.+\'(.+)\'/', $ver, $match) != 0) {
|
2012 |
$this->cartVars['dbVersion'] = $match[1];
|
@@ -2019,23 +2398,30 @@ class M1_Config_Adapter_Virtuemart113 extends M1_Config_Adapter
|
|
2019 |
$this->productsImagesDir = $this->imagesDir;
|
2020 |
$this->manufacturersImagesDir = $this->imagesDir;
|
2021 |
|
2022 |
-
if (
|
2023 |
$this->imagesDir = 'images/stories/virtuemart';
|
2024 |
$this->productsImagesDir = $this->imagesDir . '/product';
|
2025 |
$this->categoriesImagesDir = $this->imagesDir . '/category';
|
2026 |
$this->manufacturersImagesDir = $this->imagesDir . '/manufacturer';
|
2027 |
}
|
2028 |
-
|
2029 |
}
|
|
|
2030 |
}
|
2031 |
|
2032 |
|
|
|
|
|
|
|
2033 |
class M1_Config_Adapter_Hhgmultistore extends M1_Config_Adapter
|
2034 |
{
|
2035 |
-
|
|
|
|
|
|
|
|
|
2036 |
{
|
2037 |
-
define('SITE_PATH','');
|
2038 |
-
define('WEB_PATH','');
|
2039 |
require_once M1_STORE_BASE_DIR . "core/config/configure.php";
|
2040 |
require_once M1_STORE_BASE_DIR . "core/config/paths.php";
|
2041 |
|
@@ -2051,12 +2437,12 @@ class M1_Config_Adapter_Hhgmultistore extends M1_Config_Adapter
|
|
2051 |
$this->manufacturersImagesDirs['img'] = $baseDir . DIR_WS_MANUFACTURERS_IMAGES;
|
2052 |
$this->manufacturersImagesDirs['org'] = $baseDir . DIR_WS_MANUFACTURERS_ORG_IMAGES;
|
2053 |
|
2054 |
-
$this->
|
2055 |
-
$this->
|
2056 |
-
$this->
|
2057 |
-
$this->
|
2058 |
|
2059 |
-
if (
|
2060 |
$ver = file_get_contents(M1_STORE_BASE_DIR . "/core/config/conf.hhg_startup.php");
|
2061 |
if (preg_match('/PROJECT_VERSION.+\((.+)\)\'\)/', $ver, $match) != 0) {
|
2062 |
$this->cartVars['dbVersion'] = $match[1];
|
@@ -2064,33 +2450,256 @@ class M1_Config_Adapter_Hhgmultistore extends M1_Config_Adapter
|
|
2064 |
}
|
2065 |
}
|
2066 |
}
|
|
|
2067 |
}
|
2068 |
|
2069 |
|
2070 |
-
|
|
|
|
|
|
|
2071 |
{
|
2072 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2073 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2074 |
/**
|
2075 |
* @var SimpleXMLElement
|
2076 |
*/
|
2077 |
$config = simplexml_load_file(M1_STORE_BASE_DIR . 'app/etc/local.xml');
|
2078 |
$statuses = simplexml_load_file(M1_STORE_BASE_DIR . 'app/code/core/Mage/Sales/etc/config.xml');
|
2079 |
|
2080 |
-
$version =
|
2081 |
|
2082 |
$result = array();
|
2083 |
|
2084 |
-
if(
|
2085 |
$statuses = $statuses->global->sales->order->statuses;
|
2086 |
foreach ( $statuses->children() as $status ) {
|
2087 |
-
$result[$status->getName()] = (string)
|
2088 |
}
|
2089 |
}
|
2090 |
|
2091 |
-
if (
|
2092 |
$ver = file_get_contents(M1_STORE_BASE_DIR . "app/Mage.php");
|
2093 |
-
if (
|
2094 |
$mageVersion = $match[1] . '.' . $match[2] . '.' . $match[3] . '.' . $match[4];
|
2095 |
$this->cartVars['dbVersion'] = $mageVersion;
|
2096 |
unset($match);
|
@@ -2100,10 +2709,10 @@ class M1_Config_Adapter_Magento1212 extends M1_Config_Adapter
|
|
2100 |
$this->cartVars['orderStatus'] = $result;
|
2101 |
$this->cartVars['AdminUrl'] = (string)$config->admin->routers->adminhtml->args->frontName;
|
2102 |
|
2103 |
-
$this->setHostPort((string)
|
2104 |
-
$this->
|
2105 |
-
$this->
|
2106 |
-
$this->
|
2107 |
|
2108 |
$this->imagesDir = 'media/';
|
2109 |
$this->categoriesImagesDir = $this->imagesDir . "catalog/category/";
|
@@ -2113,16 +2722,23 @@ class M1_Config_Adapter_Magento1212 extends M1_Config_Adapter
|
|
2113 |
}
|
2114 |
}
|
2115 |
|
|
|
|
|
|
|
2116 |
class M1_Config_Adapter_Interspire extends M1_Config_Adapter
|
2117 |
{
|
2118 |
-
|
|
|
|
|
|
|
|
|
2119 |
{
|
2120 |
require_once M1_STORE_BASE_DIR . "config/config.php";
|
2121 |
|
2122 |
$this->setHostPort($GLOBALS['ISC_CFG']["dbServer"]);
|
2123 |
-
$this->
|
2124 |
-
$this->
|
2125 |
-
$this->
|
2126 |
|
2127 |
$this->imagesDir = $GLOBALS['ISC_CFG']["ImageDirectory"];
|
2128 |
$this->categoriesImagesDir = $this->imagesDir;
|
@@ -2132,15 +2748,22 @@ class M1_Config_Adapter_Interspire extends M1_Config_Adapter
|
|
2132 |
define('DEFAULT_LANGUAGE_ISO2',$GLOBALS['ISC_CFG']["Language"]);
|
2133 |
|
2134 |
$version = $this->getCartVersionFromDb("database_version", $GLOBALS['ISC_CFG']["tablePrefix"] . "config", '1');
|
2135 |
-
if (
|
2136 |
$this->cartVars['dbVersion'] = $version;
|
2137 |
}
|
2138 |
}
|
2139 |
}
|
2140 |
|
|
|
|
|
|
|
2141 |
class M1_Config_Adapter_Pinnacle361 extends M1_Config_Adapter
|
2142 |
{
|
2143 |
-
|
|
|
|
|
|
|
|
|
2144 |
{
|
2145 |
include_once M1_STORE_BASE_DIR . 'content/engine/engine_config.php';
|
2146 |
|
@@ -2151,24 +2774,35 @@ class M1_Config_Adapter_Pinnacle361 extends M1_Config_Adapter
|
|
2151 |
|
2152 |
//$this->Host = DB_HOST;
|
2153 |
$this->setHostPort(DB_HOST);
|
2154 |
-
$this->
|
2155 |
-
$this->
|
2156 |
-
$this->
|
2157 |
-
|
2158 |
-
$version = $this->getCartVersionFromDb(
|
2159 |
-
|
|
|
|
|
|
|
|
|
2160 |
$this->cartVars['dbVersion'] = $version;
|
2161 |
}
|
2162 |
}
|
2163 |
-
}
|
2164 |
|
|
|
2165 |
|
2166 |
|
|
|
|
|
|
|
2167 |
class M1_Config_Adapter_Oscommerce22ms2 extends M1_Config_Adapter
|
2168 |
{
|
2169 |
-
|
|
|
|
|
|
|
|
|
2170 |
{
|
2171 |
-
$
|
2172 |
|
2173 |
chdir(M1_STORE_BASE_DIR);
|
2174 |
|
@@ -2176,27 +2810,27 @@ class M1_Config_Adapter_Oscommerce22ms2 extends M1_Config_Adapter
|
|
2176 |
. "includes" . DIRECTORY_SEPARATOR
|
2177 |
. "configure.php";
|
2178 |
|
2179 |
-
chdir($
|
2180 |
|
2181 |
$this->imagesDir = DIR_WS_IMAGES;
|
2182 |
-
|
2183 |
$this->categoriesImagesDir = $this->imagesDir;
|
2184 |
$this->productsImagesDir = $this->imagesDir;
|
2185 |
-
if (
|
2186 |
$this->productsImagesDir = DIR_WS_PRODUCT_IMAGES;
|
2187 |
}
|
2188 |
-
if (
|
2189 |
$this->productsImagesDir = DIR_WS_ORIGINAL_IMAGES;
|
2190 |
}
|
2191 |
$this->manufacturersImagesDir = $this->imagesDir;
|
2192 |
|
2193 |
//$this->Host = DB_SERVER;
|
2194 |
$this->setHostPort(DB_SERVER);
|
2195 |
-
$this->
|
2196 |
-
$this->
|
2197 |
-
$this->
|
2198 |
chdir(M1_STORE_BASE_DIR);
|
2199 |
-
if (
|
2200 |
$conf = file_get_contents (M1_STORE_BASE_DIR . "includes" . DIRECTORY_SEPARATOR . "application_top.php");
|
2201 |
preg_match("/define\('PROJECT_VERSION.*/", $conf, $match);
|
2202 |
if (isset($match[0]) && !empty($match[0])) {
|
@@ -2204,53 +2838,61 @@ class M1_Config_Adapter_Oscommerce22ms2 extends M1_Config_Adapter
|
|
2204 |
if (isset($project[0]) && !empty($project[0])) {
|
2205 |
$version = $project[0];
|
2206 |
$version = str_replace(array(" ","-","_","'",");"), "", $version);
|
2207 |
-
|
2208 |
-
|
2209 |
-
|
2210 |
-
|
2211 |
} else {
|
2212 |
//if another oscommerce based cart
|
2213 |
-
if (
|
2214 |
@require_once M1_STORE_BASE_DIR . "includes" . DIRECTORY_SEPARATOR . "version.php";
|
2215 |
-
|
2216 |
-
|
2217 |
-
|
2218 |
-
|
2219 |
-
|
2220 |
-
|
2221 |
-
|
2222 |
-
|
2223 |
-
}
|
2224 |
-
}
|
2225 |
-
//if zen_cart
|
2226 |
-
} else {
|
2227 |
-
if (defined('PROJECT_VERSION_MAJOR') && PROJECT_VERSION_MAJOR != '' ) {
|
2228 |
-
$this->cartVars['dbVersion'] = PROJECT_VERSION_MAJOR;
|
2229 |
-
}
|
2230 |
-
if (defined('PROJECT_VERSION_MINOR') && PROJECT_VERSION_MINOR != '' ) {
|
2231 |
-
$this->cartVars['dbVersion'] .= '.' . PROJECT_VERSION_MINOR;
|
2232 |
}
|
2233 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2234 |
}
|
2235 |
}
|
2236 |
}
|
2237 |
-
chdir($
|
2238 |
}
|
|
|
2239 |
}
|
2240 |
|
2241 |
|
2242 |
|
|
|
|
|
|
|
2243 |
class M1_Config_Adapter_Tomatocart extends M1_Config_Adapter
|
2244 |
{
|
2245 |
-
|
|
|
|
|
|
|
|
|
2246 |
{
|
2247 |
$config = file_get_contents(M1_STORE_BASE_DIR . "includes/configure.php");
|
2248 |
preg_match("/define\(\'DB_DATABASE\', \'(.+)\'\);/", $config, $match);
|
2249 |
-
$this->
|
2250 |
preg_match("/define\(\'DB_SERVER_USERNAME\', \'(.+)\'\);/", $config, $match);
|
2251 |
-
$this->
|
2252 |
preg_match("/define\(\'DB_SERVER_PASSWORD\', \'(.*)\'\);/", $config, $match);
|
2253 |
-
$this->
|
2254 |
preg_match("/define\(\'DB_SERVER\', \'(.+)\'\);/", $config, $match);
|
2255 |
$this->setHostPort( $match[1] );
|
2256 |
|
@@ -2260,7 +2902,7 @@ class M1_Config_Adapter_Tomatocart extends M1_Config_Adapter
|
|
2260 |
$this->categoriesImagesDir = $this->imagesDir.'categories/';
|
2261 |
$this->productsImagesDir = $this->imagesDir.'products/';
|
2262 |
$this->manufacturersImagesDir = $this->imagesDir . 'manufacturers/';
|
2263 |
-
if (
|
2264 |
$conf = file_get_contents (M1_STORE_BASE_DIR . "includes" . DIRECTORY_SEPARATOR . "application_top.php");
|
2265 |
preg_match("/define\('PROJECT_VERSION.*/", $conf, $match);
|
2266 |
|
@@ -2275,7 +2917,7 @@ class M1_Config_Adapter_Tomatocart extends M1_Config_Adapter
|
|
2275 |
}
|
2276 |
} else {
|
2277 |
//if another version
|
2278 |
-
if (
|
2279 |
@require_once M1_STORE_BASE_DIR . "includes" . DIRECTORY_SEPARATOR . "version.php";
|
2280 |
if (defined('PROJECT_VERSION') && PROJECT_VERSION != '' ) {
|
2281 |
$version = PROJECT_VERSION;
|
@@ -2292,13 +2934,21 @@ class M1_Config_Adapter_Tomatocart extends M1_Config_Adapter
|
|
2292 |
}
|
2293 |
}
|
2294 |
}
|
|
|
2295 |
}
|
2296 |
|
2297 |
|
2298 |
|
|
|
|
|
|
|
2299 |
class M1_Config_Adapter_Sunshop4 extends M1_Config_Adapter
|
2300 |
{
|
2301 |
-
|
|
|
|
|
|
|
|
|
2302 |
{
|
2303 |
@require_once M1_STORE_BASE_DIR
|
2304 |
. "include" . DIRECTORY_SEPARATOR
|
@@ -2310,106 +2960,143 @@ class M1_Config_Adapter_Sunshop4 extends M1_Config_Adapter
|
|
2310 |
$this->productsImagesDir = $this->imagesDir;
|
2311 |
$this->manufacturersImagesDir = $this->imagesDir;
|
2312 |
|
2313 |
-
if (
|
2314 |
$this->cartVars['AdminUrl'] = ADMIN_DIR;
|
2315 |
}
|
2316 |
|
2317 |
$this->setHostPort($servername);
|
2318 |
-
$this->
|
2319 |
-
$this->
|
2320 |
-
$this->
|
2321 |
|
2322 |
if (isset($dbprefix)) {
|
2323 |
-
$this->
|
2324 |
}
|
2325 |
|
2326 |
$version = $this->getCartVersionFromDb("value", "settings", "name = 'version'");
|
2327 |
-
if (
|
2328 |
$this->cartVars['dbVersion'] = $version;
|
2329 |
}
|
2330 |
-
|
2331 |
}
|
|
|
2332 |
}
|
2333 |
|
2334 |
|
2335 |
|
|
|
|
|
|
|
2336 |
class miSettings {
|
2337 |
-
var $arr;
|
2338 |
|
2339 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2340 |
static $instance = null;
|
2341 |
-
if (
|
2342 |
$instance = new miSettings();
|
2343 |
}
|
2344 |
return $instance;
|
2345 |
}
|
2346 |
|
2347 |
-
|
|
|
|
|
|
|
2348 |
{
|
2349 |
-
$this->
|
2350 |
}
|
2351 |
|
2352 |
-
|
|
|
|
|
|
|
2353 |
{
|
2354 |
-
return $this->
|
2355 |
}
|
2356 |
|
2357 |
}
|
2358 |
|
|
|
|
|
|
|
2359 |
class M1_Config_Adapter_Summercart3 extends M1_Config_Adapter
|
2360 |
{
|
2361 |
-
|
|
|
|
|
|
|
|
|
2362 |
{
|
2363 |
@include_once M1_STORE_BASE_DIR . "include/miphpf/Config.php";
|
2364 |
|
2365 |
-
$
|
|
|
2366 |
|
2367 |
$data = $instance->getArray();
|
2368 |
|
2369 |
$this->setHostPort($data[0]['MI_DEFAULT_DB_HOST']);
|
2370 |
-
$this->
|
2371 |
-
$this->
|
2372 |
-
$this->
|
2373 |
$this->imagesDir = "/userfiles/";
|
2374 |
|
2375 |
$this->categoriesImagesDir = $this->imagesDir . "categoryimages";
|
2376 |
$this->productsImagesDir = $this->imagesDir . "productimages";
|
2377 |
$this->manufacturersImagesDir = $this->imagesDir . "manufacturer";
|
2378 |
|
2379 |
-
if (
|
2380 |
$indexFileContent = file_get_contents(M1_STORE_BASE_DIR . "/include/VERSION");
|
2381 |
$this->cartVars['dbVersion'] = trim($indexFileContent);
|
2382 |
}
|
2383 |
-
|
2384 |
}
|
|
|
2385 |
}
|
2386 |
|
2387 |
|
2388 |
|
|
|
|
|
|
|
2389 |
class M1_Config_Adapter_Oscommerce3 extends M1_Config_Adapter
|
2390 |
{
|
2391 |
-
|
|
|
|
|
|
|
|
|
2392 |
{
|
2393 |
$file = M1_STORE_BASE_DIR .'/osCommerce/OM/Config/settings.ini';
|
2394 |
-
$settings=parse_ini_file($file);
|
2395 |
-
$this->imagesDir = "/public/";
|
2396 |
$this->categoriesImagesDir = $this->imagesDir."/categories";
|
2397 |
$this->productsImagesDir = $this->imagesDir."/products";
|
2398 |
$this->manufacturersImagesDir = $this->imagesDir;
|
2399 |
|
2400 |
-
$this->
|
2401 |
$this->setHostPort($settings['db_server_port']);
|
2402 |
-
$this->
|
2403 |
-
$this->
|
2404 |
-
$this->
|
2405 |
}
|
|
|
2406 |
}
|
2407 |
|
2408 |
|
2409 |
|
|
|
|
|
|
|
2410 |
class M1_Config_Adapter_Prestashop15 extends M1_Config_Adapter
|
2411 |
{
|
2412 |
-
|
|
|
|
|
|
|
|
|
2413 |
{
|
2414 |
$confFileOne = file_get_contents(M1_STORE_BASE_DIR . "/config/settings.inc.php");
|
2415 |
$confFileTwo = file_get_contents(M1_STORE_BASE_DIR . "/config/config.inc.php");
|
@@ -2417,7 +3104,7 @@ class M1_Config_Adapter_Prestashop15 extends M1_Config_Adapter
|
|
2417 |
$filesLines = array_merge(explode("\n", $confFileOne), explode("\n", $confFileTwo));
|
2418 |
|
2419 |
$execute = '$currentDir = \'\';';
|
2420 |
-
|
2421 |
$isComment = false;
|
2422 |
foreach ($filesLines as $line) {
|
2423 |
$startComment = preg_match("/^(\/\*)/", $line);
|
@@ -2437,8 +3124,15 @@ class M1_Config_Adapter_Prestashop15 extends M1_Config_Adapter
|
|
2437 |
}
|
2438 |
|
2439 |
if (preg_match("/^(\s*)define\(/i", $line)) {
|
2440 |
-
if ((strpos($line, '_DB_') !== false) || (strpos($line, '_PS_IMG_DIR_') !== false)
|
2441 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2442 |
}
|
2443 |
}
|
2444 |
}
|
@@ -2447,13 +3141,13 @@ class M1_Config_Adapter_Prestashop15 extends M1_Config_Adapter
|
|
2447 |
eval($execute);
|
2448 |
|
2449 |
$this->setHostPort(_DB_SERVER_);
|
2450 |
-
$this->
|
2451 |
-
$this->
|
2452 |
-
$this->
|
2453 |
|
2454 |
if (defined('_PS_IMG_DIR_') && defined('_PS_ROOT_DIR_')) {
|
2455 |
|
2456 |
-
preg_match("/(\/\w+\/)$/i", _PS_IMG_DIR_
|
2457 |
$this->imagesDir = $m[1];
|
2458 |
|
2459 |
} else {
|
@@ -2468,22 +3162,29 @@ class M1_Config_Adapter_Prestashop15 extends M1_Config_Adapter
|
|
2468 |
$this->cartVars['dbVersion'] = _PS_VERSION_;
|
2469 |
}
|
2470 |
}
|
2471 |
-
}
|
2472 |
|
|
|
2473 |
|
2474 |
|
2475 |
|
|
|
|
|
|
|
2476 |
class M1_Config_Adapter_Gambio extends M1_Config_Adapter
|
2477 |
{
|
2478 |
-
|
|
|
|
|
|
|
|
|
2479 |
{
|
2480 |
-
$
|
2481 |
|
2482 |
chdir(M1_STORE_BASE_DIR);
|
2483 |
|
2484 |
@require_once M1_STORE_BASE_DIR . "includes/configure.php";
|
2485 |
|
2486 |
-
chdir($
|
2487 |
|
2488 |
$this->imagesDir = DIR_WS_IMAGES;
|
2489 |
|
@@ -2497,11 +3198,11 @@ class M1_Config_Adapter_Gambio extends M1_Config_Adapter
|
|
2497 |
}
|
2498 |
$this->manufacturersImagesDir = $this->imagesDir;
|
2499 |
|
2500 |
-
$this->
|
2501 |
//$this->setHostPort(DB_SERVER);
|
2502 |
-
$this->
|
2503 |
-
$this->
|
2504 |
-
$this->
|
2505 |
|
2506 |
chdir(M1_STORE_BASE_DIR);
|
2507 |
if (file_exists(M1_STORE_BASE_DIR . "includes" . DIRECTORY_SEPARATOR . 'application_top.php')) {
|
@@ -2518,7 +3219,7 @@ class M1_Config_Adapter_Gambio extends M1_Config_Adapter
|
|
2518 |
}
|
2519 |
} else {
|
2520 |
//if another oscommerce based cart
|
2521 |
-
if (
|
2522 |
@require_once M1_STORE_BASE_DIR . DIRECTORY_SEPARATOR . "version_info.php";
|
2523 |
if (defined('PROJECT_VERSION') && PROJECT_VERSION != '' ) {
|
2524 |
$version = PROJECT_VERSION;
|
@@ -2542,27 +3243,42 @@ class M1_Config_Adapter_Gambio extends M1_Config_Adapter
|
|
2542 |
}
|
2543 |
}
|
2544 |
}
|
2545 |
-
chdir($
|
2546 |
}
|
|
|
2547 |
}
|
2548 |
|
2549 |
|
2550 |
|
|
|
|
|
|
|
2551 |
class M1_Config_Adapter_Shopware extends M1_Config_Adapter
|
2552 |
{
|
2553 |
-
|
|
|
|
|
|
|
|
|
2554 |
{
|
2555 |
$configs = include(M1_STORE_BASE_DIR . "config.php");
|
2556 |
$this->setHostPort($configs['db']['host']);
|
2557 |
-
$this->
|
2558 |
-
$this->
|
2559 |
-
$this->
|
2560 |
}
|
2561 |
}
|
2562 |
|
|
|
|
|
|
|
2563 |
class M1_Config_Adapter_AceShop extends M1_Config_Adapter
|
2564 |
{
|
2565 |
-
|
|
|
|
|
|
|
|
|
2566 |
{
|
2567 |
require_once M1_STORE_BASE_DIR . "/configuration.php";
|
2568 |
|
@@ -2571,30 +3287,37 @@ class M1_Config_Adapter_AceShop extends M1_Config_Adapter
|
|
2571 |
$jconfig = new JConfig();
|
2572 |
|
2573 |
$this->setHostPort($jconfig->host);
|
2574 |
-
$this->
|
2575 |
-
$this->
|
2576 |
-
$this->
|
2577 |
|
2578 |
} else {
|
2579 |
|
2580 |
$this->setHostPort($mosConfig_host);
|
2581 |
-
$this->
|
2582 |
-
$this->
|
2583 |
-
$this->
|
2584 |
}
|
2585 |
|
2586 |
-
|
2587 |
$this->imagesDir = "components/com_aceshop/opencart/image/";
|
2588 |
$this->categoriesImagesDir = $this->imagesDir;
|
2589 |
$this->productsImagesDir = $this->imagesDir;
|
2590 |
$this->manufacturersImagesDir = $this->imagesDir;
|
2591 |
}
|
|
|
2592 |
}
|
2593 |
|
2594 |
|
|
|
|
|
|
|
2595 |
class M1_Config_Adapter_Cscart203 extends M1_Config_Adapter
|
2596 |
{
|
2597 |
-
|
|
|
|
|
|
|
|
|
2598 |
{
|
2599 |
define("IN_CSCART", 1);
|
2600 |
define("CSCART_DIR", M1_STORE_BASE_DIR);
|
@@ -2607,18 +3330,18 @@ class M1_Config_Adapter_Cscart203 extends M1_Config_Adapter
|
|
2607 |
defined('DIR_IMAGES') or define('DIR_IMAGES', DIR_ROOT . '/images/');
|
2608 |
|
2609 |
//For CS CART 1.3.x
|
2610 |
-
if(
|
2611 |
$this->setHostPort($db_host);
|
2612 |
-
$this->
|
2613 |
-
$this->
|
2614 |
-
$this->
|
2615 |
$this->imagesDir = str_replace(M1_STORE_BASE_DIR, '', IMAGES_STORAGE_DIR );
|
2616 |
} else {
|
2617 |
|
2618 |
$this->setHostPort($config['db_host']);
|
2619 |
-
$this->
|
2620 |
-
$this->
|
2621 |
-
$this->
|
2622 |
$this->imagesDir = str_replace(M1_STORE_BASE_DIR, '', DIR_IMAGES);
|
2623 |
}
|
2624 |
|
@@ -2626,85 +3349,35 @@ class M1_Config_Adapter_Cscart203 extends M1_Config_Adapter
|
|
2626 |
$this->productsImagesDir = $this->imagesDir;
|
2627 |
$this->manufacturersImagesDir = $this->imagesDir;
|
2628 |
|
2629 |
-
if(
|
2630 |
$this->cartVars['cs_max_files_in_dir'] = MAX_FILES_IN_DIR;
|
2631 |
}
|
2632 |
|
2633 |
-
if(
|
2634 |
$this->cartVars['dbVersion'] = PRODUCT_VERSION;
|
2635 |
}
|
2636 |
}
|
2637 |
-
}
|
2638 |
-
|
2639 |
|
2640 |
-
class M1_Config_Adapter_WPecommerce extends M1_Config_Adapter
|
2641 |
-
{
|
2642 |
-
function M1_Config_Adapter_WPecommerce()
|
2643 |
-
{
|
2644 |
-
//@include_once M1_STORE_BASE_DIR . "wp-config.php";
|
2645 |
-
$config = file_get_contents(M1_STORE_BASE_DIR . "wp-config.php");
|
2646 |
-
preg_match("/define\(\'DB_NAME\', \'(.+)\'\);/", $config, $match);
|
2647 |
-
$this->Dbname = $match[1];
|
2648 |
-
preg_match("/define\(\'DB_USER\', \'(.+)\'\);/", $config, $match);
|
2649 |
-
$this->Username = $match[1];
|
2650 |
-
preg_match("/define\(\'DB_PASSWORD\', \'(.*)\'\);/", $config, $match);
|
2651 |
-
$this->Password = $match[1];
|
2652 |
-
preg_match("/define\(\'DB_HOST\', \'(.+)\'\);/", $config, $match);
|
2653 |
-
$this->setHostPort( $match[1] );
|
2654 |
-
preg_match("/(table_prefix)(.*)(')(.*)(')(.*)/", $config, $match);
|
2655 |
-
$this->TblPrefix = $match[4];
|
2656 |
-
$version = $this->getCartVersionFromDb("option_value", "options", "option_name = 'wpsc_version'");
|
2657 |
-
if ( $version != '' ) {
|
2658 |
-
$this->cartVars['dbVersion'] = $version;
|
2659 |
-
} else {
|
2660 |
-
if ( file_exists(M1_STORE_BASE_DIR . "wp-content".DIRECTORY_SEPARATOR."plugins".DIRECTORY_SEPARATOR."wp-shopping-cart".DIRECTORY_SEPARATOR."wp-shopping-cart.php") ) {
|
2661 |
-
$conf = file_get_contents (M1_STORE_BASE_DIR . "wp-content".DIRECTORY_SEPARATOR."plugins".DIRECTORY_SEPARATOR."wp-shopping-cart".DIRECTORY_SEPARATOR."wp-shopping-cart.php");
|
2662 |
-
preg_match("/define\('WPSC_VERSION.*/", $conf, $match);
|
2663 |
-
if (isset($match[0]) && !empty($match[0])) {
|
2664 |
-
preg_match("/\d.*/", $match[0], $project);
|
2665 |
-
if (isset($project[0]) && !empty($project[0])) {
|
2666 |
-
$version = $project[0];
|
2667 |
-
$version = str_replace(array(" ","-","_","'",");",")",";"), "", $version);
|
2668 |
-
if ($version != '') {
|
2669 |
-
$this->cartVars['dbVersion'] = strtolower($version);
|
2670 |
-
}
|
2671 |
-
}
|
2672 |
-
}
|
2673 |
-
}
|
2674 |
-
}
|
2675 |
-
if ( file_exists(M1_STORE_BASE_DIR . "wp-content/plugins/shopp/Shopp.php") || file_exists(M1_STORE_BASE_DIR . "wp-content/plugins/wp-e-commerce/editor.php") ) {
|
2676 |
-
$this->imagesDir = "wp-content/uploads/wpsc/";
|
2677 |
-
$this->categoriesImagesDir = $this->imagesDir.'category_images/';
|
2678 |
-
$this->productsImagesDir = $this->imagesDir.'product_images/';
|
2679 |
-
$this->manufacturersImagesDir = $this->imagesDir;
|
2680 |
-
} elseif ( file_exists(M1_STORE_BASE_DIR . "wp-content/plugins/wp-e-commerce/wp-shopping-cart.php") ) {
|
2681 |
-
$this->imagesDir = "wp-content/uploads/";
|
2682 |
-
$this->categoriesImagesDir = $this->imagesDir."wpsc/category_images/";
|
2683 |
-
$this->productsImagesDir = $this->imagesDir;
|
2684 |
-
$this->manufacturersImagesDir = $this->imagesDir;
|
2685 |
-
} else {
|
2686 |
-
$this->imagesDir = "images/";
|
2687 |
-
$this->categoriesImagesDir = $this->imagesDir;
|
2688 |
-
$this->productsImagesDir = $this->imagesDir;
|
2689 |
-
$this->manufacturersImagesDir = $this->imagesDir;
|
2690 |
-
}
|
2691 |
-
}
|
2692 |
}
|
2693 |
|
2694 |
|
2695 |
-
|
|
|
|
|
2696 |
class M1_Config_Adapter_LemonStand extends M1_Config_Adapter
|
2697 |
{
|
2698 |
-
|
|
|
|
|
|
|
|
|
2699 |
{
|
2700 |
include (M1_STORE_BASE_DIR . 'phproad/system/phpr.php');
|
2701 |
include (M1_STORE_BASE_DIR . 'phproad/modules/phpr/classes/phpr_securityframework.php');
|
2702 |
|
2703 |
define('PATH_APP','');
|
2704 |
|
2705 |
-
|
2706 |
-
if(phpversion() > 5)
|
2707 |
-
{
|
2708 |
eval ('Phpr::$config = new MockConfig();
|
2709 |
Phpr::$config->set("SECURE_CONFIG_PATH", M1_STORE_BASE_DIR . "config/config.dat");
|
2710 |
$framework = Phpr_SecurityFramework::create();');
|
@@ -2713,9 +3386,9 @@ class M1_Config_Adapter_LemonStand extends M1_Config_Adapter
|
|
2713 |
$config_content = $framework->get_config_content();
|
2714 |
|
2715 |
$this->setHostPort($config_content['mysql_params']['host']);
|
2716 |
-
$this->
|
2717 |
-
$this->
|
2718 |
-
$this->
|
2719 |
|
2720 |
$this->categoriesImagesDir = '/uploaded/thumbnails/';
|
2721 |
$this->productsImagesDir = '/uploaded/';
|
@@ -2725,25 +3398,46 @@ class M1_Config_Adapter_LemonStand extends M1_Config_Adapter
|
|
2725 |
$this->cartVars['dbVersion'] = $version;
|
2726 |
|
2727 |
}
|
|
|
2728 |
}
|
2729 |
|
|
|
|
|
|
|
2730 |
class MockConfig {
|
2731 |
-
|
2732 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2733 |
{
|
2734 |
$this->_data[$key] = $value;
|
2735 |
}
|
2736 |
-
|
2737 |
-
|
|
|
|
|
|
|
|
|
|
|
2738 |
{
|
2739 |
return isset($this->_data[$key]) ? $this->_data[$key] : $default;
|
2740 |
}
|
2741 |
}
|
2742 |
|
|
|
|
|
|
|
2743 |
class M1_Config_Adapter_DrupalCommerce extends M1_Config_Adapter
|
2744 |
{
|
2745 |
|
2746 |
-
|
|
|
|
|
|
|
2747 |
{
|
2748 |
@include_once M1_STORE_BASE_DIR . "sites/default/settings.php";
|
2749 |
|
@@ -2758,20 +3452,19 @@ class M1_Config_Adapter_DrupalCommerce extends M1_Config_Adapter
|
|
2758 |
}
|
2759 |
|
2760 |
$this->setHostPort( $url['host'] );
|
2761 |
-
$this->
|
2762 |
-
$this->
|
2763 |
-
$this->
|
2764 |
|
2765 |
$this->imagesDir = "/sites/default/files/";
|
2766 |
-
if(
|
2767 |
$this->imagesDir = "/files";
|
2768 |
}
|
2769 |
|
2770 |
-
|
2771 |
$fileInfo = M1_STORE_BASE_DIR . "/sites/all/modules/commerce/commerce.info";
|
2772 |
-
if (
|
2773 |
-
$str = file_get_contents(
|
2774 |
-
if (
|
2775 |
$this->cartVars['dbVersion'] = $match[1];
|
2776 |
unset($match);
|
2777 |
}
|
@@ -2780,22 +3473,27 @@ class M1_Config_Adapter_DrupalCommerce extends M1_Config_Adapter
|
|
2780 |
$this->categoriesImagesDir = $this->imagesDir;
|
2781 |
$this->productsImagesDir = $this->imagesDir;
|
2782 |
$this->manufacturersImagesDir = $this->imagesDir;
|
2783 |
-
|
2784 |
-
|
2785 |
}
|
2786 |
}
|
2787 |
|
|
|
|
|
|
|
2788 |
class M1_Config_Adapter_SSFree extends M1_Config_Adapter
|
2789 |
{
|
2790 |
-
|
|
|
|
|
|
|
|
|
2791 |
{
|
2792 |
$config = file_get_contents(M1_STORE_BASE_DIR . 'cfg/connect.inc.php');
|
2793 |
preg_match("/define\(\'DB_NAME\', \'(.+)\'\);/", $config, $match);
|
2794 |
-
$this->
|
2795 |
preg_match("/define\(\'DB_USER\', \'(.+)\'\);/", $config, $match);
|
2796 |
-
$this->
|
2797 |
preg_match("/define\(\'DB_PASS\', \'(.*)\'\);/", $config, $match);
|
2798 |
-
$this->
|
2799 |
preg_match("/define\(\'DB_HOST\', \'(.+)\'\);/", $config, $match);
|
2800 |
$this->setHostPort( $match[1] );
|
2801 |
|
@@ -2824,11 +3522,18 @@ class M1_Config_Adapter_SSFree extends M1_Config_Adapter
|
|
2824 |
|
2825 |
}
|
2826 |
|
|
|
|
|
|
|
2827 |
class M1_Config_Adapter_Zencart137 extends M1_Config_Adapter
|
2828 |
{
|
2829 |
-
|
|
|
|
|
|
|
|
|
2830 |
{
|
2831 |
-
$
|
2832 |
|
2833 |
chdir(M1_STORE_BASE_DIR);
|
2834 |
|
@@ -2836,26 +3541,26 @@ class M1_Config_Adapter_Zencart137 extends M1_Config_Adapter
|
|
2836 |
. "includes" . DIRECTORY_SEPARATOR
|
2837 |
. "configure.php";
|
2838 |
|
2839 |
-
chdir($
|
2840 |
|
2841 |
$this->imagesDir = DIR_WS_IMAGES;
|
2842 |
-
|
2843 |
$this->categoriesImagesDir = $this->imagesDir;
|
2844 |
$this->productsImagesDir = $this->imagesDir;
|
2845 |
-
if (
|
2846 |
$this->productsImagesDir = DIR_WS_PRODUCT_IMAGES;
|
2847 |
}
|
2848 |
-
if (
|
2849 |
$this->productsImagesDir = DIR_WS_ORIGINAL_IMAGES;
|
2850 |
}
|
2851 |
$this->manufacturersImagesDir = $this->imagesDir;
|
2852 |
|
2853 |
//$this->Host = DB_SERVER;
|
2854 |
$this->setHostPort(DB_SERVER);
|
2855 |
-
$this->
|
2856 |
-
$this->
|
2857 |
-
$this->
|
2858 |
-
if (
|
2859 |
@require_once M1_STORE_BASE_DIR
|
2860 |
. "includes" . DIRECTORY_SEPARATOR
|
2861 |
. "version.php";
|
@@ -2868,44 +3573,50 @@ class M1_Config_Adapter_Zencart137 extends M1_Config_Adapter
|
|
2868 |
$minor = EXPECTED_DATABASE_VERSION_MINOR;
|
2869 |
}
|
2870 |
|
2871 |
-
if (
|
2872 |
$this->cartVars['dbVersion'] = $major.'.'.$minor;
|
2873 |
}
|
2874 |
|
2875 |
}
|
2876 |
}
|
|
|
2877 |
}
|
2878 |
|
2879 |
|
2880 |
|
|
|
|
|
|
|
|
|
|
|
|
|
2881 |
|
2882 |
class M1_Config_Adapter
|
2883 |
{
|
2884 |
-
|
2885 |
-
|
2886 |
-
|
2887 |
-
|
2888 |
-
|
2889 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2890 |
|
2891 |
-
|
2892 |
-
|
2893 |
-
|
2894 |
-
|
2895 |
-
var $manufacturersImagesDir = '';
|
2896 |
-
var $categoriesImagesDirs = '';
|
2897 |
-
var $productsImagesDirs = '';
|
2898 |
-
var $manufacturersImagesDirs = '';
|
2899 |
-
|
2900 |
-
var $languages = array();
|
2901 |
-
var $cartVars = array();
|
2902 |
-
|
2903 |
-
function create()
|
2904 |
{
|
2905 |
-
if (isset($_GET["action"]) && $_GET["action"] == "update") {
|
2906 |
-
return null;
|
2907 |
-
}
|
2908 |
-
|
2909 |
$cartType = $this->_detectCartType();
|
2910 |
$className = "M1_Config_Adapter_" . $cartType;
|
2911 |
|
@@ -2915,7 +3626,10 @@ class M1_Config_Adapter
|
|
2915 |
return $obj;
|
2916 |
}
|
2917 |
|
2918 |
-
|
|
|
|
|
|
|
2919 |
{
|
2920 |
// Zencart137
|
2921 |
if (file_exists(M1_STORE_BASE_DIR . "includes" . DIRECTORY_SEPARATOR . "configure.php")
|
@@ -2976,7 +3690,9 @@ class M1_Config_Adapter
|
|
2976 |
}
|
2977 |
|
2978 |
// Magento1212, we can be sure that PHP is >= 5.2.0
|
2979 |
-
if (file_exists(M1_STORE_BASE_DIR . 'app/etc/local.xml')
|
|
|
|
|
2980 |
return "Magento1212";
|
2981 |
}
|
2982 |
|
@@ -3004,11 +3720,6 @@ class M1_Config_Adapter
|
|
3004 |
return "Shopware";
|
3005 |
}
|
3006 |
|
3007 |
-
//XCart
|
3008 |
-
if (file_exists(M1_STORE_BASE_DIR . "config.php")) {
|
3009 |
-
return "XCart";
|
3010 |
-
}
|
3011 |
-
|
3012 |
//LemonStand
|
3013 |
if (file_exists(M1_STORE_BASE_DIR . "boot.php")) {
|
3014 |
return "LemonStand";
|
@@ -3054,6 +3765,12 @@ class M1_Config_Adapter
|
|
3054 |
return "XtcommerceVeyton";
|
3055 |
}
|
3056 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3057 |
//Ubercart
|
3058 |
if (file_exists(M1_STORE_BASE_DIR . 'sites/default/settings.php' )) {
|
3059 |
if (file_exists( M1_STORE_BASE_DIR . '/modules/ubercart/uc_store/includes/coder_review_uc3x.inc')) {
|
@@ -3065,22 +3782,9 @@ class M1_Config_Adapter
|
|
3065 |
return "Ubercart";
|
3066 |
}
|
3067 |
|
3068 |
-
//
|
3069 |
-
if (file_exists(M1_STORE_BASE_DIR .
|
3070 |
-
|
3071 |
-
) {
|
3072 |
-
return 'Woocommerce';
|
3073 |
-
}
|
3074 |
-
|
3075 |
-
if (file_exists(dirname(M1_STORE_BASE_DIR) . '/wp-config.php')
|
3076 |
-
&& file_exists(M1_STORE_BASE_DIR . 'wp-content/plugins/woocommerce/woocommerce.php')
|
3077 |
-
) {
|
3078 |
-
return 'Woocommerce';
|
3079 |
-
}
|
3080 |
-
|
3081 |
-
//WPecommerce
|
3082 |
-
if (file_exists(M1_STORE_BASE_DIR . 'wp-config.php')) {
|
3083 |
-
return 'WPecommerce';
|
3084 |
}
|
3085 |
|
3086 |
//OXID e-shop
|
@@ -3110,7 +3814,11 @@ class M1_Config_Adapter
|
|
3110 |
die ("BRIDGE_ERROR_CONFIGURATION_NOT_FOUND");
|
3111 |
}
|
3112 |
|
3113 |
-
|
|
|
|
|
|
|
|
|
3114 |
{
|
3115 |
return M1_STORE_BASE_DIR . M1_BRIDGE_DIRECTORY_NAME . DIRECTORY_SEPARATOR
|
3116 |
. "app" . DIRECTORY_SEPARATOR
|
@@ -3118,29 +3826,35 @@ class M1_Config_Adapter
|
|
3118 |
. "config_adapter" . DIRECTORY_SEPARATOR . $cartType . ".php";
|
3119 |
}
|
3120 |
|
3121 |
-
|
|
|
|
|
|
|
3122 |
{
|
3123 |
$source = trim($source);
|
3124 |
|
3125 |
if ($source == '') {
|
3126 |
-
$this->
|
3127 |
return;
|
3128 |
}
|
3129 |
|
3130 |
$conf = explode(":", $source);
|
3131 |
|
3132 |
if (isset($conf[0]) && isset($conf[1])) {
|
3133 |
-
$this->
|
3134 |
-
$this->
|
3135 |
} elseif ($source[0] == '/') {
|
3136 |
-
$this->
|
3137 |
-
$this->
|
3138 |
} else {
|
3139 |
-
$this->
|
3140 |
}
|
3141 |
}
|
3142 |
|
3143 |
-
|
|
|
|
|
|
|
3144 |
{
|
3145 |
if (function_exists('mysql_connect')) {
|
3146 |
$link = new M1_Mysql($this);
|
@@ -3155,7 +3869,13 @@ class M1_Config_Adapter
|
|
3155 |
return $link;
|
3156 |
}
|
3157 |
|
3158 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3159 |
{
|
3160 |
$version = '';
|
3161 |
|
@@ -3166,7 +3886,7 @@ class M1_Config_Adapter
|
|
3166 |
|
3167 |
$result = $link->localQuery("
|
3168 |
SELECT " . $field . " AS version
|
3169 |
-
FROM " . $this->
|
3170 |
WHERE " . $where
|
3171 |
);
|
3172 |
|
@@ -3178,43 +3898,63 @@ class M1_Config_Adapter
|
|
3178 |
}
|
3179 |
}
|
3180 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3181 |
|
3182 |
class M1_Bridge
|
3183 |
{
|
3184 |
-
|
3185 |
-
|
3186 |
|
3187 |
/**
|
3188 |
* Bridge constructor
|
3189 |
*
|
3190 |
-
*
|
3191 |
-
* @
|
3192 |
*/
|
3193 |
-
function
|
3194 |
{
|
3195 |
$this->config = $config;
|
3196 |
|
3197 |
-
if ($this->getAction() != "savefile"
|
3198 |
$this->_link = $this->config->connect();
|
3199 |
}
|
3200 |
}
|
3201 |
|
3202 |
-
|
|
|
|
|
|
|
3203 |
{
|
3204 |
-
return $this->config->
|
3205 |
}
|
3206 |
|
3207 |
-
|
|
|
|
|
|
|
3208 |
{
|
3209 |
return $this->_link;
|
3210 |
}
|
3211 |
|
3212 |
-
|
|
|
|
|
|
|
|
|
|
|
3213 |
{
|
3214 |
return $this->_link->query($sql, $fetchMode);
|
3215 |
}
|
3216 |
|
3217 |
-
|
|
|
|
|
|
|
3218 |
{
|
3219 |
if (isset($_GET['action'])) {
|
3220 |
return str_replace('.', '', $_GET['action']);
|
@@ -3223,19 +3963,19 @@ class M1_Bridge
|
|
3223 |
return '';
|
3224 |
}
|
3225 |
|
3226 |
-
function run()
|
3227 |
{
|
3228 |
$action = $this->getAction();
|
3229 |
|
3230 |
-
if ($action != "update") {
|
3231 |
-
$this->_selfTest();
|
3232 |
-
}
|
3233 |
-
|
3234 |
if ($action == "checkbridge") {
|
3235 |
echo "BRIDGE_OK";
|
3236 |
return;
|
3237 |
}
|
3238 |
|
|
|
|
|
|
|
|
|
3239 |
if ($action == "update") {
|
3240 |
$this->_checkPossibilityUpdate();
|
3241 |
}
|
@@ -3252,7 +3992,11 @@ class M1_Bridge
|
|
3252 |
$this->_destroy();
|
3253 |
}
|
3254 |
|
3255 |
-
|
|
|
|
|
|
|
|
|
3256 |
{
|
3257 |
if (!@is_dir($dir)) {
|
3258 |
return false;
|
@@ -3281,35 +4025,31 @@ class M1_Bridge
|
|
3281 |
return true;
|
3282 |
}
|
3283 |
|
3284 |
-
function _destroy()
|
3285 |
{
|
3286 |
$this->_link = null;
|
3287 |
}
|
3288 |
|
3289 |
-
function _checkPossibilityUpdate()
|
3290 |
{
|
3291 |
if (!is_writable(M1_STORE_BASE_DIR . "/" . M1_BRIDGE_DIRECTORY_NAME . "/")) {
|
3292 |
die("ERROR_TRIED_TO_PERMISSION" . M1_STORE_BASE_DIR . "/" . M1_BRIDGE_DIRECTORY_NAME . "/");
|
3293 |
}
|
3294 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3295 |
if (!is_writable(M1_STORE_BASE_DIR . "/". M1_BRIDGE_DIRECTORY_NAME . "/bridge.php")) {
|
3296 |
die("ERROR_TRIED_TO_PERMISSION_BRIDGE_FILE" . M1_STORE_BASE_DIR . "/" . M1_BRIDGE_DIRECTORY_NAME . "/bridge.php");
|
3297 |
}
|
3298 |
}
|
3299 |
|
3300 |
-
function _selfTest()
|
3301 |
{
|
3302 |
-
if (!isset($_GET['
|
3303 |
-
die ('ERROR_BRIDGE_VERSION_NOT_SUPPORTED');
|
3304 |
-
}
|
3305 |
-
|
3306 |
-
if (isset($_GET['token']) && $_GET['token'] == M1_TOKEN) {
|
3307 |
-
// good :)
|
3308 |
-
} else {
|
3309 |
-
die('ERROR_INVALID_TOKEN');
|
3310 |
-
}
|
3311 |
-
|
3312 |
-
if ((!isset($_GET['storetype']) || $_GET['storetype'] == 'target') && $this->getAction() == 'checkbridge') {
|
3313 |
|
3314 |
if (trim($this->config->imagesDir) != "") {
|
3315 |
if (!file_exists(M1_STORE_BASE_DIR . $this->config->imagesDir) && is_writable(M1_STORE_BASE_DIR)) {
|
@@ -3319,7 +4059,7 @@ class M1_Bridge
|
|
3319 |
}
|
3320 |
|
3321 |
if (!$this->isWritable(M1_STORE_BASE_DIR . $this->config->imagesDir)) {
|
3322 |
-
die('ERROR_NO_IMAGES_DIR '.M1_STORE_BASE_DIR . $this->config->imagesDir);
|
3323 |
}
|
3324 |
}
|
3325 |
|
@@ -3331,7 +4071,7 @@ class M1_Bridge
|
|
3331 |
}
|
3332 |
|
3333 |
if (!$this->isWritable(M1_STORE_BASE_DIR . $this->config->categoriesImagesDir)) {
|
3334 |
-
die('ERROR_NO_IMAGES_DIR '.M1_STORE_BASE_DIR . $this->config->categoriesImagesDir);
|
3335 |
}
|
3336 |
}
|
3337 |
|
@@ -3343,7 +4083,7 @@ class M1_Bridge
|
|
3343 |
}
|
3344 |
|
3345 |
if (!$this->isWritable(M1_STORE_BASE_DIR . $this->config->productsImagesDir)) {
|
3346 |
-
die('ERROR_NO_IMAGES_DIR '.M1_STORE_BASE_DIR . $this->config->productsImagesDir);
|
3347 |
}
|
3348 |
}
|
3349 |
|
@@ -3355,11 +4095,22 @@ class M1_Bridge
|
|
3355 |
}
|
3356 |
|
3357 |
if (!$this->isWritable(M1_STORE_BASE_DIR . $this->config->manufacturersImagesDir)) {
|
3358 |
-
die('ERROR_NO_IMAGES_DIR '.M1_STORE_BASE_DIR . $this->config->manufacturersImagesDir);
|
3359 |
}
|
3360 |
}
|
3361 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3362 |
}
|
|
|
3363 |
}
|
3364 |
|
3365 |
|
@@ -3372,9 +4123,9 @@ class M1_Bridge
|
|
3372 |
|
3373 |
class M1_Mysql
|
3374 |
{
|
3375 |
-
|
3376 |
-
|
3377 |
-
|
3378 |
|
3379 |
/**
|
3380 |
* mysql constructor
|
@@ -3382,7 +4133,7 @@ class M1_Mysql
|
|
3382 |
* @param M1_Config_Adapter $config
|
3383 |
* @return M1_Mysql
|
3384 |
*/
|
3385 |
-
function
|
3386 |
{
|
3387 |
$this->config = $config;
|
3388 |
}
|
@@ -3390,7 +4141,7 @@ class M1_Mysql
|
|
3390 |
/**
|
3391 |
* @return bool|null|resource
|
3392 |
*/
|
3393 |
-
function getDataBaseHandle()
|
3394 |
{
|
3395 |
if ($this->dataBaseHandle) {
|
3396 |
return $this->dataBaseHandle;
|
@@ -3408,26 +4159,26 @@ class M1_Mysql
|
|
3408 |
/**
|
3409 |
* @return bool|null|resource
|
3410 |
*/
|
3411 |
-
function connect()
|
3412 |
{
|
3413 |
$triesCount = 10;
|
3414 |
$link = null;
|
3415 |
-
$host = $this->config->
|
3416 |
-
$password = stripslashes($this->config->
|
3417 |
|
3418 |
while (!$link) {
|
3419 |
if (!$triesCount--) {
|
3420 |
break;
|
3421 |
}
|
3422 |
|
3423 |
-
$link = @mysql_connect($host, $this->config->
|
3424 |
if (!$link) {
|
3425 |
sleep(5);
|
3426 |
}
|
3427 |
}
|
3428 |
|
3429 |
if ($link) {
|
3430 |
-
mysql_select_db($this->config->
|
3431 |
} else {
|
3432 |
return false;
|
3433 |
}
|
@@ -3440,7 +4191,7 @@ class M1_Mysql
|
|
3440 |
*
|
3441 |
* @return array
|
3442 |
*/
|
3443 |
-
function localQuery($sql)
|
3444 |
{
|
3445 |
$result = array();
|
3446 |
$dataBaseHandle = $this->getDataBaseHandle();
|
@@ -3464,7 +4215,7 @@ class M1_Mysql
|
|
3464 |
*
|
3465 |
* @return array
|
3466 |
*/
|
3467 |
-
function query($sql, $fetchType)
|
3468 |
{
|
3469 |
$result = array(
|
3470 |
'result' => null,
|
@@ -3560,7 +4311,7 @@ class M1_Mysql
|
|
3560 |
/**
|
3561 |
* @return int
|
3562 |
*/
|
3563 |
-
function getLastInsertId()
|
3564 |
{
|
3565 |
return mysql_insert_id($this->dataBaseHandle);
|
3566 |
}
|
@@ -3568,7 +4319,7 @@ class M1_Mysql
|
|
3568 |
/**
|
3569 |
* @return int
|
3570 |
*/
|
3571 |
-
function getAffectedRows()
|
3572 |
{
|
3573 |
return mysql_affected_rows($this->dataBaseHandle);
|
3574 |
}
|
@@ -3576,7 +4327,7 @@ class M1_Mysql
|
|
3576 |
/**
|
3577 |
* @return void
|
3578 |
*/
|
3579 |
-
function __destruct()
|
3580 |
{
|
3581 |
if ($this->dataBaseHandle) {
|
3582 |
mysql_close($this->dataBaseHandle);
|
@@ -3584,6 +4335,7 @@ class M1_Mysql
|
|
3584 |
|
3585 |
$this->dataBaseHandle = null;
|
3586 |
}
|
|
|
3587 |
}
|
3588 |
|
3589 |
|
@@ -3596,12 +4348,12 @@ class M1_Mysql
|
|
3596 |
|
3597 |
class M1_Pdo
|
3598 |
{
|
3599 |
-
|
3600 |
-
|
3601 |
-
|
3602 |
|
3603 |
-
|
3604 |
-
|
3605 |
|
3606 |
/**
|
3607 |
* pdo constructor
|
@@ -3609,7 +4361,7 @@ class M1_Pdo
|
|
3609 |
* @param M1_Config_Adapter $config configuration
|
3610 |
* @return M1_Pdo
|
3611 |
*/
|
3612 |
-
function
|
3613 |
{
|
3614 |
$this->config = $config;
|
3615 |
}
|
@@ -3617,7 +4369,7 @@ class M1_Pdo
|
|
3617 |
/**
|
3618 |
* @return bool|null|PDO
|
3619 |
*/
|
3620 |
-
function getDataBaseHandle()
|
3621 |
{
|
3622 |
if ($this->dataBaseHandle) {
|
3623 |
return $this->dataBaseHandle;
|
@@ -3635,16 +4387,16 @@ class M1_Pdo
|
|
3635 |
/**
|
3636 |
* @return bool|PDO
|
3637 |
*/
|
3638 |
-
function connect()
|
3639 |
{
|
3640 |
$triesCount = 3;
|
3641 |
-
$host = $this->config->
|
3642 |
-
$password = stripslashes($this->config->
|
3643 |
-
$dbName = $this->config->
|
3644 |
|
3645 |
while ($triesCount) {
|
3646 |
try {
|
3647 |
-
$link = new PDO("mysql:host=$host; dbname=$dbName", $this->config->
|
3648 |
$link->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
3649 |
|
3650 |
return $link;
|
@@ -3653,7 +4405,7 @@ class M1_Pdo
|
|
3653 |
$triesCount--;
|
3654 |
|
3655 |
// fix invalid port
|
3656 |
-
$host = $this->config->
|
3657 |
}
|
3658 |
}
|
3659 |
return false;
|
@@ -3664,7 +4416,7 @@ class M1_Pdo
|
|
3664 |
*
|
3665 |
* @return array|bool
|
3666 |
*/
|
3667 |
-
function localQuery($sql)
|
3668 |
{
|
3669 |
$result = array();
|
3670 |
$dataBaseHandle = $this->getDataBaseHandle();
|
@@ -3690,7 +4442,7 @@ class M1_Pdo
|
|
3690 |
*
|
3691 |
* @return array
|
3692 |
*/
|
3693 |
-
function query($sql, $fetchType)
|
3694 |
{
|
3695 |
$result = array(
|
3696 |
'result' => null,
|
@@ -3725,8 +4477,8 @@ class M1_Pdo
|
|
3725 |
|
3726 |
try {
|
3727 |
$res = $dataBaseHandle->query($sql);
|
3728 |
-
$this->
|
3729 |
-
$this->
|
3730 |
} catch (PDOException $e) {
|
3731 |
$result['message'] = '[ERROR] Mysql Query Error: ' . $e->getCode() . ', ' . $e->getMessage();
|
3732 |
return $result;
|
@@ -3758,31 +4510,31 @@ class M1_Pdo
|
|
3758 |
/**
|
3759 |
* @return string|int
|
3760 |
*/
|
3761 |
-
function getLastInsertId()
|
3762 |
{
|
3763 |
-
return $this->
|
3764 |
}
|
3765 |
|
3766 |
/**
|
3767 |
* @return int
|
3768 |
*/
|
3769 |
-
function getAffectedRows()
|
3770 |
{
|
3771 |
-
return $this->
|
3772 |
}
|
3773 |
|
3774 |
/**
|
3775 |
* @return void
|
3776 |
*/
|
3777 |
-
function __destruct()
|
3778 |
{
|
3779 |
$this->dataBaseHandle = null;
|
3780 |
}
|
3781 |
}
|
3782 |
|
3783 |
|
3784 |
-
define('M1_BRIDGE_VERSION', '
|
3785 |
-
|
3786 |
define('M1_BRIDGE_DIRECTORY_NAME', basename(getcwd()));
|
3787 |
|
3788 |
ini_set('display_errors', 1);
|
@@ -3794,11 +4546,31 @@ if (substr(phpversion(), 0, 1) == 5) {
|
|
3794 |
|
3795 |
require_once 'config.php';
|
3796 |
|
3797 |
-
|
|
|
|
|
|
|
|
|
|
|
3798 |
return is_array($array) ? array_map('stripslashes_array', $array) : stripslashes($array);
|
3799 |
}
|
3800 |
|
3801 |
-
function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3802 |
$paths = explode(PATH_SEPARATOR, getenv('PATH'));
|
3803 |
$paths[] = PHP_BINDIR;
|
3804 |
foreach ($paths as $path) {
|
@@ -3815,8 +4587,7 @@ function getPHPExecutable() {
|
|
3815 |
return false;
|
3816 |
}
|
3817 |
|
3818 |
-
if (!isset($_SERVER))
|
3819 |
-
{
|
3820 |
$_GET = &$HTTP_GET_VARS;
|
3821 |
$_POST = &$HTTP_POST_VARS;
|
3822 |
$_ENV = &$HTTP_ENV_VARS;
|
@@ -3835,7 +4606,7 @@ if (get_magic_quotes_gpc()) {
|
|
3835 |
|
3836 |
if (isset($_SERVER['SCRIPT_FILENAME'])) {
|
3837 |
$scriptPath = $_SERVER['SCRIPT_FILENAME'];
|
3838 |
-
if (
|
3839 |
$scriptPath = $_SERVER['PATH_TRANSLATED'];
|
3840 |
}
|
3841 |
define("M1_STORE_BASE_DIR", preg_replace('/[^\/\\\]*[\/\\\][^\/\\\]*$/', '', $scriptPath));
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
require_once 'preloader.php';
|
4 |
|
5 |
+
/*-----------------------------------------------------------------------------+
|
6 |
+
| MagneticOne |
|
7 |
+
| Copyright (c) 2012 MagneticOne.com <contact@magneticone.com> |
|
8 |
+
| All rights reserved |
|
9 |
+
+------------------------------------------------------------------------------+
|
10 |
+
| PLEASE READ THE FULL TEXT OF SOFTWARE LICENSE AGREEMENT IN THE "license.txt"|
|
11 |
+
| FILE PROVIDED WITH THIS DISTRIBUTION. THE AGREEMENT TEXT IS ALSO AVAILABLE |
|
12 |
+
| AT THE FOLLOWING URL: http://www.magneticone.com/store/license.php |
|
13 |
+
| |
|
14 |
+
| THIS AGREEMENT EXPRESSES THE TERMS AND CONDITIONS ON WHICH YOU MAY USE |
|
15 |
+
| THIS SOFTWARE PROGRAM AND ASSOCIATED DOCUMENTATION THAT MAGNETICONE |
|
16 |
+
| (hereinafter referred to as "THE AUTHOR") IS FURNISHING OR MAKING |
|
17 |
+
| AVAILABLE TO YOU WITH THIS AGREEMENT (COLLECTIVELY, THE "SOFTWARE"). |
|
18 |
+
| PLEASE REVIEW THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT |
|
19 |
+
| CAREFULLY BEFORE INSTALLING OR USING THE SOFTWARE. BY INSTALLING, |
|
20 |
+
| COPYING OR OTHERWISE USING THE SOFTWARE, YOU AND YOUR COMPANY |
|
21 |
+
| (COLLECTIVELY, "YOU") ARE ACCEPTING AND AGREEING TO THE TERMS OF THIS |
|
22 |
+
| LICENSE AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY THIS |
|
23 |
+
| AGREEMENT, DO NOT INSTALL OR USE THE SOFTWARE. VARIOUS COPYRIGHTS AND |
|
24 |
+
| OTHER INTELLECTUAL PROPERTY RIGHTS PROTECT THE SOFTWARE. THIS |
|
25 |
+
| AGREEMENT IS A LICENSE AGREEMENT THAT GIVES YOU LIMITED RIGHTS TO USE |
|
26 |
+
| THE SOFTWARE AND NOT AN AGREEMENT FOR SALE OR FOR TRANSFER OF TITLE. |
|
27 |
+
| THE AUTHOR RETAINS ALL RIGHTS NOT EXPRESSLY GRANTED BY THIS AGREEMENT. |
|
28 |
+
| |
|
29 |
+
| The Developer of the Code is MagneticOne, |
|
30 |
+
| Copyright (C) 2006 - 2016 All Rights Reserved. |
|
31 |
+
+------------------------------------------------------------------------------+
|
32 |
+
| |
|
33 |
+
| ATTENTION! |
|
34 |
+
+------------------------------------------------------------------------------+
|
35 |
+
| By our Terms of Use you agreed not to change, modify, add, or remove portions|
|
36 |
+
| of Bridge Script source code as it is owned by MagneticOne company. |
|
37 |
+
| You agreed not to use, reproduce, modify, adapt, publish, translate |
|
38 |
+
| the Bridge Script source code into any form, medium, or technology |
|
39 |
+
| now known or later developed throughout the universe. |
|
40 |
+
| |
|
41 |
+
| Full text of our TOS located at |
|
42 |
+
| https://www.api2cart.com/terms-of-service |
|
43 |
+
+-----------------------------------------------------------------------------*/
|
44 |
+
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Class M1_Bridge_Action_Update
|
48 |
+
*/
|
49 |
class M1_Bridge_Action_Update
|
50 |
{
|
51 |
+
private $_pathToTmpDir;
|
52 |
+
private $_pathToFile = __FILE__;
|
53 |
|
54 |
+
/**
|
55 |
+
* M1_Bridge_Action_Update constructor.
|
56 |
+
*/
|
57 |
+
public function __construct()
|
|
|
58 |
{
|
59 |
+
$this->_pathToTmpDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . "temp_c2c";
|
60 |
}
|
61 |
|
62 |
+
/**
|
63 |
+
* @param M1_Bridge $bridge
|
64 |
+
*/
|
65 |
+
public function perform(M1_Bridge $bridge)
|
66 |
{
|
67 |
$response = new stdClass();
|
68 |
+
if (!($this->_checkBridgeDirPermission() && $this->_checkBridgeFilePermission())) {
|
69 |
+
$response->code = 1;
|
70 |
+
$response->message = "Bridge Update couldn't be performed. " .
|
71 |
+
"Please change permission for bridge folder to 777 and bridge.php file inside it to 666";
|
72 |
+
echo serialize($response);
|
73 |
+
die;
|
74 |
}
|
75 |
|
76 |
+
if (($data = $this->_downloadFile()) === false) {
|
77 |
+
$response->code = 1;
|
78 |
+
$response->message = "Bridge Version is outdated. Files couldn't be updated automatically. ".
|
79 |
+
"Please set write permission or re-upload files manually.";
|
80 |
+
echo serialize($response);
|
81 |
+
die;
|
82 |
}
|
83 |
|
84 |
+
if (!$this->_writeToFile($data, $this->_pathToFile)) {
|
85 |
+
$response->code = 1;
|
86 |
$response->message = "Couln't create file in temporary folder or file is write protected.";
|
87 |
+
echo serialize($response);
|
88 |
+
die;
|
89 |
}
|
90 |
|
91 |
+
$response->code = 0;
|
92 |
$response->message = "Bridge successfully updated to latest version";
|
93 |
+
echo json_encode($response);
|
94 |
die;
|
95 |
}
|
96 |
|
97 |
+
/**
|
98 |
+
* @param $uri
|
99 |
+
* @return stdClass
|
100 |
+
*/
|
101 |
+
private function _fetch($uri)
|
102 |
{
|
103 |
$ch = curl_init();
|
104 |
|
108 |
|
109 |
$response = new stdClass();
|
110 |
|
111 |
+
$response->body = curl_exec($ch);
|
112 |
+
$response->httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
113 |
+
$response->contentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
|
114 |
+
$response->contentLength = curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD);
|
115 |
|
116 |
curl_close($ch);
|
117 |
|
118 |
return $response;
|
119 |
}
|
120 |
|
121 |
+
/**
|
122 |
+
* @return bool
|
123 |
+
*/
|
124 |
+
private function _checkBridgeDirPermission()
|
125 |
{
|
126 |
if (!is_writeable(dirname(__FILE__))) {
|
127 |
@chmod(dirname(__FILE__), 0777);
|
129 |
return is_writeable(dirname(__FILE__));
|
130 |
}
|
131 |
|
132 |
+
/**
|
133 |
+
* @return bool
|
134 |
+
*/
|
135 |
+
private function _checkBridgeFilePermission()
|
136 |
{
|
137 |
$pathToFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bridge.php";
|
138 |
if (!is_writeable($pathToFile)) {
|
141 |
return is_writeable($pathToFile);
|
142 |
}
|
143 |
|
144 |
+
/**
|
145 |
+
* @return bool
|
146 |
+
*/
|
147 |
+
public function _createTempDir()
|
148 |
{
|
149 |
+
@mkdir($this->_pathToTmpDir, 0777);
|
150 |
+
return file_exists($this->_pathToTmpDir);
|
151 |
}
|
152 |
|
153 |
+
/**
|
154 |
+
* @return bool
|
155 |
+
*/
|
156 |
+
public function _removeTempDir()
|
157 |
{
|
158 |
+
@unlink($this->_pathToTmpDir . DIRECTORY_SEPARATOR . "bridge.php_c2c");
|
159 |
+
@rmdir($this->_pathToTmpDir);
|
160 |
+
return !file_exists($this->_pathToTmpDir);
|
161 |
}
|
162 |
|
163 |
+
/**
|
164 |
+
* @return bool|stdClass
|
165 |
+
*/
|
166 |
+
private function _downloadFile()
|
167 |
{
|
168 |
+
$file = $this->_fetch(M1_BRIDGE_DOWNLOAD_LINK);
|
169 |
+
if ($file->httpCode == 200) {
|
170 |
return $file;
|
171 |
}
|
172 |
return false;
|
173 |
}
|
174 |
|
175 |
+
/**
|
176 |
+
* @param $data
|
177 |
+
* @param $file
|
178 |
+
* @return bool
|
179 |
+
*/
|
180 |
+
private function _writeToFile($data, $file)
|
181 |
{
|
182 |
if (function_exists("file_put_contents")) {
|
183 |
$bytes = file_put_contents($file, $data->body);
|
184 |
+
return $bytes == $data->contentLength;
|
185 |
}
|
186 |
|
187 |
$handle = @fopen($file, 'w+');
|
188 |
$bytes = fwrite($handle, $data->body);
|
189 |
@fclose($handle);
|
190 |
|
191 |
+
return $bytes == $data->contentLength;
|
192 |
|
193 |
}
|
194 |
|
195 |
}
|
196 |
|
197 |
+
/**
|
198 |
+
* Class M1_Bridge_Action_Query
|
199 |
+
*/
|
200 |
class M1_Bridge_Action_Query
|
201 |
{
|
202 |
+
|
203 |
+
/**
|
204 |
+
* @param M1_Bridge $bridge
|
205 |
+
* @return bool
|
206 |
+
*/
|
207 |
+
public function perform(M1_Bridge $bridge)
|
208 |
{
|
209 |
if (isset($_POST['query']) && isset($_POST['fetchMode'])) {
|
210 |
$query = base64_decode($_POST['query']);
|
229 |
}
|
230 |
}
|
231 |
|
232 |
+
/**
|
233 |
+
* Class M1_Bridge_Action_Getconfig
|
234 |
+
*/
|
235 |
class M1_Bridge_Action_Getconfig
|
236 |
{
|
237 |
|
238 |
+
/**
|
239 |
+
* @param $val
|
240 |
+
* @return int
|
241 |
+
*/
|
242 |
+
private function parseMemoryLimit($val)
|
243 |
{
|
244 |
$last = strtolower($val[strlen($val)-1]);
|
245 |
switch($last) {
|
254 |
return $val;
|
255 |
}
|
256 |
|
257 |
+
/**
|
258 |
+
* @return mixed
|
259 |
+
*/
|
260 |
+
private function getMemoryLimit()
|
261 |
{
|
262 |
$memoryLimit = trim(@ini_get('memory_limit'));
|
263 |
if (strlen($memoryLimit) === 0) {
|
288 |
return min($suhosinMaxPostSize, $maxPostSize, $memoryLimit);
|
289 |
}
|
290 |
|
291 |
+
/**
|
292 |
+
* @return bool
|
293 |
+
*/
|
294 |
+
private function isZlibSupported()
|
295 |
{
|
296 |
return function_exists('gzdecode');
|
297 |
}
|
298 |
|
299 |
+
/**
|
300 |
+
* @param $bridge
|
301 |
+
*/
|
302 |
+
public function perform(M1_Bridge $bridge)
|
303 |
{
|
304 |
if (!defined("DEFAULT_LANGUAGE_ISO2")) {
|
305 |
define("DEFAULT_LANGUAGE_ISO2", ""); //variable for Interspire cart
|
317 |
),
|
318 |
"languages" => $bridge->config->languages,
|
319 |
"baseDirFs" => M1_STORE_BASE_DIR, // filesystem path to store root
|
320 |
+
"bridgeVersion" => M1_BRIDGE_VERSION,
|
321 |
"defaultLanguageIso2" => DEFAULT_LANGUAGE_ISO2,
|
322 |
+
"databaseName" => $bridge->config->dbname,
|
323 |
"memoryLimit" => $this->getMemoryLimit(),
|
324 |
"zlibSupported" => $this->isZlibSupported(),
|
325 |
//"orderStatus" => $bridge->config->orderStatus,
|
331 |
|
332 |
}
|
333 |
|
334 |
+
/**
|
335 |
+
* Class M1_Bridge_Action_Batchsavefile
|
336 |
+
*/
|
337 |
class M1_Bridge_Action_Batchsavefile extends M1_Bridge_Action_Savefile
|
338 |
{
|
339 |
+
|
340 |
+
/**
|
341 |
+
* @param M1_Bridge $bridge
|
342 |
+
*/
|
343 |
+
public function perform(M1_Bridge $bridge)
|
344 |
+
{
|
345 |
$result = array();
|
346 |
|
347 |
foreach ($_POST['files'] as $fileInfo) {
|
359 |
|
360 |
}
|
361 |
|
362 |
+
/**
|
363 |
+
* Class M1_Bridge_Action_Deleteimages
|
364 |
+
*/
|
365 |
class M1_Bridge_Action_Deleteimages
|
366 |
{
|
367 |
+
|
368 |
+
/**
|
369 |
+
* @param M1_Bridge $bridge
|
370 |
+
*/
|
371 |
+
public function perform(M1_Bridge $bridge)
|
372 |
{
|
373 |
switch($bridge->config->cartType) {
|
374 |
case "Pinnacle361":
|
375 |
+
$this->_pinnacleDeleteImages($bridge);
|
376 |
+
break;
|
377 |
case "Prestashop11":
|
378 |
+
$this->_prestaShopDeleteImages($bridge);
|
379 |
+
break;
|
380 |
case 'Summercart3' :
|
381 |
+
$this->_summercartDeleteImages($bridge);
|
382 |
+
break;
|
383 |
}
|
384 |
}
|
385 |
|
386 |
+
/**
|
387 |
+
* @param $bridge
|
388 |
+
*/
|
389 |
+
private function _pinnacleDeleteImages(M1_Bridge $bridge)
|
390 |
{
|
391 |
$dirs = array(
|
392 |
M1_STORE_BASE_DIR . $bridge->config->imagesDir . 'catalog/',
|
399 |
|
400 |
$ok = true;
|
401 |
|
402 |
+
foreach ($dirs as $dir) {
|
403 |
|
404 |
+
if (!file_exists($dir)) {
|
405 |
continue;
|
406 |
}
|
407 |
|
424 |
else print "ERROR";
|
425 |
}
|
426 |
|
427 |
+
/**
|
428 |
+
* @param $bridge
|
429 |
+
*/
|
430 |
+
private function _prestaShopDeleteImages(M1_Bridge $bridge)
|
431 |
{
|
432 |
$dirs = array(
|
433 |
M1_STORE_BASE_DIR . $bridge->config->imagesDir . 'c/',
|
437 |
|
438 |
$ok = true;
|
439 |
|
440 |
+
foreach ($dirs as $dir) {
|
441 |
|
442 |
+
if (!file_exists($dir)) {
|
443 |
continue;
|
444 |
}
|
445 |
|
446 |
$dirHandle = opendir($dir);
|
447 |
|
448 |
while (false !== ($file = readdir($dirHandle))) {
|
449 |
+
if ($file != "." && $file != ".." && preg_match("/(\d+).*\.jpg?$/", $file)) {
|
450 |
$file_path = $dir . $file;
|
451 |
+
if (is_file($file_path)) {
|
452 |
+
if (!rename($file_path, $file_path . ".bak")) $ok = false;
|
453 |
}
|
454 |
}
|
455 |
}
|
462 |
else print "ERROR";
|
463 |
}
|
464 |
|
465 |
+
/**
|
466 |
+
* @param $bridge
|
467 |
+
*/
|
468 |
+
private function _summercartDeleteImages(M1_Bridge $bridge)
|
469 |
{
|
470 |
$dirs = array(
|
471 |
M1_STORE_BASE_DIR . $bridge->config->imagesDir . 'categoryimages/',
|
478 |
|
479 |
$ok = true;
|
480 |
|
481 |
+
foreach ($dirs as $dir) {
|
482 |
|
483 |
+
if (!file_exists($dir)) {
|
484 |
continue;
|
485 |
}
|
486 |
|
504 |
}
|
505 |
}
|
506 |
|
507 |
+
/**
|
508 |
+
* Class M1_Bridge_Action_Cubecart
|
509 |
+
*/
|
510 |
class M1_Bridge_Action_Cubecart
|
511 |
{
|
512 |
+
|
513 |
+
/**
|
514 |
+
* @param M1_Bridge $bridge
|
515 |
+
*/
|
516 |
+
public function perform(M1_Bridge $bridge)
|
517 |
{
|
518 |
$dirHandle = opendir(M1_STORE_BASE_DIR . 'language/');
|
519 |
|
520 |
$languages = array();
|
521 |
|
522 |
while ($dirEntry = readdir($dirHandle)) {
|
523 |
+
if (!is_dir(M1_STORE_BASE_DIR . 'language/' . $dirEntry) || $dirEntry == '.'
|
524 |
+
|| $dirEntry == '..' || strpos($dirEntry, "_") !== false
|
525 |
+
) {
|
526 |
continue;
|
527 |
}
|
528 |
|
552 |
}
|
553 |
}
|
554 |
|
555 |
+
/**
|
556 |
+
* Class M1_Bridge_Action_Mysqlver
|
557 |
+
*/
|
558 |
class M1_Bridge_Action_Mysqlver
|
559 |
{
|
560 |
+
|
561 |
+
/**
|
562 |
+
* @param $bridge
|
563 |
+
*/
|
564 |
+
public function perform(M1_Bridge $bridge)
|
565 |
{
|
566 |
+
$message = array();
|
567 |
+
preg_match('/^(\d+)\.(\d+)\.(\d+)/', mysql_get_server_info($bridge->getLink()), $message);
|
568 |
+
echo sprintf("%d%02d%02d", $message[1], $message[2], $message[3]);
|
569 |
}
|
570 |
}
|
571 |
|
572 |
+
/**
|
573 |
+
* Class M1_Bridge_Action_Clearcache
|
574 |
+
*/
|
575 |
class M1_Bridge_Action_Clearcache
|
576 |
{
|
577 |
+
|
578 |
+
/**
|
579 |
+
* @param M1_Bridge $bridge
|
580 |
+
*/
|
581 |
+
public function perform(M1_Bridge $bridge)
|
582 |
{
|
583 |
switch($bridge->config->cartType) {
|
584 |
case "Cubecart":
|
585 |
$this->_CubecartClearCache();
|
586 |
+
break;
|
587 |
case "Prestashop11":
|
588 |
$this->_PrestashopClearCache();
|
589 |
+
break;
|
590 |
case "Interspire":
|
591 |
$this->_InterspireClearCache();
|
592 |
+
break;
|
593 |
case "Opencart14" :
|
594 |
$this->_OpencartClearCache();
|
595 |
+
break;
|
596 |
case "XtcommerceVeyton" :
|
597 |
$this->_Xtcommerce4ClearCache();
|
598 |
+
break;
|
599 |
case "Ubercart" :
|
600 |
$this->_ubercartClearCache();
|
601 |
+
break;
|
602 |
case "Tomatocart" :
|
603 |
$this->_tomatocartClearCache();
|
604 |
+
break;
|
605 |
case "Virtuemart113" :
|
606 |
$this->_virtuemartClearCache();
|
607 |
+
break;
|
608 |
case "Magento1212" :
|
609 |
//$this->_magentoClearCache();
|
610 |
+
break;
|
611 |
case "Oscommerce3":
|
612 |
$this->_Oscommerce3ClearCache();
|
613 |
+
break;
|
614 |
case "Oxid":
|
615 |
$this->_OxidClearCache();
|
616 |
+
break;
|
617 |
case "XCart":
|
618 |
$this->_XcartClearCache();
|
619 |
+
break;
|
620 |
case "Cscart203":
|
621 |
$this->_CscartClearCache();
|
622 |
+
break;
|
623 |
case "Prestashop15":
|
624 |
$this->_Prestashop15ClearCache();
|
625 |
+
break;
|
626 |
case "Gambio":
|
627 |
$this->_GambioClearCache();
|
628 |
+
break;
|
629 |
}
|
630 |
}
|
631 |
|
632 |
/**
|
633 |
+
* @param array $dirs
|
634 |
+
* @param string $fileExclude - name file in format pregmatch
|
635 |
+
* @return bool
|
636 |
*/
|
637 |
+
private function _removeGarbage($dirs = array(), $fileExclude = '')
|
|
|
638 |
{
|
639 |
$result = true;
|
640 |
|
676 |
return $result;
|
677 |
}
|
678 |
|
679 |
+
private function _magentoClearCache()
|
680 |
{
|
681 |
chdir('../');
|
682 |
|
705 |
echo 'OK';
|
706 |
}
|
707 |
|
708 |
+
private function _InterspireClearCache()
|
709 |
{
|
710 |
$res = true;
|
711 |
$file = M1_STORE_BASE_DIR . 'cache' . DIRECTORY_SEPARATOR . 'datastore' . DIRECTORY_SEPARATOR . 'RootCategories.php';
|
721 |
}
|
722 |
}
|
723 |
|
724 |
+
private function _CubecartClearCache()
|
725 |
{
|
726 |
$ok = true;
|
727 |
|
752 |
}
|
753 |
}
|
754 |
|
755 |
+
private function _PrestashopClearCache()
|
756 |
{
|
757 |
$dirs = array(
|
758 |
M1_STORE_BASE_DIR . 'tools/smarty/compile/',
|
763 |
$this->_removeGarbage($dirs, 'index\.php');
|
764 |
}
|
765 |
|
766 |
+
private function _OpencartClearCache()
|
767 |
{
|
768 |
$dirs = array(
|
769 |
M1_STORE_BASE_DIR . 'system/cache/',
|
772 |
$this->_removeGarbage($dirs, 'index\.html');
|
773 |
}
|
774 |
|
775 |
+
private function _Xtcommerce4ClearCache()
|
776 |
{
|
777 |
$dirs = array(
|
778 |
M1_STORE_BASE_DIR . 'cache/',
|
781 |
$this->_removeGarbage($dirs, 'index\.html');
|
782 |
}
|
783 |
|
784 |
+
private function _ubercartClearCache()
|
785 |
{
|
786 |
$dirs = array(
|
787 |
M1_STORE_BASE_DIR . 'sites/default/files/imagecache/product/',
|
794 |
$this->_removeGarbage($dirs);
|
795 |
}
|
796 |
|
797 |
+
private function _tomatocartClearCache()
|
798 |
{
|
799 |
$dirs = array(
|
800 |
M1_STORE_BASE_DIR . 'includes/work/',
|
806 |
/**
|
807 |
* Try chage permissions actually :)
|
808 |
*/
|
809 |
+
private function _virtuemartClearCache()
|
810 |
{
|
811 |
$pathToImages = 'components/com_virtuemart/shop_image';
|
812 |
|
822 |
}
|
823 |
}
|
824 |
|
825 |
+
private function _Oscommerce3ClearCache()
|
826 |
{
|
827 |
$dirs = array(
|
828 |
M1_STORE_BASE_DIR . 'osCommerce/OM/Work/Cache/',
|
831 |
$this->_removeGarbage($dirs, '\.htaccess');
|
832 |
}
|
833 |
|
834 |
+
private function _GambioClearCache()
|
835 |
{
|
836 |
$dirs = array(
|
837 |
M1_STORE_BASE_DIR . 'cache/',
|
840 |
$this->_removeGarbage($dirs, 'index\.html');
|
841 |
}
|
842 |
|
843 |
+
private function _OxidClearCache()
|
844 |
{
|
845 |
$dirs = array(
|
846 |
M1_STORE_BASE_DIR . 'tmp/',
|
849 |
$this->_removeGarbage($dirs, '\.htaccess');
|
850 |
}
|
851 |
|
852 |
+
private function _XcartClearCache()
|
853 |
{
|
854 |
$dirs = array(
|
855 |
M1_STORE_BASE_DIR . 'var/cache/',
|
858 |
$this->_removeGarbage($dirs, '\.htaccess');
|
859 |
}
|
860 |
|
861 |
+
private function _CscartClearCache()
|
862 |
{
|
863 |
$dir = M1_STORE_BASE_DIR . 'var/cache/';
|
864 |
$res = $this->removeDirRec($dir);
|
870 |
}
|
871 |
}
|
872 |
|
873 |
+
private function _Prestashop15ClearCache()
|
874 |
{
|
875 |
$dirs = array(
|
876 |
M1_STORE_BASE_DIR . 'cache/smarty/compile/',
|
881 |
$this->_removeGarbage($dirs, 'index\.php');
|
882 |
}
|
883 |
|
884 |
+
/**
|
885 |
+
* @param $dir
|
886 |
+
* @return bool
|
887 |
+
*/
|
888 |
+
private function removeDirRec($dir)
|
889 |
{
|
890 |
$result = true;
|
891 |
|
911 |
}
|
912 |
}
|
913 |
|
914 |
+
/**
|
915 |
+
* @author: Ihor Liubarskiy i.lybarskuy@magneticone.com
|
916 |
+
* Date: 16.11.16 17:02
|
917 |
+
*/
|
918 |
+
|
919 |
+
class M1_Bridge_Action_Multiquery
|
920 |
+
{
|
921 |
+
protected $_lastInsertIds = array();
|
922 |
+
|
923 |
+
/**
|
924 |
+
* @param M1_Bridge $bridge
|
925 |
+
* @return bool|null
|
926 |
+
*/
|
927 |
+
public function perform(M1_Bridge $bridge)
|
928 |
+
{
|
929 |
+
if (isset($_POST['queries']) && isset($_POST['fetchMode'])) {
|
930 |
+
|
931 |
+
$queries = unserialize(base64_decode($_POST['queries']));
|
932 |
+
$result = false;
|
933 |
+
$count = 0;
|
934 |
+
|
935 |
+
foreach ($queries as $queryId => $query) {
|
936 |
+
|
937 |
+
if ($count++ > 0) {
|
938 |
+
$query = preg_replace_callback('/_A2C_LAST_\{([a-zA-Z0-9_\-]{1,32})\}_INSERT_ID_/', array($this, '_replace'), $query);
|
939 |
+
}
|
940 |
+
|
941 |
+
$res = $bridge->query($query, (int)$_POST['fetchMode']);
|
942 |
+
if (is_array($res['result']) || is_bool($res['result'])) {
|
943 |
+
|
944 |
+
$queryRes = array(
|
945 |
+
'res' => $res['result'],
|
946 |
+
'fetchedFields' => @$res['fetchedFields'],
|
947 |
+
'insertId' => $bridge->getLink()->getLastInsertId(),
|
948 |
+
'affectedRows' => $bridge->getLink()->getAffectedRows(),
|
949 |
+
);
|
950 |
+
|
951 |
+
$result[$queryId] = $queryRes;
|
952 |
+
$this->_lastInsertIds[$queryId] = $queryRes['insertId'];
|
953 |
+
|
954 |
+
} else {
|
955 |
+
echo base64_encode($res['message']);
|
956 |
+
return false;
|
957 |
+
}
|
958 |
+
}
|
959 |
+
echo base64_encode(serialize($result));
|
960 |
+
} else {
|
961 |
+
return false;
|
962 |
+
}
|
963 |
+
}
|
964 |
+
|
965 |
+
protected function _replace($matches)
|
966 |
+
{
|
967 |
+
return $this->_lastInsertIds[$matches[1]];
|
968 |
+
}
|
969 |
+
}
|
970 |
|
971 |
+
/**
|
972 |
+
* Class M1_Bridge_Action_Basedirfs
|
973 |
+
*/
|
974 |
class M1_Bridge_Action_Basedirfs
|
975 |
{
|
976 |
+
|
977 |
+
/**
|
978 |
+
* @param M1_Bridge $bridge
|
979 |
+
*/
|
980 |
+
public function perform(M1_Bridge $bridge)
|
981 |
{
|
982 |
echo M1_STORE_BASE_DIR;
|
983 |
}
|
984 |
}
|
985 |
|
986 |
+
/**
|
987 |
+
* Class M1_Bridge_Action_Phpinfo
|
988 |
+
*/
|
989 |
class M1_Bridge_Action_Phpinfo
|
990 |
{
|
991 |
+
|
992 |
+
/**
|
993 |
+
* @param M1_Bridge $bridge
|
994 |
+
*/
|
995 |
+
public function perform(M1_Bridge $bridge)
|
996 |
{
|
997 |
phpinfo();
|
998 |
}
|
999 |
}
|
1000 |
|
1001 |
|
1002 |
+
/**
|
1003 |
+
* Class M1_Bridge_Action_Savefile
|
1004 |
+
*/
|
1005 |
class M1_Bridge_Action_Savefile
|
1006 |
{
|
1007 |
+
protected $_imageType = null;
|
1008 |
|
1009 |
+
/**
|
1010 |
+
* @param $bridge
|
1011 |
+
*/
|
1012 |
+
public function perform(M1_Bridge $bridge)
|
1013 |
{
|
1014 |
$source = $_POST['src'];
|
1015 |
$destination = $_POST['dst'];
|
1020 |
echo $this->_saveFile($source, $destination, $width, $height, $local);
|
1021 |
}
|
1022 |
|
1023 |
+
/**
|
1024 |
+
* @param $source
|
1025 |
+
* @param $destination
|
1026 |
+
* @param $width
|
1027 |
+
* @param $height
|
1028 |
+
* @param string $local
|
1029 |
+
* @return string
|
1030 |
+
*/
|
1031 |
+
public function _saveFile($source, $destination, $width, $height, $local = '')
|
1032 |
{
|
1033 |
if (trim($local) != '') {
|
1034 |
|
1072 |
return $result;
|
1073 |
}
|
1074 |
|
1075 |
+
/**
|
1076 |
+
* @param $source
|
1077 |
+
* @param $destination
|
1078 |
+
* @param $width
|
1079 |
+
* @param $height
|
1080 |
+
* @return bool
|
1081 |
+
*/
|
1082 |
+
private function _copyLocal($source, $destination, $width, $height)
|
1083 |
{
|
1084 |
$source = M1_STORE_BASE_DIR . $source;
|
1085 |
$destination = M1_STORE_BASE_DIR . $destination;
|
1095 |
return true;
|
1096 |
}
|
1097 |
|
1098 |
+
/**
|
1099 |
+
* @param $filename
|
1100 |
+
* @param bool $skipJpg
|
1101 |
+
* @return bool|resource
|
1102 |
+
*/
|
1103 |
+
private function _loadImage($filename, $skipJpg = true)
|
1104 |
{
|
1105 |
$imageInfo = @getimagesize($filename);
|
1106 |
if ($imageInfo === false) {
|
1130 |
return $image;
|
1131 |
}
|
1132 |
|
1133 |
+
/**
|
1134 |
+
* @param $image
|
1135 |
+
* @param $filename
|
1136 |
+
* @param int $imageType
|
1137 |
+
* @param int $compression
|
1138 |
+
* @param null $permissions
|
1139 |
+
* @return bool
|
1140 |
+
*/
|
1141 |
+
private function _saveImage($image, $filename, $imageType = IMAGETYPE_JPEG, $compression = 85, $permissions = null)
|
1142 |
{
|
1143 |
$result = true;
|
1144 |
if ($imageType == IMAGETYPE_JPEG) {
|
1158 |
return $result;
|
1159 |
}
|
1160 |
|
1161 |
+
/**
|
1162 |
+
* @param $source
|
1163 |
+
* @param $destination
|
1164 |
+
* @return string
|
1165 |
+
*/
|
1166 |
+
private function _createFile($source, $destination)
|
1167 |
{
|
1168 |
+
if ($this->_createDir(dirname($destination)) !== false) {
|
1169 |
$destination = M1_STORE_BASE_DIR . $destination;
|
1170 |
$body = base64_decode($source);
|
1171 |
if ($body === false || file_put_contents($destination, $body) === false) {
|
1178 |
return '[BRIDGE ERROR] Directory creation failed!';
|
1179 |
}
|
1180 |
|
1181 |
+
/**
|
1182 |
+
* @param $source
|
1183 |
+
* @param $destination
|
1184 |
+
* @return string
|
1185 |
+
*/
|
1186 |
+
private function _saveFileLocal($source, $destination)
|
1187 |
{
|
1188 |
$srcInfo = parse_url($source);
|
1189 |
$src = rtrim($_SERVER['DOCUMENT_ROOT'], "/") . $srcInfo['path'];
|
1190 |
|
1191 |
+
if ($this->_createDir(dirname($destination)) !== false) {
|
1192 |
$dst = M1_STORE_BASE_DIR . $destination;
|
1193 |
|
1194 |
if (!@copy($src, $dst)) {
|
1202 |
return "OK";
|
1203 |
}
|
1204 |
|
1205 |
+
/**
|
1206 |
+
* @param $source
|
1207 |
+
* @param $destination
|
1208 |
+
* @return string
|
1209 |
+
*/
|
1210 |
+
private function _saveFileCurl($source, $destination)
|
1211 |
{
|
1212 |
$source = $this->_escapeSource($source);
|
1213 |
+
if ($this->_createDir(dirname($destination)) !== false) {
|
1214 |
$destination = M1_STORE_BASE_DIR . $destination;
|
1215 |
|
1216 |
$ch = curl_init();
|
1219 |
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
|
1220 |
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1");
|
1221 |
curl_setopt($ch, CURLOPT_NOBODY, true);
|
1222 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
1223 |
curl_exec($ch);
|
1224 |
$httpResponseCode = (int)curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
1225 |
|
1240 |
return "[BRIDGE ERROR] $error_no: " . curl_error($ch);
|
1241 |
}
|
1242 |
curl_close($ch);
|
1243 |
+
@chmod($destination, 0755);
|
1244 |
|
1245 |
return "OK";
|
1246 |
|
1249 |
}
|
1250 |
}
|
1251 |
|
1252 |
+
/**
|
1253 |
+
* @param $source
|
1254 |
+
* @return mixed
|
1255 |
+
*/
|
1256 |
+
private function _escapeSource($source)
|
1257 |
{
|
1258 |
return str_replace(" ", "%20", $source);
|
1259 |
}
|
1260 |
|
1261 |
+
/**
|
1262 |
+
* @param $dir
|
1263 |
+
* @return bool
|
1264 |
+
*/
|
1265 |
+
private function _createDir($dir)
|
1266 |
+
{
|
1267 |
$dirParts = explode("/", $dir);
|
1268 |
$path = M1_STORE_BASE_DIR;
|
1269 |
foreach ($dirParts as $item) {
|
1282 |
return true;
|
1283 |
}
|
1284 |
|
1285 |
+
/**
|
1286 |
+
* @param $source
|
1287 |
+
* @return bool
|
1288 |
+
*/
|
1289 |
+
private function _isSameHost($source)
|
1290 |
{
|
1291 |
$srcInfo = parse_url($source);
|
1292 |
|
1303 |
}
|
1304 |
|
1305 |
/**
|
1306 |
+
* @param resource $image - GD image object
|
1307 |
+
* @param string $filename - store sorce pathfile ex. M1_STORE_BASE_DIR . '/img/c/2.gif';
|
1308 |
+
* @param int $type - IMAGETYPE_JPEG, IMAGETYPE_GIF or IMAGETYPE_PNG
|
1309 |
+
* @param string $extension - file extension, this use for jpg or jpeg extension in prestashop
|
1310 |
*
|
1311 |
* @return true if success or false if no
|
1312 |
*/
|
1313 |
+
private function _convert($image, $filename, $type = IMAGETYPE_JPEG, $extension = '')
|
1314 |
{
|
1315 |
$end = pathinfo($filename, PATHINFO_EXTENSION);
|
1316 |
|
1340 |
return $this->_saveImage($newImage, $pathSave, $type);
|
1341 |
}
|
1342 |
|
1343 |
+
/**
|
1344 |
+
* @param $destination
|
1345 |
+
* @param $width
|
1346 |
+
* @param $height
|
1347 |
+
* @return string|void
|
1348 |
+
*/
|
1349 |
+
private function _scaled($destination, $width, $height)
|
1350 |
{
|
1351 |
$image = $this->_loadImage($destination, false);
|
1352 |
|
1375 |
return $this->_saveImage($newImage, $destination, $this->_imageType, 100) ? "OK" : "CAN'T SCALE IMAGE";
|
1376 |
}
|
1377 |
|
1378 |
+
/**
|
1379 |
+
* scaled2 method optimizet for prestashop
|
1380 |
+
*
|
1381 |
+
* @param $destination
|
1382 |
+
* @param $destWidth
|
1383 |
+
* @param $destHeight
|
1384 |
+
* @return string
|
1385 |
+
*/
|
1386 |
+
private function _scaled2($destination, $destWidth, $destHeight)
|
1387 |
{
|
1388 |
$method = 0;
|
1389 |
|
1438 |
|
1439 |
class M1_Mysqli
|
1440 |
{
|
1441 |
+
public $config = null; // config adapter
|
1442 |
+
public $result = array();
|
1443 |
+
public $dataBaseHandle = null;
|
1444 |
|
1445 |
/**
|
1446 |
* mysql constructor
|
1448 |
* @param M1_Config_Adapter $config
|
1449 |
* @return M1_Mysql
|
1450 |
*/
|
1451 |
+
public function __construct($config)
|
1452 |
{
|
1453 |
$this->config = $config;
|
1454 |
}
|
1456 |
/**
|
1457 |
* @return bool|null|resource
|
1458 |
*/
|
1459 |
+
private function getDataBaseHandle()
|
1460 |
{
|
1461 |
if ($this->dataBaseHandle) {
|
1462 |
return $this->dataBaseHandle;
|
1474 |
/**
|
1475 |
* @return bool|null|resource
|
1476 |
*/
|
1477 |
+
private function connect()
|
1478 |
{
|
1479 |
$triesCount = 10;
|
1480 |
$link = null;
|
1481 |
+
$host = $this->config->host . ($this->config->port ? ':' . $this->config->port : '');
|
1482 |
+
$password = stripslashes($this->config->password);
|
1483 |
|
1484 |
while (!$link) {
|
1485 |
if (!$triesCount--) {
|
1486 |
break;
|
1487 |
}
|
1488 |
|
1489 |
+
$link = @mysqli_connect($host, $this->config->username, $password);
|
1490 |
if (!$link) {
|
1491 |
sleep(5);
|
1492 |
}
|
1493 |
}
|
1494 |
|
1495 |
if ($link) {
|
1496 |
+
mysqli_select_db($link, $this->config->dbname);
|
1497 |
} else {
|
1498 |
return false;
|
1499 |
}
|
1506 |
*
|
1507 |
* @return array|bool|mysqli_result
|
1508 |
*/
|
1509 |
+
public function localQuery($sql)
|
1510 |
{
|
1511 |
$result = array();
|
1512 |
$dataBaseHandle = $this->getDataBaseHandle();
|
1530 |
*
|
1531 |
* @return array
|
1532 |
*/
|
1533 |
+
public function query($sql, $fetchType)
|
1534 |
{
|
1535 |
$result = array(
|
1536 |
'result' => null,
|
1537 |
+
'message' => '',
|
1538 |
+
'fetchedFields' => ''
|
1539 |
);
|
1540 |
|
1541 |
$dataBaseHandle = $this->getDataBaseHandle();
|
1598 |
return $result;
|
1599 |
}
|
1600 |
|
1601 |
+
if (is_bool($res)) {
|
1602 |
+
$result['result'] = $res;
|
1603 |
+
return $result;
|
1604 |
+
}
|
1605 |
+
|
1606 |
$fetchedFields = array();
|
1607 |
while ($field = mysqli_fetch_field($res)) {
|
1608 |
$fetchedFields[] = $field;
|
1629 |
/**
|
1630 |
* @return int
|
1631 |
*/
|
1632 |
+
public function getLastInsertId()
|
1633 |
{
|
1634 |
return mysqli_insert_id($this->dataBaseHandle);
|
1635 |
}
|
1637 |
/**
|
1638 |
* @return int
|
1639 |
*/
|
1640 |
+
public function getAffectedRows()
|
1641 |
{
|
1642 |
return mysqli_affected_rows($this->dataBaseHandle);
|
1643 |
}
|
1645 |
/**
|
1646 |
* @return void
|
1647 |
*/
|
1648 |
+
public function __destruct()
|
1649 |
{
|
1650 |
if ($this->dataBaseHandle) {
|
1651 |
mysqli_close($this->dataBaseHandle);
|
1657 |
}
|
1658 |
|
1659 |
|
1660 |
+
/**
|
1661 |
+
* Class M1_Config_Adapter_Ubercart
|
1662 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1663 |
class M1_Config_Adapter_Ubercart extends M1_Config_Adapter
|
1664 |
{
|
1665 |
+
|
1666 |
+
/**
|
1667 |
+
* M1_Config_Adapter_Ubercart constructor.
|
1668 |
+
*/
|
1669 |
+
public function __construct()
|
1670 |
{
|
1671 |
@include_once M1_STORE_BASE_DIR . "sites/default/settings.php";
|
1672 |
|
1683 |
}
|
1684 |
|
1685 |
$this->setHostPort( $url['host'] );
|
1686 |
+
$this->dbname = ltrim( $url['path'], '/' );
|
1687 |
+
$this->username = $url['user'];
|
1688 |
+
$this->password = $url['pass'];
|
1689 |
|
1690 |
$this->imagesDir = "/sites/default/files/";
|
1691 |
+
if (!file_exists(M1_STORE_BASE_DIR . $this->imagesDir)) {
|
1692 |
$this->imagesDir = "/files";
|
1693 |
}
|
1694 |
|
1695 |
+
if (file_exists(M1_STORE_BASE_DIR . "/modules/ubercart/uc_cart/uc_cart.info")) {
|
1696 |
$str = file_get_contents(M1_STORE_BASE_DIR . "/modules/ubercart/uc_cart/uc_cart.info");
|
1697 |
+
if (preg_match('/version\s+=\s+".+-(.+)"/', $str, $match) != 0) {
|
1698 |
$this->cartVars['dbVersion'] = $match[1];
|
1699 |
unset($match);
|
1700 |
}
|
1704 |
$this->productsImagesDir = $this->imagesDir;
|
1705 |
$this->manufacturersImagesDir = $this->imagesDir;
|
1706 |
}
|
1707 |
+
|
1708 |
}
|
1709 |
|
1710 |
|
1711 |
|
1712 |
+
/**
|
1713 |
+
* Class M1_Config_Adapter_Cubecart3
|
1714 |
+
*/
|
1715 |
class M1_Config_Adapter_Cubecart3 extends M1_Config_Adapter
|
1716 |
{
|
1717 |
+
|
1718 |
+
/**
|
1719 |
+
* M1_Config_Adapter_Cubecart3 constructor.
|
1720 |
+
*/
|
1721 |
+
public function __construct()
|
1722 |
{
|
1723 |
include_once(M1_STORE_BASE_DIR . 'includes/global.inc.php');
|
1724 |
|
1725 |
$this->setHostPort($glob['dbhost']);
|
1726 |
+
$this->dbname = $glob['dbdatabase'];
|
1727 |
+
$this->username = $glob['dbusername'];
|
1728 |
+
$this->password = $glob['dbpassword'];
|
1729 |
|
1730 |
$this->imagesDir = 'images/uploads';
|
1731 |
$this->categoriesImagesDir = $this->imagesDir;
|
1734 |
}
|
1735 |
}
|
1736 |
|
1737 |
+
/**
|
1738 |
+
* Class M1_Config_Adapter_JooCart
|
1739 |
+
*/
|
1740 |
class M1_Config_Adapter_JooCart extends M1_Config_Adapter
|
1741 |
{
|
1742 |
+
|
1743 |
+
/**
|
1744 |
+
* M1_Config_Adapter_JooCart constructor.
|
1745 |
+
*/
|
1746 |
+
public function __construct()
|
1747 |
{
|
1748 |
require_once M1_STORE_BASE_DIR . "/configuration.php";
|
1749 |
|
1752 |
$jconfig = new JConfig();
|
1753 |
|
1754 |
$this->setHostPort($jconfig->host);
|
1755 |
+
$this->dbname = $jconfig->db;
|
1756 |
+
$this->username = $jconfig->user;
|
1757 |
+
$this->password = $jconfig->password;
|
1758 |
|
1759 |
} else {
|
1760 |
|
1761 |
$this->setHostPort($mosConfig_host);
|
1762 |
+
$this->dbname = $mosConfig_db;
|
1763 |
+
$this->username = $mosConfig_user;
|
1764 |
+
$this->password = $mosConfig_password;
|
1765 |
}
|
1766 |
|
|
|
1767 |
$this->imagesDir = "components/com_opencart/image/";
|
1768 |
$this->categoriesImagesDir = $this->imagesDir;
|
1769 |
$this->productsImagesDir = $this->imagesDir;
|
1770 |
$this->manufacturersImagesDir = $this->imagesDir;
|
1771 |
}
|
1772 |
+
|
1773 |
}
|
1774 |
|
1775 |
|
1776 |
+
/**
|
1777 |
+
* Class M1_Config_Adapter_Prestashop11
|
1778 |
+
*/
|
1779 |
class M1_Config_Adapter_Prestashop11 extends M1_Config_Adapter
|
1780 |
{
|
1781 |
+
|
1782 |
+
/**
|
1783 |
+
* M1_Config_Adapter_Prestashop11 constructor.
|
1784 |
+
*/
|
1785 |
+
public function __construct()
|
1786 |
{
|
1787 |
$confFileOne = file_get_contents(M1_STORE_BASE_DIR . "/config/settings.inc.php");
|
1788 |
$confFileTwo = file_get_contents(M1_STORE_BASE_DIR . "/config/config.inc.php");
|
1810 |
}
|
1811 |
|
1812 |
if (preg_match("/^(\s*)define\(/i", $line)) {
|
1813 |
+
if ((strpos($line, '_DB_') !== false) || (strpos($line, '_PS_IMG_DIR_') !== false)
|
1814 |
+
|| (strpos($line, '_PS_VERSION_') !== false)
|
1815 |
+
) {
|
1816 |
$execute .= " " . $line;
|
1817 |
}
|
1818 |
}
|
1822 |
eval($execute);
|
1823 |
|
1824 |
$this->setHostPort(_DB_SERVER_);
|
1825 |
+
$this->dbname = _DB_NAME_;
|
1826 |
+
$this->username = _DB_USER_;
|
1827 |
+
$this->password = _DB_PASSWD_;
|
1828 |
|
1829 |
if (defined('_PS_IMG_DIR_') && defined('_PS_ROOT_DIR_')) {
|
1830 |
|
1843 |
$this->cartVars['dbVersion'] = _PS_VERSION_;
|
1844 |
}
|
1845 |
}
|
1846 |
+
|
1847 |
}
|
1848 |
|
1849 |
|
1850 |
|
1851 |
+
/**
|
1852 |
+
* Class M1_Config_Adapter_Ubercart3
|
1853 |
+
*/
|
1854 |
class M1_Config_Adapter_Ubercart3 extends M1_Config_Adapter
|
1855 |
{
|
1856 |
+
|
1857 |
+
/**
|
1858 |
+
* M1_Config_Adapter_Ubercart3 constructor.
|
1859 |
+
*/
|
1860 |
+
public function __construct()
|
1861 |
{
|
1862 |
@include_once M1_STORE_BASE_DIR . "sites/default/settings.php";
|
1863 |
|
1872 |
}
|
1873 |
|
1874 |
$this->setHostPort( $url['host'] );
|
1875 |
+
$this->dbname = ltrim( $url['database'], '/' );
|
1876 |
+
$this->username = $url['username'];
|
1877 |
+
$this->password = $url['password'];
|
1878 |
|
1879 |
$this->imagesDir = "/sites/default/files/";
|
1880 |
if (!file_exists( M1_STORE_BASE_DIR . $this->imagesDir )) {
|
1894 |
$this->productsImagesDir = $this->imagesDir;
|
1895 |
$this->manufacturersImagesDir = $this->imagesDir;
|
1896 |
}
|
1897 |
+
|
1898 |
}
|
1899 |
|
1900 |
|
1901 |
+
/**
|
1902 |
+
* Class M1_Config_Adapter_XCart
|
1903 |
+
*/
|
1904 |
class M1_Config_Adapter_XCart extends M1_Config_Adapter
|
1905 |
{
|
1906 |
+
|
1907 |
+
/**
|
1908 |
+
* M1_Config_Adapter_XCart constructor.
|
1909 |
+
*/
|
1910 |
+
public function __construct()
|
1911 |
{
|
1912 |
define('XCART_START', 1);
|
1913 |
|
1914 |
$config = file_get_contents(M1_STORE_BASE_DIR . "config.php");
|
1915 |
|
1916 |
+
try {
|
1917 |
+
preg_match('/\$sql_host.+\'(.+)\';/', $config, $match);
|
1918 |
+
$this->setHostPort($match[1]);
|
1919 |
+
preg_match('/\$sql_user.+\'(.+)\';/', $config, $match);
|
1920 |
+
$this->username = $match[1];
|
1921 |
+
preg_match('/\$sql_db.+\'(.+)\';/', $config, $match);
|
1922 |
+
$this->dbname = $match[1];
|
1923 |
+
preg_match('/\$sql_password.+\'(.*)\';/', $config, $match);
|
1924 |
+
$this->password = $match[1];
|
1925 |
+
} catch (Exception $e) {
|
1926 |
+
die('ERROR_READING_STORE_CONFIG_FILE');
|
1927 |
+
}
|
1928 |
+
|
1929 |
$this->imagesDir = 'images/'; // xcart starting from 4.1.x hardcodes images location
|
1930 |
$this->categoriesImagesDir = $this->imagesDir;
|
1931 |
$this->productsImagesDir = $this->imagesDir;
|
1932 |
$this->manufacturersImagesDir = $this->imagesDir;
|
1933 |
|
1934 |
+
if (file_exists(M1_STORE_BASE_DIR . "VERSION")) {
|
1935 |
$version = file_get_contents(M1_STORE_BASE_DIR . "VERSION");
|
1936 |
+
$this->cartVars['dbVersion'] = preg_replace('/(Version| |\\n)/', '', $version);
|
1937 |
}
|
1938 |
|
1939 |
}
|
1940 |
}
|
1941 |
|
1942 |
+
/**
|
1943 |
+
* Class M1_Config_Adapter_Cubecart
|
1944 |
+
*/
|
1945 |
class M1_Config_Adapter_Cubecart extends M1_Config_Adapter
|
1946 |
{
|
1947 |
+
|
1948 |
+
/**
|
1949 |
+
* M1_Config_Adapter_Cubecart constructor.
|
1950 |
+
*/
|
1951 |
+
public function __construct()
|
1952 |
{
|
1953 |
include_once(M1_STORE_BASE_DIR . 'includes/global.inc.php');
|
1954 |
|
1955 |
$this->setHostPort($glob['dbhost']);
|
1956 |
+
$this->dbname = $glob['dbdatabase'];
|
1957 |
+
$this->username = $glob['dbusername'];
|
1958 |
+
$this->password = $glob['dbpassword'];
|
1959 |
|
1960 |
$this->imagesDir = 'images';
|
1961 |
$this->categoriesImagesDir = $this->imagesDir;
|
1975 |
continue;
|
1976 |
}
|
1977 |
$configXml = simplexml_load_file(M1_STORE_BASE_DIR . 'language/'.$dirEntry);
|
1978 |
+
if ($configXml->info->title) {
|
1979 |
$lang['name'] = (string)$configXml->info->title;
|
1980 |
+
$lang['code'] = substr((string)$configXml->info->code, 0, 2);
|
1981 |
+
$lang['locale'] = substr((string)$configXml->info->code, 0, 2);
|
1982 |
$lang['currency'] = (string)$configXml->info->default_currency;
|
1983 |
+
$lang['fileName'] = str_replace(".xml", "", $dirEntry);
|
1984 |
$languages[] = $lang;
|
1985 |
}
|
1986 |
}
|
1987 |
if (!empty($languages)) {
|
1988 |
$this->cartVars['languages'] = $languages;
|
1989 |
}
|
1990 |
+
if (file_exists(M1_STORE_BASE_DIR . 'ini.inc.php')) {
|
1991 |
$conf = file_get_contents (M1_STORE_BASE_DIR . 'ini.inc.php');
|
1992 |
preg_match("/ini\['ver'\].*/", $conf, $match);
|
1993 |
if (isset($match[0]) && !empty($match[0])) {
|
1994 |
preg_match("/\d.*/", $match[0], $project);
|
1995 |
+
if (isset($project[0]) && !empty($project[0])) {
|
1996 |
+
$version = $project[0];
|
1997 |
+
$version = str_replace(array(" ","-","_","'",");",";",")"), "", $version);
|
1998 |
+
if ($version != '') {
|
1999 |
+
$this->cartVars['dbVersion'] = strtolower($version);
|
2000 |
+
}
|
2001 |
+
}
|
2002 |
+
} else {
|
2003 |
preg_match("/define\('CC_VERSION.*/", $conf, $match);
|
2004 |
if (isset($match[0]) && !empty($match[0])) {
|
2005 |
preg_match("/\d.*/", $match[0], $project);
|
2006 |
+
if (isset($project[0]) && !empty($project[0])) {
|
2007 |
$version = $project[0];
|
2008 |
$version = str_replace(array(" ","-","_","'",");",";",")"), "", $version);
|
2009 |
if ($version != '') {
|
2013 |
}
|
2014 |
|
2015 |
}
|
2016 |
+
} elseif (file_exists(M1_STORE_BASE_DIR . "includes" . DIRECTORY_SEPARATOR . 'ini.inc.php')) {
|
2017 |
$conf = file_get_contents (M1_STORE_BASE_DIR . "includes" . DIRECTORY_SEPARATOR . 'ini.inc.php');
|
2018 |
preg_match("/ini\['ver'\].*/", $conf, $match);
|
2019 |
if (isset($match[0]) && !empty($match[0])) {
|
2042 |
}
|
2043 |
}
|
2044 |
|
2045 |
+
/**
|
2046 |
+
* Class M1_Config_Adapter_WebAsyst
|
2047 |
+
*/
|
2048 |
class M1_Config_Adapter_WebAsyst extends M1_Config_Adapter
|
2049 |
{
|
2050 |
+
|
2051 |
+
/**
|
2052 |
+
* M1_Config_Adapter_WebAsyst constructor.
|
2053 |
+
*/
|
2054 |
+
public function __construct()
|
2055 |
{
|
2056 |
$config = simplexml_load_file(M1_STORE_BASE_DIR . 'kernel/wbs.xml');
|
2057 |
|
2062 |
$host = (string)$config->DBSETTINGS['SQLSERVER'];
|
2063 |
|
2064 |
$this->setHostPort($host);
|
2065 |
+
$this->dbname = (string)$config->DBSETTINGS['DB_NAME'];
|
2066 |
+
$this->username = (string)$config->DBSETTINGS['DB_USER'];
|
2067 |
+
$this->password = (string)$config->DBSETTINGS['DB_PASSWORD'];
|
2068 |
|
2069 |
$this->imagesDir = 'published/publicdata/'.strtoupper($dbKey).'/attachments/SC/products_pictures';
|
2070 |
$this->categoriesImagesDir = $this->imagesDir;
|
2071 |
$this->productsImagesDir = $this->imagesDir;
|
2072 |
$this->manufacturersImagesDir = $this->imagesDir;
|
2073 |
|
2074 |
+
if (isset($config->VERSIONS['SYSTEM'])) {
|
2075 |
$this->cartVars['dbVersion'] = (string)$config->VERSIONS['SYSTEM'];
|
2076 |
}
|
2077 |
}
|
2078 |
|
2079 |
}
|
2080 |
|
2081 |
+
/**
|
2082 |
+
* Class M1_Config_Adapter_Squirrelcart242
|
2083 |
+
*/
|
2084 |
class M1_Config_Adapter_Squirrelcart242 extends M1_Config_Adapter
|
2085 |
{
|
2086 |
+
|
2087 |
+
/**
|
2088 |
+
* M1_Config_Adapter_Squirrelcart242 constructor.
|
2089 |
+
*/
|
2090 |
+
public function __construct()
|
2091 |
{
|
2092 |
include_once(M1_STORE_BASE_DIR . 'squirrelcart/config.php');
|
2093 |
|
2094 |
$this->setHostPort($sql_host);
|
2095 |
+
$this->dbname = $db;
|
2096 |
+
$this->username = $sql_username;
|
2097 |
+
$this->password = $sql_password;
|
2098 |
|
2099 |
$this->imagesDir = $img_path;
|
2100 |
$this->categoriesImagesDir = $img_path . "/categories";
|
2102 |
$this->manufacturersImagesDir = $img_path;
|
2103 |
|
2104 |
$version = $this->getCartVersionFromDb("DB_Version", "Store_Information", "record_number = 1");
|
2105 |
+
if ($version != '' ) {
|
2106 |
$this->cartVars['dbVersion'] = $version;
|
2107 |
}
|
2108 |
}
|
2109 |
}
|
2110 |
|
2111 |
+
/**
|
2112 |
+
* Class M1_Config_Adapter_Opencart14
|
2113 |
+
*/
|
2114 |
class M1_Config_Adapter_Opencart14 extends M1_Config_Adapter
|
2115 |
{
|
2116 |
+
|
2117 |
+
/**
|
2118 |
+
* M1_Config_Adapter_Opencart14 constructor.
|
2119 |
+
*/
|
2120 |
+
public function __construct()
|
2121 |
{
|
2122 |
+
include_once (M1_STORE_BASE_DIR . "/config.php");
|
2123 |
|
2124 |
+
if (defined('DB_HOST')) {
|
2125 |
$this->setHostPort(DB_HOST);
|
2126 |
} else {
|
2127 |
$this->setHostPort(DB_HOSTNAME);
|
2128 |
}
|
2129 |
|
2130 |
+
if (defined('DB_USER')) {
|
2131 |
+
$this->username = DB_USER;
|
2132 |
} else {
|
2133 |
+
$this->username = DB_USERNAME;
|
2134 |
}
|
2135 |
|
2136 |
+
$this->password = DB_PASSWORD;
|
2137 |
|
2138 |
+
if (defined('DB_NAME')) {
|
2139 |
+
$this->dbname = DB_NAME;
|
2140 |
} else {
|
2141 |
+
$this->dbname = DB_DATABASE;
|
2142 |
}
|
2143 |
|
2144 |
$indexFileContent = '';
|
2145 |
$startupFileContent = '';
|
2146 |
|
2147 |
+
if (file_exists(M1_STORE_BASE_DIR . "/index.php")) {
|
2148 |
$indexFileContent = file_get_contents(M1_STORE_BASE_DIR . "/index.php");
|
2149 |
}
|
2150 |
|
2152 |
$startupFileContent = file_get_contents(M1_STORE_BASE_DIR . "/system/startup.php");
|
2153 |
}
|
2154 |
|
2155 |
+
if (preg_match("/define\('\VERSION\'\, \'(.+)\'\)/", $indexFileContent, $match) == 0 ) {
|
2156 |
preg_match("/define\('\VERSION\'\, \'(.+)\'\)/", $startupFileContent, $match);
|
2157 |
+
}
|
2158 |
|
2159 |
+
if (count($match) > 0) {
|
2160 |
$this->cartVars['dbVersion'] = $match[1];
|
2161 |
unset($match);
|
2162 |
}
|
2167 |
$this->manufacturersImagesDir = $this->imagesDir;
|
2168 |
|
2169 |
}
|
2170 |
+
|
2171 |
}
|
2172 |
|
2173 |
|
2174 |
|
2175 |
+
/**
|
2176 |
+
* Class M1_Config_Adapter_Litecommerce
|
2177 |
+
*/
|
2178 |
class M1_Config_Adapter_Litecommerce extends M1_Config_Adapter
|
2179 |
{
|
2180 |
+
|
2181 |
+
/**
|
2182 |
+
* M1_Config_Adapter_Litecommerce constructor.
|
2183 |
+
*/
|
2184 |
+
public function __construct()
|
2185 |
{
|
2186 |
+
if ((file_exists(M1_STORE_BASE_DIR .'/etc/config.php'))) {
|
2187 |
$file = M1_STORE_BASE_DIR .'/etc/config.php';
|
2188 |
+
$this->imagesDir = "/images";
|
2189 |
$this->categoriesImagesDir = $this->imagesDir."/category";
|
2190 |
$this->productsImagesDir = $this->imagesDir."/product";
|
2191 |
$this->manufacturersImagesDir = $this->imagesDir;
|
2192 |
+
} elseif (file_exists(M1_STORE_BASE_DIR .'/modules/lc_connector/litecommerce/etc/config.php')) {
|
2193 |
$file = M1_STORE_BASE_DIR .'/modules/lc_connector/litecommerce/etc/config.php';
|
2194 |
+
$this->imagesDir = "/modules/lc_connector/litecommerce/images";
|
2195 |
$this->categoriesImagesDir = $this->imagesDir."/category";
|
2196 |
$this->productsImagesDir = $this->imagesDir."/product";
|
2197 |
$this->manufacturersImagesDir = $this->imagesDir;
|
2198 |
}
|
2199 |
|
2200 |
+
$settings = parse_ini_file($file, true);
|
2201 |
+
$settings = $settings['database_details'];
|
2202 |
+
$this->host = $settings['hostspec'];
|
2203 |
$this->setHostPort($settings['hostspec']);
|
2204 |
+
$this->username = $settings['username'];
|
2205 |
+
$this->password = $settings['password'];
|
2206 |
+
$this->dbname = $settings['database'];
|
2207 |
+
$this->tblPrefix = $settings['table_prefix'];
|
2208 |
|
2209 |
+
$version = $this->getCartVersionFromDb("value", "config", "name = 'version'");
|
2210 |
+
if ($version != '') {
|
2211 |
$this->cartVars['dbVersion'] = $version;
|
2212 |
}
|
2213 |
}
|
2214 |
+
|
2215 |
}
|
2216 |
|
2217 |
|
2218 |
|
2219 |
+
/**
|
2220 |
+
* Class M1_Config_Adapter_Oxid
|
2221 |
+
*/
|
2222 |
class M1_Config_Adapter_Oxid extends M1_Config_Adapter
|
2223 |
{
|
2224 |
+
|
2225 |
+
/**
|
2226 |
+
* M1_Config_Adapter_Oxid constructor.
|
2227 |
+
*/
|
2228 |
+
public function __construct()
|
2229 |
{
|
2230 |
//@include_once M1_STORE_BASE_DIR . "config.inc.php";
|
2231 |
$config = file_get_contents(M1_STORE_BASE_DIR . "config.inc.php");
|
2232 |
+
try {
|
2233 |
+
preg_match("/dbName(.+)?=(.+)?\'(.+)\';/", $config, $match);
|
2234 |
+
$this->dbname = $match[3];
|
2235 |
+
preg_match("/dbUser(.+)?=(.+)?\'(.+)\';/", $config, $match);
|
2236 |
+
$this->username = $match[3];
|
2237 |
+
preg_match("/dbPwd(.+)?=(.+)?\'(.+)\';/", $config, $match);
|
2238 |
+
$this->password = isset($match[3]) ? $match[3] : '';
|
2239 |
+
preg_match("/dbHost(.+)?=(.+)?\'(.*)\';/", $config, $match);
|
2240 |
+
$this->setHostPort($match[3]);
|
2241 |
+
} catch (Exception $e) {
|
2242 |
+
die('ERROR_READING_STORE_CONFIG_FILE');
|
2243 |
+
}
|
2244 |
|
2245 |
//check about last slash
|
2246 |
$this->imagesDir = "out/pictures/";
|
2250 |
|
2251 |
//add key for decoding config values in oxid db
|
2252 |
//check slash
|
2253 |
+
$keyConfigFile = file_get_contents(M1_STORE_BASE_DIR . '/core/oxconfk.php');
|
2254 |
+
preg_match("/sConfigKey(.+)?=(.+)?\"(.+)?\";/", $keyConfigFile, $match);
|
2255 |
$this->cartVars['sConfigKey'] = $match[3];
|
2256 |
$version = $this->getCartVersionFromDb("OXVERSION", "oxshops", "OXACTIVE=1 LIMIT 1" );
|
2257 |
+
if ($version != '') {
|
2258 |
$this->cartVars['dbVersion'] = $version;
|
2259 |
+
}
|
2260 |
}
|
2261 |
+
|
2262 |
}
|
2263 |
|
2264 |
|
2265 |
|
2266 |
+
/**
|
2267 |
+
* Class M1_Config_Adapter_XtcommerceVeyton
|
2268 |
+
*/
|
2269 |
class M1_Config_Adapter_XtcommerceVeyton extends M1_Config_Adapter
|
2270 |
{
|
2271 |
+
|
2272 |
+
/**
|
2273 |
+
* M1_Config_Adapter_XtcommerceVeyton constructor.
|
2274 |
+
*/
|
2275 |
+
public function __construct()
|
2276 |
{
|
2277 |
define('_VALID_CALL','TRUE');
|
2278 |
define('_SRV_WEBROOT','TRUE');
|
2287 |
. 'paths.php';
|
2288 |
|
2289 |
$this->setHostPort(_SYSTEM_DATABASE_HOST);
|
2290 |
+
$this->dbname = _SYSTEM_DATABASE_DATABASE;
|
2291 |
+
$this->username = _SYSTEM_DATABASE_USER;
|
2292 |
+
$this->password = _SYSTEM_DATABASE_PWD;
|
2293 |
$this->imagesDir = _SRV_WEB_IMAGES;
|
2294 |
+
$this->tblPrefix = DB_PREFIX . "_";
|
2295 |
|
2296 |
$version = $this->getCartVersionFromDb("config_value", "config", "config_key = '_SYSTEM_VERSION'");
|
2297 |
+
if ($version != '') {
|
2298 |
$this->cartVars['dbVersion'] = $version;
|
2299 |
}
|
2300 |
|
2302 |
$this->productsImagesDir = $this->imagesDir;
|
2303 |
$this->manufacturersImagesDir = $this->imagesDir;
|
2304 |
}
|
2305 |
+
|
2306 |
}
|
2307 |
|
2308 |
|
2309 |
+
/**
|
2310 |
+
* Class M1_Config_Adapter_SSPremium
|
2311 |
+
*/
|
2312 |
class M1_Config_Adapter_SSPremium extends M1_Config_Adapter
|
2313 |
{
|
2314 |
+
|
2315 |
+
/**
|
2316 |
+
* M1_Config_Adapter_SSPremium constructor.
|
2317 |
+
*/
|
2318 |
+
public function __construct()
|
2319 |
{
|
2320 |
+
if (file_exists(M1_STORE_BASE_DIR . 'cfg/connect.inc.php')) {
|
2321 |
$config = file_get_contents(M1_STORE_BASE_DIR . 'cfg/connect.inc.php');
|
2322 |
preg_match("/define\(\'DB_NAME\', \'(.+)\'\);/", $config, $match);
|
2323 |
+
$this->dbname = $match[1];
|
2324 |
preg_match("/define\(\'DB_USER\', \'(.+)\'\);/", $config, $match);
|
2325 |
+
$this->username = $match[1];
|
2326 |
preg_match("/define\(\'DB_PASS\', \'(.*)\'\);/", $config, $match);
|
2327 |
+
$this->password = $match[1];
|
2328 |
preg_match("/define\(\'DB_HOST\', \'(.+)\'\);/", $config, $match);
|
2329 |
$this->setHostPort( $match[1] );
|
2330 |
|
2334 |
$this->manufacturersImagesDir = $this->imagesDir;
|
2335 |
|
2336 |
$version = $this->getCartVersionFromDb("value", "SS_system", "varName = 'version_number'");
|
2337 |
+
if ($version != '') {
|
2338 |
$this->cartVars['dbVersion'] = $version;
|
2339 |
}
|
2340 |
} else {
|
2341 |
$config = include M1_STORE_BASE_DIR . "wa-config/db.php";
|
2342 |
+
$this->dbname = $config['default']['database'];
|
2343 |
+
$this->username = $config['default']['user'];
|
2344 |
+
$this->password = $config['default']['password'];
|
2345 |
$this->setHostPort($config['default']['host']);
|
2346 |
|
2347 |
$this->imagesDir = "products_pictures/";
|
2355 |
|
2356 |
}
|
2357 |
|
2358 |
+
/**
|
2359 |
+
* Class M1_Config_Adapter_Virtuemart113
|
2360 |
+
*/
|
2361 |
class M1_Config_Adapter_Virtuemart113 extends M1_Config_Adapter
|
2362 |
{
|
2363 |
+
|
2364 |
+
/**
|
2365 |
+
* M1_Config_Adapter_Virtuemart113 constructor.
|
2366 |
+
*/
|
2367 |
+
public function __construct()
|
2368 |
{
|
2369 |
require_once M1_STORE_BASE_DIR . "/configuration.php";
|
2370 |
|
2373 |
$jconfig = new JConfig();
|
2374 |
|
2375 |
$this->setHostPort($jconfig->host);
|
2376 |
+
$this->dbname = $jconfig->db;
|
2377 |
+
$this->username = $jconfig->user;
|
2378 |
+
$this->password = $jconfig->password;
|
2379 |
|
2380 |
} else {
|
2381 |
|
2382 |
$this->setHostPort($mosConfig_host);
|
2383 |
+
$this->dbname = $mosConfig_db;
|
2384 |
+
$this->username = $mosConfig_user;
|
2385 |
+
$this->password = $mosConfig_password;
|
2386 |
}
|
2387 |
|
2388 |
+
if (file_exists(M1_STORE_BASE_DIR . "/administrator/components/com_virtuemart/version.php")) {
|
2389 |
$ver = file_get_contents(M1_STORE_BASE_DIR . "/administrator/components/com_virtuemart/version.php");
|
2390 |
if (preg_match('/\$RELEASE.+\'(.+)\'/', $ver, $match) != 0) {
|
2391 |
$this->cartVars['dbVersion'] = $match[1];
|
2398 |
$this->productsImagesDir = $this->imagesDir;
|
2399 |
$this->manufacturersImagesDir = $this->imagesDir;
|
2400 |
|
2401 |
+
if (is_dir( M1_STORE_BASE_DIR . 'images/stories/virtuemart/product')) {
|
2402 |
$this->imagesDir = 'images/stories/virtuemart';
|
2403 |
$this->productsImagesDir = $this->imagesDir . '/product';
|
2404 |
$this->categoriesImagesDir = $this->imagesDir . '/category';
|
2405 |
$this->manufacturersImagesDir = $this->imagesDir . '/manufacturer';
|
2406 |
}
|
|
|
2407 |
}
|
2408 |
+
|
2409 |
}
|
2410 |
|
2411 |
|
2412 |
+
/**
|
2413 |
+
* Class M1_Config_Adapter_Hhgmultistore
|
2414 |
+
*/
|
2415 |
class M1_Config_Adapter_Hhgmultistore extends M1_Config_Adapter
|
2416 |
{
|
2417 |
+
|
2418 |
+
/**
|
2419 |
+
* M1_Config_Adapter_Hhgmultistore constructor.
|
2420 |
+
*/
|
2421 |
+
public function __construct()
|
2422 |
{
|
2423 |
+
define('SITE_PATH', '');
|
2424 |
+
define('WEB_PATH', '');
|
2425 |
require_once M1_STORE_BASE_DIR . "core/config/configure.php";
|
2426 |
require_once M1_STORE_BASE_DIR . "core/config/paths.php";
|
2427 |
|
2437 |
$this->manufacturersImagesDirs['img'] = $baseDir . DIR_WS_MANUFACTURERS_IMAGES;
|
2438 |
$this->manufacturersImagesDirs['org'] = $baseDir . DIR_WS_MANUFACTURERS_ORG_IMAGES;
|
2439 |
|
2440 |
+
$this->host = DB_SERVER;
|
2441 |
+
$this->username = DB_SERVER_USERNAME;
|
2442 |
+
$this->password = DB_SERVER_PASSWORD;
|
2443 |
+
$this->dbname = DB_DATABASE;
|
2444 |
|
2445 |
+
if (file_exists(M1_STORE_BASE_DIR . "/core/config/conf.hhg_startup.php")) {
|
2446 |
$ver = file_get_contents(M1_STORE_BASE_DIR . "/core/config/conf.hhg_startup.php");
|
2447 |
if (preg_match('/PROJECT_VERSION.+\((.+)\)\'\)/', $ver, $match) != 0) {
|
2448 |
$this->cartVars['dbVersion'] = $match[1];
|
2450 |
}
|
2451 |
}
|
2452 |
}
|
2453 |
+
|
2454 |
}
|
2455 |
|
2456 |
|
2457 |
+
/**
|
2458 |
+
* Class M1_Config_Adapter_Wordpress
|
2459 |
+
*/
|
2460 |
+
class M1_Config_Adapter_Wordpress extends M1_Config_Adapter
|
2461 |
{
|
2462 |
+
|
2463 |
+
/**
|
2464 |
+
* M1_Config_Adapter_Wordpress constructor.
|
2465 |
+
*/
|
2466 |
+
public function __construct()
|
2467 |
+
{
|
2468 |
+
if (file_exists(M1_STORE_BASE_DIR . 'wp-config.php')) {
|
2469 |
+
$config = file_get_contents(M1_STORE_BASE_DIR . 'wp-config.php');
|
2470 |
+
} else {
|
2471 |
+
$config = file_get_contents(dirname(M1_STORE_BASE_DIR) . '/wp-config.php');
|
2472 |
+
}
|
2473 |
+
|
2474 |
+
preg_match('/define\s*\(\s*[\'"]DB_NAME[\'"],\s*[\'"](.+)[\'"]\s*\)\s*;/', $config, $dbnameMatch);
|
2475 |
+
preg_match('/define\s*\(\s*[\'"]DB_USER[\'"],\s*[\'"](.+)[\'"]\s*\)\s*;/', $config, $usernameMatch);
|
2476 |
+
preg_match('/define\s*\(\s*[\'"]DB_PASS(WORD)?[\'"],\s*[\'"](.*)[\'"]\s*\)\s*;/', $config, $passwordMatch);
|
2477 |
+
preg_match('/define\s*\(\s*[\'"]DB_HOST[\'"],\s*[\'"](.+)[\'"]\s*\)\s*;/', $config, $hostMatch);
|
2478 |
+
preg_match('/\$table_prefix\s*=\s*\'(.*)\'\s*;/', $config, $tblPrefixMatch);
|
2479 |
+
if (preg_match('/define\s*\(\s*[\'"]UPLOADS[\'"],\s*[\'"](.+)[\'"]\s*\)\s*;/', $config, $match) && isset($match[1])) {
|
2480 |
+
$this->imagesDir = preg_replace('/\'\.\'/', '', $match[1]);
|
2481 |
+
} else {
|
2482 |
+
$this->imagesDir = 'wp-content' . DIRECTORY_SEPARATOR . 'uploads';
|
2483 |
+
}
|
2484 |
+
|
2485 |
+
if (isset($dbnameMatch[1]) && isset($usernameMatch[1])
|
2486 |
+
&& isset($passwordMatch[2]) && isset($hostMatch[1]) && isset($tblPrefixMatch[1])) {
|
2487 |
+
$this->dbname = $dbnameMatch[1];
|
2488 |
+
$this->username = $usernameMatch[1];
|
2489 |
+
$this->password = $passwordMatch[2];
|
2490 |
+
$this->setHostPort($hostMatch[1]);
|
2491 |
+
$this->tblPrefix = $tblPrefixMatch[1];
|
2492 |
+
} elseif (!$this->_tryLoadConfigs()) {
|
2493 |
+
die('ERROR_READING_STORE_CONFIG_FILE');
|
2494 |
+
}
|
2495 |
+
|
2496 |
+
$cartPlugins = $this->getCartVersionFromDb("option_value", "options", "option_name = 'active_plugins'");
|
2497 |
+
if ($cartPlugins) {
|
2498 |
+
$cartPlugins = unserialize($cartPlugins);
|
2499 |
+
foreach ($cartPlugins as $plugin) {
|
2500 |
+
switch ($plugin) {
|
2501 |
+
case 'woocommerce/woocommerce.php':
|
2502 |
+
$this->_setWoocommerceData();
|
2503 |
+
return;
|
2504 |
+
case 'wp-e-commerce/wp-shopping-cart.php':
|
2505 |
+
$this->_setWpecommerceData();
|
2506 |
+
return;
|
2507 |
+
}
|
2508 |
+
}
|
2509 |
+
}
|
2510 |
+
|
2511 |
+
die ("CART_PLUGIN_IS_NOT_DETECTED");
|
2512 |
+
}
|
2513 |
+
|
2514 |
+
protected function _setWoocommerceData()
|
2515 |
+
{
|
2516 |
+
$version = $this->getCartVersionFromDb("option_value", "options", "option_name = 'woocommerce_db_version'");
|
2517 |
+
|
2518 |
+
if ($version != '') {
|
2519 |
+
$this->cartVars['dbVersion'] = $version;
|
2520 |
+
}
|
2521 |
+
|
2522 |
+
$this->cartVars['categoriesDirRelative'] = 'images/categories/';
|
2523 |
+
$this->cartVars['productsDirRelative'] = 'images/products/';
|
2524 |
+
$this->imagesDir = "wp-content/uploads/images/";
|
2525 |
+
$this->categoriesImagesDir = $this->imagesDir . 'categories/';
|
2526 |
+
$this->productsImagesDir = $this->imagesDir . 'products/';
|
2527 |
+
$this->manufacturersImagesDir = $this->imagesDir;
|
2528 |
+
|
2529 |
+
}
|
2530 |
+
|
2531 |
+
protected function _setWpecommerceData()
|
2532 |
+
{
|
2533 |
+
$version = $this->getCartVersionFromDb("option_value", "options", "option_name = 'wpsc_version'");
|
2534 |
+
if ($version != '') {
|
2535 |
+
$this->cartVars['dbVersion'] = $version;
|
2536 |
+
} else {
|
2537 |
+
$filePath = M1_STORE_BASE_DIR . "wp-content" . DIRECTORY_SEPARATOR . "plugins" . DIRECTORY_SEPARATOR
|
2538 |
+
. "wp-shopping-cart" . DIRECTORY_SEPARATOR . "wp-shopping-cart.php";
|
2539 |
+
if (file_exists($filePath)) {
|
2540 |
+
$conf = file_get_contents ($filePath);
|
2541 |
+
preg_match("/define\('WPSC_VERSION.*/", $conf, $match);
|
2542 |
+
if (isset($match[0]) && !empty($match[0])) {
|
2543 |
+
preg_match("/\d.*/", $match[0], $project);
|
2544 |
+
if (isset($project[0]) && !empty($project[0])) {
|
2545 |
+
$version = $project[0];
|
2546 |
+
$version = str_replace(array(" ","-","_","'",");",")",";"), "", $version);
|
2547 |
+
if ($version != '') {
|
2548 |
+
$this->cartVars['dbVersion'] = strtolower($version);
|
2549 |
+
}
|
2550 |
+
}
|
2551 |
+
}
|
2552 |
+
}
|
2553 |
+
}
|
2554 |
+
|
2555 |
+
if (file_exists(M1_STORE_BASE_DIR . "wp-content/plugins/shopp/Shopp.php")
|
2556 |
+
|| file_exists(M1_STORE_BASE_DIR . "wp-content/plugins/wp-e-commerce/editor.php")) {
|
2557 |
+
$this->imagesDir = "wp-content/uploads/wpsc/";
|
2558 |
+
$this->categoriesImagesDir = $this->imagesDir.'category_images/';
|
2559 |
+
$this->productsImagesDir = $this->imagesDir.'product_images/';
|
2560 |
+
$this->manufacturersImagesDir = $this->imagesDir;
|
2561 |
+
} elseif (file_exists(M1_STORE_BASE_DIR . "wp-content/plugins/wp-e-commerce/wp-shopping-cart.php")) {
|
2562 |
+
$this->imagesDir = "wp-content/uploads/";
|
2563 |
+
$this->categoriesImagesDir = $this->imagesDir."wpsc/category_images/";
|
2564 |
+
$this->productsImagesDir = $this->imagesDir;
|
2565 |
+
$this->manufacturersImagesDir = $this->imagesDir;
|
2566 |
+
} else {
|
2567 |
+
$this->imagesDir = "images/";
|
2568 |
+
$this->categoriesImagesDir = $this->imagesDir;
|
2569 |
+
$this->productsImagesDir = $this->imagesDir;
|
2570 |
+
$this->manufacturersImagesDir = $this->imagesDir;
|
2571 |
+
}
|
2572 |
+
}
|
2573 |
+
|
2574 |
+
protected function _tryLoadConfigs()
|
2575 |
{
|
2576 |
+
try {
|
2577 |
+
if (file_exists(M1_STORE_BASE_DIR . 'wp-config.php')) {
|
2578 |
+
require_once(M1_STORE_BASE_DIR . 'wp-config.php');
|
2579 |
+
} else {
|
2580 |
+
require_once(dirname(M1_STORE_BASE_DIR) . '/wp-config.php');
|
2581 |
+
}
|
2582 |
+
|
2583 |
+
if (defined('DB_NAME') && defined('DB_USER') && defined('DB_HOST')) {
|
2584 |
+
$this->dbname = DB_NAME;
|
2585 |
+
$this->username = DB_USER;
|
2586 |
+
$this->setHostPort(DB_HOST);
|
2587 |
+
} else {
|
2588 |
+
return false;
|
2589 |
+
}
|
2590 |
+
|
2591 |
+
if (defined('DB_PASSWORD')) {
|
2592 |
+
$this->password = DB_PASSWORD;
|
2593 |
+
} elseif (defined('DB_PASS')) {
|
2594 |
+
$this->password = DB_PASS;
|
2595 |
+
} else {
|
2596 |
+
return false;
|
2597 |
+
}
|
2598 |
+
|
2599 |
+
if (defined('WP_CONTENT_DIR')) {
|
2600 |
+
$this->imagesDir = WP_CONTENT_DIR . DIRECTORY_SEPARATOR . 'uploads';
|
2601 |
+
} elseif (defined('UPLOADS')) {
|
2602 |
+
$this->imagesDir = UPLOADS;
|
2603 |
+
} else {
|
2604 |
+
$this->imagesDir = 'wp-content' . DIRECTORY_SEPARATOR . 'uploads';
|
2605 |
+
}
|
2606 |
+
|
2607 |
+
if (isset($table_prefix)) {
|
2608 |
+
$this->tblPrefix = $table_prefix;
|
2609 |
+
}
|
2610 |
+
} catch (Exception $e) {
|
2611 |
+
return false;
|
2612 |
+
}
|
2613 |
+
|
2614 |
+
return true;
|
2615 |
+
}
|
2616 |
+
}
|
2617 |
+
|
2618 |
+
|
2619 |
+
|
2620 |
+
/**
|
2621 |
+
* Class M1_Config_Adapter_Magento1212
|
2622 |
+
*/
|
2623 |
+
class M1_Config_Adapter_Magento1212 extends M1_Config_Adapter
|
2624 |
+
{
|
2625 |
+
|
2626 |
+
/**
|
2627 |
+
* M1_Config_Adapter_Magento1212 constructor.
|
2628 |
+
*/
|
2629 |
+
public function __construct()
|
2630 |
+
{
|
2631 |
+
// MAGENTO 2.X
|
2632 |
+
if (file_exists(M1_STORE_BASE_DIR . 'app/etc/env.php')) {
|
2633 |
+
/**
|
2634 |
+
* @var array
|
2635 |
+
*/
|
2636 |
+
$config = @include(M1_STORE_BASE_DIR . 'app/etc/env.php');
|
2637 |
+
|
2638 |
+
$this->cartVars['AdminUrl'] = (string)$config['backend']['frontName'];
|
2639 |
+
|
2640 |
+
$db = array();
|
2641 |
+
foreach ($config['db']['connection'] as $connection) {
|
2642 |
+
if ($connection['active'] == 1) {
|
2643 |
+
$db = $connection;
|
2644 |
+
break;
|
2645 |
+
}
|
2646 |
+
}
|
2647 |
+
|
2648 |
+
$this->setHostPort((string)$db['host']);
|
2649 |
+
$this->username = (string)$db['username'];
|
2650 |
+
$this->dbname = (string)$db['dbname'];
|
2651 |
+
$this->password = (string)$db['password'];
|
2652 |
+
|
2653 |
+
if (file_exists(M1_STORE_BASE_DIR . 'composer.json')) {
|
2654 |
+
$string = file_get_contents(M1_STORE_BASE_DIR . 'composer.json');
|
2655 |
+
$json = json_decode($string, true);
|
2656 |
+
$this->cartVars['dbVersion'] = $json['version'];
|
2657 |
+
} else {
|
2658 |
+
if (file_exists(M1_STORE_BASE_DIR . 'vendor/magento/framework/AppInterface.php')) {
|
2659 |
+
@include M1_STORE_BASE_DIR . 'vendor/magento/framework/AppInterface.php';
|
2660 |
+
|
2661 |
+
if (defined('\Magento\Framework\AppInterface::VERSION')) {
|
2662 |
+
$this->cartVars['dbVersion'] = \Magento\Framework\AppInterface::VERSION;
|
2663 |
+
} else {
|
2664 |
+
$this->cartVars['dbVersion'] = '2.0';
|
2665 |
+
}
|
2666 |
+
} else {
|
2667 |
+
$this->cartVars['dbVersion'] = '2.0';
|
2668 |
+
}
|
2669 |
+
}
|
2670 |
+
|
2671 |
+
if (isset($db['initStatements']) && $db['initStatements'] != '') {
|
2672 |
+
$this->cartVars['dbCharSet'] = $db['initStatements'];
|
2673 |
+
}
|
2674 |
+
|
2675 |
+
$this->imagesDir = 'pub/media/';
|
2676 |
+
$this->categoriesImagesDir = $this->imagesDir . 'catalog/category/';
|
2677 |
+
$this->productsImagesDir = $this->imagesDir . 'catalog/product/';
|
2678 |
+
$this->manufacturersImagesDir = $this->imagesDir;
|
2679 |
+
|
2680 |
+
return;
|
2681 |
+
}
|
2682 |
+
|
2683 |
/**
|
2684 |
* @var SimpleXMLElement
|
2685 |
*/
|
2686 |
$config = simplexml_load_file(M1_STORE_BASE_DIR . 'app/etc/local.xml');
|
2687 |
$statuses = simplexml_load_file(M1_STORE_BASE_DIR . 'app/code/core/Mage/Sales/etc/config.xml');
|
2688 |
|
2689 |
+
$version = $statuses->modules->Mage_Sales->version;
|
2690 |
|
2691 |
$result = array();
|
2692 |
|
2693 |
+
if (version_compare($version, '1.4.0.25') < 0) {
|
2694 |
$statuses = $statuses->global->sales->order->statuses;
|
2695 |
foreach ( $statuses->children() as $status ) {
|
2696 |
+
$result[$status->getName()] = (string)$status->label;
|
2697 |
}
|
2698 |
}
|
2699 |
|
2700 |
+
if (file_exists(M1_STORE_BASE_DIR . "app/Mage.php")) {
|
2701 |
$ver = file_get_contents(M1_STORE_BASE_DIR . "app/Mage.php");
|
2702 |
+
if (preg_match("/getVersionInfo[^}]+\'major\' *=> *\'(\d+)\'[^}]+\'minor\' *=> *\'(\d+)\'[^}]+\'revision\' *=> *\'(\d+)\'[^}]+\'patch\' *=> *\'(\d+)\'[^}]+}/s", $ver, $match) == 1 ) {
|
2703 |
$mageVersion = $match[1] . '.' . $match[2] . '.' . $match[3] . '.' . $match[4];
|
2704 |
$this->cartVars['dbVersion'] = $mageVersion;
|
2705 |
unset($match);
|
2709 |
$this->cartVars['orderStatus'] = $result;
|
2710 |
$this->cartVars['AdminUrl'] = (string)$config->admin->routers->adminhtml->args->frontName;
|
2711 |
|
2712 |
+
$this->setHostPort((string)$config->global->resources->default_setup->connection->host);
|
2713 |
+
$this->username = (string)$config->global->resources->default_setup->connection->username;
|
2714 |
+
$this->dbname = (string)$config->global->resources->default_setup->connection->dbname;
|
2715 |
+
$this->password = (string)$config->global->resources->default_setup->connection->password;
|
2716 |
|
2717 |
$this->imagesDir = 'media/';
|
2718 |
$this->categoriesImagesDir = $this->imagesDir . "catalog/category/";
|
2722 |
}
|
2723 |
}
|
2724 |
|
2725 |
+
/**
|
2726 |
+
* Class M1_Config_Adapter_Interspire
|
2727 |
+
*/
|
2728 |
class M1_Config_Adapter_Interspire extends M1_Config_Adapter
|
2729 |
{
|
2730 |
+
|
2731 |
+
/**
|
2732 |
+
* M1_Config_Adapter_Interspire constructor.
|
2733 |
+
*/
|
2734 |
+
public function __construct()
|
2735 |
{
|
2736 |
require_once M1_STORE_BASE_DIR . "config/config.php";
|
2737 |
|
2738 |
$this->setHostPort($GLOBALS['ISC_CFG']["dbServer"]);
|
2739 |
+
$this->username = $GLOBALS['ISC_CFG']["dbUser"];
|
2740 |
+
$this->password = $GLOBALS['ISC_CFG']["dbPass"];
|
2741 |
+
$this->dbname = $GLOBALS['ISC_CFG']["dbDatabase"];
|
2742 |
|
2743 |
$this->imagesDir = $GLOBALS['ISC_CFG']["ImageDirectory"];
|
2744 |
$this->categoriesImagesDir = $this->imagesDir;
|
2748 |
define('DEFAULT_LANGUAGE_ISO2',$GLOBALS['ISC_CFG']["Language"]);
|
2749 |
|
2750 |
$version = $this->getCartVersionFromDb("database_version", $GLOBALS['ISC_CFG']["tablePrefix"] . "config", '1');
|
2751 |
+
if ($version != '') {
|
2752 |
$this->cartVars['dbVersion'] = $version;
|
2753 |
}
|
2754 |
}
|
2755 |
}
|
2756 |
|
2757 |
+
/**
|
2758 |
+
* Class M1_Config_Adapter_Pinnacle361
|
2759 |
+
*/
|
2760 |
class M1_Config_Adapter_Pinnacle361 extends M1_Config_Adapter
|
2761 |
{
|
2762 |
+
|
2763 |
+
/**
|
2764 |
+
* M1_Config_Adapter_Pinnacle361 constructor.
|
2765 |
+
*/
|
2766 |
+
public function __construct()
|
2767 |
{
|
2768 |
include_once M1_STORE_BASE_DIR . 'content/engine/engine_config.php';
|
2769 |
|
2774 |
|
2775 |
//$this->Host = DB_HOST;
|
2776 |
$this->setHostPort(DB_HOST);
|
2777 |
+
$this->dbname = DB_NAME;
|
2778 |
+
$this->username = DB_USER;
|
2779 |
+
$this->password = DB_PASSWORD;
|
2780 |
+
|
2781 |
+
$version = $this->getCartVersionFromDb(
|
2782 |
+
"value",
|
2783 |
+
(defined('DB_PREFIX') ? DB_PREFIX : '') . "settings",
|
2784 |
+
"name = 'AppVer'"
|
2785 |
+
);
|
2786 |
+
if ($version != '') {
|
2787 |
$this->cartVars['dbVersion'] = $version;
|
2788 |
}
|
2789 |
}
|
|
|
2790 |
|
2791 |
+
}
|
2792 |
|
2793 |
|
2794 |
+
/**
|
2795 |
+
* Class M1_Config_Adapter_Oscommerce22ms2
|
2796 |
+
*/
|
2797 |
class M1_Config_Adapter_Oscommerce22ms2 extends M1_Config_Adapter
|
2798 |
{
|
2799 |
+
|
2800 |
+
/**
|
2801 |
+
* M1_Config_Adapter_Oscommerce22ms2 constructor.
|
2802 |
+
*/
|
2803 |
+
public function __construct()
|
2804 |
{
|
2805 |
+
$curDir = getcwd();
|
2806 |
|
2807 |
chdir(M1_STORE_BASE_DIR);
|
2808 |
|
2810 |
. "includes" . DIRECTORY_SEPARATOR
|
2811 |
. "configure.php";
|
2812 |
|
2813 |
+
chdir($curDir);
|
2814 |
|
2815 |
$this->imagesDir = DIR_WS_IMAGES;
|
2816 |
+
|
2817 |
$this->categoriesImagesDir = $this->imagesDir;
|
2818 |
$this->productsImagesDir = $this->imagesDir;
|
2819 |
+
if (defined('DIR_WS_PRODUCT_IMAGES') ) {
|
2820 |
$this->productsImagesDir = DIR_WS_PRODUCT_IMAGES;
|
2821 |
}
|
2822 |
+
if (defined('DIR_WS_ORIGINAL_IMAGES')) {
|
2823 |
$this->productsImagesDir = DIR_WS_ORIGINAL_IMAGES;
|
2824 |
}
|
2825 |
$this->manufacturersImagesDir = $this->imagesDir;
|
2826 |
|
2827 |
//$this->Host = DB_SERVER;
|
2828 |
$this->setHostPort(DB_SERVER);
|
2829 |
+
$this->username = DB_SERVER_USERNAME;
|
2830 |
+
$this->password = DB_SERVER_PASSWORD;
|
2831 |
+
$this->dbname = DB_DATABASE;
|
2832 |
chdir(M1_STORE_BASE_DIR);
|
2833 |
+
if (file_exists(M1_STORE_BASE_DIR . "includes" . DIRECTORY_SEPARATOR . 'application_top.php')) {
|
2834 |
$conf = file_get_contents (M1_STORE_BASE_DIR . "includes" . DIRECTORY_SEPARATOR . "application_top.php");
|
2835 |
preg_match("/define\('PROJECT_VERSION.*/", $conf, $match);
|
2836 |
if (isset($match[0]) && !empty($match[0])) {
|
2838 |
if (isset($project[0]) && !empty($project[0])) {
|
2839 |
$version = $project[0];
|
2840 |
$version = str_replace(array(" ","-","_","'",");"), "", $version);
|
2841 |
+
if ($version != '') {
|
2842 |
+
$this->cartVars['dbVersion'] = strtolower($version);
|
2843 |
+
}
|
2844 |
+
}
|
2845 |
} else {
|
2846 |
//if another oscommerce based cart
|
2847 |
+
if (file_exists(M1_STORE_BASE_DIR . "includes" . DIRECTORY_SEPARATOR . 'version.php')) {
|
2848 |
@require_once M1_STORE_BASE_DIR . "includes" . DIRECTORY_SEPARATOR . "version.php";
|
2849 |
+
if (defined('PROJECT_VERSION') && PROJECT_VERSION != '' ) {
|
2850 |
+
$version = PROJECT_VERSION;
|
2851 |
+
preg_match("/\d.*/", $version, $vers);
|
2852 |
+
if (isset($vers[0]) && !empty($vers[0])) {
|
2853 |
+
$version = $vers[0];
|
2854 |
+
$version = str_replace(array(" ","-","_"), "", $version);
|
2855 |
+
if ($version != '') {
|
2856 |
+
$this->cartVars['dbVersion'] = strtolower($version);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2857 |
}
|
2858 |
}
|
2859 |
+
//if zen_cart
|
2860 |
+
} else {
|
2861 |
+
if (defined('PROJECT_VERSION_MAJOR') && PROJECT_VERSION_MAJOR != '' ) {
|
2862 |
+
$this->cartVars['dbVersion'] = PROJECT_VERSION_MAJOR;
|
2863 |
+
}
|
2864 |
+
if (defined('PROJECT_VERSION_MINOR') && PROJECT_VERSION_MINOR != '' ) {
|
2865 |
+
$this->cartVars['dbVersion'] .= '.' . PROJECT_VERSION_MINOR;
|
2866 |
+
}
|
2867 |
+
}
|
2868 |
}
|
2869 |
}
|
2870 |
}
|
2871 |
+
chdir($curDir);
|
2872 |
}
|
2873 |
+
|
2874 |
}
|
2875 |
|
2876 |
|
2877 |
|
2878 |
+
/**
|
2879 |
+
* Class M1_Config_Adapter_Tomatocart
|
2880 |
+
*/
|
2881 |
class M1_Config_Adapter_Tomatocart extends M1_Config_Adapter
|
2882 |
{
|
2883 |
+
|
2884 |
+
/**
|
2885 |
+
* M1_Config_Adapter_Tomatocart constructor.
|
2886 |
+
*/
|
2887 |
+
public function __construct()
|
2888 |
{
|
2889 |
$config = file_get_contents(M1_STORE_BASE_DIR . "includes/configure.php");
|
2890 |
preg_match("/define\(\'DB_DATABASE\', \'(.+)\'\);/", $config, $match);
|
2891 |
+
$this->dbname = $match[1];
|
2892 |
preg_match("/define\(\'DB_SERVER_USERNAME\', \'(.+)\'\);/", $config, $match);
|
2893 |
+
$this->username = $match[1];
|
2894 |
preg_match("/define\(\'DB_SERVER_PASSWORD\', \'(.*)\'\);/", $config, $match);
|
2895 |
+
$this->password = $match[1];
|
2896 |
preg_match("/define\(\'DB_SERVER\', \'(.+)\'\);/", $config, $match);
|
2897 |
$this->setHostPort( $match[1] );
|
2898 |
|
2902 |
$this->categoriesImagesDir = $this->imagesDir.'categories/';
|
2903 |
$this->productsImagesDir = $this->imagesDir.'products/';
|
2904 |
$this->manufacturersImagesDir = $this->imagesDir . 'manufacturers/';
|
2905 |
+
if (file_exists(M1_STORE_BASE_DIR . "includes" . DIRECTORY_SEPARATOR . 'application_top.php')) {
|
2906 |
$conf = file_get_contents (M1_STORE_BASE_DIR . "includes" . DIRECTORY_SEPARATOR . "application_top.php");
|
2907 |
preg_match("/define\('PROJECT_VERSION.*/", $conf, $match);
|
2908 |
|
2917 |
}
|
2918 |
} else {
|
2919 |
//if another version
|
2920 |
+
if (file_exists(M1_STORE_BASE_DIR . "includes" . DIRECTORY_SEPARATOR . 'version.php')) {
|
2921 |
@require_once M1_STORE_BASE_DIR . "includes" . DIRECTORY_SEPARATOR . "version.php";
|
2922 |
if (defined('PROJECT_VERSION') && PROJECT_VERSION != '' ) {
|
2923 |
$version = PROJECT_VERSION;
|
2934 |
}
|
2935 |
}
|
2936 |
}
|
2937 |
+
|
2938 |
}
|
2939 |
|
2940 |
|
2941 |
|
2942 |
+
/**
|
2943 |
+
* Class M1_Config_Adapter_Sunshop4
|
2944 |
+
*/
|
2945 |
class M1_Config_Adapter_Sunshop4 extends M1_Config_Adapter
|
2946 |
{
|
2947 |
+
|
2948 |
+
/**
|
2949 |
+
* M1_Config_Adapter_Sunshop4 constructor.
|
2950 |
+
*/
|
2951 |
+
public function __construct()
|
2952 |
{
|
2953 |
@require_once M1_STORE_BASE_DIR
|
2954 |
. "include" . DIRECTORY_SEPARATOR
|
2960 |
$this->productsImagesDir = $this->imagesDir;
|
2961 |
$this->manufacturersImagesDir = $this->imagesDir;
|
2962 |
|
2963 |
+
if (defined('ADMIN_DIR')) {
|
2964 |
$this->cartVars['AdminUrl'] = ADMIN_DIR;
|
2965 |
}
|
2966 |
|
2967 |
$this->setHostPort($servername);
|
2968 |
+
$this->username = $dbusername;
|
2969 |
+
$this->password = $dbpassword;
|
2970 |
+
$this->dbname = $dbname;
|
2971 |
|
2972 |
if (isset($dbprefix)) {
|
2973 |
+
$this->tblPrefix = $dbprefix;
|
2974 |
}
|
2975 |
|
2976 |
$version = $this->getCartVersionFromDb("value", "settings", "name = 'version'");
|
2977 |
+
if ($version != '') {
|
2978 |
$this->cartVars['dbVersion'] = $version;
|
2979 |
}
|
|
|
2980 |
}
|
2981 |
+
|
2982 |
}
|
2983 |
|
2984 |
|
2985 |
|
2986 |
+
/**
|
2987 |
+
* Class miSettings
|
2988 |
+
*/
|
2989 |
class miSettings {
|
|
|
2990 |
|
2991 |
+
protected $_arr;
|
2992 |
+
|
2993 |
+
/**
|
2994 |
+
* @return miSettings|null
|
2995 |
+
*/
|
2996 |
+
public function singleton()
|
2997 |
+
{
|
2998 |
static $instance = null;
|
2999 |
+
if ($instance == null) {
|
3000 |
$instance = new miSettings();
|
3001 |
}
|
3002 |
return $instance;
|
3003 |
}
|
3004 |
|
3005 |
+
/**
|
3006 |
+
* @param $arr
|
3007 |
+
*/
|
3008 |
+
public function setArray($arr)
|
3009 |
{
|
3010 |
+
$this->_arr[] = $arr;
|
3011 |
}
|
3012 |
|
3013 |
+
/**
|
3014 |
+
* @return mixed
|
3015 |
+
*/
|
3016 |
+
public function getArray()
|
3017 |
{
|
3018 |
+
return $this->_arr;
|
3019 |
}
|
3020 |
|
3021 |
}
|
3022 |
|
3023 |
+
/**
|
3024 |
+
* Class M1_Config_Adapter_Summercart3
|
3025 |
+
*/
|
3026 |
class M1_Config_Adapter_Summercart3 extends M1_Config_Adapter
|
3027 |
{
|
3028 |
+
|
3029 |
+
/**
|
3030 |
+
* M1_Config_Adapter_Summercart3 constructor.
|
3031 |
+
*/
|
3032 |
+
public function __construct()
|
3033 |
{
|
3034 |
@include_once M1_STORE_BASE_DIR . "include/miphpf/Config.php";
|
3035 |
|
3036 |
+
$miSettings = new miSettings();
|
3037 |
+
$instance = $miSettings->singleton();
|
3038 |
|
3039 |
$data = $instance->getArray();
|
3040 |
|
3041 |
$this->setHostPort($data[0]['MI_DEFAULT_DB_HOST']);
|
3042 |
+
$this->dbname = $data[0]['MI_DEFAULT_DB_NAME'];
|
3043 |
+
$this->username = $data[0]['MI_DEFAULT_DB_USER'];
|
3044 |
+
$this->password = $data[0]['MI_DEFAULT_DB_PASS'];
|
3045 |
$this->imagesDir = "/userfiles/";
|
3046 |
|
3047 |
$this->categoriesImagesDir = $this->imagesDir . "categoryimages";
|
3048 |
$this->productsImagesDir = $this->imagesDir . "productimages";
|
3049 |
$this->manufacturersImagesDir = $this->imagesDir . "manufacturer";
|
3050 |
|
3051 |
+
if (file_exists(M1_STORE_BASE_DIR . "/include/VERSION")) {
|
3052 |
$indexFileContent = file_get_contents(M1_STORE_BASE_DIR . "/include/VERSION");
|
3053 |
$this->cartVars['dbVersion'] = trim($indexFileContent);
|
3054 |
}
|
|
|
3055 |
}
|
3056 |
+
|
3057 |
}
|
3058 |
|
3059 |
|
3060 |
|
3061 |
+
/**
|
3062 |
+
* Class M1_Config_Adapter_Oscommerce3
|
3063 |
+
*/
|
3064 |
class M1_Config_Adapter_Oscommerce3 extends M1_Config_Adapter
|
3065 |
{
|
3066 |
+
|
3067 |
+
/**
|
3068 |
+
* M1_Config_Adapter_Oscommerce3 constructor.
|
3069 |
+
*/
|
3070 |
+
public function __construct()
|
3071 |
{
|
3072 |
$file = M1_STORE_BASE_DIR .'/osCommerce/OM/Config/settings.ini';
|
3073 |
+
$settings = parse_ini_file($file);
|
3074 |
+
$this->imagesDir = "/public/";
|
3075 |
$this->categoriesImagesDir = $this->imagesDir."/categories";
|
3076 |
$this->productsImagesDir = $this->imagesDir."/products";
|
3077 |
$this->manufacturersImagesDir = $this->imagesDir;
|
3078 |
|
3079 |
+
$this->host = $settings['db_server'];
|
3080 |
$this->setHostPort($settings['db_server_port']);
|
3081 |
+
$this->username = $settings['db_server_username'];
|
3082 |
+
$this->password = $settings['db_server_password'];
|
3083 |
+
$this->dbname = $settings['db_database'];
|
3084 |
}
|
3085 |
+
|
3086 |
}
|
3087 |
|
3088 |
|
3089 |
|
3090 |
+
/**
|
3091 |
+
* Class M1_Config_Adapter_Prestashop15
|
3092 |
+
*/
|
3093 |
class M1_Config_Adapter_Prestashop15 extends M1_Config_Adapter
|
3094 |
{
|
3095 |
+
|
3096 |
+
/**
|
3097 |
+
* M1_Config_Adapter_Prestashop15 constructor.
|
3098 |
+
*/
|
3099 |
+
public function __construct()
|
3100 |
{
|
3101 |
$confFileOne = file_get_contents(M1_STORE_BASE_DIR . "/config/settings.inc.php");
|
3102 |
$confFileTwo = file_get_contents(M1_STORE_BASE_DIR . "/config/config.inc.php");
|
3104 |
$filesLines = array_merge(explode("\n", $confFileOne), explode("\n", $confFileTwo));
|
3105 |
|
3106 |
$execute = '$currentDir = \'\';';
|
3107 |
+
$constArray = array();
|
3108 |
$isComment = false;
|
3109 |
foreach ($filesLines as $line) {
|
3110 |
$startComment = preg_match("/^(\/\*)/", $line);
|
3124 |
}
|
3125 |
|
3126 |
if (preg_match("/^(\s*)define\(/i", $line)) {
|
3127 |
+
if ((strpos($line, '_DB_') !== false) || (strpos($line, '_PS_IMG_DIR_') !== false)
|
3128 |
+
|| (strpos($line, '_PS_VERSION_') !== false)
|
3129 |
+
) {
|
3130 |
+
$const = substr($line, strrpos($line, "'_"));
|
3131 |
+
$const = substr($const, 0, strrpos($const, ", "));
|
3132 |
+
if (!in_array($const, $constArray)) {
|
3133 |
+
$execute .= " " . $line;
|
3134 |
+
$constArray[] = $const;
|
3135 |
+
}
|
3136 |
}
|
3137 |
}
|
3138 |
}
|
3141 |
eval($execute);
|
3142 |
|
3143 |
$this->setHostPort(_DB_SERVER_);
|
3144 |
+
$this->dbname = _DB_NAME_;
|
3145 |
+
$this->username = _DB_USER_;
|
3146 |
+
$this->password = _DB_PASSWD_;
|
3147 |
|
3148 |
if (defined('_PS_IMG_DIR_') && defined('_PS_ROOT_DIR_')) {
|
3149 |
|
3150 |
+
preg_match("/(\/\w+\/)$/i", _PS_IMG_DIR_, $m);
|
3151 |
$this->imagesDir = $m[1];
|
3152 |
|
3153 |
} else {
|
3162 |
$this->cartVars['dbVersion'] = _PS_VERSION_;
|
3163 |
}
|
3164 |
}
|
|
|
3165 |
|
3166 |
+
}
|
3167 |
|
3168 |
|
3169 |
|
3170 |
+
/**
|
3171 |
+
* Class M1_Config_Adapter_Gambio
|
3172 |
+
*/
|
3173 |
class M1_Config_Adapter_Gambio extends M1_Config_Adapter
|
3174 |
{
|
3175 |
+
|
3176 |
+
/**
|
3177 |
+
* M1_Config_Adapter_Gambio constructor.
|
3178 |
+
*/
|
3179 |
+
public function __construct()
|
3180 |
{
|
3181 |
+
$curDir = getcwd();
|
3182 |
|
3183 |
chdir(M1_STORE_BASE_DIR);
|
3184 |
|
3185 |
@require_once M1_STORE_BASE_DIR . "includes/configure.php";
|
3186 |
|
3187 |
+
chdir($curDir);
|
3188 |
|
3189 |
$this->imagesDir = DIR_WS_IMAGES;
|
3190 |
|
3198 |
}
|
3199 |
$this->manufacturersImagesDir = $this->imagesDir;
|
3200 |
|
3201 |
+
$this->host = DB_SERVER;
|
3202 |
//$this->setHostPort(DB_SERVER);
|
3203 |
+
$this->username = DB_SERVER_USERNAME;
|
3204 |
+
$this->password = DB_SERVER_PASSWORD;
|
3205 |
+
$this->dbname = DB_DATABASE;
|
3206 |
|
3207 |
chdir(M1_STORE_BASE_DIR);
|
3208 |
if (file_exists(M1_STORE_BASE_DIR . "includes" . DIRECTORY_SEPARATOR . 'application_top.php')) {
|
3219 |
}
|
3220 |
} else {
|
3221 |
//if another oscommerce based cart
|
3222 |
+
if (file_exists(M1_STORE_BASE_DIR . DIRECTORY_SEPARATOR . 'version_info.php')) {
|
3223 |
@require_once M1_STORE_BASE_DIR . DIRECTORY_SEPARATOR . "version_info.php";
|
3224 |
if (defined('PROJECT_VERSION') && PROJECT_VERSION != '' ) {
|
3225 |
$version = PROJECT_VERSION;
|
3243 |
}
|
3244 |
}
|
3245 |
}
|
3246 |
+
chdir($curDir);
|
3247 |
}
|
3248 |
+
|
3249 |
}
|
3250 |
|
3251 |
|
3252 |
|
3253 |
+
/**
|
3254 |
+
* Class M1_Config_Adapter_Shopware
|
3255 |
+
*/
|
3256 |
class M1_Config_Adapter_Shopware extends M1_Config_Adapter
|
3257 |
{
|
3258 |
+
|
3259 |
+
/**
|
3260 |
+
* M1_Config_Adapter_Shopware constructor.
|
3261 |
+
*/
|
3262 |
+
public function __construct()
|
3263 |
{
|
3264 |
$configs = include(M1_STORE_BASE_DIR . "config.php");
|
3265 |
$this->setHostPort($configs['db']['host']);
|
3266 |
+
$this->username = $configs['db']['username'];
|
3267 |
+
$this->password = $configs['db']['password'];
|
3268 |
+
$this->dbname = $configs['db']['dbname'];
|
3269 |
}
|
3270 |
}
|
3271 |
|
3272 |
+
/**
|
3273 |
+
* Class M1_Config_Adapter_AceShop
|
3274 |
+
*/
|
3275 |
class M1_Config_Adapter_AceShop extends M1_Config_Adapter
|
3276 |
{
|
3277 |
+
|
3278 |
+
/**
|
3279 |
+
* M1_Config_Adapter_AceShop constructor.
|
3280 |
+
*/
|
3281 |
+
public function __construct()
|
3282 |
{
|
3283 |
require_once M1_STORE_BASE_DIR . "/configuration.php";
|
3284 |
|
3287 |
$jconfig = new JConfig();
|
3288 |
|
3289 |
$this->setHostPort($jconfig->host);
|
3290 |
+
$this->dbname = $jconfig->db;
|
3291 |
+
$this->username = $jconfig->user;
|
3292 |
+
$this->password = $jconfig->password;
|
3293 |
|
3294 |
} else {
|
3295 |
|
3296 |
$this->setHostPort($mosConfig_host);
|
3297 |
+
$this->dbname = $mosConfig_db;
|
3298 |
+
$this->username = $mosConfig_user;
|
3299 |
+
$this->password = $mosConfig_password;
|
3300 |
}
|
3301 |
|
|
|
3302 |
$this->imagesDir = "components/com_aceshop/opencart/image/";
|
3303 |
$this->categoriesImagesDir = $this->imagesDir;
|
3304 |
$this->productsImagesDir = $this->imagesDir;
|
3305 |
$this->manufacturersImagesDir = $this->imagesDir;
|
3306 |
}
|
3307 |
+
|
3308 |
}
|
3309 |
|
3310 |
|
3311 |
+
/**
|
3312 |
+
* Class M1_Config_Adapter_Cscart203
|
3313 |
+
*/
|
3314 |
class M1_Config_Adapter_Cscart203 extends M1_Config_Adapter
|
3315 |
{
|
3316 |
+
|
3317 |
+
/**
|
3318 |
+
* M1_Config_Adapter_Cscart203 constructor.
|
3319 |
+
*/
|
3320 |
+
public function __construct()
|
3321 |
{
|
3322 |
define("IN_CSCART", 1);
|
3323 |
define("CSCART_DIR", M1_STORE_BASE_DIR);
|
3330 |
defined('DIR_IMAGES') or define('DIR_IMAGES', DIR_ROOT . '/images/');
|
3331 |
|
3332 |
//For CS CART 1.3.x
|
3333 |
+
if (isset($db_host) && isset($db_name) && isset($db_user) && isset($db_password)) {
|
3334 |
$this->setHostPort($db_host);
|
3335 |
+
$this->dbname = $db_name;
|
3336 |
+
$this->username = $db_user;
|
3337 |
+
$this->password = $db_password;
|
3338 |
$this->imagesDir = str_replace(M1_STORE_BASE_DIR, '', IMAGES_STORAGE_DIR );
|
3339 |
} else {
|
3340 |
|
3341 |
$this->setHostPort($config['db_host']);
|
3342 |
+
$this->dbname = $config['db_name'];
|
3343 |
+
$this->username = $config['db_user'];
|
3344 |
+
$this->password = $config['db_password'];
|
3345 |
$this->imagesDir = str_replace(M1_STORE_BASE_DIR, '', DIR_IMAGES);
|
3346 |
}
|
3347 |
|
3349 |
$this->productsImagesDir = $this->imagesDir;
|
3350 |
$this->manufacturersImagesDir = $this->imagesDir;
|
3351 |
|
3352 |
+
if (defined('MAX_FILES_IN_DIR')) {
|
3353 |
$this->cartVars['cs_max_files_in_dir'] = MAX_FILES_IN_DIR;
|
3354 |
}
|
3355 |
|
3356 |
+
if (defined('PRODUCT_VERSION')) {
|
3357 |
$this->cartVars['dbVersion'] = PRODUCT_VERSION;
|
3358 |
}
|
3359 |
}
|
|
|
|
|
3360 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3361 |
}
|
3362 |
|
3363 |
|
3364 |
+
/**
|
3365 |
+
* Class M1_Config_Adapter_LemonStand
|
3366 |
+
*/
|
3367 |
class M1_Config_Adapter_LemonStand extends M1_Config_Adapter
|
3368 |
{
|
3369 |
+
|
3370 |
+
/**
|
3371 |
+
* M1_Config_Adapter_LemonStand constructor.
|
3372 |
+
*/
|
3373 |
+
public function __construct()
|
3374 |
{
|
3375 |
include (M1_STORE_BASE_DIR . 'phproad/system/phpr.php');
|
3376 |
include (M1_STORE_BASE_DIR . 'phproad/modules/phpr/classes/phpr_securityframework.php');
|
3377 |
|
3378 |
define('PATH_APP','');
|
3379 |
|
3380 |
+
if (phpversion() > 5) {
|
|
|
|
|
3381 |
eval ('Phpr::$config = new MockConfig();
|
3382 |
Phpr::$config->set("SECURE_CONFIG_PATH", M1_STORE_BASE_DIR . "config/config.dat");
|
3383 |
$framework = Phpr_SecurityFramework::create();');
|
3386 |
$config_content = $framework->get_config_content();
|
3387 |
|
3388 |
$this->setHostPort($config_content['mysql_params']['host']);
|
3389 |
+
$this->dbname = $config_content['mysql_params']['database'];
|
3390 |
+
$this->username = $config_content['mysql_params']['user'];
|
3391 |
+
$this->password = $config_content['mysql_params']['password'];
|
3392 |
|
3393 |
$this->categoriesImagesDir = '/uploaded/thumbnails/';
|
3394 |
$this->productsImagesDir = '/uploaded/';
|
3398 |
$this->cartVars['dbVersion'] = $version;
|
3399 |
|
3400 |
}
|
3401 |
+
|
3402 |
}
|
3403 |
|
3404 |
+
/**
|
3405 |
+
* Class MockConfig
|
3406 |
+
*/
|
3407 |
class MockConfig {
|
3408 |
+
|
3409 |
+
protected $_data = array();
|
3410 |
+
|
3411 |
+
/**
|
3412 |
+
* @param $key
|
3413 |
+
* @param $value
|
3414 |
+
*/
|
3415 |
+
public function set($key, $value)
|
3416 |
{
|
3417 |
$this->_data[$key] = $value;
|
3418 |
}
|
3419 |
+
|
3420 |
+
/**
|
3421 |
+
* @param $key
|
3422 |
+
* @param string $default
|
3423 |
+
* @return mixed|string
|
3424 |
+
*/
|
3425 |
+
public function get($key, $default = 'default')
|
3426 |
{
|
3427 |
return isset($this->_data[$key]) ? $this->_data[$key] : $default;
|
3428 |
}
|
3429 |
}
|
3430 |
|
3431 |
+
/**
|
3432 |
+
* Class M1_Config_Adapter_DrupalCommerce
|
3433 |
+
*/
|
3434 |
class M1_Config_Adapter_DrupalCommerce extends M1_Config_Adapter
|
3435 |
{
|
3436 |
|
3437 |
+
/**
|
3438 |
+
* M1_Config_Adapter_DrupalCommerce constructor.
|
3439 |
+
*/
|
3440 |
+
public function __construct()
|
3441 |
{
|
3442 |
@include_once M1_STORE_BASE_DIR . "sites/default/settings.php";
|
3443 |
|
3452 |
}
|
3453 |
|
3454 |
$this->setHostPort( $url['host'] );
|
3455 |
+
$this->dbname = ltrim( $url['database'], '/' );
|
3456 |
+
$this->username = $url['username'];
|
3457 |
+
$this->password = $url['password'];
|
3458 |
|
3459 |
$this->imagesDir = "/sites/default/files/";
|
3460 |
+
if (!file_exists(M1_STORE_BASE_DIR . $this->imagesDir)) {
|
3461 |
$this->imagesDir = "/files";
|
3462 |
}
|
3463 |
|
|
|
3464 |
$fileInfo = M1_STORE_BASE_DIR . "/sites/all/modules/commerce/commerce.info";
|
3465 |
+
if (file_exists($fileInfo)) {
|
3466 |
+
$str = file_get_contents($fileInfo);
|
3467 |
+
if (preg_match('/version\s+=\s+".+-(.+)"/', $str, $match) != 0) {
|
3468 |
$this->cartVars['dbVersion'] = $match[1];
|
3469 |
unset($match);
|
3470 |
}
|
3473 |
$this->categoriesImagesDir = $this->imagesDir;
|
3474 |
$this->productsImagesDir = $this->imagesDir;
|
3475 |
$this->manufacturersImagesDir = $this->imagesDir;
|
|
|
|
|
3476 |
}
|
3477 |
}
|
3478 |
|
3479 |
+
/**
|
3480 |
+
* Class M1_Config_Adapter_SSFree
|
3481 |
+
*/
|
3482 |
class M1_Config_Adapter_SSFree extends M1_Config_Adapter
|
3483 |
{
|
3484 |
+
|
3485 |
+
/**
|
3486 |
+
* M1_Config_Adapter_SSFree constructor.
|
3487 |
+
*/
|
3488 |
+
public function __construct()
|
3489 |
{
|
3490 |
$config = file_get_contents(M1_STORE_BASE_DIR . 'cfg/connect.inc.php');
|
3491 |
preg_match("/define\(\'DB_NAME\', \'(.+)\'\);/", $config, $match);
|
3492 |
+
$this->dbname = $match[1];
|
3493 |
preg_match("/define\(\'DB_USER\', \'(.+)\'\);/", $config, $match);
|
3494 |
+
$this->username = $match[1];
|
3495 |
preg_match("/define\(\'DB_PASS\', \'(.*)\'\);/", $config, $match);
|
3496 |
+
$this->password = $match[1];
|
3497 |
preg_match("/define\(\'DB_HOST\', \'(.+)\'\);/", $config, $match);
|
3498 |
$this->setHostPort( $match[1] );
|
3499 |
|
3522 |
|
3523 |
}
|
3524 |
|
3525 |
+
/**
|
3526 |
+
* Class M1_Config_Adapter_Zencart137
|
3527 |
+
*/
|
3528 |
class M1_Config_Adapter_Zencart137 extends M1_Config_Adapter
|
3529 |
{
|
3530 |
+
|
3531 |
+
/**
|
3532 |
+
* M1_Config_Adapter_Zencart137 constructor.
|
3533 |
+
*/
|
3534 |
+
public function __construct()
|
3535 |
{
|
3536 |
+
$curDir = getcwd();
|
3537 |
|
3538 |
chdir(M1_STORE_BASE_DIR);
|
3539 |
|
3541 |
. "includes" . DIRECTORY_SEPARATOR
|
3542 |
. "configure.php";
|
3543 |
|
3544 |
+
chdir($curDir);
|
3545 |
|
3546 |
$this->imagesDir = DIR_WS_IMAGES;
|
3547 |
+
|
3548 |
$this->categoriesImagesDir = $this->imagesDir;
|
3549 |
$this->productsImagesDir = $this->imagesDir;
|
3550 |
+
if (defined('DIR_WS_PRODUCT_IMAGES')) {
|
3551 |
$this->productsImagesDir = DIR_WS_PRODUCT_IMAGES;
|
3552 |
}
|
3553 |
+
if (defined('DIR_WS_ORIGINAL_IMAGES')) {
|
3554 |
$this->productsImagesDir = DIR_WS_ORIGINAL_IMAGES;
|
3555 |
}
|
3556 |
$this->manufacturersImagesDir = $this->imagesDir;
|
3557 |
|
3558 |
//$this->Host = DB_SERVER;
|
3559 |
$this->setHostPort(DB_SERVER);
|
3560 |
+
$this->username = DB_SERVER_USERNAME;
|
3561 |
+
$this->password = DB_SERVER_PASSWORD;
|
3562 |
+
$this->dbname = DB_DATABASE;
|
3563 |
+
if (file_exists(M1_STORE_BASE_DIR . "includes" . DIRECTORY_SEPARATOR . 'version.php')) {
|
3564 |
@require_once M1_STORE_BASE_DIR
|
3565 |
. "includes" . DIRECTORY_SEPARATOR
|
3566 |
. "version.php";
|
3573 |
$minor = EXPECTED_DATABASE_VERSION_MINOR;
|
3574 |
}
|
3575 |
|
3576 |
+
if ($major != '' && $minor != '') {
|
3577 |
$this->cartVars['dbVersion'] = $major.'.'.$minor;
|
3578 |
}
|
3579 |
|
3580 |
}
|
3581 |
}
|
3582 |
+
|
3583 |
}
|
3584 |
|
3585 |
|
3586 |
|
3587 |
+
/**
|
3588 |
+
* @package Api2cart
|
3589 |
+
* @author Babyak Roman <r.babyak@magneticone.com>
|
3590 |
+
* @license Not public license
|
3591 |
+
* @link https://www.api2cart.com
|
3592 |
+
*/
|
3593 |
|
3594 |
class M1_Config_Adapter
|
3595 |
{
|
3596 |
+
public $host = 'localhost';
|
3597 |
+
public $port = null;//"3306";
|
3598 |
+
public $username = 'root';
|
3599 |
+
public $password = '';
|
3600 |
+
public $dbname = '';
|
3601 |
+
public $tblPrefix = '';
|
3602 |
+
|
3603 |
+
public $cartType = 'Oscommerce22ms2';
|
3604 |
+
public $imagesDir = '';
|
3605 |
+
public $categoriesImagesDir = '';
|
3606 |
+
public $productsImagesDir = '';
|
3607 |
+
public $manufacturersImagesDir = '';
|
3608 |
+
public $categoriesImagesDirs = '';
|
3609 |
+
public $productsImagesDirs = '';
|
3610 |
+
public $manufacturersImagesDirs = '';
|
3611 |
+
|
3612 |
+
public $languages = array();
|
3613 |
+
public $cartVars = array();
|
3614 |
|
3615 |
+
/**
|
3616 |
+
* @return mixed
|
3617 |
+
*/
|
3618 |
+
public function create()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3619 |
{
|
|
|
|
|
|
|
|
|
3620 |
$cartType = $this->_detectCartType();
|
3621 |
$className = "M1_Config_Adapter_" . $cartType;
|
3622 |
|
3626 |
return $obj;
|
3627 |
}
|
3628 |
|
3629 |
+
/**
|
3630 |
+
* @return string
|
3631 |
+
*/
|
3632 |
+
private function _detectCartType()
|
3633 |
{
|
3634 |
// Zencart137
|
3635 |
if (file_exists(M1_STORE_BASE_DIR . "includes" . DIRECTORY_SEPARATOR . "configure.php")
|
3690 |
}
|
3691 |
|
3692 |
// Magento1212, we can be sure that PHP is >= 5.2.0
|
3693 |
+
if (file_exists(M1_STORE_BASE_DIR . 'app/etc/local.xml')
|
3694 |
+
|| @file_exists(M1_STORE_BASE_DIR . 'app/etc/env.php')
|
3695 |
+
) {
|
3696 |
return "Magento1212";
|
3697 |
}
|
3698 |
|
3720 |
return "Shopware";
|
3721 |
}
|
3722 |
|
|
|
|
|
|
|
|
|
|
|
3723 |
//LemonStand
|
3724 |
if (file_exists(M1_STORE_BASE_DIR . "boot.php")) {
|
3725 |
return "LemonStand";
|
3765 |
return "XtcommerceVeyton";
|
3766 |
}
|
3767 |
|
3768 |
+
//Woocommerce, WPecommerce
|
3769 |
+
if (file_exists(M1_STORE_BASE_DIR . 'wp-config.php') || file_exists(dirname(M1_STORE_BASE_DIR) . '/wp-config.php')
|
3770 |
+
) {
|
3771 |
+
return 'Wordpress';
|
3772 |
+
}
|
3773 |
+
|
3774 |
//Ubercart
|
3775 |
if (file_exists(M1_STORE_BASE_DIR . 'sites/default/settings.php' )) {
|
3776 |
if (file_exists( M1_STORE_BASE_DIR . '/modules/ubercart/uc_store/includes/coder_review_uc3x.inc')) {
|
3782 |
return "Ubercart";
|
3783 |
}
|
3784 |
|
3785 |
+
//XCart
|
3786 |
+
if (file_exists(M1_STORE_BASE_DIR . "config.php")) {
|
3787 |
+
return "XCart";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3788 |
}
|
3789 |
|
3790 |
//OXID e-shop
|
3814 |
die ("BRIDGE_ERROR_CONFIGURATION_NOT_FOUND");
|
3815 |
}
|
3816 |
|
3817 |
+
/**
|
3818 |
+
* @param $cartType
|
3819 |
+
* @return string
|
3820 |
+
*/
|
3821 |
+
public function getAdapterPath($cartType)
|
3822 |
{
|
3823 |
return M1_STORE_BASE_DIR . M1_BRIDGE_DIRECTORY_NAME . DIRECTORY_SEPARATOR
|
3824 |
. "app" . DIRECTORY_SEPARATOR
|
3826 |
. "config_adapter" . DIRECTORY_SEPARATOR . $cartType . ".php";
|
3827 |
}
|
3828 |
|
3829 |
+
/**
|
3830 |
+
* @param $source
|
3831 |
+
*/
|
3832 |
+
public function setHostPort($source)
|
3833 |
{
|
3834 |
$source = trim($source);
|
3835 |
|
3836 |
if ($source == '') {
|
3837 |
+
$this->host = 'localhost';
|
3838 |
return;
|
3839 |
}
|
3840 |
|
3841 |
$conf = explode(":", $source);
|
3842 |
|
3843 |
if (isset($conf[0]) && isset($conf[1])) {
|
3844 |
+
$this->host = $conf[0];
|
3845 |
+
$this->port = $conf[1];
|
3846 |
} elseif ($source[0] == '/') {
|
3847 |
+
$this->host = 'localhost';
|
3848 |
+
$this->port = $source;
|
3849 |
} else {
|
3850 |
+
$this->host = $source;
|
3851 |
}
|
3852 |
}
|
3853 |
|
3854 |
+
/**
|
3855 |
+
* @return bool|M1_Mysql|M1_Mysqli|M1_Pdo
|
3856 |
+
*/
|
3857 |
+
public function connect()
|
3858 |
{
|
3859 |
if (function_exists('mysql_connect')) {
|
3860 |
$link = new M1_Mysql($this);
|
3869 |
return $link;
|
3870 |
}
|
3871 |
|
3872 |
+
/**
|
3873 |
+
* @param $field
|
3874 |
+
* @param $tableName
|
3875 |
+
* @param $where
|
3876 |
+
* @return string
|
3877 |
+
*/
|
3878 |
+
public function getCartVersionFromDb($field, $tableName, $where)
|
3879 |
{
|
3880 |
$version = '';
|
3881 |
|
3886 |
|
3887 |
$result = $link->localQuery("
|
3888 |
SELECT " . $field . " AS version
|
3889 |
+
FROM " . $this->tblPrefix . $tableName . "
|
3890 |
WHERE " . $where
|
3891 |
);
|
3892 |
|
3898 |
}
|
3899 |
}
|
3900 |
|
3901 |
+
/**
|
3902 |
+
* @package Api2cart
|
3903 |
+
* @author Babyak Roman <r.babyak@magneticone.com>
|
3904 |
+
* @license Not public license
|
3905 |
+
* @link https://www.api2cart.com
|
3906 |
+
*/
|
3907 |
|
3908 |
class M1_Bridge
|
3909 |
{
|
3910 |
+
protected $_link = null; //mysql connection link
|
3911 |
+
public $config = null; //config adapter
|
3912 |
|
3913 |
/**
|
3914 |
* Bridge constructor
|
3915 |
*
|
3916 |
+
* M1_Bridge constructor.
|
3917 |
+
* @param $config
|
3918 |
*/
|
3919 |
+
public function __construct(M1_Config_Adapter $config)
|
3920 |
{
|
3921 |
$this->config = $config;
|
3922 |
|
3923 |
+
if ($this->getAction() != "savefile") {
|
3924 |
$this->_link = $this->config->connect();
|
3925 |
}
|
3926 |
}
|
3927 |
|
3928 |
+
/**
|
3929 |
+
* @return mixed
|
3930 |
+
*/
|
3931 |
+
public function getTablesPrefix()
|
3932 |
{
|
3933 |
+
return $this->config->tblPrefix;
|
3934 |
}
|
3935 |
|
3936 |
+
/**
|
3937 |
+
* @return null
|
3938 |
+
*/
|
3939 |
+
public function getLink()
|
3940 |
{
|
3941 |
return $this->_link;
|
3942 |
}
|
3943 |
|
3944 |
+
/**
|
3945 |
+
* @param $sql
|
3946 |
+
* @param $fetchMode
|
3947 |
+
* @return mixed
|
3948 |
+
*/
|
3949 |
+
public function query($sql, $fetchMode)
|
3950 |
{
|
3951 |
return $this->_link->query($sql, $fetchMode);
|
3952 |
}
|
3953 |
|
3954 |
+
/**
|
3955 |
+
* @return mixed|string
|
3956 |
+
*/
|
3957 |
+
private function getAction()
|
3958 |
{
|
3959 |
if (isset($_GET['action'])) {
|
3960 |
return str_replace('.', '', $_GET['action']);
|
3963 |
return '';
|
3964 |
}
|
3965 |
|
3966 |
+
public function run()
|
3967 |
{
|
3968 |
$action = $this->getAction();
|
3969 |
|
|
|
|
|
|
|
|
|
3970 |
if ($action == "checkbridge") {
|
3971 |
echo "BRIDGE_OK";
|
3972 |
return;
|
3973 |
}
|
3974 |
|
3975 |
+
if ($action != "update") {
|
3976 |
+
$this->_selfTest();
|
3977 |
+
}
|
3978 |
+
|
3979 |
if ($action == "update") {
|
3980 |
$this->_checkPossibilityUpdate();
|
3981 |
}
|
3992 |
$this->_destroy();
|
3993 |
}
|
3994 |
|
3995 |
+
/**
|
3996 |
+
* @param $dir
|
3997 |
+
* @return bool
|
3998 |
+
*/
|
3999 |
+
private function isWritable($dir)
|
4000 |
{
|
4001 |
if (!@is_dir($dir)) {
|
4002 |
return false;
|
4025 |
return true;
|
4026 |
}
|
4027 |
|
4028 |
+
private function _destroy()
|
4029 |
{
|
4030 |
$this->_link = null;
|
4031 |
}
|
4032 |
|
4033 |
+
private function _checkPossibilityUpdate()
|
4034 |
{
|
4035 |
if (!is_writable(M1_STORE_BASE_DIR . "/" . M1_BRIDGE_DIRECTORY_NAME . "/")) {
|
4036 |
die("ERROR_TRIED_TO_PERMISSION" . M1_STORE_BASE_DIR . "/" . M1_BRIDGE_DIRECTORY_NAME . "/");
|
4037 |
}
|
4038 |
|
4039 |
+
if (isset($_GET['hash']) && $_GET['hash'] === M1_TOKEN) {
|
4040 |
+
// good :)
|
4041 |
+
} else {
|
4042 |
+
die('ERROR_INVALID_TOKEN');
|
4043 |
+
}
|
4044 |
+
|
4045 |
if (!is_writable(M1_STORE_BASE_DIR . "/". M1_BRIDGE_DIRECTORY_NAME . "/bridge.php")) {
|
4046 |
die("ERROR_TRIED_TO_PERMISSION_BRIDGE_FILE" . M1_STORE_BASE_DIR . "/" . M1_BRIDGE_DIRECTORY_NAME . "/bridge.php");
|
4047 |
}
|
4048 |
}
|
4049 |
|
4050 |
+
private function _selfTest()
|
4051 |
{
|
4052 |
+
if (((!isset($_GET['storetype']) || $_GET['storetype'] == 'target') && $this->getAction() == 'checkbridge') || !isset($_GET['action'])) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4053 |
|
4054 |
if (trim($this->config->imagesDir) != "") {
|
4055 |
if (!file_exists(M1_STORE_BASE_DIR . $this->config->imagesDir) && is_writable(M1_STORE_BASE_DIR)) {
|
4059 |
}
|
4060 |
|
4061 |
if (!$this->isWritable(M1_STORE_BASE_DIR . $this->config->imagesDir)) {
|
4062 |
+
die('ERROR_NO_IMAGES_DIR '. M1_STORE_BASE_DIR . $this->config->imagesDir);
|
4063 |
}
|
4064 |
}
|
4065 |
|
4071 |
}
|
4072 |
|
4073 |
if (!$this->isWritable(M1_STORE_BASE_DIR . $this->config->categoriesImagesDir)) {
|
4074 |
+
die('ERROR_NO_IMAGES_DIR '. M1_STORE_BASE_DIR . $this->config->categoriesImagesDir);
|
4075 |
}
|
4076 |
}
|
4077 |
|
4083 |
}
|
4084 |
|
4085 |
if (!$this->isWritable(M1_STORE_BASE_DIR . $this->config->productsImagesDir)) {
|
4086 |
+
die('ERROR_NO_IMAGES_DIR '. M1_STORE_BASE_DIR . $this->config->productsImagesDir);
|
4087 |
}
|
4088 |
}
|
4089 |
|
4095 |
}
|
4096 |
|
4097 |
if (!$this->isWritable(M1_STORE_BASE_DIR . $this->config->manufacturersImagesDir)) {
|
4098 |
+
die('ERROR_NO_IMAGES_DIR ' . M1_STORE_BASE_DIR . $this->config->manufacturersImagesDir);
|
4099 |
}
|
4100 |
}
|
4101 |
}
|
4102 |
+
|
4103 |
+
if (isset($_GET['token'])) {
|
4104 |
+
if ($_GET['token'] === M1_TOKEN) {
|
4105 |
+
// good :)
|
4106 |
+
} else {
|
4107 |
+
die('ERROR_INVALID_TOKEN');
|
4108 |
+
}
|
4109 |
+
} else{
|
4110 |
+
die('BRIDGE INSTALLED.<br /> Version: ' . M1_BRIDGE_VERSION );
|
4111 |
+
}
|
4112 |
}
|
4113 |
+
|
4114 |
}
|
4115 |
|
4116 |
|
4123 |
|
4124 |
class M1_Mysql
|
4125 |
{
|
4126 |
+
public $config = null; // config adapter
|
4127 |
+
public $result = array();
|
4128 |
+
public $dataBaseHandle = null;
|
4129 |
|
4130 |
/**
|
4131 |
* mysql constructor
|
4133 |
* @param M1_Config_Adapter $config
|
4134 |
* @return M1_Mysql
|
4135 |
*/
|
4136 |
+
public function __construct($config)
|
4137 |
{
|
4138 |
$this->config = $config;
|
4139 |
}
|
4141 |
/**
|
4142 |
* @return bool|null|resource
|
4143 |
*/
|
4144 |
+
private function getDataBaseHandle()
|
4145 |
{
|
4146 |
if ($this->dataBaseHandle) {
|
4147 |
return $this->dataBaseHandle;
|
4159 |
/**
|
4160 |
* @return bool|null|resource
|
4161 |
*/
|
4162 |
+
private function connect()
|
4163 |
{
|
4164 |
$triesCount = 10;
|
4165 |
$link = null;
|
4166 |
+
$host = $this->config->host . ($this->config->port ? ':' . $this->config->port : '');
|
4167 |
+
$password = stripslashes($this->config->password);
|
4168 |
|
4169 |
while (!$link) {
|
4170 |
if (!$triesCount--) {
|
4171 |
break;
|
4172 |
}
|
4173 |
|
4174 |
+
$link = @mysql_connect($host, $this->config->username, $password);
|
4175 |
if (!$link) {
|
4176 |
sleep(5);
|
4177 |
}
|
4178 |
}
|
4179 |
|
4180 |
if ($link) {
|
4181 |
+
mysql_select_db($this->config->dbname, $link);
|
4182 |
} else {
|
4183 |
return false;
|
4184 |
}
|
4191 |
*
|
4192 |
* @return array
|
4193 |
*/
|
4194 |
+
public function localQuery($sql)
|
4195 |
{
|
4196 |
$result = array();
|
4197 |
$dataBaseHandle = $this->getDataBaseHandle();
|
4215 |
*
|
4216 |
* @return array
|
4217 |
*/
|
4218 |
+
public function query($sql, $fetchType)
|
4219 |
{
|
4220 |
$result = array(
|
4221 |
'result' => null,
|
4311 |
/**
|
4312 |
* @return int
|
4313 |
*/
|
4314 |
+
public function getLastInsertId()
|
4315 |
{
|
4316 |
return mysql_insert_id($this->dataBaseHandle);
|
4317 |
}
|
4319 |
/**
|
4320 |
* @return int
|
4321 |
*/
|
4322 |
+
public function getAffectedRows()
|
4323 |
{
|
4324 |
return mysql_affected_rows($this->dataBaseHandle);
|
4325 |
}
|
4327 |
/**
|
4328 |
* @return void
|
4329 |
*/
|
4330 |
+
public function __destruct()
|
4331 |
{
|
4332 |
if ($this->dataBaseHandle) {
|
4333 |
mysql_close($this->dataBaseHandle);
|
4335 |
|
4336 |
$this->dataBaseHandle = null;
|
4337 |
}
|
4338 |
+
|
4339 |
}
|
4340 |
|
4341 |
|
4348 |
|
4349 |
class M1_Pdo
|
4350 |
{
|
4351 |
+
public $config = null; // config adapter
|
4352 |
+
public $noResult = array('delete', 'update', 'move', 'truncate', 'insert', 'set', 'create', 'drop');
|
4353 |
+
public $dataBaseHandle = null;
|
4354 |
|
4355 |
+
private $_insertedId = 0;
|
4356 |
+
private $_affectedRows = 0;
|
4357 |
|
4358 |
/**
|
4359 |
* pdo constructor
|
4361 |
* @param M1_Config_Adapter $config configuration
|
4362 |
* @return M1_Pdo
|
4363 |
*/
|
4364 |
+
public function __construct($config)
|
4365 |
{
|
4366 |
$this->config = $config;
|
4367 |
}
|
4369 |
/**
|
4370 |
* @return bool|null|PDO
|
4371 |
*/
|
4372 |
+
private function getDataBaseHandle()
|
4373 |
{
|
4374 |
if ($this->dataBaseHandle) {
|
4375 |
return $this->dataBaseHandle;
|
4387 |
/**
|
4388 |
* @return bool|PDO
|
4389 |
*/
|
4390 |
+
private function connect()
|
4391 |
{
|
4392 |
$triesCount = 3;
|
4393 |
+
$host = $this->config->host . ($this->config->port ? ':' . $this->config->port : '');
|
4394 |
+
$password = stripslashes($this->config->password);
|
4395 |
+
$dbName = $this->config->dbname;
|
4396 |
|
4397 |
while ($triesCount) {
|
4398 |
try {
|
4399 |
+
$link = new PDO("mysql:host=$host; dbname=$dbName", $this->config->username, $password);
|
4400 |
$link->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
4401 |
|
4402 |
return $link;
|
4405 |
$triesCount--;
|
4406 |
|
4407 |
// fix invalid port
|
4408 |
+
$host = $this->config->host;
|
4409 |
}
|
4410 |
}
|
4411 |
return false;
|
4416 |
*
|
4417 |
* @return array|bool
|
4418 |
*/
|
4419 |
+
public function localQuery($sql)
|
4420 |
{
|
4421 |
$result = array();
|
4422 |
$dataBaseHandle = $this->getDataBaseHandle();
|
4442 |
*
|
4443 |
* @return array
|
4444 |
*/
|
4445 |
+
public function query($sql, $fetchType)
|
4446 |
{
|
4447 |
$result = array(
|
4448 |
'result' => null,
|
4477 |
|
4478 |
try {
|
4479 |
$res = $dataBaseHandle->query($sql);
|
4480 |
+
$this->_affectedRows = $res->rowCount();
|
4481 |
+
$this->_insertedId = $dataBaseHandle->lastInsertId();
|
4482 |
} catch (PDOException $e) {
|
4483 |
$result['message'] = '[ERROR] Mysql Query Error: ' . $e->getCode() . ', ' . $e->getMessage();
|
4484 |
return $result;
|
4510 |
/**
|
4511 |
* @return string|int
|
4512 |
*/
|
4513 |
+
public function getLastInsertId()
|
4514 |
{
|
4515 |
+
return $this->_insertedId;
|
4516 |
}
|
4517 |
|
4518 |
/**
|
4519 |
* @return int
|
4520 |
*/
|
4521 |
+
public function getAffectedRows()
|
4522 |
{
|
4523 |
+
return $this->_affectedRows;
|
4524 |
}
|
4525 |
|
4526 |
/**
|
4527 |
* @return void
|
4528 |
*/
|
4529 |
+
public function __destruct()
|
4530 |
{
|
4531 |
$this->dataBaseHandle = null;
|
4532 |
}
|
4533 |
}
|
4534 |
|
4535 |
|
4536 |
+
define('M1_BRIDGE_VERSION', '25');
|
4537 |
+
define('M1_BRIDGE_DOWNLOAD_LINK', 'https://api.api2cart.com/v1.0/bridge.download.file?update');
|
4538 |
define('M1_BRIDGE_DIRECTORY_NAME', basename(getcwd()));
|
4539 |
|
4540 |
ini_set('display_errors', 1);
|
4546 |
|
4547 |
require_once 'config.php';
|
4548 |
|
4549 |
+
/**
|
4550 |
+
* @param $array
|
4551 |
+
* @return array|string|stripslashes_array
|
4552 |
+
*/
|
4553 |
+
function stripslashes_array($array)
|
4554 |
+
{
|
4555 |
return is_array($array) ? array_map('stripslashes_array', $array) : stripslashes($array);
|
4556 |
}
|
4557 |
|
4558 |
+
function exceptions_error_handler($severity, $message, $filename, $lineno) {
|
4559 |
+
if (error_reporting() == 0) {
|
4560 |
+
return;
|
4561 |
+
}
|
4562 |
+
if (error_reporting() & $severity) {
|
4563 |
+
throw new ErrorException($message, 0, $severity, $filename, $lineno);
|
4564 |
+
}
|
4565 |
+
}
|
4566 |
+
|
4567 |
+
set_error_handler('exceptions_error_handler');
|
4568 |
+
|
4569 |
+
/**
|
4570 |
+
* @return bool|mixed|string
|
4571 |
+
*/
|
4572 |
+
function getPHPExecutable()
|
4573 |
+
{
|
4574 |
$paths = explode(PATH_SEPARATOR, getenv('PATH'));
|
4575 |
$paths[] = PHP_BINDIR;
|
4576 |
foreach ($paths as $path) {
|
4587 |
return false;
|
4588 |
}
|
4589 |
|
4590 |
+
if (!isset($_SERVER)) {
|
|
|
4591 |
$_GET = &$HTTP_GET_VARS;
|
4592 |
$_POST = &$HTTP_POST_VARS;
|
4593 |
$_ENV = &$HTTP_ENV_VARS;
|
4606 |
|
4607 |
if (isset($_SERVER['SCRIPT_FILENAME'])) {
|
4608 |
$scriptPath = $_SERVER['SCRIPT_FILENAME'];
|
4609 |
+
if (isset($_SERVER['PATH_TRANSLATED']) && $_SERVER['PATH_TRANSLATED'] != "" ) {
|
4610 |
$scriptPath = $_SERVER['PATH_TRANSLATED'];
|
4611 |
}
|
4612 |
define("M1_STORE_BASE_DIR", preg_replace('/[^\/\\\]*[\/\\\][^\/\\\]*$/', '', $scriptPath));
|
app/code/community/Webinterpret/Connector/controllers/ConfigurationController.php
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Diagnostics controller
|
5 |
+
*
|
6 |
+
* @category Webinterpret
|
7 |
+
* @package Webinterpret_Connector
|
8 |
+
* @author Webinterpret Team <info@webinterpret.com>
|
9 |
+
* @license http://opensource.org/licenses/osl-3.0.php
|
10 |
+
*/
|
11 |
+
class Webinterpret_Connector_ConfigurationController extends Mage_Core_Controller_Front_Action
|
12 |
+
{
|
13 |
+
public function indexAction()
|
14 |
+
{
|
15 |
+
try {
|
16 |
+
Webinterpret_Connector_Helper_Verifier::verifyRequestWebInterpretSignature();
|
17 |
+
|
18 |
+
if ($_GET['action'] === 'update-option') {
|
19 |
+
$this->handleUpdateOptionRequest();
|
20 |
+
}
|
21 |
+
} catch (\Exception $e) {
|
22 |
+
echo $e->getMessage();
|
23 |
+
die();
|
24 |
+
}
|
25 |
+
die();
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Update given option
|
30 |
+
*/
|
31 |
+
private function handleUpdateOptionRequest()
|
32 |
+
{
|
33 |
+
try {
|
34 |
+
if (!isset($_POST['key']) || !isset($_POST['value'])) {
|
35 |
+
throw new Exception('Please provide $key and $value to update.');
|
36 |
+
}
|
37 |
+
|
38 |
+
$key = filter_var($_POST['key'], FILTER_SANITIZE_STRING);
|
39 |
+
$value = filter_var($_POST['value'], FILTER_SANITIZE_STRING);
|
40 |
+
|
41 |
+
if (strpos($key, 'webinterpret_connector/') === 0) {
|
42 |
+
$key = substr($key, strlen('webinterpret_connector/'));
|
43 |
+
}
|
44 |
+
|
45 |
+
if (preg_match('/[^a-z_]/', $key)) {
|
46 |
+
throw new Exception('Invalid characters (only a-z and underscore are allowed)');
|
47 |
+
}
|
48 |
+
|
49 |
+
if( $key === 'public_key' ) {
|
50 |
+
$value = str_replace('\\n', "\n", $value);
|
51 |
+
}
|
52 |
+
|
53 |
+
$key = 'webinterpret_connector/'.$key;
|
54 |
+
|
55 |
+
echo 'Setting key: '.$key.' to value: '.$value.PHP_EOL;
|
56 |
+
|
57 |
+
Mage::getConfig()->saveConfig($key, $value);
|
58 |
+
Mage::getConfig()->reinit();
|
59 |
+
|
60 |
+
echo 'Setting successfully updated!'.PHP_EOL;
|
61 |
+
} catch (Exception $e) {
|
62 |
+
echo 'ERROR: '.$e->getMessage().PHP_EOL;
|
63 |
+
}
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
app/code/community/Webinterpret/Connector/controllers/DiagnosticsController.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Diagnostics controller
|
5 |
+
*
|
6 |
+
* @category Webinterpret
|
7 |
+
* @package Webinterpret_Connector
|
8 |
+
* @author Webinterpret Team <info@webinterpret.com>
|
9 |
+
* @license http://opensource.org/licenses/osl-3.0.php
|
10 |
+
*/
|
11 |
+
class Webinterpret_Connector_DiagnosticsController extends Mage_Core_Controller_Front_Action
|
12 |
+
{
|
13 |
+
public function indexAction()
|
14 |
+
{
|
15 |
+
try {
|
16 |
+
Webinterpret_Connector_Helper_Verifier::verifyRequestWebInterpretSignature();
|
17 |
+
$this->handleDiagnosticsRequest();
|
18 |
+
} catch (\Exception $e) {
|
19 |
+
echo $e->getMessage();
|
20 |
+
die();
|
21 |
+
}
|
22 |
+
die();
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Provides diagnostics information for Status API
|
27 |
+
*/
|
28 |
+
private function handleDiagnosticsRequest()
|
29 |
+
{
|
30 |
+
$statusApiConfigurator = new \WebInterpret\Toolkit\StatusApi\StatusApiConfigurator(Mage::app(), Mage::getConfig());
|
31 |
+
|
32 |
+
$statusApi = $statusApiConfigurator->getExtendedStatusApi();
|
33 |
+
|
34 |
+
$json = $statusApi->getJsonTestResults();
|
35 |
+
header('Content-Type: application/json');
|
36 |
+
header('Content-Length: '.strlen($json));
|
37 |
+
echo $json;
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
app/code/community/Webinterpret/Connector/etc/config.xml
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
<config>
|
9 |
<modules>
|
10 |
<Webinterpret_Connector>
|
11 |
-
<version>1.3.
|
12 |
</Webinterpret_Connector>
|
13 |
</modules>
|
14 |
<global>
|
@@ -64,11 +64,20 @@
|
|
64 |
</webinterpret_catalog_controller_product_init>
|
65 |
</observers>
|
66 |
</catalog_controller_product_init>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
</events>
|
68 |
<request>
|
69 |
<direct_front_name>
|
70 |
-
<webinterpret_connector
|
71 |
-
<glopal
|
72 |
</direct_front_name>
|
73 |
</request>
|
74 |
<rewrite>
|
@@ -128,20 +137,20 @@
|
|
128 |
<automatic_updates_enabled><![CDATA[1]]></automatic_updates_enabled>
|
129 |
<store_extender_enabled><![CDATA[0]]></store_extender_enabled>
|
130 |
<store_extender_url><![CDATA[https://wi-ws-store-ext.glopal.com/index.php]]></store_extender_url>
|
131 |
-
<public_key
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
<inventory_manager_url><![CDATA[https://d1f68rsmoq5ae3.cloudfront.net]]></inventory_manager_url>
|
146 |
<backend_redirector_enabled><![CDATA[0]]></backend_redirector_enabled>
|
147 |
</webinterpret_connector>
|
8 |
<config>
|
9 |
<modules>
|
10 |
<Webinterpret_Connector>
|
11 |
+
<version>1.3.4.0</version>
|
12 |
</Webinterpret_Connector>
|
13 |
</modules>
|
14 |
<global>
|
64 |
</webinterpret_catalog_controller_product_init>
|
65 |
</observers>
|
66 |
</catalog_controller_product_init>
|
67 |
+
<controller_front_init_before>
|
68 |
+
<observers>
|
69 |
+
<webinterpret_controller_front_init_before>
|
70 |
+
<type>object</type>
|
71 |
+
<class>Webinterpret_Connector_Helper_Autoloader</class>
|
72 |
+
<method>createAndRegister</method>
|
73 |
+
</webinterpret_controller_front_init_before>
|
74 |
+
</observers>
|
75 |
+
</controller_front_init_before>
|
76 |
</events>
|
77 |
<request>
|
78 |
<direct_front_name>
|
79 |
+
<webinterpret_connector/>
|
80 |
+
<glopal/>
|
81 |
</direct_front_name>
|
82 |
</request>
|
83 |
<rewrite>
|
137 |
<automatic_updates_enabled><![CDATA[1]]></automatic_updates_enabled>
|
138 |
<store_extender_enabled><![CDATA[0]]></store_extender_enabled>
|
139 |
<store_extender_url><![CDATA[https://wi-ws-store-ext.glopal.com/index.php]]></store_extender_url>
|
140 |
+
<public_key><![CDATA[-----BEGIN PUBLIC KEY-----
|
141 |
+
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA6YW1LitbxWceRjvGZnwd
|
142 |
+
h7/NH0Gbmnt+jEpC99KJuu4wPV+AyByUV3KxOwo6fUWozsts2tSgg3hgxnTEwjwF
|
143 |
+
XqFdft5pE794YLRtYnBMaMYkcAyl9nZTYimKT+fz+MfKceMIkFmvOVh8IMPjHLV+
|
144 |
+
7GOjBnrUxUl2/z/ohE9wUyxhP7Zo4HpHNDyDsHCBpANWVoRs9n5sBBb4cnBVIXBl
|
145 |
+
AJuWmf5c0NkMim6Sj5mM3fKb0vDhykU9IXIbQMn5cw5+g4Qy6ldcrXNm+M3+4JzW
|
146 |
+
XGqwtKrXbKLJTlA+H57szT4wYOBT1HGeDD9vFDOwTq2AjNN3mcOJawMbkiZ3sJG3
|
147 |
+
/rHMptZtE6ToMbdC/PW2neLcalpgclxafoSoD9byIYA3qWYN3GAEDGJa4UHIcZpv
|
148 |
+
nUxdL5qUgJAz2q/rk7blCSIRwLv85jQtArlfsdoxp3F3iaahjz9sB/VX1xZ6YOJH
|
149 |
+
uZGGd1aUimDOAgVfmqeFOvTEBQFYTpGg9W7TyMIqvfAqPUtOxDmzB6fNxPd45W3s
|
150 |
+
azayJumvfHBOs53t6fI/a52CfQ2I4jaz3eHI0hpHyZVxvsAj5NbFXBYzQ+mOoTEa
|
151 |
+
38d6cBHbci6rLRJ0PdaP6ZABz9OI3UE8VCz5n5BZEJ0QWmXmnn2YnWq8p3Si53KK
|
152 |
+
tQMgSP58oPZ6Nq6qM6KrlmkCAwEAAQ==
|
153 |
+
-----END PUBLIC KEY-----]]></public_key>
|
154 |
<inventory_manager_url><![CDATA[https://d1f68rsmoq5ae3.cloudfront.net]]></inventory_manager_url>
|
155 |
<backend_redirector_enabled><![CDATA[0]]></backend_redirector_enabled>
|
156 |
</webinterpret_connector>
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Webinterpret_Connector</name>
|
4 |
-
<version>1.3.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>
|
10 |
-
<description>
|
11 |
-
<notes
|
12 |
<authors><author><name>Webinterpret</name><user>webinterpret</user><email>info@webinterpret.com</email></author></authors>
|
13 |
-
<date>
|
14 |
-
<time>14:
|
15 |
-
<contents><target name="magecommunity"><dir><dir name="Webinterpret"><dir name="Connector"><dir><dir name="Block"><dir name="Adminhtml"><file name="Notifications.php" hash="5e1935e32f1b5d10f0b76fee427a23a6"/><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Status.php" hash="99b95c7991e91a4d4d98efdaf8007b88"/></dir></dir></dir></dir><file name="Footer.php" hash="160f03e528d7e9411e85d524919fd280"/><file name="Head.php" hash="1261ad40df9f0dc708178d78d63158d8"/><dir name="Product"><file name="View.php" hash="3b3b40108b53d326c0dcff0e45fa8407"/></dir></dir><dir name="Helper"><file name="Data.php" hash="cf4590df1618625cb6f391ea2fa855ba"/></dir><dir name="Lib"><dir name="Webinterpret"><file name="InventoryManagerClient.php" hash="d6acf256009835b2d389ffdb8abe48b8"/><file name="InventoryManagerProductInfo.php" hash="bb57591383e0422f6d053092a1e8820c"/><dir name="Toolkit"><file name="GeoIP.php" hash="04b858256cee73a321e34b1cdd81953f"/></dir></dir><file name="autoload.php" hash="38dfc2154472b80340528faa44a36522"/><dir name="composer"><file name="ClassLoader.php" hash="c67ebce5ff31e99311ceb750202adf2e"/><file name="LICENSE" hash="cfdafe5f67fbcc46c00fcb2f5b80a0cf"/><file name="autoload_classmap.php" hash="8645d3a4e3ad87e7cf4d88a46717aab4"/><file name="autoload_namespaces.php" hash="f7aec47106fe386a4d7710cee304fc7c"/><file name="autoload_psr4.php" hash="a1ee1e33d38bf972aaa8596aed6b9498"/><file name="autoload_real.php" hash="097fc6becad3c938f052e71bc46ab58a"/><dir name="ca-bundle"><file name="LICENSE" hash="783e50a8f248e56536e25b4746d035af"/><file name="README.md" hash="04096c5cd7666bbb481909761dd7d528"/><file name="composer.json" hash="719cc746e830f62c35eb73f694b02881"/><dir name="res"><file name="cacert.pem" hash="dcd698b7138230c1a9b6d04051a4fc83"/></dir><dir name="src"><file name="CaBundle.php" hash="ce2de2d0d2ac7d0035333c47f062f7f3"/></dir></dir><file name="installed.json" hash="309fa5b7f42e66abb184c0d81e0eaca9"/></dir><dir name="geoip2"><dir name="geoip2"><file name="CHANGELOG.md" hash="c93aaf66d68f404db1143ac548e72f69"/><file name="LICENSE" hash="3b83ef96387f14655fc854ddc3c6bd57"/><file name="README.md" hash="99be28bbbbf4e4e4d9ade38af2172c7b"/><file name="composer.json" hash="684eb00e319ab4b9f463712d2ea07ee2"/><dir name="src"><dir name="Compat"><file name="JsonSerializable.php" hash="b328c8968d8f6fd793da9ec8266b7ead"/></dir><dir name="Database"><file name="Reader.php" hash="69128baa625870ba775cdbce95bff033"/></dir><dir name="Exception"><file name="AddressNotFoundException.php" hash="f7b42f2f1952b78482e1cc6ae3e9c92e"/><file name="AuthenticationException.php" hash="a664ef571be82c82fa584545e66ff1fb"/><file name="GeoIp2Exception.php" hash="b14e09b853d258d93f7a0fd50e07b1d3"/><file name="HttpException.php" hash="c8129a00315622f4b2ce282096d41562"/><file name="InvalidRequestException.php" hash="79b7b13a3057e02ad573f01795bad4d3"/><file name="OutOfQueriesException.php" hash="35f4fa482a66d2e424b0f0ca9d19d390"/></dir><dir name="Model"><file name="AbstractModel.php" hash="34ef56e9aa17d1b408bcb5f48652e921"/><file name="AnonymousIp.php" hash="3c241f7efdde4dd769611f725384cc20"/><file name="City.php" hash="05f32089542682ec031911c66f457799"/><file name="ConnectionType.php" hash="202313369fa7d759d0c2f842a707cc42"/><file name="Country.php" hash="75526b5928bde78331e1cbaaf8551c30"/><file name="Domain.php" hash="8dcd1be751d401e66a8d220b0f15dca1"/><file name="Enterprise.php" hash="34fac18339d7cdff0492376a2d6ddaaf"/><file name="Insights.php" hash="1f0131cf93a2a64af5f7b1ae4c7f3a87"/><file name="Isp.php" hash="fbeb9ae86063258f363f6d2ed3e18057"/></dir><file name="ProviderInterface.php" hash="ada7808f8ef411d055c74f8e1e607930"/><dir name="Record"><file name="AbstractPlaceRecord.php" hash="746e0df11901479b60cb5dabf938cced"/><file name="AbstractRecord.php" hash="d821f2fb8a4ebd3c75f78ad82bd7a32c"/><file name="City.php" hash="54a21bf0b8984bea0091ee4e4eea9a5d"/><file name="Continent.php" hash="05ec67b54e6be3287cc3f2e439e1eaf5"/><file name="Country.php" hash="626d0e71d01876f400787be9e51ab628"/><file name="Location.php" hash="7552ff9d0f2a415bfee76f0141ffe9e2"/><file name="MaxMind.php" hash="05a43644700119689bf9940ab480b967"/><file name="Postal.php" hash="63832bd023c1c91a63c55477f14bb671"/><file name="RepresentedCountry.php" hash="9def588dc86e3302178992be480c5592"/><file name="Subdivision.php" hash="95008667190f6465669dbe6314d1e1e8"/><file name="Traits.php" hash="b70cdd26fd9a8b72e4e116c3cfef686a"/></dir><dir name="WebService"><file name="Client.php" hash="43a9140d8c9e6f52ee8369de1a6db5d8"/></dir></dir><file name=".gitmodules" hash="a1da842003e271f63f73319ab5d4e555"/></dir></dir><dir name="kriswallsmith"><dir name="buzz"><file name="CHANGELOG.md" hash="52f99dd3ede5d1ce97bf3b84597d1f69"/><file name="LICENSE" hash="8a10d9e96a9a0925ec7ebcacdd311337"/><file name="README.md" hash="901c8c869022838a7b1d5c355b678f41"/><file name="composer.json" hash="450defd5c92b8f905eb533c7b68775b7"/><dir name="examples"><file name="CookieListener.php" hash="424842bc2eee0b7bebdb9e105afe850f"/><file name="DigestAuthListener.php" hash="c4bfba70ecdd10b34174dbabda70bd38"/></dir><dir name="lib"><dir name="Buzz"><file name="Browser.php" hash="b59c3a87d43f0341ed310543e7dc8555"/><dir name="Client"><file name="AbstractClient.php" hash="f40f342282ce950321ee033e38c0f861"/><file name="AbstractCurl.php" hash="d86e03512358f4e946e623382da97afb"/><file name="AbstractStream.php" hash="f81315ba845a61eb3065eb988e32051d"/><file name="BatchClientInterface.php" hash="3216ee78dd79fab5cf54bcb94ca7cbad"/><file name="ClientInterface.php" hash="0ba9521f57320a50bc912565b45f3324"/><file name="Curl.php" hash="9208ca282da8907429e0c5ffb8a91e91"/><file name="FileGetContents.php" hash="a74d11f3053c37ad3ec74f80bb17df46"/><file name="MultiCurl.php" hash="097a75700f0781016e5b8bfa574af159"/></dir><dir name="Exception"><file name="ClientException.php" hash="2290c9bb236df1415e63ee4b50199524"/><file name="ExceptionInterface.php" hash="887286cc69d88403826f2cde0fb05d6d"/><file name="InvalidArgumentException.php" hash="40bcc515ead31256f723daa920ea970e"/><file name="LogicException.php" hash="1f93d93a6173bc3dc83071928d855a1c"/><file name="RequestException.php" hash="603c99142aa41fb69373c46d0c4d5eff"/><file name="RuntimeException.php" hash="2a5c17331eb1b01dcf82138668f149fb"/></dir><dir name="Listener"><file name="BasicAuthListener.php" hash="a01fae7d3a226d7b4c4a213cf2784ea4"/><file name="CallbackListener.php" hash="2b80a85e1dd5905bab79af7dc851d780"/><file name="CookieListener.php" hash="f2d400cbe1973e0bf2e70d233c71976e"/><file name="DigestAuthListener.php" hash="4205ee1295ae9e6046187b2a05436378"/><dir name="History"><file name="Entry.php" hash="e21f16b7547b4571f8325f8e2d1a0a32"/><file name="Journal.php" hash="4a7382bf0aa15400795dad3bcc0b3a0b"/></dir><file name="HistoryListener.php" hash="c20a2823330ad1c62c1e00d666062feb"/><file name="ListenerChain.php" hash="a19636acd50c32e7f1f3e74f70fa1c04"/><file name="ListenerInterface.php" hash="843663d54fc7362a9ff1aa79a8bc0503"/><file name="LoggerListener.php" hash="a1848cf1541d6c573ac17f216b6113e4"/></dir><dir name="Message"><file name="AbstractMessage.php" hash="d26608e2edb470f57c315005885bb359"/><dir name="Factory"><file name="Factory.php" hash="5cf89875f6796df4df08926b5f1006ad"/><file name="FactoryInterface.php" hash="96293478c30ce7ab5f6c8e1385d839db"/></dir><dir name="Form"><file name="FormRequest.php" hash="cd16d45436dab763aa8026e5adc43e7f"/><file name="FormRequestInterface.php" hash="57147f32a199d34858494aa9e935046e"/><file name="FormUpload.php" hash="5ad3c1fc47ea6d222915944b39bf46b2"/><file name="FormUploadInterface.php" hash="e654b096b82b5a4275489492387f568b"/></dir><file name="MessageInterface.php" hash="bd99826f8e2c9d1a1b0c65a5eb997e9e"/><file name="Request.php" hash="a1342c3ea578ddefa2b120814ba8bf80"/><file name="RequestInterface.php" hash="2b0fe4438cfc90c017389b191c94652b"/><file name="Response.php" hash="f4ffe4a64514548b0beb621a3d9f0089"/></dir><dir name="Util"><file name="Cookie.php" hash="1d42f5324611c19e8a6ea5c2cb6eb9f2"/><file name="CookieJar.php" hash="a3a92e31e139f797445e6be14c32e155"/><file name="Url.php" hash="888ec065b1a992dd2e8062bd7ba9e679"/></dir></dir></dir><file name="phpunit.xml.dist" hash="188b17738bbcd66e1fd408b454243572"/><dir name="test"><dir name="Buzz"><dir name="Test"><file name="BrowserTest.php" hash="e813cb5807345aff24698449f1ae5be9"/><dir name="Client"><file name="AbstractStreamTest.php" hash="e7b47d0fe24b7149c62ac736177d203d"/><file name="ClientTest.php" hash="8a14503e884cdf9b5e833b5206be61a4"/><file name="FunctionalTest.php" hash="0f069b79b734fb2efbde5f276d6ce37a"/></dir><dir name="Listener"><file name="BasicAuthListenerTest.php" hash="ae5c0fd244f7743d81080118b42dc73c"/><file name="CallbackListenerTest.php" hash="07d0e399b18e0cdd69aa66bf62bcbadc"/><file name="DigestAuthListenerTest.php" hash="595dbd612d2f1fde1264f738d1ed2c1e"/><dir name="History"><file name="EntryTest.php" hash="b7c001167cc0131c399e071538a66cb7"/><file name="JournalTest.php" hash="4111eb643fbcb05129dded0067aeefa7"/></dir><file name="HistoryListenerTest.php" hash="9953cad9320b6c78ce477532d454b3af"/><file name="ListenerChainTest.php" hash="ff5b9727f91f7a9da2d322d5a97deddb"/><file name="LoggerListenerTest.php" hash="7e40e0735e7dac71bcd9119c7a3c2e56"/></dir><dir name="Message"><file name="AbstractMessageTest.php" hash="90d531511705842c573b28f4c8fb5d68"/><file name="FactoryTest.php" hash="ced832a48cbc0d9e288136c1ff77d075"/><dir name="Fixtures"><file name="google.png" hash="169e859db7f28a01e1b51e1c9e2d6b2b"/></dir><file name="FormRequestTest.php" hash="a2ffa5131fd015f512b4a27c346d5657"/><file name="FormUploadTest.php" hash="34879f48bef94f8e33da964873cab449"/><file name="RequestTest.php" hash="e317c4e28a35a1aaebb7bec68cfe896c"/><file name="ResponseTest.php" hash="579841f50c45431092ca535aefbd9dc8"/></dir><dir name="Util"><file name="CookieJarTest.php" hash="79ee72e90586bc4be15b609c62b6db40"/><file name="CookieTest.php" hash="52f9472651d7cd7933fe5cf91daff218"/><file name="UrlTest.php" hash="2161e86caf2c229e63be62b555375054"/></dir></dir></dir><dir name="etc"><file name="nginx.conf" hash="db731e2d76cb867039bbc90014ba6476"/><file name="squid.conf" hash="77d3d02b7f2d73d6330a207b579785e7"/></dir><file name="server.php" hash="479689cf2fe15407f6280e83160b0277"/></dir><file name=".gitignore" hash="f7d5a75baf3a1beeb22243dd7ef578bd"/><file name=".travis.yml" hash="1b91a4fa3e3b4cc60d31f5f0eddb7e79"/></dir></dir><dir name="maxmind"><dir name="web-service-common"><file name="CHANGELOG.md" hash="7f2f05525acaaf52f3771f0129676e4a"/><file name="LICENSE" hash="3b83ef96387f14655fc854ddc3c6bd57"/><file name="README.md" hash="37316c741db7f5ae8dc1eaff4a045bd8"/><file name="composer.json" hash="ec42bb19ef5ba2b22192e89f3bd7b1ce"/><dir name="src"><dir name="Exception"><file name="AuthenticationException.php" hash="a1fdcba6decc96345545f4f10287e162"/><file name="HttpException.php" hash="6579aa42001dbe77ca3e8d1e51aac3d2"/><file name="InsufficientFundsException.php" hash="14886d684f1be0b4b28a66f4b22e490f"/><file name="InvalidInputException.php" hash="72dc20089eb4a5cfaccafe6e2b17a36e"/><file name="InvalidRequestException.php" hash="b55c1b8b30715dc40416be8c1ce3bd61"/><file name="IpAddressNotFoundException.php" hash="16313ab0d82195477e1ba071e7696313"/><file name="PermissionRequiredException.php" hash="f832cea2f10902ae2ffa4521e13c73d1"/><file name="WebServiceException.php" hash="6882e0d113e22478202f99caf306bde9"/></dir><dir name="WebService"><file name="Client.php" hash="6253acd40102faead6d8750f5467d420"/><dir name="Http"><file name="CurlRequest.php" hash="da8ba5cf09aea35ee6a69c074d70f3f8"/><file name="Request.php" hash="b493bca240735584dd610eadf2372880"/><file name="RequestFactory.php" hash="5c41aa383b7be71773fa2b68c0ad4e6e"/></dir></dir></dir></dir></dir><dir name="maxmind-db"><dir name="reader"><file name="CHANGELOG.md" hash="6e0348104ab013c82482394c0d10322e"/><file name="LICENSE" hash="3b83ef96387f14655fc854ddc3c6bd57"/><file name="README.md" hash="4d6518a9c5916e04e55cd394f0f39424"/><file name="composer.json" hash="0a95937043bf1924fb18f70ba453122a"/><dir name="ext"><file name="config.m4" hash="e6d700d321e152a73797148a486c449d"/><file name="maxminddb.c" hash="0ac67b9330fa433be129f77c2b9622c6"/><file name="php_maxminddb.h" hash="312cbe9b3aa017e727b52d421475b7fa"/><dir name="tests"><file name="001-load.phpt" hash="86ba1adc502540b42cbb1ef2fe5cfd67"/></dir></dir><dir name="src"><dir name="MaxMind"><dir name="Db"><dir name="Reader"><file name="Decoder.php" hash="ac9cc72ca5d65bf0e2bc26254d2e08e6"/><file name="InvalidDatabaseException.php" hash="30a5d8369ea2012e747ac1e59f78c76f"/><file name="Metadata.php" hash="643d939699d39a80c3a8c3adb19ee9e7"/><file name="Util.php" hash="92c382f8642000eef497745ec9bf2e91"/></dir><file name="Reader.php" hash="dd648dd18ea4df0c8ff6eabee28ddf57"/></dir></dir></dir></dir></dir></dir><dir name="Model"><file name="BackendRedirector.php" hash="76adbcd50fc8b71758428ef57eca6ce6"/><file name="Notification.php" hash="a62c3b7ff11cd2d1082c0d959d8eb295"/><file name="Observer.php" hash="d3973d8acb54217d98d86c2b81fe3d3a"/><file name="StoreExtender.php" hash="316db9a49ce8c22edf44648f2fa7baa6"/></dir><dir name="bridge2cart"><file name="bridge.php" hash="cdd197a1af1a05082a8836ea24922dad"/><file name="config.php" hash="0fb8e12c8d9c293354eb4fb96a713608"/><file name="helper.php" hash="afb5e2141259c580285ac85d0c180144"/><file name="preloader.php" hash="8a8ada3537394687defdc28d4b6077e8"/></dir><dir name="controllers"><file name="HelperController.php" hash="73fb01f035db7d75eb1ee0a3d535fd0b"/><file name="IndexController.php" hash="a76fb36d3f6fa4c370b766ed9ba818ed"/></dir><dir name="etc"><file name="adminhtml.xml" hash="07e287503c40ce7c588efe7863c05002"/><file name="config.xml" hash="6888483e83a492a280fbc6b381c35ec0"/><file name="system.xml" hash="cfe59ca34ebfef69b900f4ad275a809a"/></dir><dir name="resources"><dir name="geoip"><file name="COPYRIGHT.txt" hash="37e1c6f4fc26ec1993d127575029c079"/><file name="GeoIP2-Country.mmdb" hash="33a191481c2840aa2ad482d00773d6b5"/><file name="LICENSE.txt" hash="46fce10ea30c7c62dbf39fc979604d68"/></dir></dir></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="webinterpret"><file name="connector.xml" hash="867fafe49fa978668f6e5d7027c57aa6"/></dir></dir><dir name="template"><dir name="webinterpret"><dir name="system"><dir name="config"><file name="activate.phtml" hash="5ef389ad58cb1be9cc666fecd8379fbf"/><dir name="fieldset"><file name="banner.phtml" hash="921b677bd3e52d9c86172bdf26ab4a37"/><file name="status.phtml" hash="412bd1ea314a7f0c8897e6a9225c3551"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="webinterpret"><file name="connector.xml" hash="1226a298ca08a92008293ba4e8c09eab"/></dir></dir><dir name="template"><dir name="webinterpret"><dir name="connector"><file name="footer.phtml" hash="bd48d0e36dea0936b9f28fbdada3b8c1"/><file name="head.phtml" hash="107312871a7b2730532db8d986de5726"/><file name="product_view.phtml" hash="2036bc444284b99f4cc8228fa4751777"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Webinterpret_Connector.xml" hash="087c2742f6bcb89ed6a77921e6493feb"/></dir></target><target name="magelocale"><dir><dir name="de_DE"><file name="Webinterpret_Connector.csv" hash="91312fd3bd2645b88e3b3643b6b614a9"/></dir><dir name="en_US"><file name="Webinterpret_Connector.csv" hash="c382db753974630198cf029cf90b5d27"/></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
-
<dependencies><required><php><min>5.3.2</min><max>7.0.
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Webinterpret_Connector</name>
|
4 |
+
<version>1.3.4.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>Webinterpret integration for Magento</summary>
|
10 |
+
<description>Boost your international sales in just a few clicks with Webinterpret.</description>
|
11 |
+
<notes>Updated bridge.</notes>
|
12 |
<authors><author><name>Webinterpret</name><user>webinterpret</user><email>info@webinterpret.com</email></author></authors>
|
13 |
+
<date>2017-01-30</date>
|
14 |
+
<time>14:52:10</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Webinterpret"><dir name="Connector"><dir name="Block"><dir name="Adminhtml"><file name="Notifications.php" hash="5e1935e32f1b5d10f0b76fee427a23a6"/><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Status.php" hash="99b95c7991e91a4d4d98efdaf8007b88"/></dir></dir></dir></dir><file name="Footer.php" hash="160f03e528d7e9411e85d524919fd280"/><file name="Head.php" hash="1261ad40df9f0dc708178d78d63158d8"/><dir name="Product"><file name="View.php" hash="3b3b40108b53d326c0dcff0e45fa8407"/></dir></dir><dir name="Helper"><file name="Autoloader.php" hash="5d052e0b234a1a2177303a37368aa9e4"/><file name="Data.php" hash="af7805660b1760a61c7c9fc587d87dc1"/><file name="Verifier.php" hash="60de45131e5cf01e03209d3615355a5f"/></dir><dir name="Lib"><dir name="Webinterpret"><file name="InventoryManagerClient.php" hash="d6acf256009835b2d389ffdb8abe48b8"/><file name="InventoryManagerProductInfo.php" hash="bb57591383e0422f6d053092a1e8820c"/><dir name="Toolkit"><file name="GeoIP.php" hash="04b858256cee73a321e34b1cdd81953f"/><dir name="StatusApi"><file name="AbstractStatusApiDiagnostics.php" hash="fd864ccc4073b1b439b7c61ac43d7956"/><file name="PlatformDiagnostics.php" hash="7e7689f82ffa38272693c2dc5d2d91d1"/><file name="PluginDiagnostics.php" hash="7dbf2e7e965a4ca1cfdc17b339196f53"/><file name="StatusApi.php" hash="763aba8683f38f1c7c1e17c4691bccbc"/><file name="StatusApiConfigurator.php" hash="08b0d62ecd063baa1922452ae23ead18"/><file name="SystemDiagnostics.php" hash="70df1d00c80e7962277e832c26e256fc"/></dir></dir></dir><file name="autoload.php" hash="ae17a894afd28e9ef91eb2e430ad884b"/><dir name="composer"><file name="ClassLoader.php" hash="bf6c4758ae060fd8f3e3a88e6c24ac3c"/><file name="LICENSE" hash="9b01fc9e0129adc080344653fbcbbc0f"/><file name="autoload_classmap.php" hash="8645d3a4e3ad87e7cf4d88a46717aab4"/><file name="autoload_namespaces.php" hash="f7aec47106fe386a4d7710cee304fc7c"/><file name="autoload_psr4.php" hash="a1ee1e33d38bf972aaa8596aed6b9498"/><file name="autoload_real.php" hash="8fd33316d33709ccfdccc2a34b91b217"/><file name="autoload_static.php" hash="916d2bc47eff30560b4e5689efa5e2c5"/><dir name="ca-bundle"><file name="LICENSE" hash="783e50a8f248e56536e25b4746d035af"/><file name="README.md" hash="04096c5cd7666bbb481909761dd7d528"/><file name="composer.json" hash="719cc746e830f62c35eb73f694b02881"/><dir name="res"><file name="cacert.pem" hash="dcd698b7138230c1a9b6d04051a4fc83"/></dir><dir name="src"><file name="CaBundle.php" hash="ce2de2d0d2ac7d0035333c47f062f7f3"/></dir></dir><file name="installed.json" hash="4ca2f315c4edd0ad95ace90fc714ddc1"/></dir><dir name="geoip2"><dir name="geoip2"><file name="CHANGELOG.md" hash="c93aaf66d68f404db1143ac548e72f69"/><file name="LICENSE" hash="3b83ef96387f14655fc854ddc3c6bd57"/><file name="README.md" hash="99be28bbbbf4e4e4d9ade38af2172c7b"/><file name="composer.json" hash="684eb00e319ab4b9f463712d2ea07ee2"/><dir name="src"><dir name="Compat"><file name="JsonSerializable.php" hash="b328c8968d8f6fd793da9ec8266b7ead"/></dir><dir name="Database"><file name="Reader.php" hash="69128baa625870ba775cdbce95bff033"/></dir><dir name="Exception"><file name="AddressNotFoundException.php" hash="f7b42f2f1952b78482e1cc6ae3e9c92e"/><file name="AuthenticationException.php" hash="a664ef571be82c82fa584545e66ff1fb"/><file name="GeoIp2Exception.php" hash="b14e09b853d258d93f7a0fd50e07b1d3"/><file name="HttpException.php" hash="c8129a00315622f4b2ce282096d41562"/><file name="InvalidRequestException.php" hash="79b7b13a3057e02ad573f01795bad4d3"/><file name="OutOfQueriesException.php" hash="35f4fa482a66d2e424b0f0ca9d19d390"/></dir><dir name="Model"><file name="AbstractModel.php" hash="34ef56e9aa17d1b408bcb5f48652e921"/><file name="AnonymousIp.php" hash="3c241f7efdde4dd769611f725384cc20"/><file name="City.php" hash="05f32089542682ec031911c66f457799"/><file name="ConnectionType.php" hash="202313369fa7d759d0c2f842a707cc42"/><file name="Country.php" hash="75526b5928bde78331e1cbaaf8551c30"/><file name="Domain.php" hash="8dcd1be751d401e66a8d220b0f15dca1"/><file name="Enterprise.php" hash="34fac18339d7cdff0492376a2d6ddaaf"/><file name="Insights.php" hash="1f0131cf93a2a64af5f7b1ae4c7f3a87"/><file name="Isp.php" hash="fbeb9ae86063258f363f6d2ed3e18057"/></dir><file name="ProviderInterface.php" hash="ada7808f8ef411d055c74f8e1e607930"/><dir name="Record"><file name="AbstractPlaceRecord.php" hash="746e0df11901479b60cb5dabf938cced"/><file name="AbstractRecord.php" hash="d821f2fb8a4ebd3c75f78ad82bd7a32c"/><file name="City.php" hash="54a21bf0b8984bea0091ee4e4eea9a5d"/><file name="Continent.php" hash="05ec67b54e6be3287cc3f2e439e1eaf5"/><file name="Country.php" hash="626d0e71d01876f400787be9e51ab628"/><file name="Location.php" hash="7552ff9d0f2a415bfee76f0141ffe9e2"/><file name="MaxMind.php" hash="05a43644700119689bf9940ab480b967"/><file name="Postal.php" hash="63832bd023c1c91a63c55477f14bb671"/><file name="RepresentedCountry.php" hash="9def588dc86e3302178992be480c5592"/><file name="Subdivision.php" hash="95008667190f6465669dbe6314d1e1e8"/><file name="Traits.php" hash="b70cdd26fd9a8b72e4e116c3cfef686a"/></dir><dir name="WebService"><file name="Client.php" hash="43a9140d8c9e6f52ee8369de1a6db5d8"/></dir></dir><file name=".gitmodules" hash="a1da842003e271f63f73319ab5d4e555"/></dir></dir><dir name="kriswallsmith"><dir name="buzz"><file name="CHANGELOG.md" hash="52f99dd3ede5d1ce97bf3b84597d1f69"/><file name="LICENSE" hash="8a10d9e96a9a0925ec7ebcacdd311337"/><file name="README.md" hash="901c8c869022838a7b1d5c355b678f41"/><file name="composer.json" hash="450defd5c92b8f905eb533c7b68775b7"/><dir name="examples"><file name="CookieListener.php" hash="424842bc2eee0b7bebdb9e105afe850f"/><file name="DigestAuthListener.php" hash="c4bfba70ecdd10b34174dbabda70bd38"/></dir><dir name="lib"><dir name="Buzz"><file name="Browser.php" hash="b59c3a87d43f0341ed310543e7dc8555"/><dir name="Client"><file name="AbstractClient.php" hash="f40f342282ce950321ee033e38c0f861"/><file name="AbstractCurl.php" hash="d86e03512358f4e946e623382da97afb"/><file name="AbstractStream.php" hash="f81315ba845a61eb3065eb988e32051d"/><file name="BatchClientInterface.php" hash="3216ee78dd79fab5cf54bcb94ca7cbad"/><file name="ClientInterface.php" hash="0ba9521f57320a50bc912565b45f3324"/><file name="Curl.php" hash="9208ca282da8907429e0c5ffb8a91e91"/><file name="FileGetContents.php" hash="a74d11f3053c37ad3ec74f80bb17df46"/><file name="MultiCurl.php" hash="097a75700f0781016e5b8bfa574af159"/></dir><dir name="Exception"><file name="ClientException.php" hash="2290c9bb236df1415e63ee4b50199524"/><file name="ExceptionInterface.php" hash="887286cc69d88403826f2cde0fb05d6d"/><file name="InvalidArgumentException.php" hash="40bcc515ead31256f723daa920ea970e"/><file name="LogicException.php" hash="1f93d93a6173bc3dc83071928d855a1c"/><file name="RequestException.php" hash="603c99142aa41fb69373c46d0c4d5eff"/><file name="RuntimeException.php" hash="2a5c17331eb1b01dcf82138668f149fb"/></dir><dir name="Listener"><file name="BasicAuthListener.php" hash="a01fae7d3a226d7b4c4a213cf2784ea4"/><file name="CallbackListener.php" hash="2b80a85e1dd5905bab79af7dc851d780"/><file name="CookieListener.php" hash="f2d400cbe1973e0bf2e70d233c71976e"/><file name="DigestAuthListener.php" hash="4205ee1295ae9e6046187b2a05436378"/><dir name="History"><file name="Entry.php" hash="e21f16b7547b4571f8325f8e2d1a0a32"/><file name="Journal.php" hash="4a7382bf0aa15400795dad3bcc0b3a0b"/></dir><file name="HistoryListener.php" hash="c20a2823330ad1c62c1e00d666062feb"/><file name="ListenerChain.php" hash="a19636acd50c32e7f1f3e74f70fa1c04"/><file name="ListenerInterface.php" hash="843663d54fc7362a9ff1aa79a8bc0503"/><file name="LoggerListener.php" hash="a1848cf1541d6c573ac17f216b6113e4"/></dir><dir name="Message"><file name="AbstractMessage.php" hash="d26608e2edb470f57c315005885bb359"/><dir name="Factory"><file name="Factory.php" hash="5cf89875f6796df4df08926b5f1006ad"/><file name="FactoryInterface.php" hash="96293478c30ce7ab5f6c8e1385d839db"/></dir><dir name="Form"><file name="FormRequest.php" hash="cd16d45436dab763aa8026e5adc43e7f"/><file name="FormRequestInterface.php" hash="57147f32a199d34858494aa9e935046e"/><file name="FormUpload.php" hash="5ad3c1fc47ea6d222915944b39bf46b2"/><file name="FormUploadInterface.php" hash="e654b096b82b5a4275489492387f568b"/></dir><file name="MessageInterface.php" hash="bd99826f8e2c9d1a1b0c65a5eb997e9e"/><file name="Request.php" hash="a1342c3ea578ddefa2b120814ba8bf80"/><file name="RequestInterface.php" hash="2b0fe4438cfc90c017389b191c94652b"/><file name="Response.php" hash="f4ffe4a64514548b0beb621a3d9f0089"/></dir><dir name="Util"><file name="Cookie.php" hash="1d42f5324611c19e8a6ea5c2cb6eb9f2"/><file name="CookieJar.php" hash="a3a92e31e139f797445e6be14c32e155"/><file name="Url.php" hash="888ec065b1a992dd2e8062bd7ba9e679"/></dir></dir></dir><file name="phpunit.xml.dist" hash="188b17738bbcd66e1fd408b454243572"/><dir name="test"><dir name="Buzz"><dir name="Test"><file name="BrowserTest.php" hash="e813cb5807345aff24698449f1ae5be9"/><dir name="Client"><file name="AbstractStreamTest.php" hash="e7b47d0fe24b7149c62ac736177d203d"/><file name="ClientTest.php" hash="8a14503e884cdf9b5e833b5206be61a4"/><file name="FunctionalTest.php" hash="0f069b79b734fb2efbde5f276d6ce37a"/></dir><dir name="Listener"><file name="BasicAuthListenerTest.php" hash="ae5c0fd244f7743d81080118b42dc73c"/><file name="CallbackListenerTest.php" hash="07d0e399b18e0cdd69aa66bf62bcbadc"/><file name="DigestAuthListenerTest.php" hash="595dbd612d2f1fde1264f738d1ed2c1e"/><dir name="History"><file name="EntryTest.php" hash="b7c001167cc0131c399e071538a66cb7"/><file name="JournalTest.php" hash="4111eb643fbcb05129dded0067aeefa7"/></dir><file name="HistoryListenerTest.php" hash="9953cad9320b6c78ce477532d454b3af"/><file name="ListenerChainTest.php" hash="ff5b9727f91f7a9da2d322d5a97deddb"/><file name="LoggerListenerTest.php" hash="7e40e0735e7dac71bcd9119c7a3c2e56"/></dir><dir name="Message"><file name="AbstractMessageTest.php" hash="90d531511705842c573b28f4c8fb5d68"/><file name="FactoryTest.php" hash="ced832a48cbc0d9e288136c1ff77d075"/><dir name="Fixtures"><file name="google.png" hash="169e859db7f28a01e1b51e1c9e2d6b2b"/></dir><file name="FormRequestTest.php" hash="a2ffa5131fd015f512b4a27c346d5657"/><file name="FormUploadTest.php" hash="34879f48bef94f8e33da964873cab449"/><file name="RequestTest.php" hash="e317c4e28a35a1aaebb7bec68cfe896c"/><file name="ResponseTest.php" hash="579841f50c45431092ca535aefbd9dc8"/></dir><dir name="Util"><file name="CookieJarTest.php" hash="79ee72e90586bc4be15b609c62b6db40"/><file name="CookieTest.php" hash="52f9472651d7cd7933fe5cf91daff218"/><file name="UrlTest.php" hash="2161e86caf2c229e63be62b555375054"/></dir></dir></dir><dir name="etc"><file name="nginx.conf" hash="db731e2d76cb867039bbc90014ba6476"/><file name="squid.conf" hash="77d3d02b7f2d73d6330a207b579785e7"/></dir><file name="server.php" hash="479689cf2fe15407f6280e83160b0277"/></dir><file name=".gitignore" hash="f7d5a75baf3a1beeb22243dd7ef578bd"/><file name=".travis.yml" hash="1b91a4fa3e3b4cc60d31f5f0eddb7e79"/></dir></dir><dir name="maxmind"><dir name="web-service-common"><file name="CHANGELOG.md" hash="7f2f05525acaaf52f3771f0129676e4a"/><file name="LICENSE" hash="3b83ef96387f14655fc854ddc3c6bd57"/><file name="README.md" hash="37316c741db7f5ae8dc1eaff4a045bd8"/><file name="composer.json" hash="ec42bb19ef5ba2b22192e89f3bd7b1ce"/><dir name="src"><dir name="Exception"><file name="AuthenticationException.php" hash="a1fdcba6decc96345545f4f10287e162"/><file name="HttpException.php" hash="6579aa42001dbe77ca3e8d1e51aac3d2"/><file name="InsufficientFundsException.php" hash="14886d684f1be0b4b28a66f4b22e490f"/><file name="InvalidInputException.php" hash="72dc20089eb4a5cfaccafe6e2b17a36e"/><file name="InvalidRequestException.php" hash="b55c1b8b30715dc40416be8c1ce3bd61"/><file name="IpAddressNotFoundException.php" hash="16313ab0d82195477e1ba071e7696313"/><file name="PermissionRequiredException.php" hash="f832cea2f10902ae2ffa4521e13c73d1"/><file name="WebServiceException.php" hash="6882e0d113e22478202f99caf306bde9"/></dir><dir name="WebService"><file name="Client.php" hash="6253acd40102faead6d8750f5467d420"/><dir name="Http"><file name="CurlRequest.php" hash="da8ba5cf09aea35ee6a69c074d70f3f8"/><file name="Request.php" hash="b493bca240735584dd610eadf2372880"/><file name="RequestFactory.php" hash="5c41aa383b7be71773fa2b68c0ad4e6e"/></dir></dir></dir></dir></dir><dir name="maxmind-db"><dir name="reader"><file name="CHANGELOG.md" hash="6e0348104ab013c82482394c0d10322e"/><file name="LICENSE" hash="3b83ef96387f14655fc854ddc3c6bd57"/><file name="README.md" hash="4d6518a9c5916e04e55cd394f0f39424"/><file name="composer.json" hash="0a95937043bf1924fb18f70ba453122a"/><dir name="ext"><file name="config.m4" hash="e6d700d321e152a73797148a486c449d"/><file name="maxminddb.c" hash="0ac67b9330fa433be129f77c2b9622c6"/><file name="php_maxminddb.h" hash="312cbe9b3aa017e727b52d421475b7fa"/><dir name="tests"><file name="001-load.phpt" hash="86ba1adc502540b42cbb1ef2fe5cfd67"/></dir></dir><dir name="src"><dir name="MaxMind"><dir name="Db"><dir name="Reader"><file name="Decoder.php" hash="ac9cc72ca5d65bf0e2bc26254d2e08e6"/><file name="InvalidDatabaseException.php" hash="30a5d8369ea2012e747ac1e59f78c76f"/><file name="Metadata.php" hash="643d939699d39a80c3a8c3adb19ee9e7"/><file name="Util.php" hash="92c382f8642000eef497745ec9bf2e91"/></dir><file name="Reader.php" hash="dd648dd18ea4df0c8ff6eabee28ddf57"/></dir></dir></dir></dir></dir></dir><dir name="Model"><file name="BackendRedirector.php" hash="76adbcd50fc8b71758428ef57eca6ce6"/><file name="Notification.php" hash="a62c3b7ff11cd2d1082c0d959d8eb295"/><file name="Observer.php" hash="d3973d8acb54217d98d86c2b81fe3d3a"/><file name="StoreExtender.php" hash="316db9a49ce8c22edf44648f2fa7baa6"/></dir><dir name="bridge2cart"><file name="bridge.php" hash="e076e52fe7867f1306d35f4df55b433f"/><file name="config.php" hash="0fb8e12c8d9c293354eb4fb96a713608"/><file name="helper.php" hash="afb5e2141259c580285ac85d0c180144"/><file name="preloader.php" hash="8a8ada3537394687defdc28d4b6077e8"/></dir><dir name="controllers"><file name="ConfigurationController.php" hash="5c3b27204772f6cd243a34b4489b9305"/><file name="DiagnosticsController.php" hash="678d9c6ead8331a6cc25f775574beab6"/><file name="HelperController.php" hash="73fb01f035db7d75eb1ee0a3d535fd0b"/><file name="IndexController.php" hash="a76fb36d3f6fa4c370b766ed9ba818ed"/></dir><dir name="etc"><file name="adminhtml.xml" hash="07e287503c40ce7c588efe7863c05002"/><file name="config.xml" hash="23b05a67af3aaef0c2195734a56c8528"/><file name="system.xml" hash="cfe59ca34ebfef69b900f4ad275a809a"/></dir><dir name="resources"><dir name="geoip"><file name="COPYRIGHT.txt" hash="37e1c6f4fc26ec1993d127575029c079"/><file name="GeoIP2-Country.mmdb" hash="33a191481c2840aa2ad482d00773d6b5"/><file name="LICENSE.txt" hash="46fce10ea30c7c62dbf39fc979604d68"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Webinterpret_Connector.xml" hash="087c2742f6bcb89ed6a77921e6493feb"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="webinterpret"><file name="connector.xml" hash="1226a298ca08a92008293ba4e8c09eab"/></dir></dir><dir name="template"><dir name="webinterpret"><dir name="connector"><file name="footer.phtml" hash="bd48d0e36dea0936b9f28fbdada3b8c1"/><file name="head.phtml" hash="107312871a7b2730532db8d986de5726"/><file name="product_view.phtml" hash="2036bc444284b99f4cc8228fa4751777"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="webinterpret"><file name="connector.xml" hash="867fafe49fa978668f6e5d7027c57aa6"/></dir></dir><dir name="template"><dir name="webinterpret"><dir name="system"><dir name="config"><file name="activate.phtml" hash="5ef389ad58cb1be9cc666fecd8379fbf"/><dir name="fieldset"><file name="banner.phtml" hash="921b677bd3e52d9c86172bdf26ab4a37"/><file name="status.phtml" hash="412bd1ea314a7f0c8897e6a9225c3551"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="de_DE"><file name="Webinterpret_Connector.csv" hash="91312fd3bd2645b88e3b3643b6b614a9"/></dir><dir name="en_US"><file name="Webinterpret_Connector.csv" hash="c382db753974630198cf029cf90b5d27"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.3.2</min><max>7.0.99</max></php></required></dependencies>
|
18 |
</package>
|