@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | $xoopsOption['checkadmin'] = true; |
| 23 | 23 | $xoopsOption['hascommon'] = true; |
| 24 | 24 | |
| 25 | -require_once __DIR__ . '/include/common.inc.php'; |
|
| 25 | +require_once __DIR__.'/include/common.inc.php'; |
|
| 26 | 26 | |
| 27 | 27 | $xoops = Xoops::getInstance(); |
| 28 | 28 | |
@@ -32,8 +32,8 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | if ($_SERVER['REQUEST_METHOD'] === 'POST') { |
| 34 | 34 | $xoops->loadLocale('system'); |
| 35 | - include_once XOOPS_ROOT_PATH . "/modules/system/class/module.php"; |
|
| 36 | - include_once XOOPS_ROOT_PATH . "/modules/system/class/system.php"; |
|
| 35 | + include_once XOOPS_ROOT_PATH."/modules/system/class/module.php"; |
|
| 36 | + include_once XOOPS_ROOT_PATH."/modules/system/class/system.php"; |
|
| 37 | 37 | |
| 38 | 38 | $system = System::getInstance(); |
| 39 | 39 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | $pageHasForm = false; |
| 50 | 50 | |
| 51 | 51 | if (count($msgs) > 0) { |
| 52 | - $content = "<div class='x2-note successMsg'>" . INSTALLED_EXTENSION . "</div><ul class='log'>"; |
|
| 52 | + $content = "<div class='x2-note successMsg'>".INSTALLED_EXTENSION."</div><ul class='log'>"; |
|
| 53 | 53 | foreach ($msgs as $msg) { |
| 54 | 54 | if ($msg instanceof XoopsModule) { |
| 55 | 55 | $tempvar = $msg->modinfo['name']; |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | } |
| 59 | 59 | $content .= "</ul>"; |
| 60 | 60 | } else { |
| 61 | - $content = "<div class='x2-note confirmMsg'>" . NO_INSTALLED_EXTENSION . "</div>"; |
|
| 61 | + $content = "<div class='x2-note confirmMsg'>".NO_INSTALLED_EXTENSION."</div>"; |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | //Reset module lists in cache folder |
@@ -69,9 +69,9 @@ discard block |
||
| 69 | 69 | $xoops->setConfig('locale', $_COOKIE['xo_install_lang']); |
| 70 | 70 | } |
| 71 | 71 | $xoops->loadLocale('system'); |
| 72 | - include_once XOOPS_ROOT_PATH . "/modules/system/class/module.php"; |
|
| 73 | - include_once XOOPS_ROOT_PATH . "/modules/system/class/extension.php"; |
|
| 74 | - include_once XOOPS_ROOT_PATH . "/modules/system/class/system.php"; |
|
| 72 | + include_once XOOPS_ROOT_PATH."/modules/system/class/module.php"; |
|
| 73 | + include_once XOOPS_ROOT_PATH."/modules/system/class/extension.php"; |
|
| 74 | + include_once XOOPS_ROOT_PATH."/modules/system/class/system.php"; |
|
| 75 | 75 | |
| 76 | 76 | $system = System::getInstance(); |
| 77 | 77 | |
@@ -96,15 +96,15 @@ discard block |
||
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | $form = new Xoops\Form\ThemeForm('', 'modules', 'index.php', 'post'); |
| 99 | - $moduleYN = new Xoops\Form\RadioYesNo('', 'modules[' . $ext->getInfo('dirname') . ']', $value, XoopsLocale::YES, XoopsLocale::NO); |
|
| 100 | - $moduleYN->setExtra("onclick='selectModule(\"" . $ext->getInfo('dirname') . "\", this)'"); |
|
| 99 | + $moduleYN = new Xoops\Form\RadioYesNo('', 'modules['.$ext->getInfo('dirname').']', $value, XoopsLocale::YES, XoopsLocale::NO); |
|
| 100 | + $moduleYN->setExtra("onclick='selectModule(\"".$ext->getInfo('dirname')."\", this)'"); |
|
| 101 | 101 | $form->addElement($moduleYN); |
| 102 | 102 | |
| 103 | - $content .= "<tr id='" . $ext->getInfo('dirname') . "'" . $style . ">\n"; |
|
| 104 | - $content .= " <td class='img' ><img src='" . XOOPS_URL . "/modules/" . $ext->getInfo('dirname') . "/" . $ext->getInfo('image') . "' alt='" . $ext->getInfo('name') . "'/></td>\n"; |
|
| 103 | + $content .= "<tr id='".$ext->getInfo('dirname')."'".$style.">\n"; |
|
| 104 | + $content .= " <td class='img' ><img src='".XOOPS_URL."/modules/".$ext->getInfo('dirname')."/".$ext->getInfo('image')."' alt='".$ext->getInfo('name')."'/></td>\n"; |
|
| 105 | 105 | $content .= " <td>"; |
| 106 | - $content .= " " . $ext->getInfo('name') . " " . number_format(round($ext->getInfo('version'), 2), 2) . " (" . $ext->getInfo('dirname') . ")"; |
|
| 107 | - $content .= " <br />" . $ext->getInfo('description'); |
|
| 106 | + $content .= " ".$ext->getInfo('name')." ".number_format(round($ext->getInfo('version'), 2), 2)." (".$ext->getInfo('dirname').")"; |
|
| 107 | + $content .= " <br />".$ext->getInfo('description'); |
|
| 108 | 108 | $content .= " </td>\n"; |
| 109 | 109 | $content .= " <td class='yesno'>"; |
| 110 | 110 | $content .= $moduleYN->render(); |
@@ -112,13 +112,13 @@ discard block |
||
| 112 | 112 | ++$toinstal; |
| 113 | 113 | } |
| 114 | 114 | $content .= "</table>"; |
| 115 | - $content .= "</li></ul><script type='text/javascript'>" . $javascript . "</script>"; |
|
| 115 | + $content .= "</li></ul><script type='text/javascript'>".$javascript."</script>"; |
|
| 116 | 116 | if ($toinstal == 0) { |
| 117 | 117 | $pageHasForm = false; |
| 118 | - $content = "<div class='x2-note confirmMsg'>" . NO_EXTENSION_FOUND . "</div>"; |
|
| 118 | + $content = "<div class='x2-note confirmMsg'>".NO_EXTENSION_FOUND."</div>"; |
|
| 119 | 119 | } |
| 120 | 120 | } |
| 121 | 121 | $_SESSION['pageHasHelp'] = false; |
| 122 | 122 | $_SESSION['pageHasForm'] = $pageHasForm; |
| 123 | 123 | $_SESSION['content'] = $content; |
| 124 | -include XOOPS_INSTALL_PATH . '/include/install_tpl.php'; |
|
| 124 | +include XOOPS_INSTALL_PATH.'/include/install_tpl.php'; |
|
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | * @version $Id$ |
| 25 | 25 | */ |
| 26 | 26 | |
| 27 | -require_once __DIR__ . '/include/common.inc.php'; |
|
| 27 | +require_once __DIR__.'/include/common.inc.php'; |
|
| 28 | 28 | |
| 29 | 29 | /* @var $wizard XoopsInstallWizard */ |
| 30 | 30 | $wizard = $_SESSION['wizard']; |
@@ -45,15 +45,15 @@ discard block |
||
| 45 | 45 | ); |
| 46 | 46 | $rewrite = array_merge($rewrite, $settings); |
| 47 | 47 | |
| 48 | -if (!@copy($settings['ROOT_PATH'] . '/mainfile.dist.php', $settings['ROOT_PATH'] . '/mainfile.php')) { |
|
| 48 | +if (!@copy($settings['ROOT_PATH'].'/mainfile.dist.php', $settings['ROOT_PATH'].'/mainfile.php')) { |
|
| 49 | 49 | $error = ERR_COPY_MAINFILE; |
| 50 | 50 | } else { |
| 51 | 51 | clearstatcache(); |
| 52 | 52 | |
| 53 | - if (!$file = fopen($settings['ROOT_PATH'] . '/mainfile.php', "r")) { |
|
| 53 | + if (!$file = fopen($settings['ROOT_PATH'].'/mainfile.php', "r")) { |
|
| 54 | 54 | $error = ERR_READ_MAINFILE; |
| 55 | 55 | } else { |
| 56 | - $content = fread($file, filesize($settings['ROOT_PATH'] . '/mainfile.php')); |
|
| 56 | + $content = fread($file, filesize($settings['ROOT_PATH'].'/mainfile.php')); |
|
| 57 | 57 | fclose($file); |
| 58 | 58 | |
| 59 | 59 | foreach ($rewrite as $key => $val) { |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | } |
| 73 | 73 | } |
| 74 | 74 | } |
| 75 | - if (!$file = fopen($settings['ROOT_PATH'] . '/mainfile.php', "w")) { |
|
| 75 | + if (!$file = fopen($settings['ROOT_PATH'].'/mainfile.php', "w")) { |
|
| 76 | 76 | $error = ERR_WRITE_MAINFILE; |
| 77 | 77 | } else { |
| 78 | 78 | if (fwrite($file, $content) == -1) { |
@@ -83,15 +83,15 @@ discard block |
||
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | -if (!@copy($rewrite['VAR_PATH'] . '/data/secure.dist.php', $rewrite['VAR_PATH'] . '/data/secure.php')) { |
|
| 87 | - $error = ERR_COPY_SECURE . $rewrite['VAR_PATH'] . '/data/secure.dist.php'; |
|
| 86 | +if (!@copy($rewrite['VAR_PATH'].'/data/secure.dist.php', $rewrite['VAR_PATH'].'/data/secure.php')) { |
|
| 87 | + $error = ERR_COPY_SECURE.$rewrite['VAR_PATH'].'/data/secure.dist.php'; |
|
| 88 | 88 | } else { |
| 89 | 89 | clearstatcache(); |
| 90 | 90 | |
| 91 | - if (!$file = fopen($rewrite['VAR_PATH'] . '/data/secure.php', "r")) { |
|
| 91 | + if (!$file = fopen($rewrite['VAR_PATH'].'/data/secure.php', "r")) { |
|
| 92 | 92 | $error = ERR_READ_SECURE; |
| 93 | 93 | } else { |
| 94 | - $content = fread($file, filesize($rewrite['VAR_PATH'] . '/data/secure.php')); |
|
| 94 | + $content = fread($file, filesize($rewrite['VAR_PATH'].'/data/secure.php')); |
|
| 95 | 95 | fclose($file); |
| 96 | 96 | |
| 97 | 97 | foreach ($rewrite as $key => $val) { |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | } |
| 108 | 108 | } |
| 109 | 109 | } |
| 110 | - if (!$file = fopen($rewrite['VAR_PATH'] . '/data/secure.php', "w")) { |
|
| 110 | + if (!$file = fopen($rewrite['VAR_PATH'].'/data/secure.php', "w")) { |
|
| 111 | 111 | $error = ERR_WRITE_SECURE; |
| 112 | 112 | } else { |
| 113 | 113 | if (fwrite($file, $content) == -1) { |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | if ($k === 'authorized') { |
| 150 | 150 | continue; |
| 151 | 151 | } |
| 152 | - echo "<li><strong>XOOPS_{$k}</strong> " . IS_VALOR . " {$v}</li>"; |
|
| 152 | + echo "<li><strong>XOOPS_{$k}</strong> ".IS_VALOR." {$v}</li>"; |
|
| 153 | 153 | } |
| 154 | 154 | ?> |
| 155 | 155 | </ul> |
@@ -157,11 +157,11 @@ discard block |
||
| 157 | 157 | $content = ob_get_contents(); |
| 158 | 158 | ob_end_clean(); |
| 159 | 159 | } else { |
| 160 | - $content = '<div class="errorMsg">' . $error . '</div>'; |
|
| 160 | + $content = '<div class="errorMsg">'.$error.'</div>'; |
|
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | $_SESSION['pageHasHelp'] = false; |
| 164 | 164 | $_SESSION['pageHasForm'] = false; |
| 165 | 165 | $_SESSION['content'] = $content; |
| 166 | 166 | $_SESSION['settings'] = $settings; |
| 167 | -include XOOPS_INSTALL_PATH . '/include/install_tpl.php'; |
|
| 167 | +include XOOPS_INSTALL_PATH.'/include/install_tpl.php'; |
|
@@ -24,20 +24,20 @@ discard block |
||
| 24 | 24 | * @version $Id$ |
| 25 | 25 | */ |
| 26 | 26 | |
| 27 | -require_once __DIR__ . '/include/common.inc.php'; |
|
| 27 | +require_once __DIR__.'/include/common.inc.php'; |
|
| 28 | 28 | |
| 29 | -include_once XOOPS_INSTALL_PATH . '/class/pathcontroller.php'; |
|
| 29 | +include_once XOOPS_INSTALL_PATH.'/class/pathcontroller.php'; |
|
| 30 | 30 | |
| 31 | 31 | $ctrl = new XoopsPathController($wizard->configs['xoopsPathDefault'], $wizard->configs['dataPath']); |
| 32 | 32 | |
| 33 | 33 | if ($_SERVER['REQUEST_METHOD'] === 'GET' && @$_GET['var'] && @$_GET['action'] === 'checkpath') { |
| 34 | 34 | $path = $_GET['var']; |
| 35 | - $ctrl->xoopsPath[$path] = htmlspecialchars( trim($_GET['path']) ); |
|
| 36 | - echo genPathCheckHtml( $path, $ctrl->checkPath($path) ); |
|
| 35 | + $ctrl->xoopsPath[$path] = htmlspecialchars(trim($_GET['path'])); |
|
| 36 | + echo genPathCheckHtml($path, $ctrl->checkPath($path)); |
|
| 37 | 37 | exit(); |
| 38 | 38 | } |
| 39 | 39 | $ctrl->execute(); |
| 40 | -if ( $_SERVER['REQUEST_METHOD'] === 'POST' ) { |
|
| 40 | +if ($_SERVER['REQUEST_METHOD'] === 'POST') { |
|
| 41 | 41 | return; |
| 42 | 42 | } |
| 43 | 43 | ob_start(); |
@@ -64,17 +64,17 @@ discard block |
||
| 64 | 64 | <label class="xolabel" for="root"><?php echo XOOPS_ROOT_PATH_LABEL; ?></label> |
| 65 | 65 | <div class="xoform-help"><?php echo XOOPS_ROOT_PATH_HELP; ?></div> |
| 66 | 66 | <input type="text" name="root" id="root" value="<?php echo $ctrl->xoopsPath['root']; ?>" onchange="updPath('root', this.value)" /> |
| 67 | - <span id="rootpathimg"><?php echo genPathCheckHtml( 'root', $ctrl->validPath['root'] ); ?></span> |
|
| 67 | + <span id="rootpathimg"><?php echo genPathCheckHtml('root', $ctrl->validPath['root']); ?></span> |
|
| 68 | 68 | <?php |
| 69 | - if ($ctrl->validPath['root'] && !empty( $ctrl->permErrors['root'])) { |
|
| 69 | + if ($ctrl->validPath['root'] && !empty($ctrl->permErrors['root'])) { |
|
| 70 | 70 | echo '<div id="rootperms" class="x2-note">'; |
| 71 | - echo CHECKING_PERMISSIONS . '<br /><p>' . ERR_NEED_WRITE_ACCESS . '</p>'; |
|
| 71 | + echo CHECKING_PERMISSIONS.'<br /><p>'.ERR_NEED_WRITE_ACCESS.'</p>'; |
|
| 72 | 72 | echo '<ul class="diags">'; |
| 73 | 73 | foreach ($ctrl->permErrors['root'] as $path => $result) { |
| 74 | 74 | if ($result) { |
| 75 | - echo '<li class="success">' . sprintf(IS_WRITABLE, $path) . '</li>'; |
|
| 75 | + echo '<li class="success">'.sprintf(IS_WRITABLE, $path).'</li>'; |
|
| 76 | 76 | } else { |
| 77 | - echo '<li class="failure">' . sprintf(IS_NOT_WRITABLE, $path) . '</li>'; |
|
| 77 | + echo '<li class="failure">'.sprintf(IS_NOT_WRITABLE, $path).'</li>'; |
|
| 78 | 78 | } |
| 79 | 79 | } |
| 80 | 80 | echo '</ul>'; |
@@ -87,17 +87,17 @@ discard block |
||
| 87 | 87 | <label class="xolabel" for="data"><?php echo XOOPS_DATA_PATH_LABEL; ?></label> |
| 88 | 88 | <div class="xoform-help"><?php echo XOOPS_DATA_PATH_HELP; ?></div> |
| 89 | 89 | <input type="text" name="data" id="data" value="<?php echo $ctrl->xoopsPath['data']; ?>" onchange="updPath('data', this.value)" /> |
| 90 | - <span id="datapathimg"><?php echo genPathCheckHtml('data', $ctrl->validPath['data'] ); ?></span> |
|
| 90 | + <span id="datapathimg"><?php echo genPathCheckHtml('data', $ctrl->validPath['data']); ?></span> |
|
| 91 | 91 | <?php |
| 92 | - if ($ctrl->validPath['data'] && !empty( $ctrl->permErrors['data'])) { |
|
| 92 | + if ($ctrl->validPath['data'] && !empty($ctrl->permErrors['data'])) { |
|
| 93 | 93 | echo '<div id="dataperms" class="x2-note">'; |
| 94 | - echo CHECKING_PERMISSIONS . '<br /><p>' . ERR_NEED_WRITE_ACCESS . '</p>'; |
|
| 94 | + echo CHECKING_PERMISSIONS.'<br /><p>'.ERR_NEED_WRITE_ACCESS.'</p>'; |
|
| 95 | 95 | echo '<ul class="diags">'; |
| 96 | 96 | foreach ($ctrl->permErrors['data'] as $path => $result) { |
| 97 | 97 | if ($result) { |
| 98 | - echo '<li class="success">' . sprintf(IS_WRITABLE, $path) . '</li>'; |
|
| 98 | + echo '<li class="success">'.sprintf(IS_WRITABLE, $path).'</li>'; |
|
| 99 | 99 | } else { |
| 100 | - echo '<li class="failure">' . sprintf(IS_NOT_WRITABLE, $path) . '</li>'; |
|
| 100 | + echo '<li class="failure">'.sprintf(IS_NOT_WRITABLE, $path).'</li>'; |
|
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | 103 | echo '</ul>'; |
@@ -127,4 +127,4 @@ discard block |
||
| 127 | 127 | $_SESSION['pageHasHelp'] = true; |
| 128 | 128 | $_SESSION['pageHasForm'] = true; |
| 129 | 129 | $_SESSION['content'] = $content; |
| 130 | -include XOOPS_INSTALL_PATH . '/include/install_tpl.php'; |
|
| 130 | +include XOOPS_INSTALL_PATH.'/include/install_tpl.php'; |
|
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | $xoopsOption['checkadmin'] = true; |
| 29 | 29 | $xoopsOption['hascommon'] = true; |
| 30 | 30 | |
| 31 | -require_once __DIR__ . '/include/common.inc.php'; |
|
| 31 | +require_once __DIR__.'/include/common.inc.php'; |
|
| 32 | 32 | |
| 33 | 33 | $xoops = Xoops::getInstance(); |
| 34 | 34 | |
@@ -63,10 +63,10 @@ discard block |
||
| 63 | 63 | $criteria->setSort('conf_catid ASC, conf_order'); |
| 64 | 64 | $configs = $config_handler->getConfigs($criteria); |
| 65 | 65 | |
| 66 | -include XOOPS_INSTALL_PATH . '/include/createconfigform.php'; |
|
| 66 | +include XOOPS_INSTALL_PATH.'/include/createconfigform.php'; |
|
| 67 | 67 | $wizard->form = createConfigform($configs); |
| 68 | 68 | |
| 69 | 69 | $_SESSION['pageHasHelp'] = true; |
| 70 | 70 | $_SESSION['pageHasForm'] = true; |
| 71 | 71 | $_SESSION['content'] = $wizard->CreateForm(); |
| 72 | -include XOOPS_INSTALL_PATH . '/include/install_tpl.php'; |
|
| 72 | +include XOOPS_INSTALL_PATH.'/include/install_tpl.php'; |
|
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | * @version $Id$ |
| 25 | 25 | **/ |
| 26 | 26 | |
| 27 | -require_once __DIR__ . '/include/common.inc.php'; |
|
| 27 | +require_once __DIR__.'/include/common.inc.php'; |
|
| 28 | 28 | |
| 29 | 29 | /* @var $wizard XoopsInstallWizard */ |
| 30 | 30 | $wizard = $_SESSION['wizard']; |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | <tr> |
| 65 | 65 | <th><?php printf(PHP_EXTENSION, 'PDO'); ?></th> |
| 66 | - <td><?php echo xoDiag(extension_loaded('PDO') ? 1 : -1, 'PDO::getAvailableDrivers() = ' . @implode(', ', PDO::getAvailableDrivers())); ?></td> |
|
| 66 | + <td><?php echo xoDiag(extension_loaded('PDO') ? 1 : -1, 'PDO::getAvailableDrivers() = '.@implode(', ', PDO::getAvailableDrivers())); ?></td> |
|
| 67 | 67 | </tr> |
| 68 | 68 | |
| 69 | 69 | <tr> |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | <tbody> |
| 100 | 100 | <?php |
| 101 | 101 | foreach ($wizard->configs['extensions'] as $key => $value) { |
| 102 | - echo "<tr><th>" . $value[1] . "</th><td>" . $value[2] . "</td></tr>"; |
|
| 102 | + echo "<tr><th>".$value[1]."</th><td>".$value[2]."</td></tr>"; |
|
| 103 | 103 | } |
| 104 | 104 | ?> |
| 105 | 105 | |
@@ -112,4 +112,4 @@ discard block |
||
| 112 | 112 | $_SESSION['pageHasHelp'] = false; |
| 113 | 113 | $_SESSION['pageHasForm'] = false; |
| 114 | 114 | $_SESSION['content'] = $content; |
| 115 | -include XOOPS_INSTALL_PATH . '/include/install_tpl.php'; |
|
| 115 | +include XOOPS_INSTALL_PATH.'/include/install_tpl.php'; |
|
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | * @version $Id$ |
| 25 | 25 | */ |
| 26 | 26 | |
| 27 | -require_once __DIR__ . '/include/common.inc.php'; |
|
| 27 | +require_once __DIR__.'/include/common.inc.php'; |
|
| 28 | 28 | |
| 29 | 29 | /* @var $wizard XoopsInstallWizard */ |
| 30 | 30 | $wizard = $_SESSION['wizard']; |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | $settings, |
| 58 | 58 | array( |
| 59 | 59 | 'DB_DRIVER' => 'pdo_mysql', |
| 60 | - 'DB_PREFIX' => 'x' . substr(md5(time()), 0, 3), |
|
| 60 | + 'DB_PREFIX' => 'x'.substr(md5(time()), 0, 3), |
|
| 61 | 61 | ) |
| 62 | 62 | ); |
| 63 | 63 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | ?> |
| 66 | 66 | <?php |
| 67 | 67 | if (!empty($error)) { |
| 68 | - echo '<div class="x2-note errorMsg">' . $error . "</div>\n"; |
|
| 68 | + echo '<div class="x2-note errorMsg">'.$error."</div>\n"; |
|
| 69 | 69 | } |
| 70 | 70 | ?> |
| 71 | 71 | <fieldset> |
@@ -93,4 +93,4 @@ discard block |
||
| 93 | 93 | $_SESSION['pageHasForm'] = true; |
| 94 | 94 | $_SESSION['content'] = $content; |
| 95 | 95 | $_SESSION['settings'] = $settings; |
| 96 | -include XOOPS_INSTALL_PATH . '/include/install_tpl.php'; |
|
| 96 | +include XOOPS_INSTALL_PATH.'/include/install_tpl.php'; |
|
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | * @version $Id$ |
| 25 | 25 | */ |
| 26 | 26 | |
| 27 | -require_once __DIR__ . '/include/common.inc.php'; |
|
| 27 | +require_once __DIR__.'/include/common.inc.php'; |
|
| 28 | 28 | |
| 29 | 29 | /* @var $wizard XoopsInstallWizard */ |
| 30 | 30 | $wizard = $_SESSION['wizard']; |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $_SESSION['settings'] = $settings; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | -$platform=false; |
|
| 43 | +$platform = false; |
|
| 44 | 44 | $error = ''; |
| 45 | 45 | $availableDatabases = array(); |
| 46 | 46 | |
@@ -50,11 +50,11 @@ discard block |
||
| 50 | 50 | // if we specified the dbname and failed, try again without it |
| 51 | 51 | // we will try and create it later |
| 52 | 52 | if (!$connection && !empty($settings['DB_NAME'])) { |
| 53 | - $hold_name=$settings['DB_NAME']; |
|
| 53 | + $hold_name = $settings['DB_NAME']; |
|
| 54 | 54 | unset($settings['DB_NAME']); |
| 55 | 55 | $_SESSION['settings'] = $settings; |
| 56 | 56 | $hold_error = $error; |
| 57 | - $error=''; |
|
| 57 | + $error = ''; |
|
| 58 | 58 | $connection = getDbConnection($error); |
| 59 | 59 | $settings['DB_NAME'] = $hold_name; |
| 60 | 60 | $_SESSION['settings'] = $settings; |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | } |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | -if (is_array($availableDatabases) && count($availableDatabases)==1) { |
|
| 132 | +if (is_array($availableDatabases) && count($availableDatabases) == 1) { |
|
| 133 | 133 | if (empty($settings['DB_NAME'])) { |
| 134 | 134 | $settings['DB_NAME'] = $availableDatabases[0]; |
| 135 | 135 | } |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | ?> |
| 142 | 142 | <?php |
| 143 | 143 | if (!empty($error)) { |
| 144 | - echo '<div class="x2-note errorMsg">' . $error . "</div>\n"; |
|
| 144 | + echo '<div class="x2-note errorMsg">'.$error."</div>\n"; |
|
| 145 | 145 | } |
| 146 | 146 | ?> |
| 147 | 147 | <script type="text/javascript"> |
@@ -155,8 +155,8 @@ discard block |
||
| 155 | 155 | <fieldset> |
| 156 | 156 | <?php |
| 157 | 157 | if (!empty($availableDatabases)) { |
| 158 | - echo '<legend>' . LEGEND_DATABASE . '</legend>'; |
|
| 159 | - echo '<div class="xoform-help">' . DB_AVAILABLE_HELP . '</div>'; |
|
| 158 | + echo '<legend>'.LEGEND_DATABASE.'</legend>'; |
|
| 159 | + echo '<div class="xoform-help">'.DB_AVAILABLE_HELP.'</div>'; |
|
| 160 | 160 | echo '<label class="xolabel" for="DB_DATABASE_LABEL" class="center">'; |
| 161 | 161 | echo DB_AVAILABLE_LABEL; |
| 162 | 162 | echo ' <select size="1" name="DB_AVAILABLE" id="DB_AVAILABLE" onchange="updateDbName();">'; |
@@ -182,4 +182,4 @@ discard block |
||
| 182 | 182 | $_SESSION['pageHasForm'] = true; |
| 183 | 183 | $_SESSION['content'] = $content; |
| 184 | 184 | $_SESSION['settings'] = $settings; |
| 185 | -include XOOPS_INSTALL_PATH . '/include/install_tpl.php'; |
|
| 185 | +include XOOPS_INSTALL_PATH.'/include/install_tpl.php'; |
|
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | * @author DuGris (aka L. JEN) <[email protected]> |
| 24 | 24 | */ |
| 25 | 25 | |
| 26 | -require_once __DIR__ . '/include/common.inc.php'; |
|
| 26 | +require_once __DIR__.'/include/common.inc.php'; |
|
| 27 | 27 | |
| 28 | 28 | |
| 29 | 29 | $xoops = Xoops::getInstance(); |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $xoops->loadLocale(); |
| 42 | 42 | |
| 43 | 43 | $dbm = $xoops->db(); |
| 44 | -$count = $dbm->fetchColumn('SELECT COUNT(*) FROM ' . $dbm->prefix('system_user')); |
|
| 44 | +$count = $dbm->fetchColumn('SELECT COUNT(*) FROM '.$dbm->prefix('system_user')); |
|
| 45 | 45 | $process = $count ? false : true; |
| 46 | 46 | $update = false; |
| 47 | 47 | |
@@ -59,40 +59,40 @@ discard block |
||
| 59 | 59 | 'system_user', |
| 60 | 60 | array( |
| 61 | 61 | //'uid' => 1, // mediumint(8) unsigned NOT NULL auto_increment, |
| 62 | - 'name' => '', // varchar(60) NOT NULL default '', |
|
| 63 | - 'uname' => $adminname, // varchar(25) NOT NULL default '', |
|
| 64 | - 'email' => $adminmail, // varchar(60) NOT NULL default '', |
|
| 65 | - 'url' => XOOPS_URL, // varchar(100) NOT NULL default '', |
|
| 66 | - 'user_avatar' => 'blank.gif', // varchar(30) NOT NULL default 'blank.gif', |
|
| 67 | - 'user_regdate' => $regdate, // int(10) unsigned NOT NULL default '0', |
|
| 68 | - 'user_icq' => '', // varchar(15) NOT NULL default '', |
|
| 69 | - 'user_from' => '', // varchar(100) NOT NULL default '', |
|
| 70 | - 'user_sig' => '', // tinytext, |
|
| 71 | - 'user_viewemail' => 1, // tinyint(1) unsigned NOT NULL default '0', |
|
| 72 | - 'actkey' => '', // varchar(8) NOT NULL default '', |
|
| 73 | - 'user_aim' => '', // varchar(18) NOT NULL default '', |
|
| 74 | - 'user_yim' => '', // varchar(25) NOT NULL default '', |
|
| 75 | - 'user_msnm' => '', // varchar(100) NOT NULL default '', |
|
| 76 | - 'pass' => $temp, // varchar(255) NOT NULL default '', |
|
| 77 | - 'posts' => 0, // mediumint(8) unsigned NOT NULL default '0', |
|
| 78 | - 'attachsig' => 0, // tinyint(1) unsigned NOT NULL default '0', |
|
| 79 | - 'rank' => 7, // smallint(5) unsigned NOT NULL default '0', |
|
| 80 | - 'level' => 5, // tinyint(3) unsigned NOT NULL default '1', |
|
| 81 | - 'theme' => 'default', // varchar(100) NOT NULL default '', |
|
| 82 | - 'timezone' => 'UTC', // varchar(32) NOT NULL default 'UTC', |
|
| 83 | - 'last_login' => $regdate, // int(10) unsigned NOT NULL default '0', |
|
| 84 | - 'last_pass_change'=> $regdate, // int(10) unsigned NOT NULL default '0', |
|
| 85 | - 'umode' => 'flat', // varchar(10) NOT NULL default '', |
|
| 86 | - 'uorder' => 0, // tinyint(1) unsigned NOT NULL default '0', |
|
| 87 | - 'notify_method' => 1, // tinyint(1) NOT NULL default '1', |
|
| 88 | - 'notify_mode' => 0, // tinyint(1) NOT NULL default '0', |
|
| 89 | - 'user_occ' => '', // varchar(100) NOT NULL default '', |
|
| 90 | - 'bio' => '', // tinytext, |
|
| 91 | - 'user_intrest' => '', // varchar(150) NOT NULL default '', |
|
| 92 | - 'user_mailok' => 0, // tinyint(1) unsigned NOT NULL default '1', |
|
| 62 | + 'name' => '', // varchar(60) NOT NULL default '', |
|
| 63 | + 'uname' => $adminname, // varchar(25) NOT NULL default '', |
|
| 64 | + 'email' => $adminmail, // varchar(60) NOT NULL default '', |
|
| 65 | + 'url' => XOOPS_URL, // varchar(100) NOT NULL default '', |
|
| 66 | + 'user_avatar' => 'blank.gif', // varchar(30) NOT NULL default 'blank.gif', |
|
| 67 | + 'user_regdate' => $regdate, // int(10) unsigned NOT NULL default '0', |
|
| 68 | + 'user_icq' => '', // varchar(15) NOT NULL default '', |
|
| 69 | + 'user_from' => '', // varchar(100) NOT NULL default '', |
|
| 70 | + 'user_sig' => '', // tinytext, |
|
| 71 | + 'user_viewemail' => 1, // tinyint(1) unsigned NOT NULL default '0', |
|
| 72 | + 'actkey' => '', // varchar(8) NOT NULL default '', |
|
| 73 | + 'user_aim' => '', // varchar(18) NOT NULL default '', |
|
| 74 | + 'user_yim' => '', // varchar(25) NOT NULL default '', |
|
| 75 | + 'user_msnm' => '', // varchar(100) NOT NULL default '', |
|
| 76 | + 'pass' => $temp, // varchar(255) NOT NULL default '', |
|
| 77 | + 'posts' => 0, // mediumint(8) unsigned NOT NULL default '0', |
|
| 78 | + 'attachsig' => 0, // tinyint(1) unsigned NOT NULL default '0', |
|
| 79 | + 'rank' => 7, // smallint(5) unsigned NOT NULL default '0', |
|
| 80 | + 'level' => 5, // tinyint(3) unsigned NOT NULL default '1', |
|
| 81 | + 'theme' => 'default', // varchar(100) NOT NULL default '', |
|
| 82 | + 'timezone' => 'UTC', // varchar(32) NOT NULL default 'UTC', |
|
| 83 | + 'last_login' => $regdate, // int(10) unsigned NOT NULL default '0', |
|
| 84 | + 'last_pass_change'=> $regdate, // int(10) unsigned NOT NULL default '0', |
|
| 85 | + 'umode' => 'flat', // varchar(10) NOT NULL default '', |
|
| 86 | + 'uorder' => 0, // tinyint(1) unsigned NOT NULL default '0', |
|
| 87 | + 'notify_method' => 1, // tinyint(1) NOT NULL default '1', |
|
| 88 | + 'notify_mode' => 0, // tinyint(1) NOT NULL default '0', |
|
| 89 | + 'user_occ' => '', // varchar(100) NOT NULL default '', |
|
| 90 | + 'bio' => '', // tinytext, |
|
| 91 | + 'user_intrest' => '', // varchar(150) NOT NULL default '', |
|
| 92 | + 'user_mailok' => 0, // tinyint(1) unsigned NOT NULL default '1', |
|
| 93 | 93 | ) |
| 94 | 94 | ); |
| 95 | - $content = '<div class="x2-note successMsg">' . DATA_INSERTED . '</div>'; |
|
| 95 | + $content = '<div class="x2-note successMsg">'.DATA_INSERTED.'</div>'; |
|
| 96 | 96 | } elseif ($update) { |
| 97 | 97 | $dbm->updatePrefix( |
| 98 | 98 | 'system_user', |
@@ -110,14 +110,14 @@ discard block |
||
| 110 | 110 | ); |
| 111 | 111 | $content = ''; |
| 112 | 112 | } else { |
| 113 | - $content = "<div class='x2-note confirmMsg'>" . DATA_ALREADY_INSERTED . "</div>"; |
|
| 113 | + $content = "<div class='x2-note confirmMsg'>".DATA_ALREADY_INSERTED."</div>"; |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | setcookie('xo_install_user', '', null, null, null); |
| 117 | -if (isset( $settings['authorized'] ) && !empty($adminname) && !empty($adminpass)) { |
|
| 117 | +if (isset($settings['authorized']) && !empty($adminname) && !empty($adminpass)) { |
|
| 118 | 118 | setcookie( |
| 119 | 119 | 'xo_install_user', |
| 120 | - addslashes($adminname) . '-' . md5($temp . XOOPS_DB_NAME . XOOPS_DB_PASS . XOOPS_DB_PREFIX), |
|
| 120 | + addslashes($adminname).'-'.md5($temp.XOOPS_DB_NAME.XOOPS_DB_PASS.XOOPS_DB_PREFIX), |
|
| 121 | 121 | null, |
| 122 | 122 | null, |
| 123 | 123 | null |
@@ -127,4 +127,4 @@ discard block |
||
| 127 | 127 | $_SESSION['pageHasHelp'] = false; |
| 128 | 128 | $_SESSION['pageHasForm'] = false; |
| 129 | 129 | $_SESSION['content'] = $content; |
| 130 | -include XOOPS_INSTALL_PATH . '/include/install_tpl.php'; |
|
| 130 | +include XOOPS_INSTALL_PATH.'/include/install_tpl.php'; |
|
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | /* @var $user XoopsUser */ |
| 45 | 45 | $users = $member_handler->getUsers(new Criteria('uname', $uname)); |
| 46 | 46 | $user = array_pop($users); |
| 47 | - if ($hash_login != md5($user->getVar('pass') . XOOPS_DB_NAME . XOOPS_DB_PASS . XOOPS_DB_PREFIX)) { |
|
| 47 | + if ($hash_login != md5($user->getVar('pass').XOOPS_DB_NAME.XOOPS_DB_PASS.XOOPS_DB_PREFIX)) { |
|
| 48 | 48 | return false; |
| 49 | 49 | } |
| 50 | 50 | $xoops->user = $user; |
@@ -61,11 +61,11 @@ discard block |
||
| 61 | 61 | function install_finalize($installer_modified) |
| 62 | 62 | { |
| 63 | 63 | // Set mainfile.php readonly |
| 64 | - @chmod(XOOPS_ROOT_PATH . "/mainfile.php", 0444); |
|
| 64 | + @chmod(XOOPS_ROOT_PATH."/mainfile.php", 0444); |
|
| 65 | 65 | // Set Secure file readonly |
| 66 | - @chmod(XOOPS_VAR_PATH . "/data/secure.php", 0444); |
|
| 66 | + @chmod(XOOPS_VAR_PATH."/data/secure.php", 0444); |
|
| 67 | 67 | // Rename installer folder |
| 68 | - @rename(XOOPS_ROOT_PATH . "/install", XOOPS_ROOT_PATH . "/" . $installer_modified); |
|
| 68 | + @rename(XOOPS_ROOT_PATH."/install", XOOPS_ROOT_PATH."/".$installer_modified); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | /** |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | $value = installHtmlSpecialCharacters($value); |
| 86 | 86 | echo "<label class='xolabel' for='$name'>$label</label>\n"; |
| 87 | 87 | if ($help) { |
| 88 | - echo '<div class="xoform-help">' . $help . "</div>\n"; |
|
| 88 | + echo '<div class="xoform-help">'.$help."</div>\n"; |
|
| 89 | 89 | } |
| 90 | 90 | if ($name === "adminname") { |
| 91 | 91 | echo "<input type='text' name='$name' id='$name' value='$value' maxlength='25' />"; |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | $value = installHtmlSpecialCharacters($value); |
| 112 | 112 | echo "<label class='xolabel' for='{$name}'>{$label}</label>\n"; |
| 113 | 113 | if ($help) { |
| 114 | - echo '<div class="xoform-help">' . $help . "</div>\n"; |
|
| 114 | + echo '<div class="xoform-help">'.$help."</div>\n"; |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | if ($name === "adminpass") { |
@@ -138,11 +138,11 @@ discard block |
||
| 138 | 138 | $value = installHtmlSpecialCharacters($value); |
| 139 | 139 | echo "<label class='xolabel' for='$name'>$label</label>\n"; |
| 140 | 140 | if ($help) { |
| 141 | - echo '<div class="xoform-help">' . $help . "</div>\n"; |
|
| 141 | + echo '<div class="xoform-help">'.$help."</div>\n"; |
|
| 142 | 142 | } |
| 143 | 143 | $checked = $value ? 'checked' : ''; |
| 144 | 144 | echo "<input type=\"checkbox\" name=\"{$name}\" value=\"1\" {$checked} />" |
| 145 | - . ENABLE . "<br />"; |
|
| 145 | + . ENABLE."<br />"; |
|
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | /* |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | $dirlist = array(); |
| 157 | 157 | if ($handle = opendir($dirname)) { |
| 158 | 158 | while ($file = readdir($handle)) { |
| 159 | - if ($file{0} !== '.' && is_dir($dirname . $file)) { |
|
| 159 | + if ($file{0} !== '.' && is_dir($dirname.$file)) { |
|
| 160 | 160 | $dirlist[] = $file; |
| 161 | 161 | } |
| 162 | 162 | } |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | if (empty($str)) { |
| 183 | 183 | $str = $strings[$status]; |
| 184 | 184 | } |
| 185 | - return '<span class="' . $classes[$status] . '">' . $str . '</span>'; |
|
| 185 | + return '<span class="'.$classes[$status].'">'.$str.'</span>'; |
|
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | /** |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | */ |
| 209 | 209 | function xoDiagIfWritable($path) |
| 210 | 210 | { |
| 211 | - $path = "../" . $path; |
|
| 211 | + $path = "../".$path; |
|
| 212 | 212 | $error = true; |
| 213 | 213 | if (!is_dir($path)) { |
| 214 | 214 | if (file_exists($path)) { |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | $msg = XOOPS_PATH_FOUND; |
| 254 | 254 | break; |
| 255 | 255 | } |
| 256 | - return '<span class="pathmessage"><img src="img/yes.png" alt="Success" />' . $msg . '</span>'; |
|
| 256 | + return '<span class="pathmessage"><img src="img/yes.png" alt="Success" />'.$msg.'</span>'; |
|
| 257 | 257 | } else { |
| 258 | 258 | switch ($path) { |
| 259 | 259 | case 'root': |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | $msg = ERR_COULD_NOT_ACCESS; |
| 267 | 267 | break; |
| 268 | 268 | } |
| 269 | - return '<span class="pathmessage"><img src="img/no.png" alt="Error" /> ' . $msg . '</span>'; |
|
| 269 | + return '<span class="pathmessage"><img src="img/no.png" alt="Error" /> '.$msg.'</span>'; |
|
| 270 | 270 | } |
| 271 | 271 | } |
| 272 | 272 | |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | |
| 284 | 284 | // get list of parameters the selected driver accepts |
| 285 | 285 | $driver_info = $wizard->configs['db_types'][$settings['DB_DRIVER']]; |
| 286 | - $driver_params=explode(',', $driver_info['params']); |
|
| 286 | + $driver_params = explode(',', $driver_info['params']); |
|
| 287 | 287 | |
| 288 | 288 | $connectionParams = array( |
| 289 | 289 | 'driver' => $settings['DB_DRIVER'], |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | ); |
| 292 | 292 | |
| 293 | 293 | // force mysql to use utf8mb4 |
| 294 | - if (false !== strstr($settings['DB_DRIVER'],'mysql')) { |
|
| 294 | + if (false !== strstr($settings['DB_DRIVER'], 'mysql')) { |
|
| 295 | 295 | $connectionParams['charset'] = 'utf8mb4'; |
| 296 | 296 | $connectionParams['collate'] = 'utf8mb4_unicode_ci'; |
| 297 | 297 | } |