Completed
Push — develop ( 8dee05 )
by Dmytro
20:08
created
install/stubs/migrations/2018_06_29_182342_create_site_plugins_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 use Illuminate\Database\Migrations\Migration;
4 4
 use Illuminate\Database\Schema\Blueprint;
5 5
 
6
-class CreateSitePluginsTable extends Migration {
6
+class CreateSitePluginsTable extends Migration{
7 7
 
8 8
 	/**
9 9
 	 * Run the migrations.
Please login to merge, or discard this patch.
install/stubs/migrations/2018_06_29_182342_create_categories_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 use Illuminate\Database\Migrations\Migration;
4 4
 use Illuminate\Database\Schema\Blueprint;
5 5
 
6
-class CreateCategoriesTable extends Migration {
6
+class CreateCategoriesTable extends Migration{
7 7
 
8 8
 	/**
9 9
 	 * Run the migrations.
Please login to merge, or discard this patch.
install/stubs/migrations/2018_06_29_182342_create_webgroup_names_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 use Illuminate\Database\Migrations\Migration;
4 4
 use Illuminate\Database\Schema\Blueprint;
5 5
 
6
-class CreateWebgroupNamesTable extends Migration {
6
+class CreateWebgroupNamesTable extends Migration{
7 7
 
8 8
 	/**
9 9
 	 * Run the migrations.
Please login to merge, or discard this patch.
install/stubs/migrations/2018_06_29_182342_create_webgroup_access_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 use Illuminate\Database\Migrations\Migration;
4 4
 use Illuminate\Database\Schema\Blueprint;
5 5
 
6
-class CreateWebgroupAccessTable extends Migration {
6
+class CreateWebgroupAccessTable extends Migration{
7 7
 
8 8
 	/**
9 9
 	 * Run the migrations.
Please login to merge, or discard this patch.
install/stubs/migrations/2018_06_29_182342_create_site_templates_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 use Illuminate\Database\Migrations\Migration;
4 4
 use Illuminate\Database\Schema\Blueprint;
5 5
 
6
-class CreateSiteTemplatesTable extends Migration {
6
+class CreateSiteTemplatesTable extends Migration{
7 7
 
8 8
 	/**
9 9
 	 * Run the migrations.
Please login to merge, or discard this patch.
install/stubs/migrations/2018_06_29_182342_create_active_users_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 use Illuminate\Database\Migrations\Migration;
4 4
 use Illuminate\Database\Schema\Blueprint;
5 5
 
6
-class CreateActiveUsersTable extends Migration {
6
+class CreateActiveUsersTable extends Migration{
7 7
 
8 8
 	/**
9 9
 	 * Run the migrations.
Please login to merge, or discard this patch.
install/src/processor/result.php 1 patch
Spacing   +14 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 //:: EVO Installer Setup file
3 3
 //:::::::::::::::::::::::::::::::::::::::::
4
-if (is_file($base_path . 'assets/cache/siteManager.php')) {
5
-    include_once($base_path . 'assets/cache/siteManager.php');
4
+if (is_file($base_path.'assets/cache/siteManager.php')) {
5
+    include_once($base_path.'assets/cache/siteManager.php');
6 6
 }
7 7
 if (!defined('MGR_DIR')) {
8 8
     define('MGR_DIR', 'manager');
9 9
 }
10 10
 
11
-require_once dirname(__DIR__, 3) . '/' . MGR_DIR . '/includes/version.inc.php';
11
+require_once dirname(__DIR__, 3).'/'.MGR_DIR.'/includes/version.inc.php';
12 12
 
13
-$chunkPath = $base_path . 'install/assets/chunks';
14
-$snippetPath = $base_path . 'install/assets/snippets';
15
-$pluginPath = $base_path . 'install/assets/plugins';
16
-$modulePath = $base_path . 'install/assets/modules';
17
-$templatePath = $base_path . 'install/assets/templates';
18
-$tvPath = $base_path . 'install/assets/tvs';
13
+$chunkPath = $base_path.'install/assets/chunks';
14
+$snippetPath = $base_path.'install/assets/snippets';
15
+$pluginPath = $base_path.'install/assets/plugins';
16
+$modulePath = $base_path.'install/assets/modules';
17
+$templatePath = $base_path.'install/assets/templates';
18
+$tvPath = $base_path.'install/assets/tvs';
19 19
 
20 20
 // setup Template template files - array : name, description, type - 0:file or 1:content, parameters, category
21 21
 $mt = &$moduleTemplates;
@@ -28,8 +28,7 @@  discard block
 block discarded – undo
28 28
         $params = parse_docblock($templatePath, $tplfile);
29 29
         if (is_array($params) && (count($params) > 0)) {
30 30
             $description = empty($params['version']) ? $params['description'] : "<strong>{$params['version']}</strong> {$params['description']}";
31
-            $mt[] = array
32
-            (
31
+            $mt[] = array(
33 32
                 $params['name'],
34 33
                 $description,
35 34
                 // Don't think this is gonna be used ... but adding it just in case 'type'
@@ -69,8 +68,7 @@  discard block
 block discarded – undo
69 68
                 "$templatePath/{$params['filename']}",
70 69
                 /* not currently used */
71 70
                 $params['template_assignments'] !== "*" ?
72
-                    $params['template_assignments'] :
73
-                    implode(',', array_map(function($value){return isset($value[0]) && is_scalar($value[0]);},$mt)),
71
+                    $params['template_assignments'] : implode(',', array_map(function($value){return isset($value[0]) && is_scalar($value[0]); },$mt)),
74 72
                 /* comma-separated list of template names */
75 73
                 $params['modx_category'],
76 74
                 $params['lock_tv'],
@@ -150,7 +148,7 @@  discard block
 block discarded – undo
150 148
                 $params['modx_category'],
151 149
                 $params['legacy_names'],
152 150
                 array_key_exists('installset', $params) ? preg_split("/\s*,\s*/", $params['installset']) : false,
153
-                (int)$params['disabled']
151
+                (int) $params['disabled']
154 152
             );
155 153
         }
156 154
     }
@@ -175,12 +173,12 @@  discard block
 block discarded – undo
175 173
                 "$modulePath/{$params['filename']}",
176 174
                 $params['properties'],
177 175
                 $params['guid'],
178
-                (int)$params['shareparams'],
176
+                (int) $params['shareparams'],
179 177
                 $params['modx_category'],
180 178
                 array_key_exists('installset', $params) ? preg_split("/\s*,\s*/", $params['installset']) : false
181 179
             );
182 180
         }
183
-        if ((int)$params['shareparams'] || !empty($params['dependencies'])) {
181
+        if ((int) $params['shareparams'] || !empty($params['dependencies'])) {
184 182
             $dependencies = explode(',', $params['dependencies']);
185 183
             foreach ($dependencies as $dependency) {
186 184
                 $dependency = explode(':', $dependency);
Please login to merge, or discard this patch.
install/src/controllers/mode.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 // Determine upgradeability
3 3
 $upgradeable = 0;
4
-if (is_file($base_path . MGR_DIR . '/includes/config.inc.php')) { // Include the file so we can test its validity
5
-    include_once $base_path . MGR_DIR . '/includes/config.inc.php';
4
+if (is_file($base_path.MGR_DIR.'/includes/config.inc.php')) { // Include the file so we can test its validity
5
+    include_once $base_path.MGR_DIR.'/includes/config.inc.php';
6 6
     // We need to have all connection settings - tho prefix may be empty so we have to ignore it
7 7
     if (isset($dbase)) {
8 8
         $host = explode(':', $database_server, 2);
9
-        if (!$conn = @mysqli_connect($host[0], $database_user, $database_password,'', isset($host[1]) ? $host[1] : null))
9
+        if (!$conn = @mysqli_connect($host[0], $database_user, $database_password, '', isset($host[1]) ? $host[1] : null))
10 10
             $upgradeable = isset($_POST['installmode']) && $_POST['installmode'] == 'new' ? 0 : 2;
11 11
         elseif (!@mysqli_select_db($conn, trim($dbase, '`')))
12 12
             $upgradeable = isset($_POST['installmode']) && $_POST['installmode'] == 'new' ? 0 : 2;
@@ -18,16 +18,16 @@  discard block
 block discarded – undo
18 18
 }
19 19
 
20 20
 $ph['moduleName']       = $moduleName;
21
-$ph['displayNew']       = ($upgradeable!=0) ? 'display:none;' : '';
22
-$ph['displayUpg']       = ($upgradeable==0) ? 'display:none;' : '';
21
+$ph['displayNew']       = ($upgradeable != 0) ? 'display:none;' : '';
22
+$ph['displayUpg']       = ($upgradeable == 0) ? 'display:none;' : '';
23 23
 $ph['displayAdvUpg']    = $ph['displayUpg'];
24
-$ph['checkedNew']       = !$upgradeable     ? 'checked' : '';
25
-$ph['checkedUpg']       = ($_POST['installmode']==1 || $upgradeable==1) ? 'checked' : '';
26
-$ph['checkedAdvUpg']    = ($_POST['installmode']==2 || $upgradeable==2) ? 'checked' : '';
24
+$ph['checkedNew']       = !$upgradeable ? 'checked' : '';
25
+$ph['checkedUpg']       = ($_POST['installmode'] == 1 || $upgradeable == 1) ? 'checked' : '';
26
+$ph['checkedAdvUpg']    = ($_POST['installmode'] == 2 || $upgradeable == 2) ? 'checked' : '';
27 27
 $ph['install_language'] = $install_language;
28
-$ph['disabledUpg']      = ($upgradeable!=1) ? 'disabled' : '';
29
-$ph['disabledAdvUpg']   = ($upgradeable==0) ? 'disabled' : '';
28
+$ph['disabledUpg']      = ($upgradeable != 1) ? 'disabled' : '';
29
+$ph['disabledAdvUpg']   = ($upgradeable == 0) ? 'disabled' : '';
30 30
 
31
-$tpl = file_get_contents(dirname(__DIR__) . '/template/actions/mode.tpl');
31
+$tpl = file_get_contents(dirname(__DIR__).'/template/actions/mode.tpl');
32 32
 $content = parse($tpl, $ph);
33
-echo parse($content, $_lang,'[%','%]');
33
+echo parse($content, $_lang, '[%', '%]');
Please login to merge, or discard this patch.
install/src/controllers/connection.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,28 +1,28 @@  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 4
 // Determine upgradeability
5 5
 $upgradeable = 0;
6 6
 if ($installMode === 0) {
7 7
     $database_name = '';
8 8
     $database_server = 'localhost';
9
-    $table_prefix = base_convert(mt_rand(10, 20), 10, 36) .
10
-        substr(str_shuffle('0123456789abcdefghijklmnopqrstuvwxyz'), mt_rand(0, 33), 3) .
9
+    $table_prefix = base_convert(mt_rand(10, 20), 10, 36).
10
+        substr(str_shuffle('0123456789abcdefghijklmnopqrstuvwxyz'), mt_rand(0, 33), 3).
11 11
         '_';
12 12
 } else {
13 13
     $database_name = '';
14
-    if (! is_file($base_path . MGR_DIR . '/includes/config.inc.php')) {
14
+    if (!is_file($base_path.MGR_DIR.'/includes/config.inc.php')) {
15 15
         $upgradeable = 0;
16 16
     } else {
17 17
         // Include the file so we can test its validity
18
-        include $base_path . MGR_DIR . '/includes/config.inc.php';
18
+        include $base_path.MGR_DIR.'/includes/config.inc.php';
19 19
         // We need to have all connection settings - but prefix may be empty so we have to ignore it
20 20
         if ($dbase) {
21 21
             $database_name = trim($dbase, '`');
22 22
             $host = explode(':', $database_server, 2);
23
-            if (!$conn = mysqli_connect($host[0], $database_user, $database_password,'', isset($host[1]) ? $host[1] : null)) {
23
+            if (!$conn = mysqli_connect($host[0], $database_user, $database_password, '', isset($host[1]) ? $host[1] : null)) {
24 24
                 $upgradeable = (isset($_POST['installmode']) && $_POST['installmode'] === 'new') ? 0 : 2;
25
-            } elseif (! mysqli_select_db($conn, trim($dbase, '`'))) {
25
+            } elseif (!mysqli_select_db($conn, trim($dbase, '`'))) {
26 26
                 $upgradeable = (isset($_POST['installmode']) && $_POST['installmode'] === 'new') ? 0 : 2;
27 27
             } else {
28 28
                 $upgradeable = 1;
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 }
35 35
 
36 36
 // check the database collation if not specified in the configuration
37
-if ($upgradeable && (! isset($database_connection_charset) || empty($database_connection_charset))) {
37
+if ($upgradeable && (!isset($database_connection_charset) || empty($database_connection_charset))) {
38 38
     if (!$rs = mysqli_query($conn, "show session variables like 'collation_database'")) {
39 39
         $rs = mysqli_query($conn, "show session variables like 'collation_server'");
40 40
     }
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 $ph['databaseloginpassword'] = isset($_SESSION['databaseloginpassword']) ? $_SESSION['databaseloginpassword'] : "";
79 79
 $ph['MGR_DIR'] = MGR_DIR;
80 80
 
81
-$content = file_get_contents(dirname(__DIR__) . '/template/actions/connection.tpl');
81
+$content = file_get_contents(dirname(__DIR__).'/template/actions/connection.tpl');
82 82
 $content = parse($content, $_lang, '[%', '%]');
83 83
 $content = parse($content, $ph);
84 84
 
Please login to merge, or discard this patch.