@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | |
183 | 183 | if (is_array($groupid)) { |
184 | 184 | if (count($groupid) > 1) { |
185 | - $in=array(); |
|
185 | + $in = array(); |
|
186 | 186 | foreach ($groupid as $gid) { |
187 | 187 | $in[] = $qb->createNamedParameter($gid, ParameterType::INTEGER); |
188 | 188 | } |
@@ -195,9 +195,9 @@ discard block |
||
195 | 195 | if (isset($side)) { |
196 | 196 | // get both sides in sidebox? (some themes need this) |
197 | 197 | if ($side == XOOPS_SIDEBLOCK_BOTH) { |
198 | - $qb->andWhere($eb->in('b.side', array(0,1))); |
|
198 | + $qb->andWhere($eb->in('b.side', array(0, 1))); |
|
199 | 199 | } elseif ($side == XOOPS_CENTERBLOCK_ALL) { |
200 | - $qb->andWhere($eb->in('b.side', array(3,4,5,7,8,9))); |
|
200 | + $qb->andWhere($eb->in('b.side', array(3, 4, 5, 7, 8, 9))); |
|
201 | 201 | } else { |
202 | 202 | $qb->andWhere($eb->eq('b.side', $qb->createNamedParameter($side, ParameterType::INTEGER))); |
203 | 203 | } |
@@ -248,9 +248,9 @@ discard block |
||
248 | 248 | if (isset($side)) { |
249 | 249 | // get both sides in sidebox? (some themes need this) |
250 | 250 | if ($side == XOOPS_SIDEBLOCK_BOTH) { |
251 | - $qb->andWhere($eb->in('side', array(0,1))); |
|
251 | + $qb->andWhere($eb->in('side', array(0, 1))); |
|
252 | 252 | } elseif ($side == XOOPS_CENTERBLOCK_ALL) { |
253 | - $qb->andWhere($eb->in('side', array(3,4,5,7,8,9))); |
|
253 | + $qb->andWhere($eb->in('side', array(3, 4, 5, 7, 8, 9))); |
|
254 | 254 | } else { |
255 | 255 | $qb->andWhere($eb->eq('side', $qb->createNamedParameter($side, ParameterType::INTEGER))); |
256 | 256 | } |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | $qb = $this->db2->createXoopsQueryBuilder(); |
348 | 348 | $eb = $qb->expr(); |
349 | 349 | |
350 | - $blockids=null; |
|
350 | + $blockids = null; |
|
351 | 351 | if (isset($groupid)) { |
352 | 352 | $qb ->select('DISTINCT gperm_itemid') |
353 | 353 | ->fromPrefix('system_permission', null) |
@@ -377,17 +377,17 @@ discard block |
||
377 | 377 | $qb ->fromPrefix('system_blockmodule', 'm') |
378 | 378 | ->andWhere($eb->eq('m.block_id', 'b.bid')); |
379 | 379 | if (!empty($module_id)) { |
380 | - $in=array(); |
|
381 | - $in[]=0; |
|
382 | - $in[]=(int)($module_id); |
|
380 | + $in = array(); |
|
381 | + $in[] = 0; |
|
382 | + $in[] = (int)($module_id); |
|
383 | 383 | if ($toponlyblock) { |
384 | - $in[]=(int)(-1); |
|
384 | + $in[] = (int)(-1); |
|
385 | 385 | } |
386 | 386 | } else { |
387 | 387 | if ($toponlyblock) { |
388 | - $in=array(0, -1); |
|
388 | + $in = array(0, -1); |
|
389 | 389 | } else { |
390 | - $in=0; |
|
390 | + $in = 0; |
|
391 | 391 | } |
392 | 392 | } |
393 | 393 | if (is_array($in)) { |
@@ -463,17 +463,17 @@ discard block |
||
463 | 463 | $qb ->fromPrefix('system_blockmodule', 'm') |
464 | 464 | ->andWhere($eb->eq('m.block_id', 'b.bid')); |
465 | 465 | if (!empty($module_id)) { |
466 | - $in=array(); |
|
467 | - $in[]=0; |
|
468 | - $in[]=(int)($module_id); |
|
466 | + $in = array(); |
|
467 | + $in[] = 0; |
|
468 | + $in[] = (int)($module_id); |
|
469 | 469 | if ($toponlyblock) { |
470 | - $in[]=(int)(-1); |
|
470 | + $in[] = (int)(-1); |
|
471 | 471 | } |
472 | 472 | } else { |
473 | 473 | if ($toponlyblock) { |
474 | - $in=array(0, -1); |
|
474 | + $in = array(0, -1); |
|
475 | 475 | } else { |
476 | - $in=0; |
|
476 | + $in = 0; |
|
477 | 477 | } |
478 | 478 | } |
479 | 479 | if (is_array($in)) { |
@@ -546,10 +546,10 @@ discard block |
||
546 | 546 | { |
547 | 547 | $ret = ''; |
548 | 548 | if ($position == 0) { |
549 | - $ret = $contentdb . $content; |
|
549 | + $ret = $contentdb.$content; |
|
550 | 550 | } else { |
551 | 551 | if ($position == 1) { |
552 | - $ret = $content . $contentdb; |
|
552 | + $ret = $content.$contentdb; |
|
553 | 553 | } |
554 | 554 | } |
555 | 555 | return $ret; |
@@ -96,7 +96,7 @@ |
||
96 | 96 | ->fromPrefix('system_usergroup', 'g') |
97 | 97 | ->where($eb->eq('g.groupid', ':gid')) |
98 | 98 | ->setParameter(':gid', $groupid, ParameterType::INTEGER); |
99 | - if ($limit!=0 || $start!=0) { |
|
99 | + if ($limit != 0 || $start != 0) { |
|
100 | 100 | $qb->setFirstResult($start) |
101 | 101 | ->setMaxResults($limit); |
102 | 102 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * @version $Id$ |
21 | 21 | */ |
22 | 22 | |
23 | -include __DIR__ . '/mainfile.php'; |
|
23 | +include __DIR__.'/mainfile.php'; |
|
24 | 24 | |
25 | 25 | $xoops = Xoops::getInstance(); |
26 | 26 | $xoops->isAdminSide = true; |
@@ -94,23 +94,23 @@ discard block |
||
94 | 94 | //$rssurl[] = 'http://sourceforge.net/export/rss2_projnews.php?group_id=41586&rss_fulltext=1'; |
95 | 95 | $rssurl[] = 'https://xoops.org/modules/publisher/backend.php'; |
96 | 96 | $rssurl = array_unique(array_merge($rssurl, XoopsLocale::getAdminRssUrls())); |
97 | - $rssfile = 'admin/rss/adminnews-' . $xoops->getConfig('locale'); |
|
97 | + $rssfile = 'admin/rss/adminnews-'.$xoops->getConfig('locale'); |
|
98 | 98 | $xoops->cache()->delete($rssfile); |
99 | - $items = $xoops->cache()->cacheRead($rssfile, 'buildRssFeedCache', 24*60*60, $rssurl); |
|
99 | + $items = $xoops->cache()->cacheRead($rssfile, 'buildRssFeedCache', 24 * 60 * 60, $rssurl); |
|
100 | 100 | if ($items != '') { |
101 | 101 | $ret = '<table class="outer width100">'; |
102 | 102 | foreach (array_keys($items) as $i) { |
103 | - $ret .= '<tr class="head"><td><a href="' . htmlspecialchars($items[$i]['link']) . '" rel="external">'; |
|
104 | - $ret .= htmlspecialchars($items[$i]['title']) . '</a> (' . htmlspecialchars($items[$i]['pubdate']) . ')</td></tr>'; |
|
103 | + $ret .= '<tr class="head"><td><a href="'.htmlspecialchars($items[$i]['link']).'" rel="external">'; |
|
104 | + $ret .= htmlspecialchars($items[$i]['title']).'</a> ('.htmlspecialchars($items[$i]['pubdate']).')</td></tr>'; |
|
105 | 105 | if ($items[$i]['description'] != "") { |
106 | - $ret .= '<tr><td class="odd">' . $items[$i]['description']; |
|
106 | + $ret .= '<tr><td class="odd">'.$items[$i]['description']; |
|
107 | 107 | if (!empty($items[$i]['guid'])) { |
108 | - $ret .= ' <a href="' . htmlspecialchars($items[$i]['guid']) . '" rel="external" title="">' . XoopsLocale::MORE . '</a>'; |
|
108 | + $ret .= ' <a href="'.htmlspecialchars($items[$i]['guid']).'" rel="external" title="">'.XoopsLocale::MORE.'</a>'; |
|
109 | 109 | } |
110 | 110 | $ret .= '</td></tr>'; |
111 | 111 | } else { |
112 | 112 | if ($items[$i]['guid'] != "") { |
113 | - $ret .= '<tr><td class="even aligntop"></td><td colspan="2" class="odd"><a href="' . htmlspecialchars($items[$i]['guid']) . '" rel="external">' . _MORE . '</a></td></tr>'; |
|
113 | + $ret .= '<tr><td class="even aligntop"></td><td colspan="2" class="odd"><a href="'.htmlspecialchars($items[$i]['guid']).'" rel="external">'._MORE.'</a></td></tr>'; |
|
114 | 114 | } |
115 | 115 | } |
116 | 116 | } |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | for ($i = 0; $i < $count; $i++) { |
138 | 138 | // $_items[$i]['title'] = XoopsLocale::convert_encoding($_items[$i]['title'], XoopsLocale::getCharset(), 'UTF-8'); |
139 | 139 | // $_items[$i]['description'] = XoopsLocale::convert_encoding($_items[$i]['description'], XoopsLocale::getCharset(), 'UTF-8'); |
140 | - $items[(string)(strtotime($_items[$i]['pubdate'])) . "-" . (string)(++$cnt)] = $_items[$i]; |
|
140 | + $items[(string)(strtotime($_items[$i]['pubdate']))."-".(string)(++$cnt)] = $_items[$i]; |
|
141 | 141 | } |
142 | 142 | } else { |
143 | 143 | echo $rss2parser->getErrors(); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * @author Richard Griffith <[email protected]> |
16 | 16 | */ |
17 | 17 | |
18 | -require __DIR__ . '/admin_header.php'; |
|
18 | +require __DIR__.'/admin_header.php'; |
|
19 | 19 | |
20 | 20 | /* --------------------------------------------------------------- */ |
21 | 21 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $schema = $schemaManager->createSchema(); |
63 | 63 | |
64 | 64 | // invoke our RemovePrefixes visitor with list of module's tables |
65 | - $visitor = new RemovePrefixes(\XoopsBaseConfig::get('db-prefix') . '_', $table_list); |
|
65 | + $visitor = new RemovePrefixes(\XoopsBaseConfig::get('db-prefix').'_', $table_list); |
|
66 | 66 | $schema->visit($visitor); |
67 | 67 | |
68 | 68 | // Get the schema we built with the RemovePrefixes visitor. |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | } |
92 | 92 | } |
93 | 93 | |
94 | - echo '<h2>' . _MI_SCHEMATOOL_EXPORT_SCHEMA . '</h2>'; |
|
94 | + echo '<h2>'._MI_SCHEMATOOL_EXPORT_SCHEMA.'</h2>'; |
|
95 | 95 | $yamldump = Yaml::dump($schemaArray, 5); |
96 | 96 | //echo '<div contenteditable><pre>' . $yamldump . '</pre></div>'; |
97 | 97 | $schemadump = <<<EOT1 |
@@ -107,20 +107,20 @@ discard block |
||
107 | 107 | $module->setInfo('warning_update', true); |
108 | 108 | } |
109 | 109 | if (XoopsLoad::fileExists( |
110 | - \XoopsBaseConfig::get('root-path') . '/modules/' . $module->getVar('dirname') . '/icons/logo_small.png' |
|
110 | + \XoopsBaseConfig::get('root-path').'/modules/'.$module->getVar('dirname').'/icons/logo_small.png' |
|
111 | 111 | )) { |
112 | 112 | $module->setInfo( |
113 | 113 | 'logo_small', |
114 | - \XoopsBaseConfig::get('url') . '/modules/' . $module->getVar('dirname') . '/icons/logo_small.png' |
|
114 | + \XoopsBaseConfig::get('url').'/modules/'.$module->getVar('dirname').'/icons/logo_small.png' |
|
115 | 115 | ); |
116 | 116 | } else { |
117 | - $module->setInfo('logo_small', \XoopsBaseConfig::get('url') . '/media/xoops/images/icons/16/default.png'); |
|
117 | + $module->setInfo('logo_small', \XoopsBaseConfig::get('url').'/media/xoops/images/icons/16/default.png'); |
|
118 | 118 | } |
119 | 119 | $module->setInfo('version', round($module->getVar('version') / 100, 2)); |
120 | 120 | $module->setInfo('update', XoopsLocale::formatTimestamp($module->getVar('last_update'), 's')); |
121 | 121 | $module->setInfo( |
122 | 122 | 'link_admin', |
123 | - \XoopsBaseConfig::get('url') . '/modules/' . $module->getVar('dirname') . '/' . $module->getInfo('adminindex') |
|
123 | + \XoopsBaseConfig::get('url').'/modules/'.$module->getVar('dirname').'/'.$module->getInfo('adminindex') |
|
124 | 124 | ); |
125 | 125 | |
126 | 126 | if ($module->getVar('isactive')) { |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | ) { |
143 | 143 | $module->setInfo( |
144 | 144 | 'link_pref', |
145 | - \XoopsBaseConfig::get('url') . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' |
|
145 | + \XoopsBaseConfig::get('url').'/modules/system/admin.php?fct=preferences&op=showmod&mod=' |
|
146 | 146 | . $module->getVar('mid') |
147 | 147 | ); |
148 | 148 | } |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | $ret = array(); |
168 | 168 | $i = 0; |
169 | 169 | foreach ($this->modulesList as $file) { |
170 | - if (XoopsLoad::fileExists(\XoopsBaseConfig::get('root-path') . '/modules/' . $file . '/xoops_version.php')) { |
|
170 | + if (XoopsLoad::fileExists(\XoopsBaseConfig::get('root-path').'/modules/'.$file.'/xoops_version.php')) { |
|
171 | 171 | clearstatcache(); |
172 | 172 | $file = trim($file); |
173 | 173 | if (!in_array($file, $this->modulesDirnames)) { |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $this->addTemporaryAutoloader($module); |
216 | 216 | $install_script = $module->getInfo('onInstall'); |
217 | 217 | if ($install_script && trim($install_script) != '') { |
218 | - XoopsLoad::loadFile($xoops->path('modules/' . $mod . '/' . trim($install_script))); |
|
218 | + XoopsLoad::loadFile($xoops->path('modules/'.$mod.'/'.trim($install_script))); |
|
219 | 219 | } |
220 | 220 | $func = "xoops_module_pre_install_{$mod}"; |
221 | 221 | // If pre install function is defined, execute |
@@ -236,20 +236,20 @@ discard block |
||
236 | 236 | $schema_file = $module->getInfo('schema'); |
237 | 237 | $sql_file = $module->getInfo('sqlfile'); |
238 | 238 | if (!empty($schema_file)) { |
239 | - $schema_file_path = \XoopsBaseConfig::get('root-path') . '/modules/' . $mod . '/' . $schema_file; |
|
239 | + $schema_file_path = \XoopsBaseConfig::get('root-path').'/modules/'.$mod.'/'.$schema_file; |
|
240 | 240 | if (!XoopsLoad::fileExists($schema_file_path)) { |
241 | 241 | $this->error[] = |
242 | 242 | sprintf(SystemLocale::EF_SQL_FILE_NOT_FOUND, "<strong>{$schema_file}</strong>"); |
243 | 243 | return false; |
244 | 244 | } |
245 | - $importer = new ImportSchema(\XoopsBaseConfig::get('db-prefix') . '_'); |
|
245 | + $importer = new ImportSchema(\XoopsBaseConfig::get('db-prefix').'_'); |
|
246 | 246 | $importSchema = $importer->importSchemaArray(Yaml::read($schema_file_path)); |
247 | 247 | $synchronizer = new SingleDatabaseSynchronizer($xoops->db()); |
248 | 248 | $synchronizer->updateSchema($importSchema, true); |
249 | 249 | } elseif (is_array($sql_file) && !empty($sql_file[\XoopsBaseConfig::get('db-type')])) { |
250 | 250 | $xoops->deprecated('Install SQL files are deprecated since 2.6.0. Convert to portable Schemas'); |
251 | 251 | |
252 | - $sql_file_path = \XoopsBaseConfig::get('root-path') . '/modules/' . $mod . '/' . $sql_file[\XoopsBaseConfig::get('db-type')]; |
|
252 | + $sql_file_path = \XoopsBaseConfig::get('root-path').'/modules/'.$mod.'/'.$sql_file[\XoopsBaseConfig::get('db-type')]; |
|
253 | 253 | if (!XoopsLoad::fileExists($sql_file_path)) { |
254 | 254 | $this->error[] = |
255 | 255 | sprintf(SystemLocale::EF_SQL_FILE_NOT_FOUND, "<strong>{$sql_file_path}</strong>"); |
@@ -266,10 +266,10 @@ discard block |
||
266 | 266 | // [4] contains unprefixed table name |
267 | 267 | $prefixed_query = SqlUtility::prefixQuery($piece, $xoops->db()->prefix()); |
268 | 268 | if (!$prefixed_query) { |
269 | - $this->error[]['sub'] = '<span class="red">' . sprintf( |
|
269 | + $this->error[]['sub'] = '<span class="red">'.sprintf( |
|
270 | 270 | XoopsLocale::EF_INVALID_SQL, |
271 | - '<strong>' . $piece . '</strong>' |
|
272 | - ) . '</span>'; |
|
271 | + '<strong>'.$piece.'</strong>' |
|
272 | + ).'</span>'; |
|
273 | 273 | break; |
274 | 274 | } |
275 | 275 | // check if the table name is reserved |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | $result = $xoops->db()->query($prefixed_query[0]); |
280 | 280 | } catch (Exception $e) { |
281 | 281 | $xoops->events()->triggerEvent('core.exception', $e); |
282 | - $result=false; |
|
282 | + $result = false; |
|
283 | 283 | } |
284 | 284 | |
285 | 285 | if (!$result) { |
@@ -289,13 +289,13 @@ discard block |
||
289 | 289 | if (!in_array($prefixed_query[4], $created_tables)) { |
290 | 290 | $this->trace[]['sub'] = sprintf( |
291 | 291 | XoopsLocale::SF_TABLE_CREATED, |
292 | - '<strong>' . $xoops->db()->prefix($prefixed_query[4]) . '</strong>' |
|
292 | + '<strong>'.$xoops->db()->prefix($prefixed_query[4]).'</strong>' |
|
293 | 293 | ); |
294 | 294 | $created_tables[] = $prefixed_query[4]; |
295 | 295 | } else { |
296 | 296 | $this->trace[]['sub'] = sprintf( |
297 | 297 | XoopsLocale::SF_DATA_INSERTED_TO_TABLE, |
298 | - '<strong>' . $xoops->db()->prefix($prefixed_query[4]) . '</strong>' |
|
298 | + '<strong>'.$xoops->db()->prefix($prefixed_query[4]).'</strong>' |
|
299 | 299 | ); |
300 | 300 | } |
301 | 301 | } |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | // the table name is reserved, so halt the installation |
304 | 304 | $this->error[]['sub'] = sprintf( |
305 | 305 | SystemLocale::EF_TABLE_IS_RESERVED, |
306 | - '<strong>' . $prefixed_query[4] . '</strong>' |
|
306 | + '<strong>'.$prefixed_query[4].'</strong>' |
|
307 | 307 | ); |
308 | 308 | break; |
309 | 309 | } |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | if (count($this->error) > 0) { |
314 | 314 | foreach ($created_tables as $table) { |
315 | 315 | try { |
316 | - $xoops->db()->query('DROP TABLE ' . $xoops->db()->prefix($table)); |
|
316 | + $xoops->db()->query('DROP TABLE '.$xoops->db()->prefix($table)); |
|
317 | 317 | } catch (Exception $e) { |
318 | 318 | $xoops->events()->triggerEvent('core.exception', $e); |
319 | 319 | } |
@@ -328,25 +328,25 @@ discard block |
||
328 | 328 | if (!$module_handler->insertModule($module)) { |
329 | 329 | $this->error[] = sprintf( |
330 | 330 | XoopsLocale::EF_NOT_INSERTED_TO_DATABASE, |
331 | - '<strong>' . $module->getVar('name') . '</strong>' |
|
331 | + '<strong>'.$module->getVar('name').'</strong>' |
|
332 | 332 | ); |
333 | 333 | foreach ($created_tables as $ct) { |
334 | 334 | try { |
335 | - $xoops->db()->query('DROP TABLE ' . $xoops->db()->prefix($ct)); |
|
335 | + $xoops->db()->query('DROP TABLE '.$xoops->db()->prefix($ct)); |
|
336 | 336 | } catch (Exception $e) { |
337 | 337 | $xoops->events()->triggerEvent('core.exception', $e); |
338 | 338 | } |
339 | 339 | } |
340 | - $this->error[] = sprintf(XoopsLocale::EF_NOT_INSTALLED, "<strong>" . $module->name() . "</strong>"); |
|
340 | + $this->error[] = sprintf(XoopsLocale::EF_NOT_INSTALLED, "<strong>".$module->name()."</strong>"); |
|
341 | 341 | $this->error[] = XoopsLocale::C_ERRORS; |
342 | 342 | unset($module); |
343 | 343 | unset($created_tables); |
344 | 344 | return false; |
345 | 345 | } |
346 | 346 | unset($created_tables); |
347 | - $this->trace[] = XoopsLocale::S_DATA_INSERTED . sprintf( |
|
347 | + $this->trace[] = XoopsLocale::S_DATA_INSERTED.sprintf( |
|
348 | 348 | SystemLocale::F_MODULE_ID, |
349 | - '<strong>' . $module->getVar('mid') . '</strong>' |
|
349 | + '<strong>'.$module->getVar('mid').'</strong>' |
|
350 | 350 | ); |
351 | 351 | $xoops->db()->beginTransaction(); |
352 | 352 | // install Templates |
@@ -378,14 +378,14 @@ discard block |
||
378 | 378 | $mperm->setVar('gperm_name', 'module_admin'); |
379 | 379 | $mperm->setVar('gperm_modid', 1); |
380 | 380 | if (!$gperm_handler->insert($mperm)) { |
381 | - $this->trace[]['sub'] = '<span class="red">' . sprintf( |
|
381 | + $this->trace[]['sub'] = '<span class="red">'.sprintf( |
|
382 | 382 | SystemLocale::EF_GROUP_ID_ADMIN_ACCESS_RIGHT_NOT_ADDED, |
383 | - '<strong>' . $mygroup . '</strong>' |
|
384 | - ) . '</span>'; |
|
383 | + '<strong>'.$mygroup.'</strong>' |
|
384 | + ).'</span>'; |
|
385 | 385 | } else { |
386 | 386 | $this->trace[]['sub'] = sprintf( |
387 | 387 | SystemLocale::SF_GROUP_ID_ADMIN_ACCESS_RIGHT_ADDED, |
388 | - '<strong>' . $mygroup . '</strong>' |
|
388 | + '<strong>'.$mygroup.'</strong>' |
|
389 | 389 | ); |
390 | 390 | } |
391 | 391 | unset($mperm); |
@@ -396,14 +396,14 @@ discard block |
||
396 | 396 | $mperm->setVar('gperm_name', 'module_read'); |
397 | 397 | $mperm->setVar('gperm_modid', 1); |
398 | 398 | if (!$gperm_handler->insert($mperm)) { |
399 | - $this->trace[]['sub'] = '<span class="red">' . sprintf( |
|
399 | + $this->trace[]['sub'] = '<span class="red">'.sprintf( |
|
400 | 400 | SystemLocale::EF_GROUP_ID_USER_ACCESS_RIGHT_NOT_ADDED, |
401 | - '<strong>' . $mygroup . '</strong>' |
|
402 | - ) . '</span>'; |
|
401 | + '<strong>'.$mygroup.'</strong>' |
|
402 | + ).'</span>'; |
|
403 | 403 | } else { |
404 | 404 | $this->trace[]['sub'] = sprintf( |
405 | 405 | SystemLocale::SF_GROUP_ID_USER_ACCESS_RIGHT_ADDED, |
406 | - '<strong>' . $mygroup . '</strong>' |
|
406 | + '<strong>'.$mygroup.'</strong>' |
|
407 | 407 | ); |
408 | 408 | } |
409 | 409 | unset($mperm); |
@@ -415,12 +415,12 @@ discard block |
||
415 | 415 | $bperm->setVar('gperm_modid', 1); |
416 | 416 | if (!$gperm_handler->insert($bperm)) { |
417 | 417 | $this->trace[]['sub'] = '<span class="red">' |
418 | - . SystemLocale::E_BLOCK_ACCESS_NOT_ADDED . ' Block ID: <strong>' |
|
419 | - . $blc . '</strong> Group ID: <strong>' . $mygroup . '</strong></span>'; |
|
418 | + . SystemLocale::E_BLOCK_ACCESS_NOT_ADDED.' Block ID: <strong>' |
|
419 | + . $blc.'</strong> Group ID: <strong>'.$mygroup.'</strong></span>'; |
|
420 | 420 | } else { |
421 | 421 | $this->trace[]['sub'] = SystemLocale::S_BLOCK_ACCESS_ADDED |
422 | - . sprintf(SystemLocale::F_BLOCK_ID, "<strong>" . $blc . "</strong>") |
|
423 | - . sprintf(SystemLocale::F_GROUP_ID, "<strong>" . $mygroup . "</strong>"); |
|
422 | + . sprintf(SystemLocale::F_BLOCK_ID, "<strong>".$blc."</strong>") |
|
423 | + . sprintf(SystemLocale::F_GROUP_ID, "<strong>".$mygroup."</strong>"); |
|
424 | 424 | } |
425 | 425 | unset($bperm); |
426 | 426 | } |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | |
445 | 445 | $this->trace[] = sprintf( |
446 | 446 | XoopsLocale::SF_INSTALLED, |
447 | - '<strong>' . $module->getVar('name', 's') . '</strong>' |
|
447 | + '<strong>'.$module->getVar('name', 's').'</strong>' |
|
448 | 448 | ); |
449 | 449 | unset($blocks); |
450 | 450 | |
@@ -456,8 +456,8 @@ discard block |
||
456 | 456 | } else { |
457 | 457 | $this->error[] = sprintf( |
458 | 458 | XoopsLocale::EF_NOT_INSTALLED, |
459 | - '<strong>' . $mod . '</strong>' |
|
460 | - ) . " " . XoopsLocale::C_ERRORS; |
|
459 | + '<strong>'.$mod.'</strong>' |
|
460 | + )." ".XoopsLocale::C_ERRORS; |
|
461 | 461 | return false; |
462 | 462 | } |
463 | 463 | return false; |
@@ -480,22 +480,22 @@ discard block |
||
480 | 480 | if ($module->getVar('dirname') === 'system') { |
481 | 481 | $this->error[] = sprintf( |
482 | 482 | XoopsLocale::EF_NOT_UNINSTALLED, |
483 | - '<strong>' . $module->getVar('name') . '</strong>' |
|
484 | - ) . " " . XoopsLocale::C_ERRORS; |
|
485 | - $this->error[] = " - " . SystemLocale::E_SYSTEM_MODULE_CANNOT_BE_DEACTIVATED; |
|
483 | + '<strong>'.$module->getVar('name').'</strong>' |
|
484 | + )." ".XoopsLocale::C_ERRORS; |
|
485 | + $this->error[] = " - ".SystemLocale::E_SYSTEM_MODULE_CANNOT_BE_DEACTIVATED; |
|
486 | 486 | return false; |
487 | 487 | } elseif ($module->getVar('dirname') == $xoops->getConfig('startpage')) { |
488 | 488 | $this->error[] = sprintf( |
489 | 489 | XoopsLocale::EF_NOT_UNINSTALLED, |
490 | - '<strong>' . $module->getVar('name') . '</strong>' |
|
491 | - ) . " " . XoopsLocale::C_ERRORS; |
|
492 | - $this->error[] = " - " . SystemLocale::E_THIS_MODULE_IS_SET_AS_DEFAULT_START_PAGE; |
|
490 | + '<strong>'.$module->getVar('name').'</strong>' |
|
491 | + )." ".XoopsLocale::C_ERRORS; |
|
492 | + $this->error[] = " - ".SystemLocale::E_THIS_MODULE_IS_SET_AS_DEFAULT_START_PAGE; |
|
493 | 493 | return false; |
494 | 494 | } else { |
495 | 495 | // Load module specific install script if any |
496 | 496 | $uninstall_script = $module->getInfo('onUninstall'); |
497 | 497 | if ($uninstall_script && trim($uninstall_script) != '') { |
498 | - XoopsLoad::loadFile($xoops->path('modules/' . $mod . '/' . trim($uninstall_script))); |
|
498 | + XoopsLoad::loadFile($xoops->path('modules/'.$mod.'/'.trim($uninstall_script))); |
|
499 | 499 | } |
500 | 500 | $func = "xoops_module_pre_uninstall_{$mod}"; |
501 | 501 | // If pre uninstall function is defined, execute |
@@ -505,8 +505,8 @@ discard block |
||
505 | 505 | $this->error[] = sprintf(XoopsLocale::EF_NOT_EXECUTED, $func); |
506 | 506 | $this->error[] = sprintf( |
507 | 507 | XoopsLocale::EF_NOT_UNINSTALLED, |
508 | - '<strong>' . $module->getVar('name') . '</strong>' |
|
509 | - ) . " " . XoopsLocale::C_ERRORS; |
|
508 | + '<strong>'.$module->getVar('name').'</strong>' |
|
509 | + )." ".XoopsLocale::C_ERRORS; |
|
510 | 510 | $this->error = array_merge($this->error, $module->getErrors()); |
511 | 511 | return false; |
512 | 512 | } else { |
@@ -540,13 +540,13 @@ discard block |
||
540 | 540 | $toSchema->dropTable($xoops->db()->prefix($table)); |
541 | 541 | $this->trace[]['sub'] = sprintf( |
542 | 542 | XoopsLocale::SF_TABLE_DROPPED, |
543 | - '<strong>' . $xoops->db()->prefix($table) . '</strong>' |
|
543 | + '<strong>'.$xoops->db()->prefix($table).'</strong>' |
|
544 | 544 | ); |
545 | 545 | } else { |
546 | - $this->trace[]['sub'] = '<span class="red">' . sprintf( |
|
546 | + $this->trace[]['sub'] = '<span class="red">'.sprintf( |
|
547 | 547 | XoopsLocale::EF_TABLE_DROP_NOT_ALLOWED, |
548 | - '<strong>' . $xoops->db()->prefix($table) . '</strong>' |
|
549 | - ) . '</span>'; |
|
548 | + '<strong>'.$xoops->db()->prefix($table).'</strong>' |
|
549 | + ).'</span>'; |
|
550 | 550 | } |
551 | 551 | } |
552 | 552 | $synchronizer = new SingleDatabaseSynchronizer($xoops->db()); |
@@ -556,7 +556,7 @@ discard block |
||
556 | 556 | // delete permissions if any |
557 | 557 | $gperm_handler = $xoops->getHandlerGroupPermission(); |
558 | 558 | if (false === $gperm_handler->deleteByModule($module->getVar('mid'))) { |
559 | - $this->trace[] = '<span class="red">' . SystemLocale::E_GROUP_PERMISSIONS_NOT_DELETED . '</span>'; |
|
559 | + $this->trace[] = '<span class="red">'.SystemLocale::E_GROUP_PERMISSIONS_NOT_DELETED.'</span>'; |
|
560 | 560 | } else { |
561 | 561 | $this->trace[] = SystemLocale::S_GROUP_PERMISSIONS_DELETED; |
562 | 562 | } |
@@ -565,7 +565,7 @@ discard block |
||
565 | 565 | $this->deleteConfigs($module); |
566 | 566 | |
567 | 567 | // execute module specific install script if any |
568 | - $func = 'xoops_module_uninstall_' . $mod; |
|
568 | + $func = 'xoops_module_uninstall_'.$mod; |
|
569 | 569 | if (function_exists($func)) { |
570 | 570 | $result = $func($module); |
571 | 571 | if (!$result) { |
@@ -578,7 +578,7 @@ discard block |
||
578 | 578 | } |
579 | 579 | $this->trace[] = sprintf( |
580 | 580 | XoopsLocale::SF_UNINSTALLED, |
581 | - '<strong>' . $module->getVar('name') . '</strong>' |
|
581 | + '<strong>'.$module->getVar('name').'</strong>' |
|
582 | 582 | ); |
583 | 583 | $xoops->events()->triggerEvent('system.module.uninstall', $module); |
584 | 584 | return $module; |
@@ -609,14 +609,14 @@ discard block |
||
609 | 609 | $this->addTemporaryAutoloader($module); |
610 | 610 | |
611 | 611 | if (!$module_handler->insertModule($module)) { |
612 | - $this->error[] = sprintf(XoopsLocale::EF_NOT_UPDATED, "<strong>" . $module->getVar('name') . "</strong>"); |
|
612 | + $this->error[] = sprintf(XoopsLocale::EF_NOT_UPDATED, "<strong>".$module->getVar('name')."</strong>"); |
|
613 | 613 | return false; |
614 | 614 | } else { |
615 | 615 | // execute module specific preupdate script if any |
616 | 616 | $update_script = $module->getInfo('onUpdate'); |
617 | 617 | if (false != $update_script && trim($update_script) != '') { |
618 | - XoopsLoad::loadFile($xoops->path('modules/' . $mod . '/' . trim($update_script))); |
|
619 | - $func = 'xoops_module_pre_update_' . $mod; |
|
618 | + XoopsLoad::loadFile($xoops->path('modules/'.$mod.'/'.trim($update_script))); |
|
619 | + $func = 'xoops_module_pre_update_'.$mod; |
|
620 | 620 | if (function_exists($func)) { |
621 | 621 | $result = $func($module, $prev_version); |
622 | 622 | if (!$result) { |
@@ -632,13 +632,13 @@ discard block |
||
632 | 632 | // update schema |
633 | 633 | $schema_file = $module->getInfo('schema'); |
634 | 634 | if (!empty($schema_file)) { |
635 | - $schema_file_path = \XoopsBaseConfig::get('root-path') . '/modules/' . $mod . '/' . $schema_file; |
|
635 | + $schema_file_path = \XoopsBaseConfig::get('root-path').'/modules/'.$mod.'/'.$schema_file; |
|
636 | 636 | if (!XoopsLoad::fileExists($schema_file_path)) { |
637 | 637 | $this->error[] = |
638 | 638 | sprintf(SystemLocale::EF_SQL_FILE_NOT_FOUND, "<strong>{$schema_file}</strong>"); |
639 | 639 | return false; |
640 | 640 | } |
641 | - $importer = new ImportSchema(\XoopsBaseConfig::get('db-prefix') . '_'); |
|
641 | + $importer = new ImportSchema(\XoopsBaseConfig::get('db-prefix').'_'); |
|
642 | 642 | $importSchema = $importer->importSchemaArray(Yaml::read($schema_file_path)); |
643 | 643 | $synchronizer = new SingleDatabaseSynchronizer($xoops->db()); |
644 | 644 | $synchronizer->updateSchema($importSchema, true); |
@@ -665,8 +665,8 @@ discard block |
||
665 | 665 | // execute module specific update script if any |
666 | 666 | $update_script = $module->getInfo('onUpdate'); |
667 | 667 | if (false != $update_script && trim($update_script) != '') { |
668 | - XoopsLoad::loadFile($xoops->path('modules/' . $mod . '/' . trim($update_script))); |
|
669 | - $func = 'xoops_module_update_' . $mod; |
|
668 | + XoopsLoad::loadFile($xoops->path('modules/'.$mod.'/'.trim($update_script))); |
|
669 | + $func = 'xoops_module_update_'.$mod; |
|
670 | 670 | if (function_exists($func)) { |
671 | 671 | $result = $func($module, $prev_version); |
672 | 672 | if (!$result) { |
@@ -678,7 +678,7 @@ discard block |
||
678 | 678 | } |
679 | 679 | } |
680 | 680 | } |
681 | - $this->trace[] = sprintf(XoopsLocale::SF_UPDATED, '<strong>' . $module->getVar('name', 's') . '</strong>'); |
|
681 | + $this->trace[] = sprintf(XoopsLocale::SF_UPDATED, '<strong>'.$module->getVar('name', 's').'</strong>'); |
|
682 | 682 | return $module; |
683 | 683 | } |
684 | 684 | } |
@@ -699,10 +699,10 @@ discard block |
||
699 | 699 | switch ($type) { |
700 | 700 | case 'blocks': |
701 | 701 | case 'admin': |
702 | - $path = $xoops->path('modules/' . $dirname . '/templates/' . $type . '/' . $template); |
|
702 | + $path = $xoops->path('modules/'.$dirname.'/templates/'.$type.'/'.$template); |
|
703 | 703 | break; |
704 | 704 | default: |
705 | - $path = $xoops->path('modules/' . $dirname . '/templates/' . $template); |
|
705 | + $path = $xoops->path('modules/'.$dirname.'/templates/'.$template); |
|
706 | 706 | break; |
707 | 707 | } |
708 | 708 | if (!XoopsLoad::fileExists($path)) { |
@@ -755,39 +755,39 @@ discard block |
||
755 | 755 | $tplfile->setVar('tpl_file', $tpl['file']); |
756 | 756 | $tplfile->setVar('tpl_desc', $tpl['description']); |
757 | 757 | if (!$tplfile_handler->insertTpl($tplfile)) { |
758 | - $this->trace[]['sub'] = '<span class="red">' . sprintf( |
|
758 | + $this->trace[]['sub'] = '<span class="red">'.sprintf( |
|
759 | 759 | SystemLocale::EF_TEMPLATE_NOT_ADDED_TO_DATABASE, |
760 | - '<strong>' . $tpl['file'] . '</strong>' |
|
761 | - ) . '</span>'; |
|
760 | + '<strong>'.$tpl['file'].'</strong>' |
|
761 | + ).'</span>'; |
|
762 | 762 | } else { |
763 | 763 | $newid = $tplfile->getVar('tpl_id'); |
764 | 764 | $this->trace[]['sub'] = sprintf( |
765 | 765 | SystemLocale::SF_TEMPLATE_ADDED, |
766 | - '<strong>' . $tpl['file'] . '</strong>' |
|
766 | + '<strong>'.$tpl['file'].'</strong>' |
|
767 | 767 | ); |
768 | 768 | if ($module->getVar('dirname') === 'system') { |
769 | 769 | if (!$xoops->templateTouch($newid)) { |
770 | - $this->trace[]['sub'] = '<span class="red">' . sprintf( |
|
770 | + $this->trace[]['sub'] = '<span class="red">'.sprintf( |
|
771 | 771 | SystemLocale::EF_TEMPLATE_NOT_RECOMPILED, |
772 | - '<strong>' . $tpl['file'] . '</strong>' |
|
773 | - ) . '</span>'; |
|
772 | + '<strong>'.$tpl['file'].'</strong>' |
|
773 | + ).'</span>'; |
|
774 | 774 | } else { |
775 | 775 | $this->trace[]['sub'] = sprintf( |
776 | 776 | SystemLocale::SF_TEMPLATE_RECOMPILED, |
777 | - '<strong>' . $tpl['file'] . '</strong>' |
|
777 | + '<strong>'.$tpl['file'].'</strong>' |
|
778 | 778 | ); |
779 | 779 | } |
780 | 780 | } else { |
781 | 781 | if ($xoops->config['template_set'] === 'default') { |
782 | 782 | if (!$xoops->templateTouch($newid)) { |
783 | - $this->trace[]['sub'] = '<span class="red">' . sprintf( |
|
783 | + $this->trace[]['sub'] = '<span class="red">'.sprintf( |
|
784 | 784 | SystemLocale::EF_TEMPLATE_NOT_RECOMPILED, |
785 | - '<strong>' . $tpl['file'] . '</strong>' |
|
786 | - ) . '</span>'; |
|
785 | + '<strong>'.$tpl['file'].'</strong>' |
|
786 | + ).'</span>'; |
|
787 | 787 | } else { |
788 | 788 | $this->trace[]['sub'] = sprintf( |
789 | 789 | SystemLocale::SF_TEMPLATE_RECOMPILED, |
790 | - '<strong>' . $tpl['file'] . '</strong>' |
|
790 | + '<strong>'.$tpl['file'].'</strong>' |
|
791 | 791 | ); |
792 | 792 | } |
793 | 793 | } |
@@ -795,10 +795,10 @@ discard block |
||
795 | 795 | } |
796 | 796 | unset($tpldata); |
797 | 797 | } else { |
798 | - $this->trace[]['sub'] = '<span class="red">' . sprintf( |
|
798 | + $this->trace[]['sub'] = '<span class="red">'.sprintf( |
|
799 | 799 | SystemLocale::EF_TEMPLATE_NOT_DELETED, |
800 | - '<strong>' . $tpl['file'] . '</strong>' |
|
801 | - ) . '</span>'; |
|
800 | + '<strong>'.$tpl['file'].'</strong>' |
|
801 | + ).'</span>'; |
|
802 | 802 | } |
803 | 803 | } |
804 | 804 | } |
@@ -887,17 +887,17 @@ discard block |
||
887 | 887 | $block_obj[0]->setVar('last_modified', time()); |
888 | 888 | |
889 | 889 | if (!$block_handler->insert($block_obj[0])) { |
890 | - $this->trace[]['sub'] = '<span class="red">' . sprintf( |
|
890 | + $this->trace[]['sub'] = '<span class="red">'.sprintf( |
|
891 | 891 | XoopsLocale::EF_NOT_UPDATED, |
892 | 892 | $block_obj[0]->getVar('name') |
893 | - ) . '</span>'; |
|
893 | + ).'</span>'; |
|
894 | 894 | } else { |
895 | 895 | $this->trace[]['sub'] = sprintf( |
896 | 896 | SystemLocale::SF_BLOCK_UPDATED, |
897 | - '<strong>' . $block_obj[0]->getVar('name') |
|
898 | - ) . '</strong>' . sprintf( |
|
897 | + '<strong>'.$block_obj[0]->getVar('name') |
|
898 | + ).'</strong>'.sprintf( |
|
899 | 899 | SystemLocale::F_BLOCK_ID, |
900 | - '<strong>' . $block_obj[0]->getVar('bid') . '</strong>' |
|
900 | + '<strong>'.$block_obj[0]->getVar('bid').'</strong>' |
|
901 | 901 | ); |
902 | 902 | |
903 | 903 | if (0 == $blockmodulelink_handler->getCount(new Criteria('block_id', $block_obj[0]->getVar('bid')))) { |
@@ -926,38 +926,38 @@ discard block |
||
926 | 926 | $tplfile_new->setVar('tpl_lastmodified', time()); |
927 | 927 | $tplfile_new->setVar('tpl_lastimported', 0); |
928 | 928 | if (!$tplfile_handler->insertTpl($tplfile_new)) { |
929 | - $this->trace[]['sub'] = '<span class="red">' . sprintf( |
|
929 | + $this->trace[]['sub'] = '<span class="red">'.sprintf( |
|
930 | 930 | SystemLocale::EF_TEMPLATE_NOT_UPDATED, |
931 | - '<strong>' . $block['template'] . '</strong>' |
|
932 | - ) . '</span>'; |
|
931 | + '<strong>'.$block['template'].'</strong>' |
|
932 | + ).'</span>'; |
|
933 | 933 | } else { |
934 | 934 | $this->trace[]['sub'] = sprintf( |
935 | 935 | SystemLocale::SF_TEMPLATE_UPDATED, |
936 | - '<strong>' . $block['template'] . '</strong>' |
|
936 | + '<strong>'.$block['template'].'</strong>' |
|
937 | 937 | ); |
938 | 938 | if ($module->getVar('dirname') === 'system') { |
939 | 939 | if (!$xoops->templateTouch($tplfile_new->getVar('tpl_id'))) { |
940 | - $this->trace[]['sub'] = '<span class="red">' . sprintf( |
|
940 | + $this->trace[]['sub'] = '<span class="red">'.sprintf( |
|
941 | 941 | SystemLocale::EF_TEMPLATE_NOT_RECOMPILED, |
942 | - '<strong>' . $block['template'] . '</strong>' |
|
943 | - ) . '</span>'; |
|
942 | + '<strong>'.$block['template'].'</strong>' |
|
943 | + ).'</span>'; |
|
944 | 944 | } else { |
945 | 945 | $this->trace[]['sub'] = sprintf( |
946 | 946 | SystemLocale::SF_TEMPLATE_RECOMPILED, |
947 | - '<strong>' . $block['template'] . '</strong>' |
|
947 | + '<strong>'.$block['template'].'</strong>' |
|
948 | 948 | ); |
949 | 949 | } |
950 | 950 | } else { |
951 | 951 | if ($xoops->config['template_set'] === 'default') { |
952 | 952 | if (!$xoops->templateTouch($tplfile_new->getVar('tpl_id'))) { |
953 | - $this->trace[]['sub'] = '<span class="red">' . sprintf( |
|
953 | + $this->trace[]['sub'] = '<span class="red">'.sprintf( |
|
954 | 954 | SystemLocale::EF_TEMPLATE_NOT_RECOMPILED, |
955 | - '<strong>' . $block['template'] . '</strong>' |
|
956 | - ) . '</span>'; |
|
955 | + '<strong>'.$block['template'].'</strong>' |
|
956 | + ).'</span>'; |
|
957 | 957 | } else { |
958 | 958 | $this->trace[]['sub'] = sprintf( |
959 | 959 | SystemLocale::SF_TEMPLATE_RECOMPILED, |
960 | - '<strong>' . $block['template'] . '</strong>' |
|
960 | + '<strong>'.$block['template'].'</strong>' |
|
961 | 961 | ); |
962 | 962 | } |
963 | 963 | } |
@@ -975,20 +975,20 @@ discard block |
||
975 | 975 | || !in_array($block->getVar('func_file'), $funcfiles) |
976 | 976 | ) { |
977 | 977 | if (!$block_handler->delete($block)) { |
978 | - $this->trace[]['sub'] = '<span class="red">' . sprintf( |
|
978 | + $this->trace[]['sub'] = '<span class="red">'.sprintf( |
|
979 | 979 | SystemLocale::EF_BLOCK_NOT_DELETED, |
980 | - "<strong>" . $block->getVar('name') . "</strong>" |
|
981 | - ) . sprintf( |
|
980 | + "<strong>".$block->getVar('name')."</strong>" |
|
981 | + ).sprintf( |
|
982 | 982 | SystemLocale::F_BLOCK_ID, |
983 | - "<strong>" . $block->getVar('bid') . "</strong>" |
|
984 | - ) . '</span>'; |
|
983 | + "<strong>".$block->getVar('bid')."</strong>" |
|
984 | + ).'</span>'; |
|
985 | 985 | } else { |
986 | 986 | $this->trace[]['sub'] = sprintf( |
987 | 987 | SystemLocale::SF_BLOCK_DELETED, |
988 | - '<strong>' . $block->getVar('name') . '</strong>' |
|
989 | - ) . ' ' . sprintf( |
|
988 | + '<strong>'.$block->getVar('name').'</strong>' |
|
989 | + ).' '.sprintf( |
|
990 | 990 | SystemLocale::F_BLOCK_ID, |
991 | - '<strong>' . $block->getVar('bid') . '</strong>' |
|
991 | + '<strong>'.$block->getVar('bid').'</strong>' |
|
992 | 992 | ); |
993 | 993 | if ($block->getVar('template') != '') { |
994 | 994 | $tplfiles = $tplfile_handler->find(null, 'block', $block->getVar('bid')); |
@@ -998,11 +998,11 @@ discard block |
||
998 | 998 | if (!$tplfile_handler->deleteTpl($tplfile)) { |
999 | 999 | $this->trace[]['sub'] = '<span class="red">' |
1000 | 1000 | . SystemLocale::E_BLOCK_TEMPLATE_DEPRECATED_NOT_REMOVED |
1001 | - . '(ID: <strong>' . $tplfile->getVar('tpl_id') . '</strong>)</span>'; |
|
1001 | + . '(ID: <strong>'.$tplfile->getVar('tpl_id').'</strong>)</span>'; |
|
1002 | 1002 | } else { |
1003 | 1003 | $this->trace[]['sub'] = sprintf( |
1004 | 1004 | SystemLocale::SF_BLOCK_TEMPLATE_DEPRECATED, |
1005 | - "<strong>" . $tplfile->getVar('tpl_file') . "</strong>" |
|
1005 | + "<strong>".$tplfile->getVar('tpl_file')."</strong>" |
|
1006 | 1006 | ); |
1007 | 1007 | } |
1008 | 1008 | } |
@@ -1031,20 +1031,20 @@ discard block |
||
1031 | 1031 | /* @var $block XoopsBlock */ |
1032 | 1032 | foreach ($blocks as $block) { |
1033 | 1033 | if (false === $block_handler->deleteBlock($block)) { |
1034 | - $this->trace[]['sub'] = '<span class="red">' . sprintf( |
|
1034 | + $this->trace[]['sub'] = '<span class="red">'.sprintf( |
|
1035 | 1035 | SystemLocale::EF_BLOCK_NOT_DELETED, |
1036 | - "<strong>" . $block->getVar('name') . "</strong>" |
|
1037 | - ) . sprintf( |
|
1036 | + "<strong>".$block->getVar('name')."</strong>" |
|
1037 | + ).sprintf( |
|
1038 | 1038 | SystemLocale::F_BLOCK_ID, |
1039 | - "<strong>" . $block->getVar('bid') . "</strong>" |
|
1040 | - ) . '</span>'; |
|
1039 | + "<strong>".$block->getVar('bid')."</strong>" |
|
1040 | + ).'</span>'; |
|
1041 | 1041 | } else { |
1042 | 1042 | $this->trace[]['sub'] = sprintf( |
1043 | 1043 | SystemLocale::SF_BLOCK_DELETED, |
1044 | - "<strong>" . $block->getVar('name') . "</strong>" |
|
1045 | - ) . sprintf( |
|
1044 | + "<strong>".$block->getVar('name')."</strong>" |
|
1045 | + ).sprintf( |
|
1046 | 1046 | SystemLocale::F_BLOCK_ID, |
1047 | - "<strong>" . $block->getVar('bid') . "</strong>" |
|
1047 | + "<strong>".$block->getVar('bid')."</strong>" |
|
1048 | 1048 | ); |
1049 | 1049 | } |
1050 | 1050 | if ($block->getVar('template') != '') { |
@@ -1052,20 +1052,20 @@ discard block |
||
1052 | 1052 | /* @var $template XoopsTplFile */ |
1053 | 1053 | foreach ($templates as $template) { |
1054 | 1054 | if (!$tplfile_handler->delete($template)) { |
1055 | - $this->trace[]['sub'] = '<span class="red">' . sprintf( |
|
1055 | + $this->trace[]['sub'] = '<span class="red">'.sprintf( |
|
1056 | 1056 | SystemLocale::EF_BLOCK_TEMPLATE_NOT_DELETED, |
1057 | 1057 | $template->getVar('tpl_file') |
1058 | - ) . sprintf( |
|
1058 | + ).sprintf( |
|
1059 | 1059 | SystemLocale::F_TEMPLATE_ID, |
1060 | - "<strong>" . $template->getVar('tpl_id') . "</strong>" |
|
1061 | - ) . '</span>'; |
|
1060 | + "<strong>".$template->getVar('tpl_id')."</strong>" |
|
1061 | + ).'</span>'; |
|
1062 | 1062 | } else { |
1063 | 1063 | $this->trace[]['sub'] = sprintf( |
1064 | 1064 | SystemLocale::SF_BLOCK_TEMPLATE_DELETED, |
1065 | - "<strong>" . $template->getVar('tpl_file') . "</strong>" |
|
1066 | - ) . sprintf( |
|
1065 | + "<strong>".$template->getVar('tpl_file')."</strong>" |
|
1066 | + ).sprintf( |
|
1067 | 1067 | SystemLocale::F_TEMPLATE_ID, |
1068 | - "<strong>" . $template->getVar('tpl_id') . "</strong>" |
|
1068 | + "<strong>".$template->getVar('tpl_id')."</strong>" |
|
1069 | 1069 | ); |
1070 | 1070 | } |
1071 | 1071 | } |
@@ -1095,7 +1095,7 @@ discard block |
||
1095 | 1095 | if (!$config_handler->deleteConfig($config)) { |
1096 | 1096 | $this->trace[]['sub'] = '<span class="red">' |
1097 | 1097 | . SystemLocale::E_CONFIG_DATA_NOT_DELETED |
1098 | - . sprintf(SystemLocale::F_CONFIG_ID, "<strong>" . $config->getVar('conf_id') . "</strong>") |
|
1098 | + . sprintf(SystemLocale::F_CONFIG_ID, "<strong>".$config->getVar('conf_id')."</strong>") |
|
1099 | 1099 | . '</span>'; |
1100 | 1100 | // save the name of config failed to delete for later use |
1101 | 1101 | $this->config_delng[] = $config->getVar('conf_name'); |
@@ -1104,7 +1104,7 @@ discard block |
||
1104 | 1104 | $this->config_old[$config->getVar('conf_name')]['formtype'] = $config->getVar('conf_formtype'); |
1105 | 1105 | $this->config_old[$config->getVar('conf_name')]['valuetype'] = $config->getVar('conf_valuetype'); |
1106 | 1106 | $this->trace[]['sub'] = SystemLocale::S_CONFIG_DATA_DELETED |
1107 | - . sprintf(SystemLocale::F_CONFIG_ID, "<strong>" . $config->getVar('conf_id') . "</strong>"); |
|
1107 | + . sprintf(SystemLocale::F_CONFIG_ID, "<strong>".$config->getVar('conf_id')."</strong>"); |
|
1108 | 1108 | } |
1109 | 1109 | } |
1110 | 1110 | } |
@@ -1170,7 +1170,7 @@ discard block |
||
1170 | 1170 | $confop_msgs .= ' <strong>' |
1171 | 1171 | . \Xoops\Locale::translate($key, $module->getVar('dirname')) |
1172 | 1172 | . '</strong> '; |
1173 | - $confop_msgs .= XoopsLocale::C_VALUE . ' <strong>' . $value . '</strong> '; |
|
1173 | + $confop_msgs .= XoopsLocale::C_VALUE.' <strong>'.$value.'</strong> '; |
|
1174 | 1174 | unset($confop); |
1175 | 1175 | } |
1176 | 1176 | } |
@@ -1178,11 +1178,11 @@ discard block |
||
1178 | 1178 | if (false != $config_handler->insertConfig($confobj)) { |
1179 | 1179 | $this->trace[]['sub'] = sprintf( |
1180 | 1180 | SystemLocale::SF_CONFIG_ADDED, |
1181 | - "<strong>" . $config['name'] . "</strong>" |
|
1182 | - ) . $confop_msgs; |
|
1181 | + "<strong>".$config['name']."</strong>" |
|
1182 | + ).$confop_msgs; |
|
1183 | 1183 | } else { |
1184 | 1184 | $this->trace[]['sub'] = '<span class="red">' |
1185 | - . sprintf(SystemLocale::EF_CONFIG_NOT_ADDED, "<strong>" . $config['name'] . "</strong>") |
|
1185 | + . sprintf(SystemLocale::EF_CONFIG_NOT_ADDED, "<strong>".$config['name']."</strong>") |
|
1186 | 1186 | . '</span>'; |
1187 | 1187 | } |
1188 | 1188 | unset($confobj); |
@@ -1210,7 +1210,7 @@ discard block |
||
1210 | 1210 | return; |
1211 | 1211 | } |
1212 | 1212 | $xoops = Xoops::getInstance(); |
1213 | - $base_dir = $xoops->path('modules/' . $module->getVar('dirname') . '/src'); |
|
1213 | + $base_dir = $xoops->path('modules/'.$module->getVar('dirname').'/src'); |
|
1214 | 1214 | $loader = new Psr4ClassLoader; |
1215 | 1215 | $loader->register(); |
1216 | 1216 | $loader->addNamespace($prefix, $base_dir); |
@@ -63,7 +63,7 @@ |
||
63 | 63 | try { |
64 | 64 | $name = $table->getName(); |
65 | 65 | $len = strlen($this->xPrefix); |
66 | - if (substr_compare($name, $this->xPrefix, 0, $len)===0) { |
|
66 | + if (substr_compare($name, $this->xPrefix, 0, $len) === 0) { |
|
67 | 67 | $name = substr($name, $len); |
68 | 68 | if (empty($this->tableList) || in_array($name, $this->tableList)) { |
69 | 69 | $idGeneratorType = 0; // how should we handle this? |
@@ -82,9 +82,9 @@ |
||
82 | 82 | */ |
83 | 83 | public function importTables(array $tableArray) |
84 | 84 | { |
85 | - $tables=array(); |
|
85 | + $tables = array(); |
|
86 | 86 | foreach ($tableArray as $name => $tabledef) { |
87 | - $tableName = $this->xPrefix . $name; |
|
87 | + $tableName = $this->xPrefix.$name; |
|
88 | 88 | $columns = array(); |
89 | 89 | $indexes = array(); |
90 | 90 | $fkConstraints = array(); |
@@ -62,26 +62,26 @@ |
||
62 | 62 | */ |
63 | 63 | public function updateWeights(MenusMenu $obj) |
64 | 64 | { |
65 | - $sql = "UPDATE " . $this->table |
|
65 | + $sql = "UPDATE ".$this->table |
|
66 | 66 | . " SET weight = weight+1" |
67 | - . " WHERE weight >= " . $obj->getVar('weight') |
|
68 | - . " AND id <> " . $obj->getVar('id') |
|
67 | + . " WHERE weight >= ".$obj->getVar('weight') |
|
68 | + . " AND id <> ".$obj->getVar('id') |
|
69 | 69 | /*. " AND pid = " . $obj->getVar('pid')*/ |
70 | - . " AND mid = " . $obj->getVar('mid') |
|
70 | + . " AND mid = ".$obj->getVar('mid') |
|
71 | 71 | ; |
72 | 72 | $originalForce = $this->db2->getForce(); |
73 | 73 | $this->db2->setForce(true); |
74 | 74 | $this->db2->query($sql); |
75 | 75 | |
76 | - $sql = "SELECT id FROM " . $this->table |
|
77 | - . " WHERE mid = " . $obj->getVar('mid') |
|
76 | + $sql = "SELECT id FROM ".$this->table |
|
77 | + . " WHERE mid = ".$obj->getVar('mid') |
|
78 | 78 | /*. " AND pid = " . $obj->getVar('pid')*/ |
79 | 79 | . " ORDER BY weight ASC" |
80 | 80 | ; |
81 | 81 | $result = $this->db2->query($sql); |
82 | - $i = 1; //lets start at 1 please! |
|
82 | + $i = 1; //lets start at 1 please! |
|
83 | 83 | while (false !== (list($id) = $result->fetch(FetchMode::NUMERIC))) { |
84 | - $sql = "UPDATE " . $this->table |
|
84 | + $sql = "UPDATE ".$this->table |
|
85 | 85 | . " SET weight = {$i}" |
86 | 86 | . " WHERE id = {$id}" |
87 | 87 | ; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * @package comments |
26 | 26 | */ |
27 | 27 | |
28 | -include __DIR__ . '/header.php'; |
|
28 | +include __DIR__.'/header.php'; |
|
29 | 29 | |
30 | 30 | // Get main instance |
31 | 31 | $xoops = Xoops::getInstance(); |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | $status_array = |
47 | 47 | array(Comments::STATUS_PENDING => _MD_COMMENTS_PENDING, Comments::STATUS_ACTIVE => _MD_COMMENTS_ACTIVE, Comments::STATUS_HIDDEN => _MD_COMMENTS_HIDDEN); |
48 | 48 | $status_array2 = array( |
49 | - Comments::STATUS_PENDING => '<span style="text-decoration: none; font-weight: bold; color: #008000;">' . _MD_COMMENTS_PENDING . '</span>', |
|
50 | - Comments::STATUS_ACTIVE => '<span style="text-decoration: none; font-weight: bold; color: #ff0000;">' . _MD_COMMENTS_ACTIVE . '</span>', |
|
51 | - Comments::STATUS_HIDDEN => '<span style="text-decoration: none; font-weight: bold; color: #0000ff;">' . _MD_COMMENTS_HIDDEN . '</span>' |
|
49 | + Comments::STATUS_PENDING => '<span style="text-decoration: none; font-weight: bold; color: #008000;">'._MD_COMMENTS_PENDING.'</span>', |
|
50 | + Comments::STATUS_ACTIVE => '<span style="text-decoration: none; font-weight: bold; color: #ff0000;">'._MD_COMMENTS_ACTIVE.'</span>', |
|
51 | + Comments::STATUS_HIDDEN => '<span style="text-decoration: none; font-weight: bold; color: #0000ff;">'._MD_COMMENTS_HIDDEN.'</span>' |
|
52 | 52 | ); |
53 | 53 | $start = 0; |
54 | 54 | $status_array[0] = _AM_COMMENTS_FORM_ALL_STATUS; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $module_handler = $xoops->getHandlerModule(); |
64 | 64 | $available_plugins = \Xoops\Module\Plugin::getPlugins('comments'); |
65 | 65 | if (!empty($available_plugins)) { |
66 | - $criteria = new Criteria('dirname', "('" . implode("','", array_keys($available_plugins)). "')", 'IN'); |
|
66 | + $criteria = new Criteria('dirname', "('".implode("','", array_keys($available_plugins))."')", 'IN'); |
|
67 | 67 | $module_array = $module_handler->getNameList($criteria); |
68 | 68 | } |
69 | 69 | |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | /* @var $plugin CommentsPluginInterface */ |
82 | 82 | $module = $xoops->getModuleById($comment->getVar('modid')); |
83 | 83 | $plugin = Xoops\Module\Plugin::getPlugin($module->getVar('dirname'), 'comments'); |
84 | - header('Location: ' . \XoopsBaseConfig::get('url') . '/modules/' . $module->getVar('dirname') . '/' . $plugin->pageName() . '?' . $plugin->itemName() . '=' . $comment->getVar('itemid') . '&id=' . $comment->getVar('id') . '&rootid=' . $comment->getVar('rootid') . '&mode=thread&' . str_replace('&', '&', $comment->getVar('exparams')) . '#comment' . $comment->getVar('id')); |
|
84 | + header('Location: '.\XoopsBaseConfig::get('url').'/modules/'.$module->getVar('dirname').'/'.$plugin->pageName().'?'.$plugin->itemName().'='.$comment->getVar('itemid').'&id='.$comment->getVar('id').'&rootid='.$comment->getVar('rootid').'&mode=thread&'.str_replace('&', '&', $comment->getVar('exparams')).'#comment'.$comment->getVar('id')); |
|
85 | 85 | exit(); |
86 | 86 | } |
87 | 87 | } |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | } |
258 | 258 | |
259 | 259 | $url = $helper->url('admin/main.php'); |
260 | - $form = '<form class="form-inline" action="' . $url . '" method="post"> |
|
260 | + $form = '<form class="form-inline" action="'.$url.'" method="post"> |
|
261 | 261 | <select class="span2" name="comments_module">'; |
262 | 262 | |
263 | 263 | foreach ($module_array as $k => $v) { |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | if ($k == $module) { |
266 | 266 | $sel = ' selected="selected"'; |
267 | 267 | } |
268 | - $form .= '<option value="' . $k . '"' . $sel . '>' . $v . '</option>'; |
|
268 | + $form .= '<option value="'.$k.'"'.$sel.'>'.$v.'</option>'; |
|
269 | 269 | } |
270 | 270 | $form .= '</select> <select class="span2" name="comments_status">'; |
271 | 271 | |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | if (isset($status) && $k == $status) { |
275 | 275 | $sel = ' selected="selected"'; |
276 | 276 | } |
277 | - $form .= '<option value="' . $k . '"' . $sel . '>' . $v . '</option>'; |
|
277 | + $form .= '<option value="'.$k.'"'.$sel.'>'.$v.'</option>'; |
|
278 | 278 | } |
279 | 279 | |
280 | 280 | |
@@ -284,12 +284,12 @@ discard block |
||
284 | 284 | if (isset($limit) && $k == $limit) { |
285 | 285 | $sel = ' selected="selected"'; |
286 | 286 | } |
287 | - $form .= '<option value="' . $k . '"' . $sel . '>' . $k . '</option>'; |
|
287 | + $form .= '<option value="'.$k.'"'.$sel.'>'.$k.'</option>'; |
|
288 | 288 | } |
289 | - $form .= '</select> <input class ="btn" type="submit" value="' . XoopsLocale::A_GO . '" name="selsubmit" /></form>'; |
|
289 | + $form .= '</select> <input class ="btn" type="submit" value="'.XoopsLocale::A_GO.'" name="selsubmit" /></form>'; |
|
290 | 290 | |
291 | 291 | $xoops->tpl()->assign('form_sort', $form); |
292 | - $xoops->tpl()->assign('php_selft', $_SERVER['PHP_SELF'] . '?op=comments_purge'); |
|
292 | + $xoops->tpl()->assign('php_selft', $_SERVER['PHP_SELF'].'?op=comments_purge'); |
|
293 | 293 | |
294 | 294 | if ($comments_count > 0) { |
295 | 295 | foreach (array_keys($comments_arr) as $i) { |
@@ -298,18 +298,18 @@ discard block |
||
298 | 298 | if ($comments_arr[$i]->getVar('uid') > 0) { |
299 | 299 | $poster = $member_handler->getUser($comments_arr[$i]->getVar('uid')); |
300 | 300 | if (is_object($poster)) { |
301 | - $comments_poster_uname = '<a href="' . \XoopsBaseConfig::get('url') . '/userinfo.php?uid=' . $comments_arr[$i]->getVar('uid') . '">' . $poster->getVar('uname') . '</a>'; |
|
301 | + $comments_poster_uname = '<a href="'.\XoopsBaseConfig::get('url').'/userinfo.php?uid='.$comments_arr[$i]->getVar('uid').'">'.$poster->getVar('uname').'</a>'; |
|
302 | 302 | } |
303 | 303 | } |
304 | 304 | |
305 | 305 | $comments_icon = ($comments_arr[$i]->getVar('icon') == '') ? '/images/icons/no_posticon.gif' |
306 | - : '/images/subject/' . htmlspecialchars($comments_arr[$i]->getVar('icon'), ENT_QUOTES); |
|
307 | - $comments_icon = '<img src="' . \XoopsBaseConfig::get('url') . $comments_icon . '" alt="" />'; |
|
306 | + : '/images/subject/'.htmlspecialchars($comments_arr[$i]->getVar('icon'), ENT_QUOTES); |
|
307 | + $comments_icon = '<img src="'.\XoopsBaseConfig::get('url').$comments_icon.'" alt="" />'; |
|
308 | 308 | |
309 | 309 | $comments['comments_id'] = $id; |
310 | 310 | $comments['comments_poster'] = $comments_poster_uname; |
311 | 311 | $comments['comments_icon'] = $comments_icon; |
312 | - $comments['comments_title'] = '<a href="main.php?op=comments_jump&item_id=' . $comments_arr[$i]->getVar("id") . '">' . $comments_arr[$i]->getVar("title") . '</a>'; |
|
312 | + $comments['comments_title'] = '<a href="main.php?op=comments_jump&item_id='.$comments_arr[$i]->getVar("id").'">'.$comments_arr[$i]->getVar("title").'</a>'; |
|
313 | 313 | $comments['comments_ip'] = $comments_arr[$i]->getVar('ip'); |
314 | 314 | $comments['comments_date'] = XoopsLocale::formatTimestamp($comments_arr[$i]->getVar('created')); |
315 | 315 | $comments['comments_text'] = $myts->undoHtmlSpecialChars($comments_arr[$i]->getVar('text')); |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | } |
325 | 325 | |
326 | 326 | if ($comments_count > $comments_limit) { |
327 | - $nav = new XoopsPageNav($comments_count, $comments_limit, $comments_start, 'comments_start', 'comments_module=' . $comments_module . '&comments_status=' . $comments_status); |
|
327 | + $nav = new XoopsPageNav($comments_count, $comments_limit, $comments_start, 'comments_start', 'comments_module='.$comments_module.'&comments_status='.$comments_status); |
|
328 | 328 | $xoops->tpl()->assign('nav', $nav->renderNav()); |
329 | 329 | } |
330 | 330 | } |