Completed
Push — develop ( d568f8...c061fc )
by Agel_Nash
06:25
created
manager/includes/manager.lockout.inc.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,8 @@
 block discarded – undo
51 51
         } elseif (is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/templates/actions/manager.lockout.tpl')) {
52 52
             $target = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/templates/actions/manager.lockout.tpl';
53 53
             $login_tpl = file_get_contents($target);
54
-        } elseif (is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/manager.lockout.html')) { // ClipperCMS compatible
54
+        } elseif (is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/manager.lockout.html')) {
55
+// ClipperCMS compatible
55 56
             $target = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/manager.lockout.html';
56 57
             $lockout_tpl = file_get_contents($target);
57 58
         } else {
Please login to merge, or discard this patch.
manager/includes/preload.functions.inc.php 1 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.