Completed
Push — master ( d2e234...56bfde )
by Nazar
04:27
created
core/traits/Session/Management.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @package   CleverStyle CMS
4
- * @author    Nazar Mokrynskyi <[email protected]>
5
- * @copyright Copyright (c) 2011-2016, Nazar Mokrynskyi
6
- * @license   MIT License, see license.txt
7
- */
3
+	 * @package   CleverStyle CMS
4
+	 * @author    Nazar Mokrynskyi <[email protected]>
5
+	 * @copyright Copyright (c) 2011-2016, Nazar Mokrynskyi
6
+	 * @license   MIT License, see license.txt
7
+	 */
8 8
 namespace cs\User;
9 9
 use
10 10
 	cs\Config,
Please login to merge, or discard this patch.
core/traits/Session/Data.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @package   CleverStyle CMS
4
- * @author    Nazar Mokrynskyi <[email protected]>
5
- * @copyright Copyright (c) 2011-2016, Nazar Mokrynskyi
6
- * @license   MIT License, see license.txt
7
- */
3
+	 * @package   CleverStyle CMS
4
+	 * @author    Nazar Mokrynskyi <[email protected]>
5
+	 * @copyright Copyright (c) 2011-2016, Nazar Mokrynskyi
6
+	 * @license   MIT License, see license.txt
7
+	 */
8 8
 namespace cs\User;
9 9
 use
10 10
 	cs\Config,
Please login to merge, or discard this patch.
components/modules/OAuth2/authorize.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @package   OAuth2
4
- * @category  modules
5
- * @author    Nazar Mokrynskyi <[email protected]>
6
- * @copyright Copyright (c) 2011-2016, Nazar Mokrynskyi
7
- * @license   MIT License, see license.txt
8
- */
3
+	 * @package   OAuth2
4
+	 * @category  modules
5
+	 * @author    Nazar Mokrynskyi <[email protected]>
6
+	 * @copyright Copyright (c) 2011-2016, Nazar Mokrynskyi
7
+	 * @license   MIT License, see license.txt
8
+	 */
9 9
 /**
10
- * Provides next events:<br>
11
- *  OAuth2/custom_sign_in_page
12
- *  OAuth2/custom_allow_access_page
13
- */
10
+	 * Provides next events:<br>
11
+	 *  OAuth2/custom_sign_in_page
12
+	 *  OAuth2/custom_allow_access_page
13
+	 */
14 14
 namespace cs\modules\OAuth2;
15 15
 use
16 16
 	h,
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
43 43
 $L      = new Prefix('oauth2_');
44 44
 $Page   = Page::instance();
45 45
 /**
46
- * Errors processing
47
- */
46
+	 * Errors processing
47
+	 */
48 48
 if (!isset($_GET['client_id'])) {
49 49
 	error_redirect('invalid_request', 'client_id parameter required');
50 50
 	return;
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
 }
132 132
 $Response = Response::instance();
133 133
 /**
134
- * Authorization processing
135
- */
134
+	 * Authorization processing
135
+	 */
136 136
 if (isset($_POST['mode'])) {
137 137
 	if ($_POST['mode'] == 'allow') {
138 138
 		$OAuth2->add_access($client['id']);
Please login to merge, or discard this patch.
Switch Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -172,43 +172,43 @@
 block discarded – undo
172 172
 	return;
173 173
 }
174 174
 switch ($_GET['response_type']) {
175
-	case 'code':
176
-		$Response->redirect(
177
-			http_build_url(
178
-				urldecode($redirect_uri),
179
-				[
180
-					'code'  => $code,
181
-					'state' => isset($_GET['state']) ? $_GET['state'] : false
182
-				]
183
-			),
184
-			302
185
-		);
186
-		$Page->Content = '';
187
-		return;
188
-	case 'token':
189
-		$token_data = $OAuth2->get_code($code, $client['id'], $client['secret'], $redirect_uri);
190
-		if ($token_data) {
191
-			unset($token_data['refresh_token']);
175
+		case 'code':
192 176
 			$Response->redirect(
193
-				uri_for_token(
194
-					http_build_url(
195
-						urldecode($redirect_uri),
196
-						array_merge(
197
-							$token_data,
198
-							[
199
-								'state' => isset($_GET['state']) ? $_GET['state'] : false
200
-							]
201
-						)
202
-					)
177
+				http_build_url(
178
+					urldecode($redirect_uri),
179
+					[
180
+						'code'  => $code,
181
+						'state' => isset($_GET['state']) ? $_GET['state'] : false
182
+					]
203 183
 				),
204 184
 				302
205 185
 			);
206 186
 			$Page->Content = '';
207 187
 			return;
208
-		} else {
209
-			error_redirect('server_error', "Server can't get token data, try later");
210
-			return;
211
-		}
212
-	default:
213
-		error_redirect('unsupported_response_type', 'Specified response_type is not supported, only "token" or "code" types available');
188
+		case 'token':
189
+			$token_data = $OAuth2->get_code($code, $client['id'], $client['secret'], $redirect_uri);
190
+			if ($token_data) {
191
+				unset($token_data['refresh_token']);
192
+				$Response->redirect(
193
+					uri_for_token(
194
+						http_build_url(
195
+							urldecode($redirect_uri),
196
+							array_merge(
197
+								$token_data,
198
+								[
199
+									'state' => isset($_GET['state']) ? $_GET['state'] : false
200
+								]
201
+							)
202
+						)
203
+					),
204
+					302
205
+				);
206
+				$Page->Content = '';
207
+				return;
208
+			} else {
209
+				error_redirect('server_error', "Server can't get token data, try later");
210
+				return;
211
+			}
212
+		default:
213
+			error_redirect('unsupported_response_type', 'Specified response_type is not supported, only "token" or "code" types available');
214 214
 }
Please login to merge, or discard this patch.
core/loader.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @package   CleverStyle CMS
4
- * @author    Nazar Mokrynskyi <[email protected]>
5
- * @copyright Copyright (c) 2011-2016, Nazar Mokrynskyi
6
- * @license   MIT License, see license.txt
7
- */
3
+	 * @package   CleverStyle CMS
4
+	 * @author    Nazar Mokrynskyi <[email protected]>
5
+	 * @copyright Copyright (c) 2011-2016, Nazar Mokrynskyi
6
+	 * @license   MIT License, see license.txt
7
+	 */
8 8
 namespace cs;
9 9
 require __DIR__.'/loader_base.php';
10 10
 /**
11
- * Including of custom files
12
- */
11
+	 * Including of custom files
12
+	 */
13 13
 foreach (glob(CUSTOM.'/*.php') ?: [] as $custom) {
14 14
 	include $custom;
15 15
 }
Please login to merge, or discard this patch.
core/functions.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @package   CleverStyle CMS
4
- * @author    Nazar Mokrynskyi <[email protected]>
5
- * @copyright Copyright (c) 2011-2016, Nazar Mokrynskyi
6
- * @license   MIT License, see license.txt
7
- */
3
+	 * @package   CleverStyle CMS
4
+	 * @author    Nazar Mokrynskyi <[email protected]>
5
+	 * @copyright Copyright (c) 2011-2016, Nazar Mokrynskyi
6
+	 * @license   MIT License, see license.txt
7
+	 */
8 8
 /**
9
- * Base system functions, do not edit this file, or make it very carefully
10
- * otherwise system workability may be broken
11
- */
9
+	 * Base system functions, do not edit this file, or make it very carefully
10
+	 * otherwise system workability may be broken
11
+	 */
12 12
 use
13 13
 	cs\Cache,
14 14
 	cs\Config,
@@ -59,8 +59,8 @@  discard block
 block discarded – undo
59 59
 	true
60 60
 );
61 61
 /**
62
- * Clean cache of classes autoload and customization
63
- */
62
+	 * Clean cache of classes autoload and customization
63
+	 */
64 64
 function clean_classes_cache () {
65 65
 	if (file_exists(CACHE.'/classes/autoload')) {
66 66
 		unlink(CACHE.'/classes/autoload');
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,11 +40,11 @@  discard block
 block discarded – undo
40 40
 		 * Try to load classes from different places. If not found in one place - try in another.
41 41
 		 */
42 42
 		if (
43
-			_require_once($file = DIR."/core/classes/$namespace/$class_name.php", false) ||    //Core classes
43
+			_require_once($file = DIR."/core/classes/$namespace/$class_name.php", false) || //Core classes
44 44
 			_require_once($file = DIR."/core/thirdparty/$namespace/$class_name.php", false) || //Third party classes
45
-			_require_once($file = DIR."/core/traits/$namespace/$class_name.php", false) ||     //Core traits
46
-			_require_once($file = ENGINES."/$namespace/$class_name.php", false) ||             //Core engines
47
-			_require_once($file = MODULES."/../$namespace/$class_name.php", false) ||          //Classes in modules
45
+			_require_once($file = DIR."/core/traits/$namespace/$class_name.php", false) || //Core traits
46
+			_require_once($file = ENGINES."/$namespace/$class_name.php", false) || //Core engines
47
+			_require_once($file = MODULES."/../$namespace/$class_name.php", false) || //Classes in modules
48 48
 			_require_once($file = PLUGINS."/../$namespace/$class_name.php", false)             //Classes in plugins
49 49
 		) {
50 50
 			$cache[$class] = realpath($file);
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
 			]
434 434
 		);
435 435
 	};
436
-	$render_page_item  = function ($i) use ($page, $url, $head_links, $render_head_links) {
436
+	$render_page_item = function ($i) use ($page, $url, $head_links, $render_head_links) {
437 437
 		if ($head_links) {
438 438
 			$render_head_links($i);
439 439
 		}
Please login to merge, or discard this patch.
components/modules/System/meta/update/4.3.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @package   CleverStyle CMS
4
- * @category  modules
5
- * @author    Nazar Mokrynskyi <[email protected]>
6
- * @copyright Copyright (c) 2016, Nazar Mokrynskyi
7
- * @license   MIT License, see license.txt
8
- */
3
+	 * @package   CleverStyle CMS
4
+	 * @category  modules
5
+	 * @author    Nazar Mokrynskyi <[email protected]>
6
+	 * @copyright Copyright (c) 2016, Nazar Mokrynskyi
7
+	 * @license   MIT License, see license.txt
8
+	 */
9 9
 namespace cs;
10 10
 
11 11
 Text::instance()->del(
Please login to merge, or discard this patch.
components/modules/Blogs/Controller.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @package   Blogs
4
- * @category  modules
5
- * @author    Nazar Mokrynskyi <[email protected]>
6
- * @copyright Copyright (c) 2011-2016, Nazar Mokrynskyi
7
- * @license   MIT License, see license.txt
8
- */
3
+	 * @package   Blogs
4
+	 * @category  modules
5
+	 * @author    Nazar Mokrynskyi <[email protected]>
6
+	 * @copyright Copyright (c) 2011-2016, Nazar Mokrynskyi
7
+	 * @license   MIT License, see license.txt
8
+	 */
9 9
 namespace cs\modules\Blogs;
10 10
 use
11 11
 	cs\Language;
Please login to merge, or discard this patch.