@@ -659,14 +659,14 @@ |
||
659 | 659 | |
660 | 660 | // make the base vars available to all templates |
661 | 661 | $this->assign('module', $this->toplevelmodule) |
662 | - ->assign('uid', $this->uid) |
|
663 | - ->assign('loggedin', $this->isloggedin) |
|
664 | - ->assign('pagetype', $this->pagetype) |
|
665 | - ->assign('themepath', $this->themepath) |
|
666 | - ->assign('imagepath', $this->imagepath) |
|
667 | - ->assign('imagelangpath', $this->imagelangpath) |
|
668 | - ->assign('stylepath', $this->stylepath) |
|
669 | - ->assign('scriptpath', $this->scriptpath); |
|
662 | + ->assign('uid', $this->uid) |
|
663 | + ->assign('loggedin', $this->isloggedin) |
|
664 | + ->assign('pagetype', $this->pagetype) |
|
665 | + ->assign('themepath', $this->themepath) |
|
666 | + ->assign('imagepath', $this->imagepath) |
|
667 | + ->assign('imagelangpath', $this->imagelangpath) |
|
668 | + ->assign('stylepath', $this->stylepath) |
|
669 | + ->assign('scriptpath', $this->scriptpath); |
|
670 | 670 | |
671 | 671 | // load the theme variables |
672 | 672 | $variables = ModUtil::apiFunc('ZikulaThemeModule', 'user', 'getvariables', ['theme' => $this->name]); |
@@ -326,13 +326,13 @@ discard block |
||
326 | 326 | |
327 | 327 | // add the module wrapper |
328 | 328 | if (!$this->themeinfo['system'] && (bool)$this->themeconfig['modulewrapper'] && $this->toplevelmodule) { |
329 | - $maincontent = '<div id="z-maincontent" class="'.($this->homepage ? 'z-homepage ' : '').'z-module-'.DataUtil::formatForDisplay(strtolower($this->toplevelmodule)).' '.$this->type.' '.$this->func.'">'.$maincontent.'</div>'; |
|
329 | + $maincontent = '<div id="z-maincontent" class="' . ($this->homepage ? 'z-homepage ' : '') . 'z-module-' . DataUtil::formatForDisplay(strtolower($this->toplevelmodule)) . ' ' . $this->type . ' ' . $this->func . '">' . $maincontent . '</div>'; |
|
330 | 330 | } |
331 | 331 | |
332 | 332 | $event = new \Zikula\Core\Event\GenericEvent($this, [], $maincontent); |
333 | 333 | $maincontent = $this->eventManager->dispatch('theme.prefetch', $event)->getData(); |
334 | 334 | |
335 | - $this->cache_id = md5($this->cache_id.'|'.$maincontent); |
|
335 | + $this->cache_id = md5($this->cache_id . '|' . $maincontent); |
|
336 | 336 | |
337 | 337 | // Assign the main content area to the template engine |
338 | 338 | $this->assign('maincontent', $maincontent); |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | |
432 | 432 | $theme = ThemeUtil::getTheme($this->name); |
433 | 433 | if (null !== $theme) { |
434 | - $relativePath = $theme->getRelativePath().'/Resources/views'; |
|
434 | + $relativePath = $theme->getRelativePath() . '/Resources/views'; |
|
435 | 435 | } else { |
436 | 436 | $relativePath = "themes/$themeDir/templates"; |
437 | 437 | } |
@@ -742,8 +742,8 @@ discard block |
||
742 | 742 | $file = $pageconfigurations['*home']['file']; |
743 | 743 | |
744 | 744 | // identify a type match |
745 | - } elseif (isset($pageconfigurations['*'.$this->type])) { |
|
746 | - $file = $pageconfigurations['*'.$this->type]['file']; |
|
745 | + } elseif (isset($pageconfigurations['*' . $this->type])) { |
|
746 | + $file = $pageconfigurations['*' . $this->type]['file']; |
|
747 | 747 | |
748 | 748 | // identify an admin-like type |
749 | 749 | } elseif (isset($pageconfigurations['*admin']) |
@@ -37,14 +37,14 @@ |
||
37 | 37 | $this->name = $bundle->getName(); |
38 | 38 | $this->domain = ZLanguage::getModuleDomain($this->name); |
39 | 39 | $this->baseDir = $bundle->getPath(); |
40 | - $versionClass = $bundle->getVersionClass(); |
|
40 | + $versionClass = $bundle->getVersionClass(); |
|
41 | 41 | $this->version = new $versionClass($bundle); |
42 | 42 | } else { |
43 | 43 | $className = $this->getReflection()->getName(); |
44 | 44 | $separator = (false === strpos($className, '_')) ? '\\' : '_'; |
45 | 45 | $parts = explode($separator, $className); |
46 | 46 | $this->name = $parts[0]; |
47 | - $this->baseDir = $this->libBaseDir = realpath(dirname($this->reflection->getFileName()).'/../..'); |
|
47 | + $this->baseDir = $this->libBaseDir = realpath(dirname($this->reflection->getFileName()) . '/../..'); |
|
48 | 48 | if (realpath("{$this->baseDir}/lib/" . $this->name)) { |
49 | 49 | $this->libBaseDir = realpath("{$this->baseDir}/lib/" . $this->name); |
50 | 50 | } |
@@ -828,7 +828,7 @@ |
||
828 | 828 | return true; |
829 | 829 | } else { |
830 | 830 | // for BC: if only url is provided, send redirect immediately, discarding all future lifecycle changes |
831 | - $response = new RedirectResponse(System::normalizeUrl($url)); |
|
831 | + $response = new RedirectResponse(System::normalizeUrl($url)); |
|
832 | 832 | $response->send(); |
833 | 833 | exit; |
834 | 834 | } |
@@ -108,7 +108,7 @@ |
||
108 | 108 | |
109 | 109 | $html .= "<input type=\"hidden\" name=\"{$this->id}SelectedIndex\" id=\"{$this->id}SelectedIndex\" value=\"{$this->selectedIndex}\" />\n"; |
110 | 110 | |
111 | - return $html .'<div class="tab-content">'.$content.'</div>'; |
|
111 | + return $html . '<div class="tab-content">' . $content . '</div>'; |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | /** |
@@ -243,7 +243,7 @@ |
||
243 | 243 | if (!$collection) { |
244 | 244 | $collection = new \Doctrine\Common\Collections\ArrayCollection(); |
245 | 245 | $entityManager->getClassMetadata($entityClass) |
246 | - ->setFieldValue($entity, $this->dataField, $collection); |
|
246 | + ->setFieldValue($entity, $this->dataField, $collection); |
|
247 | 247 | } |
248 | 248 | |
249 | 249 | if (is_array($this->getSelectedValue())) { |
@@ -146,33 +146,33 @@ discard block |
||
146 | 146 | |
147 | 147 | if (count($idColumns) > 1) { |
148 | 148 | $view->trigger_error(__f('Error! in %1$s: an invalid %2$s parameter was received.', |
149 | - ['formdropdownrelationlist', 'recordClass'])); |
|
149 | + ['formdropdownrelationlist', 'recordClass'])); |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | $this->idField = $idColumns[0]; |
153 | 153 | } else { |
154 | 154 | if (!$hasModule) { |
155 | 155 | $view->trigger_error(__f('Error! in %1$s: the %2$s parameter must be specified.', |
156 | - ['formdropdownrelationlist', 'module'])); |
|
156 | + ['formdropdownrelationlist', 'module'])); |
|
157 | 157 | } |
158 | 158 | $this->module = $params['module']; |
159 | 159 | unset($params['module']); |
160 | 160 | |
161 | 161 | if (!ModUtil::available($this->module)) { |
162 | 162 | $view->trigger_error(__f('Error! in %1$s: an invalid %2$s parameter was received.', |
163 | - ['formdropdownrelationlist', 'module'])); |
|
163 | + ['formdropdownrelationlist', 'module'])); |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | if (!$hasObjecttype) { |
167 | 167 | $view->trigger_error(__f('Error! in %1$s: the %2$s parameter must be specified.', |
168 | - ['formdropdownrelationlist', 'objecttype'])); |
|
168 | + ['formdropdownrelationlist', 'objecttype'])); |
|
169 | 169 | } |
170 | 170 | $this->objecttype = $params['objecttype']; |
171 | 171 | unset($params['objecttype']); |
172 | 172 | |
173 | 173 | if (!$hasIdField) { |
174 | 174 | $view->trigger_error(__f('Error! in %1$s: the %2$s parameter must be specified.', |
175 | - ['formdropdownrelationlist', 'idField'])); |
|
175 | + ['formdropdownrelationlist', 'idField'])); |
|
176 | 176 | } |
177 | 177 | $this->idField = $params['idField']; |
178 | 178 | unset($params['idField']); |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | |
186 | 186 | if (!isset($params['displayField']) || empty($params['displayField'])) { |
187 | 187 | $view->trigger_error(__f('Error! in %1$s: the %2$s parameter must be specified.', |
188 | - ['formdropdownrelationlist', 'displayField'])); |
|
188 | + ['formdropdownrelationlist', 'displayField'])); |
|
189 | 189 | } |
190 | 190 | $this->displayField = $params['displayField']; |
191 | 191 | unset($params['displayField']); |
@@ -277,7 +277,7 @@ |
||
277 | 277 | ModUtil::dbInfoLoad($this->module); |
278 | 278 | |
279 | 279 | // load the object class corresponding to $this->objecttype |
280 | - $class = "{$this->module}_DBObject_".StringUtil::camelize($this->objecttype).'Array'; |
|
280 | + $class = "{$this->module}_DBObject_" . StringUtil::camelize($this->objecttype) . 'Array'; |
|
281 | 281 | |
282 | 282 | // instantiate the object-array |
283 | 283 | $objectArray = new $class(); |
@@ -54,7 +54,7 @@ |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | foreach ($properties as $k => $v) { |
57 | - $lookup = 'set'.strtolower($k); |
|
57 | + $lookup = 'set' . strtolower($k); |
|
58 | 58 | if (isset($methodMap[$lookup])) { |
59 | 59 | $reflectionMethod = new ReflectionMethod($className, $methodMap[$lookup]); |
60 | 60 | $reflectionMethod->invoke($object, $v); |
@@ -116,13 +116,13 @@ discard block |
||
116 | 116 | INSERT INTO session_info (sessid, ipaddr, lastused, uid, remember, vars) |
117 | 117 | VALUES (:sessid, :ipaddr, :lastused, :uid, :remember, :vars)', |
118 | 118 | [ |
119 | - 'sessid' => $obj['sessid'], |
|
120 | - 'ipaddr' => $obj['ipaddr'], |
|
121 | - 'lastused' => $obj['lastused'], |
|
122 | - 'uid' => $obj['uid'], |
|
123 | - 'remember' => $obj['remember'], |
|
124 | - 'uid' => $obj['uid'], |
|
125 | - 'vars' => $obj['vars'], |
|
119 | + 'sessid' => $obj['sessid'], |
|
120 | + 'ipaddr' => $obj['ipaddr'], |
|
121 | + 'lastused' => $obj['lastused'], |
|
122 | + 'uid' => $obj['uid'], |
|
123 | + 'remember' => $obj['remember'], |
|
124 | + 'uid' => $obj['uid'], |
|
125 | + 'vars' => $obj['vars'], |
|
126 | 126 | ] |
127 | 127 | ); |
128 | 128 | } else { |
@@ -136,13 +136,13 @@ discard block |
||
136 | 136 | vars = :vars |
137 | 137 | WHERE sessid = :sessid', |
138 | 138 | [ |
139 | - 'sessid' => $obj['sessid'], |
|
140 | - 'ipaddr' => $obj['ipaddr'], |
|
141 | - 'lastused' => $obj['lastused'], |
|
142 | - 'uid' => $obj['uid'], |
|
143 | - 'remember' => $obj['remember'], |
|
144 | - 'uid' => $obj['uid'], |
|
145 | - 'vars' => $obj['vars'], |
|
139 | + 'sessid' => $obj['sessid'], |
|
140 | + 'ipaddr' => $obj['ipaddr'], |
|
141 | + 'lastused' => $obj['lastused'], |
|
142 | + 'uid' => $obj['uid'], |
|
143 | + 'remember' => $obj['remember'], |
|
144 | + 'uid' => $obj['uid'], |
|
145 | + 'vars' => $obj['vars'], |
|
146 | 146 | ] |
147 | 147 | ); |
148 | 148 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | ); |
148 | 148 | } |
149 | 149 | |
150 | - return (bool) $res; |
|
150 | + return (bool)$res; |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | /** |
@@ -169,8 +169,8 @@ discard block |
||
169 | 169 | public function gc($lifetime) |
170 | 170 | { |
171 | 171 | $now = time(); |
172 | - $inactive = ($now - (int) ($this->variableApi->getSystemVar('secinactivemins') * 60)); |
|
173 | - $daysold = ($now - (int) ($this->variableApi->getSystemVar('secmeddays') * 86400)); |
|
172 | + $inactive = ($now - (int)($this->variableApi->getSystemVar('secinactivemins') * 60)); |
|
173 | + $daysold = ($now - (int)($this->variableApi->getSystemVar('secmeddays') * 86400)); |
|
174 | 174 | |
175 | 175 | $inactive = date('Y-m-d H:i:s', $inactive); |
176 | 176 | $daysold = date('Y-m-d H:i:s', $daysold); |
@@ -205,6 +205,6 @@ discard block |
||
205 | 205 | $res = false; |
206 | 206 | } |
207 | 207 | |
208 | - return (bool) $res; |
|
208 | + return (bool)$res; |
|
209 | 209 | } |
210 | 210 | } |
@@ -132,7 +132,7 @@ |
||
132 | 132 | if ($event['stage'] & Zikula_Core::STAGE_TABLES) { |
133 | 133 | if (!System::isInstalling()) { |
134 | 134 | ServiceUtil::loadPersistentServices(); |
135 | - PluginUtil::loadPlugins(realpath(realpath('.').'/plugins'), "SystemPlugin"); |
|
135 | + PluginUtil::loadPlugins(realpath(realpath('.') . '/plugins'), "SystemPlugin"); |
|
136 | 136 | EventUtil::loadPersistentEvents(); |
137 | 137 | } |
138 | 138 | } |