Passed
Push — dev ( 8c58d8...9b6cb9 )
by Darko
09:10
created
www/pages/details.php 2 patches
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -137,33 +137,33 @@
 block discarded – undo
137 137
 	$rf = new ReleaseFiles;
138 138
 	$releasefiles = $rf->get($data["id"]);
139 139
 
140
-	$page->smarty->assign('releasefiles',$releasefiles);
141
-	$page->smarty->assign('release',$data);
142
-	$page->smarty->assign('reVideo',$reVideo);
143
-	$page->smarty->assign('reAudio',$reAudio);
144
-	$page->smarty->assign('reSubs',$reSubs);
145
-	$page->smarty->assign('nfo',$nfo);
146
-	$page->smarty->assign('show',$showInfo);
147
-	$page->smarty->assign('movie',$mov);
140
+	$page->smarty->assign('releasefiles', $releasefiles);
141
+	$page->smarty->assign('release', $data);
142
+	$page->smarty->assign('reVideo', $reVideo);
143
+	$page->smarty->assign('reAudio', $reAudio);
144
+	$page->smarty->assign('reSubs', $reSubs);
145
+	$page->smarty->assign('nfo', $nfo);
146
+	$page->smarty->assign('show', $showInfo);
147
+	$page->smarty->assign('movie', $mov);
148 148
 	$page->smarty->assign('xxx', $xxx);
149
-	$page->smarty->assign('episode',$episodeArray);
150
-	$page->smarty->assign('anidb',$AniDBAPIArray);
151
-	$page->smarty->assign('music',$mus);
152
-	$page->smarty->assign('con',$con);
149
+	$page->smarty->assign('episode', $episodeArray);
150
+	$page->smarty->assign('anidb', $AniDBAPIArray);
151
+	$page->smarty->assign('music', $mus);
152
+	$page->smarty->assign('con', $con);
153 153
 	$page->smarty->assign('game', $game);
154
-	$page->smarty->assign('book',$book);
154
+	$page->smarty->assign('book', $book);
155 155
 	$page->smarty->assign('predb', $pre);
156
-	$page->smarty->assign('comments',$comments);
157
-	$page->smarty->assign('searchname',$releases->getSimilarName($data['searchname']));
156
+	$page->smarty->assign('comments', $comments);
157
+	$page->smarty->assign('searchname', $releases->getSimilarName($data['searchname']));
158 158
 	$page->smarty->assign('similars', $similars);
159
-	$page->smarty->assign('privateprofiles', ($page->settings->getSetting('privateprofiles') == 1) ? true : false );
159
+	$page->smarty->assign('privateprofiles', ($page->settings->getSetting('privateprofiles') == 1) ? true : false);
160 160
 	$page->smarty->assign('failed', $failed);
161 161
 	$page->smarty->assign('cpapi', $cpapi);
162 162
 	$page->smarty->assign('cpurl', $cpurl);
163 163
 
164 164
 	$page->meta_title = "View NZB";
165 165
 	$page->meta_keywords = "view,nzb,description,details";
166
-	$page->meta_description = "View NZB for".$data["searchname"] ;
166
+	$page->meta_description = "View NZB for" . $data["searchname"];
167 167
 
168 168
 	$page->content = $page->smarty->fetch('viewnzb.tpl');
169 169
 	$page->render();
Please login to merge, or discard this patch.
Braces   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -16,11 +16,11 @@  discard block
 block discarded – undo
16 16
 use nntmux\Books;
17 17
 use nntmux\PreDb;
18 18
 
19
-if (!$page->users->isLoggedIn())
19
+if (!$page->users->isLoggedIn()) {
20 20
 	$page->show403();
21
+}
21 22
 
22
-if (isset($_GET["id"]))
23
-{
23
+if (isset($_GET["id"])) {
24 24
 	$releases = new Releases(['Settings' => $page->settings]);
25 25
 	$rc = new ReleaseComments;
26 26
 	$re = new ReleaseExtra;
@@ -30,11 +30,13 @@  discard block
 block discarded – undo
30 30
 	$cpapi = $user['cp_api'];
31 31
 	$cpurl = $user['cp_url'];
32 32
 
33
-	if (!$data)
34
-		$page->show404();
33
+	if (!$data) {
34
+			$page->show404();
35
+	}
35 36
 
36
-	if ($page->isPostBack())
37
-		$rc->addComment($data["id"], $data["gid"], $_POST["txtAddComment"], $page->users->currentUserId(), $_SERVER['REMOTE_ADDR']);
37
+	if ($page->isPostBack()) {
38
+			$rc->addComment($data["id"], $data["gid"], $_POST["txtAddComment"], $page->users->currentUserId(), $_SERVER['REMOTE_ADDR']);
39
+	}
38 40
 
39 41
 	$nfo = $releases->getReleaseNfo($data["id"], true);
40 42
 	$reVideo = $re->getVideo($data["id"]);
@@ -53,8 +55,7 @@  discard block
 block discarded – undo
53 55
 	}
54 56
 
55 57
 	$episodeArray = '';
56
-	if ($data['episodeinfoid'] > 0)
57
-	{
58
+	if ($data['episodeinfoid'] > 0) {
58 59
 		$episode = new Episode();
59 60
 		$episodeArray = $episode->getEpisodeInfoByID($data['episodeinfoid']);
60 61
 	}
@@ -125,8 +126,7 @@  discard block
 block discarded – undo
125 126
 	}
126 127
 
127 128
 	$AniDBAPIArray = '';
128
-	if ($data["anidbid"] > 0)
129
-	{
129
+	if ($data["anidbid"] > 0) {
130 130
 		$AniDB = new AniDB(['Settings' => $releases->pdo]);
131 131
 		$AniDBAPIArray = $AniDB->getAnimeInfo($data["anidbid"]);
132 132
 	}
Please login to merge, or discard this patch.
www/pages/logout.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1 1
 <?php
2 2
 $page->users->logout();
3 3
 
4
-header("Location: ".WWW_TOP."/login");
4
+header("Location: " . WWW_TOP . "/login");
Please login to merge, or discard this patch.
www/pages/sendtosab.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,19 +2,23 @@
 block discarded – undo
2 2
 
3 3
 use nntmux\SABnzbd;
4 4
 
5
-if (!$page->users->isLoggedIn())
5
+if (!$page->users->isLoggedIn()) {
6 6
 	$page->show403();
7
+}
7 8
 
8
-if (empty($_GET["id"]))
9
+if (empty($_GET["id"])) {
9 10
 	$page->show404();
11
+}
10 12
 
11 13
 $sab = new SABnzbd($page);
12 14
 
13
-if (empty($sab->url))
15
+if (empty($sab->url)) {
14 16
 	$page->show404();
17
+}
15 18
 
16
-if (empty($sab->apikey))
19
+if (empty($sab->apikey)) {
17 20
 	$page->show404();
21
+}
18 22
 
19 23
 $guid = $_GET["id"];
20 24
 
Please login to merge, or discard this patch.
www/admin/ajax_binaryblacklist-list.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
 // login check
8 8
 $admin = new AdminPage;
9
-$bin  = new Binaries();
9
+$bin = new Binaries();
10 10
 
11 11
 if (isset($_GET['action']) && $_GET['action'] == "2")
12 12
 {
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['bin_id'];
14 14
 		$bin->deleteBlacklist($id);
15
-		print "Blacklist $id deleted.";
15
+		print "blacklist $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.
www/admin/movie-edit.php 3 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
 
24 24
 	switch($action)
25 25
 	{
26
-	    case 'submit':
27
-	    	$coverLoc = WWW_DIR."covers/movies/".$id.'-cover.jpg';
28
-	    	$backdropLoc = WWW_DIR."covers/movies/".$id.'-backdrop.jpg';
26
+		case 'submit':
27
+			$coverLoc = WWW_DIR."covers/movies/".$id.'-cover.jpg';
28
+			$backdropLoc = WWW_DIR."covers/movies/".$id.'-backdrop.jpg';
29 29
 
30 30
 			if($_FILES['cover']['size'] > 0)
31 31
 			{
@@ -66,10 +66,10 @@  discard block
 block discarded – undo
66 66
 			]);
67 67
 
68 68
 			header("Location:".WWW_TOP."/movie-list.php");
69
-	        die();
70
-	    break;
71
-	    case 'view':
72
-	    default:
69
+			die();
70
+		break;
71
+		case 'view':
72
+		default:
73 73
 			$page->title = "Movie Edit";
74 74
 			$page->smarty->assign('movie', $mov);
75 75
 		break;
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -21,27 +21,27 @@  discard block
 block discarded – undo
21 21
 		$page->show404();
22 22
 	}
23 23
 
24
-	switch($action)
24
+	switch ($action)
25 25
 	{
26 26
 	    case 'submit':
27
-	    	$coverLoc = WWW_DIR."covers/movies/".$id.'-cover.jpg';
28
-	    	$backdropLoc = WWW_DIR."covers/movies/".$id.'-backdrop.jpg';
27
+	    	$coverLoc = WWW_DIR . "covers/movies/" . $id . '-cover.jpg';
28
+	    	$backdropLoc = WWW_DIR . "covers/movies/" . $id . '-backdrop.jpg';
29 29
 
30
-			if($_FILES['cover']['size'] > 0)
30
+			if ($_FILES['cover']['size'] > 0)
31 31
 			{
32 32
 				$tmpName = $_FILES['cover']['tmp_name'];
33 33
 				$file_info = getimagesize($tmpName);
34
-				if(!empty($file_info))
34
+				if (!empty($file_info))
35 35
 				{
36 36
 					move_uploaded_file($_FILES['cover']['tmp_name'], $coverLoc);
37 37
 				}
38 38
 			}
39 39
 
40
-			if($_FILES['backdrop']['size'] > 0)
40
+			if ($_FILES['backdrop']['size'] > 0)
41 41
 			{
42 42
 				$tmpName = $_FILES['backdrop']['tmp_name'];
43 43
 				$file_info = getimagesize($tmpName);
44
-				if(!empty($file_info))
44
+				if (!empty($file_info))
45 45
 				{
46 46
 					move_uploaded_file($_FILES['backdrop']['tmp_name'], $backdropLoc);
47 47
 				}
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 				'year'     => $_POST["year"]
66 66
 			]);
67 67
 
68
-			header("Location:".WWW_TOP."/movie-list.php");
68
+			header("Location:" . WWW_TOP . "/movie-list.php");
69 69
 	        die();
70 70
 	    break;
71 71
 	    case 'view':
Please login to merge, or discard this patch.
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@  discard block
 block discarded – undo
12 12
 // set the current action
13 13
 $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view';
14 14
 
15
-if (isset($_REQUEST["id"]))
16
-{
15
+if (isset($_REQUEST["id"])) {
17 16
 	$id = $_REQUEST["id"];
18 17
 	$mov = $movie->getMovieInfo($id);
19 18
 
@@ -21,28 +20,23 @@  discard block
 block discarded – undo
21 20
 		$page->show404();
22 21
 	}
23 22
 
24
-	switch($action)
25
-	{
23
+	switch($action) {
26 24
 	    case 'submit':
27 25
 	    	$coverLoc = WWW_DIR."covers/movies/".$id.'-cover.jpg';
28 26
 	    	$backdropLoc = WWW_DIR."covers/movies/".$id.'-backdrop.jpg';
29 27
 
30
-			if($_FILES['cover']['size'] > 0)
31
-			{
28
+			if($_FILES['cover']['size'] > 0) {
32 29
 				$tmpName = $_FILES['cover']['tmp_name'];
33 30
 				$file_info = getimagesize($tmpName);
34
-				if(!empty($file_info))
35
-				{
31
+				if(!empty($file_info)) {
36 32
 					move_uploaded_file($_FILES['cover']['tmp_name'], $coverLoc);
37 33
 				}
38 34
 			}
39 35
 
40
-			if($_FILES['backdrop']['size'] > 0)
41
-			{
36
+			if($_FILES['backdrop']['size'] > 0) {
42 37
 				$tmpName = $_FILES['backdrop']['tmp_name'];
43 38
 				$file_info = getimagesize($tmpName);
44
-				if(!empty($file_info))
45
-				{
39
+				if(!empty($file_info)) {
46 40
 					move_uploaded_file($_FILES['backdrop']['tmp_name'], $backdropLoc);
47 41
 				}
48 42
 			}
Please login to merge, or discard this patch.
www/admin/show-edit.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,13 +4,12 @@
 block discarded – undo
4 4
 
5 5
 use nntmux\Videos;
6 6
 
7
-$page   = new AdminPage();
7
+$page = new AdminPage();
8 8
 $tv = new smartyTV(['Settings' => $page->settings]);
9 9
 $video = new Videos(['Settings' => $page->settings]);
10 10
 
11 11
 switch ((isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view')) {
12
-	case 'submit':
13
-		//TODO: Use a function that allows overwrites
12
+	case 'submit' : //TODO: Use a function that allows overwrites
14 13
 		//$tv->update($_POST["id"], $_POST["title"],$_POST["summary"], $_POST['countries_id']);
15 14
 
16 15
 		if (isset($_POST['from']) && !empty($_POST['from'])) {
Please login to merge, or discard this patch.
www/admin/game-edit.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,14 +21,14 @@  discard block
 block discarded – undo
21 21
 		$page->show404();
22 22
 	}
23 23
 
24
-	switch($action) {
24
+	switch ($action) {
25 25
 		case 'submit':
26 26
 			$coverLoc = NN_COVERS . "games/" . $id . '.jpg';
27 27
 
28
-			if($_FILES['cover']['size'] > 0) {
28
+			if ($_FILES['cover']['size'] > 0) {
29 29
 				$tmpName = $_FILES['cover']['tmp_name'];
30 30
 				$file_info = getimagesize($tmpName);
31
-				if(!empty($file_info)) {
31
+				if (!empty($file_info)) {
32 32
 					move_uploaded_file($_FILES['cover']['tmp_name'], $coverLoc);
33 33
 				}
34 34
 			}
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
 			$games->update($id, $_POST["title"], $_POST['asin'], $_POST['url'], $_POST["publisher"], $_POST["releasedate"], $_POST["esrb"], $_POST["cover"], $_POST['trailerurl'], $_POST["genre"]);
40 40
 
41
-			header("Location:".WWW_TOP."/game-list.php");
41
+			header("Location:" . WWW_TOP . "/game-list.php");
42 42
 			die();
43 43
 		break;
44 44
 
Please login to merge, or discard this patch.
www/admin/user-edit.php 3 patches
Switch Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -32,43 +32,43 @@  discard block
 block discarded – undo
32 32
 }
33 33
 
34 34
 switch ($action) {
35
-	case 'add':
36
-		$user                += [
37
-			'role'        => $defaultRole,
38
-			'notes'       => '',
39
-			'invites'     => $defaultInvites,
40
-			'movieview'   => '1',
41
-			'xxxview'     => '1',
42
-			'musicview'   => '1',
43
-			'consoleview' => '1',
44
-			'gameview'    => '1',
45
-			'bookview'    => '1'
46
-		];
47
-		$page->smarty->assign('user', $user);
48
-		break;
49
-	case 'submit':
50
-
51
-		if ($_POST["id"] == "") {
52
-			$invites = $defaultinvites;
53
-			foreach ($userroles as $role) {
54
-				if ($role['id'] == $_POST['role'])
55
-					$invites = $role['defaultinvites'];
56
-			}
57
-			$ret = $users->signup($_POST["username"], $_POST["password"], $_POST["email"], '', $_POST["role"], $_POST["notes"], $invites, "", true);
58
-		} else {
59
-			$ret = $users->update($_POST["id"], $_POST["username"], $_POST["email"], $_POST["grabs"], $_POST["role"], $_POST["notes"], $_POST["invites"], (isset($_POST['movieview']) ? "1" : "0"), (isset($_POST['musicview']) ? "1" : "0"), (isset($_POST['gameview']) ? "1" : "0"), (isset($_POST['xxxview']) ? "1" : "0"), (isset($_POST['consoleview']) ? "1" : "0"), (isset($_POST['bookview']) ? "1" : "0"));
60
-			if ($_POST['password'] != "") {
61
-				$users->updatePassword($_POST["id"], $_POST['password']);
62
-			}
63
-			if ($_POST['rolechangedate'] != "") {
64
-				$users->updateUserRoleChangeDate($_POST["id"], $_POST["rolechangedate"]);
35
+		case 'add':
36
+			$user                += [
37
+				'role'        => $defaultRole,
38
+				'notes'       => '',
39
+				'invites'     => $defaultInvites,
40
+				'movieview'   => '1',
41
+				'xxxview'     => '1',
42
+				'musicview'   => '1',
43
+				'consoleview' => '1',
44
+				'gameview'    => '1',
45
+				'bookview'    => '1'
46
+			];
47
+			$page->smarty->assign('user', $user);
48
+			break;
49
+		case 'submit':
50
+
51
+			if ($_POST["id"] == "") {
52
+				$invites = $defaultinvites;
53
+				foreach ($userroles as $role) {
54
+					if ($role['id'] == $_POST['role'])
55
+						$invites = $role['defaultinvites'];
56
+				}
57
+				$ret = $users->signup($_POST["username"], $_POST["password"], $_POST["email"], '', $_POST["role"], $_POST["notes"], $invites, "", true);
58
+			} else {
59
+				$ret = $users->update($_POST["id"], $_POST["username"], $_POST["email"], $_POST["grabs"], $_POST["role"], $_POST["notes"], $_POST["invites"], (isset($_POST['movieview']) ? "1" : "0"), (isset($_POST['musicview']) ? "1" : "0"), (isset($_POST['gameview']) ? "1" : "0"), (isset($_POST['xxxview']) ? "1" : "0"), (isset($_POST['consoleview']) ? "1" : "0"), (isset($_POST['bookview']) ? "1" : "0"));
60
+				if ($_POST['password'] != "") {
61
+					$users->updatePassword($_POST["id"], $_POST['password']);
62
+				}
63
+				if ($_POST['rolechangedate'] != "") {
64
+					$users->updateUserRoleChangeDate($_POST["id"], $_POST["rolechangedate"]);
65
+				}
65 66
 			}
66
-		}
67 67
 
68
-		if ($ret >= 0) {
69
-			header("Location:" . WWW_TOP . "/user-list.php");
70
-		} else {
71
-			switch ($ret) {
68
+			if ($ret >= 0) {
69
+				header("Location:" . WWW_TOP . "/user-list.php");
70
+			} else {
71
+				switch ($ret) {
72 72
 				case Users::ERR_SIGNUP_BADUNAME:
73 73
 					$page->smarty->assign('error', "Bad username. Try a better one.");
74 74
 					break;
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 				default:
88 88
 					$page->smarty->assign('error', "Unknown save error.");
89 89
 					break;
90
-			}
90
+				}
91 91
 			$user = [
92 92
 				'id'        => $_POST["id"],
93 93
 				'username'  => $_POST["username"],
@@ -102,18 +102,18 @@  discard block
 block discarded – undo
102 102
 			$page->smarty->assign('user', $user);
103 103
 		}
104 104
 		break;
105
-	case 'view':
106
-	default:
105
+		case 'view':
106
+		default:
107 107
 
108
-	if (isset($_GET["id"])) {
109
-			$page->title = "User Edit";
110
-			$id = $_GET["id"];
111
-			$user = $users->getById($id);
108
+		if (isset($_GET["id"])) {
109
+				$page->title = "User Edit";
110
+				$id = $_GET["id"];
111
+				$user = $users->getById($id);
112 112
 
113
-			$page->smarty->assign('user', $user);
114
-		}
113
+				$page->smarty->assign('user', $user);
114
+			}
115 115
 
116
-		break;
116
+			break;
117 117
 }
118 118
 
119 119
 $page->smarty->assign('yesno_ids', array(1, 0));
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 
34 34
 switch ($action) {
35 35
 	case 'add':
36
-		$user                += [
36
+		$user += [
37 37
 			'role'        => $defaultRole,
38 38
 			'notes'       => '',
39 39
 			'invites'     => $defaultInvites,
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,9 @@
 block discarded – undo
51 51
 		if ($_POST["id"] == "") {
52 52
 			$invites = $defaultinvites;
53 53
 			foreach ($userroles as $role) {
54
-				if ($role['id'] == $_POST['role'])
55
-					$invites = $role['defaultinvites'];
54
+				if ($role['id'] == $_POST['role']) {
55
+									$invites = $role['defaultinvites'];
56
+				}
56 57
 			}
57 58
 			$ret = $users->signup($_POST["username"], $_POST["password"], $_POST["email"], '', $_POST["role"], $_POST["notes"], $invites, "", true);
58 59
 		} else {
Please login to merge, or discard this patch.
www/admin/regex-test.php 3 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -58,17 +58,17 @@
 block discarded – undo
58 58
 
59 59
 switch($action)
60 60
 {
61
-    case 'test':
62
-    	if (isset($_REQUEST["regex"]))
61
+	case 'test':
62
+		if (isset($_REQUEST["regex"]))
63 63
 		{
64
-            $matches = $reg->testRegex($_REQUEST['regex'], $group, $poster, $unreleased, $matchagainstbins);
64
+			$matches = $reg->testRegex($_REQUEST['regex'], $group, $poster, $unreleased, $matchagainstbins);
65 65
 
66
-            $offset = isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : 0;
66
+			$offset = isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : 0;
67 67
 			$page->smarty->assign('pagertotalitems',sizeof($matches));
68 68
 			$page->smarty->assign('pageroffset',$offset);
69 69
 			$page->smarty->assign('pageritemsperpage',ITEMS_PER_PAGE);
70
-            $page->smarty->assign('pagerquerybase', WWW_TOP."/regex-test.php?action=test&groupname={$groupname}&groupID={$groupID}&regex=".urlencode($regex)."&poster=".urlencode($poster)."&unreleased={$unreleased}&matchagainstbins={$matchagainstbins}&offset=");
71
-            $pager = $page->smarty->fetch("pager.tpl");
70
+			$page->smarty->assign('pagerquerybase', WWW_TOP."/regex-test.php?action=test&groupname={$groupname}&groupID={$groupID}&regex=".urlencode($regex)."&poster=".urlencode($poster)."&unreleased={$unreleased}&matchagainstbins={$matchagainstbins}&offset=");
71
+			$pager = $page->smarty->fetch("pager.tpl");
72 72
 			$page->smarty->assign('pager', $pager);
73 73
 
74 74
 			$matches = array_slice($matches, $offset, ITEMS_PER_PAGE);
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 $matchagainstbins = isset($_REQUEST['matchagainstbins']) ? $_REQUEST['matchagainstbins'] : '';
31 31
 $numarticles = (isset($_REQUEST['numarticles']) && !empty($_REQUEST['numarticles'])) ? $_REQUEST['numarticles'] : $numarticlesdefault;
32 32
 $clearexistingbins = isset($_REQUEST['clearexistingbins']) ? true : false;
33
-foreach($groupList as $grp)
33
+foreach ($groupList as $grp)
34 34
 {
35 35
 	$gid[$grp["id"]] = $grp["id"];
36 36
 	$gnames[$grp["id"]] = $grp["name"];
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 $page->smarty->assign('matchagainstbins', $matchagainstbins);
57 57
 $page->smarty->assign('numarticles', $numarticles);
58 58
 
59
-switch($action)
59
+switch ($action)
60 60
 {
61 61
     case 'test':
62 62
     	if (isset($_REQUEST["regex"]))
@@ -64,10 +64,10 @@  discard block
 block discarded – undo
64 64
             $matches = $reg->testRegex($_REQUEST['regex'], $group, $poster, $unreleased, $matchagainstbins);
65 65
 
66 66
             $offset = isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : 0;
67
-			$page->smarty->assign('pagertotalitems',sizeof($matches));
68
-			$page->smarty->assign('pageroffset',$offset);
69
-			$page->smarty->assign('pageritemsperpage',ITEMS_PER_PAGE);
70
-            $page->smarty->assign('pagerquerybase', WWW_TOP."/regex-test.php?action=test&groupname={$groupname}&groupID={$groupID}&regex=".urlencode($regex)."&poster=".urlencode($poster)."&unreleased={$unreleased}&matchagainstbins={$matchagainstbins}&offset=");
67
+			$page->smarty->assign('pagertotalitems', sizeof($matches));
68
+			$page->smarty->assign('pageroffset', $offset);
69
+			$page->smarty->assign('pageritemsperpage', ITEMS_PER_PAGE);
70
+            $page->smarty->assign('pagerquerybase', WWW_TOP . "/regex-test.php?action=test&groupname={$groupname}&groupID={$groupID}&regex=" . urlencode($regex) . "&poster=" . urlencode($poster) . "&unreleased={$unreleased}&matchagainstbins={$matchagainstbins}&offset=");
71 71
             $pager = $page->smarty->fetch("pager.tpl");
72 72
 			$page->smarty->assign('pager', $pager);
73 73
 
Please login to merge, or discard this patch.
Braces   +10 added lines, -13 removed lines patch added patch discarded remove patch
@@ -30,20 +30,19 @@  discard block
 block discarded – undo
30 30
 $matchagainstbins = isset($_REQUEST['matchagainstbins']) ? $_REQUEST['matchagainstbins'] : '';
31 31
 $numarticles = (isset($_REQUEST['numarticles']) && !empty($_REQUEST['numarticles'])) ? $_REQUEST['numarticles'] : $numarticlesdefault;
32 32
 $clearexistingbins = isset($_REQUEST['clearexistingbins']) ? true : false;
33
-foreach($groupList as $grp)
34
-{
33
+foreach($groupList as $grp) {
35 34
 	$gid[$grp["id"]] = $grp["id"];
36 35
 	$gnames[$grp["id"]] = $grp["name"];
37 36
 }
38 37
 
39 38
 $group = $groupname;
40
-if ($group == '')
41
-{
42
-	if ($groupID == 0)
43
-		$group = 0;
44
-	else
45
-		$group = $gnames[$groupID];
46
-}
39
+if ($group == '') {
40
+	if ($groupID == 0) {
41
+			$group = 0;
42
+	} else {
43
+			$group = $gnames[$groupID];
44
+	}
45
+	}
47 46
 
48 47
 $page->smarty->assign('gid', $gid);
49 48
 $page->smarty->assign('gnames', $gnames);
@@ -56,11 +55,9 @@  discard block
 block discarded – undo
56 55
 $page->smarty->assign('matchagainstbins', $matchagainstbins);
57 56
 $page->smarty->assign('numarticles', $numarticles);
58 57
 
59
-switch($action)
60
-{
58
+switch($action) {
61 59
     case 'test':
62
-    	if (isset($_REQUEST["regex"]))
63
-		{
60
+    	if (isset($_REQUEST["regex"])) {
64 61
             $matches = $reg->testRegex($_REQUEST['regex'], $group, $poster, $unreleased, $matchagainstbins);
65 62
 
66 63
             $offset = isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : 0;
Please login to merge, or discard this patch.