@@ -23,12 +23,12 @@ discard block |
||
23 | 23 | // along with this program; if not, write to the Free Software // |
24 | 24 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // |
25 | 25 | // ------------------------------------------------------------------------ // |
26 | -include_once XOOPS_ROOT_PATH . '/class/logger/xoopslogger.php'; |
|
27 | -include_once XOOPS_ROOT_PATH . '/class/xoopsload.php'; |
|
28 | -include_once XOOPS_ROOT_PATH . '/class/preload.php'; |
|
29 | -include_once XOOPS_ROOT_PATH . '/class/database/databasefactory.php'; |
|
30 | -include_once XOOPS_ROOT_PATH . '/class/database/' . XOOPS_DB_TYPE . 'database.php'; |
|
31 | -include_once XOOPS_ROOT_PATH . '/class/database/sqlutility.php'; |
|
26 | +include_once XOOPS_ROOT_PATH.'/class/logger/xoopslogger.php'; |
|
27 | +include_once XOOPS_ROOT_PATH.'/class/xoopsload.php'; |
|
28 | +include_once XOOPS_ROOT_PATH.'/class/preload.php'; |
|
29 | +include_once XOOPS_ROOT_PATH.'/class/database/databasefactory.php'; |
|
30 | +include_once XOOPS_ROOT_PATH.'/class/database/'.XOOPS_DB_TYPE.'database.php'; |
|
31 | +include_once XOOPS_ROOT_PATH.'/class/database/sqlutility.php'; |
|
32 | 32 | |
33 | 33 | /** |
34 | 34 | * database manager for XOOPS installer |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | { |
61 | 61 | $isConnected = ($this->db->connect(false) !== false); |
62 | 62 | if (!$isConnected) { |
63 | - $_SESSION['error'] = '(' . $this->db->conn->connect_errno . ') ' . $this->db->conn->connect_error; |
|
63 | + $_SESSION['error'] = '('.$this->db->conn->connect_errno.') '.$this->db->conn->connect_error; |
|
64 | 64 | } |
65 | 65 | return $isConnected; |
66 | 66 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | */ |
71 | 71 | public function dbExists() |
72 | 72 | { |
73 | - return ($this->db->connect() != false);// ? true : false; |
|
73 | + return ($this->db->connect() != false); // ? true : false; |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
@@ -80,9 +80,9 @@ discard block |
||
80 | 80 | { |
81 | 81 | $this->db->connect(false); |
82 | 82 | |
83 | - $result = $this->db->query('CREATE DATABASE ' . XOOPS_DB_NAME); |
|
83 | + $result = $this->db->query('CREATE DATABASE '.XOOPS_DB_NAME); |
|
84 | 84 | |
85 | - return ($result != false);// ? true : false; |
|
85 | + return ($result != false); // ? true : false; |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | /** |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | } |
143 | 143 | } |
144 | 144 | } elseif ($prefixed_query[1] === 'DROP TABLE') { |
145 | - if ($this->db->query('DROP TABLE ' . $table) != false) { |
|
145 | + if ($this->db->query('DROP TABLE '.$table) != false) { |
|
146 | 146 | if (!isset($this->s_tables['drop'][$table])) { |
147 | 147 | $this->s_tables['drop'][$table] = 1; |
148 | 148 | } |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | { |
246 | 246 | $this->db->connect(); |
247 | 247 | $table = $this->db->prefix($table); |
248 | - $query = 'INSERT INTO ' . $table . ' ' . $query; |
|
248 | + $query = 'INSERT INTO '.$table.' '.$query; |
|
249 | 249 | if (!$this->db->queryF($query)) { |
250 | 250 | if (!isset($this->f_tables['insert'][$table])) { |
251 | 251 | $this->f_tables['insert'][$table] = 1; |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | $deleted = array(); |
284 | 284 | $this->db->connect(); |
285 | 285 | foreach ($tables as $key => $val) { |
286 | - if (!$this->db->query('DROP TABLE ' . $this->db->prefix($key))) { |
|
286 | + if (!$this->db->query('DROP TABLE '.$this->db->prefix($key))) { |
|
287 | 287 | $deleted[] = $ct; |
288 | 288 | } |
289 | 289 | } |
@@ -302,9 +302,9 @@ discard block |
||
302 | 302 | $ret = false; |
303 | 303 | if ($table != '') { |
304 | 304 | $this->db->connect(); |
305 | - $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix($table); |
|
305 | + $sql = 'SELECT COUNT(*) FROM '.$this->db->prefix($table); |
|
306 | 306 | $ret = $this->db->query($sql); |
307 | - $ret = !empty($ret); //return false on error or $table not found |
|
307 | + $ret = !empty($ret); //return false on error or $table not found |
|
308 | 308 | } |
309 | 309 | |
310 | 310 | return $ret; |
@@ -73,16 +73,16 @@ discard block |
||
73 | 73 | $this->xoopsPath['root'] = $path; |
74 | 74 | } |
75 | 75 | // Firstly, locate XOOPS lib folder out of XOOPS root folder |
76 | - $this->xoopsPath['lib'] = dirname($path) . '/' . $this->xoopsPathDefault['lib']; |
|
76 | + $this->xoopsPath['lib'] = dirname($path).'/'.$this->xoopsPathDefault['lib']; |
|
77 | 77 | // If the folder is not created, re-locate XOOPS lib folder inside XOOPS root folder |
78 | - if (!is_dir($this->xoopsPath['lib'] . '/')) { |
|
79 | - $this->xoopsPath['lib'] = $path . '/' . $this->xoopsPathDefault['lib']; |
|
78 | + if (!is_dir($this->xoopsPath['lib'].'/')) { |
|
79 | + $this->xoopsPath['lib'] = $path.'/'.$this->xoopsPathDefault['lib']; |
|
80 | 80 | } |
81 | 81 | // Firstly, locate XOOPS data folder out of XOOPS root folder |
82 | - $this->xoopsPath['data'] = dirname($path) . '/' . $this->xoopsPathDefault['data']; |
|
82 | + $this->xoopsPath['data'] = dirname($path).'/'.$this->xoopsPathDefault['data']; |
|
83 | 83 | // If the folder is not created, re-locate XOOPS data folder inside XOOPS root folder |
84 | - if (!is_dir($this->xoopsPath['data'] . '/')) { |
|
85 | - $this->xoopsPath['data'] = $path . '/' . $this->xoopsPathDefault['data']; |
|
84 | + if (!is_dir($this->xoopsPath['data'].'/')) { |
|
85 | + $this->xoopsPath['data'] = $path.'/'.$this->xoopsPathDefault['data']; |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 | if (isset($_SESSION['settings']['URL'])) { |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | $tempCookieDomain = $tempParts['host']; |
144 | 144 | } |
145 | 145 | $request['COOKIE_DOMAIN'] = $tempCookieDomain; |
146 | - $this->xoopsCookieDomain = $tempCookieDomain;; |
|
146 | + $this->xoopsCookieDomain = $tempCookieDomain; ; |
|
147 | 147 | } |
148 | 148 | } |
149 | 149 | } |
@@ -223,19 +223,19 @@ discard block |
||
223 | 223 | if (is_array($path)) { |
224 | 224 | foreach (array_keys($path) as $item) { |
225 | 225 | if (is_string($item)) { |
226 | - $error[$parent . '/' . $item] = $this->makeWritable($parent . '/' . $item); |
|
226 | + $error[$parent.'/'.$item] = $this->makeWritable($parent.'/'.$item); |
|
227 | 227 | if (empty($path[$item])) { |
228 | 228 | continue; |
229 | 229 | } |
230 | 230 | foreach ($path[$item] as $child) { |
231 | - $this->setPermission($parent . '/' . $item, $child, $error); |
|
231 | + $this->setPermission($parent.'/'.$item, $child, $error); |
|
232 | 232 | } |
233 | 233 | } else { |
234 | - $error[$parent . '/' . $path[$item]] = $this->makeWritable($parent . '/' . $path[$item]); |
|
234 | + $error[$parent.'/'.$path[$item]] = $this->makeWritable($parent.'/'.$path[$item]); |
|
235 | 235 | } |
236 | 236 | } |
237 | 237 | } else { |
238 | - $error[$parent . '/' . $path] = $this->makeWritable($parent . '/' . $path); |
|
238 | + $error[$parent.'/'.$path] = $this->makeWritable($parent.'/'.$path); |
|
239 | 239 | } |
240 | 240 | |
241 | 241 | return null; |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | $host = $_SERVER['HTTP_HOST']; |
196 | 196 | $base = substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/')); |
197 | 197 | |
198 | - return $proto . '://' . $host . $base; |
|
198 | + return $proto.'://'.$host.$base; |
|
199 | 199 | } |
200 | 200 | |
201 | 201 | /** |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | } |
226 | 226 | $page = $pages[$pageIndex]; |
227 | 227 | |
228 | - return $this->baseLocation() . "/page_{$page}.php"; |
|
228 | + return $this->baseLocation()."/page_{$page}.php"; |
|
229 | 229 | } |
230 | 230 | |
231 | 231 | /** |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | |
253 | 253 | foreach ($this->form as $form) { |
254 | 254 | $ret .= '<div class="panel panel-info">'; |
255 | - $ret .= '<div class="panel-heading">' . $form->getTitle() . '</div>'; |
|
255 | + $ret .= '<div class="panel-heading">'.$form->getTitle().'</div>'; |
|
256 | 256 | $ret .= '<div class="panel-body">'; |
257 | 257 | |
258 | 258 | foreach ($form->getElements() as $ele) { |
@@ -260,20 +260,20 @@ discard block |
||
260 | 260 | if (!$ele->isHidden()) { |
261 | 261 | if (($caption = $ele->getCaption()) != '') { |
262 | 262 | $name = $ele->getName(); |
263 | - $ret .= "<label class='xolabel' for='" . $ele->getName() . "'>" . $caption . '</label>'; |
|
263 | + $ret .= "<label class='xolabel' for='".$ele->getName()."'>".$caption.'</label>'; |
|
264 | 264 | if (($desc = $ele->getDescription()) != '') { |
265 | 265 | $ret .= "<div class='xoform-help alert alert-info'>"; |
266 | 266 | $ret .= $desc; |
267 | 267 | $ret .= '</div>'; |
268 | 268 | } |
269 | 269 | } |
270 | - $ret .= $ele->render() . "\n"; |
|
270 | + $ret .= $ele->render()."\n"; |
|
271 | 271 | } else { |
272 | - $hidden .= $ele->render() . "\n"; |
|
272 | + $hidden .= $ele->render()."\n"; |
|
273 | 273 | } |
274 | 274 | } |
275 | 275 | } |
276 | - $ret .= "</div></div>\n" . $hidden . "\n" . $form->renderValidationJS(true); |
|
276 | + $ret .= "</div></div>\n".$hidden."\n".$form->renderValidationJS(true); |
|
277 | 277 | } |
278 | 278 | |
279 | 279 | return $ret; |
@@ -31,9 +31,9 @@ discard block |
||
31 | 31 | $pageHasForm = true; |
32 | 32 | $pageHasHelp = false; |
33 | 33 | |
34 | -$vars =& $_SESSION['siteconfig']; |
|
34 | +$vars = & $_SESSION['siteconfig']; |
|
35 | 35 | |
36 | -$error =& $_SESSION['error']; |
|
36 | +$error = & $_SESSION['error']; |
|
37 | 37 | |
38 | 38 | if ($_SERVER['REQUEST_METHOD'] === 'POST') { |
39 | 39 | $vars['adminname'] = trim($_POST['adminname']); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | exit(); |
76 | 76 | } |
77 | 77 | |
78 | - $res = $dbm->query('SELECT COUNT(*) FROM ' . $dbm->db->prefix('users')); |
|
78 | + $res = $dbm->query('SELECT COUNT(*) FROM '.$dbm->db->prefix('users')); |
|
79 | 79 | list($isadmin) = $dbm->db->fetchRow($res); |
80 | 80 | } |
81 | 81 | |
@@ -85,15 +85,15 @@ discard block |
||
85 | 85 | if ($isadmin) { |
86 | 86 | $pageHasForm = false; |
87 | 87 | $pageHasHelp = false; |
88 | - echo "<div class='alert alert-warning'>" . ADMIN_EXIST . "</div>\n"; |
|
88 | + echo "<div class='alert alert-warning'>".ADMIN_EXIST."</div>\n"; |
|
89 | 89 | } else { |
90 | 90 | echo '<script type="text/javascript"> |
91 | 91 | var desc = new Array(); |
92 | - desc[0] = "' . PASSWORD_VERY_WEAK . '"; |
|
93 | - desc[1] = "' . PASSWORD_WEAK . '"; |
|
94 | - desc[2] = "' . PASSWORD_BETTER . '"; |
|
95 | - desc[3] = "' . PASSWORD_MEDIUM . '"; |
|
96 | - desc[4] = "' . PASSWORD_STRONG . '"; |
|
92 | + desc[0] = "' . PASSWORD_VERY_WEAK.'"; |
|
93 | + desc[1] = "' . PASSWORD_WEAK.'"; |
|
94 | + desc[2] = "' . PASSWORD_BETTER.'"; |
|
95 | + desc[3] = "' . PASSWORD_MEDIUM.'"; |
|
96 | + desc[4] = "' . PASSWORD_STRONG.'"; |
|
97 | 97 | </script>'; |
98 | 98 | |
99 | 99 | ?> |
@@ -106,14 +106,14 @@ discard block |
||
106 | 106 | echo xoFormField('adminname', $vars['adminname'], ADMIN_LOGIN_LABEL); |
107 | 107 | if (isset($error['name'])) { |
108 | 108 | foreach ($error['name'] as $errmsg) { |
109 | - echo '<div class="alert alert-danger"><span class="fa fa-ban text-danger"></span> ' . $errmsg . '</div>'; |
|
109 | + echo '<div class="alert alert-danger"><span class="fa fa-ban text-danger"></span> '.$errmsg.'</div>'; |
|
110 | 110 | } |
111 | 111 | } |
112 | 112 | |
113 | 113 | echo xoFormField('adminmail', $vars['adminmail'], ADMIN_EMAIL_LABEL); |
114 | 114 | if (isset($error['email'])) { |
115 | 115 | foreach ($error['email'] as $errmsg) { |
116 | - echo '<div class="alert alert-danger"><span class="fa fa-ban text-danger"></span> ' . $errmsg . '</div>'; |
|
116 | + echo '<div class="alert alert-danger"><span class="fa fa-ban text-danger"></span> '.$errmsg.'</div>'; |
|
117 | 117 | } |
118 | 118 | } |
119 | 119 | ?> |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | echo xoPassField('adminpass2', '', ADMIN_CONFIRMPASS_LABEL); |
126 | 126 | if (isset($error['pass'])) { |
127 | 127 | foreach ($error['pass'] as $errmsg) { |
128 | - echo '<div class="alert alert-danger"><span class="fa fa-ban text-danger"></span> ' . $errmsg . '</div>'; |
|
128 | + echo '<div class="alert alert-danger"><span class="fa fa-ban text-danger"></span> '.$errmsg.'</div>'; |
|
129 | 129 | } |
130 | 130 | } |
131 | 131 | ?> |
@@ -37,8 +37,8 @@ |
||
37 | 37 | $key->kill(); |
38 | 38 | defined('XOOPS_INSTALL') || die('XOOPS Installation wizard die'); |
39 | 39 | |
40 | -$install_rename_suffix = uniqid(substr(md5($x = mt_rand()) . $x, -10)); |
|
41 | -$installer_modified = 'install_remove_' . $install_rename_suffix; |
|
40 | +$install_rename_suffix = uniqid(substr(md5($x = mt_rand()).$x, -10)); |
|
41 | +$installer_modified = 'install_remove_'.$install_rename_suffix; |
|
42 | 42 | |
43 | 43 | $pageHasForm = false; |
44 | 44 |
@@ -28,7 +28,7 @@ |
||
28 | 28 | |
29 | 29 | $install_rename_suffix = $_POST['instsuffix']; |
30 | 30 | if (preg_match('/^[a-f0-9]{23}$/', $install_rename_suffix)) { |
31 | - $installer_modified = 'install_remove_' . $install_rename_suffix; |
|
31 | + $installer_modified = 'install_remove_'.$install_rename_suffix; |
|
32 | 32 | install_finalize($installer_modified); |
33 | 33 | echo 'OK'; |
34 | 34 | } else { |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $pageHasForm = false; |
32 | 32 | $pageHasHelp = false; |
33 | 33 | |
34 | -$vars =& $_SESSION['settings']; |
|
34 | +$vars = & $_SESSION['settings']; |
|
35 | 35 | |
36 | 36 | include_once '../mainfile.php'; |
37 | 37 | include_once './class/dbmanager.php'; |
@@ -43,10 +43,10 @@ discard block |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | if ($dbm->tableExists('users')) { |
46 | - $content = '<div class="alert alert-info"><span class="fa fa-info-circle text-info"></span> ' . XOOPS_TABLES_FOUND . '</div>'; |
|
46 | + $content = '<div class="alert alert-info"><span class="fa fa-info-circle text-info"></span> '.XOOPS_TABLES_FOUND.'</div>'; |
|
47 | 47 | } else { |
48 | - $result = $dbm->queryFromFile('./sql/' . XOOPS_DB_TYPE . '.structure.sql'); |
|
49 | - $content = '<div class="alert alert-success"><span class="fa fa-check text-success"></span> ' . XOOPS_TABLES_CREATED |
|
50 | - . '</div><div class="well">' . $dbm->report() . '</div>'; |
|
48 | + $result = $dbm->queryFromFile('./sql/'.XOOPS_DB_TYPE.'.structure.sql'); |
|
49 | + $content = '<div class="alert alert-success"><span class="fa fa-check text-success"></span> '.XOOPS_TABLES_CREATED |
|
50 | + . '</div><div class="well">'.$dbm->report().'</div>'; |
|
51 | 51 | } |
52 | 52 | include './include/install_tpl.php'; |
@@ -35,26 +35,26 @@ |
||
35 | 35 | |
36 | 36 | $writable = '<div class="alert alert-warning"><ul style="list-style: none;">'; |
37 | 37 | foreach ($wizard->configs['writable'] as $key => $value) { |
38 | - if (is_dir('../' . $value)) { |
|
39 | - $writable .= '<li><span class="fa fa-fw fa-folder-open-o"></span> <strong>' . $value . '</strong></li>'; |
|
38 | + if (is_dir('../'.$value)) { |
|
39 | + $writable .= '<li><span class="fa fa-fw fa-folder-open-o"></span> <strong>'.$value.'</strong></li>'; |
|
40 | 40 | } else { |
41 | - $writable .= '<li><span class="fa fa-fw fa-file-code-o"></span> <strong>' . $value . '</strong></li>'; |
|
41 | + $writable .= '<li><span class="fa fa-fw fa-file-code-o"></span> <strong>'.$value.'</strong></li>'; |
|
42 | 42 | } |
43 | 43 | } |
44 | 44 | $writable .= '</ul></div>'; |
45 | 45 | |
46 | 46 | $xoops_trust = '<div class="alert alert-warning"><ul style="list-style: none;">'; |
47 | 47 | foreach ($wizard->configs['xoopsPathDefault'] as $key => $value) { |
48 | - $xoops_trust .= '<li><span class="fa fa-fw fa-folder-open-o"></span> <strong>' . $value . '</strong></li>'; |
|
48 | + $xoops_trust .= '<li><span class="fa fa-fw fa-folder-open-o"></span> <strong>'.$value.'</strong></li>'; |
|
49 | 49 | } |
50 | 50 | $xoops_trust .= '</ul></div>'; |
51 | 51 | |
52 | 52 | $writable_trust = '<div class="alert alert-warning"><ul style="list-style: none;">'; |
53 | 53 | foreach ($wizard->configs['dataPath'] as $key => $value) { |
54 | - $writable_trust .= '<li><span class="fa fa-fw fa-folder-open-o"></span> <strong>' . $wizard->configs['xoopsPathDefault']['data'] . '/' . $key . '</strong></li>'; |
|
54 | + $writable_trust .= '<li><span class="fa fa-fw fa-folder-open-o"></span> <strong>'.$wizard->configs['xoopsPathDefault']['data'].'/'.$key.'</strong></li>'; |
|
55 | 55 | if (is_array($value)) { |
56 | 56 | foreach ($value as $key2 => $value2) { |
57 | - $writable_trust .= '<li><span class="fa fa-fw fa-folder-open-o"></span> <strong>' . $wizard->configs['xoopsPathDefault']['data'] . '/' . $key . '/' . $value2 . '</strong></li>'; |
|
57 | + $writable_trust .= '<li><span class="fa fa-fw fa-folder-open-o"></span> <strong>'.$wizard->configs['xoopsPathDefault']['data'].'/'.$key.'/'.$value2.'</strong></li>'; |
|
58 | 58 | } |
59 | 59 | } |
60 | 60 | } |
@@ -69,8 +69,8 @@ discard block |
||
69 | 69 | } |
70 | 70 | if ($db_exist && $vars['DB_CHARSET']) { |
71 | 71 | $sql = 'ALTER DATABASE `' . $dbName . '` DEFAULT CHARACTER SET ' |
72 | - . mysqli_real_escape_string($link, $vars['DB_CHARSET']) |
|
73 | - . ($vars['DB_COLLATION'] ? ' COLLATE ' . mysqli_real_escape_string($link, $vars['DB_COLLATION']) : ''); |
|
72 | + . mysqli_real_escape_string($link, $vars['DB_CHARSET']) |
|
73 | + . ($vars['DB_COLLATION'] ? ' COLLATE ' . mysqli_real_escape_string($link, $vars['DB_COLLATION']) : ''); |
|
74 | 74 | if (!mysqli_query($link, $sql)) { |
75 | 75 | $error = ERR_CHARSET_NOT_SET . $sql; |
76 | 76 | } |
@@ -85,10 +85,10 @@ discard block |
||
85 | 85 | if (@empty($vars['DB_NAME'])) { |
86 | 86 | // Fill with default values |
87 | 87 | $vars = array_merge($vars, array( |
88 | - 'DB_NAME' => '', |
|
89 | - 'DB_CHARSET' => 'utf8', |
|
90 | - 'DB_COLLATION' => '', |
|
91 | - 'DB_PREFIX' => 'x' . substr(md5(time()), 0, 3))); |
|
88 | + 'DB_NAME' => '', |
|
89 | + 'DB_CHARSET' => 'utf8', |
|
90 | + 'DB_COLLATION' => '', |
|
91 | + 'DB_PREFIX' => 'x' . substr(md5(time()), 0, 3))); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | ob_start(); |
@@ -31,12 +31,12 @@ discard block |
||
31 | 31 | $pageHasForm = true; |
32 | 32 | $pageHasHelp = true; |
33 | 33 | |
34 | -$vars =& $_SESSION['settings']; |
|
34 | +$vars = & $_SESSION['settings']; |
|
35 | 35 | |
36 | 36 | $hostConnectPrefix = empty($vars['DB_PCONNECT']) ? '' : 'p:'; |
37 | 37 | $link = mysqli_connect($hostConnectPrefix.$vars['DB_HOST'], $vars['DB_USER'], $vars['DB_PASS']); |
38 | 38 | if (0 !== $link->connect_errno) { |
39 | - $error = ERR_NO_DBCONNECTION .' (' . $link->connect_errno . ') ' . $link->connect_error; |
|
39 | + $error = ERR_NO_DBCONNECTION.' ('.$link->connect_errno.') '.$link->connect_error; |
|
40 | 40 | $wizard->redirectToPage('-1', $error); |
41 | 41 | exit(); |
42 | 42 | } |
@@ -61,18 +61,18 @@ discard block |
||
61 | 61 | if (empty($error)) { |
62 | 62 | if (!@mysqli_select_db($link, $dbName)) { |
63 | 63 | // Database not here: try to create it |
64 | - $result = mysqli_query($link, 'CREATE DATABASE `' . $dbName . '`'); |
|
64 | + $result = mysqli_query($link, 'CREATE DATABASE `'.$dbName.'`'); |
|
65 | 65 | if (!$result) { |
66 | 66 | $error = ERR_NO_DATABASE; |
67 | 67 | $db_exist = false; |
68 | 68 | } |
69 | 69 | } |
70 | 70 | if ($db_exist && $vars['DB_CHARSET']) { |
71 | - $sql = 'ALTER DATABASE `' . $dbName . '` DEFAULT CHARACTER SET ' |
|
71 | + $sql = 'ALTER DATABASE `'.$dbName.'` DEFAULT CHARACTER SET ' |
|
72 | 72 | . mysqli_real_escape_string($link, $vars['DB_CHARSET']) |
73 | - . ($vars['DB_COLLATION'] ? ' COLLATE ' . mysqli_real_escape_string($link, $vars['DB_COLLATION']) : ''); |
|
73 | + . ($vars['DB_COLLATION'] ? ' COLLATE '.mysqli_real_escape_string($link, $vars['DB_COLLATION']) : ''); |
|
74 | 74 | if (!mysqli_query($link, $sql)) { |
75 | - $error = ERR_CHARSET_NOT_SET . $sql; |
|
75 | + $error = ERR_CHARSET_NOT_SET.$sql; |
|
76 | 76 | } |
77 | 77 | } |
78 | 78 | } |
@@ -88,13 +88,13 @@ discard block |
||
88 | 88 | 'DB_NAME' => '', |
89 | 89 | 'DB_CHARSET' => 'utf8', |
90 | 90 | 'DB_COLLATION' => '', |
91 | - 'DB_PREFIX' => 'x' . substr(md5(time()), 0, 3))); |
|
91 | + 'DB_PREFIX' => 'x'.substr(md5(time()), 0, 3))); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | ob_start(); |
95 | 95 | ?> |
96 | 96 | <?php if (!empty($error)) { |
97 | - echo '<div class="alert alert-danger"><span class="fa fa-ban text-danger"></span> ' . htmlspecialchars($error) . "</div>\n"; |
|
97 | + echo '<div class="alert alert-danger"><span class="fa fa-ban text-danger"></span> '.htmlspecialchars($error)."</div>\n"; |
|
98 | 98 | } ?> |
99 | 99 | |
100 | 100 | <script type="text/javascript"> |