Completed
Push — develop ( 80f130...524d8a )
by Maxim
08:25
created
manager/media/script/air-datepicker/datepicker.inc.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 
9 9
         $load_script = file_get_contents(dirname(__FILE__).'/datepicker.tpl');
10 10
         if(!isset($modx->config['lang_code'])) $modx->config['lang_code'] = $this->getLangCode();
11
-		$modx->config['datetime_format_lc'] = isset($modx->config['datetime_format']) ? strtolower($modx->config['datetime_format']) : 'dd-mm-yyyy';
11
+        $modx->config['datetime_format_lc'] = isset($modx->config['datetime_format']) ? strtolower($modx->config['datetime_format']) : 'dd-mm-yyyy';
12 12
         return $modx->mergeSettingsContent($load_script);
13 13
     }
14 14
 
Please login to merge, or discard this patch.
manager/media/calendar/datepicker.inc.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 class DATEPICKER {
4
-	function __construct() {
5
-	}
4
+    function __construct() {
5
+    }
6 6
 
7
-	function getDP() {
8
-		$modx = evolutionCMS(); global $_lang;
7
+    function getDP() {
8
+        $modx = evolutionCMS(); global $_lang;
9 9
 
10
-		$tpl = file_get_contents(dirname(__FILE__) . '/datepicker.tpl');
11
-		return $modx->parseText($tpl, $_lang, '[%', '%]');
12
-	}
10
+        $tpl = file_get_contents(dirname(__FILE__) . '/datepicker.tpl');
11
+        return $modx->parseText($tpl, $_lang, '[%', '%]');
12
+    }
13 13
 }
Please login to merge, or discard this patch.
manager/processors/save_content.processor.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -492,7 +492,7 @@
 block discarded – undo
492 492
                 }elseif ((!empty($pub_date)&& $pub_date<=$currentdate && $published)) {
493 493
                 $publishedon = $pub_date;
494 494
                 $publishedby = $modx->getLoginUserID();
495
-                   }elseif ($was_published && !$published) {
495
+                    }elseif ($was_published && !$published) {
496 496
                 $publishedon = 0;
497 497
                 $publishedby = 0;
498 498
             } else {
Please login to merge, or discard this patch.
manager/includes/accesscontrol.inc.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -102,19 +102,19 @@
 block discarded – undo
102 102
     $modx->setPlaceholder('login_form_position_class', 'loginbox-' . $modx->config['login_form_position']);
103 103
     
104 104
     switch ($modx->config['manager_theme_mode']) {
105
-      case '1':
105
+        case '1':
106 106
         $modx->setPlaceholder('manager_theme_style', 'lightness');
107 107
         break;
108
-      case '2':
108
+        case '2':
109 109
         $modx->setPlaceholder('manager_theme_style', 'light');
110 110
         break;
111
-      case '3':
111
+        case '3':
112 112
         $modx->setPlaceholder('manager_theme_style', 'dark');
113 113
         break;
114
-      case '4':
114
+        case '4':
115 115
         $modx->setPlaceholder('manager_theme_style', 'darkness');
116 116
         break;
117
-	}
117
+    }
118 118
 
119 119
     // andrazk 20070416 - notify user of install/update
120 120
     if (isset($_GET['installGoingOn'])) {
Please login to merge, or discard this patch.
install/src/controllers/summary.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -248,9 +248,9 @@
 block discarded – undo
248 248
         echo '<span class="notok">' . $_lang['failed'] . '</span></b>' . $_lang['table_prefix_not_exist'] . '</p>';
249 249
         $errors++;
250 250
         echo '<p>' . $_lang['table_prefix_not_exist_note'] . '</p>';
251
-  } else {
251
+    } else {
252 252
         echo '<span class="ok">' . $_lang['ok'] . '</span></p>';
253
-  }
253
+    }
254 254
 }
255 255
 
256 256
 // check mysql version
Please login to merge, or discard this patch.
install/src/sqlParser.class.php 1 patch
Indentation   +122 added lines, -122 removed lines patch added patch discarded remove patch
@@ -4,141 +4,141 @@
 block discarded – undo
4 4
 // SNUFFKIN/ Alex 2004
5 5
 
6 6
 class SqlParser {
7
-	public $host;
8
-	public $dbname;
9
-	public $prefix;
10
-	public $user;
11
-	public $password;
12
-	public $mysqlErrors;
13
-	public $conn;
14
-	public $installFailed;
15
-	public $sitename;
16
-	public $adminname;
17
-	public $adminemail;
18
-	public $adminpass;
19
-	public $managerlanguage;
20
-	public $mode;
21
-	public $fileManagerPath;
22
-	public $imgPath;
23
-	public $imgUrl;
24
-	public $dbMODx;
25
-	public $dbVersion;
7
+    public $host;
8
+    public $dbname;
9
+    public $prefix;
10
+    public $user;
11
+    public $password;
12
+    public $mysqlErrors;
13
+    public $conn;
14
+    public $installFailed;
15
+    public $sitename;
16
+    public $adminname;
17
+    public $adminemail;
18
+    public $adminpass;
19
+    public $managerlanguage;
20
+    public $mode;
21
+    public $fileManagerPath;
22
+    public $imgPath;
23
+    public $imgUrl;
24
+    public $dbMODx;
25
+    public $dbVersion;
26 26
     public $connection_charset;
27 27
     public $connection_method;
28 28
     public $ignoreDuplicateErrors;
29 29
     public $autoTemplateLogic;
30 30
 
31
-	public function __construct($host, $user, $password, $db, $prefix='modx_', $adminname, $adminemail, $adminpass, $connection_charset= 'utf8', $managerlanguage='english', $connection_method = 'SET CHARACTER SET', $auto_template_logic = 'parent') {
32
-		$this->host = $host;
33
-		$this->dbname = $db;
34
-		$this->prefix = $prefix;
35
-		$this->user = $user;
36
-		$this->password = $password;
37
-		$this->adminpass = $adminpass;
38
-		$this->adminname = $adminname;
39
-		$this->adminemail = $adminemail;
40
-		$this->connection_charset = $connection_charset;
41
-		$this->connection_method = $connection_method;
42
-		$this->ignoreDuplicateErrors = false;
43
-		$this->managerlanguage = $managerlanguage;
31
+    public function __construct($host, $user, $password, $db, $prefix='modx_', $adminname, $adminemail, $adminpass, $connection_charset= 'utf8', $managerlanguage='english', $connection_method = 'SET CHARACTER SET', $auto_template_logic = 'parent') {
32
+        $this->host = $host;
33
+        $this->dbname = $db;
34
+        $this->prefix = $prefix;
35
+        $this->user = $user;
36
+        $this->password = $password;
37
+        $this->adminpass = $adminpass;
38
+        $this->adminname = $adminname;
39
+        $this->adminemail = $adminemail;
40
+        $this->connection_charset = $connection_charset;
41
+        $this->connection_method = $connection_method;
42
+        $this->ignoreDuplicateErrors = false;
43
+        $this->managerlanguage = $managerlanguage;
44 44
         $this->autoTemplateLogic = $auto_template_logic;
45
-	}
45
+    }
46 46
 
47
-	public function connect() {
48
-		$this->conn = mysqli_connect($this->host, $this->user, $this->password);
49
-		mysqli_select_db($this->conn, $this->dbname);
50
-		if (function_exists('mysqli_set_charset')) mysqli_set_charset($this->conn, $this->connection_charset);
47
+    public function connect() {
48
+        $this->conn = mysqli_connect($this->host, $this->user, $this->password);
49
+        mysqli_select_db($this->conn, $this->dbname);
50
+        if (function_exists('mysqli_set_charset')) mysqli_set_charset($this->conn, $this->connection_charset);
51 51
 
52
-		$this->dbVersion = 3.23; // assume version 3.23
53
-		if(function_exists("mysqli_get_server_info")) {
54
-			$ver = mysqli_get_server_info($this->conn);
55
-			$this->dbMODx 	 = version_compare($ver,"4.0.2");
56
-			$this->dbVersion = (float) $ver; // Typecasting (float) instead of floatval() [PHP < 4.2]
57
-		}
52
+        $this->dbVersion = 3.23; // assume version 3.23
53
+        if(function_exists("mysqli_get_server_info")) {
54
+            $ver = mysqli_get_server_info($this->conn);
55
+            $this->dbMODx 	 = version_compare($ver,"4.0.2");
56
+            $this->dbVersion = (float) $ver; // Typecasting (float) instead of floatval() [PHP < 4.2]
57
+        }
58 58
 
59 59
         mysqli_query($this->conn,"{$this->connection_method} {$this->connection_charset}");
60
-	}
60
+    }
61 61
 
62 62
     public function process($filename) {
63
-	    global $custom_placeholders;
64
-
65
-		// check to make sure file exists
66
-		if (!file_exists($filename)) {
67
-			$this->mysqlErrors[] = array("error" => "File '$filename' not found");
68
-			$this->installFailed = true ;
69
-			return false;
70
-		}
71
-
72
-		$fh = fopen($filename, 'r');
73
-		$idata = '';
74
-
75
-		while (!feof($fh)) {
76
-			$idata .= fread($fh, 1024);
77
-		}
78
-
79
-		fclose($fh);
80
-		$idata = str_replace("\r", '', $idata);
81
-
82
-		// check if in upgrade mode
83
-		if ($this->mode === 'upd') {
84
-			// remove non-upgradeable parts
85
-			$s = strpos($idata,'non-upgrade-able[[');
86
-			$e = strpos($idata,']]non-upgrade-able') + 17;
87
-			if($s && $e) {
88
-			    $idata = str_replace(substr($idata, $s,$e-$s),' Removed non upgradeable items', $idata);
63
+        global $custom_placeholders;
64
+
65
+        // check to make sure file exists
66
+        if (!file_exists($filename)) {
67
+            $this->mysqlErrors[] = array("error" => "File '$filename' not found");
68
+            $this->installFailed = true ;
69
+            return false;
70
+        }
71
+
72
+        $fh = fopen($filename, 'r');
73
+        $idata = '';
74
+
75
+        while (!feof($fh)) {
76
+            $idata .= fread($fh, 1024);
77
+        }
78
+
79
+        fclose($fh);
80
+        $idata = str_replace("\r", '', $idata);
81
+
82
+        // check if in upgrade mode
83
+        if ($this->mode === 'upd') {
84
+            // remove non-upgradeable parts
85
+            $s = strpos($idata,'non-upgrade-able[[');
86
+            $e = strpos($idata,']]non-upgrade-able') + 17;
87
+            if($s && $e) {
88
+                $idata = str_replace(substr($idata, $s,$e-$s),' Removed non upgradeable items', $idata);
89 89
             }
90
-		}
91
-
92
-		// replace {} tags
93
-		$idata = str_replace('{PREFIX}', $this->prefix, $idata);
94
-		$idata = str_replace('{ADMIN}', $this->adminname, $idata);
95
-		$idata = str_replace('{ADMINEMAIL}', $this->adminemail, $idata);
96
-		$idata = str_replace('{ADMINPASS}', $this->adminpass, $idata);
97
-		$idata = str_replace('{IMAGEPATH}', $this->imgPath, $idata);
98
-		$idata = str_replace('{IMAGEURL}', $this->imgUrl, $idata);
99
-		$idata = str_replace('{FILEMANAGERPATH}', $this->fileManagerPath, $idata);
100
-		$idata = str_replace('{MANAGERLANGUAGE}', $this->managerlanguage, $idata);
101
-		$idata = str_replace('{AUTOTEMPLATELOGIC}', $this->autoTemplateLogic, $idata);
102
-		/*$idata = str_replace('{VERSION}', $modx_version, $idata);*/
103
-
104
-		// Replace custom placeholders
105
-		foreach($custom_placeholders as $key=>$val) {
106
-			if (strpos($idata, '{'.$key.'}') !== false) {
107
-				$idata = str_replace('{'.$key.'}', $val, $idata);
108
-			}
109
-		}
110
-
111
-		$sql_array = explode("\n\n", $idata);
112
-
113
-		$num = 0;
114
-		foreach($sql_array as $sql_entry) {
115
-			$sql_do = trim($sql_entry, "\r\n; ");
116
-
117
-			if (preg_match('/^\#/', $sql_do)) continue;
118
-
119
-			// strip out comments and \n for mysql 3.x
120
-			if ($this->dbVersion <4.0) {
121
-				$sql_do = preg_replace("~COMMENT.*[^']?'.*[^']?'~","",$sql_do);
122
-				$sql_do = str_replace('\r', "", $sql_do);
123
-				$sql_do = str_replace('\n', "", $sql_do);
124
-			}
125
-
126
-
127
-			$num = $num + 1;
128
-			if ($sql_do) mysqli_query($this->conn, $sql_do);
129
-			if(mysqli_error($this->conn)) {
130
-				// Ignore duplicate and drop errors - Raymond
131
-				if ($this->ignoreDuplicateErrors){
132
-					if (mysqli_errno($this->conn) == 1060 || mysqli_errno($this->conn) == 1061 || mysqli_errno($this->conn) == 1062 ||mysqli_errno($this->conn) == 1091) continue;
133
-				}
134
-				// End Ignore duplicate
135
-				$this->mysqlErrors[] = array("error" => mysqli_error($this->conn), "sql" => $sql_do);
136
-				$this->installFailed = true;
137
-			}
138
-		}
139
-	}
90
+        }
91
+
92
+        // replace {} tags
93
+        $idata = str_replace('{PREFIX}', $this->prefix, $idata);
94
+        $idata = str_replace('{ADMIN}', $this->adminname, $idata);
95
+        $idata = str_replace('{ADMINEMAIL}', $this->adminemail, $idata);
96
+        $idata = str_replace('{ADMINPASS}', $this->adminpass, $idata);
97
+        $idata = str_replace('{IMAGEPATH}', $this->imgPath, $idata);
98
+        $idata = str_replace('{IMAGEURL}', $this->imgUrl, $idata);
99
+        $idata = str_replace('{FILEMANAGERPATH}', $this->fileManagerPath, $idata);
100
+        $idata = str_replace('{MANAGERLANGUAGE}', $this->managerlanguage, $idata);
101
+        $idata = str_replace('{AUTOTEMPLATELOGIC}', $this->autoTemplateLogic, $idata);
102
+        /*$idata = str_replace('{VERSION}', $modx_version, $idata);*/
103
+
104
+        // Replace custom placeholders
105
+        foreach($custom_placeholders as $key=>$val) {
106
+            if (strpos($idata, '{'.$key.'}') !== false) {
107
+                $idata = str_replace('{'.$key.'}', $val, $idata);
108
+            }
109
+        }
110
+
111
+        $sql_array = explode("\n\n", $idata);
112
+
113
+        $num = 0;
114
+        foreach($sql_array as $sql_entry) {
115
+            $sql_do = trim($sql_entry, "\r\n; ");
116
+
117
+            if (preg_match('/^\#/', $sql_do)) continue;
118
+
119
+            // strip out comments and \n for mysql 3.x
120
+            if ($this->dbVersion <4.0) {
121
+                $sql_do = preg_replace("~COMMENT.*[^']?'.*[^']?'~","",$sql_do);
122
+                $sql_do = str_replace('\r', "", $sql_do);
123
+                $sql_do = str_replace('\n', "", $sql_do);
124
+            }
125
+
126
+
127
+            $num = $num + 1;
128
+            if ($sql_do) mysqli_query($this->conn, $sql_do);
129
+            if(mysqli_error($this->conn)) {
130
+                // Ignore duplicate and drop errors - Raymond
131
+                if ($this->ignoreDuplicateErrors){
132
+                    if (mysqli_errno($this->conn) == 1060 || mysqli_errno($this->conn) == 1061 || mysqli_errno($this->conn) == 1062 ||mysqli_errno($this->conn) == 1091) continue;
133
+                }
134
+                // End Ignore duplicate
135
+                $this->mysqlErrors[] = array("error" => mysqli_error($this->conn), "sql" => $sql_do);
136
+                $this->installFailed = true;
137
+            }
138
+        }
139
+    }
140 140
 
141 141
     public function close() {
142
-		mysqli_close($this->conn);
143
-	}
142
+        mysqli_close($this->conn);
143
+    }
144 144
 }
Please login to merge, or discard this patch.
manager/actions/mutate_categories.dynamic.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -4,24 +4,24 @@  discard block
 block discarded – undo
4 4
 }
5 5
 
6 6
 if(!$modx->hasPermission('category_manager')) {
7
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
8 8
 }
9 9
 
10 10
 $_module_params = array(
11
-	'module_version'   => '1.0.0',
12
-	'module_params'    => '',
13
-	'module_id'        => $_GET['id'],
14
-	'package_name'     => 'Module_Categories_Manager',
15
-	'native_language'  => 'de',
16
-	'name'             => 'Categories Manager',
17
-	'dirname'          => $site_manager_url,
18
-	'url'              => 'index.php?a=120&amp;id=' . $_GET['id'],
19
-	'path'             => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR,
20
-	'inc_dir'          => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR,
21
-	'languages_dir'    => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR,
22
-	'views_dir'        => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'skin' . DIRECTORY_SEPARATOR,
23
-	'request_key'      => 'module_categories_manager',
24
-	'messages'         => array()
11
+    'module_version'   => '1.0.0',
12
+    'module_params'    => '',
13
+    'module_id'        => $_GET['id'],
14
+    'package_name'     => 'Module_Categories_Manager',
15
+    'native_language'  => 'de',
16
+    'name'             => 'Categories Manager',
17
+    'dirname'          => $site_manager_url,
18
+    'url'              => 'index.php?a=120&amp;id=' . $_GET['id'],
19
+    'path'             => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR,
20
+    'inc_dir'          => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR,
21
+    'languages_dir'    => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR,
22
+    'views_dir'        => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'skin' . DIRECTORY_SEPARATOR,
23
+    'request_key'      => 'module_categories_manager',
24
+    'messages'         => array()
25 25
 );
26 26
 
27 27
 $cm = new EvolutionCMS\Legacy\ModuleCategoriesManager();
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 // assign module_params to internal params
30 30
 foreach( $_module_params as $param => $value )
31 31
 {
32
-	$cm->set( $param, $value );
32
+    $cm->set( $param, $value );
33 33
 }
34 34
 
35 35
 // catch the request actions
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
 
38 38
 if( !$categories = $cm->getCategories() )
39 39
 {
40
-	setcookie('webfxtab_manage-categories-pane', 0 );
41
-	$cm->addMessage( $cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global' );
40
+    setcookie('webfxtab_manage-categories-pane', 0 );
41
+    $cm->addMessage( $cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global' );
42 42
 }
43 43
 
44 44
 $cm->renderView('main', $categories );
Please login to merge, or discard this patch.
manager/processors/duplicate_content.processor.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,12 +3,12 @@  discard block
 block discarded – undo
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if(!$modx->hasPermission('new_document') || !$modx->hasPermission('save_document')) {
6
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 $id = isset($_GET['id'])? (int)$_GET['id'] : 0;
10 10
 if($id==0) {
11
-	$modx->webAlertAndQuit($_lang["error_no_id"]);
11
+    $modx->webAlertAndQuit($_lang["error_no_id"]);
12 12
 }
13 13
 
14 14
 $children = array();
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 $udperms->duplicateDoc = true;
22 22
 
23 23
 if(!$udperms->checkPermissions()) {
24
-	$modx->webAlertAndQuit($_lang["access_permission_denied"]);
24
+    $modx->webAlertAndQuit($_lang["access_permission_denied"]);
25 25
 }
26 26
 
27 27
 // Run the duplicator
Please login to merge, or discard this patch.
manager/actions/help/01About_EVO.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -4,18 +4,18 @@
 block discarded – undo
4 4
 }
5 5
 $logo= '<img src="media/style/default/images/misc/login-logo.png" height="54" width="358" border="0">';
6 6
 $downloadLinks = array(
7
-	0=>array('title'=>$_lang["information"],'link'=>'https://evo.im/'),
8
-	1=>array('title'=>$_lang["download"],'link'=>'https://github.com/evolution-cms/evolution/releases'),
9
-	2=>array('title'=>$_lang["previous_releases"],'link'=>'https://modx.com/download/evolution/previous-releases.html'),
10
-	3=>array('title'=>$_lang["extras"],'link'=>array(
11
-		'http://extras.evolution-cms.com/',
12
-		'https://github.com/extras-evolution'
13
-	)),
7
+    0=>array('title'=>$_lang["information"],'link'=>'https://evo.im/'),
8
+    1=>array('title'=>$_lang["download"],'link'=>'https://github.com/evolution-cms/evolution/releases'),
9
+    2=>array('title'=>$_lang["previous_releases"],'link'=>'https://modx.com/download/evolution/previous-releases.html'),
10
+    3=>array('title'=>$_lang["extras"],'link'=>array(
11
+        'http://extras.evolution-cms.com/',
12
+        'https://github.com/extras-evolution'
13
+    )),
14 14
 );
15 15
 
16 16
 $translationLinks = array(
17
-	0=>array('title'=>'Evolution CMS','link'=>'https://www.transifex.com/evolutioncms/evolution/'),
18
-	1=>array('title'=>$_lang["extras"],'link'=>'https://www.transifex.com/evolutioncms/extras/'),
17
+    0=>array('title'=>'Evolution CMS','link'=>'https://www.transifex.com/evolutioncms/evolution/'),
18
+    1=>array('title'=>$_lang["extras"],'link'=>'https://www.transifex.com/evolutioncms/extras/'),
19 19
 );
20 20
 
21 21
 
Please login to merge, or discard this patch.