Passed
Branch dev (a25f63)
by Darko
15:17
created
www/admin/release_naming_regexes-edit.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 // Set the current action.
12 12
 $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view';
13 13
 
14
-switch($action) {
14
+switch ($action) {
15 15
 	case 'submit':
16 16
 		if ($_POST["group_regex"] == "") {
17 17
 			$page->smarty->assign('error', "Group regex must not be empty!");
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 			$regexes->updateRegex($_POST);
39 39
 		}
40 40
 
41
-		header("Location:".WWW_TOP."/release_naming_regexes-list.php");
41
+		header("Location:" . WWW_TOP . "/release_naming_regexes-list.php");
42 42
 		break;
43 43
 
44 44
 	case 'view':
@@ -55,8 +55,8 @@  discard block
 block discarded – undo
55 55
 		break;
56 56
 }
57 57
 
58
-$page->smarty->assign('status_ids', array(Category::STATUS_ACTIVE,Category::STATUS_INACTIVE));
59
-$page->smarty->assign('status_names', array( 'Yes', 'No'));
58
+$page->smarty->assign('status_ids', array(Category::STATUS_ACTIVE, Category::STATUS_INACTIVE));
59
+$page->smarty->assign('status_names', array('Yes', 'No'));
60 60
 
61 61
 $page->content = $page->smarty->fetch('release_naming_regexes-edit.tpl');
62 62
 $page->render();
Please login to merge, or discard this patch.
www/admin/ajax_regex-list.php 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@
 block discarded – undo
6 6
 
7 7
 // login check
8 8
 $admin = new AdminPage;
9
-$regex  = new ReleaseRegex();
9
+$regex = new ReleaseRegex();
10 10
 
11 11
 if (isset($_GET['action']) && $_GET['action'] == "2")
12 12
 {
13
-		$id     = (int)$_GET['regex_id'];
13
+		$id = (int)$_GET['regex_id'];
14 14
 		$regex->delete($id);
15 15
 		print "Regex $id deleted.";
16 16
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
8 8
 $admin = new AdminPage;
9 9
 $regex  = new ReleaseRegex();
10 10
 
11
-if (isset($_GET['action']) && $_GET['action'] == "2")
12
-{
11
+if (isset($_GET['action']) && $_GET['action'] == "2") {
13 12
 		$id     = (int)$_GET['regex_id'];
14 13
 		$regex->delete($id);
15 14
 		print "Regex $id deleted.";
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,5 +12,5 @@
 block discarded – undo
12 12
 {
13 13
 		$id     = (int)$_GET['regex_id'];
14 14
 		$regex->delete($id);
15
-		print "Regex $id deleted.";
15
+		print "regex $id deleted.";
16 16
 }
Please login to merge, or discard this patch.
www/admin/spotnab-delete.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,7 @@
 block discarded – undo
6 6
 
7 7
 $page = new AdminPage();
8 8
 
9
-if (isset($_GET['id']))
10
-{
9
+if (isset($_GET['id'])) {
11 10
 	$spotnab = new SpotNab();
12 11
 	$spotnab->deleteSource($_GET['id']);
13 12
 }
Please login to merge, or discard this patch.
www/admin/menu-delete.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,7 @@
 block discarded – undo
6 6
 
7 7
 $page = new AdminPage();
8 8
 
9
-if (isset($_GET['id']))
10
-{
9
+if (isset($_GET['id'])) {
11 10
 	$menu = new Menu();
12 11
 	$menu->delete($_GET['id']);
13 12
 }
Please login to merge, or discard this patch.
www/admin/forum-delete.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,14 +6,14 @@
 block discarded – undo
6 6
 
7 7
 $page = new AdminPage();
8 8
 
9
-if (isset($_GET['id']))
10
-{
9
+if (isset($_GET['id'])) {
11 10
 	$forum = new Forum();
12 11
 	$forum->deletePost($_GET['id']);
13 12
 }
14 13
 
15
-if (isset($_GET['from']))
14
+if (isset($_GET['from'])) {
16 15
 	$referrer = $_GET['from'];
17
-else
16
+} else {
18 17
 	$referrer = $_SERVER['HTTP_REFERER'];
18
+}
19 19
 header("Location: " . $referrer);
Please login to merge, or discard this patch.
www/admin/regex-list.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 $reggrouplist = $reg->getGroupsForSelect();
15 15
 $page->smarty->assign('reggrouplist', $reggrouplist);
16 16
 
17
-$group=".*";
17
+$group = ".*";
18 18
 if (isset($_REQUEST["group"]))
19 19
 	$group = $_REQUEST["group"];
20 20
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,8 +15,9 @@
 block discarded – undo
15 15
 $page->smarty->assign('reggrouplist', $reggrouplist);
16 16
 
17 17
 $group=".*";
18
-if (isset($_REQUEST["group"]))
18
+if (isset($_REQUEST["group"])) {
19 19
 	$group = $_REQUEST["group"];
20
+}
20 21
 
21 22
 $page->smarty->assign('selectedgroup', $group);
22 23
 
Please login to merge, or discard this patch.
www/admin/role-edit.php 2 patches
Switch Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -11,42 +11,42 @@
 block discarded – undo
11 11
 }
12 12
 
13 13
 switch ((isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view')) {
14
-	case 'add':
15
-		$page->title              = "User Roles Add";
16
-		$role = [
17
-			'id'               => '',
18
-			'name'             => '',
19
-			'apirequests'      => '',
20
-			'downloadrequests' => '',
21
-			'defaultinvites'   => '',
22
-			'canpreview'       => 0,
23
-			'hideads'          => 0
24
-		];
25
-		$page->smarty->assign('role', $role);
26
-		break;
14
+		case 'add':
15
+			$page->title              = "User Roles Add";
16
+			$role = [
17
+				'id'               => '',
18
+				'name'             => '',
19
+				'apirequests'      => '',
20
+				'downloadrequests' => '',
21
+				'defaultinvites'   => '',
22
+				'canpreview'       => 0,
23
+				'hideads'          => 0
24
+			];
25
+			$page->smarty->assign('role', $role);
26
+			break;
27 27
 
28
-	case 'submit':
29
-		if ($_POST["id"] == "") {
30
-			$ret = $page->users->addRole($_POST['name'], $_POST['apirequests'], $_POST['downloadrequests'],
31
-				$_POST['defaultinvites'], $_POST['canpreview'], $_POST['hideads']
32
-			);
33
-			header("Location:" . WWW_TOP . "/role-list.php");
34
-		} else {
35
-			$ret = $page->users->updateRole($_POST['id'], $_POST['name'], $_POST['apirequests'],
36
-				$_POST['downloadrequests'], $_POST['defaultinvites'], $_POST['isdefault'], $_POST['canpreview'], $_POST['hideads']
37
-			);
38
-			header("Location:" . WWW_TOP . "/role-list.php");
39
-		}
40
-		break;
28
+		case 'submit':
29
+			if ($_POST["id"] == "") {
30
+				$ret = $page->users->addRole($_POST['name'], $_POST['apirequests'], $_POST['downloadrequests'],
31
+					$_POST['defaultinvites'], $_POST['canpreview'], $_POST['hideads']
32
+				);
33
+				header("Location:" . WWW_TOP . "/role-list.php");
34
+			} else {
35
+				$ret = $page->users->updateRole($_POST['id'], $_POST['name'], $_POST['apirequests'],
36
+					$_POST['downloadrequests'], $_POST['defaultinvites'], $_POST['isdefault'], $_POST['canpreview'], $_POST['hideads']
37
+				);
38
+				header("Location:" . WWW_TOP . "/role-list.php");
39
+			}
40
+			break;
41 41
 
42
-	case 'view':
43
-	default:
44
-		if (isset($_GET["id"])) {
45
-			$page->title = "User Roles Edit";
46
-			$role = $page->users->getRoleById($_GET["id"]);
47
-			$page->smarty->assign('role', $role);
48
-		}
49
-		break;
42
+		case 'view':
43
+		default:
44
+			if (isset($_GET["id"])) {
45
+				$page->title = "User Roles Edit";
46
+				$role = $page->users->getRoleById($_GET["id"]);
47
+				$page->smarty->assign('role', $role);
48
+			}
49
+			break;
50 50
 }
51 51
 
52 52
 $page->smarty->assign('yesno_ids', [1, 0]);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@
 block discarded – undo
11 11
 }
12 12
 
13 13
 switch ((isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view')) {
14
-	case 'add':
15
-		$page->title              = "User Roles Add";
14
+	case 'add' : $page->title = "User Roles Add";
16 15
 		$role = [
17 16
 			'id'               => '',
18 17
 			'name'             => '',
Please login to merge, or discard this patch.
www/admin/spotnab-list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
 // set the current action
13 13
 $toggle = isset($_REQUEST['toggle']) ? $_REQUEST['toggle'] : 'view';
14 14
 
15
-if ( (isset($_GET["toggle"])) && (isset($_GET["id"])) ) {
16
-	$spotnab->toggleSource($_GET["id"],$_GET["toggle"]);
15
+if ((isset($_GET["toggle"])) && (isset($_GET["id"]))) {
16
+	$spotnab->toggleSource($_GET["id"], $_GET["toggle"]);
17 17
 }
18 18
 
19 19
 $page->title = "Spotnab Sources List";
@@ -21,6 +21,6 @@  discard block
 block discarded – undo
21 21
 //get the list of Sources
22 22
 $spotnab = $spotnab->getSources();
23 23
 
24
-$page->smarty->assign('spotnab',$spotnab);
24
+$page->smarty->assign('spotnab', $spotnab);
25 25
 $page->content = $page->smarty->fetch('spotnab-list.tpl');
26 26
 $page->render();
Please login to merge, or discard this patch.
www/admin/view-logs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 
18 18
 $regex = false;
19 19
 
20
-switch($type) {
20
+switch ($type) {
21 21
 	case 'info':
22 22
 		$regex = '/\[INFO\]/';
23 23
 		break;
Please login to merge, or discard this patch.