@@ -33,8 +33,8 @@ discard block |
||
33 | 33 | */ |
34 | 34 | public function insertBreak($extra = '', $class = '') |
35 | 35 | { |
36 | - $class = empty($class) ? '' : ' class="' . $class . '"'; |
|
37 | - $value = '<br' . $class . ' />' . $extra; |
|
36 | + $class = empty($class) ? '' : ' class="'.$class.'"'; |
|
37 | + $value = '<br'.$class.' />'.$extra; |
|
38 | 38 | $ele = new Raw($value); |
39 | 39 | $this->addElement($ele); |
40 | 40 | } |
@@ -46,19 +46,19 @@ discard block |
||
46 | 46 | */ |
47 | 47 | public function render() |
48 | 48 | { |
49 | - $ret = $this->getTitle() . "\n<form name=\"" . $this->getName() . "\" id=\"" |
|
50 | - . $this->getName() . "\" action=\"" . $this->getAction() . "\" method=\"" |
|
51 | - . $this->getMethod() . "\"" . $this->getExtra() . ">\n"; |
|
49 | + $ret = $this->getTitle()."\n<form name=\"".$this->getName()."\" id=\"" |
|
50 | + . $this->getName()."\" action=\"".$this->getAction()."\" method=\"" |
|
51 | + . $this->getMethod()."\"".$this->getExtra().">\n"; |
|
52 | 52 | foreach ($this->getElements() as $ele) { |
53 | 53 | /* @var $ele Element */ |
54 | 54 | if (!$ele->isHidden()) { |
55 | 55 | if (!$ele instanceof Raw) { |
56 | - $ret .= "<strong>" . $ele->getCaption() . "</strong><br />" . $ele->render() . "<br />\n"; |
|
56 | + $ret .= "<strong>".$ele->getCaption()."</strong><br />".$ele->render()."<br />\n"; |
|
57 | 57 | } else { |
58 | 58 | $ret .= $ele->render(); |
59 | 59 | } |
60 | 60 | } else { |
61 | - $ret .= $ele->render() . "\n"; |
|
61 | + $ret .= $ele->render()."\n"; |
|
62 | 62 | } |
63 | 63 | } |
64 | 64 | $ret .= "</form>\n"; |
@@ -160,10 +160,10 @@ |
||
160 | 160 | } |
161 | 161 | if ($ele->getCaption() != '') { |
162 | 162 | $ret .= '<div class="form-group">'; |
163 | - $ret .= '<label class="control-label">' . $ele->getCaption() . "</label> "; |
|
163 | + $ret .= '<label class="control-label">'.$ele->getCaption()."</label> "; |
|
164 | 164 | $ret .= '</div>'; |
165 | 165 | } |
166 | - $ret .= $ele->render() . "\n"; |
|
166 | + $ret .= $ele->render()."\n"; |
|
167 | 167 | if (!$ele->isHidden()) { |
168 | 168 | ++$count; |
169 | 169 | } |
@@ -78,7 +78,7 @@ |
||
78 | 78 | $myts = Sanitizer::getInstance(); |
79 | 79 | $value = array(); |
80 | 80 | foreach ($options as $val => $name) { |
81 | - $value[(bool) $encode ? $myts->htmlSpecialChars($val) : $val] = ($encode > 1) |
|
81 | + $value[(bool)$encode ? $myts->htmlSpecialChars($val) : $val] = ($encode > 1) |
|
82 | 82 | ? $myts->htmlSpecialChars($name) : $name; |
83 | 83 | } |
84 | 84 | return $value; |
@@ -44,27 +44,27 @@ |
||
44 | 44 | */ |
45 | 45 | public function render() |
46 | 46 | { |
47 | - $ret = $this->getTitle() . "\n" . '<form name="' . $this->getName() . '" id="' |
|
48 | - . $this->getName() . '" action="' . $this->getAction() . '" method="' . $this->getMethod() |
|
49 | - . '"' . $this->getExtra() . '>' . "\n" . '<table border="0" width="100%">' . "\n"; |
|
47 | + $ret = $this->getTitle()."\n".'<form name="'.$this->getName().'" id="' |
|
48 | + . $this->getName().'" action="'.$this->getAction().'" method="'.$this->getMethod() |
|
49 | + . '"'.$this->getExtra().'>'."\n".'<table border="0" width="100%">'."\n"; |
|
50 | 50 | $hidden = ""; |
51 | 51 | foreach ($this->getElements() as $ele) { |
52 | 52 | /* @var $ele Element */ |
53 | 53 | if (!$ele->isHidden()) { |
54 | 54 | if (!$ele instanceof Raw) { |
55 | - $ret .= '<tr valign="top" align="left"><td>' . $ele->getCaption(); |
|
55 | + $ret .= '<tr valign="top" align="left"><td>'.$ele->getCaption(); |
|
56 | 56 | if ($ele_desc = $ele->getDescription()) { |
57 | - $ret .= '<br /><br /><span style="font-weight: normal;">' . $ele_desc . '</span>'; |
|
57 | + $ret .= '<br /><br /><span style="font-weight: normal;">'.$ele_desc.'</span>'; |
|
58 | 58 | } |
59 | - $ret .= '</td><td>' . $ele->render() . '</td></tr>'; |
|
59 | + $ret .= '</td><td>'.$ele->render().'</td></tr>'; |
|
60 | 60 | } else { |
61 | 61 | $ret .= $ele->render(); |
62 | 62 | } |
63 | 63 | } else { |
64 | - $hidden .= $ele->render() . "\n"; |
|
64 | + $hidden .= $ele->render()."\n"; |
|
65 | 65 | } |
66 | 66 | } |
67 | - $ret .= '</table>' . "\n" . ' ' . $hidden . '</form>' . "\n"; |
|
67 | + $ret .= '</table>'."\n".' '.$hidden.'</form>'."\n"; |
|
68 | 68 | return $ret; |
69 | 69 | } |
70 | 70 | } |
@@ -83,7 +83,7 @@ |
||
83 | 83 | $editor_handler->allowed_editors = $this->allowed_editors; |
84 | 84 | $option_select = new Select("", $this->name, $this->value); |
85 | 85 | $onchangeCode = '"if(this.options[this.selectedIndex].value.length > 0 ){window.document.forms.' |
86 | - . $this->form->getName() . '.submit();}"'; |
|
86 | + . $this->form->getName().'.submit();}"'; |
|
87 | 87 | $option_select->set('onchange', $onchangeCode); |
88 | 88 | $option_select->addOptionArray($editor_handler->getList($this->nohtml)); |
89 | 89 | $this->addElement($option_select); |
@@ -74,7 +74,7 @@ |
||
74 | 74 | $configs = $this->captchaHandler->loadConfig(); |
75 | 75 | |
76 | 76 | $this->captchaHandler->setConfigs($configs); |
77 | - if (! $this->captchaHandler->isActive()) { |
|
77 | + if (!$this->captchaHandler->isActive()) { |
|
78 | 78 | $this->setHidden(); |
79 | 79 | } |
80 | 80 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | return $default; |
132 | 132 | } |
133 | 133 | |
134 | - $this->addLog("Getting config '{$name}' : " . $configs[$name]); |
|
134 | + $this->addLog("Getting config '{$name}' : ".$configs[$name]); |
|
135 | 135 | |
136 | 136 | return $configs[$name]; |
137 | 137 | } |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | */ |
214 | 214 | public function url($url = '') |
215 | 215 | { |
216 | - return $this->xoops()->url('modules/' . $this->dirname . '/' . $url); |
|
216 | + return $this->xoops()->url('modules/'.$this->dirname.'/'.$url); |
|
217 | 217 | } |
218 | 218 | |
219 | 219 | /** |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | */ |
226 | 226 | public function path($path = '') |
227 | 227 | { |
228 | - return $this->xoops()->path('modules/' . $this->dirname . '/' . $path); |
|
228 | + return $this->xoops()->path('modules/'.$this->dirname.'/'.$path); |
|
229 | 229 | } |
230 | 230 | |
231 | 231 | /** |
@@ -35,7 +35,7 @@ |
||
35 | 35 | if ($xoops->isActiveModule($dirname)) { |
36 | 36 | //Load Module helper if available |
37 | 37 | if (\XoopsLoad::loadFile($xoops->path("modules/{$dirname}/class/helper.php"))) { |
38 | - $className = '\\' . ucfirst($dirname); |
|
38 | + $className = '\\'.ucfirst($dirname); |
|
39 | 39 | if (class_exists($className)) { |
40 | 40 | $class = new $className(); |
41 | 41 | if ($class instanceof \Xoops\Module\Helper\HelperAbstract) { |
@@ -70,8 +70,8 @@ |
||
70 | 70 | } |
71 | 71 | foreach ($dirnames as $dirname) { |
72 | 72 | if (\XoopsLoad::loadFile($xoops->path("modules/{$dirname}/class/plugin/{$pluginName}.php"))) { |
73 | - $className = '\\' . ucfirst($dirname) . ucfirst($pluginName) . 'Plugin'; |
|
74 | - $interface = '\\' . ucfirst($pluginName) . 'PluginInterface'; |
|
73 | + $className = '\\'.ucfirst($dirname).ucfirst($pluginName).'Plugin'; |
|
74 | + $interface = '\\'.ucfirst($pluginName).'PluginInterface'; |
|
75 | 75 | $class = new $className($dirname); |
76 | 76 | if ($class instanceof $interface) { |
77 | 77 | static::$plugins[$pluginName][$dirname] = $class; |