Completed
Branch master (0b66f1)
by Michael
33:21
created
htdocs/install/page_tablesfill.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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';
Please login to merge, or discard this patch.
htdocs/install/include/functions.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
htdocs/install/include/install_tpl.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -89,15 +89,15 @@  discard block
 block discarded – undo
89 89
 
90 90
 <head>
91 91
     <title>
92
-        <?php echo XOOPS_VERSION . ' : ' . XOOPS_INSTALL_WIZARD; ?>
93
-        (<?php echo ($wizard->pageIndex + 1) . '/' . count($wizard->pages); ?>)
92
+        <?php echo XOOPS_VERSION.' : '.XOOPS_INSTALL_WIZARD; ?>
93
+        (<?php echo ($wizard->pageIndex + 1).'/'.count($wizard->pages); ?>)
94 94
     </title>
95 95
     <meta http-equiv="Content-Type" content="text/html; charset=<?php echo _INSTALL_CHARSET ?>"/>
96 96
     <link rel="shortcut icon" type="image/ico" href="../favicon.ico"/>
97 97
     <link charset="UTF-8" rel="stylesheet" type="text/css" media="all" href="css/style.css"/>
98 98
     <?php
99
-    if (file_exists('locale/' . $wizard->language . '/style.css')) {
100
-        echo '<link charset="UTF-8" rel="stylesheet" type="text/css" media="all" href="locale/' . $wizard->language . '/style.css" />';
99
+    if (file_exists('locale/'.$wizard->language.'/style.css')) {
100
+        echo '<link charset="UTF-8" rel="stylesheet" type="text/css" media="all" href="locale/'.$wizard->language.'/style.css" />';
101 101
     }
102 102
     ?>
103 103
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
     <form id='<?php echo $wizard->pages[$wizard->currentPage]['name']; ?>' action='<?php echo $_SERVER['PHP_SELF']; ?>'
127 127
           method='post'>
128 128
         <div id="xo-page-title">
129
-            <?php if (@$pageHasHelp) { echo "<img id=\"help_button\" src=\"./img/help.png\" alt=\"" . HELP_BUTTON_ALT . "\" title=\"" . HELP_BUTTON_ALT . "\" onclick=\"document.body.className = 'show-help';\" />"; }; ?>
129
+            <?php if (@$pageHasHelp) { echo "<img id=\"help_button\" src=\"./img/help.png\" alt=\"".HELP_BUTTON_ALT."\" title=\"".HELP_BUTTON_ALT."\" onclick=\"document.body.className = 'show-help';\" />"; }; ?>
130 130
             <span class="index"><?php echo $wizard->pageIndex + 1; ?></span>
131 131
             <span class="setup"><?php echo XOOPS_INSTALL_WIZARD; ?></span>
132 132
             <span class="title"><?php echo $wizard->pages[$wizard->currentPage]['title']; ?></span>
Please login to merge, or discard this patch.
htdocs/install/include/common.inc.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -40,26 +40,26 @@
 block discarded – undo
40 40
     $xoopsOption['nocommon'] = true;
41 41
     session_start();
42 42
 }
43
-$mainfile = dirname(dirname(__DIR__)) . '/mainfile.php';
43
+$mainfile = dirname(dirname(__DIR__)).'/mainfile.php';
44 44
 if (file_exists($mainfile)) {
45 45
     include $mainfile;
46 46
 }
47 47
 if (!defined("XOOPS_ROOT_PATH")) {
48 48
     define("XOOPS_ROOT_PATH", str_replace("\\", "/", realpath('../')));
49
-    define("XOOPS_PATH", isset($_SESSION['settings']['PATH']) ? $_SESSION['settings']['PATH']:"");
50
-    define("XOOPS_VAR_PATH", isset($_SESSION['settings']['VAR_PATH']) ? $_SESSION['settings']['VAR_PATH']:"");
51
-    define("XOOPS_URL", isset($_SESSION['settings']['URL']) ? $_SESSION['settings']['URL']:"");
49
+    define("XOOPS_PATH", isset($_SESSION['settings']['PATH']) ? $_SESSION['settings']['PATH'] : "");
50
+    define("XOOPS_VAR_PATH", isset($_SESSION['settings']['VAR_PATH']) ? $_SESSION['settings']['VAR_PATH'] : "");
51
+    define("XOOPS_URL", isset($_SESSION['settings']['URL']) ? $_SESSION['settings']['URL'] : "");
52 52
 }
53 53
 
54
-include XOOPS_INSTALL_PATH . '/class/installwizard.php';
55
-include_once XOOPS_ROOT_PATH . '/include/version.php';
56
-include_once XOOPS_INSTALL_PATH . '/include/functions.php';
54
+include XOOPS_INSTALL_PATH.'/class/installwizard.php';
55
+include_once XOOPS_ROOT_PATH.'/include/version.php';
56
+include_once XOOPS_INSTALL_PATH.'/include/functions.php';
57 57
 //include_once XOOPS_ROOT_PATH . '/class/xoopsload.php';
58 58
 if (!class_exists('XoopsBaseConfig', false)) {
59
-    include_once XOOPS_ROOT_PATH . '/class/XoopsBaseConfig.php';
59
+    include_once XOOPS_ROOT_PATH.'/class/XoopsBaseConfig.php';
60 60
     XoopsBaseConfig::bootstrapTransition();
61 61
 }
62
-include_once XOOPS_ROOT_PATH . '/include/defines.php';
62
+include_once XOOPS_ROOT_PATH.'/include/defines.php';
63 63
 $_SESSION['pageHasHelp'] = false;
64 64
 $_SESSION['pageHasForm'] = false;
65 65
 
Please login to merge, or discard this patch.
htdocs/install/include/config.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,11 +31,11 @@  discard block
 block discarded – undo
31 31
 $available_pdo_drivers = \PDO::getAvailableDrivers();
32 32
 $configs['db_types'] = array();
33 33
 if (in_array('mysql', $available_pdo_drivers)) {
34
-    $configs['db_types']['pdo_mysql']  = array(
34
+    $configs['db_types']['pdo_mysql'] = array(
35 35
         'desc' => 'PDO MySql Driver',
36 36
         'type' => 'mysql',
37 37
         'params' => 'dbname,host,user,password,port,unix_socket',
38
-        'ignoredb' => array('information_schema','test'),
38
+        'ignoredb' => array('information_schema', 'test'),
39 39
     );
40 40
 }
41 41
 if (in_array('sqlite', $available_pdo_drivers)) {
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         'desc' => 'Mysqli Driver (untested)',
100 100
         'type' => 'mysql',
101 101
         'params' => 'dbname,host,user,password,port,unix_socket',
102
-        'ignoredb' => array('information_schema','test'),
102
+        'ignoredb' => array('information_schema', 'test'),
103 103
     );
104 104
 }
105 105
 
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     'xml' => array('XML', sprintf(PHP_EXTENSION, XML_PARSING)),
142 142
     'zlib' => array('Zlib', sprintf(PHP_EXTENSION, ZLIB_COMPRESSION)),
143 143
     'gd' => array(
144
-        (function_exists('gd_info') && $gdlib = @gd_info()) ? 'GD ' . $gdlib['GD Version'] : '',
144
+        (function_exists('gd_info') && $gdlib = @gd_info()) ? 'GD '.$gdlib['GD Version'] : '',
145 145
         sprintf(PHP_EXTENSION, IMAGE_FUNCTIONS)
146 146
     ),
147 147
     'exif' => array('Exif', sprintf(PHP_EXTENSION, IMAGE_METAS)),
Please login to merge, or discard this patch.
htdocs/install/include/createconfigform.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
             case 'select':
66 66
                 $ele = new Xoops\Form\Select($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput());
67
-                $options =& $config_handler->getConfigOptions(new Criteria('conf_id', $config[$i]->getVar('conf_id')));
67
+                $options = & $config_handler->getConfigOptions(new Criteria('conf_id', $config[$i]->getVar('conf_id')));
68 68
                 $opcount = count($options);
69 69
                 for ($j = 0; $j < $opcount; ++$j) {
70 70
                     $optval = \Xoops\Locale::translate($options[$j]->getVar('confop_value'), 'system');
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
             case 'select_multi':
77 77
                 $ele = new Xoops\Form\Select($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), 5, true);
78
-                $options =& $config_handler->getConfigOptions(new Criteria('conf_id', $config[$i]->getVar('conf_id')));
78
+                $options = & $config_handler->getConfigOptions(new Criteria('conf_id', $config[$i]->getVar('conf_id')));
79 79
                 $opcount = count($options);
80 80
                 for ($j = 0; $j < $opcount; ++$j) {
81 81
                     $optval = \Xoops\Locale::translate($options[$j]->getVar('confop_value'), 'system');
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
                 $module_handler = $xoops->getHandlerModule();
128 128
                 $criteria = new CriteriaCompo(new Criteria('hasmain', 1));
129 129
                 $criteria->add(new Criteria('isactive', 1));
130
-                $moduleslist =& $module_handler->getNameList($criteria, true);
130
+                $moduleslist = & $module_handler->getNameList($criteria, true);
131 131
                 $moduleslist['--'] = XoopsLocale::NONE;
132 132
                 $ele->addOptionArray($moduleslist);
133 133
                 break;
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
                     $ele = new Xoops\Form\ElementTray($title, '<br />');
171 171
                     foreach (array_keys($modules) as $mid) {
172 172
                         $c_val = isset($currrent_val[$mid]) ? (int)($currrent_val[$mid]) : null;
173
-                        $selform = new Xoops\Form\Select($modules[$mid]->getVar('name'), $config[$i]->getVar('conf_name') . "[$mid]", $c_val);
173
+                        $selform = new Xoops\Form\Select($modules[$mid]->getVar('name'), $config[$i]->getVar('conf_name')."[$mid]", $c_val);
174 174
                         $selform->addOptionArray($cache_options);
175 175
                         $ele->addElement($selform);
176 176
                         unset($selform);
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
  */
237 237
 function createThemeform(XoopsConfigItem $config)
238 238
 {
239
-    $title = $config->getVar('conf_desc') == '' ? \Xoops\Locale::translate($config->getVar('conf_title'), 'system') : \Xoops\Locale::translate($config->getVar('conf_title'), 'system') . '<br /><br /><span>' . \Xoops\Locale::translate($config->getVar('conf_desc'), 'system') . '</span>';
239
+    $title = $config->getVar('conf_desc') == '' ? \Xoops\Locale::translate($config->getVar('conf_title'), 'system') : \Xoops\Locale::translate($config->getVar('conf_title'), 'system').'<br /><br /><span>'.\Xoops\Locale::translate($config->getVar('conf_desc'), 'system').'</span>';
240 240
     $form_theme_set = new Xoops\Form\Select('', $config->getVar('conf_name'), $config->getConfValueForOutput(), 1, false);
241 241
     $dirlist = XoopsLists::getThemesList();
242 242
     if (!empty($dirlist)) {
@@ -269,18 +269,18 @@  discard block
 block discarded – undo
269 269
         } else {
270 270
             $label_content .= "<div id='$theme' rel='theme' style='display:none;'>";
271 271
         }
272
-        if (file_exists(XOOPS_ROOT_PATH . "/themes/$theme/theme.ini")) {
273
-            $theme_ini = parse_ini_file(XOOPS_ROOT_PATH . "/themes/$theme/theme.ini");
272
+        if (file_exists(XOOPS_ROOT_PATH."/themes/$theme/theme.ini")) {
273
+            $theme_ini = parse_ini_file(XOOPS_ROOT_PATH."/themes/$theme/theme.ini");
274 274
             if ($theme_ini['screenshot'] == '') {
275 275
                 $theme_ini['screenshot'] = 'screenshot.png';
276 276
                 $theme_ini['thumbnail'] = 'thumbnail.png';
277 277
             }
278 278
         }
279 279
 
280
-        if ($theme_ini['screenshot'] != '' && file_exists(XOOPS_ROOT_PATH . "/themes/$theme/" . $theme_ini['screenshot'])) {
281
-            $label_content .= "<img src='" . XOOPS_URL . "/themes/" . $theme . "/" . $theme_ini['screenshot'] . "' alt='Screenshot' />";
282
-        } elseif ($theme_ini['thumbnail'] != '' && file_exists(XOOPS_ROOT_PATH . "/themes/$theme/" . $theme_ini['thumbnail'])) {
283
-            $label_content .= "<img src='" . XOOPS_URL . "/themes/" . $theme . "/" . $theme_ini['thumbnail'] . "' alt='$theme' />";
280
+        if ($theme_ini['screenshot'] != '' && file_exists(XOOPS_ROOT_PATH."/themes/$theme/".$theme_ini['screenshot'])) {
281
+            $label_content .= "<img src='".XOOPS_URL."/themes/".$theme."/".$theme_ini['screenshot']."' alt='Screenshot' />";
282
+        } elseif ($theme_ini['thumbnail'] != '' && file_exists(XOOPS_ROOT_PATH."/themes/$theme/".$theme_ini['thumbnail'])) {
283
+            $label_content .= "<img src='".XOOPS_URL."/themes/".$theme."/".$theme_ini['thumbnail']."' alt='$theme' />";
284 284
         } else {
285 285
             $label_content .= THEME_NO_SCREENSHOT;
286 286
         }
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 
293 293
     $form = new Xoops\Form\ThemeForm($title, 'themes', 'index.php', 'post');
294 294
     $form->addElement($form_theme_set);
295
-    $form->addElement(new Xoops\Form\Label('', "<div id='screenshot'>" . $label_content . "</div>"));
295
+    $form->addElement(new Xoops\Form\Label('', "<div id='screenshot'>".$label_content."</div>"));
296 296
 
297 297
     $form->addElement(new Xoops\Form\Hidden('conf_ids[]', $config->getVar('conf_id')));
298 298
     return array($form);
Please login to merge, or discard this patch.
htdocs/install/page_dbconnection.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
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'];
@@ -37,14 +37,14 @@  discard block
 block discarded – undo
37 37
 }
38 38
 // get list of parameters the selected drive accepts
39 39
 $driver_info = $wizard->configs['db_types'][$settings['DB_DRIVER']];
40
-$driver_params=explode(',', $driver_info['params']);
40
+$driver_params = explode(',', $driver_info['params']);
41 41
 $settings['DB_TYPE'] = $driver_info['type'];
42 42
 
43 43
 // get settings name and value (post, session or default) for each parameter
44 44
 foreach ($driver_params as $param) {
45
-    $name=false;
45
+    $name = false;
46 46
     if (!empty($wizard->configs['db_param_names'][$param])) {
47
-        $name=$wizard->configs['db_param_names'][$param];
47
+        $name = $wizard->configs['db_param_names'][$param];
48 48
         $default = null;
49 49
         switch ($param) {
50 50
             case 'host':
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         if ($_SERVER['REQUEST_METHOD'] === 'POST') {
83 83
             $value = empty($_POST[$name]) ? $default : $_POST[$name];
84 84
         }
85
-        $settings[$name]=$value;
85
+        $settings[$name] = $value;
86 86
     }
87 87
 }
88 88
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 ob_start();
103 103
 ?>
104 104
 <?php if (!empty($error)) {
105
-    echo '<div class="x2-note errorMsg">' . $error . "</div>\n";
105
+    echo '<div class="x2-note errorMsg">'.$error."</div>\n";
106 106
 } ?>
107 107
 <fieldset>
108 108
     <legend><?php echo LEGEND_CONNECTION; ?>
@@ -111,26 +111,26 @@  discard block
 block discarded – undo
111 111
 <?php
112 112
 foreach ($driver_params as $param) {
113 113
     $name = $wizard->configs['db_param_names'][$param];
114
-    if ($wizard->configs['db_param_types'][$param]==='string') {
114
+    if ($wizard->configs['db_param_types'][$param] === 'string') {
115 115
         echo xoFormField(
116 116
             $name,
117 117
             $settings[$name],
118
-            constant($name . '_LABEL'),
119
-            constant($name . '_HELP')
118
+            constant($name.'_LABEL'),
119
+            constant($name.'_HELP')
120 120
         );
121
-    } elseif ($wizard->configs['db_param_types'][$param]==='boolean') {
121
+    } elseif ($wizard->configs['db_param_types'][$param] === 'boolean') {
122 122
         echo xoBoolField(
123 123
             $name,
124 124
             $settings[$name],
125
-            constant($name . '_LABEL'),
126
-            constant($name . '_HELP')
125
+            constant($name.'_LABEL'),
126
+            constant($name.'_HELP')
127 127
         );
128
-    } elseif ($wizard->configs['db_param_types'][$param]==='password') {
128
+    } elseif ($wizard->configs['db_param_types'][$param] === 'password') {
129 129
         echo xoPassField(
130 130
             $name,
131 131
             $settings[$name],
132
-            constant($name . '_LABEL'),
133
-            constant($name . '_HELP')
132
+            constant($name.'_LABEL'),
133
+            constant($name.'_HELP')
134 134
         );
135 135
     }
136 136
 }
@@ -154,4 +154,4 @@  discard block
 block discarded – undo
154 154
 $_SESSION['pageHasForm'] = true;
155 155
 $_SESSION['content'] = $content;
156 156
 $_SESSION['settings'] = $settings;
157
-include XOOPS_INSTALL_PATH . '/include/install_tpl.php';
157
+include XOOPS_INSTALL_PATH.'/include/install_tpl.php';
Please login to merge, or discard this patch.
htdocs/install/page_end.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
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
 $xoops = Xoops::getInstance();
30 30
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
 setcookie('xo_install_user', '', null, null, null);
35 35
 
36
-$installer_modified = "install_remove_" . uniqid(mt_rand());
36
+$installer_modified = "install_remove_".uniqid(mt_rand());
37 37
 register_shutdown_function('install_finalize', $installer_modified);
38 38
 
39 39
 $_SESSION['installer_modified'] = $installer_modified;
@@ -44,5 +44,5 @@  discard block
 block discarded – undo
44 44
 $_SESSION['pageHasHelp'] = false;
45 45
 $_SESSION['pageHasForm'] = false;
46 46
 $_SESSION['content'] = $content;
47
-include XOOPS_INSTALL_PATH . '/include/install_tpl.php';
47
+include XOOPS_INSTALL_PATH.'/include/install_tpl.php';
48 48
 $_SESSION = array();
Please login to merge, or discard this patch.
htdocs/install/page_theme.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 $xoopsOption['checkadmin'] = true;
26 26
 $xoopsOption['hascommon'] = true;
27 27
 
28
-require_once __DIR__ . '/include/common.inc.php';
28
+require_once __DIR__.'/include/common.inc.php';
29 29
 
30 30
 $xoops = Xoops::getInstance();
31 31
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 if ($_SERVER['REQUEST_METHOD'] === 'POST') {
37 37
     if (array_key_exists('conf_ids', $_REQUEST)) {
38 38
         foreach ($_REQUEST['conf_ids'] as $key => $conf_id) {
39
-            $config =& $config_handler->getConfig($conf_id);
39
+            $config = & $config_handler->getConfig($conf_id);
40 40
             $new_value = $_REQUEST[$config->getVar('conf_name')];
41 41
             $config->setConfValueForInput($new_value);
42 42
             $config_handler->insertConfig($config);
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
58 58
 $tempvar = $config_handler->getConfigs($criteria);
59 59
 $config = array_pop($tempvar);
60 60
 
61
-include XOOPS_INSTALL_PATH . '/include/createconfigform.php';
61
+include XOOPS_INSTALL_PATH.'/include/createconfigform.php';
62 62
 $wizard->form = createThemeform($config);
63 63
 $content = $wizard->CreateForm();
64 64
 
65 65
 $_SESSION['pageHasHelp'] = false;
66 66
 $_SESSION['pageHasForm'] = false;
67 67
 $_SESSION['content'] = $content;
68
-include XOOPS_INSTALL_PATH . '/include/install_tpl.php';
68
+include XOOPS_INSTALL_PATH.'/include/install_tpl.php';
Please login to merge, or discard this patch.