Completed
Push — develop ( e6bcf2...351294 )
by Dmytro
06:18
created
manager/includes/preload.functions.inc.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,14 +4,14 @@  discard block
 block discarded – undo
4 4
 $site_sessionname = genEvoSessionName(); // For legacy extras not using startCMSSession
5 5
 
6 6
 
7
-if (! function_exists('evolutionCMS')) {
7
+if (!function_exists('evolutionCMS')) {
8 8
     /**
9 9
      * @return DocumentParser
10 10
      */
11 11
     function evolutionCMS()
12 12
     {
13
-        if (! defined('MODX_CLASS')) {
14
-            if (! class_exists('DocumentParser')) {
13
+        if (!defined('MODX_CLASS')) {
14
+            if (!class_exists('DocumentParser')) {
15 15
                 throw new RuntimeException('MODX_CLASS not defined and DocumentParser class not exists');
16 16
             }
17 17
             define('MODX_CLASS', 'DocumentParser');
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     $_ = crc32(__FILE__);
30 30
     $_ = sprintf('%u', $_);
31 31
 
32
-    return 'evo' . base_convert($_, 10, 36);
32
+    return 'evo'.base_convert($_, 10, 36);
33 33
 }
34 34
 
35 35
 /**
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     session_start();
53 53
     $key = "modx.mgr.session.cookie.lifetime";
54 54
     if (isset($_SESSION[$key]) && is_numeric($_SESSION[$key])) {
55
-        $cookieLifetime = (int)$_SESSION[$key];
55
+        $cookieLifetime = (int) $_SESSION[$key];
56 56
         if ($cookieLifetime) {
57 57
             $cookieExpiration = $_SERVER['REQUEST_TIME'] + $cookieLifetime;
58 58
         }
Please login to merge, or discard this patch.
Braces   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -4,14 +4,14 @@  discard block
 block discarded – undo
4 4
 $site_sessionname = genEvoSessionName(); // For legacy extras not using startCMSSession
5 5
 
6 6
 
7
-if (! function_exists('evolutionCMS')) {
7
+if (! function_exists('evolutionCMS')) {
8 8
     /**
9 9
      * @return DocumentParser
10 10
      */
11
-    function evolutionCMS()
12
-    {
13
-        if (! defined('MODX_CLASS')) {
14
-            if (! class_exists('DocumentParser')) {
11
+    function evolutionCMS()
12
+    {
13
+        if (! defined('MODX_CLASS')) {
14
+            if (! class_exists('DocumentParser')) {
15 15
                 throw new RuntimeException('MODX_CLASS not defined and DocumentParser class not exists');
16 16
             }
17 17
             define('MODX_CLASS', 'DocumentParser');
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
 /**
25 25
  * @return string
26 26
  */
27
-function genEvoSessionName()
28
-{
27
+function genEvoSessionName()
28
+{
29 29
     $_ = crc32(__FILE__);
30 30
     $_ = sprintf('%u', $_);
31 31
 
@@ -35,10 +35,10 @@  discard block
 block discarded – undo
35 35
 /**
36 36
  * @return void
37 37
  */
38
-function startCMSSession()
39
-{
38
+function startCMSSession()
39
+{
40 40
     global $site_sessionname, $https_port, $session_cookie_path, $session_cookie_domain;
41
-    if (MODX_CLI) {
41
+    if (MODX_CLI) {
42 42
         return;
43 43
     }
44 44
 
@@ -51,14 +51,14 @@  discard block
 block discarded – undo
51 51
     session_set_cookie_params($cookieExpiration, $cookiePath, $cookieDomain, $secure, true);
52 52
     session_start();
53 53
     $key = "modx.mgr.session.cookie.lifetime";
54
-    if (isset($_SESSION[$key]) && is_numeric($_SESSION[$key])) {
54
+    if (isset($_SESSION[$key]) && is_numeric($_SESSION[$key])) {
55 55
         $cookieLifetime = (int)$_SESSION[$key];
56
-        if ($cookieLifetime) {
56
+        if ($cookieLifetime) {
57 57
             $cookieExpiration = $_SERVER['REQUEST_TIME'] + $cookieLifetime;
58 58
         }
59 59
         setcookie(session_name(), session_id(), $cookieExpiration, $cookiePath, $cookieDomain, $secure, true);
60 60
     }
61
-    if (!isset($_SESSION['modx.session.created.time'])) {
61
+    if (!isset($_SESSION['modx.session.created.time'])) {
62 62
         $_SESSION['modx.session.created.time'] = $_SERVER['REQUEST_TIME'];
63 63
     }
64 64
 }
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
  * @param $session_name
69 69
  * @return void
70 70
  */
71
-function removeInvalidCmsSessionFromStorage(&$storage, $session_name)
72
-{
73
-    if (isset($storage[$session_name]) && ($storage[$session_name] === '' || $storage[$session_name] === 'deleted')) {
71
+function removeInvalidCmsSessionFromStorage(&$storage, $session_name)
72
+{
73
+    if (isset($storage[$session_name]) && ($storage[$session_name] === '' || $storage[$session_name] === 'deleted')) {
74 74
         unset($storage[$session_name]);
75 75
     }
76 76
 }
@@ -79,9 +79,9 @@  discard block
 block discarded – undo
79 79
  * @param $session_name
80 80
  * @return void
81 81
  */
82
-function removeInvalidCmsSessionIds($session_name)
83
-{
84
-    if (MODX_CLI) {
82
+function removeInvalidCmsSessionIds($session_name)
83
+{
84
+    if (MODX_CLI) {
85 85
         return;
86 86
     }
87 87
     // session ids is invalid iff it is empty string
Please login to merge, or discard this patch.
manager/processors/delete_snippet.processor.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
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('delete_snippet')) {
6 6
     $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9
-$id = isset($_GET['id'])? (int)$_GET['id'] : 0;
10
-if ($id==0) {
9
+$id = isset($_GET['id']) ? (int) $_GET['id'] : 0;
10
+if ($id == 0) {
11 11
     $modx->webAlertAndQuit($_lang["error_no_id"]);
12 12
 }
13 13
 
@@ -34,5 +34,5 @@  discard block
 block discarded – undo
34 34
 $modx->clearCache('full');
35 35
 
36 36
 // finished emptying cache - redirect
37
-$header="Location: index.php?a=76&r=2";
37
+$header = "Location: index.php?a=76&r=2";
38 38
 header($header);
Please login to merge, or discard this patch.
manager/processors/publish_content.processor.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,32 +1,32 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
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
-if (!$modx->hasPermission('save_document')||!$modx->hasPermission('publish_document')) {
5
+if (!$modx->hasPermission('save_document') || !$modx->hasPermission('publish_document')) {
6 6
     $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9
-$id = isset($_REQUEST['id'])? (int)$_REQUEST['id'] : 0;
10
-if ($id==0) {
9
+$id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0;
10
+if ($id == 0) {
11 11
     $modx->webAlertAndQuit($_lang["error_no_id"]);
12 12
 }
13 13
 
14 14
 /************webber ********/
15
-$content=$modx->db->getRow($modx->db->select('parent, pagetitle', $modx->getFullTableName('site_content'), "id='{$id}'"));
16
-$pid=($content['parent']==0?$id:$content['parent']);
15
+$content = $modx->db->getRow($modx->db->select('parent, pagetitle', $modx->getFullTableName('site_content'), "id='{$id}'"));
16
+$pid = ($content['parent'] == 0 ? $id : $content['parent']);
17 17
 
18 18
 /************** webber *************/
19
-$sd=isset($_REQUEST['dir'])?'&dir=' . $_REQUEST['dir']:'&dir=DESC';
20
-$sb=isset($_REQUEST['sort'])?'&sort=' . $_REQUEST['sort']:'&sort=createdon';
21
-$pg=isset($_REQUEST['page'])?'&page=' . (int)$_REQUEST['page']:'';
22
-$add_path=$sd . $sb . $pg;
19
+$sd = isset($_REQUEST['dir']) ? '&dir='.$_REQUEST['dir'] : '&dir=DESC';
20
+$sb = isset($_REQUEST['sort']) ? '&sort='.$_REQUEST['sort'] : '&sort=createdon';
21
+$pg = isset($_REQUEST['page']) ? '&page='.(int) $_REQUEST['page'] : '';
22
+$add_path = $sd.$sb.$pg;
23 23
 
24 24
 /***********************************/
25 25
 
26 26
 
27 27
 
28 28
 // check permissions on the document
29
-include_once MODX_MANAGER_PATH . "processors/user_documents_permissions.class.php";
29
+include_once MODX_MANAGER_PATH."processors/user_documents_permissions.class.php";
30 30
 $udperms = new udperms();
31 31
 $udperms->user = $modx->getLoginUserID();
32 32
 $udperms->document = $id;
@@ -57,6 +57,6 @@  discard block
 block discarded – undo
57 57
 // empty cache
58 58
 $modx->clearCache('full');
59 59
 
60
-$header="Location: index.php?a=3&id=$pid&r=1" . $add_path;
60
+$header = "Location: index.php?a=3&id=$pid&r=1".$add_path;
61 61
 
62 62
 header($header);
Please login to merge, or discard this patch.
manager/includes/SystemEvent.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         if (is_array($SystemAlertMsgQueque)) {
36 36
             $title = '';
37 37
             if ($this->name && $this->activePlugin) {
38
-                $title = "<div><b>" . $this->activePlugin . "</b> - <span style='color:maroon;'>" . $this->name . "</span></div>";
38
+                $title = "<div><b>".$this->activePlugin."</b> - <span style='color:maroon;'>".$this->name."</span></div>";
39 39
             }
40 40
             $SystemAlertMsgQueque[] = "$title<div style='margin-left:10px;margin-top:3px;'>$msg</div>";
41 41
         }
Please login to merge, or discard this patch.