@@ -171,7 +171,7 @@ |
||
171 | 171 | public static function substr($str, $start, $length, $ellipsis = '…') |
172 | 172 | { |
173 | 173 | $str2 = mb_strcut($str, $start, $length - strlen($ellipsis)); |
174 | - return $str2 . (mb_strlen($str)-$start != mb_strlen($str2) ? $ellipsis : ''); |
|
174 | + return $str2.(mb_strlen($str) - $start != mb_strlen($str2) ? $ellipsis : ''); |
|
175 | 175 | } |
176 | 176 | |
177 | 177 | /** |
@@ -41,7 +41,7 @@ |
||
41 | 41 | */ |
42 | 42 | public function render() |
43 | 43 | { |
44 | - $tag = '<img ' . $this->renderAttributeString() . ' />'; |
|
44 | + $tag = '<img '.$this->renderAttributeString().' />'; |
|
45 | 45 | |
46 | 46 | return $tag; |
47 | 47 | } |
@@ -60,13 +60,13 @@ |
||
60 | 60 | $anchorEnd = ''; |
61 | 61 | $liClass = ' class="active"'; |
62 | 62 | if ($item->has('link')) { |
63 | - $anchorStart = '<a href="' . $this->xoops->url($item->get('link')) . '">'; |
|
63 | + $anchorStart = '<a href="'.$this->xoops->url($item->get('link')).'">'; |
|
64 | 64 | $anchorEnd = '</a>'; |
65 | 65 | $liClass = ''; |
66 | 66 | } |
67 | 67 | $caption = $item->get('caption', ''); |
68 | 68 | $icon = $item->has('icon') ? |
69 | - '<span class="' . $item->get('icon') . '" aria-hidden="true"></span> ' : ''; |
|
69 | + '<span class="'.$item->get('icon').'" aria-hidden="true"></span> ' : ''; |
|
70 | 70 | $renderedItems .= "<li{$liClass}>{$anchorStart}{$icon}{$caption}{$anchorEnd}</li>"; |
71 | 71 | break; |
72 | 72 | case Item::TYPE_LIST: |
@@ -38,10 +38,10 @@ discard block |
||
38 | 38 | $dropdown = $menu->get('dropdown', 'dropdown'); |
39 | 39 | $renderedMenu = "<div class=\"{$dropdown}\">\n"; |
40 | 40 | $class = $menu->get('class', 'btn btn-default dropdown-toggle'); |
41 | - $id = ($menu->has('id')) ? ' id="' . $menu->get('id') . '"' : ''; |
|
42 | - $labeledId = ($menu->has('id')) ? ' aria-labelledby="' . $menu->get('id') . '"' : ''; |
|
41 | + $id = ($menu->has('id')) ? ' id="'.$menu->get('id').'"' : ''; |
|
42 | + $labeledId = ($menu->has('id')) ? ' aria-labelledby="'.$menu->get('id').'"' : ''; |
|
43 | 43 | $caption = $menu->get('caption', ''); |
44 | - $icon = $menu->has('icon') ? '<span class="' . $menu->get('icon') . '" aria-hidden="true"></span> ' : ''; |
|
44 | + $icon = $menu->has('icon') ? '<span class="'.$menu->get('icon').'" aria-hidden="true"></span> ' : ''; |
|
45 | 45 | $renderedMenu .= <<<EOT |
46 | 46 | <button class="{$class}" type="button"{$id} data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> |
47 | 47 | {$icon}{$caption} <span class="caret"></span> |
@@ -74,13 +74,13 @@ discard block |
||
74 | 74 | $anchorEnd = ''; |
75 | 75 | $liClass = ' class="active"'; |
76 | 76 | if ($item->has('link')) { |
77 | - $anchorStart = '<a href="' . $this->xoops->url($item->get('link')) . '">'; |
|
77 | + $anchorStart = '<a href="'.$this->xoops->url($item->get('link')).'">'; |
|
78 | 78 | $anchorEnd = '</a>'; |
79 | 79 | $liClass = ''; |
80 | 80 | } |
81 | 81 | $caption = $item->get('caption', ''); |
82 | 82 | $icon = $item->has('icon') ? |
83 | - '<span class="' . $item->get('icon') . '" aria-hidden="true"></span> ' : ''; |
|
83 | + '<span class="'.$item->get('icon').'" aria-hidden="true"></span> ' : ''; |
|
84 | 84 | $renderedItems .= "<li{$liClass}>{$anchorStart}{$icon}{$caption}{$anchorEnd}</li>"; |
85 | 85 | break; |
86 | 86 | case Item::TYPE_LIST: |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | |
198 | 198 | return $newuser; |
199 | 199 | } else { |
200 | - $xoops->redirect(\XoopsBaseConfig::get('url') . '/user.php', 5, $newuser->getHtmlErrors()); |
|
200 | + $xoops->redirect(\XoopsBaseConfig::get('url').'/user.php', 5, $newuser->getHtmlErrors()); |
|
201 | 201 | } |
202 | 202 | |
203 | 203 | return $ret; |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | if ($member_handler->insertUser($xoopsUser)) { |
226 | 226 | return $xoopsUser; |
227 | 227 | } else { |
228 | - $xoops->redirect(\XoopsBaseConfig::get('url') . '/user.php', 5, $xoopsUser->getHtmlErrors()); |
|
228 | + $xoops->redirect(\XoopsBaseConfig::get('url').'/user.php', 5, $xoopsUser->getHtmlErrors()); |
|
229 | 229 | } |
230 | 230 | |
231 | 231 | return $ret; |
@@ -94,10 +94,10 @@ |
||
94 | 94 | if ($xoops->getConfig('debug_mode') == 1 || $xoops->getConfig('debug_mode') == 2) { |
95 | 95 | if (!empty($this->errors)) { |
96 | 96 | foreach ($this->errors as $errstr) { |
97 | - $ret .= $errstr . '<br/>'; |
|
97 | + $ret .= $errstr.'<br/>'; |
|
98 | 98 | } |
99 | 99 | } else { |
100 | - $ret .= \XoopsLocale::NONE . '<br />'; |
|
100 | + $ret .= \XoopsLocale::NONE.'<br />'; |
|
101 | 101 | } |
102 | 102 | $ret .= sprintf(\XoopsLocale::F_USING_AUTHENTICATION_METHOD, $this->auth_method); |
103 | 103 | } else { |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * |
36 | 36 | * @return AuthAbstract|bool Reference to the only instance of authentication class |
37 | 37 | */ |
38 | - public static function getAuthConnection($uname, $_force=false) |
|
38 | + public static function getAuthConnection($uname, $_force = false) |
|
39 | 39 | { |
40 | 40 | $xoops = \Xoops::getInstance(); |
41 | 41 | static $auth_instance; |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $xoops_auth_method = 'xoops'; |
53 | 53 | } |
54 | 54 | |
55 | - $class = '\Xoops\Auth\\' . ucfirst($xoops_auth_method); |
|
55 | + $class = '\Xoops\Auth\\'.ucfirst($xoops_auth_method); |
|
56 | 56 | if (!class_exists($class)) { |
57 | 57 | trigger_error(\XoopsLocale::EF_CLASS_NOT_FOUND, E_USER_ERROR); |
58 | 58 | return false; |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | return false; |
86 | 86 | } |
87 | 87 | } else { |
88 | - $this->setErrors(ldap_errno($this->ds), ldap_err2str(ldap_errno($this->ds)) . '(' . $userUPN . ')'); |
|
88 | + $this->setErrors(ldap_errno($this->ds), ldap_err2str(ldap_errno($this->ds)).'('.$userUPN.')'); |
|
89 | 89 | } |
90 | 90 | } else { |
91 | 91 | $this->setErrors(0, \XoopsLocale::E_CANNOT_CONNECT_TO_SERVER); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | */ |
107 | 107 | public function getUPN($uname) |
108 | 108 | { |
109 | - $userDN = $uname . '@' . $this->ldap_domain_name; |
|
109 | + $userDN = $uname.'@'.$this->ldap_domain_name; |
|
110 | 110 | return $userDN; |
111 | 111 | } |
112 | 112 | } |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | // We load the Xoops User database |
163 | 163 | return $this->loadXoopsUser($userDN, $uname, $pwd); |
164 | 164 | } else { |
165 | - $this->setErrors(ldap_errno($this->ds), ldap_err2str(ldap_errno($this->ds)) . '(' . $userDN . ')'); |
|
165 | + $this->setErrors(ldap_errno($this->ds), ldap_err2str(ldap_errno($this->ds)).'('.$userDN.')'); |
|
166 | 166 | } |
167 | 167 | } else { |
168 | 168 | $this->setErrors(0, \XoopsLocale::E_CANNOT_CONNECT_TO_SERVER); |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | if (!ldap_bind($this->ds, $this->ldap_manager_dn, stripslashes($this->ldap_manager_pass))) { |
188 | 188 | $this->setErrors( |
189 | 189 | ldap_errno($this->ds), |
190 | - ldap_err2str(ldap_errno($this->ds)) . '(' . $this->ldap_manager_dn . ')' |
|
190 | + ldap_err2str(ldap_errno($this->ds)).'('.$this->ldap_manager_dn.')' |
|
191 | 191 | ); |
192 | 192 | |
193 | 193 | return false; |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | )); |
207 | 207 | } |
208 | 208 | } else { |
209 | - $userDN = $this->ldap_loginldap_attr . '=' . $uname . ',' . $this->ldap_base_dn; |
|
209 | + $userDN = $this->ldap_loginldap_attr.'='.$uname.','.$this->ldap_base_dn; |
|
210 | 210 | } |
211 | 211 | |
212 | 212 | return $userDN; |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | if ($this->ldap_filter_person != '') { |
225 | 225 | $filter = str_replace('@@loginname@@', $uname, $this->ldap_filter_person); |
226 | 226 | } else { |
227 | - $filter = $this->ldap_loginldap_attr . '=' . $uname; |
|
227 | + $filter = $this->ldap_loginldap_attr.'='.$uname; |
|
228 | 228 | } |
229 | 229 | |
230 | 230 | return $filter; |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | if ($entries['count'] > 0) { |
249 | 249 | $xoopsUser = $provisHandler->sync($entries[0], $uname, $pwd); |
250 | 250 | } else { |
251 | - $this->setErrors(0, sprintf('loadXoopsUser - ' . \XoopsLocale::EF_ENTRY_NOT_READ, $userdn)); |
|
251 | + $this->setErrors(0, sprintf('loadXoopsUser - '.\XoopsLocale::EF_ENTRY_NOT_READ, $userdn)); |
|
252 | 252 | } |
253 | 253 | |
254 | 254 | return $xoopsUser; |