-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlocalcopy_oc3.ocmod.xml
More file actions
39 lines (39 loc) · 1.13 KB
/
localcopy_oc3.ocmod.xml
File metadata and controls
39 lines (39 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>Localcopy OCMOD for OpenCart 3</name>
<code>localcopy-ocmod-opencart-oc3</code>
<version>1.0.0</version>
<author>Arthur SUPPORTS.BY</author>
<link>https://supports.by/</link>
<file path="admin/controller/marketplace/install.php">
<operation>
<search>
<![CDATA[if ($safe) {]]>
</search>
<add position="before">
<![CDATA[
// Ensure safe mode is always on
$safe = true;
// Log state change
error_log('Safe mode set to true during OCMOD installation.');
]]>
</add>
</operation>
<operation>
<search>
<![CDATA[if (is_dir($file) && !is_dir($path)) {]]>
</search>
<add position="before">
<![CDATA[
// Handle empty path and set it to the correct application root
if ($path === '') {
$app_root = dirname(DIR_APPLICATION);
$path = $app_root . '/' . trim($destination, '/');
// Log path setup
error_log("Path set to: $path");
}
]]>
</add>
</operation>
</file>
</modification>