@@ -16,9 +16,9 @@ discard block |
||
16 | 16 | |
17 | 17 | switch($action) |
18 | 18 | { |
19 | - case 'submit': |
|
20 | - if ($_POST["id"] == "") |
|
21 | - { |
|
19 | + case 'submit': |
|
20 | + if ($_POST["id"] == "") |
|
21 | + { |
|
22 | 22 | $reg->add($_POST); |
23 | 23 | } |
24 | 24 | else |
@@ -27,14 +27,14 @@ discard block |
||
27 | 27 | } |
28 | 28 | header("Location:".WWW_TOP."/regex-list.php"); |
29 | 29 | break; |
30 | - case 'addtest': |
|
31 | - if (isset($_GET['regex']) && isset($_GET['groupname'])) { |
|
32 | - $r = array('groupname'=>$_GET['groupname'], 'regex'=>$_GET['regex'], 'ordinal'=>'1', 'status'=>'1'); |
|
33 | - $page->smarty->assign('regex', $r); |
|
34 | - } |
|
35 | - break; |
|
36 | - case 'view': |
|
37 | - default: |
|
30 | + case 'addtest': |
|
31 | + if (isset($_GET['regex']) && isset($_GET['groupname'])) { |
|
32 | + $r = array('groupname'=>$_GET['groupname'], 'regex'=>$_GET['regex'], 'ordinal'=>'1', 'status'=>'1'); |
|
33 | + $page->smarty->assign('regex', $r); |
|
34 | + } |
|
35 | + break; |
|
36 | + case 'view': |
|
37 | + default: |
|
38 | 38 | |
39 | 39 | $page->title = "Release Regex Add"; |
40 | 40 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | } |
54 | 54 | $page->smarty->assign('regex', $r); |
55 | 55 | |
56 | - break; |
|
56 | + break; |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | $page->smarty->assign('status_ids', array(Category::STATUS_ACTIVE,Category::STATUS_INACTIVE)); |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | // set the current action |
15 | 15 | $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view'; |
16 | 16 | |
17 | -switch($action) |
|
17 | +switch ($action) |
|
18 | 18 | { |
19 | 19 | case 'submit': |
20 | 20 | if ($_POST["id"] == "") |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | { |
26 | 26 | $ret = $reg->update($_POST); |
27 | 27 | } |
28 | - header("Location:".WWW_TOP."/regex-list.php"); |
|
28 | + header("Location:" . WWW_TOP . "/regex-list.php"); |
|
29 | 29 | break; |
30 | 30 | case 'addtest': |
31 | 31 | if (isset($_GET['regex']) && isset($_GET['groupname'])) { |
@@ -56,10 +56,10 @@ discard block |
||
56 | 56 | break; |
57 | 57 | } |
58 | 58 | |
59 | -$page->smarty->assign('status_ids', array(Category::STATUS_ACTIVE,Category::STATUS_INACTIVE)); |
|
60 | -$page->smarty->assign('status_names', array( 'Yes', 'No')); |
|
59 | +$page->smarty->assign('status_ids', array(Category::STATUS_ACTIVE, Category::STATUS_INACTIVE)); |
|
60 | +$page->smarty->assign('status_names', array('Yes', 'No')); |
|
61 | 61 | |
62 | -$page->smarty->assign('catlist',$category->getForSelect(true)); |
|
62 | +$page->smarty->assign('catlist', $category->getForSelect(true)); |
|
63 | 63 | |
64 | 64 | $page->content = $page->smarty->fetch('regex-edit.tpl'); |
65 | 65 | $page->render(); |
@@ -14,15 +14,11 @@ discard block |
||
14 | 14 | // set the current action |
15 | 15 | $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view'; |
16 | 16 | |
17 | -switch($action) |
|
18 | -{ |
|
17 | +switch($action) { |
|
19 | 18 | case 'submit': |
20 | - if ($_POST["id"] == "") |
|
21 | - { |
|
19 | + if ($_POST["id"] == "") { |
|
22 | 20 | $reg->add($_POST); |
23 | - } |
|
24 | - else |
|
25 | - { |
|
21 | + } else { |
|
26 | 22 | $ret = $reg->update($_POST); |
27 | 23 | } |
28 | 24 | header("Location:".WWW_TOP."/regex-list.php"); |
@@ -38,16 +34,13 @@ discard block |
||
38 | 34 | |
39 | 35 | $page->title = "Release Regex Add"; |
40 | 36 | |
41 | - if (isset($_GET["id"])) |
|
42 | - { |
|
37 | + if (isset($_GET["id"])) { |
|
43 | 38 | $page->title = "Release Regex Edit"; |
44 | 39 | $id = $_GET["id"]; |
45 | 40 | |
46 | 41 | $r = $reg->getByID($id); |
47 | 42 | |
48 | - } |
|
49 | - else |
|
50 | - { |
|
43 | + } else { |
|
51 | 44 | $r = []; |
52 | 45 | $r["status"] = 1; |
53 | 46 | } |
@@ -28,6 +28,5 @@ |
||
28 | 28 | (isset($argv[2]) && is_numeric($argv[2]) && $argv[2] > 0 ? $argv[2] : $maxHeaders)); |
29 | 29 | } |
30 | 30 | } else { |
31 | - $binaries->updateAllGroups((isset($argv[1]) && is_numeric($argv[1]) && $argv[1] > 0 ? $argv[1] : |
|
32 | - $maxHeaders)); |
|
31 | + $binaries->updateAllGroups((isset($argv[1]) && is_numeric($argv[1]) && $argv[1] > 0 ? $argv[1] : $maxHeaders)); |
|
33 | 32 | } |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(ticks=1); |
|
2 | +declare(ticks = 1); |
|
3 | 3 | require('.do_not_run/require.php'); |
4 | 4 | |
5 | 5 | use nntmux\libraries\Forking; |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(ticks=1); |
|
2 | +declare(ticks = 1); |
|
3 | 3 | require('.do_not_run/require.php'); |
4 | 4 | |
5 | 5 | use \nntmux\libraries\Forking; |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(ticks=1); |
|
2 | +declare(ticks = 1); |
|
3 | 3 | require('.do_not_run/require.php'); |
4 | 4 | use nntmux\libraries\Forking; |
5 | 5 | // Check if argument 1 is numeric, which is to limit article count. |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(ticks=1); |
|
2 | +declare(ticks = 1); |
|
3 | 3 | require('.do_not_run/require.php'); |
4 | 4 | |
5 | 5 | use nntmux\libraries\ForkingImportNZB; |
@@ -4,7 +4,7 @@ |
||
4 | 4 | 'Argument 1 => (Number) Set to 0 to ignore, else fetches up to x new headers for every active group.' . PHP_EOL |
5 | 5 | ); |
6 | 6 | } |
7 | -declare(ticks=1); |
|
7 | +declare(ticks = 1); |
|
8 | 8 | require('.do_not_run/require.php'); |
9 | 9 | use nntmux\libraries\Forking; |
10 | 10 | (new Forking())->processWorkType('binaries', array(0 => $argv[1])); |
11 | 11 | \ No newline at end of file |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(ticks=1); |
|
2 | +declare(ticks = 1); |
|
3 | 3 | require('.do_not_run/require.php'); |
4 | 4 | |
5 | 5 | use \nntmux\libraries\Forking; |
@@ -7,13 +7,13 @@ |
||
7 | 7 | 'mov => Do movie processing.' . PHP_EOL . |
8 | 8 | 'nfo => Do NFO processing.' . PHP_EOL . |
9 | 9 | 'sha => Do sharing processing, this does not use multi-processing.' . PHP_EOL . |
10 | - 'tv => Do TV processing.' . PHP_EOL . PHP_EOL . |
|
10 | + 'tv => Do TV processing.' . PHP_EOL . PHP_EOL . |
|
11 | 11 | 'Second argument (optional):' . PHP_EOL . |
12 | 12 | 'true|false => Only post-process renamed releases. This is for the mov|tv options.' . PHP_EOL |
13 | 13 | ); |
14 | 14 | } |
15 | 15 | |
16 | -declare(ticks=1); |
|
16 | +declare(ticks = 1); |
|
17 | 17 | require('.do_not_run/require.php'); |
18 | 18 | |
19 | 19 | use nntmux\libraries\Forking; |