@@ -28,26 +28,26 @@ discard block |
||
28 | 28 | */ |
29 | 29 | function xoops_module_update_smartobject(\XoopsModule $module) |
30 | 30 | { |
31 | - ob_start(); |
|
31 | + ob_start(); |
|
32 | 32 | |
33 | - $dbVersion = Smartobject\Utility::getMeta('version', 'smartobject'); |
|
34 | - if (!$dbVersion) { |
|
35 | - $dbVersion = 0; |
|
36 | - } |
|
33 | + $dbVersion = Smartobject\Utility::getMeta('version', 'smartobject'); |
|
34 | + if (!$dbVersion) { |
|
35 | + $dbVersion = 0; |
|
36 | + } |
|
37 | 37 | |
38 | - $dbupdater = new XoopsModules\Smartobject\Dbupdater(); |
|
38 | + $dbupdater = new XoopsModules\Smartobject\Dbupdater(); |
|
39 | 39 | |
40 | - echo '<code>' . _SDU_UPDATE_UPDATING_DATABASE . '<br>'; |
|
40 | + echo '<code>' . _SDU_UPDATE_UPDATING_DATABASE . '<br>'; |
|
41 | 41 | |
42 | - // db migrate version = 1 |
|
43 | - $newDbVersion = 1; |
|
44 | - if ($dbVersion < $newDbVersion) { |
|
45 | - echo 'Database migrate to version ' . $newDbVersion . '<br>'; |
|
42 | + // db migrate version = 1 |
|
43 | + $newDbVersion = 1; |
|
44 | + if ($dbVersion < $newDbVersion) { |
|
45 | + echo 'Database migrate to version ' . $newDbVersion . '<br>'; |
|
46 | 46 | |
47 | - // Create table smartobject_link |
|
48 | - $table = new XoopsModules\Smartobject\DbTable('smartobject_link'); |
|
49 | - if (!$table->exists()) { |
|
50 | - $table->setStructure("CREATE TABLE `%s` ( |
|
47 | + // Create table smartobject_link |
|
48 | + $table = new XoopsModules\Smartobject\DbTable('smartobject_link'); |
|
49 | + if (!$table->exists()) { |
|
50 | + $table->setStructure("CREATE TABLE `%s` ( |
|
51 | 51 | `linkid` int(11) NOT NULL auto_increment, |
52 | 52 | `from_uid` int(11) NOT NULL default '0', |
53 | 53 | `from_email` varchar(255) NOT NULL default '', |
@@ -64,63 +64,63 @@ discard block |
||
64 | 64 | PRIMARY KEY (`linkid`) |
65 | 65 | ) ENGINE=MyISAM COMMENT='SmartObject by The SmartFactory <www.smartfactory.ca>' AUTO_INCREMENT=1 ;"); |
66 | 66 | |
67 | - if (!$dbupdater->updateTable($table)) { |
|
68 | - /** |
|
69 | - * @todo trap the errors |
|
70 | - */ |
|
71 | - } |
|
72 | - } |
|
73 | - unset($table); |
|
74 | - // Create table smartobject_link |
|
75 | - $table = new XoopsModules\Smartobject\DbTable('smartobject_link'); |
|
76 | - if (!$table->fieldExists('date')) { |
|
77 | - $table->addNewField('date', "int(11) NOT NULL default '0'"); |
|
78 | - if (!$dbupdater->updateTable($table)) { |
|
79 | - /** |
|
80 | - * @todo trap the errors |
|
81 | - */ |
|
82 | - } |
|
83 | - } |
|
84 | - unset($table); |
|
85 | - |
|
86 | - // Create table smartobject_tag |
|
87 | - $table = new XoopsModules\Smartobject\DbTable('smartobject_tag'); |
|
88 | - if (!$table->exists()) { |
|
89 | - $table->setStructure("CREATE TABLE %s ( |
|
67 | + if (!$dbupdater->updateTable($table)) { |
|
68 | + /** |
|
69 | + * @todo trap the errors |
|
70 | + */ |
|
71 | + } |
|
72 | + } |
|
73 | + unset($table); |
|
74 | + // Create table smartobject_link |
|
75 | + $table = new XoopsModules\Smartobject\DbTable('smartobject_link'); |
|
76 | + if (!$table->fieldExists('date')) { |
|
77 | + $table->addNewField('date', "int(11) NOT NULL default '0'"); |
|
78 | + if (!$dbupdater->updateTable($table)) { |
|
79 | + /** |
|
80 | + * @todo trap the errors |
|
81 | + */ |
|
82 | + } |
|
83 | + } |
|
84 | + unset($table); |
|
85 | + |
|
86 | + // Create table smartobject_tag |
|
87 | + $table = new XoopsModules\Smartobject\DbTable('smartobject_tag'); |
|
88 | + if (!$table->exists()) { |
|
89 | + $table->setStructure("CREATE TABLE %s ( |
|
90 | 90 | `tagid` int(11) NOT NULL auto_increment, |
91 | 91 | `name` varchar(255) NOT NULL default '', |
92 | 92 | `description` TEXT NOT NULL, |
93 | 93 | PRIMARY KEY (`id`) |
94 | 94 | ) ENGINE=MyISAM COMMENT='SmartObject by The SmartFactory <www.smartfactory.ca>' AUTO_INCREMENT=1 ;"); |
95 | 95 | |
96 | - if (!$dbupdater->updateTable($table)) { |
|
97 | - /** |
|
98 | - * @todo trap the errors |
|
99 | - */ |
|
100 | - } |
|
101 | - } |
|
102 | - |
|
103 | - // Create table smartobject_tag_text |
|
104 | - $table = new XoopsModules\Smartobject\DbTable('smartobject_tag_text'); |
|
105 | - if (!$table->exists()) { |
|
106 | - $table->setStructure("CREATE TABLE %s ( |
|
96 | + if (!$dbupdater->updateTable($table)) { |
|
97 | + /** |
|
98 | + * @todo trap the errors |
|
99 | + */ |
|
100 | + } |
|
101 | + } |
|
102 | + |
|
103 | + // Create table smartobject_tag_text |
|
104 | + $table = new XoopsModules\Smartobject\DbTable('smartobject_tag_text'); |
|
105 | + if (!$table->exists()) { |
|
106 | + $table->setStructure("CREATE TABLE %s ( |
|
107 | 107 | `tagid` int(11) NOT NULL default 0, |
108 | 108 | `language` varchar(255) NOT NULL default '', |
109 | 109 | `value` TEXT NOT NULL, |
110 | 110 | PRIMARY KEY (`id`, `language`) |
111 | 111 | ) ENGINE=MyISAM COMMENT='SmartObject by The SmartFactory <www.smartfactory.ca>' AUTO_INCREMENT=1 ;"); |
112 | 112 | |
113 | - if (!$dbupdater->updateTable($table)) { |
|
114 | - /** |
|
115 | - * @todo trap the errors |
|
116 | - */ |
|
117 | - } |
|
118 | - } |
|
119 | - |
|
120 | - // Create table smartobject_adsense |
|
121 | - $table = new XoopsModules\Smartobject\DbTable('smartobject_adsense'); |
|
122 | - if (!$table->exists()) { |
|
123 | - $table->setStructure(" |
|
113 | + if (!$dbupdater->updateTable($table)) { |
|
114 | + /** |
|
115 | + * @todo trap the errors |
|
116 | + */ |
|
117 | + } |
|
118 | + } |
|
119 | + |
|
120 | + // Create table smartobject_adsense |
|
121 | + $table = new XoopsModules\Smartobject\DbTable('smartobject_adsense'); |
|
122 | + if (!$table->exists()) { |
|
123 | + $table->setStructure(" |
|
124 | 124 | `adsenseid` int(11) NOT NULL auto_increment, |
125 | 125 | `format` VARCHAR(100) NOT NULL, |
126 | 126 | `description` TEXT NOT NULL, |
@@ -134,23 +134,23 @@ discard block |
||
134 | 134 | `tag` varchar(50) NOT NULL default '', |
135 | 135 | PRIMARY KEY (`adsenseid`) |
136 | 136 | "); |
137 | - } |
|
138 | - |
|
139 | - if (!$dbupdater->updateTable($table)) { |
|
140 | - /** |
|
141 | - * @todo trap the errors |
|
142 | - */ |
|
143 | - } |
|
144 | - } |
|
145 | - // db migrate version = 2 |
|
146 | - $newDbVersion = 2; |
|
147 | - if ($dbVersion < $newDbVersion) { |
|
148 | - echo 'Database migrate to version ' . $newDbVersion . '<br>'; |
|
149 | - |
|
150 | - // Create table smartobject_rating |
|
151 | - $table = new XoopsModules\Smartobject\DbTable('smartobject_rating'); |
|
152 | - if (!$table->exists()) { |
|
153 | - $table->setStructure(' |
|
137 | + } |
|
138 | + |
|
139 | + if (!$dbupdater->updateTable($table)) { |
|
140 | + /** |
|
141 | + * @todo trap the errors |
|
142 | + */ |
|
143 | + } |
|
144 | + } |
|
145 | + // db migrate version = 2 |
|
146 | + $newDbVersion = 2; |
|
147 | + if ($dbVersion < $newDbVersion) { |
|
148 | + echo 'Database migrate to version ' . $newDbVersion . '<br>'; |
|
149 | + |
|
150 | + // Create table smartobject_rating |
|
151 | + $table = new XoopsModules\Smartobject\DbTable('smartobject_rating'); |
|
152 | + if (!$table->exists()) { |
|
153 | + $table->setStructure(' |
|
154 | 154 | `ratingid` int(11) NOT NULL auto_increment, |
155 | 155 | `dirname` VARCHAR(255) NOT NULL, |
156 | 156 | `item` VARCHAR(255) NOT NULL, |
@@ -161,36 +161,36 @@ discard block |
||
161 | 161 | PRIMARY KEY (`ratingid`), |
162 | 162 | UNIQUE (`dirname`, `item`, `itemid`, `uid`) |
163 | 163 | '); |
164 | - } |
|
165 | - |
|
166 | - if (!$dbupdater->updateTable($table)) { |
|
167 | - /** |
|
168 | - * @todo trap the errors |
|
169 | - */ |
|
170 | - } |
|
171 | - |
|
172 | - // Create table smartobject_currency |
|
173 | - $table = new XoopsModules\Smartobject\DbTable('smartobject_currency'); |
|
174 | - $table->setData("2, 'EUR', 'Euro', '�', 0.65, 0"); |
|
175 | - $table->setData("3, 'USD', 'American dollar', '$', 0.9, 0"); |
|
176 | - $table->setData("1, 'CAD', 'Canadian dollar', '$', 1, 1"); |
|
177 | - |
|
178 | - if (!$dbupdater->updateTable($table)) { |
|
179 | - /** |
|
180 | - * @todo trap the errors |
|
181 | - */ |
|
182 | - } |
|
183 | - } |
|
184 | - |
|
185 | - // db migrate version = 3 |
|
186 | - $newDbVersion = 3; |
|
187 | - if ($dbVersion < $newDbVersion) { |
|
188 | - echo 'Database migrate to version ' . $newDbVersion . '<br>'; |
|
189 | - |
|
190 | - // Create table smartobject_customtag |
|
191 | - $table = new XoopsModules\Smartobject\DbTable('smartobject_customtag'); |
|
192 | - if (!$table->exists()) { |
|
193 | - $table->setStructure(' |
|
164 | + } |
|
165 | + |
|
166 | + if (!$dbupdater->updateTable($table)) { |
|
167 | + /** |
|
168 | + * @todo trap the errors |
|
169 | + */ |
|
170 | + } |
|
171 | + |
|
172 | + // Create table smartobject_currency |
|
173 | + $table = new XoopsModules\Smartobject\DbTable('smartobject_currency'); |
|
174 | + $table->setData("2, 'EUR', 'Euro', '�', 0.65, 0"); |
|
175 | + $table->setData("3, 'USD', 'American dollar', '$', 0.9, 0"); |
|
176 | + $table->setData("1, 'CAD', 'Canadian dollar', '$', 1, 1"); |
|
177 | + |
|
178 | + if (!$dbupdater->updateTable($table)) { |
|
179 | + /** |
|
180 | + * @todo trap the errors |
|
181 | + */ |
|
182 | + } |
|
183 | + } |
|
184 | + |
|
185 | + // db migrate version = 3 |
|
186 | + $newDbVersion = 3; |
|
187 | + if ($dbVersion < $newDbVersion) { |
|
188 | + echo 'Database migrate to version ' . $newDbVersion . '<br>'; |
|
189 | + |
|
190 | + // Create table smartobject_customtag |
|
191 | + $table = new XoopsModules\Smartobject\DbTable('smartobject_customtag'); |
|
192 | + if (!$table->exists()) { |
|
193 | + $table->setStructure(' |
|
194 | 194 | `customtagid` int(11) NOT NULL auto_increment, |
195 | 195 | `name` VARCHAR(255) NOT NULL, |
196 | 196 | `description` TEXT NOT NULL, |
@@ -198,24 +198,24 @@ discard block |
||
198 | 198 | `language` TEXT NOT NULL, |
199 | 199 | PRIMARY KEY (`customtagid`) |
200 | 200 | '); |
201 | - } |
|
202 | - |
|
203 | - if (!$dbupdater->updateTable($table)) { |
|
204 | - /** |
|
205 | - * @todo trap the errors |
|
206 | - */ |
|
207 | - } |
|
208 | - } |
|
209 | - |
|
210 | - // db migrate version = 4 |
|
211 | - $newDbVersion = 4; |
|
212 | - if ($dbVersion < $newDbVersion) { |
|
213 | - echo 'Database migrate to version ' . $newDbVersion . '<br>'; |
|
214 | - |
|
215 | - // Create table smartobject_currency |
|
216 | - $table = new XoopsModules\Smartobject\DbTable('smartobject_currency'); |
|
217 | - if (!$table->exists()) { |
|
218 | - $table->setStructure(' |
|
201 | + } |
|
202 | + |
|
203 | + if (!$dbupdater->updateTable($table)) { |
|
204 | + /** |
|
205 | + * @todo trap the errors |
|
206 | + */ |
|
207 | + } |
|
208 | + } |
|
209 | + |
|
210 | + // db migrate version = 4 |
|
211 | + $newDbVersion = 4; |
|
212 | + if ($dbVersion < $newDbVersion) { |
|
213 | + echo 'Database migrate to version ' . $newDbVersion . '<br>'; |
|
214 | + |
|
215 | + // Create table smartobject_currency |
|
216 | + $table = new XoopsModules\Smartobject\DbTable('smartobject_currency'); |
|
217 | + if (!$table->exists()) { |
|
218 | + $table->setStructure(' |
|
219 | 219 | `currencyid` int(11) NOT NULL auto_increment, |
220 | 220 | `iso4217` VARCHAR(5) NOT NULL, |
221 | 221 | `name` VARCHAR(255) NOT NULL, |
@@ -224,46 +224,46 @@ discard block |
||
224 | 224 | `default_currency` int(1) NOT NULL, |
225 | 225 | PRIMARY KEY (`currencyid`) |
226 | 226 | '); |
227 | - } |
|
228 | - |
|
229 | - if (!$dbupdater->updateTable($table)) { |
|
230 | - /** |
|
231 | - * @todo trap the errors |
|
232 | - */ |
|
233 | - } |
|
234 | - } |
|
235 | - |
|
236 | - // db migrate version = 6 |
|
237 | - $newDbVersion = 6; |
|
238 | - if ($dbVersion < $newDbVersion) { |
|
239 | - echo 'Database migrate to version ' . $newDbVersion . '<br>'; |
|
240 | - } |
|
241 | - |
|
242 | - $newDbVersion = 7; |
|
243 | - if ($dbVersion < $newDbVersion) { |
|
244 | - echo 'Database migrate to version ' . $newDbVersion . '<br>'; |
|
245 | - |
|
246 | - // Create table smartobject_file |
|
247 | - $table = new XoopsModules\Smartobject\DbTable('smartobject_file'); |
|
248 | - if (!$table->exists()) { |
|
249 | - $table->setStructure(' |
|
227 | + } |
|
228 | + |
|
229 | + if (!$dbupdater->updateTable($table)) { |
|
230 | + /** |
|
231 | + * @todo trap the errors |
|
232 | + */ |
|
233 | + } |
|
234 | + } |
|
235 | + |
|
236 | + // db migrate version = 6 |
|
237 | + $newDbVersion = 6; |
|
238 | + if ($dbVersion < $newDbVersion) { |
|
239 | + echo 'Database migrate to version ' . $newDbVersion . '<br>'; |
|
240 | + } |
|
241 | + |
|
242 | + $newDbVersion = 7; |
|
243 | + if ($dbVersion < $newDbVersion) { |
|
244 | + echo 'Database migrate to version ' . $newDbVersion . '<br>'; |
|
245 | + |
|
246 | + // Create table smartobject_file |
|
247 | + $table = new XoopsModules\Smartobject\DbTable('smartobject_file'); |
|
248 | + if (!$table->exists()) { |
|
249 | + $table->setStructure(' |
|
250 | 250 | `fileid` int(11) NOT NULL auto_increment, |
251 | 251 | `caption` varchar(255) collate latin1_general_ci NOT NULL, |
252 | 252 | `url` varchar(255) collate latin1_general_ci NOT NULL, |
253 | 253 | `description` text collate latin1_general_ci NOT NULL, |
254 | 254 | PRIMARY KEY (`fileid`) |
255 | 255 | '); |
256 | - if (!$dbupdater->updateTable($table)) { |
|
257 | - /** |
|
258 | - * @todo trap the errors |
|
259 | - */ |
|
260 | - } |
|
261 | - } |
|
262 | - unset($table); |
|
263 | - // Create table smartobject_urllink |
|
264 | - $table = new XoopsModules\Smartobject\DbTable('smartobject_urllink'); |
|
265 | - if (!$table->exists()) { |
|
266 | - $table->setStructure(' |
|
256 | + if (!$dbupdater->updateTable($table)) { |
|
257 | + /** |
|
258 | + * @todo trap the errors |
|
259 | + */ |
|
260 | + } |
|
261 | + } |
|
262 | + unset($table); |
|
263 | + // Create table smartobject_urllink |
|
264 | + $table = new XoopsModules\Smartobject\DbTable('smartobject_urllink'); |
|
265 | + if (!$table->exists()) { |
|
266 | + $table->setStructure(' |
|
267 | 267 | `urllinkid` int(11) NOT NULL auto_increment, |
268 | 268 | `caption` varchar(255) collate latin1_general_ci NOT NULL, |
269 | 269 | `url` varchar(255) collate latin1_general_ci NOT NULL, |
@@ -271,25 +271,25 @@ discard block |
||
271 | 271 | `target` varchar(10) collate latin1_general_ci NOT NULL, |
272 | 272 | PRIMARY KEY (`urllinkid`) |
273 | 273 | '); |
274 | - if (!$dbupdater->updateTable($table)) { |
|
275 | - /** |
|
276 | - * @todo trap the errors |
|
277 | - */ |
|
278 | - } |
|
279 | - } |
|
280 | - unset($table); |
|
281 | - } |
|
282 | - echo '</code>'; |
|
283 | - |
|
284 | - $feedback = ob_get_clean(); |
|
285 | - if (method_exists($module, 'setMessage')) { |
|
286 | - $module->setMessage($feedback); |
|
287 | - } else { |
|
288 | - echo $feedback; |
|
289 | - } |
|
290 | - Smartobject\Utility::setMeta('version', $newDbVersion, 'smartobject'); //Set meta version to current |
|
291 | - |
|
292 | - return true; |
|
274 | + if (!$dbupdater->updateTable($table)) { |
|
275 | + /** |
|
276 | + * @todo trap the errors |
|
277 | + */ |
|
278 | + } |
|
279 | + } |
|
280 | + unset($table); |
|
281 | + } |
|
282 | + echo '</code>'; |
|
283 | + |
|
284 | + $feedback = ob_get_clean(); |
|
285 | + if (method_exists($module, 'setMessage')) { |
|
286 | + $module->setMessage($feedback); |
|
287 | + } else { |
|
288 | + echo $feedback; |
|
289 | + } |
|
290 | + Smartobject\Utility::setMeta('version', $newDbVersion, 'smartobject'); //Set meta version to current |
|
291 | + |
|
292 | + return true; |
|
293 | 293 | } |
294 | 294 | |
295 | 295 | /** |
@@ -298,10 +298,10 @@ discard block |
||
298 | 298 | */ |
299 | 299 | function xoops_module_install_smartobject(\XoopsModule $module) |
300 | 300 | { |
301 | - ob_start(); |
|
301 | + ob_start(); |
|
302 | 302 | |
303 | - echo 'Using the ImpressCMS onInstall event'; |
|
304 | - $feedback = ob_get_clean(); |
|
303 | + echo 'Using the ImpressCMS onInstall event'; |
|
304 | + $feedback = ob_get_clean(); |
|
305 | 305 | |
306 | - return $feedback; |
|
306 | + return $feedback; |
|
307 | 307 | } |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | // defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
21 | 21 | |
22 | -require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php'; |
|
22 | +require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php'; |
|
23 | 23 | //require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartdbupdater.php'; |
24 | 24 | |
25 | 25 | /** |
@@ -37,12 +37,12 @@ discard block |
||
37 | 37 | |
38 | 38 | $dbupdater = new XoopsModules\Smartobject\Dbupdater(); |
39 | 39 | |
40 | - echo '<code>' . _SDU_UPDATE_UPDATING_DATABASE . '<br>'; |
|
40 | + echo '<code>'._SDU_UPDATE_UPDATING_DATABASE.'<br>'; |
|
41 | 41 | |
42 | 42 | // db migrate version = 1 |
43 | 43 | $newDbVersion = 1; |
44 | 44 | if ($dbVersion < $newDbVersion) { |
45 | - echo 'Database migrate to version ' . $newDbVersion . '<br>'; |
|
45 | + echo 'Database migrate to version '.$newDbVersion.'<br>'; |
|
46 | 46 | |
47 | 47 | // Create table smartobject_link |
48 | 48 | $table = new XoopsModules\Smartobject\DbTable('smartobject_link'); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | // db migrate version = 2 |
146 | 146 | $newDbVersion = 2; |
147 | 147 | if ($dbVersion < $newDbVersion) { |
148 | - echo 'Database migrate to version ' . $newDbVersion . '<br>'; |
|
148 | + echo 'Database migrate to version '.$newDbVersion.'<br>'; |
|
149 | 149 | |
150 | 150 | // Create table smartobject_rating |
151 | 151 | $table = new XoopsModules\Smartobject\DbTable('smartobject_rating'); |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | // db migrate version = 3 |
186 | 186 | $newDbVersion = 3; |
187 | 187 | if ($dbVersion < $newDbVersion) { |
188 | - echo 'Database migrate to version ' . $newDbVersion . '<br>'; |
|
188 | + echo 'Database migrate to version '.$newDbVersion.'<br>'; |
|
189 | 189 | |
190 | 190 | // Create table smartobject_customtag |
191 | 191 | $table = new XoopsModules\Smartobject\DbTable('smartobject_customtag'); |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | // db migrate version = 4 |
211 | 211 | $newDbVersion = 4; |
212 | 212 | if ($dbVersion < $newDbVersion) { |
213 | - echo 'Database migrate to version ' . $newDbVersion . '<br>'; |
|
213 | + echo 'Database migrate to version '.$newDbVersion.'<br>'; |
|
214 | 214 | |
215 | 215 | // Create table smartobject_currency |
216 | 216 | $table = new XoopsModules\Smartobject\DbTable('smartobject_currency'); |
@@ -236,12 +236,12 @@ discard block |
||
236 | 236 | // db migrate version = 6 |
237 | 237 | $newDbVersion = 6; |
238 | 238 | if ($dbVersion < $newDbVersion) { |
239 | - echo 'Database migrate to version ' . $newDbVersion . '<br>'; |
|
239 | + echo 'Database migrate to version '.$newDbVersion.'<br>'; |
|
240 | 240 | } |
241 | 241 | |
242 | 242 | $newDbVersion = 7; |
243 | 243 | if ($dbVersion < $newDbVersion) { |
244 | - echo 'Database migrate to version ' . $newDbVersion . '<br>'; |
|
244 | + echo 'Database migrate to version '.$newDbVersion.'<br>'; |
|
245 | 245 | |
246 | 246 | // Create table smartobject_file |
247 | 247 | $table = new XoopsModules\Smartobject\DbTable('smartobject_file'); |
@@ -13,16 +13,16 @@ |
||
13 | 13 | |
14 | 14 | function smart_adsense_initiate_smartytags() |
15 | 15 | { |
16 | - global $xoopsTpl, $smartobjectAdsenseHandler; |
|
17 | - if (is_object($xoopsTpl)) { |
|
18 | - foreach ($smartobjectAdsenseHandler->objects as $k => $v) { |
|
19 | - $xoopsTpl->assign('adsense_' . $k, $v->render()); |
|
20 | - } |
|
21 | - } |
|
16 | + global $xoopsTpl, $smartobjectAdsenseHandler; |
|
17 | + if (is_object($xoopsTpl)) { |
|
18 | + foreach ($smartobjectAdsenseHandler->objects as $k => $v) { |
|
19 | + $xoopsTpl->assign('adsense_' . $k, $v->render()); |
|
20 | + } |
|
21 | + } |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | if (!defined('SMARTOBJECT_URL')) { |
25 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php'; |
|
25 | + require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php'; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | //require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/functions.php'; |
@@ -16,13 +16,13 @@ |
||
16 | 16 | global $xoopsTpl, $smartobjectAdsenseHandler; |
17 | 17 | if (is_object($xoopsTpl)) { |
18 | 18 | foreach ($smartobjectAdsenseHandler->objects as $k => $v) { |
19 | - $xoopsTpl->assign('adsense_' . $k, $v->render()); |
|
19 | + $xoopsTpl->assign('adsense_'.$k, $v->render()); |
|
20 | 20 | } |
21 | 21 | } |
22 | 22 | } |
23 | 23 | |
24 | 24 | if (!defined('SMARTOBJECT_URL')) { |
25 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php'; |
|
25 | + require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php'; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | //require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/functions.php'; |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | use XoopsModules\Smartobject\PluginHandler; |
13 | 13 | |
14 | 14 | if (!defined('SMARTOBJECT_URL')) { |
15 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php'; |
|
15 | + require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php'; |
|
16 | 16 | } |
17 | 17 | //require_once SMARTOBJECT_ROOT_PATH . 'class/rating.php'; |
18 | 18 | //require_once SMARTOBJECT_ROOT_PATH . 'include/functions.php'; |
@@ -26,52 +26,52 @@ discard block |
||
26 | 26 | $smartobjectPluginHandler = new XoopsModules\Smartobject\PluginHandler(); |
27 | 27 | $pluginObj = $smartobjectPluginHandler->getPlugin($module_dirname); |
28 | 28 | if ($pluginObj) { |
29 | - $rating_item = $pluginObj->getItem(); |
|
30 | - if ($rating_item) { |
|
31 | - $rating_itemid = $pluginObj->getItemIdForItem($rating_item); |
|
32 | - $stats = $smartobjectRatingHandler->getRatingAverageByItemId($rating_itemid, $module_dirname, $rating_item); |
|
33 | - $xoopsTpl->assign('smartobject_rating_stats_total', $stats['sum']); |
|
34 | - $xoopsTpl->assign('smartobject_rating_stats_average', $stats['average']); |
|
35 | - $xoopsTpl->assign('smartobject_rating_item', $rating_item); |
|
36 | - if (is_object($xoopsUser)) { |
|
37 | - $ratingObj = $smartobjectRatingHandler->already_rated($rating_item, $rating_itemid, $module_dirname, $xoopsUser->getVar('uid')); |
|
38 | - $xoopsTpl->assign('smartobject_user_can_rate', true); |
|
39 | - } |
|
40 | - if (isset($ratingObj) && is_object($ratingObj)) { |
|
41 | - $xoopsTpl->assign('smartobject_user_rate', $ratingObj->getVar('rate')); |
|
42 | - $xoopsTpl->assign('smartobject_rated', true); |
|
43 | - } else { |
|
44 | - $xoopsTpl->assign('smartobject_rating_dirname', $module_dirname); |
|
45 | - $xoopsTpl->assign('smartobject_rating_itemid', $rating_itemid); |
|
46 | - $urls = Smartobject\Utility::getCurrentUrls(); |
|
47 | - $xoopsTpl->assign('smartobject_rating_current_page', $urls['full']); |
|
48 | - if (isset($xoTheme) && is_object($xoTheme)) { |
|
49 | - $xoTheme->addStylesheet(SMARTOBJECT_URL . 'assets/css/module.css'); |
|
50 | - } else { |
|
51 | - //probleme d'inclusion de css apres le flashplayer. Style plac� dans css du theme |
|
52 | - //$xoopsTpl->assign('smartobject_css',"<link rel='stylesheet' type='text/css' href='".XOOPS_URL."/modules/smartobject/assets/css/module.css'>"); |
|
53 | - } |
|
54 | - } |
|
55 | - } |
|
29 | + $rating_item = $pluginObj->getItem(); |
|
30 | + if ($rating_item) { |
|
31 | + $rating_itemid = $pluginObj->getItemIdForItem($rating_item); |
|
32 | + $stats = $smartobjectRatingHandler->getRatingAverageByItemId($rating_itemid, $module_dirname, $rating_item); |
|
33 | + $xoopsTpl->assign('smartobject_rating_stats_total', $stats['sum']); |
|
34 | + $xoopsTpl->assign('smartobject_rating_stats_average', $stats['average']); |
|
35 | + $xoopsTpl->assign('smartobject_rating_item', $rating_item); |
|
36 | + if (is_object($xoopsUser)) { |
|
37 | + $ratingObj = $smartobjectRatingHandler->already_rated($rating_item, $rating_itemid, $module_dirname, $xoopsUser->getVar('uid')); |
|
38 | + $xoopsTpl->assign('smartobject_user_can_rate', true); |
|
39 | + } |
|
40 | + if (isset($ratingObj) && is_object($ratingObj)) { |
|
41 | + $xoopsTpl->assign('smartobject_user_rate', $ratingObj->getVar('rate')); |
|
42 | + $xoopsTpl->assign('smartobject_rated', true); |
|
43 | + } else { |
|
44 | + $xoopsTpl->assign('smartobject_rating_dirname', $module_dirname); |
|
45 | + $xoopsTpl->assign('smartobject_rating_itemid', $rating_itemid); |
|
46 | + $urls = Smartobject\Utility::getCurrentUrls(); |
|
47 | + $xoopsTpl->assign('smartobject_rating_current_page', $urls['full']); |
|
48 | + if (isset($xoTheme) && is_object($xoTheme)) { |
|
49 | + $xoTheme->addStylesheet(SMARTOBJECT_URL . 'assets/css/module.css'); |
|
50 | + } else { |
|
51 | + //probleme d'inclusion de css apres le flashplayer. Style plac� dans css du theme |
|
52 | + //$xoopsTpl->assign('smartobject_css',"<link rel='stylesheet' type='text/css' href='".XOOPS_URL."/modules/smartobject/assets/css/module.css'>"); |
|
53 | + } |
|
54 | + } |
|
55 | + } |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | if (isset($_POST['smartobject_rating_submit'])) { |
59 | - // The rating form has just been posted. Let's save the info |
|
60 | - $ratingObj = $smartobjectRatingHandler->create(); |
|
61 | - $ratingObj->setVar('dirname', $module_dirname); |
|
62 | - $ratingObj->setVar('item', $rating_item); |
|
63 | - $ratingObj->setVar('itemid', $rating_itemid); |
|
64 | - $ratingObj->setVar('uid', $xoopsUser->getVar('uid')); |
|
65 | - $ratingObj->setVar('date', time()); |
|
66 | - $ratingObj->setVar('rate', $_POST['smartobject_rating_value']); |
|
67 | - if (!$smartobjectRatingHandler->insert($ratingObj)) { |
|
68 | - if (1062 == $xoopsDB->errno()) { |
|
69 | - $message = _SOBJECT_RATING_DUPLICATE_ENTRY; |
|
70 | - } else { |
|
71 | - $message = _SOBJECT_RATING_ERROR; |
|
72 | - } |
|
73 | - } else { |
|
74 | - $message = _SOBJECT_RATING_SUCCESS; |
|
75 | - } |
|
76 | - redirect_header('', 3, $message); |
|
59 | + // The rating form has just been posted. Let's save the info |
|
60 | + $ratingObj = $smartobjectRatingHandler->create(); |
|
61 | + $ratingObj->setVar('dirname', $module_dirname); |
|
62 | + $ratingObj->setVar('item', $rating_item); |
|
63 | + $ratingObj->setVar('itemid', $rating_itemid); |
|
64 | + $ratingObj->setVar('uid', $xoopsUser->getVar('uid')); |
|
65 | + $ratingObj->setVar('date', time()); |
|
66 | + $ratingObj->setVar('rate', $_POST['smartobject_rating_value']); |
|
67 | + if (!$smartobjectRatingHandler->insert($ratingObj)) { |
|
68 | + if (1062 == $xoopsDB->errno()) { |
|
69 | + $message = _SOBJECT_RATING_DUPLICATE_ENTRY; |
|
70 | + } else { |
|
71 | + $message = _SOBJECT_RATING_ERROR; |
|
72 | + } |
|
73 | + } else { |
|
74 | + $message = _SOBJECT_RATING_SUCCESS; |
|
75 | + } |
|
76 | + redirect_header('', 3, $message); |
|
77 | 77 | } |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | use XoopsModules\Smartobject\PluginHandler; |
13 | 13 | |
14 | 14 | if (!defined('SMARTOBJECT_URL')) { |
15 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php'; |
|
15 | + require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php'; |
|
16 | 16 | } |
17 | 17 | //require_once SMARTOBJECT_ROOT_PATH . 'class/rating.php'; |
18 | 18 | //require_once SMARTOBJECT_ROOT_PATH . 'include/functions.php'; |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $urls = Smartobject\Utility::getCurrentUrls(); |
47 | 47 | $xoopsTpl->assign('smartobject_rating_current_page', $urls['full']); |
48 | 48 | if (isset($xoTheme) && is_object($xoTheme)) { |
49 | - $xoTheme->addStylesheet(SMARTOBJECT_URL . 'assets/css/module.css'); |
|
49 | + $xoTheme->addStylesheet(SMARTOBJECT_URL.'assets/css/module.css'); |
|
50 | 50 | } else { |
51 | 51 | //probleme d'inclusion de css apres le flashplayer. Style plac� dans css du theme |
52 | 52 | //$xoopsTpl->assign('smartobject_css',"<link rel='stylesheet' type='text/css' href='".XOOPS_URL."/modules/smartobject/assets/css/module.css'>"); |
@@ -20,13 +20,13 @@ |
||
20 | 20 | $smartobjectCurrencyHandler = Smartobject\Helper::getInstance()->getHandler('Currency'); |
21 | 21 | |
22 | 22 | if (!$smartobjectCurrenciesObj) { |
23 | - $smartobjectCurrenciesObj = $smartobjectCurrencyHandler->getCurrencies(); |
|
23 | + $smartobjectCurrenciesObj = $smartobjectCurrencyHandler->getCurrencies(); |
|
24 | 24 | } |
25 | 25 | if (!$smartobjectCurrenciesArray) { |
26 | - foreach ($smartobjectCurrenciesObj as $currencyid => $currencyObj) { |
|
27 | - if ($currencyObj->getVar('default_currency', 'e')) { |
|
28 | - $smartobjectDefaultCurrency = $currencyObj; |
|
29 | - } |
|
30 | - $smartobjectCurrenciesArray[$currencyid] = $currencyObj->getCode(); |
|
31 | - } |
|
26 | + foreach ($smartobjectCurrenciesObj as $currencyid => $currencyObj) { |
|
27 | + if ($currencyObj->getVar('default_currency', 'e')) { |
|
28 | + $smartobjectDefaultCurrency = $currencyObj; |
|
29 | + } |
|
30 | + $smartobjectCurrenciesArray[$currencyid] = $currencyObj->getCode(); |
|
31 | + } |
|
32 | 32 | } |
@@ -13,16 +13,16 @@ |
||
13 | 13 | |
14 | 14 | function smart_customtag_initiate() |
15 | 15 | { |
16 | - global $xoopsTpl, $smartobjectCustomtagHandler; |
|
17 | - if (is_object($xoopsTpl)) { |
|
18 | - foreach ($smartobjectCustomtagHandler->objects as $k => $v) { |
|
19 | - $xoopsTpl->assign($k, $v->render()); |
|
20 | - } |
|
21 | - } |
|
16 | + global $xoopsTpl, $smartobjectCustomtagHandler; |
|
17 | + if (is_object($xoopsTpl)) { |
|
18 | + foreach ($smartobjectCustomtagHandler->objects as $k => $v) { |
|
19 | + $xoopsTpl->assign($k, $v->render()); |
|
20 | + } |
|
21 | + } |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | if (!defined('SMARTOBJECT_URL')) { |
25 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php'; |
|
25 | + require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php'; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | Smartobject\Utility::loadLanguageFile('smartobject', 'customtag'); |
@@ -22,7 +22,7 @@ |
||
22 | 22 | } |
23 | 23 | |
24 | 24 | if (!defined('SMARTOBJECT_URL')) { |
25 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php'; |
|
25 | + require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php'; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | Smartobject\Utility::loadLanguageFile('smartobject', 'customtag'); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | use XoopsModules\Smartobject\ObjectController; |
17 | 17 | use XoopsModules\Smartobject\Table; |
18 | 18 | |
19 | -require_once __DIR__ . '/admin_header.php'; |
|
19 | +require_once __DIR__.'/admin_header.php'; |
|
20 | 20 | //require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
21 | 21 | //require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjectlink.php'; |
22 | 22 | $adminObject = \Xmf\Module\Admin::getInstance(); |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $linkObj = $smartobjectLinkHandler->get($linkid); |
47 | 47 | |
48 | 48 | if ($linkObj->isNew()) { |
49 | - redirect_header(SMARTOBJECT_URL . 'admin/link.php', 3, _AM_SOBJECT_LINK_NOT_FOUND); |
|
49 | + redirect_header(SMARTOBJECT_URL.'admin/link.php', 3, _AM_SOBJECT_LINK_NOT_FOUND); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | Smartobject\Utility::getXoopsCpHeader(); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | Smartobject\Utility::getCollapsableBar('sentlinks', _AM_SOBJECT_SENT_LINK_DISPLAY, _AM_SOBJECT_SENT_LINK_DISPLAY_INFO); |
57 | 57 | |
58 | - require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
58 | + require_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
59 | 59 | |
60 | 60 | // --- |
61 | 61 | // 2012-01-01 PHP 5.3: Assigning the return value of new by reference is now deprecated. |
@@ -105,4 +105,4 @@ discard block |
||
105 | 105 | |
106 | 106 | //Smartobject\Utility::getModFooter(); |
107 | 107 | //xoops_cp_footer(); |
108 | -require_once __DIR__ . '/admin_footer.php'; |
|
108 | +require_once __DIR__.'/admin_footer.php'; |
@@ -26,81 +26,81 @@ |
||
26 | 26 | $op = ''; |
27 | 27 | |
28 | 28 | if (isset($_GET['op'])) { |
29 | - $op = $_GET['op']; |
|
29 | + $op = $_GET['op']; |
|
30 | 30 | } |
31 | 31 | if (isset($_POST['op'])) { |
32 | - $op = $_POST['op']; |
|
32 | + $op = $_POST['op']; |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | switch ($op) { |
36 | 36 | |
37 | - case 'del': |
|
37 | + case 'del': |
|
38 | 38 | // require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
39 | - $controller = new XoopsModules\Smartobject\ObjectController($smartobjectLinkHandler); |
|
40 | - $controller->handleObjectDeletion(_AM_SOBJECT_SENT_LINK_DELETE_CONFIRM); |
|
39 | + $controller = new XoopsModules\Smartobject\ObjectController($smartobjectLinkHandler); |
|
40 | + $controller->handleObjectDeletion(_AM_SOBJECT_SENT_LINK_DELETE_CONFIRM); |
|
41 | 41 | |
42 | - break; |
|
42 | + break; |
|
43 | 43 | |
44 | - case 'view': |
|
45 | - $linkid = \Xmf\Request::getInt('linkid', 0, 'GET'); |
|
46 | - $linkObj = $smartobjectLinkHandler->get($linkid); |
|
44 | + case 'view': |
|
45 | + $linkid = \Xmf\Request::getInt('linkid', 0, 'GET'); |
|
46 | + $linkObj = $smartobjectLinkHandler->get($linkid); |
|
47 | 47 | |
48 | - if ($linkObj->isNew()) { |
|
49 | - redirect_header(SMARTOBJECT_URL . 'admin/link.php', 3, _AM_SOBJECT_LINK_NOT_FOUND); |
|
50 | - } |
|
48 | + if ($linkObj->isNew()) { |
|
49 | + redirect_header(SMARTOBJECT_URL . 'admin/link.php', 3, _AM_SOBJECT_LINK_NOT_FOUND); |
|
50 | + } |
|
51 | 51 | |
52 | - Smartobject\Utility::getXoopsCpHeader(); |
|
52 | + Smartobject\Utility::getXoopsCpHeader(); |
|
53 | 53 | |
54 | - //Smartobject\Utility::getAdminMenu(1, _AM_SOBJECT_SENT_LINK_DISPLAY); |
|
54 | + //Smartobject\Utility::getAdminMenu(1, _AM_SOBJECT_SENT_LINK_DISPLAY); |
|
55 | 55 | |
56 | - Smartobject\Utility::getCollapsableBar('sentlinks', _AM_SOBJECT_SENT_LINK_DISPLAY, _AM_SOBJECT_SENT_LINK_DISPLAY_INFO); |
|
56 | + Smartobject\Utility::getCollapsableBar('sentlinks', _AM_SOBJECT_SENT_LINK_DISPLAY, _AM_SOBJECT_SENT_LINK_DISPLAY_INFO); |
|
57 | 57 | |
58 | - require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
58 | + require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
59 | 59 | |
60 | - // --- |
|
61 | - // 2012-01-01 PHP 5.3: Assigning the return value of new by reference is now deprecated. |
|
62 | - // $xoopsTpl = new \XoopsTpl(); |
|
63 | - $xoopsTpl = new \XoopsTpl(); |
|
64 | - //--- |
|
60 | + // --- |
|
61 | + // 2012-01-01 PHP 5.3: Assigning the return value of new by reference is now deprecated. |
|
62 | + // $xoopsTpl = new \XoopsTpl(); |
|
63 | + $xoopsTpl = new \XoopsTpl(); |
|
64 | + //--- |
|
65 | 65 | |
66 | - $xoopsTpl->assign('link', $linkObj->toArray()); |
|
67 | - $xoopsTpl->display('db:smartobject_sentlink_display.tpl'); |
|
66 | + $xoopsTpl->assign('link', $linkObj->toArray()); |
|
67 | + $xoopsTpl->display('db:smartobject_sentlink_display.tpl'); |
|
68 | 68 | |
69 | - echo '<br>'; |
|
70 | - Smartobject\Utility::closeCollapsable('sentlinks'); |
|
71 | - echo '<br>'; |
|
69 | + echo '<br>'; |
|
70 | + Smartobject\Utility::closeCollapsable('sentlinks'); |
|
71 | + echo '<br>'; |
|
72 | 72 | |
73 | - break; |
|
73 | + break; |
|
74 | 74 | |
75 | - default: |
|
75 | + default: |
|
76 | 76 | |
77 | - Smartobject\Utility::getXoopsCpHeader(); |
|
77 | + Smartobject\Utility::getXoopsCpHeader(); |
|
78 | 78 | |
79 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
79 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
80 | 80 | |
81 | - //Smartobject\Utility::getAdminMenu(1, _AM_SOBJECT_SENT_LINKS); |
|
81 | + //Smartobject\Utility::getAdminMenu(1, _AM_SOBJECT_SENT_LINKS); |
|
82 | 82 | |
83 | - Smartobject\Utility::getCollapsableBar('sentlinks', _AM_SOBJECT_SENT_LINKS, _AM_SOBJECT_SENT_LINKS_INFO); |
|
83 | + Smartobject\Utility::getCollapsableBar('sentlinks', _AM_SOBJECT_SENT_LINKS, _AM_SOBJECT_SENT_LINKS_INFO); |
|
84 | 84 | |
85 | 85 | // require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
86 | - $objectTable = new Smartobject\Table($smartobjectLinkHandler, null, ['delete']); |
|
87 | - $objectTable->addColumn(new Smartobject\ObjectColumn('date')); |
|
88 | - $objectTable->addColumn(new Smartobject\ObjectColumn(_AM_SOBJECT_SENT_LINKS_FROM, $align = 'left', $width = false, 'getFromInfo')); |
|
89 | - $objectTable->addColumn(new Smartobject\ObjectColumn(_AM_SOBJECT_SENT_LINKS_TO, $align = 'left', $width = false, 'getToInfo')); |
|
90 | - $objectTable->addColumn(new Smartobject\ObjectColumn('link')); |
|
86 | + $objectTable = new Smartobject\Table($smartobjectLinkHandler, null, ['delete']); |
|
87 | + $objectTable->addColumn(new Smartobject\ObjectColumn('date')); |
|
88 | + $objectTable->addColumn(new Smartobject\ObjectColumn(_AM_SOBJECT_SENT_LINKS_FROM, $align = 'left', $width = false, 'getFromInfo')); |
|
89 | + $objectTable->addColumn(new Smartobject\ObjectColumn(_AM_SOBJECT_SENT_LINKS_TO, $align = 'left', $width = false, 'getToInfo')); |
|
90 | + $objectTable->addColumn(new Smartobject\ObjectColumn('link')); |
|
91 | 91 | |
92 | - $objectTable->addCustomAction('getViewItemLink'); |
|
92 | + $objectTable->addCustomAction('getViewItemLink'); |
|
93 | 93 | |
94 | - $objectTable->setDefaultSort('date'); |
|
95 | - $objectTable->setDefaultOrder('DESC'); |
|
94 | + $objectTable->setDefaultSort('date'); |
|
95 | + $objectTable->setDefaultOrder('DESC'); |
|
96 | 96 | |
97 | - $objectTable->render(); |
|
97 | + $objectTable->render(); |
|
98 | 98 | |
99 | - echo '<br>'; |
|
100 | - Smartobject\Utility::closeCollapsable('sentlinks'); |
|
101 | - echo '<br>'; |
|
99 | + echo '<br>'; |
|
100 | + Smartobject\Utility::closeCollapsable('sentlinks'); |
|
101 | + echo '<br>'; |
|
102 | 102 | |
103 | - break; |
|
103 | + break; |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | //Smartobject\Utility::getModFooter(); |
@@ -34,73 +34,73 @@ |
||
34 | 34 | |
35 | 35 | switch ($op) { |
36 | 36 | |
37 | - case 'del': |
|
38 | -// require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
39 | - $controller = new XoopsModules\Smartobject\ObjectController($smartobjectLinkHandler); |
|
40 | - $controller->handleObjectDeletion(_AM_SOBJECT_SENT_LINK_DELETE_CONFIRM); |
|
37 | + case 'del': |
|
38 | + // require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
39 | + $controller = new XoopsModules\Smartobject\ObjectController($smartobjectLinkHandler); |
|
40 | + $controller->handleObjectDeletion(_AM_SOBJECT_SENT_LINK_DELETE_CONFIRM); |
|
41 | 41 | |
42 | - break; |
|
42 | + break; |
|
43 | 43 | |
44 | - case 'view': |
|
45 | - $linkid = \Xmf\Request::getInt('linkid', 0, 'GET'); |
|
46 | - $linkObj = $smartobjectLinkHandler->get($linkid); |
|
44 | + case 'view': |
|
45 | + $linkid = \Xmf\Request::getInt('linkid', 0, 'GET'); |
|
46 | + $linkObj = $smartobjectLinkHandler->get($linkid); |
|
47 | 47 | |
48 | - if ($linkObj->isNew()) { |
|
49 | - redirect_header(SMARTOBJECT_URL . 'admin/link.php', 3, _AM_SOBJECT_LINK_NOT_FOUND); |
|
50 | - } |
|
48 | + if ($linkObj->isNew()) { |
|
49 | + redirect_header(SMARTOBJECT_URL . 'admin/link.php', 3, _AM_SOBJECT_LINK_NOT_FOUND); |
|
50 | + } |
|
51 | 51 | |
52 | - Smartobject\Utility::getXoopsCpHeader(); |
|
52 | + Smartobject\Utility::getXoopsCpHeader(); |
|
53 | 53 | |
54 | - //Smartobject\Utility::getAdminMenu(1, _AM_SOBJECT_SENT_LINK_DISPLAY); |
|
54 | + //Smartobject\Utility::getAdminMenu(1, _AM_SOBJECT_SENT_LINK_DISPLAY); |
|
55 | 55 | |
56 | - Smartobject\Utility::getCollapsableBar('sentlinks', _AM_SOBJECT_SENT_LINK_DISPLAY, _AM_SOBJECT_SENT_LINK_DISPLAY_INFO); |
|
56 | + Smartobject\Utility::getCollapsableBar('sentlinks', _AM_SOBJECT_SENT_LINK_DISPLAY, _AM_SOBJECT_SENT_LINK_DISPLAY_INFO); |
|
57 | 57 | |
58 | - require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
58 | + require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
59 | 59 | |
60 | - // --- |
|
61 | - // 2012-01-01 PHP 5.3: Assigning the return value of new by reference is now deprecated. |
|
62 | - // $xoopsTpl = new \XoopsTpl(); |
|
63 | - $xoopsTpl = new \XoopsTpl(); |
|
64 | - //--- |
|
60 | + // --- |
|
61 | + // 2012-01-01 PHP 5.3: Assigning the return value of new by reference is now deprecated. |
|
62 | + // $xoopsTpl = new \XoopsTpl(); |
|
63 | + $xoopsTpl = new \XoopsTpl(); |
|
64 | + //--- |
|
65 | 65 | |
66 | - $xoopsTpl->assign('link', $linkObj->toArray()); |
|
67 | - $xoopsTpl->display('db:smartobject_sentlink_display.tpl'); |
|
66 | + $xoopsTpl->assign('link', $linkObj->toArray()); |
|
67 | + $xoopsTpl->display('db:smartobject_sentlink_display.tpl'); |
|
68 | 68 | |
69 | - echo '<br>'; |
|
70 | - Smartobject\Utility::closeCollapsable('sentlinks'); |
|
71 | - echo '<br>'; |
|
69 | + echo '<br>'; |
|
70 | + Smartobject\Utility::closeCollapsable('sentlinks'); |
|
71 | + echo '<br>'; |
|
72 | 72 | |
73 | - break; |
|
73 | + break; |
|
74 | 74 | |
75 | - default: |
|
75 | + default: |
|
76 | 76 | |
77 | - Smartobject\Utility::getXoopsCpHeader(); |
|
77 | + Smartobject\Utility::getXoopsCpHeader(); |
|
78 | 78 | |
79 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
79 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
80 | 80 | |
81 | - //Smartobject\Utility::getAdminMenu(1, _AM_SOBJECT_SENT_LINKS); |
|
81 | + //Smartobject\Utility::getAdminMenu(1, _AM_SOBJECT_SENT_LINKS); |
|
82 | 82 | |
83 | - Smartobject\Utility::getCollapsableBar('sentlinks', _AM_SOBJECT_SENT_LINKS, _AM_SOBJECT_SENT_LINKS_INFO); |
|
83 | + Smartobject\Utility::getCollapsableBar('sentlinks', _AM_SOBJECT_SENT_LINKS, _AM_SOBJECT_SENT_LINKS_INFO); |
|
84 | 84 | |
85 | -// require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
86 | - $objectTable = new Smartobject\Table($smartobjectLinkHandler, null, ['delete']); |
|
87 | - $objectTable->addColumn(new Smartobject\ObjectColumn('date')); |
|
88 | - $objectTable->addColumn(new Smartobject\ObjectColumn(_AM_SOBJECT_SENT_LINKS_FROM, $align = 'left', $width = false, 'getFromInfo')); |
|
89 | - $objectTable->addColumn(new Smartobject\ObjectColumn(_AM_SOBJECT_SENT_LINKS_TO, $align = 'left', $width = false, 'getToInfo')); |
|
90 | - $objectTable->addColumn(new Smartobject\ObjectColumn('link')); |
|
85 | + // require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
86 | + $objectTable = new Smartobject\Table($smartobjectLinkHandler, null, ['delete']); |
|
87 | + $objectTable->addColumn(new Smartobject\ObjectColumn('date')); |
|
88 | + $objectTable->addColumn(new Smartobject\ObjectColumn(_AM_SOBJECT_SENT_LINKS_FROM, $align = 'left', $width = false, 'getFromInfo')); |
|
89 | + $objectTable->addColumn(new Smartobject\ObjectColumn(_AM_SOBJECT_SENT_LINKS_TO, $align = 'left', $width = false, 'getToInfo')); |
|
90 | + $objectTable->addColumn(new Smartobject\ObjectColumn('link')); |
|
91 | 91 | |
92 | - $objectTable->addCustomAction('getViewItemLink'); |
|
92 | + $objectTable->addCustomAction('getViewItemLink'); |
|
93 | 93 | |
94 | - $objectTable->setDefaultSort('date'); |
|
95 | - $objectTable->setDefaultOrder('DESC'); |
|
94 | + $objectTable->setDefaultSort('date'); |
|
95 | + $objectTable->setDefaultOrder('DESC'); |
|
96 | 96 | |
97 | - $objectTable->render(); |
|
97 | + $objectTable->render(); |
|
98 | 98 | |
99 | - echo '<br>'; |
|
100 | - Smartobject\Utility::closeCollapsable('sentlinks'); |
|
101 | - echo '<br>'; |
|
99 | + echo '<br>'; |
|
100 | + Smartobject\Utility::closeCollapsable('sentlinks'); |
|
101 | + echo '<br>'; |
|
102 | 102 | |
103 | - break; |
|
103 | + break; |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | //Smartobject\Utility::getModFooter(); |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $tagObj = $smartobjectTagHandler->get($tagid); |
23 | 23 | |
24 | 24 | if ($tagObj->isNew()) { |
25 | - $breadcrumb = _AM_SOBJECT_TAGS . ' > ' . _AM_SOBJECT_TAG_CREATE; |
|
25 | + $breadcrumb = _AM_SOBJECT_TAGS.' > '._AM_SOBJECT_TAG_CREATE; |
|
26 | 26 | $title = _AM_SOBJECT_TAG_CREATE; |
27 | 27 | $info = _AM_SOBJECT_TAG_CREATE_INFO; |
28 | 28 | $collaps_name = 'tagcreate'; |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | //$tagObj->stripMultilanguageFields(); |
32 | 32 | } else { |
33 | 33 | if ($language) { |
34 | - $breadcrumb = _AM_SOBJECT_TAGS . ' > ' . _AM_SOBJECT_TAG_EDITING_LANGUAGE; |
|
34 | + $breadcrumb = _AM_SOBJECT_TAGS.' > '._AM_SOBJECT_TAG_EDITING_LANGUAGE; |
|
35 | 35 | $title = _AM_SOBJECT_TAG_EDIT_LANGUAGE; |
36 | 36 | $info = _AM_SOBJECT_TAG_EDIT_LANGUAGE_INFO; |
37 | 37 | $collaps_name = 'tageditlanguage'; |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $submit_button_caption = null; |
40 | 40 | $tagObj->makeNonMLFieldReadOnly(); |
41 | 41 | } else { |
42 | - $breadcrumb = _AM_SOBJECT_TAGS . ' > ' . _AM_SOBJECT_EDITING; |
|
42 | + $breadcrumb = _AM_SOBJECT_TAGS.' > '._AM_SOBJECT_EDITING; |
|
43 | 43 | $title = _AM_SOBJECT_TAG_EDIT; |
44 | 44 | $info = _AM_SOBJECT_TAG_EDIT_INFO; |
45 | 45 | $collaps_name = 'tagedit'; |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | Smartobject\Utility::closeCollapsable($collaps_name); |
59 | 59 | } |
60 | 60 | |
61 | -require_once __DIR__ . '/admin_header.php'; |
|
61 | +require_once __DIR__.'/admin_header.php'; |
|
62 | 62 | //require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
63 | 63 | //require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttag.php'; |
64 | 64 | |
@@ -91,11 +91,11 @@ discard block |
||
91 | 91 | $controller = new ObjectController($smartobjectTagHandler); |
92 | 92 | $tagObj = $controller->storeSmartObject(); |
93 | 93 | if ($tagObj->hasError()) { |
94 | - redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR . $tagObj->getHtmlErrors()); |
|
94 | + redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR.$tagObj->getHtmlErrors()); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | if ($tagObj->hasError()) { |
98 | - redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR . $tagObj->getHtmlErrors()); |
|
98 | + redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR.$tagObj->getHtmlErrors()); |
|
99 | 99 | } else { |
100 | 100 | redirect_header(Smartobject\Utility::getPageBeforeForm(), 3, _CO_SOBJECT_SAVE_SUCCESS); |
101 | 101 | } |
@@ -142,4 +142,4 @@ discard block |
||
142 | 142 | |
143 | 143 | //Smartobject\Utility::getModFooter(); |
144 | 144 | //xoops_cp_footer(); |
145 | -require_once __DIR__ . '/admin_footer.php'; |
|
145 | +require_once __DIR__.'/admin_footer.php'; |
@@ -17,45 +17,45 @@ discard block |
||
17 | 17 | |
18 | 18 | function edittag($tagid = 0, $language = false, $fct = false) |
19 | 19 | { |
20 | - global $smartobjectTagHandler; |
|
21 | - |
|
22 | - $tagObj = $smartobjectTagHandler->get($tagid); |
|
23 | - |
|
24 | - if ($tagObj->isNew()) { |
|
25 | - $breadcrumb = _AM_SOBJECT_TAGS . ' > ' . _AM_SOBJECT_TAG_CREATE; |
|
26 | - $title = _AM_SOBJECT_TAG_CREATE; |
|
27 | - $info = _AM_SOBJECT_TAG_CREATE_INFO; |
|
28 | - $collaps_name = 'tagcreate'; |
|
29 | - $form_name = _AM_SOBJECT_TAG_CREATE; |
|
30 | - $submit_button_caption = null; |
|
31 | - //$tagObj->stripMultilanguageFields(); |
|
32 | - } else { |
|
33 | - if ($language) { |
|
34 | - $breadcrumb = _AM_SOBJECT_TAGS . ' > ' . _AM_SOBJECT_TAG_EDITING_LANGUAGE; |
|
35 | - $title = _AM_SOBJECT_TAG_EDIT_LANGUAGE; |
|
36 | - $info = _AM_SOBJECT_TAG_EDIT_LANGUAGE_INFO; |
|
37 | - $collaps_name = 'tageditlanguage'; |
|
38 | - $form_name = _AM_SOBJECT_TAG_EDIT_LANGUAGE; |
|
39 | - $submit_button_caption = null; |
|
40 | - $tagObj->makeNonMLFieldReadOnly(); |
|
41 | - } else { |
|
42 | - $breadcrumb = _AM_SOBJECT_TAGS . ' > ' . _AM_SOBJECT_EDITING; |
|
43 | - $title = _AM_SOBJECT_TAG_EDIT; |
|
44 | - $info = _AM_SOBJECT_TAG_EDIT_INFO; |
|
45 | - $collaps_name = 'tagedit'; |
|
46 | - $form_name = _AM_SOBJECT_TAG_EDIT; |
|
47 | - $submit_button_caption = null; |
|
48 | - $tagObj->stripMultilanguageFields(); |
|
49 | - } |
|
50 | - } |
|
51 | - |
|
52 | - //Smartobject\Utility::getAdminMenu(2, $breadcrumb); |
|
53 | - |
|
54 | - Smartobject\Utility::getCollapsableBar($collaps_name, $title, $info); |
|
55 | - |
|
56 | - $sform = $tagObj->getForm($form_name, 'addtag', false, $submit_button_caption); |
|
57 | - $sform->display(); |
|
58 | - Smartobject\Utility::closeCollapsable($collaps_name); |
|
20 | + global $smartobjectTagHandler; |
|
21 | + |
|
22 | + $tagObj = $smartobjectTagHandler->get($tagid); |
|
23 | + |
|
24 | + if ($tagObj->isNew()) { |
|
25 | + $breadcrumb = _AM_SOBJECT_TAGS . ' > ' . _AM_SOBJECT_TAG_CREATE; |
|
26 | + $title = _AM_SOBJECT_TAG_CREATE; |
|
27 | + $info = _AM_SOBJECT_TAG_CREATE_INFO; |
|
28 | + $collaps_name = 'tagcreate'; |
|
29 | + $form_name = _AM_SOBJECT_TAG_CREATE; |
|
30 | + $submit_button_caption = null; |
|
31 | + //$tagObj->stripMultilanguageFields(); |
|
32 | + } else { |
|
33 | + if ($language) { |
|
34 | + $breadcrumb = _AM_SOBJECT_TAGS . ' > ' . _AM_SOBJECT_TAG_EDITING_LANGUAGE; |
|
35 | + $title = _AM_SOBJECT_TAG_EDIT_LANGUAGE; |
|
36 | + $info = _AM_SOBJECT_TAG_EDIT_LANGUAGE_INFO; |
|
37 | + $collaps_name = 'tageditlanguage'; |
|
38 | + $form_name = _AM_SOBJECT_TAG_EDIT_LANGUAGE; |
|
39 | + $submit_button_caption = null; |
|
40 | + $tagObj->makeNonMLFieldReadOnly(); |
|
41 | + } else { |
|
42 | + $breadcrumb = _AM_SOBJECT_TAGS . ' > ' . _AM_SOBJECT_EDITING; |
|
43 | + $title = _AM_SOBJECT_TAG_EDIT; |
|
44 | + $info = _AM_SOBJECT_TAG_EDIT_INFO; |
|
45 | + $collaps_name = 'tagedit'; |
|
46 | + $form_name = _AM_SOBJECT_TAG_EDIT; |
|
47 | + $submit_button_caption = null; |
|
48 | + $tagObj->stripMultilanguageFields(); |
|
49 | + } |
|
50 | + } |
|
51 | + |
|
52 | + //Smartobject\Utility::getAdminMenu(2, $breadcrumb); |
|
53 | + |
|
54 | + Smartobject\Utility::getCollapsableBar($collaps_name, $title, $info); |
|
55 | + |
|
56 | + $sform = $tagObj->getForm($form_name, 'addtag', false, $submit_button_caption); |
|
57 | + $sform->display(); |
|
58 | + Smartobject\Utility::closeCollapsable($collaps_name); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | require_once __DIR__ . '/admin_header.php'; |
@@ -67,10 +67,10 @@ discard block |
||
67 | 67 | $op = ''; |
68 | 68 | |
69 | 69 | if (isset($_GET['op'])) { |
70 | - $op = $_GET['op']; |
|
70 | + $op = $_GET['op']; |
|
71 | 71 | } |
72 | 72 | if (isset($_POST['op'])) { |
73 | - $op = $_POST['op']; |
|
73 | + $op = $_POST['op']; |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | $tagid = \Xmf\Request::getInt('tagid', 0, 'GET'); |
@@ -79,65 +79,65 @@ discard block |
||
79 | 79 | |
80 | 80 | switch ($op) { |
81 | 81 | |
82 | - case 'del': |
|
82 | + case 'del': |
|
83 | 83 | // require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
84 | - $controller = new ObjectController($smartobjectTagHandler); |
|
85 | - $controller->handleObjectDeletion(_AM_SOBJECT_TAG_DELETE_CONFIRM); |
|
84 | + $controller = new ObjectController($smartobjectTagHandler); |
|
85 | + $controller->handleObjectDeletion(_AM_SOBJECT_TAG_DELETE_CONFIRM); |
|
86 | 86 | |
87 | - break; |
|
87 | + break; |
|
88 | 88 | |
89 | - case 'addtag': |
|
89 | + case 'addtag': |
|
90 | 90 | // require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
91 | - $controller = new ObjectController($smartobjectTagHandler); |
|
92 | - $tagObj = $controller->storeSmartObject(); |
|
93 | - if ($tagObj->hasError()) { |
|
94 | - redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR . $tagObj->getHtmlErrors()); |
|
95 | - } |
|
91 | + $controller = new ObjectController($smartobjectTagHandler); |
|
92 | + $tagObj = $controller->storeSmartObject(); |
|
93 | + if ($tagObj->hasError()) { |
|
94 | + redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR . $tagObj->getHtmlErrors()); |
|
95 | + } |
|
96 | 96 | |
97 | - if ($tagObj->hasError()) { |
|
98 | - redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR . $tagObj->getHtmlErrors()); |
|
99 | - } else { |
|
100 | - redirect_header(Smartobject\Utility::getPageBeforeForm(), 3, _CO_SOBJECT_SAVE_SUCCESS); |
|
101 | - } |
|
102 | - exit; |
|
103 | - break; |
|
97 | + if ($tagObj->hasError()) { |
|
98 | + redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR . $tagObj->getHtmlErrors()); |
|
99 | + } else { |
|
100 | + redirect_header(Smartobject\Utility::getPageBeforeForm(), 3, _CO_SOBJECT_SAVE_SUCCESS); |
|
101 | + } |
|
102 | + exit; |
|
103 | + break; |
|
104 | 104 | |
105 | - case 'mod': |
|
106 | - Smartobject\Utility::getXoopsCpHeader(); |
|
107 | - edittag($tagid, $language, $fct); |
|
108 | - break; |
|
105 | + case 'mod': |
|
106 | + Smartobject\Utility::getXoopsCpHeader(); |
|
107 | + edittag($tagid, $language, $fct); |
|
108 | + break; |
|
109 | 109 | |
110 | - default: |
|
110 | + default: |
|
111 | 111 | |
112 | - Smartobject\Utility::getXoopsCpHeader(); |
|
112 | + Smartobject\Utility::getXoopsCpHeader(); |
|
113 | 113 | |
114 | - //Smartobject\Utility::getAdminMenu(2, _AM_SOBJECT_TAGS); |
|
114 | + //Smartobject\Utility::getAdminMenu(2, _AM_SOBJECT_TAGS); |
|
115 | 115 | |
116 | - Smartobject\Utility::getCollapsableBar('tags', _AM_SOBJECT_TAGS, _AM_SOBJECT_TAGS_INFO); |
|
116 | + Smartobject\Utility::getCollapsableBar('tags', _AM_SOBJECT_TAGS, _AM_SOBJECT_TAGS_INFO); |
|
117 | 117 | |
118 | 118 | // require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
119 | - $objectTable = new Table($smartobjectTagHandler, false, ['delete']); |
|
120 | - $objectTable->addColumn(new ObjectColumn('name')); |
|
121 | - $objectTable->addColumn(new ObjectColumn('language')); |
|
122 | - $objectTable->addColumn(new ObjectColumn('value')); |
|
123 | - // $objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_SENT_TAGS_FROM, $align='left', $width=false, 'getFromInfo')); |
|
119 | + $objectTable = new Table($smartobjectTagHandler, false, ['delete']); |
|
120 | + $objectTable->addColumn(new ObjectColumn('name')); |
|
121 | + $objectTable->addColumn(new ObjectColumn('language')); |
|
122 | + $objectTable->addColumn(new ObjectColumn('value')); |
|
123 | + // $objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_SENT_TAGS_FROM, $align='left', $width=false, 'getFromInfo')); |
|
124 | 124 | |
125 | - $objectTable->addFilter('language', 'getLanguages'); |
|
125 | + $objectTable->addFilter('language', 'getLanguages'); |
|
126 | 126 | |
127 | - $objectTable->addCustomAction('getEditLanguageLink'); |
|
128 | - $objectTable->addCustomAction('getEditItemLink'); |
|
127 | + $objectTable->addCustomAction('getEditLanguageLink'); |
|
128 | + $objectTable->addCustomAction('getEditItemLink'); |
|
129 | 129 | |
130 | - $objectTable->setDefaultSort('tagid'); |
|
130 | + $objectTable->setDefaultSort('tagid'); |
|
131 | 131 | |
132 | - $objectTable->addIntroButton('addtag', 'tag.php?op=mod', _AM_SOBJECT_TAG_CREATE); |
|
132 | + $objectTable->addIntroButton('addtag', 'tag.php?op=mod', _AM_SOBJECT_TAG_CREATE); |
|
133 | 133 | |
134 | - $objectTable->render(); |
|
134 | + $objectTable->render(); |
|
135 | 135 | |
136 | - echo '<br>'; |
|
137 | - Smartobject\Utility::closeCollapsable('tags'); |
|
138 | - echo '<br>'; |
|
136 | + echo '<br>'; |
|
137 | + Smartobject\Utility::closeCollapsable('tags'); |
|
138 | + echo '<br>'; |
|
139 | 139 | |
140 | - break; |
|
140 | + break; |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | //Smartobject\Utility::getModFooter(); |
@@ -7,7 +7,7 @@ |
||
7 | 7 | * Licence: GNU |
8 | 8 | */ |
9 | 9 | |
10 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
10 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
11 | 11 | |
12 | -require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php'; |
|
12 | +require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php'; |
|
13 | 13 | Smartobject\Utility::loadCommonLanguageFile(); |
@@ -18,9 +18,9 @@ discard block |
||
18 | 18 | $adminmenu = []; |
19 | 19 | |
20 | 20 | $adminmenu[] = [ |
21 | - 'title' => _MI_SOBJECT_HOME, |
|
22 | - 'link' => 'admin/index.php', |
|
23 | - 'icon' => $pathIcon32 . '/home.png', |
|
21 | + 'title' => _MI_SOBJECT_HOME, |
|
22 | + 'link' => 'admin/index.php', |
|
23 | + 'icon' => $pathIcon32 . '/home.png', |
|
24 | 24 | ]; |
25 | 25 | |
26 | 26 | //$adminmenu[] = [ |
@@ -30,33 +30,33 @@ discard block |
||
30 | 30 | //]; |
31 | 31 | |
32 | 32 | $adminmenu[] = [ |
33 | - 'title' => _MI_SOBJECT_SENT_LINKS, |
|
34 | - 'link' => 'admin/link.php', |
|
35 | - 'icon' => $pathIcon32 . '/addlink.png', |
|
33 | + 'title' => _MI_SOBJECT_SENT_LINKS, |
|
34 | + 'link' => 'admin/link.php', |
|
35 | + 'icon' => $pathIcon32 . '/addlink.png', |
|
36 | 36 | ]; |
37 | 37 | |
38 | 38 | $adminmenu[] = [ |
39 | - 'title' => _MI_SOBJECT_TAGS, |
|
40 | - 'link' => 'admin/customtag.php', |
|
41 | - 'icon' => $pathIcon32 . '/identity.png', |
|
39 | + 'title' => _MI_SOBJECT_TAGS, |
|
40 | + 'link' => 'admin/customtag.php', |
|
41 | + 'icon' => $pathIcon32 . '/identity.png', |
|
42 | 42 | ]; |
43 | 43 | |
44 | 44 | $adminmenu[] = [ |
45 | - 'title' => _MI_SOBJECT_ADSENSES, |
|
46 | - 'link' => 'admin/adsense.php', |
|
47 | - 'icon' => $pathIcon32 . '/alert.png', |
|
45 | + 'title' => _MI_SOBJECT_ADSENSES, |
|
46 | + 'link' => 'admin/adsense.php', |
|
47 | + 'icon' => $pathIcon32 . '/alert.png', |
|
48 | 48 | ]; |
49 | 49 | |
50 | 50 | $adminmenu[] = [ |
51 | - 'title' => _MI_SOBJECT_RATINGS, |
|
52 | - 'link' => 'admin/rating.php', |
|
53 | - 'icon' => $pathIcon32 . '/stats.png', |
|
51 | + 'title' => _MI_SOBJECT_RATINGS, |
|
52 | + 'link' => 'admin/rating.php', |
|
53 | + 'icon' => $pathIcon32 . '/stats.png', |
|
54 | 54 | ]; |
55 | 55 | |
56 | 56 | $adminmenu[] = [ |
57 | - 'title' => _MI_SOBJECT_ABOUT, |
|
58 | - 'link' => 'admin/about.php', |
|
59 | - 'icon' => $pathIcon32 . '/about.png', |
|
57 | + 'title' => _MI_SOBJECT_ABOUT, |
|
58 | + 'link' => 'admin/about.php', |
|
59 | + 'icon' => $pathIcon32 . '/about.png', |
|
60 | 60 | ]; |
61 | 61 | |
62 | 62 | //--------------------------------- |
@@ -68,38 +68,38 @@ discard block |
||
68 | 68 | $smartobjectConfig = Smartobject\Utility::getModuleConfig('smartobject'); |
69 | 69 | |
70 | 70 | if (isset($smartobjectConfig['enable_currencyman']) && true === $smartobjectConfig['enable_currencyman']) { |
71 | - $adminmenu[] = [ |
|
72 | - 'title' => _MI_SOBJECT_CURRENCIES, |
|
73 | - 'link' => 'admin/currency.php', |
|
74 | - 'icon' => $pathIcon32 . '/cash_stack.png', |
|
75 | - ]; |
|
71 | + $adminmenu[] = [ |
|
72 | + 'title' => _MI_SOBJECT_CURRENCIES, |
|
73 | + 'link' => 'admin/currency.php', |
|
74 | + 'icon' => $pathIcon32 . '/cash_stack.png', |
|
75 | + ]; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | global $xoopsModule; |
79 | 79 | if (isset($xoopsModule)) { |
80 | - $i = -1; |
|
81 | - |
|
82 | - // --- for XCL --- |
|
83 | - // $headermenu[$i]['link'] = '../../system/admin.php?fct=preferences&op=showmod&mod=' . $xoopsModule->getVar('mid'); |
|
84 | - $mid = $xoopsModule->getVar('mid'); |
|
85 | - if (defined('XOOPS_CUBE_LEGACY')) { |
|
86 | - $link_pref = XOOPS_URL . '/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id=' . $mid; |
|
87 | - } else { |
|
88 | - $link_pref = XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $mid; |
|
89 | - } |
|
90 | - $headermenu[$i]['link'] = $link_pref; |
|
91 | - // ----- |
|
92 | - |
|
93 | - // --- for XCL --- |
|
94 | - // $headermenu[$i]['link'] = XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=update&module=" . $xoopsModule->getVar('dirname'); |
|
95 | - $dirname = $xoopsModule->getVar('dirname'); |
|
96 | - if (defined('XOOPS_CUBE_LEGACY')) { |
|
97 | - $link_module = XOOPS_URL . '/modules/legacy/admin/index.php?action=ModuleUpdate&dirname=' . $dirname; |
|
98 | - } else { |
|
99 | - $link_module = XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin&op=update&module=' . $dirname; |
|
100 | - } |
|
101 | - $headermenu[$i]['link'] = $link_module; |
|
102 | - // ----- |
|
103 | - |
|
104 | - ++$i; |
|
80 | + $i = -1; |
|
81 | + |
|
82 | + // --- for XCL --- |
|
83 | + // $headermenu[$i]['link'] = '../../system/admin.php?fct=preferences&op=showmod&mod=' . $xoopsModule->getVar('mid'); |
|
84 | + $mid = $xoopsModule->getVar('mid'); |
|
85 | + if (defined('XOOPS_CUBE_LEGACY')) { |
|
86 | + $link_pref = XOOPS_URL . '/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id=' . $mid; |
|
87 | + } else { |
|
88 | + $link_pref = XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $mid; |
|
89 | + } |
|
90 | + $headermenu[$i]['link'] = $link_pref; |
|
91 | + // ----- |
|
92 | + |
|
93 | + // --- for XCL --- |
|
94 | + // $headermenu[$i]['link'] = XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=update&module=" . $xoopsModule->getVar('dirname'); |
|
95 | + $dirname = $xoopsModule->getVar('dirname'); |
|
96 | + if (defined('XOOPS_CUBE_LEGACY')) { |
|
97 | + $link_module = XOOPS_URL . '/modules/legacy/admin/index.php?action=ModuleUpdate&dirname=' . $dirname; |
|
98 | + } else { |
|
99 | + $link_module = XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin&op=update&module=' . $dirname; |
|
100 | + } |
|
101 | + $headermenu[$i]['link'] = $link_module; |
|
102 | + // ----- |
|
103 | + |
|
104 | + ++$i; |
|
105 | 105 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $adminmenu[] = [ |
21 | 21 | 'title' => _MI_SOBJECT_HOME, |
22 | 22 | 'link' => 'admin/index.php', |
23 | - 'icon' => $pathIcon32 . '/home.png', |
|
23 | + 'icon' => $pathIcon32.'/home.png', |
|
24 | 24 | ]; |
25 | 25 | |
26 | 26 | //$adminmenu[] = [ |
@@ -32,31 +32,31 @@ discard block |
||
32 | 32 | $adminmenu[] = [ |
33 | 33 | 'title' => _MI_SOBJECT_SENT_LINKS, |
34 | 34 | 'link' => 'admin/link.php', |
35 | - 'icon' => $pathIcon32 . '/addlink.png', |
|
35 | + 'icon' => $pathIcon32.'/addlink.png', |
|
36 | 36 | ]; |
37 | 37 | |
38 | 38 | $adminmenu[] = [ |
39 | 39 | 'title' => _MI_SOBJECT_TAGS, |
40 | 40 | 'link' => 'admin/customtag.php', |
41 | - 'icon' => $pathIcon32 . '/identity.png', |
|
41 | + 'icon' => $pathIcon32.'/identity.png', |
|
42 | 42 | ]; |
43 | 43 | |
44 | 44 | $adminmenu[] = [ |
45 | 45 | 'title' => _MI_SOBJECT_ADSENSES, |
46 | 46 | 'link' => 'admin/adsense.php', |
47 | - 'icon' => $pathIcon32 . '/alert.png', |
|
47 | + 'icon' => $pathIcon32.'/alert.png', |
|
48 | 48 | ]; |
49 | 49 | |
50 | 50 | $adminmenu[] = [ |
51 | 51 | 'title' => _MI_SOBJECT_RATINGS, |
52 | 52 | 'link' => 'admin/rating.php', |
53 | - 'icon' => $pathIcon32 . '/stats.png', |
|
53 | + 'icon' => $pathIcon32.'/stats.png', |
|
54 | 54 | ]; |
55 | 55 | |
56 | 56 | $adminmenu[] = [ |
57 | 57 | 'title' => _MI_SOBJECT_ABOUT, |
58 | 58 | 'link' => 'admin/about.php', |
59 | - 'icon' => $pathIcon32 . '/about.png', |
|
59 | + 'icon' => $pathIcon32.'/about.png', |
|
60 | 60 | ]; |
61 | 61 | |
62 | 62 | //--------------------------------- |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $adminmenu[] = [ |
72 | 72 | 'title' => _MI_SOBJECT_CURRENCIES, |
73 | 73 | 'link' => 'admin/currency.php', |
74 | - 'icon' => $pathIcon32 . '/cash_stack.png', |
|
74 | + 'icon' => $pathIcon32.'/cash_stack.png', |
|
75 | 75 | ]; |
76 | 76 | } |
77 | 77 | |
@@ -83,9 +83,9 @@ discard block |
||
83 | 83 | // $headermenu[$i]['link'] = '../../system/admin.php?fct=preferences&op=showmod&mod=' . $xoopsModule->getVar('mid'); |
84 | 84 | $mid = $xoopsModule->getVar('mid'); |
85 | 85 | if (defined('XOOPS_CUBE_LEGACY')) { |
86 | - $link_pref = XOOPS_URL . '/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id=' . $mid; |
|
86 | + $link_pref = XOOPS_URL.'/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id='.$mid; |
|
87 | 87 | } else { |
88 | - $link_pref = XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $mid; |
|
88 | + $link_pref = XOOPS_URL.'/modules/system/admin.php?fct=preferences&op=showmod&mod='.$mid; |
|
89 | 89 | } |
90 | 90 | $headermenu[$i]['link'] = $link_pref; |
91 | 91 | // ----- |
@@ -94,9 +94,9 @@ discard block |
||
94 | 94 | // $headermenu[$i]['link'] = XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=update&module=" . $xoopsModule->getVar('dirname'); |
95 | 95 | $dirname = $xoopsModule->getVar('dirname'); |
96 | 96 | if (defined('XOOPS_CUBE_LEGACY')) { |
97 | - $link_module = XOOPS_URL . '/modules/legacy/admin/index.php?action=ModuleUpdate&dirname=' . $dirname; |
|
97 | + $link_module = XOOPS_URL.'/modules/legacy/admin/index.php?action=ModuleUpdate&dirname='.$dirname; |
|
98 | 98 | } else { |
99 | - $link_module = XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin&op=update&module=' . $dirname; |
|
99 | + $link_module = XOOPS_URL.'/modules/system/admin.php?fct=modulesadmin&op=update&module='.$dirname; |
|
100 | 100 | } |
101 | 101 | $headermenu[$i]['link'] = $link_module; |
102 | 102 | // ----- |