Completed
Push — develop ( 1e9876...a1b09f )
by Maxim
08:54
created
install/actions/action_language.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! function_exists('getLangOptions')) {
2
+if (!function_exists('getLangOptions')) {
3 3
     /**
4 4
      * @param string $install_language
5 5
      * @return string
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
             $abrv_language = explode('-', $language);
22 22
             $selected = ($language === $install_language) ? 'selected' : '';
23 23
             $_[] = sprintf('<option value="%s" %s>%s</option>', $language, $selected,
24
-                    ucwords($abrv_language[0])) . "\n";
24
+                    ucwords($abrv_language[0]))."\n";
25 25
         }
26 26
 
27 27
         return implode("\n", $_);
@@ -32,6 +32,6 @@  discard block
 block discarded – undo
32 32
 $content = parse($content, array(
33 33
     'langOptions' => getLangOptions($install_language))
34 34
 );
35
-$content = parse($content, $_lang,'[%','%]');
35
+$content = parse($content, $_lang, '[%', '%]');
36 36
 
37 37
 echo $content;
Please login to merge, or discard this patch.
install/actions/action_options.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-$installMode = isset($_POST['installmode']) ? (int)$_POST['installmode'] : 0;
2
+$installMode = isset($_POST['installmode']) ? (int) $_POST['installmode'] : 0;
3 3
 
4
-if( ! function_exists('getTemplates')) {
4
+if (!function_exists('getTemplates')) {
5 5
     /**
6 6
      * @param array $presets
7 7
      * @return string
@@ -26,12 +26,12 @@  discard block
 block discarded – undo
26 26
             $i++;
27 27
         }
28 28
         if (0 < count($_)) {
29
-            return '<h3>[%templates%]</h3>' . join("\n", $_);
29
+            return '<h3>[%templates%]</h3>'.join("\n", $_);
30 30
         }
31 31
     }
32 32
 }
33 33
 
34
-if( ! function_exists('getTVs')) {
34
+if (!function_exists('getTVs')) {
35 35
     /**
36 36
      * @param array $presets
37 37
      * @return string
@@ -56,12 +56,12 @@  discard block
 block discarded – undo
56 56
             $i++;
57 57
         }
58 58
         if (0 < count($_)) {
59
-            return '<h3>[%tvs%]</h3>' . join("\n", $_);
59
+            return '<h3>[%tvs%]</h3>'.join("\n", $_);
60 60
         }
61 61
     }
62 62
 }
63 63
 
64
-if( ! function_exists('getChunks')) {
64
+if (!function_exists('getChunks')) {
65 65
     /**
66 66
      * display chunks
67 67
      *
@@ -87,12 +87,12 @@  discard block
 block discarded – undo
87 87
             $i++;
88 88
         }
89 89
         if (0 < count($_)) {
90
-            return '<h3>[%chunks%]</h3>' . join("\n", $_);
90
+            return '<h3>[%chunks%]</h3>'.join("\n", $_);
91 91
         }
92 92
     }
93 93
 }
94 94
 
95
-if( ! function_exists('getModules')) {
95
+if (!function_exists('getModules')) {
96 96
     /**
97 97
      * display modules
98 98
      *
@@ -118,12 +118,12 @@  discard block
 block discarded – undo
118 118
             $i++;
119 119
         }
120 120
         if (0 < count($_)) {
121
-            return '<h3>[%modules%]</h3>' . join("\n", $_);
121
+            return '<h3>[%modules%]</h3>'.join("\n", $_);
122 122
         }
123 123
     }
124 124
 }
125 125
 
126
-if( ! function_exists('getPlugins')) {
126
+if (!function_exists('getPlugins')) {
127 127
     /**
128 128
      * display plugins
129 129
      *
@@ -153,12 +153,12 @@  discard block
 block discarded – undo
153 153
             $i++;
154 154
         }
155 155
         if (0 < count($_)) {
156
-            return '<h3>[%plugins%]</h3>' . join("\n", $_);
156
+            return '<h3>[%plugins%]</h3>'.join("\n", $_);
157 157
         }
158 158
     }
159 159
 }
160 160
 
161
-if( ! function_exists('getSnippets')) {
161
+if (!function_exists('getSnippets')) {
162 162
     /**
163 163
      * display snippets
164 164
      *
@@ -184,24 +184,24 @@  discard block
 block discarded – undo
184 184
             $i++;
185 185
         }
186 186
         if (0 < count($_)) {
187
-            return '<h3>[%snippets%]</h3>' . join("\n", $_);
187
+            return '<h3>[%snippets%]</h3>'.join("\n", $_);
188 188
         }
189 189
     }
190 190
 }
191 191
 
192
-switch($installMode){
192
+switch ($installMode) {
193 193
     case 0:
194 194
     case 2:
195 195
         $database_collation = isset($_POST['database_collation']) ? $_POST['database_collation'] : 'utf8_general_ci';
196 196
         $database_charset = substr($database_collation, 0, strpos($database_collation, '_'));
197 197
         $_POST['database_connection_charset'] = $database_charset;
198
-        if(empty($_SESSION['databaseloginpassword']))
198
+        if (empty($_SESSION['databaseloginpassword']))
199 199
             $_SESSION['databaseloginpassword'] = $_POST['databaseloginpassword'];
200
-        if(empty($_SESSION['databaseloginname']))
200
+        if (empty($_SESSION['databaseloginname']))
201 201
             $_SESSION['databaseloginname'] = $_POST['databaseloginname'];
202 202
         break;
203 203
     case 1:
204
-        include $base_path . MGR_DIR . '/includes/config.inc.php';
204
+        include $base_path.MGR_DIR.'/includes/config.inc.php';
205 205
         if (@ $conn = mysqli_connect($database_server, $database_user, $database_password)) {
206 206
             if (@ mysqli_query($conn, "USE {$dbase}")) {
207 207
                 if (!$rs = mysqli_query($conn, "show session variables like 'collation_database'")) {
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 $ph['checked'] = isset ($_POST['installdata']) && $_POST['installdata'] == "1" ? 'checked' : '';
257 257
 
258 258
 # load setup information file
259
-include($base_path . 'install/setup.info.php');
259
+include($base_path.'install/setup.info.php');
260 260
 $ph['templates'] = getTemplates($moduleTemplates);
261 261
 $ph['tvs']       = getTVs($moduleTVs);
262 262
 $ph['chunks']    = getChunks($moduleChunks);
@@ -266,6 +266,6 @@  discard block
 block discarded – undo
266 266
 
267 267
 $ph['action'] = ($installMode == 1) ? 'mode' : 'connection';
268 268
 
269
-$tpl = file_get_contents($base_path . 'install/actions/tpl_options.html');
270
-$content = parse($tpl,$ph);
271
-echo parse($content,$_lang,'[%','%]');
269
+$tpl = file_get_contents($base_path.'install/actions/tpl_options.html');
270
+$content = parse($tpl, $ph);
271
+echo parse($content, $_lang, '[%', '%]');
Please login to merge, or discard this patch.