@@ -12,159 +12,159 @@ discard block |
||
12 | 12 | |
13 | 13 | // 1.0.3 changes; |
14 | 14 | if (version_compare(VERSION, '1.0.3', '<')) { |
15 | - // Delete language english directory |
|
16 | - $this->filesystem->remove(DIR_LANGUAGE . 'english'); |
|
17 | - $this->filesystem->remove(DIR_CATALOG . 'language/english'); |
|
15 | + // Delete language english directory |
|
16 | + $this->filesystem->remove(DIR_LANGUAGE . 'english'); |
|
17 | + $this->filesystem->remove(DIR_CATALOG . 'language/english'); |
|
18 | 18 | |
19 | - // Update language directory name |
|
20 | - $this->db->query("UPDATE `" . DB_PREFIX . "language` SET `directory` = 'en-GB' WHERE `code` = 'en';"); |
|
19 | + // Update language directory name |
|
20 | + $this->db->query("UPDATE `" . DB_PREFIX . "language` SET `directory` = 'en-GB' WHERE `code` = 'en';"); |
|
21 | 21 | |
22 | - // Add field ('params') Addon table |
|
23 | - $addon = array(); |
|
22 | + // Add field ('params') Addon table |
|
23 | + $addon = array(); |
|
24 | 24 | |
25 | - $query = $this->db->query("SHOW COLUMNS FROM `" . DB_PREFIX . "addon`"); |
|
25 | + $query = $this->db->query("SHOW COLUMNS FROM `" . DB_PREFIX . "addon`"); |
|
26 | 26 | |
27 | - if ($query->num_rows) { |
|
28 | - foreach ($query->rows as $row) { |
|
29 | - $addon[] = $row['Field']; |
|
30 | - } |
|
31 | - } |
|
27 | + if ($query->num_rows) { |
|
28 | + foreach ($query->rows as $row) { |
|
29 | + $addon[] = $row['Field']; |
|
30 | + } |
|
31 | + } |
|
32 | 32 | |
33 | - if (!in_array('params', $addon)) { |
|
34 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "addon` ADD COLUMN `params` TEXT DEFAULT NULL"); |
|
35 | - } |
|
33 | + if (!in_array('params', $addon)) { |
|
34 | + $this->db->query("ALTER TABLE `" . DB_PREFIX . "addon` ADD COLUMN `params` TEXT DEFAULT NULL"); |
|
35 | + } |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | // 1.1.0 changes; |
39 | 39 | if (version_compare(VERSION, '1.1.0', '<')) { |
40 | - // Update the user groups |
|
41 | - $user_groups = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "user_group"); |
|
40 | + // Update the user groups |
|
41 | + $user_groups = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "user_group"); |
|
42 | 42 | |
43 | - foreach ($user_groups->rows as $user_group) { |
|
44 | - $user_group['permission'] = unserialize($user_group['permission']); |
|
43 | + foreach ($user_groups->rows as $user_group) { |
|
44 | + $user_group['permission'] = unserialize($user_group['permission']); |
|
45 | 45 | |
46 | - $user_group['permission']['access'][] = 'tool/system_info'; |
|
47 | - $user_group['permission']['modify'][] = 'tool/system_info'; |
|
46 | + $user_group['permission']['access'][] = 'tool/system_info'; |
|
47 | + $user_group['permission']['modify'][] = 'tool/system_info'; |
|
48 | 48 | |
49 | - $user_group['permission']['access'][] = 'feed/facebook_store'; |
|
50 | - $user_group['permission']['modify'][] = 'feed/facebook_store'; |
|
49 | + $user_group['permission']['access'][] = 'feed/facebook_store'; |
|
50 | + $user_group['permission']['modify'][] = 'feed/facebook_store'; |
|
51 | 51 | |
52 | - $user_group['permission']['dashboard'] = array( |
|
53 | - '0' => 'dashboard/charts', |
|
54 | - '1' => 'dashboard/online', |
|
55 | - '2' => 'dashboard/recenttabs', |
|
56 | - '3' => 'dashboard/customer', |
|
57 | - '4' => 'dashboard/order', |
|
58 | - '5' => 'dashboard/sale', |
|
59 | - '6' => 'dashboard/map', |
|
60 | - ); |
|
52 | + $user_group['permission']['dashboard'] = array( |
|
53 | + '0' => 'dashboard/charts', |
|
54 | + '1' => 'dashboard/online', |
|
55 | + '2' => 'dashboard/recenttabs', |
|
56 | + '3' => 'dashboard/customer', |
|
57 | + '4' => 'dashboard/order', |
|
58 | + '5' => 'dashboard/sale', |
|
59 | + '6' => 'dashboard/map', |
|
60 | + ); |
|
61 | 61 | |
62 | - $this->db->query("UPDATE " . DB_PREFIX . "user_group SET name = '" . $this->db->escape($user_group['name']) . "', permission = '" . $this->db->escape(serialize($user_group['permission'])) . "' WHERE user_group_id = '" . (int)$user_group['user_group_id'] . "'"); |
|
63 | - } |
|
62 | + $this->db->query("UPDATE " . DB_PREFIX . "user_group SET name = '" . $this->db->escape($user_group['name']) . "', permission = '" . $this->db->escape(serialize($user_group['permission'])) . "' WHERE user_group_id = '" . (int)$user_group['user_group_id'] . "'"); |
|
63 | + } |
|
64 | 64 | |
65 | - // Update the modules |
|
66 | - $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "module`"); |
|
65 | + // Update the modules |
|
66 | + $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "module`"); |
|
67 | 67 | |
68 | - foreach ($query->rows as $module) { |
|
69 | - $module_setting = unserialize($module['setting']); |
|
68 | + foreach ($query->rows as $module) { |
|
69 | + $module_setting = unserialize($module['setting']); |
|
70 | 70 | |
71 | - if (isset($module_setting['product']) || ($module['code'] == 'featured')) { |
|
72 | - $module_setting['feed'] = 1; |
|
71 | + if (isset($module_setting['product']) || ($module['code'] == 'featured')) { |
|
72 | + $module_setting['feed'] = 1; |
|
73 | 73 | |
74 | - $this->db->query("UPDATE `" . DB_PREFIX . "module` SET `name` = '" . $this->db->escape($module_setting['name']) . "', `setting` = '" . $this->db->escape(serialize($module_setting)) . "' WHERE `module_id` = '" . (int)$module['module_id'] . "'"); |
|
75 | - } |
|
76 | - } |
|
74 | + $this->db->query("UPDATE `" . DB_PREFIX . "module` SET `name` = '" . $this->db->escape($module_setting['name']) . "', `setting` = '" . $this->db->escape(serialize($module_setting)) . "' WHERE `module_id` = '" . (int)$module['module_id'] . "'"); |
|
75 | + } |
|
76 | + } |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | // 1.1.3 changes; |
80 | 80 | if (version_compare(VERSION, '1.1.3', '<')) { |
81 | - // Delete modification table |
|
82 | - $this->db->query("DROP TABLE `" . DB_PREFIX . "modification`"); |
|
81 | + // Delete modification table |
|
82 | + $this->db->query("DROP TABLE `" . DB_PREFIX . "modification`"); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | // 1.2.0 changes; |
86 | 86 | if (version_compare(VERSION, '1.2.0', '<')) { |
87 | - // Update user table |
|
88 | - $user = array(); |
|
87 | + // Update user table |
|
88 | + $user = array(); |
|
89 | 89 | |
90 | - $query = $this->db->query("SHOW COLUMNS FROM `" . DB_PREFIX . "user`"); |
|
90 | + $query = $this->db->query("SHOW COLUMNS FROM `" . DB_PREFIX . "user`"); |
|
91 | 91 | |
92 | - if ($query->num_rows) { |
|
93 | - foreach ($query->rows as $row) { |
|
94 | - $user[] = $row['Field']; |
|
95 | - } |
|
96 | - } |
|
92 | + if ($query->num_rows) { |
|
93 | + foreach ($query->rows as $row) { |
|
94 | + $user[] = $row['Field']; |
|
95 | + } |
|
96 | + } |
|
97 | 97 | |
98 | - if (!in_array('params', $user)) { |
|
99 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "user` MODIFY `username` VARCHAR(100)"); |
|
100 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "user` MODIFY `password` VARCHAR(100)"); |
|
101 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "user` MODIFY `email` VARCHAR(100)"); |
|
102 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "user` ADD `params` text AFTER `date_added`"); |
|
103 | - } |
|
98 | + if (!in_array('params', $user)) { |
|
99 | + $this->db->query("ALTER TABLE `" . DB_PREFIX . "user` MODIFY `username` VARCHAR(100)"); |
|
100 | + $this->db->query("ALTER TABLE `" . DB_PREFIX . "user` MODIFY `password` VARCHAR(100)"); |
|
101 | + $this->db->query("ALTER TABLE `" . DB_PREFIX . "user` MODIFY `email` VARCHAR(100)"); |
|
102 | + $this->db->query("ALTER TABLE `" . DB_PREFIX . "user` ADD `params` text AFTER `date_added`"); |
|
103 | + } |
|
104 | 104 | |
105 | - // Update stock status table |
|
106 | - $stock_status = array(); |
|
105 | + // Update stock status table |
|
106 | + $stock_status = array(); |
|
107 | 107 | |
108 | - $query = $this->db->query("SHOW COLUMNS FROM `" . DB_PREFIX . "stock_status`"); |
|
108 | + $query = $this->db->query("SHOW COLUMNS FROM `" . DB_PREFIX . "stock_status`"); |
|
109 | 109 | |
110 | - if ($query->num_rows) { |
|
111 | - foreach ($query->rows as $row) { |
|
112 | - $stock_status[] = $row['Field']; |
|
113 | - } |
|
114 | - } |
|
110 | + if ($query->num_rows) { |
|
111 | + foreach ($query->rows as $row) { |
|
112 | + $stock_status[] = $row['Field']; |
|
113 | + } |
|
114 | + } |
|
115 | 115 | |
116 | - if (!in_array('color', $stock_status)) { |
|
117 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "stock_status` ADD `color` VARCHAR(32) NOT NULL AFTER `name`"); |
|
118 | - } |
|
116 | + if (!in_array('color', $stock_status)) { |
|
117 | + $this->db->query("ALTER TABLE `" . DB_PREFIX . "stock_status` ADD `color` VARCHAR(32) NOT NULL AFTER `name`"); |
|
118 | + } |
|
119 | 119 | |
120 | - // Added stock status default color |
|
121 | - $this->db->query("UPDATE `" . DB_PREFIX . "stock_status` SET `color` = '#FF0000' WHERE `stock_status_id` = '5'"); |
|
122 | - $this->db->query("UPDATE `" . DB_PREFIX . "stock_status` SET `color` = '#FFA500' WHERE `stock_status_id` = '6'"); |
|
123 | - $this->db->query("UPDATE `" . DB_PREFIX . "stock_status` SET `color` = '#008000' WHERE `stock_status_id` = '7'"); |
|
124 | - $this->db->query("UPDATE `" . DB_PREFIX . "stock_status` SET `color` = '#FFFF00' WHERE `stock_status_id` = '8'"); |
|
120 | + // Added stock status default color |
|
121 | + $this->db->query("UPDATE `" . DB_PREFIX . "stock_status` SET `color` = '#FF0000' WHERE `stock_status_id` = '5'"); |
|
122 | + $this->db->query("UPDATE `" . DB_PREFIX . "stock_status` SET `color` = '#FFA500' WHERE `stock_status_id` = '6'"); |
|
123 | + $this->db->query("UPDATE `" . DB_PREFIX . "stock_status` SET `color` = '#008000' WHERE `stock_status_id` = '7'"); |
|
124 | + $this->db->query("UPDATE `" . DB_PREFIX . "stock_status` SET `color` = '#FFFF00' WHERE `stock_status_id` = '8'"); |
|
125 | 125 | |
126 | - // Insert email template for return request |
|
127 | - $this->db->query("INSERT INTO `" . DB_PREFIX . "email` SET `text` = 'Return Request', `text_id` = '1', `context` = 'added', `type` = 'return', `status` = '1'"); |
|
128 | - $email_id = $this->db->getLastId(); |
|
126 | + // Insert email template for return request |
|
127 | + $this->db->query("INSERT INTO `" . DB_PREFIX . "email` SET `text` = 'Return Request', `text_id` = '1', `context` = 'added', `type` = 'return', `status` = '1'"); |
|
128 | + $email_id = $this->db->getLastId(); |
|
129 | 129 | |
130 | - $this->db->query("INSERT INTO `" . DB_PREFIX . "email_description` SET `email_id` = '" . $email_id . "', `name` = '{store_name} - Product Return Request', `description` = '<div style="width:695px;"><p style="margin-top:0px;margin-bottom:20px">You have a new product return request.</p> <table style="border-collapse:collapse; width: 690px;border-top:1px solid #dddddd;border-left:1px solid #dddddd;margin-bottom:20px"> <thead> <tr> <td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;background-color:#efefef;font-weight:bold;text-align:left;padding:7px;color:#222222" colspan="2">Order Details</td> </tr> </thead> <tbody> <tr> <td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;text-align:left;padding:7px"><b>Order ID:&nbsp;</b><span style="font-size: 13px; line-height: 18px; text-align: right;">{order_id}</span><br> <b>Date Ordered:</b>&nbsp;<span style="font-size: 13px; line-height: 18px; text-align: right;">{date_ordered}</span><br><b style="color: rgb(0, 0, 0); font-family: arial, sans-serif; line-height: normal;">Customer</b><b>:</b>&nbsp;<span style="font-size: 13px; line-height: 18px; text-align: right;">{firstname} {lastname}</span><br><b style="color: rgb(0, 0, 0); font-family: arial, sans-serif; line-height: normal;">E-mail</b><b>:</b>&nbsp;<span style="font-size: 13px; line-height: 18px; text-align: right;">{email}</span><br><b>Telephone:</b>&nbsp;<span style="font-size: 13px; line-height: 18px; text-align: right;">{telephone}</span><br></td> </tr> </tbody> </table><table style="border-collapse:collapse; width: 690px;border-top:1px solid #dddddd;border-left:1px solid #dddddd;margin-bottom:20px"> <thead> <tr> <td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;background-color:#efefef;font-weight:bold;text-align:left;padding:7px;color:#222222">Product</td> <td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;background-color:#efefef;font-weight:bold;text-align:left;padding:7px;color:#222222">Model</td><td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;background-color:#efefef;font-weight:bold;text-align: right;padding:7px;color:#222222">Quantity</td> </tr> </thead> <tbody> <tr> <td style="width: 40%;font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;text-align:left;padding:7px"><span style="font-size: 13px; line-height: 18px; text-align: right;">{product}</span><br></td> <td style="width: 40%;font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;text-align:left;padding:7px"><span style="font-size: 13px; line-height: 18px; text-align: right;">{model}</span></td><td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;text-align: right;padding:7px"><span style="font-size: 13px; line-height: 18px; text-align: right;">{quantity}</span></td></tr></tbody></table><p></p><p></p><table style="border-collapse:collapse; width: 690px;border-top:1px solid #dddddd;border-left:1px solid #dddddd;margin-bottom:20px"> <thead> <tr> <td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;background-color:#efefef;font-weight:bold;text-align:left;padding:7px;color:#222222" colspan="2">Return Details</td> </tr> </thead> <tbody> <tr> <td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;text-align:left;padding:7px"> <b>Return Reason:&nbsp;</b> <span style="font-size: 13px; line-height: 18px; text-align: right;">{return_reason}</span> <br> <b>Opened:&nbsp;</b> <span style="font-size: 13px; line-height: 18px; text-align: right;">{opened}</span> <br><br> <span style="font-size: 13px; line-height: 18px; text-align: right;">{comment}</span></td> </tr> </tbody></table> </div>', `status` = '1', `language_id` = '1'"); |
|
130 | + $this->db->query("INSERT INTO `" . DB_PREFIX . "email_description` SET `email_id` = '" . $email_id . "', `name` = '{store_name} - Product Return Request', `description` = '<div style="width:695px;"><p style="margin-top:0px;margin-bottom:20px">You have a new product return request.</p> <table style="border-collapse:collapse; width: 690px;border-top:1px solid #dddddd;border-left:1px solid #dddddd;margin-bottom:20px"> <thead> <tr> <td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;background-color:#efefef;font-weight:bold;text-align:left;padding:7px;color:#222222" colspan="2">Order Details</td> </tr> </thead> <tbody> <tr> <td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;text-align:left;padding:7px"><b>Order ID:&nbsp;</b><span style="font-size: 13px; line-height: 18px; text-align: right;">{order_id}</span><br> <b>Date Ordered:</b>&nbsp;<span style="font-size: 13px; line-height: 18px; text-align: right;">{date_ordered}</span><br><b style="color: rgb(0, 0, 0); font-family: arial, sans-serif; line-height: normal;">Customer</b><b>:</b>&nbsp;<span style="font-size: 13px; line-height: 18px; text-align: right;">{firstname} {lastname}</span><br><b style="color: rgb(0, 0, 0); font-family: arial, sans-serif; line-height: normal;">E-mail</b><b>:</b>&nbsp;<span style="font-size: 13px; line-height: 18px; text-align: right;">{email}</span><br><b>Telephone:</b>&nbsp;<span style="font-size: 13px; line-height: 18px; text-align: right;">{telephone}</span><br></td> </tr> </tbody> </table><table style="border-collapse:collapse; width: 690px;border-top:1px solid #dddddd;border-left:1px solid #dddddd;margin-bottom:20px"> <thead> <tr> <td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;background-color:#efefef;font-weight:bold;text-align:left;padding:7px;color:#222222">Product</td> <td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;background-color:#efefef;font-weight:bold;text-align:left;padding:7px;color:#222222">Model</td><td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;background-color:#efefef;font-weight:bold;text-align: right;padding:7px;color:#222222">Quantity</td> </tr> </thead> <tbody> <tr> <td style="width: 40%;font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;text-align:left;padding:7px"><span style="font-size: 13px; line-height: 18px; text-align: right;">{product}</span><br></td> <td style="width: 40%;font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;text-align:left;padding:7px"><span style="font-size: 13px; line-height: 18px; text-align: right;">{model}</span></td><td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;text-align: right;padding:7px"><span style="font-size: 13px; line-height: 18px; text-align: right;">{quantity}</span></td></tr></tbody></table><p></p><p></p><table style="border-collapse:collapse; width: 690px;border-top:1px solid #dddddd;border-left:1px solid #dddddd;margin-bottom:20px"> <thead> <tr> <td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;background-color:#efefef;font-weight:bold;text-align:left;padding:7px;color:#222222" colspan="2">Return Details</td> </tr> </thead> <tbody> <tr> <td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;text-align:left;padding:7px"> <b>Return Reason:&nbsp;</b> <span style="font-size: 13px; line-height: 18px; text-align: right;">{return_reason}</span> <br> <b>Opened:&nbsp;</b> <span style="font-size: 13px; line-height: 18px; text-align: right;">{opened}</span> <br><br> <span style="font-size: 13px; line-height: 18px; text-align: right;">{comment}</span></td> </tr> </tbody></table> </div>', `status` = '1', `language_id` = '1'"); |
|
131 | 131 | |
132 | - // Insert email template for out of stock |
|
133 | - $this->db->query("INSERT INTO `" . DB_PREFIX . "email` SET `text` = 'Out Of Stock', `text_id` = '1', `context` = 'out', `type` = 'stock', `status` = '1'"); |
|
134 | - $email_id = $this->db->getLastId(); |
|
132 | + // Insert email template for out of stock |
|
133 | + $this->db->query("INSERT INTO `" . DB_PREFIX . "email` SET `text` = 'Out Of Stock', `text_id` = '1', `context` = 'out', `type` = 'stock', `status` = '1'"); |
|
134 | + $email_id = $this->db->getLastId(); |
|
135 | 135 | |
136 | - $this->db->query("INSERT INTO `" . DB_PREFIX . "email_description` SET `email_id` = '" . $email_id . "', `name` = '{store_name} - {total_products} Product(s) Out Of Stock', `description` = 'Hello,<br><br>We would like to notify that you have <b>{total_products}</b> product(s) out of stock in store <strong>{store_name}</strong>.<br><br>You can view them by clicking on Notifications icon -> Out of Stock, or browse to Catalog -> Products and filter quantity = 0.<br><br>Best Regards,<br><br>The {store_name} team', `status` = '1', `language_id` = '1'"); |
|
136 | + $this->db->query("INSERT INTO `" . DB_PREFIX . "email_description` SET `email_id` = '" . $email_id . "', `name` = '{store_name} - {total_products} Product(s) Out Of Stock', `description` = 'Hello,<br><br>We would like to notify that you have <b>{total_products}</b> product(s) out of stock in store <strong>{store_name}</strong>.<br><br>You can view them by clicking on Notifications icon -> Out of Stock, or browse to Catalog -> Products and filter quantity = 0.<br><br>Best Regards,<br><br>The {store_name} team', `status` = '1', `language_id` = '1'"); |
|
137 | 137 | |
138 | - // Extension/Theme manager |
|
139 | - $addon = array(); |
|
138 | + // Extension/Theme manager |
|
139 | + $addon = array(); |
|
140 | 140 | |
141 | - $query = $this->db->query("SHOW COLUMNS FROM `" . DB_PREFIX . "addon`"); |
|
141 | + $query = $this->db->query("SHOW COLUMNS FROM `" . DB_PREFIX . "addon`"); |
|
142 | 142 | |
143 | - if ($query->num_rows) { |
|
144 | - foreach ($query->rows as $row) { |
|
145 | - $addon[] = $row['Field']; |
|
146 | - } |
|
147 | - } |
|
143 | + if ($query->num_rows) { |
|
144 | + foreach ($query->rows as $row) { |
|
145 | + $addon[] = $row['Field']; |
|
146 | + } |
|
147 | + } |
|
148 | 148 | |
149 | - if (!in_array('addon_files', $addon)) { |
|
150 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "addon` CHANGE `addon_files` `files` TEXT NULL"); |
|
151 | - } |
|
149 | + if (!in_array('addon_files', $addon)) { |
|
150 | + $this->db->query("ALTER TABLE `" . DB_PREFIX . "addon` CHANGE `addon_files` `files` TEXT NULL"); |
|
151 | + } |
|
152 | 152 | |
153 | - $extension = array(); |
|
153 | + $extension = array(); |
|
154 | 154 | |
155 | - $query = $this->db->query("SHOW COLUMNS FROM `" . DB_PREFIX . "extension`"); |
|
155 | + $query = $this->db->query("SHOW COLUMNS FROM `" . DB_PREFIX . "extension`"); |
|
156 | 156 | |
157 | - if ($query->num_rows) { |
|
158 | - foreach ($query->rows as $row) { |
|
159 | - $extension[] = $row['Field']; |
|
160 | - } |
|
161 | - } |
|
157 | + if ($query->num_rows) { |
|
158 | + foreach ($query->rows as $row) { |
|
159 | + $extension[] = $row['Field']; |
|
160 | + } |
|
161 | + } |
|
162 | 162 | |
163 | - if (!in_array('info', $extension)) { |
|
164 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "extension` ADD `info` TEXT NULL AFTER `code`, ADD `params` TEXT NULL AFTER `info`"); |
|
165 | - } |
|
163 | + if (!in_array('info', $extension)) { |
|
164 | + $this->db->query("ALTER TABLE `" . DB_PREFIX . "extension` ADD `info` TEXT NULL AFTER `code`, ADD `params` TEXT NULL AFTER `info`"); |
|
165 | + } |
|
166 | 166 | |
167 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "theme` ( |
|
167 | + $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "theme` ( |
|
168 | 168 | `theme_id` int(11) NOT NULL AUTO_INCREMENT, |
169 | 169 | `code` varchar(32) NOT NULL, |
170 | 170 | `info` text NULL, |
@@ -172,27 +172,27 @@ discard block |
||
172 | 172 | PRIMARY KEY (`theme_id`) |
173 | 173 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
174 | 174 | |
175 | - // Update params of addons |
|
176 | - $addons = $this->db->query("SELECT * FROM `" . DB_PREFIX . "addon`")->rows; |
|
175 | + // Update params of addons |
|
176 | + $addons = $this->db->query("SELECT * FROM `" . DB_PREFIX . "addon`")->rows; |
|
177 | 177 | |
178 | - foreach ($addons as $addon) { |
|
179 | - $params = json_decode($addon['params'], true); |
|
178 | + foreach ($addons as $addon) { |
|
179 | + $params = json_decode($addon['params'], true); |
|
180 | 180 | |
181 | - // Update to language_id |
|
182 | - if (isset($params['localisation/language'])) { |
|
183 | - $params['language_id'] = $params['localisation/language']; |
|
184 | - unset($params['localisation/language']); |
|
185 | - } |
|
181 | + // Update to language_id |
|
182 | + if (isset($params['localisation/language'])) { |
|
183 | + $params['language_id'] = $params['localisation/language']; |
|
184 | + unset($params['localisation/language']); |
|
185 | + } |
|
186 | 186 | |
187 | - // Set theme/extension ids |
|
188 | - $params['theme_ids'] = array(); |
|
189 | - $params['extension_ids'] = array(); |
|
187 | + // Set theme/extension ids |
|
188 | + $params['theme_ids'] = array(); |
|
189 | + $params['extension_ids'] = array(); |
|
190 | 190 | |
191 | - $this->db->query("UPDATE `" . DB_PREFIX . "addon` SET `params` = '" . json_encode($params) . "' WHERE `addon_id` = '" . $addon['addon_id'] . "'"); |
|
192 | - } |
|
191 | + $this->db->query("UPDATE `" . DB_PREFIX . "addon` SET `params` = '" . json_encode($params) . "' WHERE `addon_id` = '" . $addon['addon_id'] . "'"); |
|
192 | + } |
|
193 | 193 | |
194 | - // Invoices |
|
195 | - $this->db->query("CREATE TABLE `" . DB_PREFIX . "invoice` ( |
|
194 | + // Invoices |
|
195 | + $this->db->query("CREATE TABLE `" . DB_PREFIX . "invoice` ( |
|
196 | 196 | `invoice_id` int(11) NOT NULL AUTO_INCREMENT, |
197 | 197 | `order_id` int(11) NOT NULL, |
198 | 198 | `invoice_date` datetime NOT NULL, |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | KEY `order_id` (`order_id`) |
201 | 201 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
202 | 202 | |
203 | - $this->db->query("CREATE TABLE `" . DB_PREFIX . "invoice_history` ( |
|
203 | + $this->db->query("CREATE TABLE `" . DB_PREFIX . "invoice_history` ( |
|
204 | 204 | `invoice_history_id` int(11) NOT NULL AUTO_INCREMENT, |
205 | 205 | `invoice_id` int(11) NOT NULL, |
206 | 206 | `notify` tinyint(1) NOT NULL DEFAULT '0', |
@@ -210,270 +210,270 @@ discard block |
||
210 | 210 | KEY `invoice_id` (`invoice_id`) |
211 | 211 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
212 | 212 | |
213 | - $orders = $this->db->query("SELECT order_id, date_added FROM `" . DB_PREFIX . "order` WHERE `invoice_no` <> ''")->rows; |
|
213 | + $orders = $this->db->query("SELECT order_id, date_added FROM `" . DB_PREFIX . "order` WHERE `invoice_no` <> ''")->rows; |
|
214 | 214 | |
215 | - foreach ($orders as $order) { |
|
216 | - $this->db->query("INSERT INTO " . DB_PREFIX . "invoice SET invoice_date = '" . $this->db->escape($order['date_added']) . "', order_id = '" . (int) $order['order_id'] . "'"); |
|
217 | - } |
|
215 | + foreach ($orders as $order) { |
|
216 | + $this->db->query("INSERT INTO " . DB_PREFIX . "invoice SET invoice_date = '" . $this->db->escape($order['date_added']) . "', order_id = '" . (int) $order['order_id'] . "'"); |
|
217 | + } |
|
218 | 218 | |
219 | - $this->db->query("INSERT INTO `" . DB_PREFIX . "email` SET `text` = 'Invoice Mail', `text_id` = '1', `context` = 'invoice.mail', `type` = 'invoice', `status` = '1'"); |
|
220 | - $email_id = $this->db->getLastId(); |
|
221 | - $this->db->query("INSERT INTO `" . DB_PREFIX . "email_description` SET `email_id` = '" . $email_id . "', `name` = 'Invoice for your {order_id} order', `description` = '<p>Hello {customer},</p><p><br></p><p>Thank you for your interest in {store_name} products. You can find the invoice in the attachment.</p><p><br></p><p>Please reply to this e-mail if you have any questions.<br></p>', `status` = '1', `language_id` = '1'"); |
|
219 | + $this->db->query("INSERT INTO `" . DB_PREFIX . "email` SET `text` = 'Invoice Mail', `text_id` = '1', `context` = 'invoice.mail', `type` = 'invoice', `status` = '1'"); |
|
220 | + $email_id = $this->db->getLastId(); |
|
221 | + $this->db->query("INSERT INTO `" . DB_PREFIX . "email_description` SET `email_id` = '" . $email_id . "', `name` = 'Invoice for your {order_id} order', `description` = '<p>Hello {customer},</p><p><br></p><p>Thank you for your interest in {store_name} products. You can find the invoice in the attachment.</p><p><br></p><p>Please reply to this e-mail if you have any questions.<br></p>', `status` = '1', `language_id` = '1'"); |
|
222 | 222 | |
223 | - $this->db->query("INSERT INTO `" . DB_PREFIX . "email` SET `text` = 'Invoice History', `text_id` = '2', `context` = 'invoice.history', `type` = 'invoice', `status` = '1'"); |
|
224 | - $email_id = $this->db->getLastId(); |
|
225 | - $this->db->query("INSERT INTO `" . DB_PREFIX . "email_description` SET `email_id` = '" . $email_id . "', `name` = '{store_name} Invoice - {invoice_no} History', `description` = '<p>Invoice No.:&nbsp;{invoice_no}</p><p>Invoice Date:&nbsp;{date_added}<br></p><p>The comments for your invoice are:</p><p>{comment}</p><p>Please reply to this email if you have any questions.<br></p>', `status` = '1', `language_id` = '1'"); |
|
223 | + $this->db->query("INSERT INTO `" . DB_PREFIX . "email` SET `text` = 'Invoice History', `text_id` = '2', `context` = 'invoice.history', `type` = 'invoice', `status` = '1'"); |
|
224 | + $email_id = $this->db->getLastId(); |
|
225 | + $this->db->query("INSERT INTO `" . DB_PREFIX . "email_description` SET `email_id` = '" . $email_id . "', `name` = '{store_name} Invoice - {invoice_no} History', `description` = '<p>Invoice No.:&nbsp;{invoice_no}</p><p>Invoice Date:&nbsp;{date_added}<br></p><p>The comments for your invoice are:</p><p>{comment}</p><p>Please reply to this email if you have any questions.<br></p>', `status` = '1', `language_id` = '1'"); |
|
226 | 226 | |
227 | - // Update user groups |
|
228 | - $user_groups = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "user_group"); |
|
227 | + // Update user groups |
|
228 | + $user_groups = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "user_group"); |
|
229 | 229 | |
230 | - foreach ($user_groups->rows as $user_group) { |
|
231 | - $user_group['permission'] = unserialize($user_group['permission']); |
|
230 | + foreach ($user_groups->rows as $user_group) { |
|
231 | + $user_group['permission'] = unserialize($user_group['permission']); |
|
232 | 232 | |
233 | - $user_group['permission']['access'][] = 'appearance/theme'; |
|
234 | - $user_group['permission']['modify'][] = 'appearance/theme'; |
|
233 | + $user_group['permission']['access'][] = 'appearance/theme'; |
|
234 | + $user_group['permission']['modify'][] = 'appearance/theme'; |
|
235 | 235 | |
236 | - $user_group['permission']['access'][] = 'extension/extension'; |
|
237 | - $user_group['permission']['modify'][] = 'extension/extension'; |
|
236 | + $user_group['permission']['access'][] = 'extension/extension'; |
|
237 | + $user_group['permission']['modify'][] = 'extension/extension'; |
|
238 | 238 | |
239 | - $user_group['permission']['access'][] = 'sale/invoice'; |
|
240 | - $user_group['permission']['modify'][] = 'sale/invoice'; |
|
239 | + $user_group['permission']['access'][] = 'sale/invoice'; |
|
240 | + $user_group['permission']['modify'][] = 'sale/invoice'; |
|
241 | 241 | |
242 | - $user_group['permission']['access'][] = 'editor/summernote'; |
|
243 | - $user_group['permission']['modify'][] = 'editor/summernote'; |
|
242 | + $user_group['permission']['access'][] = 'editor/summernote'; |
|
243 | + $user_group['permission']['modify'][] = 'editor/summernote'; |
|
244 | 244 | |
245 | - $user_group['permission']['access'][] = 'editor/tinymce'; |
|
246 | - $user_group['permission']['modify'][] = 'editor/tinymce'; |
|
245 | + $user_group['permission']['access'][] = 'editor/tinymce'; |
|
246 | + $user_group['permission']['modify'][] = 'editor/tinymce'; |
|
247 | 247 | |
248 | - $this->db->query("UPDATE " . DB_PREFIX . "user_group SET name = '" . $this->db->escape($user_group['name']) . "', permission = '" . $this->db->escape(serialize($user_group['permission'])) . "' WHERE user_group_id = '" . (int)$user_group['user_group_id'] . "'"); |
|
249 | - } |
|
248 | + $this->db->query("UPDATE " . DB_PREFIX . "user_group SET name = '" . $this->db->escape($user_group['name']) . "', permission = '" . $this->db->escape(serialize($user_group['permission'])) . "' WHERE user_group_id = '" . (int)$user_group['user_group_id'] . "'"); |
|
249 | + } |
|
250 | 250 | |
251 | - // Update users |
|
252 | - $users = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "user"); |
|
251 | + // Update users |
|
252 | + $users = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "user"); |
|
253 | 253 | |
254 | - foreach ($users->rows as $user) { |
|
255 | - $params = '{"theme":"basic","basic_mode_message":"show","language":"' . $this->session->data['admin_language'] . '","editor":"summernote"}'; |
|
254 | + foreach ($users->rows as $user) { |
|
255 | + $params = '{"theme":"basic","basic_mode_message":"show","language":"' . $this->session->data['admin_language'] . '","editor":"summernote"}'; |
|
256 | 256 | |
257 | - $this->db->query("UPDATE " . DB_PREFIX . "user SET params = '" . $this->db->escape($params) . "' WHERE user_id = '" . (int)$user['user_id'] . "'"); |
|
258 | - } |
|
257 | + $this->db->query("UPDATE " . DB_PREFIX . "user SET params = '" . $this->db->escape($params) . "' WHERE user_id = '" . (int)$user['user_id'] . "'"); |
|
258 | + } |
|
259 | 259 | |
260 | - if (!file_exists(DIR_ADMIN . 'controller/module/pp_login.php')) { |
|
261 | - $this->filesystem->remove(DIR_CATALOG . 'event/app/pp_login.php'); |
|
262 | - } |
|
260 | + if (!file_exists(DIR_ADMIN . 'controller/module/pp_login.php')) { |
|
261 | + $this->filesystem->remove(DIR_CATALOG . 'event/app/pp_login.php'); |
|
262 | + } |
|
263 | 263 | } |
264 | 264 | |
265 | 265 | // 1.2.4 changes; |
266 | 266 | if (version_compare(VERSION, '1.2.4', '<')) { |
267 | - // Update download table |
|
268 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "download` CHANGE `filename` `filename` varchar(255) NOT NULL"); |
|
269 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "download` CHANGE `mask` `mask` varchar(255) NOT NULL"); |
|
267 | + // Update download table |
|
268 | + $this->db->query("ALTER TABLE `" . DB_PREFIX . "download` CHANGE `filename` `filename` varchar(255) NOT NULL"); |
|
269 | + $this->db->query("ALTER TABLE `" . DB_PREFIX . "download` CHANGE `mask` `mask` varchar(255) NOT NULL"); |
|
270 | 270 | } |
271 | 271 | |
272 | 272 | // 1.3.0 changes; |
273 | 273 | if (version_compare(VERSION, '1.3.0', '<')) { |
274 | - // Insert setting table |
|
275 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_admin_template', `value` = 'basic'"); |
|
276 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_admin_template_message', `value` = 'show'"); |
|
277 | - |
|
278 | - $addon = $this->db->query("SELECT * FROM " . DB_PREFIX . "addon WHERE `files` LIKE '%summernote%'"); |
|
279 | - |
|
280 | - if (empty($addon->num_rows)) { |
|
281 | - $this->db->query("INSERT INTO " . DB_PREFIX . "extension SET type = 'editor', `code` = 'summernote'"); |
|
282 | - |
|
283 | - $extension_id = $this->db->getLastId(); |
|
284 | - |
|
285 | - $this->db->query("INSERT INTO " . DB_PREFIX . "addon SET product_id = '0', `product_name` = 'Summernote', `product_type` = 'editor', `product_version` = '1.0.0', `files` = '[\"admin\\/controller\\\\editor\\\\summernote.php","admin\\/language\\\\en-GB\\\\editor\\\\summernote.php","admin\\/view\\\\template\\\\editor\\\\summernote.tpl\"]', `params` = '{\"theme_ids\":[],\"extension_ids\":[" . $extension_id . "]}'"); |
|
286 | - } |
|
287 | - |
|
288 | - $summernote = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "setting WHERE `code` = 'summernote' AND `key` = 'summernote_status' AND `value` = '1'"); |
|
289 | - |
|
290 | - if (empty($summernote->num_rows)) { |
|
291 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_status', `value` = '1'"); |
|
292 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_height', `value` = '300'"); |
|
293 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_sort_order', `value` = '1'"); |
|
294 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_style', `value` = '1'"); |
|
295 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_font_bold', `value` = '1'"); |
|
296 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_font_italic', `value` = '1'"); |
|
297 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_font_underline', `value` = '1'"); |
|
298 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_font_clear', `value` = '1'"); |
|
299 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_fontname', `value` = '1'"); |
|
300 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_fontsize', `value` = '1'"); |
|
301 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_color', `value` = '1'"); |
|
302 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_para_ol', `value` = '1'"); |
|
303 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_para_ul', `value` = '1'"); |
|
304 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_para_paragraph', `value` = '1'"); |
|
305 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_height', `value` = '1'"); |
|
306 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_table', `value` = '1'"); |
|
307 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_insert_link', `value` = '1'"); |
|
308 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_insert_picture', `value` = '1'"); |
|
309 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_insert_hr', `value` = '1'"); |
|
310 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_view_fullscreen', `value` = '1'"); |
|
311 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_view_codeview', `value` = '1'"); |
|
312 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_help', `value` = '1'"); |
|
313 | - } |
|
314 | - |
|
315 | - $addon = $this->db->query("SELECT * FROM " . DB_PREFIX . "addon WHERE `files` LIKE '%tinymce%'"); |
|
316 | - |
|
317 | - if (empty($addon->num_rows)) { |
|
318 | - $this->db->query("INSERT INTO " . DB_PREFIX . "extension SET type = 'editor', `code` = 'tinymce'"); |
|
319 | - |
|
320 | - $extension_id = $this->db->getLastId(); |
|
321 | - |
|
322 | - $this->db->query("INSERT INTO " . DB_PREFIX . "addon SET product_id = '0', `product_name` = 'Tinymce', `product_type` = 'editor', `product_version` = '1.0.0', `files` = '[\"admin\\/controller\\\\editor\\\\tinymce.php","admin\\/language\\\\en-GB\\\\editor\\\\tinymce.php","admin\\/view\\\\template\\\\editor\\\\tinymce.tpl\"]', `params` = '{\"theme_ids\":[],\"extension_ids\":[" . $extension_id . "]}'"); |
|
323 | - } |
|
324 | - |
|
325 | - $tinymce = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "setting WHERE `code` = 'tinymce' AND `key` = 'tinymce_status' AND `value` = '1'"); |
|
326 | - |
|
327 | - if (empty($tinymce->num_rows)) { |
|
328 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_status', `value` = '1'"); |
|
329 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_height', `value` = '300'"); |
|
330 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_sort_order', `value` = '1'"); |
|
331 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_edit_undo', `value` = '1'"); |
|
332 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_edit_redo', `value` = '1'"); |
|
333 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_bold', `value` = '1'"); |
|
334 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_italic', `value` = '1'"); |
|
335 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_view_alignleft', `value` = '1'"); |
|
336 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_view_aligncenter', `value` = '1'"); |
|
337 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_view_alignright', `value` = '1'"); |
|
338 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_view_alignjustify', `value` = '1'"); |
|
339 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_file_bullist', `value` = '1'"); |
|
340 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_file_numlist', `value` = '1'"); |
|
341 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_file_outdent', `value` = '1'"); |
|
342 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_file_indent', `value` = '1'"); |
|
343 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_insert_link', `value` = '1'"); |
|
344 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_insert_image', `value` = '1'"); |
|
345 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_imagetools', `value` = '1'"); |
|
346 | - } |
|
347 | - |
|
348 | - // Update length_class_description table |
|
349 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "length_class_description` CHANGE length_class_id length_class_id INT(11) NOT NULL"); |
|
350 | - |
|
351 | - // Update weight_class_description table |
|
352 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "weight_class_description` CHANGE weight_class_id weight_class_id INT(11) NOT NULL"); |
|
353 | - |
|
354 | - // Update information_description table |
|
355 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "information_description` CHANGE description description MEDIUMTEXT NOT NULL"); |
|
356 | - |
|
357 | - // Insert Module table Cart module => Modal after cart |
|
358 | - $this->db->query("INSERT INTO " . DB_PREFIX . "module SET `name` = 'Cart - Modal after Add to Cart', `code` = 'cart', `setting` = 'a:15:{s:4:\"name\";s:30:\"Cart - Modal after Add to Cart\";s:5:\"popup\";s:1:\"1\";s:5:\"theme\";s:9:\"mini_cart\";s:6:\"status\";s:1:\"1\";s:13:\"product_image\";s:1:\"1\";s:12:\"product_name\";s:1:\"1\";s:13:\"product_model\";s:1:\"0\";s:16:\"product_quantity\";s:1:\"1\";s:13:\"product_price\";s:1:\"1\";s:13:\"product_total\";s:1:\"1\";s:15:\"button_continue\";s:1:\"1\";s:11:\"button_cart\";s:1:\"1\";s:15:\"button_checkout\";s:1:\"1\";s:6:\"coupon\";s:1:\"1\";s:7:\"message\";s:1:\"1\";}'"); |
|
359 | - |
|
360 | - // Update layout_module table |
|
361 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "layout_module` CHANGE `position` `position` varchar(64) NOT NULL"); |
|
362 | - |
|
363 | - // Update coupon table |
|
364 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "coupon` CHANGE `code` `code` varchar(128) NOT NULL"); |
|
274 | + // Insert setting table |
|
275 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_admin_template', `value` = 'basic'"); |
|
276 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_admin_template_message', `value` = 'show'"); |
|
277 | + |
|
278 | + $addon = $this->db->query("SELECT * FROM " . DB_PREFIX . "addon WHERE `files` LIKE '%summernote%'"); |
|
279 | + |
|
280 | + if (empty($addon->num_rows)) { |
|
281 | + $this->db->query("INSERT INTO " . DB_PREFIX . "extension SET type = 'editor', `code` = 'summernote'"); |
|
282 | + |
|
283 | + $extension_id = $this->db->getLastId(); |
|
284 | + |
|
285 | + $this->db->query("INSERT INTO " . DB_PREFIX . "addon SET product_id = '0', `product_name` = 'Summernote', `product_type` = 'editor', `product_version` = '1.0.0', `files` = '[\"admin\\/controller\\\\editor\\\\summernote.php","admin\\/language\\\\en-GB\\\\editor\\\\summernote.php","admin\\/view\\\\template\\\\editor\\\\summernote.tpl\"]', `params` = '{\"theme_ids\":[],\"extension_ids\":[" . $extension_id . "]}'"); |
|
286 | + } |
|
287 | + |
|
288 | + $summernote = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "setting WHERE `code` = 'summernote' AND `key` = 'summernote_status' AND `value` = '1'"); |
|
289 | + |
|
290 | + if (empty($summernote->num_rows)) { |
|
291 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_status', `value` = '1'"); |
|
292 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_height', `value` = '300'"); |
|
293 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_sort_order', `value` = '1'"); |
|
294 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_style', `value` = '1'"); |
|
295 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_font_bold', `value` = '1'"); |
|
296 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_font_italic', `value` = '1'"); |
|
297 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_font_underline', `value` = '1'"); |
|
298 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_font_clear', `value` = '1'"); |
|
299 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_fontname', `value` = '1'"); |
|
300 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_fontsize', `value` = '1'"); |
|
301 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_color', `value` = '1'"); |
|
302 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_para_ol', `value` = '1'"); |
|
303 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_para_ul', `value` = '1'"); |
|
304 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_para_paragraph', `value` = '1'"); |
|
305 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_height', `value` = '1'"); |
|
306 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_table', `value` = '1'"); |
|
307 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_insert_link', `value` = '1'"); |
|
308 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_insert_picture', `value` = '1'"); |
|
309 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_insert_hr', `value` = '1'"); |
|
310 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_view_fullscreen', `value` = '1'"); |
|
311 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_view_codeview', `value` = '1'"); |
|
312 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_help', `value` = '1'"); |
|
313 | + } |
|
314 | + |
|
315 | + $addon = $this->db->query("SELECT * FROM " . DB_PREFIX . "addon WHERE `files` LIKE '%tinymce%'"); |
|
316 | + |
|
317 | + if (empty($addon->num_rows)) { |
|
318 | + $this->db->query("INSERT INTO " . DB_PREFIX . "extension SET type = 'editor', `code` = 'tinymce'"); |
|
319 | + |
|
320 | + $extension_id = $this->db->getLastId(); |
|
321 | + |
|
322 | + $this->db->query("INSERT INTO " . DB_PREFIX . "addon SET product_id = '0', `product_name` = 'Tinymce', `product_type` = 'editor', `product_version` = '1.0.0', `files` = '[\"admin\\/controller\\\\editor\\\\tinymce.php","admin\\/language\\\\en-GB\\\\editor\\\\tinymce.php","admin\\/view\\\\template\\\\editor\\\\tinymce.tpl\"]', `params` = '{\"theme_ids\":[],\"extension_ids\":[" . $extension_id . "]}'"); |
|
323 | + } |
|
324 | + |
|
325 | + $tinymce = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "setting WHERE `code` = 'tinymce' AND `key` = 'tinymce_status' AND `value` = '1'"); |
|
326 | + |
|
327 | + if (empty($tinymce->num_rows)) { |
|
328 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_status', `value` = '1'"); |
|
329 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_height', `value` = '300'"); |
|
330 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_sort_order', `value` = '1'"); |
|
331 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_edit_undo', `value` = '1'"); |
|
332 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_edit_redo', `value` = '1'"); |
|
333 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_bold', `value` = '1'"); |
|
334 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_italic', `value` = '1'"); |
|
335 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_view_alignleft', `value` = '1'"); |
|
336 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_view_aligncenter', `value` = '1'"); |
|
337 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_view_alignright', `value` = '1'"); |
|
338 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_view_alignjustify', `value` = '1'"); |
|
339 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_file_bullist', `value` = '1'"); |
|
340 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_file_numlist', `value` = '1'"); |
|
341 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_file_outdent', `value` = '1'"); |
|
342 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_file_indent', `value` = '1'"); |
|
343 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_insert_link', `value` = '1'"); |
|
344 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_insert_image', `value` = '1'"); |
|
345 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_imagetools', `value` = '1'"); |
|
346 | + } |
|
347 | + |
|
348 | + // Update length_class_description table |
|
349 | + $this->db->query("ALTER TABLE `" . DB_PREFIX . "length_class_description` CHANGE length_class_id length_class_id INT(11) NOT NULL"); |
|
350 | + |
|
351 | + // Update weight_class_description table |
|
352 | + $this->db->query("ALTER TABLE `" . DB_PREFIX . "weight_class_description` CHANGE weight_class_id weight_class_id INT(11) NOT NULL"); |
|
353 | + |
|
354 | + // Update information_description table |
|
355 | + $this->db->query("ALTER TABLE `" . DB_PREFIX . "information_description` CHANGE description description MEDIUMTEXT NOT NULL"); |
|
356 | + |
|
357 | + // Insert Module table Cart module => Modal after cart |
|
358 | + $this->db->query("INSERT INTO " . DB_PREFIX . "module SET `name` = 'Cart - Modal after Add to Cart', `code` = 'cart', `setting` = 'a:15:{s:4:\"name\";s:30:\"Cart - Modal after Add to Cart\";s:5:\"popup\";s:1:\"1\";s:5:\"theme\";s:9:\"mini_cart\";s:6:\"status\";s:1:\"1\";s:13:\"product_image\";s:1:\"1\";s:12:\"product_name\";s:1:\"1\";s:13:\"product_model\";s:1:\"0\";s:16:\"product_quantity\";s:1:\"1\";s:13:\"product_price\";s:1:\"1\";s:13:\"product_total\";s:1:\"1\";s:15:\"button_continue\";s:1:\"1\";s:11:\"button_cart\";s:1:\"1\";s:15:\"button_checkout\";s:1:\"1\";s:6:\"coupon\";s:1:\"1\";s:7:\"message\";s:1:\"1\";}'"); |
|
359 | + |
|
360 | + // Update layout_module table |
|
361 | + $this->db->query("ALTER TABLE `" . DB_PREFIX . "layout_module` CHANGE `position` `position` varchar(64) NOT NULL"); |
|
362 | + |
|
363 | + // Update coupon table |
|
364 | + $this->db->query("ALTER TABLE `" . DB_PREFIX . "coupon` CHANGE `code` `code` varchar(128) NOT NULL"); |
|
365 | 365 | } |
366 | 366 | |
367 | 367 | // 1.3.1 changes; |
368 | 368 | if (version_compare(VERSION, '1.3.1', '<')) { |
369 | - $tinymce = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "setting WHERE `code` = 'tinymce'"); |
|
370 | - |
|
371 | - if (!empty($tinymce->num_rows)) { |
|
372 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menubar', `value` = '0'"); |
|
373 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_edit_insertfile', `value` = '0'"); |
|
374 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_styleselect_styleselect', `value` = '0'"); |
|
375 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_underline', `value` = '1'"); |
|
376 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_visualchars', `value` = '0'"); |
|
377 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_visualblocks', `value` = '0'"); |
|
378 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_ltr', `value` = '0'"); |
|
379 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_rtl', `value` = '0'"); |
|
380 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_fontselect', `value` = '1'"); |
|
381 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_fontsizeselect', `value` = '1'"); |
|
382 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_charmap', `value` = '0'"); |
|
383 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_forecolor', `value` = '1'"); |
|
384 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_backcolor', `value` = '1'"); |
|
385 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_file_table', `value` = '1'"); |
|
386 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_insert_image_manager', `value` = '1'"); |
|
387 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_insert_media', `value` = '1'"); |
|
388 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_insert_hr', `value` = '1'"); |
|
389 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_fullscreen', `value` = '1'"); |
|
390 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_code', `value` = '1'"); |
|
391 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_searchreplace', `value` = '0'"); |
|
392 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_pagebreak', `value` = '0'"); |
|
393 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_nonbreaking', `value` = '0'"); |
|
394 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_emoticons', `value` = '0'"); |
|
395 | - } |
|
369 | + $tinymce = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "setting WHERE `code` = 'tinymce'"); |
|
370 | + |
|
371 | + if (!empty($tinymce->num_rows)) { |
|
372 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menubar', `value` = '0'"); |
|
373 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_edit_insertfile', `value` = '0'"); |
|
374 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_styleselect_styleselect', `value` = '0'"); |
|
375 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_underline', `value` = '1'"); |
|
376 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_visualchars', `value` = '0'"); |
|
377 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_visualblocks', `value` = '0'"); |
|
378 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_ltr', `value` = '0'"); |
|
379 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_rtl', `value` = '0'"); |
|
380 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_fontselect', `value` = '1'"); |
|
381 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_fontsizeselect', `value` = '1'"); |
|
382 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_charmap', `value` = '0'"); |
|
383 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_forecolor', `value` = '1'"); |
|
384 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_backcolor', `value` = '1'"); |
|
385 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_file_table', `value` = '1'"); |
|
386 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_insert_image_manager', `value` = '1'"); |
|
387 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_insert_media', `value` = '1'"); |
|
388 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_insert_hr', `value` = '1'"); |
|
389 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_fullscreen', `value` = '1'"); |
|
390 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_code', `value` = '1'"); |
|
391 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_searchreplace', `value` = '0'"); |
|
392 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_pagebreak', `value` = '0'"); |
|
393 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_nonbreaking', `value` = '0'"); |
|
394 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_emoticons', `value` = '0'"); |
|
395 | + } |
|
396 | 396 | } |
397 | 397 | |
398 | 398 | // 1.3.2 changes; |
399 | 399 | if (version_compare(VERSION, '1.3.2', '<')) { |
400 | - $email_descriptions = $this->db->query("SELECT * FROM " . DB_PREFIX . "email_description"); |
|
400 | + $email_descriptions = $this->db->query("SELECT * FROM " . DB_PREFIX . "email_description"); |
|
401 | 401 | |
402 | - foreach ($email_descriptions->rows as $email_description) { |
|
403 | - // Store logo short code changed |
|
404 | - $description = str_replace('<a href="{site_url}" title="{store_name}"> <img src="{logo}"> </a>', '{store_logo}', $email_description['description']); |
|
402 | + foreach ($email_descriptions->rows as $email_description) { |
|
403 | + // Store logo short code changed |
|
404 | + $description = str_replace('<a href="{site_url}" title="{store_name}"> <img src="{logo}"> </a>', '{store_logo}', $email_description['description']); |
|
405 | 405 | |
406 | - // Product image short code changed |
|
407 | - $description = str_replace('<img src="{product_image}" style="width: 50px;height: 50px;padding: auto;">', '{product_image}', $description); |
|
406 | + // Product image short code changed |
|
407 | + $description = str_replace('<img src="{product_image}" style="width: 50px;height: 50px;padding: auto;">', '{product_image}', $description); |
|
408 | 408 | |
409 | - // Order href code changed |
|
410 | - $description = str_replace('<a href="{order_href}" target="_blank">{order_href}</a>', '{order_href}', $description); |
|
411 | - $description = str_replace('<a href="{order_href}" target="_blank">{order_href} </a>', '{order_href}', $description); |
|
409 | + // Order href code changed |
|
410 | + $description = str_replace('<a href="{order_href}" target="_blank">{order_href}</a>', '{order_href}', $description); |
|
411 | + $description = str_replace('<a href="{order_href}" target="_blank">{order_href} </a>', '{order_href}', $description); |
|
412 | 412 | |
413 | - $this->db->query("UPDATE `" . DB_PREFIX . "email_description` SET `description` = '" . $this->db->escape($description) . "' WHERE `id` = '" . $email_description['id'] . "';"); |
|
414 | - } |
|
413 | + $this->db->query("UPDATE `" . DB_PREFIX . "email_description` SET `description` = '" . $this->db->escape($description) . "' WHERE `id` = '" . $email_description['id'] . "';"); |
|
414 | + } |
|
415 | 415 | } |
416 | 416 | |
417 | 417 | // 1.4.0 changes; |
418 | 418 | if (version_compare(VERSION, '1.4.0', '<')) { |
419 | - // Update banner_image table |
|
420 | - $banner_image = array(); |
|
421 | - |
|
422 | - $query = $this->db->query("SHOW COLUMNS FROM `" . DB_PREFIX . "banner_image`"); |
|
423 | - |
|
424 | - if ($query->num_rows) { |
|
425 | - foreach ($query->rows as $row) { |
|
426 | - $banner_image[] = $row['Field']; |
|
427 | - } |
|
428 | - } |
|
429 | - |
|
430 | - if (!in_array('language_id', $banner_image)) { |
|
431 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "banner_image` ADD `language_id` INT(11) NOT NULL AFTER `banner_id`"); |
|
432 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "banner_image` ADD `title` VARCHAR( 64 ) NOT NULL AFTER `language_id`"); |
|
433 | - } |
|
434 | - |
|
435 | - $banners = $this->db->query("SELECT * FROM " . DB_PREFIX . "banner WHERE 1"); |
|
436 | - |
|
437 | - if ($banners->num_rows) { |
|
438 | - $banner_image_data = array(); |
|
439 | - |
|
440 | - foreach ($banners->rows as $banner) { |
|
441 | - $banner_image_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "banner_image WHERE banner_id = '" . (int)$banner['banner_id'] . "' ORDER BY sort_order ASC"); |
|
442 | - |
|
443 | - foreach ($banner_image_query->rows as $banner_image) { |
|
444 | - $banner_image_description_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "banner_image_description WHERE banner_image_id = '" . (int)$banner_image['banner_image_id'] . "' AND banner_id = '" . (int)$banner['banner_id'] . "'"); |
|
445 | - |
|
446 | - foreach ($banner_image_description_query->rows as $banner_image_description) { |
|
447 | - $banner_image_data[$banner['banner_id']][$banner_image_description['language_id']][] = array( |
|
448 | - 'banner_id' => $banner['banner_id'], |
|
449 | - 'title' => $banner_image_description['title'], |
|
450 | - 'link' => $banner_image['link'], |
|
451 | - 'image' => $banner_image['image'], |
|
452 | - 'sort_order' => $banner_image['sort_order'] |
|
453 | - ); |
|
454 | - } |
|
455 | - } |
|
456 | - } |
|
457 | - |
|
458 | - // Truncate banner_image table |
|
459 | - $this->db->query("TRUNCATE `" . DB_PREFIX . "banner_image`"); |
|
460 | - |
|
461 | - if ($banner_image_data) { |
|
462 | - foreach ($banner_image_data as $banner_id => $banner_image_value) { |
|
463 | - foreach ($banner_image_value as $language_id => $value) { |
|
464 | - foreach ($value as $banner_image) { |
|
465 | - $this->db->query("INSERT INTO " . DB_PREFIX . "banner_image SET banner_id = '" . (int)$banner_id . "', language_id = '" . (int)$language_id . "', title = '" . $this->db->escape($banner_image['title']) . "', link = '" . $this->db->escape($banner_image['link']) . "', image = '" . $this->db->escape($banner_image['image']) . "', sort_order = '" . (int)$banner_image['sort_order'] . "'"); |
|
466 | - } |
|
467 | - } |
|
468 | - } |
|
469 | - } |
|
470 | - } |
|
471 | - |
|
472 | - // Delete banner_image_description table |
|
473 | - $this->db->query("DROP TABLE `" . DB_PREFIX . "banner_image_description`"); |
|
474 | - |
|
475 | - // Customer Search |
|
476 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "customer_search` ( |
|
419 | + // Update banner_image table |
|
420 | + $banner_image = array(); |
|
421 | + |
|
422 | + $query = $this->db->query("SHOW COLUMNS FROM `" . DB_PREFIX . "banner_image`"); |
|
423 | + |
|
424 | + if ($query->num_rows) { |
|
425 | + foreach ($query->rows as $row) { |
|
426 | + $banner_image[] = $row['Field']; |
|
427 | + } |
|
428 | + } |
|
429 | + |
|
430 | + if (!in_array('language_id', $banner_image)) { |
|
431 | + $this->db->query("ALTER TABLE `" . DB_PREFIX . "banner_image` ADD `language_id` INT(11) NOT NULL AFTER `banner_id`"); |
|
432 | + $this->db->query("ALTER TABLE `" . DB_PREFIX . "banner_image` ADD `title` VARCHAR( 64 ) NOT NULL AFTER `language_id`"); |
|
433 | + } |
|
434 | + |
|
435 | + $banners = $this->db->query("SELECT * FROM " . DB_PREFIX . "banner WHERE 1"); |
|
436 | + |
|
437 | + if ($banners->num_rows) { |
|
438 | + $banner_image_data = array(); |
|
439 | + |
|
440 | + foreach ($banners->rows as $banner) { |
|
441 | + $banner_image_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "banner_image WHERE banner_id = '" . (int)$banner['banner_id'] . "' ORDER BY sort_order ASC"); |
|
442 | + |
|
443 | + foreach ($banner_image_query->rows as $banner_image) { |
|
444 | + $banner_image_description_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "banner_image_description WHERE banner_image_id = '" . (int)$banner_image['banner_image_id'] . "' AND banner_id = '" . (int)$banner['banner_id'] . "'"); |
|
445 | + |
|
446 | + foreach ($banner_image_description_query->rows as $banner_image_description) { |
|
447 | + $banner_image_data[$banner['banner_id']][$banner_image_description['language_id']][] = array( |
|
448 | + 'banner_id' => $banner['banner_id'], |
|
449 | + 'title' => $banner_image_description['title'], |
|
450 | + 'link' => $banner_image['link'], |
|
451 | + 'image' => $banner_image['image'], |
|
452 | + 'sort_order' => $banner_image['sort_order'] |
|
453 | + ); |
|
454 | + } |
|
455 | + } |
|
456 | + } |
|
457 | + |
|
458 | + // Truncate banner_image table |
|
459 | + $this->db->query("TRUNCATE `" . DB_PREFIX . "banner_image`"); |
|
460 | + |
|
461 | + if ($banner_image_data) { |
|
462 | + foreach ($banner_image_data as $banner_id => $banner_image_value) { |
|
463 | + foreach ($banner_image_value as $language_id => $value) { |
|
464 | + foreach ($value as $banner_image) { |
|
465 | + $this->db->query("INSERT INTO " . DB_PREFIX . "banner_image SET banner_id = '" . (int)$banner_id . "', language_id = '" . (int)$language_id . "', title = '" . $this->db->escape($banner_image['title']) . "', link = '" . $this->db->escape($banner_image['link']) . "', image = '" . $this->db->escape($banner_image['image']) . "', sort_order = '" . (int)$banner_image['sort_order'] . "'"); |
|
466 | + } |
|
467 | + } |
|
468 | + } |
|
469 | + } |
|
470 | + } |
|
471 | + |
|
472 | + // Delete banner_image_description table |
|
473 | + $this->db->query("DROP TABLE `" . DB_PREFIX . "banner_image_description`"); |
|
474 | + |
|
475 | + // Customer Search |
|
476 | + $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "customer_search` ( |
|
477 | 477 | `customer_search_id` int(11) NOT NULL AUTO_INCREMENT, |
478 | 478 | `store_id` int(11) NOT NULL, |
479 | 479 | `language_id` int(11) NOT NULL, |
@@ -488,69 +488,69 @@ discard block |
||
488 | 488 | PRIMARY KEY (`customer_search_id`) |
489 | 489 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
490 | 490 | |
491 | - // Insert setting table |
|
492 | - if ($this->config->get('config_customer_search', null) == null) { |
|
493 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET `store_id` = 0, `code` = 'config', `key` = 'config_customer_search', `value` = '0', `serialized` = 0"); |
|
494 | - } |
|
491 | + // Insert setting table |
|
492 | + if ($this->config->get('config_customer_search', null) == null) { |
|
493 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET `store_id` = 0, `code` = 'config', `key` = 'config_customer_search', `value` = '0', `serialized` = 0"); |
|
494 | + } |
|
495 | 495 | |
496 | - // Update user groups |
|
497 | - $user_groups = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "user_group"); |
|
496 | + // Update user groups |
|
497 | + $user_groups = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "user_group"); |
|
498 | 498 | |
499 | - foreach ($user_groups->rows as $user_group) { |
|
500 | - $user_group['permission'] = unserialize($user_group['permission']); |
|
499 | + foreach ($user_groups->rows as $user_group) { |
|
500 | + $user_group['permission'] = unserialize($user_group['permission']); |
|
501 | 501 | |
502 | - $user_group['permission']['access'][] = 'report/customer_search'; |
|
503 | - $user_group['permission']['modify'][] = 'report/customer_search'; |
|
502 | + $user_group['permission']['access'][] = 'report/customer_search'; |
|
503 | + $user_group['permission']['modify'][] = 'report/customer_search'; |
|
504 | 504 | |
505 | - $this->db->query("UPDATE " . DB_PREFIX . "user_group SET name = '" . $this->db->escape($user_group['name']) . "', permission = '" . $this->db->escape(serialize($user_group['permission'])) . "' WHERE user_group_id = '" . (int)$user_group['user_group_id'] . "'"); |
|
506 | - } |
|
505 | + $this->db->query("UPDATE " . DB_PREFIX . "user_group SET name = '" . $this->db->escape($user_group['name']) . "', permission = '" . $this->db->escape(serialize($user_group['permission'])) . "' WHERE user_group_id = '" . (int)$user_group['user_group_id'] . "'"); |
|
506 | + } |
|
507 | 507 | } |
508 | 508 | |
509 | 509 | // 1.4.1 changes; |
510 | 510 | if (version_compare(VERSION, '1.4.1', '<')) { |
511 | - if ($this->config->get('config_customer_activity', null) == null) { |
|
512 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_customer_activity', `value` = '0'"); |
|
513 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_affiliate_activity', `value` = '0'"); |
|
514 | - } |
|
511 | + if ($this->config->get('config_customer_activity', null) == null) { |
|
512 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_customer_activity', `value` = '0'"); |
|
513 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_affiliate_activity', `value` = '0'"); |
|
514 | + } |
|
515 | 515 | } |
516 | 516 | |
517 | 517 | // 1.5.0 changes; |
518 | 518 | if (version_compare(VERSION, '1.5.0', '<')) { |
519 | - // Update the user groups |
|
520 | - $user_groups = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "user_group"); |
|
519 | + // Update the user groups |
|
520 | + $user_groups = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "user_group"); |
|
521 | 521 | |
522 | - foreach ($user_groups->rows as $user_group) { |
|
523 | - $user_group['permission'] = unserialize($user_group['permission']); |
|
522 | + foreach ($user_groups->rows as $user_group) { |
|
523 | + $user_group['permission'] = unserialize($user_group['permission']); |
|
524 | 524 | |
525 | - $user_group['permission']['access'][] = 'tool/cache'; |
|
526 | - $user_group['permission']['modify'][] = 'tool/cache'; |
|
525 | + $user_group['permission']['access'][] = 'tool/cache'; |
|
526 | + $user_group['permission']['modify'][] = 'tool/cache'; |
|
527 | 527 | |
528 | - $user_group['permission']['access'][] = 'report/graph'; |
|
529 | - $user_group['permission']['modify'][] = 'report/graph'; |
|
528 | + $user_group['permission']['access'][] = 'report/graph'; |
|
529 | + $user_group['permission']['modify'][] = 'report/graph'; |
|
530 | 530 | |
531 | - $user_group['permission']['access'][] = 'system/url_manager'; |
|
532 | - $user_group['permission']['modify'][] = 'system/url_manager'; |
|
531 | + $user_group['permission']['access'][] = 'system/url_manager'; |
|
532 | + $user_group['permission']['modify'][] = 'system/url_manager'; |
|
533 | 533 | |
534 | - $user_group['permission']['access'][] = 'analytics/google'; |
|
535 | - $user_group['permission']['modify'][] = 'analytics/google'; |
|
534 | + $user_group['permission']['access'][] = 'analytics/google'; |
|
535 | + $user_group['permission']['modify'][] = 'analytics/google'; |
|
536 | 536 | |
537 | - $user_group['permission']['access'][] = 'analytics/woopra'; |
|
538 | - $user_group['permission']['modify'][] = 'analytics/woopra'; |
|
537 | + $user_group['permission']['access'][] = 'analytics/woopra'; |
|
538 | + $user_group['permission']['modify'][] = 'analytics/woopra'; |
|
539 | 539 | |
540 | - $user_group['permission']['access'][] = 'antifraud/maxmind'; |
|
541 | - $user_group['permission']['modify'][] = 'antifraud/maxmind'; |
|
540 | + $user_group['permission']['access'][] = 'antifraud/maxmind'; |
|
541 | + $user_group['permission']['modify'][] = 'antifraud/maxmind'; |
|
542 | 542 | |
543 | - $user_group['permission']['access'][] = 'captcha/basic'; |
|
544 | - $user_group['permission']['modify'][] = 'captcha/basic'; |
|
543 | + $user_group['permission']['access'][] = 'captcha/basic'; |
|
544 | + $user_group['permission']['modify'][] = 'captcha/basic'; |
|
545 | 545 | |
546 | - $user_group['permission']['access'][] = 'captcha/google'; |
|
547 | - $user_group['permission']['modify'][] = 'captcha/google'; |
|
546 | + $user_group['permission']['access'][] = 'captcha/google'; |
|
547 | + $user_group['permission']['modify'][] = 'captcha/google'; |
|
548 | 548 | |
549 | - $this->db->query("UPDATE " . DB_PREFIX . "user_group SET name = '" . $this->db->escape($user_group['name']) . "', permission = '" . $this->db->escape(serialize($user_group['permission'])) . "' WHERE user_group_id = '" . (int)$user_group['user_group_id'] . "'"); |
|
550 | - } |
|
549 | + $this->db->query("UPDATE " . DB_PREFIX . "user_group SET name = '" . $this->db->escape($user_group['name']) . "', permission = '" . $this->db->escape(serialize($user_group['permission'])) . "' WHERE user_group_id = '" . (int)$user_group['user_group_id'] . "'"); |
|
550 | + } |
|
551 | 551 | |
552 | - // Create user_activity table |
|
553 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "user_activity` ( |
|
552 | + // Create user_activity table |
|
553 | + $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "user_activity` ( |
|
554 | 554 | `activity_id` int(11) NOT NULL AUTO_INCREMENT, |
555 | 555 | `user_id` int(11) NOT NULL, |
556 | 556 | `key` varchar(64) NOT NULL, |
@@ -561,97 +561,97 @@ discard block |
||
561 | 561 | KEY `user_id` (`user_id`) |
562 | 562 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
563 | 563 | |
564 | - // Update stock_status table |
|
565 | - $stock_status = array(); |
|
564 | + // Update stock_status table |
|
565 | + $stock_status = array(); |
|
566 | 566 | |
567 | - $query = $this->db->query("SHOW COLUMNS FROM `" . DB_PREFIX . "stock_status`"); |
|
567 | + $query = $this->db->query("SHOW COLUMNS FROM `" . DB_PREFIX . "stock_status`"); |
|
568 | 568 | |
569 | - if ($query->num_rows) { |
|
570 | - foreach ($query->rows as $row) { |
|
571 | - $stock_status[] = $row['Field']; |
|
572 | - } |
|
573 | - } |
|
569 | + if ($query->num_rows) { |
|
570 | + foreach ($query->rows as $row) { |
|
571 | + $stock_status[] = $row['Field']; |
|
572 | + } |
|
573 | + } |
|
574 | 574 | |
575 | - if (!in_array('preorder', $stock_status)) { |
|
576 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "stock_status` ADD `preorder` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `color`"); |
|
577 | - } |
|
575 | + if (!in_array('preorder', $stock_status)) { |
|
576 | + $this->db->query("ALTER TABLE `" . DB_PREFIX . "stock_status` ADD `preorder` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `color`"); |
|
577 | + } |
|
578 | 578 | |
579 | - // Add maintenance display settings |
|
580 | - if ($this->config->get('config_image_maintenance_width', null) == null) { |
|
581 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_maintenance_message', `value` = ''"); |
|
582 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_maintenance_image', `value` = ''"); |
|
583 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_maintenance_login', `value` = '1'"); |
|
584 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_image_maintenance_width', `value` = '268'"); |
|
585 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_image_maintenance_height', `value` = '50'"); |
|
586 | - } |
|
579 | + // Add maintenance display settings |
|
580 | + if ($this->config->get('config_image_maintenance_width', null) == null) { |
|
581 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_maintenance_message', `value` = ''"); |
|
582 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_maintenance_image', `value` = ''"); |
|
583 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_maintenance_login', `value` = '1'"); |
|
584 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_image_maintenance_width', `value` = '268'"); |
|
585 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_image_maintenance_height', `value` = '50'"); |
|
586 | + } |
|
587 | 587 | |
588 | - // Update config for new extension types: analytics, anti-fraud, captcha |
|
589 | - $this->load->model('setting/setting'); |
|
588 | + // Update config for new extension types: analytics, anti-fraud, captcha |
|
589 | + $this->load->model('setting/setting'); |
|
590 | 590 | |
591 | - $store_id = $this->config->get('config_store_id'); |
|
591 | + $store_id = $this->config->get('config_store_id'); |
|
592 | 592 | |
593 | - $config = $this->model_setting_setting->getSetting('config', $store_id); |
|
593 | + $config = $this->model_setting_setting->getSetting('config', $store_id); |
|
594 | 594 | |
595 | - if ($this->config->get('config_google_captcha_status')) { |
|
596 | - $data = array(); |
|
595 | + if ($this->config->get('config_google_captcha_status')) { |
|
596 | + $data = array(); |
|
597 | 597 | |
598 | - $data['google_captcha_status'] = '1'; |
|
599 | - $data['google_captcha_public'] = $this->config->get('config_google_captcha_public'); |
|
600 | - $data['google_captcha_secret'] = $this->config->get('config_google_captcha_secret'); |
|
598 | + $data['google_captcha_status'] = '1'; |
|
599 | + $data['google_captcha_public'] = $this->config->get('config_google_captcha_public'); |
|
600 | + $data['google_captcha_secret'] = $this->config->get('config_google_captcha_secret'); |
|
601 | 601 | |
602 | - $this->model_setting_setting->editSetting('google_captcha', $data, $store_id); |
|
602 | + $this->model_setting_setting->editSetting('google_captcha', $data, $store_id); |
|
603 | 603 | |
604 | - $config['config_captcha'] = 'google'; |
|
604 | + $config['config_captcha'] = 'google'; |
|
605 | 605 | |
606 | - $this->model_setting_setting->editSetting('config', $config, $store_id); |
|
607 | - } else { |
|
608 | - $config['config_captcha'] = ''; |
|
606 | + $this->model_setting_setting->editSetting('config', $config, $store_id); |
|
607 | + } else { |
|
608 | + $config['config_captcha'] = ''; |
|
609 | 609 | |
610 | - $this->model_setting_setting->editSetting('config', $config, $store_id); |
|
611 | - } |
|
610 | + $this->model_setting_setting->editSetting('config', $config, $store_id); |
|
611 | + } |
|
612 | 612 | |
613 | - if ($this->config->get('config_google_analytics_status')) { |
|
614 | - $data = array(); |
|
613 | + if ($this->config->get('config_google_analytics_status')) { |
|
614 | + $data = array(); |
|
615 | 615 | |
616 | - $data['google_analytics_status'] = '1'; |
|
617 | - $data['google_analytics_code'] = $this->config->get('config_google_analytics'); |
|
616 | + $data['google_analytics_status'] = '1'; |
|
617 | + $data['google_analytics_code'] = $this->config->get('config_google_analytics'); |
|
618 | 618 | |
619 | - $this->model_setting_setting->editSetting('google_analytics', $data, $store_id); |
|
620 | - } |
|
619 | + $this->model_setting_setting->editSetting('google_analytics', $data, $store_id); |
|
620 | + } |
|
621 | 621 | |
622 | - if ($this->config->get('config_fraud_detection')) { |
|
623 | - $data = array(); |
|
622 | + if ($this->config->get('config_fraud_detection')) { |
|
623 | + $data = array(); |
|
624 | 624 | |
625 | - $data['maxmind_antifraud_status'] = '1'; |
|
626 | - $data['maxmind_antifraud_key'] = $this->config->get('config_fraud_key'); |
|
627 | - $data['maxmind_antifraud_score'] = $this->config->get('config_fraud_score'); |
|
628 | - $data['maxmind_antifraud_status_id'] = $this->config->get('config_fraud_status_id'); |
|
625 | + $data['maxmind_antifraud_status'] = '1'; |
|
626 | + $data['maxmind_antifraud_key'] = $this->config->get('config_fraud_key'); |
|
627 | + $data['maxmind_antifraud_score'] = $this->config->get('config_fraud_score'); |
|
628 | + $data['maxmind_antifraud_status_id'] = $this->config->get('config_fraud_status_id'); |
|
629 | 629 | |
630 | - $this->model_setting_setting->editSetting('maxmind_antifraud', $data, $store_id); |
|
631 | - } |
|
630 | + $this->model_setting_setting->editSetting('maxmind_antifraud', $data, $store_id); |
|
631 | + } |
|
632 | 632 | } |
633 | 633 | |
634 | 634 | // 1.5.1 changes; |
635 | 635 | if (version_compare(VERSION, '1.5.1', '<')) { |
636 | - $this->db->query("DELETE FROM `" . DB_PREFIX . "setting` WHERE `key` = 'basic_status'"); |
|
637 | - $this->db->query("DELETE FROM `" . DB_PREFIX . "setting` WHERE `key` = 'google_status'"); |
|
638 | - $this->db->query("DELETE FROM `" . DB_PREFIX . "setting` WHERE `key` = 'maxmind_status'"); |
|
639 | - $this->db->query("DELETE FROM `" . DB_PREFIX . "setting` WHERE `key` = 'woopra_status'"); |
|
636 | + $this->db->query("DELETE FROM `" . DB_PREFIX . "setting` WHERE `key` = 'basic_status'"); |
|
637 | + $this->db->query("DELETE FROM `" . DB_PREFIX . "setting` WHERE `key` = 'google_status'"); |
|
638 | + $this->db->query("DELETE FROM `" . DB_PREFIX . "setting` WHERE `key` = 'maxmind_status'"); |
|
639 | + $this->db->query("DELETE FROM `" . DB_PREFIX . "setting` WHERE `key` = 'woopra_status'"); |
|
640 | 640 | } |
641 | 641 | |
642 | 642 | // 1.5.2 changes; |
643 | 643 | if (version_compare(VERSION, '1.5.2', '<')) { |
644 | - // remove command folder |
|
645 | - $this->filesystem->remove(DIR_SYSTEM . 'library/command'); |
|
644 | + // remove command folder |
|
645 | + $this->filesystem->remove(DIR_SYSTEM . 'library/command'); |
|
646 | 646 | } |
647 | 647 | |
648 | 648 | // 1.6.0 changes; |
649 | 649 | if (version_compare(VERSION, '1.6.0', '<')) { |
650 | - // Add CSRF setting |
|
651 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_sec_csrf', `value` = 'a:7:{i:0;s:20:\"account/address/edit\";i:1;s:12:\"account/edit\";i:2;s:18:\"account/newsletter\";i:3;s:16:\"account/password\";i:4;s:14:\"affiliate/edit\";i:5;s:18:\"affiliate/password\";i:6;s:17:\"affiliate/payment\";}', `serialized` = '1'"); |
|
650 | + // Add CSRF setting |
|
651 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_sec_csrf', `value` = 'a:7:{i:0;s:20:\"account/address/edit\";i:1;s:12:\"account/edit\";i:2;s:18:\"account/newsletter\";i:3;s:16:\"account/password\";i:4;s:14:\"affiliate/edit\";i:5;s:18:\"affiliate/password\";i:6;s:17:\"affiliate/payment\";}', `serialized` = '1'"); |
|
652 | 652 | |
653 | - // Add blog tables |
|
654 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_post` ( |
|
653 | + // Add blog tables |
|
654 | + $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_post` ( |
|
655 | 655 | `post_id` int(11) NOT NULL AUTO_INCREMENT, |
656 | 656 | `allow_comment` int(1) NOT NULL DEFAULT '1', |
657 | 657 | `featured` int(1) NOT NULL DEFAULT '0', |
@@ -669,7 +669,7 @@ discard block |
||
669 | 669 | KEY `author` (`author`) |
670 | 670 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
671 | 671 | |
672 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_post_description` ( |
|
672 | + $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_post_description` ( |
|
673 | 673 | `post_id` int(11) NOT NULL, |
674 | 674 | `language_id` int(11) NOT NULL, |
675 | 675 | `name` varchar(255) NOT NULL, |
@@ -683,14 +683,14 @@ discard block |
||
683 | 683 | KEY `language_id` (`language_id`) |
684 | 684 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
685 | 685 | |
686 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_post_to_category` ( |
|
686 | + $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_post_to_category` ( |
|
687 | 687 | `post_id` int(11) NOT NULL, |
688 | 688 | `category_id` int(11) NOT NULL, |
689 | 689 | PRIMARY KEY (`post_id`,`category_id`), |
690 | 690 | KEY `category_id` (`category_id`) |
691 | 691 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
692 | 692 | |
693 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_post_to_layout` ( |
|
693 | + $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_post_to_layout` ( |
|
694 | 694 | `post_id` int(11) NOT NULL, |
695 | 695 | `store_id` int(11) NOT NULL, |
696 | 696 | `layout_id` int(11) NOT NULL, |
@@ -699,14 +699,14 @@ discard block |
||
699 | 699 | KEY `layout_id` (`layout_id`) |
700 | 700 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
701 | 701 | |
702 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_post_to_store` ( |
|
702 | + $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_post_to_store` ( |
|
703 | 703 | `post_id` int(11) NOT NULL, |
704 | 704 | `store_id` int(11) NOT NULL, |
705 | 705 | PRIMARY KEY (`post_id`,`store_id`), |
706 | 706 | KEY `store_id` (`store_id`) |
707 | 707 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
708 | 708 | |
709 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_comment` ( |
|
709 | + $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_comment` ( |
|
710 | 710 | `comment_id` int(11) NOT NULL AUTO_INCREMENT, |
711 | 711 | `post_id` int(11) NOT NULL, |
712 | 712 | `customer_id` int(11) NOT NULL, |
@@ -721,7 +721,7 @@ discard block |
||
721 | 721 | KEY `customer_id` (`customer_id`) |
722 | 722 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
723 | 723 | |
724 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_category` ( |
|
724 | + $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_category` ( |
|
725 | 725 | `category_id` int(11) NOT NULL AUTO_INCREMENT, |
726 | 726 | `image` varchar(255) DEFAULT NULL, |
727 | 727 | `parent_id` int(11) NOT NULL DEFAULT '0', |
@@ -734,7 +734,7 @@ discard block |
||
734 | 734 | KEY `parent_id` (`parent_id`) |
735 | 735 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
736 | 736 | |
737 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_category_description` ( |
|
737 | + $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_category_description` ( |
|
738 | 738 | `category_id` int(11) NOT NULL, |
739 | 739 | `language_id` int(11) NOT NULL, |
740 | 740 | `name` varchar(255) NOT NULL, |
@@ -747,7 +747,7 @@ discard block |
||
747 | 747 | KEY `language_id` (`language_id`) |
748 | 748 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
749 | 749 | |
750 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_category_path` ( |
|
750 | + $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_category_path` ( |
|
751 | 751 | `category_id` int(11) NOT NULL, |
752 | 752 | `path_id` int(11) NOT NULL, |
753 | 753 | `level` int(11) NOT NULL, |
@@ -755,7 +755,7 @@ discard block |
||
755 | 755 | KEY `path_id` (`path_id`) |
756 | 756 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
757 | 757 | |
758 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_category_to_layout` ( |
|
758 | + $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_category_to_layout` ( |
|
759 | 759 | `category_id` int(11) NOT NULL, |
760 | 760 | `store_id` int(11) NOT NULL, |
761 | 761 | `layout_id` int(11) NOT NULL, |
@@ -764,167 +764,167 @@ discard block |
||
764 | 764 | KEY `layout_id` (`layout_id`) |
765 | 765 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
766 | 766 | |
767 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_category_to_store` ( |
|
767 | + $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_category_to_store` ( |
|
768 | 768 | `category_id` int(11) NOT NULL, |
769 | 769 | `store_id` int(11) NOT NULL, |
770 | 770 | PRIMARY KEY (`category_id`,`store_id`), |
771 | 771 | KEY `store_id` (`store_id`) |
772 | 772 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
773 | 773 | |
774 | - // Update the user groups |
|
775 | - $user_groups = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "user_group"); |
|
774 | + // Update the user groups |
|
775 | + $user_groups = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "user_group"); |
|
776 | 776 | |
777 | - foreach ($user_groups->rows as $user_group) { |
|
778 | - $user_group['permission'] = unserialize($user_group['permission']); |
|
777 | + foreach ($user_groups->rows as $user_group) { |
|
778 | + $user_group['permission'] = unserialize($user_group['permission']); |
|
779 | 779 | |
780 | - $user_group['permission']['access'][] = 'blog/category'; |
|
781 | - $user_group['permission']['modify'][] = 'blog/category'; |
|
780 | + $user_group['permission']['access'][] = 'blog/category'; |
|
781 | + $user_group['permission']['modify'][] = 'blog/category'; |
|
782 | 782 | |
783 | - $user_group['permission']['access'][] = 'blog/comment'; |
|
784 | - $user_group['permission']['modify'][] = 'blog/comment'; |
|
783 | + $user_group['permission']['access'][] = 'blog/comment'; |
|
784 | + $user_group['permission']['modify'][] = 'blog/comment'; |
|
785 | 785 | |
786 | - $user_group['permission']['access'][] = 'blog/post'; |
|
787 | - $user_group['permission']['modify'][] = 'blog/post'; |
|
786 | + $user_group['permission']['access'][] = 'blog/post'; |
|
787 | + $user_group['permission']['modify'][] = 'blog/post'; |
|
788 | 788 | |
789 | - $this->db->query("UPDATE " . DB_PREFIX . "user_group SET name = '" . $this->db->escape($user_group['name']) . "', permission = '" . $this->db->escape(serialize($user_group['permission'])) . "' WHERE user_group_id = '" . (int)$user_group['user_group_id'] . "'"); |
|
790 | - } |
|
789 | + $this->db->query("UPDATE " . DB_PREFIX . "user_group SET name = '" . $this->db->escape($user_group['name']) . "', permission = '" . $this->db->escape(serialize($user_group['permission'])) . "' WHERE user_group_id = '" . (int)$user_group['user_group_id'] . "'"); |
|
790 | + } |
|
791 | 791 | |
792 | - // Add Blog Layout |
|
793 | - $this->db->query("INSERT INTO " . DB_PREFIX . "layout SET name = 'Blog Home'"); |
|
792 | + // Add Blog Layout |
|
793 | + $this->db->query("INSERT INTO " . DB_PREFIX . "layout SET name = 'Blog Home'"); |
|
794 | 794 | |
795 | - $layout_id = $this->db->getLastId(); |
|
795 | + $layout_id = $this->db->getLastId(); |
|
796 | 796 | |
797 | - $this->db->query("INSERT INTO " . DB_PREFIX . "layout_route SET layout_id = '" . (int)$layout_id . "', `store_id` = '0', `route` = 'blog/home'"); |
|
797 | + $this->db->query("INSERT INTO " . DB_PREFIX . "layout_route SET layout_id = '" . (int)$layout_id . "', `store_id` = '0', `route` = 'blog/home'"); |
|
798 | 798 | |
799 | - // Add Module |
|
800 | - $this->db->query("INSERT INTO " . DB_PREFIX . "module SET name = 'Recent posts', `code` = 'blog_latest', `setting` = 'a:5:{s:4:\"name\";s:12:\"Recent posts\";s:5:\"limit\";s:1:\"5\";s:5:\"width\";s:2:\"60\";s:6:\"height\";s:2:\"40\";s:6:\"status\";s:1:\"1\";}'"); |
|
799 | + // Add Module |
|
800 | + $this->db->query("INSERT INTO " . DB_PREFIX . "module SET name = 'Recent posts', `code` = 'blog_latest', `setting` = 'a:5:{s:4:\"name\";s:12:\"Recent posts\";s:5:\"limit\";s:1:\"5\";s:5:\"width\";s:2:\"60\";s:6:\"height\";s:2:\"40\";s:6:\"status\";s:1:\"1\";}'"); |
|
801 | 801 | |
802 | - $module_id = $this->db->getLastId(); |
|
802 | + $module_id = $this->db->getLastId(); |
|
803 | 803 | |
804 | - // Add Blog Modules |
|
805 | - $this->db->query("INSERT INTO `" . DB_PREFIX . "layout_module` SET `layout_id` = '" . (int)$layout_id . "', `code` = 'blog_latest." .$module_id ."', `position` = 'column_right', `sort_order` = '0'"); |
|
804 | + // Add Blog Modules |
|
805 | + $this->db->query("INSERT INTO `" . DB_PREFIX . "layout_module` SET `layout_id` = '" . (int)$layout_id . "', `code` = 'blog_latest." .$module_id ."', `position` = 'column_right', `sort_order` = '0'"); |
|
806 | 806 | |
807 | - $this->db->query("INSERT INTO " . DB_PREFIX . "layout SET name = 'Blog Post'"); |
|
807 | + $this->db->query("INSERT INTO " . DB_PREFIX . "layout SET name = 'Blog Post'"); |
|
808 | 808 | |
809 | - $layout_id = $this->db->getLastId(); |
|
809 | + $layout_id = $this->db->getLastId(); |
|
810 | 810 | |
811 | - $this->db->query("INSERT INTO " . DB_PREFIX . "layout_route SET layout_id = '" . (int)$layout_id . "', `store_id` = '0', `route` = 'blog/post'"); |
|
811 | + $this->db->query("INSERT INTO " . DB_PREFIX . "layout_route SET layout_id = '" . (int)$layout_id . "', `store_id` = '0', `route` = 'blog/post'"); |
|
812 | 812 | |
813 | - // Add Module |
|
814 | - $this->db->query("INSERT INTO " . DB_PREFIX . "module SET name = 'Recent comments', `code` = 'blog_comment', `setting` = 'a:7:{s:4:\"name\";s:15:\"Recent comments\";s:5:\"limit\";s:1:\"2\";s:18:\"description_length\";s:3:\"300\";s:5:\"image\";s:1:\"1\";s:5:\"width\";s:2:\"40\";s:6:\"height\";s:2:\"40\";s:6:\"status\";s:1:\"1\";}'"); |
|
813 | + // Add Module |
|
814 | + $this->db->query("INSERT INTO " . DB_PREFIX . "module SET name = 'Recent comments', `code` = 'blog_comment', `setting` = 'a:7:{s:4:\"name\";s:15:\"Recent comments\";s:5:\"limit\";s:1:\"2\";s:18:\"description_length\";s:3:\"300\";s:5:\"image\";s:1:\"1\";s:5:\"width\";s:2:\"40\";s:6:\"height\";s:2:\"40\";s:6:\"status\";s:1:\"1\";}'"); |
|
815 | 815 | |
816 | - $module_id = $this->db->getLastId(); |
|
816 | + $module_id = $this->db->getLastId(); |
|
817 | 817 | |
818 | - // Add Blog Modules |
|
819 | - $this->db->query("INSERT INTO `" . DB_PREFIX . "layout_module` SET `layout_id` = '" . (int)$layout_id . "', `code` = 'blog_comment." .$module_id ."', `position` = 'column_right', `sort_order` = '0'"); |
|
818 | + // Add Blog Modules |
|
819 | + $this->db->query("INSERT INTO `" . DB_PREFIX . "layout_module` SET `layout_id` = '" . (int)$layout_id . "', `code` = 'blog_comment." .$module_id ."', `position` = 'column_right', `sort_order` = '0'"); |
|
820 | 820 | |
821 | - $this->db->query("INSERT INTO " . DB_PREFIX . "layout SET name = 'Blog Category'"); |
|
821 | + $this->db->query("INSERT INTO " . DB_PREFIX . "layout SET name = 'Blog Category'"); |
|
822 | 822 | |
823 | - $layout_id = $this->db->getLastId(); |
|
823 | + $layout_id = $this->db->getLastId(); |
|
824 | 824 | |
825 | - $this->db->query("INSERT INTO " . DB_PREFIX . "layout_route SET layout_id = '" . (int)$layout_id . "', `store_id` = '0', `route` = 'blog/category'"); |
|
825 | + $this->db->query("INSERT INTO " . DB_PREFIX . "layout_route SET layout_id = '" . (int)$layout_id . "', `store_id` = '0', `route` = 'blog/category'"); |
|
826 | 826 | |
827 | - // Add Blog Items |
|
828 | - // Add Blog Category |
|
829 | - $this->db->query("INSERT INTO `" . DB_PREFIX . "blog_category` SET `image` = '', `parent_id` = '0', `top` = '0', `sort_order` = '0', `status` = '1', `date_added` = '2017-04-06 14:06:13', `date_modified` = '0000-00-00 00:00:00'"); |
|
827 | + // Add Blog Items |
|
828 | + // Add Blog Category |
|
829 | + $this->db->query("INSERT INTO `" . DB_PREFIX . "blog_category` SET `image` = '', `parent_id` = '0', `top` = '0', `sort_order` = '0', `status` = '1', `date_added` = '2017-04-06 14:06:13', `date_modified` = '0000-00-00 00:00:00'"); |
|
830 | 830 | |
831 | - $blog_category_id = $this->db->getLastId(); |
|
831 | + $blog_category_id = $this->db->getLastId(); |
|
832 | 832 | |
833 | - $this->db->query("INSERT INTO `" . DB_PREFIX . "blog_category_description` SET `category_id` = " . (int)$blog_category_id . ", `language_id` = '1', `name` = 'General', `description` = '', `meta_title` = 'General', `meta_description` = '', `meta_keyword` = ''"); |
|
833 | + $this->db->query("INSERT INTO `" . DB_PREFIX . "blog_category_description` SET `category_id` = " . (int)$blog_category_id . ", `language_id` = '1', `name` = 'General', `description` = '', `meta_title` = 'General', `meta_description` = '', `meta_keyword` = ''"); |
|
834 | 834 | |
835 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_category_path SET category_id = '" . (int)$blog_category_id . "', `path_id` = '1', `level` = '0'"); |
|
835 | + $this->db->query("INSERT INTO " . DB_PREFIX . "blog_category_path SET category_id = '" . (int)$blog_category_id . "', `path_id` = '1', `level` = '0'"); |
|
836 | 836 | |
837 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_category_to_layout SET category_id = '" . (int)$blog_category_id . "', `store_id` = '0', `layout_id` = '0'"); |
|
837 | + $this->db->query("INSERT INTO " . DB_PREFIX . "blog_category_to_layout SET category_id = '" . (int)$blog_category_id . "', `store_id` = '0', `layout_id` = '0'"); |
|
838 | 838 | |
839 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_category_to_store SET category_id = '" . (int)$blog_category_id . "', `store_id` = '0'"); |
|
839 | + $this->db->query("INSERT INTO " . DB_PREFIX . "blog_category_to_store SET category_id = '" . (int)$blog_category_id . "', `store_id` = '0'"); |
|
840 | 840 | |
841 | - // Add Blog Category Url Alias |
|
842 | - $this->db->query("INSERT INTO " . DB_PREFIX . "url_alias SET `query` = 'blog_category_id=" . (int)$blog_category_id . "', `keyword` = 'general', `language_id` = '1'"); |
|
841 | + // Add Blog Category Url Alias |
|
842 | + $this->db->query("INSERT INTO " . DB_PREFIX . "url_alias SET `query` = 'blog_category_id=" . (int)$blog_category_id . "', `keyword` = 'general', `language_id` = '1'"); |
|
843 | 843 | |
844 | - // Add Blog Post |
|
845 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post SET `allow_comment` = '1', `featured` = '1', `viewed` = '37', `image` = 'catalog/demo/blog/yet-another.jpg', `author` = 'Cüneyt Şentürk', `date_available` = '2017-04-06', `sort_order` = '0', `status` = '1', `date_added` = '2017-04-06 14:13:54', `date_modified` = '2017-04-06 14:26:07'"); |
|
844 | + // Add Blog Post |
|
845 | + $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post SET `allow_comment` = '1', `featured` = '1', `viewed` = '37', `image` = 'catalog/demo/blog/yet-another.jpg', `author` = 'Cüneyt Şentürk', `date_available` = '2017-04-06', `sort_order` = '0', `status` = '1', `date_added` = '2017-04-06 14:13:54', `date_modified` = '2017-04-06 14:26:07'"); |
|
846 | 846 | |
847 | - $blog_post_id = $this->db->getLastId(); |
|
847 | + $blog_post_id = $this->db->getLastId(); |
|
848 | 848 | |
849 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_description SET post_id = '" . (int)$blog_post_id . "', `language_id` = '1', `name` = 'Yet another great post', `description` = '<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>\r\n<h1>HTML Ipsum Presents</h1>\r\n<p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p>\r\n<h2>Header Level 2</h2>\r\n<ol>\r\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>\r\n<li>Aliquam tincidunt mauris eu risus.</li>\r\n</ol>\r\n<blockquote>\r\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est.</p>\r\n</blockquote>\r\n<h3>Header Level 3</h3>\r\n<ul>\r\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>\r\n<li>Aliquam tincidunt mauris eu risus.</li>\r\n</ul>', `tag` = 'tag 1,tag 2,tag 3', `meta_title` = 'Yet another great post', `meta_description` = '', `meta_keyword` = ''"); |
|
849 | + $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_description SET post_id = '" . (int)$blog_post_id . "', `language_id` = '1', `name` = 'Yet another great post', `description` = '<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>\r\n<h1>HTML Ipsum Presents</h1>\r\n<p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p>\r\n<h2>Header Level 2</h2>\r\n<ol>\r\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>\r\n<li>Aliquam tincidunt mauris eu risus.</li>\r\n</ol>\r\n<blockquote>\r\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est.</p>\r\n</blockquote>\r\n<h3>Header Level 3</h3>\r\n<ul>\r\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>\r\n<li>Aliquam tincidunt mauris eu risus.</li>\r\n</ul>', `tag` = 'tag 1,tag 2,tag 3', `meta_title` = 'Yet another great post', `meta_description` = '', `meta_keyword` = ''"); |
|
850 | 850 | |
851 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_category SET post_id = '" . (int)$blog_post_id . "', category_id = '" . (int)$blog_category_id . "'"); |
|
851 | + $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_category SET post_id = '" . (int)$blog_post_id . "', category_id = '" . (int)$blog_category_id . "'"); |
|
852 | 852 | |
853 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_layout SET post_id = '" . (int)$blog_post_id . "', `store_id` = '0', `layout_id` = '0'"); |
|
853 | + $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_layout SET post_id = '" . (int)$blog_post_id . "', `store_id` = '0', `layout_id` = '0'"); |
|
854 | 854 | |
855 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_store SET post_id = '" . (int)$blog_post_id . "', `store_id` = '0'"); |
|
855 | + $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_store SET post_id = '" . (int)$blog_post_id . "', `store_id` = '0'"); |
|
856 | 856 | |
857 | - // Add Blog Comment |
|
858 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_comment SET `post_id` = '" . (int)$blog_post_id . "', `customer_id` = '0', `email` = '[email protected]', `author` = 'Denis', `text` = 'Hey, this is cool! I like it.', `status` = '1', `date_added` = '2017-04-06 14:54:56', `date_modified` = '0000-00-00 00:00:00'"); |
|
857 | + // Add Blog Comment |
|
858 | + $this->db->query("INSERT INTO " . DB_PREFIX . "blog_comment SET `post_id` = '" . (int)$blog_post_id . "', `customer_id` = '0', `email` = '[email protected]', `author` = 'Denis', `text` = 'Hey, this is cool! I like it.', `status` = '1', `date_added` = '2017-04-06 14:54:56', `date_modified` = '0000-00-00 00:00:00'"); |
|
859 | 859 | |
860 | - // Add Blog Post Url Alias |
|
861 | - $this->db->query("INSERT INTO " . DB_PREFIX . "url_alias SET `query` = 'blog_post_id=" . (int)$blog_post_id . "', `keyword` = 'yet-another-great-post', `language_id` = '1'"); |
|
860 | + // Add Blog Post Url Alias |
|
861 | + $this->db->query("INSERT INTO " . DB_PREFIX . "url_alias SET `query` = 'blog_post_id=" . (int)$blog_post_id . "', `keyword` = 'yet-another-great-post', `language_id` = '1'"); |
|
862 | 862 | |
863 | - // Add Blog Post |
|
864 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post SET `allow_comment` = '1', `featured` = '0', `viewed` = '10', `image` = 'catalog/demo/blog/arastta.jpg', `author` = 'Enes Ertuğrul', `date_available` = '2017-04-06', `sort_order` = '0', `status` = '1', `date_added` = '2017-04-06 14:31:03', `date_modified` = '2017-04-06 15:34:24'"); |
|
863 | + // Add Blog Post |
|
864 | + $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post SET `allow_comment` = '1', `featured` = '0', `viewed` = '10', `image` = 'catalog/demo/blog/arastta.jpg', `author` = 'Enes Ertuğrul', `date_available` = '2017-04-06', `sort_order` = '0', `status` = '1', `date_added` = '2017-04-06 14:31:03', `date_modified` = '2017-04-06 15:34:24'"); |
|
865 | 865 | |
866 | - $blog_post_id = $this->db->getLastId(); |
|
866 | + $blog_post_id = $this->db->getLastId(); |
|
867 | 867 | |
868 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_description SET post_id = '" . (int)$blog_post_id . "', `language_id` = '1', `name` = 'Arastta 1.6 Released', `description` = '<p>Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>\r\n<h1>HTML Ipsum Presents</h1>\r\n<p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p>\r\n<h2>Header Level 2</h2>\r\n<ol>\r\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>\r\n<li>Aliquam tincidunt mauris eu risus.</li>\r\n</ol>\r\n<blockquote>\r\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est.</p>\r\n</blockquote>\r\n<h3>Header Level 3</h3>\r\n<ul>\r\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>\r\n<li>Aliquam tincidunt mauris eu risus.</li>\r\n</ul>', `tag` = '', `meta_title` = 'Arastta 1.6 Released', `meta_description` = '', `meta_keyword` = ''"); |
|
868 | + $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_description SET post_id = '" . (int)$blog_post_id . "', `language_id` = '1', `name` = 'Arastta 1.6 Released', `description` = '<p>Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>\r\n<h1>HTML Ipsum Presents</h1>\r\n<p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p>\r\n<h2>Header Level 2</h2>\r\n<ol>\r\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>\r\n<li>Aliquam tincidunt mauris eu risus.</li>\r\n</ol>\r\n<blockquote>\r\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est.</p>\r\n</blockquote>\r\n<h3>Header Level 3</h3>\r\n<ul>\r\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>\r\n<li>Aliquam tincidunt mauris eu risus.</li>\r\n</ul>', `tag` = '', `meta_title` = 'Arastta 1.6 Released', `meta_description` = '', `meta_keyword` = ''"); |
|
869 | 869 | |
870 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_category SET post_id = '" . (int)$blog_post_id . "', category_id = '" . (int)$blog_category_id . "'"); |
|
870 | + $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_category SET post_id = '" . (int)$blog_post_id . "', category_id = '" . (int)$blog_category_id . "'"); |
|
871 | 871 | |
872 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_layout SET post_id = '" . (int)$blog_post_id . "', `store_id` = '0', `layout_id` = '0'"); |
|
872 | + $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_layout SET post_id = '" . (int)$blog_post_id . "', `store_id` = '0', `layout_id` = '0'"); |
|
873 | 873 | |
874 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_store SET post_id = '" . (int)$blog_post_id . "', `store_id` = '0'"); |
|
874 | + $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_store SET post_id = '" . (int)$blog_post_id . "', `store_id` = '0'"); |
|
875 | 875 | |
876 | - // Add Blog Comment |
|
877 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_comment SET `post_id` = '" . (int)$blog_post_id . "', `customer_id` = '0', `email` = '[email protected]', `author` = 'Cüneyt Şentürk', `text` = 'This release is awesome! I will update my store as soon as possible.', `status` = '1', `date_added` = '2017-04-06 14:55:32', `date_modified` = '0000-00-00 00:00:00'"); |
|
876 | + // Add Blog Comment |
|
877 | + $this->db->query("INSERT INTO " . DB_PREFIX . "blog_comment SET `post_id` = '" . (int)$blog_post_id . "', `customer_id` = '0', `email` = '[email protected]', `author` = 'Cüneyt Şentürk', `text` = 'This release is awesome! I will update my store as soon as possible.', `status` = '1', `date_added` = '2017-04-06 14:55:32', `date_modified` = '0000-00-00 00:00:00'"); |
|
878 | 878 | |
879 | - // Add Blog Post Url Alias |
|
880 | - $this->db->query("INSERT INTO " . DB_PREFIX . "url_alias SET `query` = 'blog_post_id=" . (int)$blog_post_id . "', `keyword` = 'arastta-1-6-released', `language_id` = '1'"); |
|
879 | + // Add Blog Post Url Alias |
|
880 | + $this->db->query("INSERT INTO " . DB_PREFIX . "url_alias SET `query` = 'blog_post_id=" . (int)$blog_post_id . "', `keyword` = 'arastta-1-6-released', `language_id` = '1'"); |
|
881 | 881 | |
882 | - // Add Blog Post |
|
883 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post SET `allow_comment` = '1', `featured` = '1', `viewed` = '5', `image` = 'catalog/demo/blog/big-thing-arastta.jpg', `author` = 'Denis Duliçi', `date_available` = '2017-04-06', `sort_order` = '0', `status` = '1', `date_added` = '2017-04-06 15:00:51', `date_modified` = '0000-00-00 00:00:00'"); |
|
882 | + // Add Blog Post |
|
883 | + $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post SET `allow_comment` = '1', `featured` = '1', `viewed` = '5', `image` = 'catalog/demo/blog/big-thing-arastta.jpg', `author` = 'Denis Duliçi', `date_available` = '2017-04-06', `sort_order` = '0', `status` = '1', `date_added` = '2017-04-06 15:00:51', `date_modified` = '0000-00-00 00:00:00'"); |
|
884 | 884 | |
885 | - $blog_post_id = $this->db->getLastId(); |
|
885 | + $blog_post_id = $this->db->getLastId(); |
|
886 | 886 | |
887 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_description SET post_id = '" . (int)$blog_post_id . "', `language_id` = '1', `name` = 'The next big Arastta thing ;)', `description` = '<p>Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>\r\n<h1>HTML Ipsum Presents</h1>\r\n<p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p>\r\n<h2>Header Level 2</h2>\r\n<ol>\r\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>\r\n<li>Aliquam tincidunt mauris eu risus.</li>\r\n</ol>\r\n<blockquote>\r\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est.</p>\r\n</blockquote>\r\n<h3>Header Level 3</h3>\r\n<ul>\r\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>\r\n<li>Aliquam tincidunt mauris eu risus.</li>\r\n</ul>', `tag` = '', `meta_title` = 'The next big Arastta thing ;)', `meta_description` = '', `meta_keyword` = ''"); |
|
887 | + $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_description SET post_id = '" . (int)$blog_post_id . "', `language_id` = '1', `name` = 'The next big Arastta thing ;)', `description` = '<p>Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>\r\n<h1>HTML Ipsum Presents</h1>\r\n<p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p>\r\n<h2>Header Level 2</h2>\r\n<ol>\r\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>\r\n<li>Aliquam tincidunt mauris eu risus.</li>\r\n</ol>\r\n<blockquote>\r\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est.</p>\r\n</blockquote>\r\n<h3>Header Level 3</h3>\r\n<ul>\r\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>\r\n<li>Aliquam tincidunt mauris eu risus.</li>\r\n</ul>', `tag` = '', `meta_title` = 'The next big Arastta thing ;)', `meta_description` = '', `meta_keyword` = ''"); |
|
888 | 888 | |
889 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_category SET post_id = '" . (int)$blog_post_id . "', category_id = '" . (int)$blog_category_id . "'"); |
|
889 | + $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_category SET post_id = '" . (int)$blog_post_id . "', category_id = '" . (int)$blog_category_id . "'"); |
|
890 | 890 | |
891 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_layout SET post_id = '" . (int)$blog_post_id . "', `store_id` = '0', `layout_id` = '0'"); |
|
891 | + $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_layout SET post_id = '" . (int)$blog_post_id . "', `store_id` = '0', `layout_id` = '0'"); |
|
892 | 892 | |
893 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_store SET post_id = '" . (int)$blog_post_id . "', `store_id` = '0'"); |
|
893 | + $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_store SET post_id = '" . (int)$blog_post_id . "', `store_id` = '0'"); |
|
894 | 894 | |
895 | - // Add Blog Post Url Alias |
|
896 | - $this->db->query("INSERT INTO " . DB_PREFIX . "url_alias SET `query` = 'blog_post_id=" . (int)$blog_post_id . "', `keyword` = 'the-next-big-arastta-thing', `language_id` = '1'"); |
|
895 | + // Add Blog Post Url Alias |
|
896 | + $this->db->query("INSERT INTO " . DB_PREFIX . "url_alias SET `query` = 'blog_post_id=" . (int)$blog_post_id . "', `keyword` = 'the-next-big-arastta-thing', `language_id` = '1'"); |
|
897 | 897 | |
898 | - // Add Blog Home Url Alias |
|
899 | - $this->db->query("INSERT INTO " . DB_PREFIX . "url_alias SET `query` = 'route=blog/home', `keyword` = 'blog', `language_id` = '1'"); |
|
898 | + // Add Blog Home Url Alias |
|
899 | + $this->db->query("INSERT INTO " . DB_PREFIX . "url_alias SET `query` = 'route=blog/home', `keyword` = 'blog', `language_id` = '1'"); |
|
900 | 900 | |
901 | - // Add setting table |
|
902 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_width', `value` = '600'"); |
|
903 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_height', `value` = '400'"); |
|
904 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_width', `value` = '600'"); |
|
905 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_height', `value` = '400'"); |
|
906 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_name', `value` = 'Arastta Blog'"); |
|
907 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_description', `value` = '<p>Welcome to the Arastta Blog\'s home</p>'"); |
|
908 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_featured_slide', `value` = '1'"); |
|
909 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_meta_title', `value` = 'Arastta Blog'"); |
|
910 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_meta_description', `value` = ''"); |
|
911 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_meta_keyword', `value` = ''"); |
|
912 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_limit', `value` = '5'"); |
|
913 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_description_length', `value` = '300'"); |
|
914 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_row', `value` = '1'"); |
|
915 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_sort_order', `value` = 'p.date_added-DESC'"); |
|
916 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_date', `value` = '1'"); |
|
917 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_comment', `value` = '1'"); |
|
918 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_read', `value` = '1'"); |
|
919 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_author', `value` = '1'"); |
|
920 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_date', `value` = '1'"); |
|
921 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_comment', `value` = '1'"); |
|
922 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_read', `value` = '1'"); |
|
923 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_author', `value` = '1'"); |
|
924 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_share', `value` = '1'"); |
|
925 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_comment_enable', `value` = '1'"); |
|
926 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_comment_status', `value` = '0'"); |
|
927 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_comment_guest', `value` = '0'"); |
|
928 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_comment_limit', `value` = '5'"); |
|
929 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_comment_mail', `value` = '1'"); |
|
901 | + // Add setting table |
|
902 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_width', `value` = '600'"); |
|
903 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_height', `value` = '400'"); |
|
904 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_width', `value` = '600'"); |
|
905 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_height', `value` = '400'"); |
|
906 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_name', `value` = 'Arastta Blog'"); |
|
907 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_description', `value` = '<p>Welcome to the Arastta Blog\'s home</p>'"); |
|
908 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_featured_slide', `value` = '1'"); |
|
909 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_meta_title', `value` = 'Arastta Blog'"); |
|
910 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_meta_description', `value` = ''"); |
|
911 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_meta_keyword', `value` = ''"); |
|
912 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_limit', `value` = '5'"); |
|
913 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_description_length', `value` = '300'"); |
|
914 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_row', `value` = '1'"); |
|
915 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_sort_order', `value` = 'p.date_added-DESC'"); |
|
916 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_date', `value` = '1'"); |
|
917 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_comment', `value` = '1'"); |
|
918 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_read', `value` = '1'"); |
|
919 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_author', `value` = '1'"); |
|
920 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_date', `value` = '1'"); |
|
921 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_comment', `value` = '1'"); |
|
922 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_read', `value` = '1'"); |
|
923 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_author', `value` = '1'"); |
|
924 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_share', `value` = '1'"); |
|
925 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_comment_enable', `value` = '1'"); |
|
926 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_comment_status', `value` = '0'"); |
|
927 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_comment_guest', `value` = '0'"); |
|
928 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_comment_limit', `value` = '5'"); |
|
929 | + $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_comment_mail', `value` = '1'"); |
|
930 | 930 | } |
@@ -13,16 +13,16 @@ discard block |
||
13 | 13 | // 1.0.3 changes; |
14 | 14 | if (version_compare(VERSION, '1.0.3', '<')) { |
15 | 15 | // Delete language english directory |
16 | - $this->filesystem->remove(DIR_LANGUAGE . 'english'); |
|
17 | - $this->filesystem->remove(DIR_CATALOG . 'language/english'); |
|
16 | + $this->filesystem->remove(DIR_LANGUAGE.'english'); |
|
17 | + $this->filesystem->remove(DIR_CATALOG.'language/english'); |
|
18 | 18 | |
19 | 19 | // Update language directory name |
20 | - $this->db->query("UPDATE `" . DB_PREFIX . "language` SET `directory` = 'en-GB' WHERE `code` = 'en';"); |
|
20 | + $this->db->query("UPDATE `".DB_PREFIX."language` SET `directory` = 'en-GB' WHERE `code` = 'en';"); |
|
21 | 21 | |
22 | 22 | // Add field ('params') Addon table |
23 | 23 | $addon = array(); |
24 | 24 | |
25 | - $query = $this->db->query("SHOW COLUMNS FROM `" . DB_PREFIX . "addon`"); |
|
25 | + $query = $this->db->query("SHOW COLUMNS FROM `".DB_PREFIX."addon`"); |
|
26 | 26 | |
27 | 27 | if ($query->num_rows) { |
28 | 28 | foreach ($query->rows as $row) { |
@@ -31,14 +31,14 @@ discard block |
||
31 | 31 | } |
32 | 32 | |
33 | 33 | if (!in_array('params', $addon)) { |
34 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "addon` ADD COLUMN `params` TEXT DEFAULT NULL"); |
|
34 | + $this->db->query("ALTER TABLE `".DB_PREFIX."addon` ADD COLUMN `params` TEXT DEFAULT NULL"); |
|
35 | 35 | } |
36 | 36 | } |
37 | 37 | |
38 | 38 | // 1.1.0 changes; |
39 | 39 | if (version_compare(VERSION, '1.1.0', '<')) { |
40 | 40 | // Update the user groups |
41 | - $user_groups = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "user_group"); |
|
41 | + $user_groups = $this->db->query("SELECT DISTINCT * FROM ".DB_PREFIX."user_group"); |
|
42 | 42 | |
43 | 43 | foreach ($user_groups->rows as $user_group) { |
44 | 44 | $user_group['permission'] = unserialize($user_group['permission']); |
@@ -59,11 +59,11 @@ discard block |
||
59 | 59 | '6' => 'dashboard/map', |
60 | 60 | ); |
61 | 61 | |
62 | - $this->db->query("UPDATE " . DB_PREFIX . "user_group SET name = '" . $this->db->escape($user_group['name']) . "', permission = '" . $this->db->escape(serialize($user_group['permission'])) . "' WHERE user_group_id = '" . (int)$user_group['user_group_id'] . "'"); |
|
62 | + $this->db->query("UPDATE ".DB_PREFIX."user_group SET name = '".$this->db->escape($user_group['name'])."', permission = '".$this->db->escape(serialize($user_group['permission']))."' WHERE user_group_id = '".(int)$user_group['user_group_id']."'"); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | // Update the modules |
66 | - $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "module`"); |
|
66 | + $query = $this->db->query("SELECT * FROM `".DB_PREFIX."module`"); |
|
67 | 67 | |
68 | 68 | foreach ($query->rows as $module) { |
69 | 69 | $module_setting = unserialize($module['setting']); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | if (isset($module_setting['product']) || ($module['code'] == 'featured')) { |
72 | 72 | $module_setting['feed'] = 1; |
73 | 73 | |
74 | - $this->db->query("UPDATE `" . DB_PREFIX . "module` SET `name` = '" . $this->db->escape($module_setting['name']) . "', `setting` = '" . $this->db->escape(serialize($module_setting)) . "' WHERE `module_id` = '" . (int)$module['module_id'] . "'"); |
|
74 | + $this->db->query("UPDATE `".DB_PREFIX."module` SET `name` = '".$this->db->escape($module_setting['name'])."', `setting` = '".$this->db->escape(serialize($module_setting))."' WHERE `module_id` = '".(int)$module['module_id']."'"); |
|
75 | 75 | } |
76 | 76 | } |
77 | 77 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | // 1.1.3 changes; |
80 | 80 | if (version_compare(VERSION, '1.1.3', '<')) { |
81 | 81 | // Delete modification table |
82 | - $this->db->query("DROP TABLE `" . DB_PREFIX . "modification`"); |
|
82 | + $this->db->query("DROP TABLE `".DB_PREFIX."modification`"); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | // 1.2.0 changes; |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | // Update user table |
88 | 88 | $user = array(); |
89 | 89 | |
90 | - $query = $this->db->query("SHOW COLUMNS FROM `" . DB_PREFIX . "user`"); |
|
90 | + $query = $this->db->query("SHOW COLUMNS FROM `".DB_PREFIX."user`"); |
|
91 | 91 | |
92 | 92 | if ($query->num_rows) { |
93 | 93 | foreach ($query->rows as $row) { |
@@ -96,16 +96,16 @@ discard block |
||
96 | 96 | } |
97 | 97 | |
98 | 98 | if (!in_array('params', $user)) { |
99 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "user` MODIFY `username` VARCHAR(100)"); |
|
100 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "user` MODIFY `password` VARCHAR(100)"); |
|
101 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "user` MODIFY `email` VARCHAR(100)"); |
|
102 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "user` ADD `params` text AFTER `date_added`"); |
|
99 | + $this->db->query("ALTER TABLE `".DB_PREFIX."user` MODIFY `username` VARCHAR(100)"); |
|
100 | + $this->db->query("ALTER TABLE `".DB_PREFIX."user` MODIFY `password` VARCHAR(100)"); |
|
101 | + $this->db->query("ALTER TABLE `".DB_PREFIX."user` MODIFY `email` VARCHAR(100)"); |
|
102 | + $this->db->query("ALTER TABLE `".DB_PREFIX."user` ADD `params` text AFTER `date_added`"); |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | // Update stock status table |
106 | 106 | $stock_status = array(); |
107 | 107 | |
108 | - $query = $this->db->query("SHOW COLUMNS FROM `" . DB_PREFIX . "stock_status`"); |
|
108 | + $query = $this->db->query("SHOW COLUMNS FROM `".DB_PREFIX."stock_status`"); |
|
109 | 109 | |
110 | 110 | if ($query->num_rows) { |
111 | 111 | foreach ($query->rows as $row) { |
@@ -114,31 +114,31 @@ discard block |
||
114 | 114 | } |
115 | 115 | |
116 | 116 | if (!in_array('color', $stock_status)) { |
117 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "stock_status` ADD `color` VARCHAR(32) NOT NULL AFTER `name`"); |
|
117 | + $this->db->query("ALTER TABLE `".DB_PREFIX."stock_status` ADD `color` VARCHAR(32) NOT NULL AFTER `name`"); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | // Added stock status default color |
121 | - $this->db->query("UPDATE `" . DB_PREFIX . "stock_status` SET `color` = '#FF0000' WHERE `stock_status_id` = '5'"); |
|
122 | - $this->db->query("UPDATE `" . DB_PREFIX . "stock_status` SET `color` = '#FFA500' WHERE `stock_status_id` = '6'"); |
|
123 | - $this->db->query("UPDATE `" . DB_PREFIX . "stock_status` SET `color` = '#008000' WHERE `stock_status_id` = '7'"); |
|
124 | - $this->db->query("UPDATE `" . DB_PREFIX . "stock_status` SET `color` = '#FFFF00' WHERE `stock_status_id` = '8'"); |
|
121 | + $this->db->query("UPDATE `".DB_PREFIX."stock_status` SET `color` = '#FF0000' WHERE `stock_status_id` = '5'"); |
|
122 | + $this->db->query("UPDATE `".DB_PREFIX."stock_status` SET `color` = '#FFA500' WHERE `stock_status_id` = '6'"); |
|
123 | + $this->db->query("UPDATE `".DB_PREFIX."stock_status` SET `color` = '#008000' WHERE `stock_status_id` = '7'"); |
|
124 | + $this->db->query("UPDATE `".DB_PREFIX."stock_status` SET `color` = '#FFFF00' WHERE `stock_status_id` = '8'"); |
|
125 | 125 | |
126 | 126 | // Insert email template for return request |
127 | - $this->db->query("INSERT INTO `" . DB_PREFIX . "email` SET `text` = 'Return Request', `text_id` = '1', `context` = 'added', `type` = 'return', `status` = '1'"); |
|
127 | + $this->db->query("INSERT INTO `".DB_PREFIX."email` SET `text` = 'Return Request', `text_id` = '1', `context` = 'added', `type` = 'return', `status` = '1'"); |
|
128 | 128 | $email_id = $this->db->getLastId(); |
129 | 129 | |
130 | - $this->db->query("INSERT INTO `" . DB_PREFIX . "email_description` SET `email_id` = '" . $email_id . "', `name` = '{store_name} - Product Return Request', `description` = '<div style="width:695px;"><p style="margin-top:0px;margin-bottom:20px">You have a new product return request.</p> <table style="border-collapse:collapse; width: 690px;border-top:1px solid #dddddd;border-left:1px solid #dddddd;margin-bottom:20px"> <thead> <tr> <td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;background-color:#efefef;font-weight:bold;text-align:left;padding:7px;color:#222222" colspan="2">Order Details</td> </tr> </thead> <tbody> <tr> <td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;text-align:left;padding:7px"><b>Order ID:&nbsp;</b><span style="font-size: 13px; line-height: 18px; text-align: right;">{order_id}</span><br> <b>Date Ordered:</b>&nbsp;<span style="font-size: 13px; line-height: 18px; text-align: right;">{date_ordered}</span><br><b style="color: rgb(0, 0, 0); font-family: arial, sans-serif; line-height: normal;">Customer</b><b>:</b>&nbsp;<span style="font-size: 13px; line-height: 18px; text-align: right;">{firstname} {lastname}</span><br><b style="color: rgb(0, 0, 0); font-family: arial, sans-serif; line-height: normal;">E-mail</b><b>:</b>&nbsp;<span style="font-size: 13px; line-height: 18px; text-align: right;">{email}</span><br><b>Telephone:</b>&nbsp;<span style="font-size: 13px; line-height: 18px; text-align: right;">{telephone}</span><br></td> </tr> </tbody> </table><table style="border-collapse:collapse; width: 690px;border-top:1px solid #dddddd;border-left:1px solid #dddddd;margin-bottom:20px"> <thead> <tr> <td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;background-color:#efefef;font-weight:bold;text-align:left;padding:7px;color:#222222">Product</td> <td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;background-color:#efefef;font-weight:bold;text-align:left;padding:7px;color:#222222">Model</td><td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;background-color:#efefef;font-weight:bold;text-align: right;padding:7px;color:#222222">Quantity</td> </tr> </thead> <tbody> <tr> <td style="width: 40%;font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;text-align:left;padding:7px"><span style="font-size: 13px; line-height: 18px; text-align: right;">{product}</span><br></td> <td style="width: 40%;font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;text-align:left;padding:7px"><span style="font-size: 13px; line-height: 18px; text-align: right;">{model}</span></td><td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;text-align: right;padding:7px"><span style="font-size: 13px; line-height: 18px; text-align: right;">{quantity}</span></td></tr></tbody></table><p></p><p></p><table style="border-collapse:collapse; width: 690px;border-top:1px solid #dddddd;border-left:1px solid #dddddd;margin-bottom:20px"> <thead> <tr> <td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;background-color:#efefef;font-weight:bold;text-align:left;padding:7px;color:#222222" colspan="2">Return Details</td> </tr> </thead> <tbody> <tr> <td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;text-align:left;padding:7px"> <b>Return Reason:&nbsp;</b> <span style="font-size: 13px; line-height: 18px; text-align: right;">{return_reason}</span> <br> <b>Opened:&nbsp;</b> <span style="font-size: 13px; line-height: 18px; text-align: right;">{opened}</span> <br><br> <span style="font-size: 13px; line-height: 18px; text-align: right;">{comment}</span></td> </tr> </tbody></table> </div>', `status` = '1', `language_id` = '1'"); |
|
130 | + $this->db->query("INSERT INTO `".DB_PREFIX."email_description` SET `email_id` = '".$email_id."', `name` = '{store_name} - Product Return Request', `description` = '<div style="width:695px;"><p style="margin-top:0px;margin-bottom:20px">You have a new product return request.</p> <table style="border-collapse:collapse; width: 690px;border-top:1px solid #dddddd;border-left:1px solid #dddddd;margin-bottom:20px"> <thead> <tr> <td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;background-color:#efefef;font-weight:bold;text-align:left;padding:7px;color:#222222" colspan="2">Order Details</td> </tr> </thead> <tbody> <tr> <td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;text-align:left;padding:7px"><b>Order ID:&nbsp;</b><span style="font-size: 13px; line-height: 18px; text-align: right;">{order_id}</span><br> <b>Date Ordered:</b>&nbsp;<span style="font-size: 13px; line-height: 18px; text-align: right;">{date_ordered}</span><br><b style="color: rgb(0, 0, 0); font-family: arial, sans-serif; line-height: normal;">Customer</b><b>:</b>&nbsp;<span style="font-size: 13px; line-height: 18px; text-align: right;">{firstname} {lastname}</span><br><b style="color: rgb(0, 0, 0); font-family: arial, sans-serif; line-height: normal;">E-mail</b><b>:</b>&nbsp;<span style="font-size: 13px; line-height: 18px; text-align: right;">{email}</span><br><b>Telephone:</b>&nbsp;<span style="font-size: 13px; line-height: 18px; text-align: right;">{telephone}</span><br></td> </tr> </tbody> </table><table style="border-collapse:collapse; width: 690px;border-top:1px solid #dddddd;border-left:1px solid #dddddd;margin-bottom:20px"> <thead> <tr> <td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;background-color:#efefef;font-weight:bold;text-align:left;padding:7px;color:#222222">Product</td> <td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;background-color:#efefef;font-weight:bold;text-align:left;padding:7px;color:#222222">Model</td><td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;background-color:#efefef;font-weight:bold;text-align: right;padding:7px;color:#222222">Quantity</td> </tr> </thead> <tbody> <tr> <td style="width: 40%;font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;text-align:left;padding:7px"><span style="font-size: 13px; line-height: 18px; text-align: right;">{product}</span><br></td> <td style="width: 40%;font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;text-align:left;padding:7px"><span style="font-size: 13px; line-height: 18px; text-align: right;">{model}</span></td><td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;text-align: right;padding:7px"><span style="font-size: 13px; line-height: 18px; text-align: right;">{quantity}</span></td></tr></tbody></table><p></p><p></p><table style="border-collapse:collapse; width: 690px;border-top:1px solid #dddddd;border-left:1px solid #dddddd;margin-bottom:20px"> <thead> <tr> <td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;background-color:#efefef;font-weight:bold;text-align:left;padding:7px;color:#222222" colspan="2">Return Details</td> </tr> </thead> <tbody> <tr> <td style="font-size:12px;border-right:1px solid #dddddd;border-bottom:1px solid #dddddd;text-align:left;padding:7px"> <b>Return Reason:&nbsp;</b> <span style="font-size: 13px; line-height: 18px; text-align: right;">{return_reason}</span> <br> <b>Opened:&nbsp;</b> <span style="font-size: 13px; line-height: 18px; text-align: right;">{opened}</span> <br><br> <span style="font-size: 13px; line-height: 18px; text-align: right;">{comment}</span></td> </tr> </tbody></table> </div>', `status` = '1', `language_id` = '1'"); |
|
131 | 131 | |
132 | 132 | // Insert email template for out of stock |
133 | - $this->db->query("INSERT INTO `" . DB_PREFIX . "email` SET `text` = 'Out Of Stock', `text_id` = '1', `context` = 'out', `type` = 'stock', `status` = '1'"); |
|
133 | + $this->db->query("INSERT INTO `".DB_PREFIX."email` SET `text` = 'Out Of Stock', `text_id` = '1', `context` = 'out', `type` = 'stock', `status` = '1'"); |
|
134 | 134 | $email_id = $this->db->getLastId(); |
135 | 135 | |
136 | - $this->db->query("INSERT INTO `" . DB_PREFIX . "email_description` SET `email_id` = '" . $email_id . "', `name` = '{store_name} - {total_products} Product(s) Out Of Stock', `description` = 'Hello,<br><br>We would like to notify that you have <b>{total_products}</b> product(s) out of stock in store <strong>{store_name}</strong>.<br><br>You can view them by clicking on Notifications icon -> Out of Stock, or browse to Catalog -> Products and filter quantity = 0.<br><br>Best Regards,<br><br>The {store_name} team', `status` = '1', `language_id` = '1'"); |
|
136 | + $this->db->query("INSERT INTO `".DB_PREFIX."email_description` SET `email_id` = '".$email_id."', `name` = '{store_name} - {total_products} Product(s) Out Of Stock', `description` = 'Hello,<br><br>We would like to notify that you have <b>{total_products}</b> product(s) out of stock in store <strong>{store_name}</strong>.<br><br>You can view them by clicking on Notifications icon -> Out of Stock, or browse to Catalog -> Products and filter quantity = 0.<br><br>Best Regards,<br><br>The {store_name} team', `status` = '1', `language_id` = '1'"); |
|
137 | 137 | |
138 | 138 | // Extension/Theme manager |
139 | 139 | $addon = array(); |
140 | 140 | |
141 | - $query = $this->db->query("SHOW COLUMNS FROM `" . DB_PREFIX . "addon`"); |
|
141 | + $query = $this->db->query("SHOW COLUMNS FROM `".DB_PREFIX."addon`"); |
|
142 | 142 | |
143 | 143 | if ($query->num_rows) { |
144 | 144 | foreach ($query->rows as $row) { |
@@ -147,12 +147,12 @@ discard block |
||
147 | 147 | } |
148 | 148 | |
149 | 149 | if (!in_array('addon_files', $addon)) { |
150 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "addon` CHANGE `addon_files` `files` TEXT NULL"); |
|
150 | + $this->db->query("ALTER TABLE `".DB_PREFIX."addon` CHANGE `addon_files` `files` TEXT NULL"); |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | $extension = array(); |
154 | 154 | |
155 | - $query = $this->db->query("SHOW COLUMNS FROM `" . DB_PREFIX . "extension`"); |
|
155 | + $query = $this->db->query("SHOW COLUMNS FROM `".DB_PREFIX."extension`"); |
|
156 | 156 | |
157 | 157 | if ($query->num_rows) { |
158 | 158 | foreach ($query->rows as $row) { |
@@ -161,10 +161,10 @@ discard block |
||
161 | 161 | } |
162 | 162 | |
163 | 163 | if (!in_array('info', $extension)) { |
164 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "extension` ADD `info` TEXT NULL AFTER `code`, ADD `params` TEXT NULL AFTER `info`"); |
|
164 | + $this->db->query("ALTER TABLE `".DB_PREFIX."extension` ADD `info` TEXT NULL AFTER `code`, ADD `params` TEXT NULL AFTER `info`"); |
|
165 | 165 | } |
166 | 166 | |
167 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "theme` ( |
|
167 | + $this->db->query("CREATE TABLE IF NOT EXISTS `".DB_PREFIX."theme` ( |
|
168 | 168 | `theme_id` int(11) NOT NULL AUTO_INCREMENT, |
169 | 169 | `code` varchar(32) NOT NULL, |
170 | 170 | `info` text NULL, |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
174 | 174 | |
175 | 175 | // Update params of addons |
176 | - $addons = $this->db->query("SELECT * FROM `" . DB_PREFIX . "addon`")->rows; |
|
176 | + $addons = $this->db->query("SELECT * FROM `".DB_PREFIX."addon`")->rows; |
|
177 | 177 | |
178 | 178 | foreach ($addons as $addon) { |
179 | 179 | $params = json_decode($addon['params'], true); |
@@ -188,11 +188,11 @@ discard block |
||
188 | 188 | $params['theme_ids'] = array(); |
189 | 189 | $params['extension_ids'] = array(); |
190 | 190 | |
191 | - $this->db->query("UPDATE `" . DB_PREFIX . "addon` SET `params` = '" . json_encode($params) . "' WHERE `addon_id` = '" . $addon['addon_id'] . "'"); |
|
191 | + $this->db->query("UPDATE `".DB_PREFIX."addon` SET `params` = '".json_encode($params)."' WHERE `addon_id` = '".$addon['addon_id']."'"); |
|
192 | 192 | } |
193 | 193 | |
194 | 194 | // Invoices |
195 | - $this->db->query("CREATE TABLE `" . DB_PREFIX . "invoice` ( |
|
195 | + $this->db->query("CREATE TABLE `".DB_PREFIX."invoice` ( |
|
196 | 196 | `invoice_id` int(11) NOT NULL AUTO_INCREMENT, |
197 | 197 | `order_id` int(11) NOT NULL, |
198 | 198 | `invoice_date` datetime NOT NULL, |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | KEY `order_id` (`order_id`) |
201 | 201 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
202 | 202 | |
203 | - $this->db->query("CREATE TABLE `" . DB_PREFIX . "invoice_history` ( |
|
203 | + $this->db->query("CREATE TABLE `".DB_PREFIX."invoice_history` ( |
|
204 | 204 | `invoice_history_id` int(11) NOT NULL AUTO_INCREMENT, |
205 | 205 | `invoice_id` int(11) NOT NULL, |
206 | 206 | `notify` tinyint(1) NOT NULL DEFAULT '0', |
@@ -210,22 +210,22 @@ discard block |
||
210 | 210 | KEY `invoice_id` (`invoice_id`) |
211 | 211 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
212 | 212 | |
213 | - $orders = $this->db->query("SELECT order_id, date_added FROM `" . DB_PREFIX . "order` WHERE `invoice_no` <> ''")->rows; |
|
213 | + $orders = $this->db->query("SELECT order_id, date_added FROM `".DB_PREFIX."order` WHERE `invoice_no` <> ''")->rows; |
|
214 | 214 | |
215 | 215 | foreach ($orders as $order) { |
216 | - $this->db->query("INSERT INTO " . DB_PREFIX . "invoice SET invoice_date = '" . $this->db->escape($order['date_added']) . "', order_id = '" . (int) $order['order_id'] . "'"); |
|
216 | + $this->db->query("INSERT INTO ".DB_PREFIX."invoice SET invoice_date = '".$this->db->escape($order['date_added'])."', order_id = '".(int)$order['order_id']."'"); |
|
217 | 217 | } |
218 | 218 | |
219 | - $this->db->query("INSERT INTO `" . DB_PREFIX . "email` SET `text` = 'Invoice Mail', `text_id` = '1', `context` = 'invoice.mail', `type` = 'invoice', `status` = '1'"); |
|
219 | + $this->db->query("INSERT INTO `".DB_PREFIX."email` SET `text` = 'Invoice Mail', `text_id` = '1', `context` = 'invoice.mail', `type` = 'invoice', `status` = '1'"); |
|
220 | 220 | $email_id = $this->db->getLastId(); |
221 | - $this->db->query("INSERT INTO `" . DB_PREFIX . "email_description` SET `email_id` = '" . $email_id . "', `name` = 'Invoice for your {order_id} order', `description` = '<p>Hello {customer},</p><p><br></p><p>Thank you for your interest in {store_name} products. You can find the invoice in the attachment.</p><p><br></p><p>Please reply to this e-mail if you have any questions.<br></p>', `status` = '1', `language_id` = '1'"); |
|
221 | + $this->db->query("INSERT INTO `".DB_PREFIX."email_description` SET `email_id` = '".$email_id."', `name` = 'Invoice for your {order_id} order', `description` = '<p>Hello {customer},</p><p><br></p><p>Thank you for your interest in {store_name} products. You can find the invoice in the attachment.</p><p><br></p><p>Please reply to this e-mail if you have any questions.<br></p>', `status` = '1', `language_id` = '1'"); |
|
222 | 222 | |
223 | - $this->db->query("INSERT INTO `" . DB_PREFIX . "email` SET `text` = 'Invoice History', `text_id` = '2', `context` = 'invoice.history', `type` = 'invoice', `status` = '1'"); |
|
223 | + $this->db->query("INSERT INTO `".DB_PREFIX."email` SET `text` = 'Invoice History', `text_id` = '2', `context` = 'invoice.history', `type` = 'invoice', `status` = '1'"); |
|
224 | 224 | $email_id = $this->db->getLastId(); |
225 | - $this->db->query("INSERT INTO `" . DB_PREFIX . "email_description` SET `email_id` = '" . $email_id . "', `name` = '{store_name} Invoice - {invoice_no} History', `description` = '<p>Invoice No.:&nbsp;{invoice_no}</p><p>Invoice Date:&nbsp;{date_added}<br></p><p>The comments for your invoice are:</p><p>{comment}</p><p>Please reply to this email if you have any questions.<br></p>', `status` = '1', `language_id` = '1'"); |
|
225 | + $this->db->query("INSERT INTO `".DB_PREFIX."email_description` SET `email_id` = '".$email_id."', `name` = '{store_name} Invoice - {invoice_no} History', `description` = '<p>Invoice No.:&nbsp;{invoice_no}</p><p>Invoice Date:&nbsp;{date_added}<br></p><p>The comments for your invoice are:</p><p>{comment}</p><p>Please reply to this email if you have any questions.<br></p>', `status` = '1', `language_id` = '1'"); |
|
226 | 226 | |
227 | 227 | // Update user groups |
228 | - $user_groups = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "user_group"); |
|
228 | + $user_groups = $this->db->query("SELECT DISTINCT * FROM ".DB_PREFIX."user_group"); |
|
229 | 229 | |
230 | 230 | foreach ($user_groups->rows as $user_group) { |
231 | 231 | $user_group['permission'] = unserialize($user_group['permission']); |
@@ -245,159 +245,159 @@ discard block |
||
245 | 245 | $user_group['permission']['access'][] = 'editor/tinymce'; |
246 | 246 | $user_group['permission']['modify'][] = 'editor/tinymce'; |
247 | 247 | |
248 | - $this->db->query("UPDATE " . DB_PREFIX . "user_group SET name = '" . $this->db->escape($user_group['name']) . "', permission = '" . $this->db->escape(serialize($user_group['permission'])) . "' WHERE user_group_id = '" . (int)$user_group['user_group_id'] . "'"); |
|
248 | + $this->db->query("UPDATE ".DB_PREFIX."user_group SET name = '".$this->db->escape($user_group['name'])."', permission = '".$this->db->escape(serialize($user_group['permission']))."' WHERE user_group_id = '".(int)$user_group['user_group_id']."'"); |
|
249 | 249 | } |
250 | 250 | |
251 | 251 | // Update users |
252 | - $users = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "user"); |
|
252 | + $users = $this->db->query("SELECT DISTINCT * FROM ".DB_PREFIX."user"); |
|
253 | 253 | |
254 | 254 | foreach ($users->rows as $user) { |
255 | - $params = '{"theme":"basic","basic_mode_message":"show","language":"' . $this->session->data['admin_language'] . '","editor":"summernote"}'; |
|
255 | + $params = '{"theme":"basic","basic_mode_message":"show","language":"'.$this->session->data['admin_language'].'","editor":"summernote"}'; |
|
256 | 256 | |
257 | - $this->db->query("UPDATE " . DB_PREFIX . "user SET params = '" . $this->db->escape($params) . "' WHERE user_id = '" . (int)$user['user_id'] . "'"); |
|
257 | + $this->db->query("UPDATE ".DB_PREFIX."user SET params = '".$this->db->escape($params)."' WHERE user_id = '".(int)$user['user_id']."'"); |
|
258 | 258 | } |
259 | 259 | |
260 | - if (!file_exists(DIR_ADMIN . 'controller/module/pp_login.php')) { |
|
261 | - $this->filesystem->remove(DIR_CATALOG . 'event/app/pp_login.php'); |
|
260 | + if (!file_exists(DIR_ADMIN.'controller/module/pp_login.php')) { |
|
261 | + $this->filesystem->remove(DIR_CATALOG.'event/app/pp_login.php'); |
|
262 | 262 | } |
263 | 263 | } |
264 | 264 | |
265 | 265 | // 1.2.4 changes; |
266 | 266 | if (version_compare(VERSION, '1.2.4', '<')) { |
267 | 267 | // Update download table |
268 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "download` CHANGE `filename` `filename` varchar(255) NOT NULL"); |
|
269 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "download` CHANGE `mask` `mask` varchar(255) NOT NULL"); |
|
268 | + $this->db->query("ALTER TABLE `".DB_PREFIX."download` CHANGE `filename` `filename` varchar(255) NOT NULL"); |
|
269 | + $this->db->query("ALTER TABLE `".DB_PREFIX."download` CHANGE `mask` `mask` varchar(255) NOT NULL"); |
|
270 | 270 | } |
271 | 271 | |
272 | 272 | // 1.3.0 changes; |
273 | 273 | if (version_compare(VERSION, '1.3.0', '<')) { |
274 | 274 | // Insert setting table |
275 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_admin_template', `value` = 'basic'"); |
|
276 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_admin_template_message', `value` = 'show'"); |
|
275 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_admin_template', `value` = 'basic'"); |
|
276 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_admin_template_message', `value` = 'show'"); |
|
277 | 277 | |
278 | - $addon = $this->db->query("SELECT * FROM " . DB_PREFIX . "addon WHERE `files` LIKE '%summernote%'"); |
|
278 | + $addon = $this->db->query("SELECT * FROM ".DB_PREFIX."addon WHERE `files` LIKE '%summernote%'"); |
|
279 | 279 | |
280 | 280 | if (empty($addon->num_rows)) { |
281 | - $this->db->query("INSERT INTO " . DB_PREFIX . "extension SET type = 'editor', `code` = 'summernote'"); |
|
281 | + $this->db->query("INSERT INTO ".DB_PREFIX."extension SET type = 'editor', `code` = 'summernote'"); |
|
282 | 282 | |
283 | 283 | $extension_id = $this->db->getLastId(); |
284 | 284 | |
285 | - $this->db->query("INSERT INTO " . DB_PREFIX . "addon SET product_id = '0', `product_name` = 'Summernote', `product_type` = 'editor', `product_version` = '1.0.0', `files` = '[\"admin\\/controller\\\\editor\\\\summernote.php","admin\\/language\\\\en-GB\\\\editor\\\\summernote.php","admin\\/view\\\\template\\\\editor\\\\summernote.tpl\"]', `params` = '{\"theme_ids\":[],\"extension_ids\":[" . $extension_id . "]}'"); |
|
285 | + $this->db->query("INSERT INTO ".DB_PREFIX."addon SET product_id = '0', `product_name` = 'Summernote', `product_type` = 'editor', `product_version` = '1.0.0', `files` = '[\"admin\\/controller\\\\editor\\\\summernote.php", "admin\\/language\\\\en-GB\\\\editor\\\\summernote.php", "admin\\/view\\\\template\\\\editor\\\\summernote.tpl\"]', `params` = '{\"theme_ids\":[],\"extension_ids\":[".$extension_id."]}'"); |
|
286 | 286 | } |
287 | 287 | |
288 | - $summernote = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "setting WHERE `code` = 'summernote' AND `key` = 'summernote_status' AND `value` = '1'"); |
|
288 | + $summernote = $this->db->query("SELECT DISTINCT * FROM ".DB_PREFIX."setting WHERE `code` = 'summernote' AND `key` = 'summernote_status' AND `value` = '1'"); |
|
289 | 289 | |
290 | 290 | if (empty($summernote->num_rows)) { |
291 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_status', `value` = '1'"); |
|
292 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_height', `value` = '300'"); |
|
293 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_sort_order', `value` = '1'"); |
|
294 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_style', `value` = '1'"); |
|
295 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_font_bold', `value` = '1'"); |
|
296 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_font_italic', `value` = '1'"); |
|
297 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_font_underline', `value` = '1'"); |
|
298 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_font_clear', `value` = '1'"); |
|
299 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_fontname', `value` = '1'"); |
|
300 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_fontsize', `value` = '1'"); |
|
301 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_color', `value` = '1'"); |
|
302 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_para_ol', `value` = '1'"); |
|
303 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_para_ul', `value` = '1'"); |
|
304 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_para_paragraph', `value` = '1'"); |
|
305 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_height', `value` = '1'"); |
|
306 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_table', `value` = '1'"); |
|
307 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_insert_link', `value` = '1'"); |
|
308 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_insert_picture', `value` = '1'"); |
|
309 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_insert_hr', `value` = '1'"); |
|
310 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_view_fullscreen', `value` = '1'"); |
|
311 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_view_codeview', `value` = '1'"); |
|
312 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_help', `value` = '1'"); |
|
313 | - } |
|
314 | - |
|
315 | - $addon = $this->db->query("SELECT * FROM " . DB_PREFIX . "addon WHERE `files` LIKE '%tinymce%'"); |
|
291 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_status', `value` = '1'"); |
|
292 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_height', `value` = '300'"); |
|
293 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_sort_order', `value` = '1'"); |
|
294 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_style', `value` = '1'"); |
|
295 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_font_bold', `value` = '1'"); |
|
296 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_font_italic', `value` = '1'"); |
|
297 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_font_underline', `value` = '1'"); |
|
298 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_font_clear', `value` = '1'"); |
|
299 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_fontname', `value` = '1'"); |
|
300 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_fontsize', `value` = '1'"); |
|
301 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_color', `value` = '1'"); |
|
302 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_para_ol', `value` = '1'"); |
|
303 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_para_ul', `value` = '1'"); |
|
304 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_para_paragraph', `value` = '1'"); |
|
305 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_height', `value` = '1'"); |
|
306 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_table', `value` = '1'"); |
|
307 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_insert_link', `value` = '1'"); |
|
308 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_insert_picture', `value` = '1'"); |
|
309 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_insert_hr', `value` = '1'"); |
|
310 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_view_fullscreen', `value` = '1'"); |
|
311 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_view_codeview', `value` = '1'"); |
|
312 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'summernote', `key` = 'summernote_tool_help', `value` = '1'"); |
|
313 | + } |
|
314 | + |
|
315 | + $addon = $this->db->query("SELECT * FROM ".DB_PREFIX."addon WHERE `files` LIKE '%tinymce%'"); |
|
316 | 316 | |
317 | 317 | if (empty($addon->num_rows)) { |
318 | - $this->db->query("INSERT INTO " . DB_PREFIX . "extension SET type = 'editor', `code` = 'tinymce'"); |
|
318 | + $this->db->query("INSERT INTO ".DB_PREFIX."extension SET type = 'editor', `code` = 'tinymce'"); |
|
319 | 319 | |
320 | 320 | $extension_id = $this->db->getLastId(); |
321 | 321 | |
322 | - $this->db->query("INSERT INTO " . DB_PREFIX . "addon SET product_id = '0', `product_name` = 'Tinymce', `product_type` = 'editor', `product_version` = '1.0.0', `files` = '[\"admin\\/controller\\\\editor\\\\tinymce.php","admin\\/language\\\\en-GB\\\\editor\\\\tinymce.php","admin\\/view\\\\template\\\\editor\\\\tinymce.tpl\"]', `params` = '{\"theme_ids\":[],\"extension_ids\":[" . $extension_id . "]}'"); |
|
322 | + $this->db->query("INSERT INTO ".DB_PREFIX."addon SET product_id = '0', `product_name` = 'Tinymce', `product_type` = 'editor', `product_version` = '1.0.0', `files` = '[\"admin\\/controller\\\\editor\\\\tinymce.php", "admin\\/language\\\\en-GB\\\\editor\\\\tinymce.php", "admin\\/view\\\\template\\\\editor\\\\tinymce.tpl\"]', `params` = '{\"theme_ids\":[],\"extension_ids\":[".$extension_id."]}'"); |
|
323 | 323 | } |
324 | 324 | |
325 | - $tinymce = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "setting WHERE `code` = 'tinymce' AND `key` = 'tinymce_status' AND `value` = '1'"); |
|
325 | + $tinymce = $this->db->query("SELECT DISTINCT * FROM ".DB_PREFIX."setting WHERE `code` = 'tinymce' AND `key` = 'tinymce_status' AND `value` = '1'"); |
|
326 | 326 | |
327 | 327 | if (empty($tinymce->num_rows)) { |
328 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_status', `value` = '1'"); |
|
329 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_height', `value` = '300'"); |
|
330 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_sort_order', `value` = '1'"); |
|
331 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_edit_undo', `value` = '1'"); |
|
332 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_edit_redo', `value` = '1'"); |
|
333 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_bold', `value` = '1'"); |
|
334 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_italic', `value` = '1'"); |
|
335 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_view_alignleft', `value` = '1'"); |
|
336 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_view_aligncenter', `value` = '1'"); |
|
337 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_view_alignright', `value` = '1'"); |
|
338 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_view_alignjustify', `value` = '1'"); |
|
339 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_file_bullist', `value` = '1'"); |
|
340 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_file_numlist', `value` = '1'"); |
|
341 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_file_outdent', `value` = '1'"); |
|
342 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_file_indent', `value` = '1'"); |
|
343 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_insert_link', `value` = '1'"); |
|
344 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_insert_image', `value` = '1'"); |
|
345 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_imagetools', `value` = '1'"); |
|
328 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_status', `value` = '1'"); |
|
329 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_height', `value` = '300'"); |
|
330 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_sort_order', `value` = '1'"); |
|
331 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_edit_undo', `value` = '1'"); |
|
332 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_edit_redo', `value` = '1'"); |
|
333 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_bold', `value` = '1'"); |
|
334 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_italic', `value` = '1'"); |
|
335 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_view_alignleft', `value` = '1'"); |
|
336 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_view_aligncenter', `value` = '1'"); |
|
337 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_view_alignright', `value` = '1'"); |
|
338 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_view_alignjustify', `value` = '1'"); |
|
339 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_file_bullist', `value` = '1'"); |
|
340 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_file_numlist', `value` = '1'"); |
|
341 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_file_outdent', `value` = '1'"); |
|
342 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_file_indent', `value` = '1'"); |
|
343 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_insert_link', `value` = '1'"); |
|
344 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_insert_image', `value` = '1'"); |
|
345 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_imagetools', `value` = '1'"); |
|
346 | 346 | } |
347 | 347 | |
348 | 348 | // Update length_class_description table |
349 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "length_class_description` CHANGE length_class_id length_class_id INT(11) NOT NULL"); |
|
349 | + $this->db->query("ALTER TABLE `".DB_PREFIX."length_class_description` CHANGE length_class_id length_class_id INT(11) NOT NULL"); |
|
350 | 350 | |
351 | 351 | // Update weight_class_description table |
352 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "weight_class_description` CHANGE weight_class_id weight_class_id INT(11) NOT NULL"); |
|
352 | + $this->db->query("ALTER TABLE `".DB_PREFIX."weight_class_description` CHANGE weight_class_id weight_class_id INT(11) NOT NULL"); |
|
353 | 353 | |
354 | 354 | // Update information_description table |
355 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "information_description` CHANGE description description MEDIUMTEXT NOT NULL"); |
|
355 | + $this->db->query("ALTER TABLE `".DB_PREFIX."information_description` CHANGE description description MEDIUMTEXT NOT NULL"); |
|
356 | 356 | |
357 | 357 | // Insert Module table Cart module => Modal after cart |
358 | - $this->db->query("INSERT INTO " . DB_PREFIX . "module SET `name` = 'Cart - Modal after Add to Cart', `code` = 'cart', `setting` = 'a:15:{s:4:\"name\";s:30:\"Cart - Modal after Add to Cart\";s:5:\"popup\";s:1:\"1\";s:5:\"theme\";s:9:\"mini_cart\";s:6:\"status\";s:1:\"1\";s:13:\"product_image\";s:1:\"1\";s:12:\"product_name\";s:1:\"1\";s:13:\"product_model\";s:1:\"0\";s:16:\"product_quantity\";s:1:\"1\";s:13:\"product_price\";s:1:\"1\";s:13:\"product_total\";s:1:\"1\";s:15:\"button_continue\";s:1:\"1\";s:11:\"button_cart\";s:1:\"1\";s:15:\"button_checkout\";s:1:\"1\";s:6:\"coupon\";s:1:\"1\";s:7:\"message\";s:1:\"1\";}'"); |
|
358 | + $this->db->query("INSERT INTO ".DB_PREFIX."module SET `name` = 'Cart - Modal after Add to Cart', `code` = 'cart', `setting` = 'a:15:{s:4:\"name\";s:30:\"Cart - Modal after Add to Cart\";s:5:\"popup\";s:1:\"1\";s:5:\"theme\";s:9:\"mini_cart\";s:6:\"status\";s:1:\"1\";s:13:\"product_image\";s:1:\"1\";s:12:\"product_name\";s:1:\"1\";s:13:\"product_model\";s:1:\"0\";s:16:\"product_quantity\";s:1:\"1\";s:13:\"product_price\";s:1:\"1\";s:13:\"product_total\";s:1:\"1\";s:15:\"button_continue\";s:1:\"1\";s:11:\"button_cart\";s:1:\"1\";s:15:\"button_checkout\";s:1:\"1\";s:6:\"coupon\";s:1:\"1\";s:7:\"message\";s:1:\"1\";}'"); |
|
359 | 359 | |
360 | 360 | // Update layout_module table |
361 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "layout_module` CHANGE `position` `position` varchar(64) NOT NULL"); |
|
361 | + $this->db->query("ALTER TABLE `".DB_PREFIX."layout_module` CHANGE `position` `position` varchar(64) NOT NULL"); |
|
362 | 362 | |
363 | 363 | // Update coupon table |
364 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "coupon` CHANGE `code` `code` varchar(128) NOT NULL"); |
|
364 | + $this->db->query("ALTER TABLE `".DB_PREFIX."coupon` CHANGE `code` `code` varchar(128) NOT NULL"); |
|
365 | 365 | } |
366 | 366 | |
367 | 367 | // 1.3.1 changes; |
368 | 368 | if (version_compare(VERSION, '1.3.1', '<')) { |
369 | - $tinymce = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "setting WHERE `code` = 'tinymce'"); |
|
369 | + $tinymce = $this->db->query("SELECT DISTINCT * FROM ".DB_PREFIX."setting WHERE `code` = 'tinymce'"); |
|
370 | 370 | |
371 | 371 | if (!empty($tinymce->num_rows)) { |
372 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menubar', `value` = '0'"); |
|
373 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_edit_insertfile', `value` = '0'"); |
|
374 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_styleselect_styleselect', `value` = '0'"); |
|
375 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_underline', `value` = '1'"); |
|
376 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_visualchars', `value` = '0'"); |
|
377 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_visualblocks', `value` = '0'"); |
|
378 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_ltr', `value` = '0'"); |
|
379 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_rtl', `value` = '0'"); |
|
380 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_fontselect', `value` = '1'"); |
|
381 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_fontsizeselect', `value` = '1'"); |
|
382 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_charmap', `value` = '0'"); |
|
383 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_forecolor', `value` = '1'"); |
|
384 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_backcolor', `value` = '1'"); |
|
385 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_file_table', `value` = '1'"); |
|
386 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_insert_image_manager', `value` = '1'"); |
|
387 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_insert_media', `value` = '1'"); |
|
388 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_insert_hr', `value` = '1'"); |
|
389 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_fullscreen', `value` = '1'"); |
|
390 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_code', `value` = '1'"); |
|
391 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_searchreplace', `value` = '0'"); |
|
392 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_pagebreak', `value` = '0'"); |
|
393 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_nonbreaking', `value` = '0'"); |
|
394 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_emoticons', `value` = '0'"); |
|
372 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menubar', `value` = '0'"); |
|
373 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_edit_insertfile', `value` = '0'"); |
|
374 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_styleselect_styleselect', `value` = '0'"); |
|
375 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_underline', `value` = '1'"); |
|
376 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_visualchars', `value` = '0'"); |
|
377 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_visualblocks', `value` = '0'"); |
|
378 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_ltr', `value` = '0'"); |
|
379 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_rtl', `value` = '0'"); |
|
380 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_fontselect', `value` = '1'"); |
|
381 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_fontsizeselect', `value` = '1'"); |
|
382 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_charmap', `value` = '0'"); |
|
383 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_forecolor', `value` = '1'"); |
|
384 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_format_backcolor', `value` = '1'"); |
|
385 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_file_table', `value` = '1'"); |
|
386 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_insert_image_manager', `value` = '1'"); |
|
387 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_insert_media', `value` = '1'"); |
|
388 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_insert_hr', `value` = '1'"); |
|
389 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_fullscreen', `value` = '1'"); |
|
390 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_code', `value` = '1'"); |
|
391 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_searchreplace', `value` = '0'"); |
|
392 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_pagebreak', `value` = '0'"); |
|
393 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_nonbreaking', `value` = '0'"); |
|
394 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'tinymce', `key` = 'tinymce_menu_tools_emoticons', `value` = '0'"); |
|
395 | 395 | } |
396 | 396 | } |
397 | 397 | |
398 | 398 | // 1.3.2 changes; |
399 | 399 | if (version_compare(VERSION, '1.3.2', '<')) { |
400 | - $email_descriptions = $this->db->query("SELECT * FROM " . DB_PREFIX . "email_description"); |
|
400 | + $email_descriptions = $this->db->query("SELECT * FROM ".DB_PREFIX."email_description"); |
|
401 | 401 | |
402 | 402 | foreach ($email_descriptions->rows as $email_description) { |
403 | 403 | // Store logo short code changed |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | $description = str_replace('<a href="{order_href}" target="_blank">{order_href}</a>', '{order_href}', $description); |
411 | 411 | $description = str_replace('<a href="{order_href}" target="_blank">{order_href} </a>', '{order_href}', $description); |
412 | 412 | |
413 | - $this->db->query("UPDATE `" . DB_PREFIX . "email_description` SET `description` = '" . $this->db->escape($description) . "' WHERE `id` = '" . $email_description['id'] . "';"); |
|
413 | + $this->db->query("UPDATE `".DB_PREFIX."email_description` SET `description` = '".$this->db->escape($description)."' WHERE `id` = '".$email_description['id']."';"); |
|
414 | 414 | } |
415 | 415 | } |
416 | 416 | |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | // Update banner_image table |
420 | 420 | $banner_image = array(); |
421 | 421 | |
422 | - $query = $this->db->query("SHOW COLUMNS FROM `" . DB_PREFIX . "banner_image`"); |
|
422 | + $query = $this->db->query("SHOW COLUMNS FROM `".DB_PREFIX."banner_image`"); |
|
423 | 423 | |
424 | 424 | if ($query->num_rows) { |
425 | 425 | foreach ($query->rows as $row) { |
@@ -428,20 +428,20 @@ discard block |
||
428 | 428 | } |
429 | 429 | |
430 | 430 | if (!in_array('language_id', $banner_image)) { |
431 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "banner_image` ADD `language_id` INT(11) NOT NULL AFTER `banner_id`"); |
|
432 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "banner_image` ADD `title` VARCHAR( 64 ) NOT NULL AFTER `language_id`"); |
|
431 | + $this->db->query("ALTER TABLE `".DB_PREFIX."banner_image` ADD `language_id` INT(11) NOT NULL AFTER `banner_id`"); |
|
432 | + $this->db->query("ALTER TABLE `".DB_PREFIX."banner_image` ADD `title` VARCHAR( 64 ) NOT NULL AFTER `language_id`"); |
|
433 | 433 | } |
434 | 434 | |
435 | - $banners = $this->db->query("SELECT * FROM " . DB_PREFIX . "banner WHERE 1"); |
|
435 | + $banners = $this->db->query("SELECT * FROM ".DB_PREFIX."banner WHERE 1"); |
|
436 | 436 | |
437 | 437 | if ($banners->num_rows) { |
438 | 438 | $banner_image_data = array(); |
439 | 439 | |
440 | 440 | foreach ($banners->rows as $banner) { |
441 | - $banner_image_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "banner_image WHERE banner_id = '" . (int)$banner['banner_id'] . "' ORDER BY sort_order ASC"); |
|
441 | + $banner_image_query = $this->db->query("SELECT * FROM ".DB_PREFIX."banner_image WHERE banner_id = '".(int)$banner['banner_id']."' ORDER BY sort_order ASC"); |
|
442 | 442 | |
443 | 443 | foreach ($banner_image_query->rows as $banner_image) { |
444 | - $banner_image_description_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "banner_image_description WHERE banner_image_id = '" . (int)$banner_image['banner_image_id'] . "' AND banner_id = '" . (int)$banner['banner_id'] . "'"); |
|
444 | + $banner_image_description_query = $this->db->query("SELECT * FROM ".DB_PREFIX."banner_image_description WHERE banner_image_id = '".(int)$banner_image['banner_image_id']."' AND banner_id = '".(int)$banner['banner_id']."'"); |
|
445 | 445 | |
446 | 446 | foreach ($banner_image_description_query->rows as $banner_image_description) { |
447 | 447 | $banner_image_data[$banner['banner_id']][$banner_image_description['language_id']][] = array( |
@@ -456,13 +456,13 @@ discard block |
||
456 | 456 | } |
457 | 457 | |
458 | 458 | // Truncate banner_image table |
459 | - $this->db->query("TRUNCATE `" . DB_PREFIX . "banner_image`"); |
|
459 | + $this->db->query("TRUNCATE `".DB_PREFIX."banner_image`"); |
|
460 | 460 | |
461 | 461 | if ($banner_image_data) { |
462 | 462 | foreach ($banner_image_data as $banner_id => $banner_image_value) { |
463 | 463 | foreach ($banner_image_value as $language_id => $value) { |
464 | 464 | foreach ($value as $banner_image) { |
465 | - $this->db->query("INSERT INTO " . DB_PREFIX . "banner_image SET banner_id = '" . (int)$banner_id . "', language_id = '" . (int)$language_id . "', title = '" . $this->db->escape($banner_image['title']) . "', link = '" . $this->db->escape($banner_image['link']) . "', image = '" . $this->db->escape($banner_image['image']) . "', sort_order = '" . (int)$banner_image['sort_order'] . "'"); |
|
465 | + $this->db->query("INSERT INTO ".DB_PREFIX."banner_image SET banner_id = '".(int)$banner_id."', language_id = '".(int)$language_id."', title = '".$this->db->escape($banner_image['title'])."', link = '".$this->db->escape($banner_image['link'])."', image = '".$this->db->escape($banner_image['image'])."', sort_order = '".(int)$banner_image['sort_order']."'"); |
|
466 | 466 | } |
467 | 467 | } |
468 | 468 | } |
@@ -470,10 +470,10 @@ discard block |
||
470 | 470 | } |
471 | 471 | |
472 | 472 | // Delete banner_image_description table |
473 | - $this->db->query("DROP TABLE `" . DB_PREFIX . "banner_image_description`"); |
|
473 | + $this->db->query("DROP TABLE `".DB_PREFIX."banner_image_description`"); |
|
474 | 474 | |
475 | 475 | // Customer Search |
476 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "customer_search` ( |
|
476 | + $this->db->query("CREATE TABLE IF NOT EXISTS `".DB_PREFIX."customer_search` ( |
|
477 | 477 | `customer_search_id` int(11) NOT NULL AUTO_INCREMENT, |
478 | 478 | `store_id` int(11) NOT NULL, |
479 | 479 | `language_id` int(11) NOT NULL, |
@@ -490,11 +490,11 @@ discard block |
||
490 | 490 | |
491 | 491 | // Insert setting table |
492 | 492 | if ($this->config->get('config_customer_search', null) == null) { |
493 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET `store_id` = 0, `code` = 'config', `key` = 'config_customer_search', `value` = '0', `serialized` = 0"); |
|
493 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET `store_id` = 0, `code` = 'config', `key` = 'config_customer_search', `value` = '0', `serialized` = 0"); |
|
494 | 494 | } |
495 | 495 | |
496 | 496 | // Update user groups |
497 | - $user_groups = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "user_group"); |
|
497 | + $user_groups = $this->db->query("SELECT DISTINCT * FROM ".DB_PREFIX."user_group"); |
|
498 | 498 | |
499 | 499 | foreach ($user_groups->rows as $user_group) { |
500 | 500 | $user_group['permission'] = unserialize($user_group['permission']); |
@@ -502,22 +502,22 @@ discard block |
||
502 | 502 | $user_group['permission']['access'][] = 'report/customer_search'; |
503 | 503 | $user_group['permission']['modify'][] = 'report/customer_search'; |
504 | 504 | |
505 | - $this->db->query("UPDATE " . DB_PREFIX . "user_group SET name = '" . $this->db->escape($user_group['name']) . "', permission = '" . $this->db->escape(serialize($user_group['permission'])) . "' WHERE user_group_id = '" . (int)$user_group['user_group_id'] . "'"); |
|
505 | + $this->db->query("UPDATE ".DB_PREFIX."user_group SET name = '".$this->db->escape($user_group['name'])."', permission = '".$this->db->escape(serialize($user_group['permission']))."' WHERE user_group_id = '".(int)$user_group['user_group_id']."'"); |
|
506 | 506 | } |
507 | 507 | } |
508 | 508 | |
509 | 509 | // 1.4.1 changes; |
510 | 510 | if (version_compare(VERSION, '1.4.1', '<')) { |
511 | 511 | if ($this->config->get('config_customer_activity', null) == null) { |
512 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_customer_activity', `value` = '0'"); |
|
513 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_affiliate_activity', `value` = '0'"); |
|
512 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_customer_activity', `value` = '0'"); |
|
513 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_affiliate_activity', `value` = '0'"); |
|
514 | 514 | } |
515 | 515 | } |
516 | 516 | |
517 | 517 | // 1.5.0 changes; |
518 | 518 | if (version_compare(VERSION, '1.5.0', '<')) { |
519 | 519 | // Update the user groups |
520 | - $user_groups = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "user_group"); |
|
520 | + $user_groups = $this->db->query("SELECT DISTINCT * FROM ".DB_PREFIX."user_group"); |
|
521 | 521 | |
522 | 522 | foreach ($user_groups->rows as $user_group) { |
523 | 523 | $user_group['permission'] = unserialize($user_group['permission']); |
@@ -546,11 +546,11 @@ discard block |
||
546 | 546 | $user_group['permission']['access'][] = 'captcha/google'; |
547 | 547 | $user_group['permission']['modify'][] = 'captcha/google'; |
548 | 548 | |
549 | - $this->db->query("UPDATE " . DB_PREFIX . "user_group SET name = '" . $this->db->escape($user_group['name']) . "', permission = '" . $this->db->escape(serialize($user_group['permission'])) . "' WHERE user_group_id = '" . (int)$user_group['user_group_id'] . "'"); |
|
549 | + $this->db->query("UPDATE ".DB_PREFIX."user_group SET name = '".$this->db->escape($user_group['name'])."', permission = '".$this->db->escape(serialize($user_group['permission']))."' WHERE user_group_id = '".(int)$user_group['user_group_id']."'"); |
|
550 | 550 | } |
551 | 551 | |
552 | 552 | // Create user_activity table |
553 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "user_activity` ( |
|
553 | + $this->db->query("CREATE TABLE IF NOT EXISTS `".DB_PREFIX."user_activity` ( |
|
554 | 554 | `activity_id` int(11) NOT NULL AUTO_INCREMENT, |
555 | 555 | `user_id` int(11) NOT NULL, |
556 | 556 | `key` varchar(64) NOT NULL, |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | // Update stock_status table |
565 | 565 | $stock_status = array(); |
566 | 566 | |
567 | - $query = $this->db->query("SHOW COLUMNS FROM `" . DB_PREFIX . "stock_status`"); |
|
567 | + $query = $this->db->query("SHOW COLUMNS FROM `".DB_PREFIX."stock_status`"); |
|
568 | 568 | |
569 | 569 | if ($query->num_rows) { |
570 | 570 | foreach ($query->rows as $row) { |
@@ -573,16 +573,16 @@ discard block |
||
573 | 573 | } |
574 | 574 | |
575 | 575 | if (!in_array('preorder', $stock_status)) { |
576 | - $this->db->query("ALTER TABLE `" . DB_PREFIX . "stock_status` ADD `preorder` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `color`"); |
|
576 | + $this->db->query("ALTER TABLE `".DB_PREFIX."stock_status` ADD `preorder` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `color`"); |
|
577 | 577 | } |
578 | 578 | |
579 | 579 | // Add maintenance display settings |
580 | 580 | if ($this->config->get('config_image_maintenance_width', null) == null) { |
581 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_maintenance_message', `value` = ''"); |
|
582 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_maintenance_image', `value` = ''"); |
|
583 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_maintenance_login', `value` = '1'"); |
|
584 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_image_maintenance_width', `value` = '268'"); |
|
585 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_image_maintenance_height', `value` = '50'"); |
|
581 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_maintenance_message', `value` = ''"); |
|
582 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_maintenance_image', `value` = ''"); |
|
583 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_maintenance_login', `value` = '1'"); |
|
584 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_image_maintenance_width', `value` = '268'"); |
|
585 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_image_maintenance_height', `value` = '50'"); |
|
586 | 586 | } |
587 | 587 | |
588 | 588 | // Update config for new extension types: analytics, anti-fraud, captcha |
@@ -633,25 +633,25 @@ discard block |
||
633 | 633 | |
634 | 634 | // 1.5.1 changes; |
635 | 635 | if (version_compare(VERSION, '1.5.1', '<')) { |
636 | - $this->db->query("DELETE FROM `" . DB_PREFIX . "setting` WHERE `key` = 'basic_status'"); |
|
637 | - $this->db->query("DELETE FROM `" . DB_PREFIX . "setting` WHERE `key` = 'google_status'"); |
|
638 | - $this->db->query("DELETE FROM `" . DB_PREFIX . "setting` WHERE `key` = 'maxmind_status'"); |
|
639 | - $this->db->query("DELETE FROM `" . DB_PREFIX . "setting` WHERE `key` = 'woopra_status'"); |
|
636 | + $this->db->query("DELETE FROM `".DB_PREFIX."setting` WHERE `key` = 'basic_status'"); |
|
637 | + $this->db->query("DELETE FROM `".DB_PREFIX."setting` WHERE `key` = 'google_status'"); |
|
638 | + $this->db->query("DELETE FROM `".DB_PREFIX."setting` WHERE `key` = 'maxmind_status'"); |
|
639 | + $this->db->query("DELETE FROM `".DB_PREFIX."setting` WHERE `key` = 'woopra_status'"); |
|
640 | 640 | } |
641 | 641 | |
642 | 642 | // 1.5.2 changes; |
643 | 643 | if (version_compare(VERSION, '1.5.2', '<')) { |
644 | 644 | // remove command folder |
645 | - $this->filesystem->remove(DIR_SYSTEM . 'library/command'); |
|
645 | + $this->filesystem->remove(DIR_SYSTEM.'library/command'); |
|
646 | 646 | } |
647 | 647 | |
648 | 648 | // 1.6.0 changes; |
649 | 649 | if (version_compare(VERSION, '1.6.0', '<')) { |
650 | 650 | // Add CSRF setting |
651 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_sec_csrf', `value` = 'a:7:{i:0;s:20:\"account/address/edit\";i:1;s:12:\"account/edit\";i:2;s:18:\"account/newsletter\";i:3;s:16:\"account/password\";i:4;s:14:\"affiliate/edit\";i:5;s:18:\"affiliate/password\";i:6;s:17:\"affiliate/payment\";}', `serialized` = '1'"); |
|
651 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_sec_csrf', `value` = 'a:7:{i:0;s:20:\"account/address/edit\";i:1;s:12:\"account/edit\";i:2;s:18:\"account/newsletter\";i:3;s:16:\"account/password\";i:4;s:14:\"affiliate/edit\";i:5;s:18:\"affiliate/password\";i:6;s:17:\"affiliate/payment\";}', `serialized` = '1'"); |
|
652 | 652 | |
653 | 653 | // Add blog tables |
654 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_post` ( |
|
654 | + $this->db->query("CREATE TABLE IF NOT EXISTS `".DB_PREFIX."blog_post` ( |
|
655 | 655 | `post_id` int(11) NOT NULL AUTO_INCREMENT, |
656 | 656 | `allow_comment` int(1) NOT NULL DEFAULT '1', |
657 | 657 | `featured` int(1) NOT NULL DEFAULT '0', |
@@ -669,7 +669,7 @@ discard block |
||
669 | 669 | KEY `author` (`author`) |
670 | 670 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
671 | 671 | |
672 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_post_description` ( |
|
672 | + $this->db->query("CREATE TABLE IF NOT EXISTS `".DB_PREFIX."blog_post_description` ( |
|
673 | 673 | `post_id` int(11) NOT NULL, |
674 | 674 | `language_id` int(11) NOT NULL, |
675 | 675 | `name` varchar(255) NOT NULL, |
@@ -683,14 +683,14 @@ discard block |
||
683 | 683 | KEY `language_id` (`language_id`) |
684 | 684 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
685 | 685 | |
686 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_post_to_category` ( |
|
686 | + $this->db->query("CREATE TABLE IF NOT EXISTS `".DB_PREFIX."blog_post_to_category` ( |
|
687 | 687 | `post_id` int(11) NOT NULL, |
688 | 688 | `category_id` int(11) NOT NULL, |
689 | 689 | PRIMARY KEY (`post_id`,`category_id`), |
690 | 690 | KEY `category_id` (`category_id`) |
691 | 691 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
692 | 692 | |
693 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_post_to_layout` ( |
|
693 | + $this->db->query("CREATE TABLE IF NOT EXISTS `".DB_PREFIX."blog_post_to_layout` ( |
|
694 | 694 | `post_id` int(11) NOT NULL, |
695 | 695 | `store_id` int(11) NOT NULL, |
696 | 696 | `layout_id` int(11) NOT NULL, |
@@ -699,14 +699,14 @@ discard block |
||
699 | 699 | KEY `layout_id` (`layout_id`) |
700 | 700 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
701 | 701 | |
702 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_post_to_store` ( |
|
702 | + $this->db->query("CREATE TABLE IF NOT EXISTS `".DB_PREFIX."blog_post_to_store` ( |
|
703 | 703 | `post_id` int(11) NOT NULL, |
704 | 704 | `store_id` int(11) NOT NULL, |
705 | 705 | PRIMARY KEY (`post_id`,`store_id`), |
706 | 706 | KEY `store_id` (`store_id`) |
707 | 707 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
708 | 708 | |
709 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_comment` ( |
|
709 | + $this->db->query("CREATE TABLE IF NOT EXISTS `".DB_PREFIX."blog_comment` ( |
|
710 | 710 | `comment_id` int(11) NOT NULL AUTO_INCREMENT, |
711 | 711 | `post_id` int(11) NOT NULL, |
712 | 712 | `customer_id` int(11) NOT NULL, |
@@ -721,7 +721,7 @@ discard block |
||
721 | 721 | KEY `customer_id` (`customer_id`) |
722 | 722 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
723 | 723 | |
724 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_category` ( |
|
724 | + $this->db->query("CREATE TABLE IF NOT EXISTS `".DB_PREFIX."blog_category` ( |
|
725 | 725 | `category_id` int(11) NOT NULL AUTO_INCREMENT, |
726 | 726 | `image` varchar(255) DEFAULT NULL, |
727 | 727 | `parent_id` int(11) NOT NULL DEFAULT '0', |
@@ -734,7 +734,7 @@ discard block |
||
734 | 734 | KEY `parent_id` (`parent_id`) |
735 | 735 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
736 | 736 | |
737 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_category_description` ( |
|
737 | + $this->db->query("CREATE TABLE IF NOT EXISTS `".DB_PREFIX."blog_category_description` ( |
|
738 | 738 | `category_id` int(11) NOT NULL, |
739 | 739 | `language_id` int(11) NOT NULL, |
740 | 740 | `name` varchar(255) NOT NULL, |
@@ -747,7 +747,7 @@ discard block |
||
747 | 747 | KEY `language_id` (`language_id`) |
748 | 748 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
749 | 749 | |
750 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_category_path` ( |
|
750 | + $this->db->query("CREATE TABLE IF NOT EXISTS `".DB_PREFIX."blog_category_path` ( |
|
751 | 751 | `category_id` int(11) NOT NULL, |
752 | 752 | `path_id` int(11) NOT NULL, |
753 | 753 | `level` int(11) NOT NULL, |
@@ -755,7 +755,7 @@ discard block |
||
755 | 755 | KEY `path_id` (`path_id`) |
756 | 756 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
757 | 757 | |
758 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_category_to_layout` ( |
|
758 | + $this->db->query("CREATE TABLE IF NOT EXISTS `".DB_PREFIX."blog_category_to_layout` ( |
|
759 | 759 | `category_id` int(11) NOT NULL, |
760 | 760 | `store_id` int(11) NOT NULL, |
761 | 761 | `layout_id` int(11) NOT NULL, |
@@ -764,7 +764,7 @@ discard block |
||
764 | 764 | KEY `layout_id` (`layout_id`) |
765 | 765 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
766 | 766 | |
767 | - $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "blog_category_to_store` ( |
|
767 | + $this->db->query("CREATE TABLE IF NOT EXISTS `".DB_PREFIX."blog_category_to_store` ( |
|
768 | 768 | `category_id` int(11) NOT NULL, |
769 | 769 | `store_id` int(11) NOT NULL, |
770 | 770 | PRIMARY KEY (`category_id`,`store_id`), |
@@ -772,7 +772,7 @@ discard block |
||
772 | 772 | ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); |
773 | 773 | |
774 | 774 | // Update the user groups |
775 | - $user_groups = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "user_group"); |
|
775 | + $user_groups = $this->db->query("SELECT DISTINCT * FROM ".DB_PREFIX."user_group"); |
|
776 | 776 | |
777 | 777 | foreach ($user_groups->rows as $user_group) { |
778 | 778 | $user_group['permission'] = unserialize($user_group['permission']); |
@@ -786,145 +786,145 @@ discard block |
||
786 | 786 | $user_group['permission']['access'][] = 'blog/post'; |
787 | 787 | $user_group['permission']['modify'][] = 'blog/post'; |
788 | 788 | |
789 | - $this->db->query("UPDATE " . DB_PREFIX . "user_group SET name = '" . $this->db->escape($user_group['name']) . "', permission = '" . $this->db->escape(serialize($user_group['permission'])) . "' WHERE user_group_id = '" . (int)$user_group['user_group_id'] . "'"); |
|
789 | + $this->db->query("UPDATE ".DB_PREFIX."user_group SET name = '".$this->db->escape($user_group['name'])."', permission = '".$this->db->escape(serialize($user_group['permission']))."' WHERE user_group_id = '".(int)$user_group['user_group_id']."'"); |
|
790 | 790 | } |
791 | 791 | |
792 | 792 | // Add Blog Layout |
793 | - $this->db->query("INSERT INTO " . DB_PREFIX . "layout SET name = 'Blog Home'"); |
|
793 | + $this->db->query("INSERT INTO ".DB_PREFIX."layout SET name = 'Blog Home'"); |
|
794 | 794 | |
795 | 795 | $layout_id = $this->db->getLastId(); |
796 | 796 | |
797 | - $this->db->query("INSERT INTO " . DB_PREFIX . "layout_route SET layout_id = '" . (int)$layout_id . "', `store_id` = '0', `route` = 'blog/home'"); |
|
797 | + $this->db->query("INSERT INTO ".DB_PREFIX."layout_route SET layout_id = '".(int)$layout_id."', `store_id` = '0', `route` = 'blog/home'"); |
|
798 | 798 | |
799 | 799 | // Add Module |
800 | - $this->db->query("INSERT INTO " . DB_PREFIX . "module SET name = 'Recent posts', `code` = 'blog_latest', `setting` = 'a:5:{s:4:\"name\";s:12:\"Recent posts\";s:5:\"limit\";s:1:\"5\";s:5:\"width\";s:2:\"60\";s:6:\"height\";s:2:\"40\";s:6:\"status\";s:1:\"1\";}'"); |
|
800 | + $this->db->query("INSERT INTO ".DB_PREFIX."module SET name = 'Recent posts', `code` = 'blog_latest', `setting` = 'a:5:{s:4:\"name\";s:12:\"Recent posts\";s:5:\"limit\";s:1:\"5\";s:5:\"width\";s:2:\"60\";s:6:\"height\";s:2:\"40\";s:6:\"status\";s:1:\"1\";}'"); |
|
801 | 801 | |
802 | 802 | $module_id = $this->db->getLastId(); |
803 | 803 | |
804 | 804 | // Add Blog Modules |
805 | - $this->db->query("INSERT INTO `" . DB_PREFIX . "layout_module` SET `layout_id` = '" . (int)$layout_id . "', `code` = 'blog_latest." .$module_id ."', `position` = 'column_right', `sort_order` = '0'"); |
|
805 | + $this->db->query("INSERT INTO `".DB_PREFIX."layout_module` SET `layout_id` = '".(int)$layout_id."', `code` = 'blog_latest.".$module_id."', `position` = 'column_right', `sort_order` = '0'"); |
|
806 | 806 | |
807 | - $this->db->query("INSERT INTO " . DB_PREFIX . "layout SET name = 'Blog Post'"); |
|
807 | + $this->db->query("INSERT INTO ".DB_PREFIX."layout SET name = 'Blog Post'"); |
|
808 | 808 | |
809 | 809 | $layout_id = $this->db->getLastId(); |
810 | 810 | |
811 | - $this->db->query("INSERT INTO " . DB_PREFIX . "layout_route SET layout_id = '" . (int)$layout_id . "', `store_id` = '0', `route` = 'blog/post'"); |
|
811 | + $this->db->query("INSERT INTO ".DB_PREFIX."layout_route SET layout_id = '".(int)$layout_id."', `store_id` = '0', `route` = 'blog/post'"); |
|
812 | 812 | |
813 | 813 | // Add Module |
814 | - $this->db->query("INSERT INTO " . DB_PREFIX . "module SET name = 'Recent comments', `code` = 'blog_comment', `setting` = 'a:7:{s:4:\"name\";s:15:\"Recent comments\";s:5:\"limit\";s:1:\"2\";s:18:\"description_length\";s:3:\"300\";s:5:\"image\";s:1:\"1\";s:5:\"width\";s:2:\"40\";s:6:\"height\";s:2:\"40\";s:6:\"status\";s:1:\"1\";}'"); |
|
814 | + $this->db->query("INSERT INTO ".DB_PREFIX."module SET name = 'Recent comments', `code` = 'blog_comment', `setting` = 'a:7:{s:4:\"name\";s:15:\"Recent comments\";s:5:\"limit\";s:1:\"2\";s:18:\"description_length\";s:3:\"300\";s:5:\"image\";s:1:\"1\";s:5:\"width\";s:2:\"40\";s:6:\"height\";s:2:\"40\";s:6:\"status\";s:1:\"1\";}'"); |
|
815 | 815 | |
816 | 816 | $module_id = $this->db->getLastId(); |
817 | 817 | |
818 | 818 | // Add Blog Modules |
819 | - $this->db->query("INSERT INTO `" . DB_PREFIX . "layout_module` SET `layout_id` = '" . (int)$layout_id . "', `code` = 'blog_comment." .$module_id ."', `position` = 'column_right', `sort_order` = '0'"); |
|
819 | + $this->db->query("INSERT INTO `".DB_PREFIX."layout_module` SET `layout_id` = '".(int)$layout_id."', `code` = 'blog_comment.".$module_id."', `position` = 'column_right', `sort_order` = '0'"); |
|
820 | 820 | |
821 | - $this->db->query("INSERT INTO " . DB_PREFIX . "layout SET name = 'Blog Category'"); |
|
821 | + $this->db->query("INSERT INTO ".DB_PREFIX."layout SET name = 'Blog Category'"); |
|
822 | 822 | |
823 | 823 | $layout_id = $this->db->getLastId(); |
824 | 824 | |
825 | - $this->db->query("INSERT INTO " . DB_PREFIX . "layout_route SET layout_id = '" . (int)$layout_id . "', `store_id` = '0', `route` = 'blog/category'"); |
|
825 | + $this->db->query("INSERT INTO ".DB_PREFIX."layout_route SET layout_id = '".(int)$layout_id."', `store_id` = '0', `route` = 'blog/category'"); |
|
826 | 826 | |
827 | 827 | // Add Blog Items |
828 | 828 | // Add Blog Category |
829 | - $this->db->query("INSERT INTO `" . DB_PREFIX . "blog_category` SET `image` = '', `parent_id` = '0', `top` = '0', `sort_order` = '0', `status` = '1', `date_added` = '2017-04-06 14:06:13', `date_modified` = '0000-00-00 00:00:00'"); |
|
829 | + $this->db->query("INSERT INTO `".DB_PREFIX."blog_category` SET `image` = '', `parent_id` = '0', `top` = '0', `sort_order` = '0', `status` = '1', `date_added` = '2017-04-06 14:06:13', `date_modified` = '0000-00-00 00:00:00'"); |
|
830 | 830 | |
831 | 831 | $blog_category_id = $this->db->getLastId(); |
832 | 832 | |
833 | - $this->db->query("INSERT INTO `" . DB_PREFIX . "blog_category_description` SET `category_id` = " . (int)$blog_category_id . ", `language_id` = '1', `name` = 'General', `description` = '', `meta_title` = 'General', `meta_description` = '', `meta_keyword` = ''"); |
|
833 | + $this->db->query("INSERT INTO `".DB_PREFIX."blog_category_description` SET `category_id` = ".(int)$blog_category_id.", `language_id` = '1', `name` = 'General', `description` = '', `meta_title` = 'General', `meta_description` = '', `meta_keyword` = ''"); |
|
834 | 834 | |
835 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_category_path SET category_id = '" . (int)$blog_category_id . "', `path_id` = '1', `level` = '0'"); |
|
835 | + $this->db->query("INSERT INTO ".DB_PREFIX."blog_category_path SET category_id = '".(int)$blog_category_id."', `path_id` = '1', `level` = '0'"); |
|
836 | 836 | |
837 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_category_to_layout SET category_id = '" . (int)$blog_category_id . "', `store_id` = '0', `layout_id` = '0'"); |
|
837 | + $this->db->query("INSERT INTO ".DB_PREFIX."blog_category_to_layout SET category_id = '".(int)$blog_category_id."', `store_id` = '0', `layout_id` = '0'"); |
|
838 | 838 | |
839 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_category_to_store SET category_id = '" . (int)$blog_category_id . "', `store_id` = '0'"); |
|
839 | + $this->db->query("INSERT INTO ".DB_PREFIX."blog_category_to_store SET category_id = '".(int)$blog_category_id."', `store_id` = '0'"); |
|
840 | 840 | |
841 | 841 | // Add Blog Category Url Alias |
842 | - $this->db->query("INSERT INTO " . DB_PREFIX . "url_alias SET `query` = 'blog_category_id=" . (int)$blog_category_id . "', `keyword` = 'general', `language_id` = '1'"); |
|
842 | + $this->db->query("INSERT INTO ".DB_PREFIX."url_alias SET `query` = 'blog_category_id=".(int)$blog_category_id."', `keyword` = 'general', `language_id` = '1'"); |
|
843 | 843 | |
844 | 844 | // Add Blog Post |
845 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post SET `allow_comment` = '1', `featured` = '1', `viewed` = '37', `image` = 'catalog/demo/blog/yet-another.jpg', `author` = 'Cüneyt Şentürk', `date_available` = '2017-04-06', `sort_order` = '0', `status` = '1', `date_added` = '2017-04-06 14:13:54', `date_modified` = '2017-04-06 14:26:07'"); |
|
845 | + $this->db->query("INSERT INTO ".DB_PREFIX."blog_post SET `allow_comment` = '1', `featured` = '1', `viewed` = '37', `image` = 'catalog/demo/blog/yet-another.jpg', `author` = 'Cüneyt Şentürk', `date_available` = '2017-04-06', `sort_order` = '0', `status` = '1', `date_added` = '2017-04-06 14:13:54', `date_modified` = '2017-04-06 14:26:07'"); |
|
846 | 846 | |
847 | 847 | $blog_post_id = $this->db->getLastId(); |
848 | 848 | |
849 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_description SET post_id = '" . (int)$blog_post_id . "', `language_id` = '1', `name` = 'Yet another great post', `description` = '<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>\r\n<h1>HTML Ipsum Presents</h1>\r\n<p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p>\r\n<h2>Header Level 2</h2>\r\n<ol>\r\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>\r\n<li>Aliquam tincidunt mauris eu risus.</li>\r\n</ol>\r\n<blockquote>\r\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est.</p>\r\n</blockquote>\r\n<h3>Header Level 3</h3>\r\n<ul>\r\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>\r\n<li>Aliquam tincidunt mauris eu risus.</li>\r\n</ul>', `tag` = 'tag 1,tag 2,tag 3', `meta_title` = 'Yet another great post', `meta_description` = '', `meta_keyword` = ''"); |
|
849 | + $this->db->query("INSERT INTO ".DB_PREFIX."blog_post_description SET post_id = '".(int)$blog_post_id."', `language_id` = '1', `name` = 'Yet another great post', `description` = '<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>\r\n<h1>HTML Ipsum Presents</h1>\r\n<p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p>\r\n<h2>Header Level 2</h2>\r\n<ol>\r\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>\r\n<li>Aliquam tincidunt mauris eu risus.</li>\r\n</ol>\r\n<blockquote>\r\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est.</p>\r\n</blockquote>\r\n<h3>Header Level 3</h3>\r\n<ul>\r\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>\r\n<li>Aliquam tincidunt mauris eu risus.</li>\r\n</ul>', `tag` = 'tag 1,tag 2,tag 3', `meta_title` = 'Yet another great post', `meta_description` = '', `meta_keyword` = ''"); |
|
850 | 850 | |
851 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_category SET post_id = '" . (int)$blog_post_id . "', category_id = '" . (int)$blog_category_id . "'"); |
|
851 | + $this->db->query("INSERT INTO ".DB_PREFIX."blog_post_to_category SET post_id = '".(int)$blog_post_id."', category_id = '".(int)$blog_category_id."'"); |
|
852 | 852 | |
853 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_layout SET post_id = '" . (int)$blog_post_id . "', `store_id` = '0', `layout_id` = '0'"); |
|
853 | + $this->db->query("INSERT INTO ".DB_PREFIX."blog_post_to_layout SET post_id = '".(int)$blog_post_id."', `store_id` = '0', `layout_id` = '0'"); |
|
854 | 854 | |
855 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_store SET post_id = '" . (int)$blog_post_id . "', `store_id` = '0'"); |
|
855 | + $this->db->query("INSERT INTO ".DB_PREFIX."blog_post_to_store SET post_id = '".(int)$blog_post_id."', `store_id` = '0'"); |
|
856 | 856 | |
857 | 857 | // Add Blog Comment |
858 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_comment SET `post_id` = '" . (int)$blog_post_id . "', `customer_id` = '0', `email` = '[email protected]', `author` = 'Denis', `text` = 'Hey, this is cool! I like it.', `status` = '1', `date_added` = '2017-04-06 14:54:56', `date_modified` = '0000-00-00 00:00:00'"); |
|
858 | + $this->db->query("INSERT INTO ".DB_PREFIX."blog_comment SET `post_id` = '".(int)$blog_post_id."', `customer_id` = '0', `email` = '[email protected]', `author` = 'Denis', `text` = 'Hey, this is cool! I like it.', `status` = '1', `date_added` = '2017-04-06 14:54:56', `date_modified` = '0000-00-00 00:00:00'"); |
|
859 | 859 | |
860 | 860 | // Add Blog Post Url Alias |
861 | - $this->db->query("INSERT INTO " . DB_PREFIX . "url_alias SET `query` = 'blog_post_id=" . (int)$blog_post_id . "', `keyword` = 'yet-another-great-post', `language_id` = '1'"); |
|
861 | + $this->db->query("INSERT INTO ".DB_PREFIX."url_alias SET `query` = 'blog_post_id=".(int)$blog_post_id."', `keyword` = 'yet-another-great-post', `language_id` = '1'"); |
|
862 | 862 | |
863 | 863 | // Add Blog Post |
864 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post SET `allow_comment` = '1', `featured` = '0', `viewed` = '10', `image` = 'catalog/demo/blog/arastta.jpg', `author` = 'Enes Ertuğrul', `date_available` = '2017-04-06', `sort_order` = '0', `status` = '1', `date_added` = '2017-04-06 14:31:03', `date_modified` = '2017-04-06 15:34:24'"); |
|
864 | + $this->db->query("INSERT INTO ".DB_PREFIX."blog_post SET `allow_comment` = '1', `featured` = '0', `viewed` = '10', `image` = 'catalog/demo/blog/arastta.jpg', `author` = 'Enes Ertuğrul', `date_available` = '2017-04-06', `sort_order` = '0', `status` = '1', `date_added` = '2017-04-06 14:31:03', `date_modified` = '2017-04-06 15:34:24'"); |
|
865 | 865 | |
866 | 866 | $blog_post_id = $this->db->getLastId(); |
867 | 867 | |
868 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_description SET post_id = '" . (int)$blog_post_id . "', `language_id` = '1', `name` = 'Arastta 1.6 Released', `description` = '<p>Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>\r\n<h1>HTML Ipsum Presents</h1>\r\n<p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p>\r\n<h2>Header Level 2</h2>\r\n<ol>\r\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>\r\n<li>Aliquam tincidunt mauris eu risus.</li>\r\n</ol>\r\n<blockquote>\r\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est.</p>\r\n</blockquote>\r\n<h3>Header Level 3</h3>\r\n<ul>\r\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>\r\n<li>Aliquam tincidunt mauris eu risus.</li>\r\n</ul>', `tag` = '', `meta_title` = 'Arastta 1.6 Released', `meta_description` = '', `meta_keyword` = ''"); |
|
868 | + $this->db->query("INSERT INTO ".DB_PREFIX."blog_post_description SET post_id = '".(int)$blog_post_id."', `language_id` = '1', `name` = 'Arastta 1.6 Released', `description` = '<p>Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>\r\n<h1>HTML Ipsum Presents</h1>\r\n<p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p>\r\n<h2>Header Level 2</h2>\r\n<ol>\r\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>\r\n<li>Aliquam tincidunt mauris eu risus.</li>\r\n</ol>\r\n<blockquote>\r\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est.</p>\r\n</blockquote>\r\n<h3>Header Level 3</h3>\r\n<ul>\r\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>\r\n<li>Aliquam tincidunt mauris eu risus.</li>\r\n</ul>', `tag` = '', `meta_title` = 'Arastta 1.6 Released', `meta_description` = '', `meta_keyword` = ''"); |
|
869 | 869 | |
870 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_category SET post_id = '" . (int)$blog_post_id . "', category_id = '" . (int)$blog_category_id . "'"); |
|
870 | + $this->db->query("INSERT INTO ".DB_PREFIX."blog_post_to_category SET post_id = '".(int)$blog_post_id."', category_id = '".(int)$blog_category_id."'"); |
|
871 | 871 | |
872 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_layout SET post_id = '" . (int)$blog_post_id . "', `store_id` = '0', `layout_id` = '0'"); |
|
872 | + $this->db->query("INSERT INTO ".DB_PREFIX."blog_post_to_layout SET post_id = '".(int)$blog_post_id."', `store_id` = '0', `layout_id` = '0'"); |
|
873 | 873 | |
874 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_store SET post_id = '" . (int)$blog_post_id . "', `store_id` = '0'"); |
|
874 | + $this->db->query("INSERT INTO ".DB_PREFIX."blog_post_to_store SET post_id = '".(int)$blog_post_id."', `store_id` = '0'"); |
|
875 | 875 | |
876 | 876 | // Add Blog Comment |
877 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_comment SET `post_id` = '" . (int)$blog_post_id . "', `customer_id` = '0', `email` = '[email protected]', `author` = 'Cüneyt Şentürk', `text` = 'This release is awesome! I will update my store as soon as possible.', `status` = '1', `date_added` = '2017-04-06 14:55:32', `date_modified` = '0000-00-00 00:00:00'"); |
|
877 | + $this->db->query("INSERT INTO ".DB_PREFIX."blog_comment SET `post_id` = '".(int)$blog_post_id."', `customer_id` = '0', `email` = '[email protected]', `author` = 'Cüneyt Şentürk', `text` = 'This release is awesome! I will update my store as soon as possible.', `status` = '1', `date_added` = '2017-04-06 14:55:32', `date_modified` = '0000-00-00 00:00:00'"); |
|
878 | 878 | |
879 | 879 | // Add Blog Post Url Alias |
880 | - $this->db->query("INSERT INTO " . DB_PREFIX . "url_alias SET `query` = 'blog_post_id=" . (int)$blog_post_id . "', `keyword` = 'arastta-1-6-released', `language_id` = '1'"); |
|
880 | + $this->db->query("INSERT INTO ".DB_PREFIX."url_alias SET `query` = 'blog_post_id=".(int)$blog_post_id."', `keyword` = 'arastta-1-6-released', `language_id` = '1'"); |
|
881 | 881 | |
882 | 882 | // Add Blog Post |
883 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post SET `allow_comment` = '1', `featured` = '1', `viewed` = '5', `image` = 'catalog/demo/blog/big-thing-arastta.jpg', `author` = 'Denis Duliçi', `date_available` = '2017-04-06', `sort_order` = '0', `status` = '1', `date_added` = '2017-04-06 15:00:51', `date_modified` = '0000-00-00 00:00:00'"); |
|
883 | + $this->db->query("INSERT INTO ".DB_PREFIX."blog_post SET `allow_comment` = '1', `featured` = '1', `viewed` = '5', `image` = 'catalog/demo/blog/big-thing-arastta.jpg', `author` = 'Denis Duliçi', `date_available` = '2017-04-06', `sort_order` = '0', `status` = '1', `date_added` = '2017-04-06 15:00:51', `date_modified` = '0000-00-00 00:00:00'"); |
|
884 | 884 | |
885 | 885 | $blog_post_id = $this->db->getLastId(); |
886 | 886 | |
887 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_description SET post_id = '" . (int)$blog_post_id . "', `language_id` = '1', `name` = 'The next big Arastta thing ;)', `description` = '<p>Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>\r\n<h1>HTML Ipsum Presents</h1>\r\n<p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p>\r\n<h2>Header Level 2</h2>\r\n<ol>\r\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>\r\n<li>Aliquam tincidunt mauris eu risus.</li>\r\n</ol>\r\n<blockquote>\r\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est.</p>\r\n</blockquote>\r\n<h3>Header Level 3</h3>\r\n<ul>\r\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>\r\n<li>Aliquam tincidunt mauris eu risus.</li>\r\n</ul>', `tag` = '', `meta_title` = 'The next big Arastta thing ;)', `meta_description` = '', `meta_keyword` = ''"); |
|
887 | + $this->db->query("INSERT INTO ".DB_PREFIX."blog_post_description SET post_id = '".(int)$blog_post_id."', `language_id` = '1', `name` = 'The next big Arastta thing ;)', `description` = '<p>Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>\r\n<h1>HTML Ipsum Presents</h1>\r\n<p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p>\r\n<h2>Header Level 2</h2>\r\n<ol>\r\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>\r\n<li>Aliquam tincidunt mauris eu risus.</li>\r\n</ol>\r\n<blockquote>\r\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est.</p>\r\n</blockquote>\r\n<h3>Header Level 3</h3>\r\n<ul>\r\n<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>\r\n<li>Aliquam tincidunt mauris eu risus.</li>\r\n</ul>', `tag` = '', `meta_title` = 'The next big Arastta thing ;)', `meta_description` = '', `meta_keyword` = ''"); |
|
888 | 888 | |
889 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_category SET post_id = '" . (int)$blog_post_id . "', category_id = '" . (int)$blog_category_id . "'"); |
|
889 | + $this->db->query("INSERT INTO ".DB_PREFIX."blog_post_to_category SET post_id = '".(int)$blog_post_id."', category_id = '".(int)$blog_category_id."'"); |
|
890 | 890 | |
891 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_layout SET post_id = '" . (int)$blog_post_id . "', `store_id` = '0', `layout_id` = '0'"); |
|
891 | + $this->db->query("INSERT INTO ".DB_PREFIX."blog_post_to_layout SET post_id = '".(int)$blog_post_id."', `store_id` = '0', `layout_id` = '0'"); |
|
892 | 892 | |
893 | - $this->db->query("INSERT INTO " . DB_PREFIX . "blog_post_to_store SET post_id = '" . (int)$blog_post_id . "', `store_id` = '0'"); |
|
893 | + $this->db->query("INSERT INTO ".DB_PREFIX."blog_post_to_store SET post_id = '".(int)$blog_post_id."', `store_id` = '0'"); |
|
894 | 894 | |
895 | 895 | // Add Blog Post Url Alias |
896 | - $this->db->query("INSERT INTO " . DB_PREFIX . "url_alias SET `query` = 'blog_post_id=" . (int)$blog_post_id . "', `keyword` = 'the-next-big-arastta-thing', `language_id` = '1'"); |
|
896 | + $this->db->query("INSERT INTO ".DB_PREFIX."url_alias SET `query` = 'blog_post_id=".(int)$blog_post_id."', `keyword` = 'the-next-big-arastta-thing', `language_id` = '1'"); |
|
897 | 897 | |
898 | 898 | // Add Blog Home Url Alias |
899 | - $this->db->query("INSERT INTO " . DB_PREFIX . "url_alias SET `query` = 'route=blog/home', `keyword` = 'blog', `language_id` = '1'"); |
|
899 | + $this->db->query("INSERT INTO ".DB_PREFIX."url_alias SET `query` = 'route=blog/home', `keyword` = 'blog', `language_id` = '1'"); |
|
900 | 900 | |
901 | 901 | // Add setting table |
902 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_width', `value` = '600'"); |
|
903 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_height', `value` = '400'"); |
|
904 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_width', `value` = '600'"); |
|
905 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_height', `value` = '400'"); |
|
906 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_name', `value` = 'Arastta Blog'"); |
|
907 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_description', `value` = '<p>Welcome to the Arastta Blog\'s home</p>'"); |
|
908 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_featured_slide', `value` = '1'"); |
|
909 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_meta_title', `value` = 'Arastta Blog'"); |
|
910 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_meta_description', `value` = ''"); |
|
911 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_meta_keyword', `value` = ''"); |
|
912 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_limit', `value` = '5'"); |
|
913 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_description_length', `value` = '300'"); |
|
914 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_row', `value` = '1'"); |
|
915 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_sort_order', `value` = 'p.date_added-DESC'"); |
|
916 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_date', `value` = '1'"); |
|
917 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_comment', `value` = '1'"); |
|
918 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_read', `value` = '1'"); |
|
919 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_author', `value` = '1'"); |
|
920 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_date', `value` = '1'"); |
|
921 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_comment', `value` = '1'"); |
|
922 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_read', `value` = '1'"); |
|
923 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_author', `value` = '1'"); |
|
924 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_share', `value` = '1'"); |
|
925 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_comment_enable', `value` = '1'"); |
|
926 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_comment_status', `value` = '0'"); |
|
927 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_comment_guest', `value` = '0'"); |
|
928 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_comment_limit', `value` = '5'"); |
|
929 | - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_comment_mail', `value` = '1'"); |
|
902 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_width', `value` = '600'"); |
|
903 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_height', `value` = '400'"); |
|
904 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_width', `value` = '600'"); |
|
905 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_height', `value` = '400'"); |
|
906 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_name', `value` = 'Arastta Blog'"); |
|
907 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_description', `value` = '<p>Welcome to the Arastta Blog\'s home</p>'"); |
|
908 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_featured_slide', `value` = '1'"); |
|
909 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_meta_title', `value` = 'Arastta Blog'"); |
|
910 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_meta_description', `value` = ''"); |
|
911 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_meta_keyword', `value` = ''"); |
|
912 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_limit', `value` = '5'"); |
|
913 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_description_length', `value` = '300'"); |
|
914 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_row', `value` = '1'"); |
|
915 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_sort_order', `value` = 'p.date_added-DESC'"); |
|
916 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_date', `value` = '1'"); |
|
917 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_comment', `value` = '1'"); |
|
918 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_read', `value` = '1'"); |
|
919 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_list_author', `value` = '1'"); |
|
920 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_date', `value` = '1'"); |
|
921 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_comment', `value` = '1'"); |
|
922 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_read', `value` = '1'"); |
|
923 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_author', `value` = '1'"); |
|
924 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_post_form_share', `value` = '1'"); |
|
925 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_comment_enable', `value` = '1'"); |
|
926 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_comment_status', `value` = '0'"); |
|
927 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_comment_guest', `value` = '0'"); |
|
928 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_comment_limit', `value` = '5'"); |
|
929 | + $this->db->query("INSERT INTO ".DB_PREFIX."setting SET store_id = '0', `code` = 'config', `key` = 'config_blog_comment_mail', `value` = '1'"); |
|
930 | 930 | } |