@@ -7,7 +7,7 @@ |
||
7 | 7 | ); |
8 | 8 | } |
9 | 9 | |
10 | -declare(ticks=1); |
|
10 | +declare(ticks = 1); |
|
11 | 11 | require('.do_not_run/require.php'); |
12 | 12 | |
13 | 13 | use \nntmux\libraries\Forking; |
@@ -7,7 +7,7 @@ |
||
7 | 7 | ); |
8 | 8 | } |
9 | 9 | |
10 | -declare(ticks=1); |
|
10 | +declare(ticks = 1); |
|
11 | 11 | require('.do_not_run/require.php'); |
12 | 12 | |
13 | 13 | use \nntmux\libraries\Forking; |
@@ -13,19 +13,19 @@ discard block |
||
13 | 13 | |
14 | 14 | function handleError($errno, $errstr, $errfile, $errline, array $errcontext) |
15 | 15 | { |
16 | - // error was suppressed with the @-operator |
|
17 | - if (0 === error_reporting()) { |
|
18 | - return false; |
|
19 | - } |
|
16 | + // error was suppressed with the @-operator |
|
17 | + if (0 === error_reporting()) { |
|
18 | + return false; |
|
19 | + } |
|
20 | 20 | |
21 | - throw new ErrorException($errstr, 0, $errno, $errfile, $errline); |
|
21 | + throw new ErrorException($errstr, 0, $errno, $errfile, $errline); |
|
22 | 22 | } |
23 | 23 | set_error_handler('handleError'); |
24 | 24 | |
25 | 25 | $regs = array( |
26 | - "empty" => "", |
|
27 | - "illformed" => "[](9()))))))))) [34543/34]", |
|
28 | - "simple" => '"data.mp3', |
|
26 | + "empty" => "", |
|
27 | + "illformed" => "[](9()))))))))) [34543/34]", |
|
28 | + "simple" => '"data.mp3', |
|
29 | 29 | ); |
30 | 30 | |
31 | 31 | $releases = new Releases(); |
@@ -40,17 +40,17 @@ discard block |
||
40 | 40 | foreach ($res as $regexrow) |
41 | 41 | { |
42 | 42 | foreach ($regs as $regex){ |
43 | - try { |
|
44 | - $res=preg_match($regexrow["regex"], $regex); |
|
45 | - }catch(Exception $e){ |
|
46 | - $errcnt++; |
|
47 | - $strerr=str_pad((int) $errcnt,2," ",STR_PAD_LEFT); |
|
48 | - echo "$strerr. id=".$regexrow["id"]. |
|
49 | - ", group=".$regexrow["groupname"]."\n"; |
|
50 | - echo " regex='".$regexrow["regex"]."'\n"; |
|
51 | - echo " error=".$e->getMessage()."\n\n"; |
|
52 | - break; |
|
53 | - } |
|
43 | + try { |
|
44 | + $res=preg_match($regexrow["regex"], $regex); |
|
45 | + }catch(Exception $e){ |
|
46 | + $errcnt++; |
|
47 | + $strerr=str_pad((int) $errcnt,2," ",STR_PAD_LEFT); |
|
48 | + echo "$strerr. id=".$regexrow["id"]. |
|
49 | + ", group=".$regexrow["groupname"]."\n"; |
|
50 | + echo " regex='".$regexrow["regex"]."'\n"; |
|
51 | + echo " error=".$e->getMessage()."\n\n"; |
|
52 | + break; |
|
53 | + } |
|
54 | 54 | } |
55 | 55 | } |
56 | 56 | echo "Scanned $total record(s), $errcnt error(s) found.\n"; |
@@ -33,25 +33,25 @@ |
||
33 | 33 | # fetch enabled regular expression |
34 | 34 | $catsql = "select ID,groupname,regex from releaseregex where status = 1"; |
35 | 35 | $res = $db->query($catsql); |
36 | -$total=count($res); |
|
37 | -$errcnt=0; |
|
36 | +$total = count($res); |
|
37 | +$errcnt = 0; |
|
38 | 38 | |
39 | 39 | echo "\n"; |
40 | 40 | foreach ($res as $regexrow) |
41 | 41 | { |
42 | - foreach ($regs as $regex){ |
|
42 | + foreach ($regs as $regex) { |
|
43 | 43 | try { |
44 | - $res=preg_match($regexrow["regex"], $regex); |
|
45 | - }catch(Exception $e){ |
|
44 | + $res = preg_match($regexrow["regex"], $regex); |
|
45 | + } catch (Exception $e) { |
|
46 | 46 | $errcnt++; |
47 | - $strerr=str_pad((int) $errcnt,2," ",STR_PAD_LEFT); |
|
48 | - echo "$strerr. id=".$regexrow["id"]. |
|
49 | - ", group=".$regexrow["groupname"]."\n"; |
|
50 | - echo " regex='".$regexrow["regex"]."'\n"; |
|
51 | - echo " error=".$e->getMessage()."\n\n"; |
|
47 | + $strerr = str_pad((int)$errcnt, 2, " ", STR_PAD_LEFT); |
|
48 | + echo "$strerr. id=" . $regexrow["id"] . |
|
49 | + ", group=" . $regexrow["groupname"] . "\n"; |
|
50 | + echo " regex='" . $regexrow["regex"] . "'\n"; |
|
51 | + echo " error=" . $e->getMessage() . "\n\n"; |
|
52 | 52 | break; |
53 | 53 | } |
54 | 54 | } |
55 | 55 | } |
56 | 56 | echo "Scanned $total record(s), $errcnt error(s) found.\n"; |
57 | -exit(($errcnt>0)?1:0); |
|
57 | +exit(($errcnt > 0) ? 1 : 0); |
@@ -37,12 +37,11 @@ |
||
37 | 37 | $errcnt=0; |
38 | 38 | |
39 | 39 | echo "\n"; |
40 | -foreach ($res as $regexrow) |
|
41 | -{ |
|
42 | - foreach ($regs as $regex){ |
|
40 | +foreach ($res as $regexrow) { |
|
41 | + foreach ($regs as $regex) { |
|
43 | 42 | try { |
44 | 43 | $res=preg_match($regexrow["regex"], $regex); |
45 | - }catch(Exception $e){ |
|
44 | + } catch(Exception $e) { |
|
46 | 45 | $errcnt++; |
47 | 46 | $strerr=str_pad((int) $errcnt,2," ",STR_PAD_LEFT); |
48 | 47 | echo "$strerr. id=".$regexrow["id"]. |
@@ -53,5 +53,5 @@ |
||
53 | 53 | } |
54 | 54 | } |
55 | 55 | } |
56 | -echo "Scanned $total record(s), $errcnt error(s) found.\n"; |
|
56 | +echo "scanned $total record(s), $errcnt error(s) found.\n"; |
|
57 | 57 | exit(($errcnt>0)?1:0); |
@@ -26,14 +26,11 @@ |
||
26 | 26 | $page->meta_description = ""; |
27 | 27 | $page->smarty->registerPlugin('modifier', 'ss', 'stripslashes'); |
28 | 28 | |
29 | - if (isset($_GET['modal'])) |
|
30 | - { |
|
29 | + if (isset($_GET['modal'])) { |
|
31 | 30 | $page->content = $page->smarty->fetch('viewxxx.tpl'); |
32 | 31 | $page->smarty->assign('modal', true); |
33 | 32 | echo $page->content; |
34 | - } |
|
35 | - else |
|
36 | - { |
|
33 | + } else { |
|
37 | 34 | $page->content = $page->smarty->fetch('viewxxxfull.tpl'); |
38 | 35 | $page->render(); |
39 | 36 | } |
@@ -6,14 +6,14 @@ |
||
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); |
@@ -6,8 +6,7 @@ |
||
6 | 6 | |
7 | 7 | $page = new AdminPage(); |
8 | 8 | |
9 | -if (isset($_GET['id'])) |
|
10 | -{ |
|
9 | +if (isset($_GET['id'])) { |
|
11 | 10 | $users = new Users(); |
12 | 11 | $users->deleteRole($_GET['id']); |
13 | 12 | } |
@@ -6,8 +6,7 @@ |
||
6 | 6 | |
7 | 7 | $page = new AdminPage(); |
8 | 8 | |
9 | -if (isset($_GET['id'])) |
|
10 | -{ |
|
9 | +if (isset($_GET['id'])) { |
|
11 | 10 | $users = new Users(); |
12 | 11 | $users->deleteRole($_GET['id']); |
13 | 12 | } |
@@ -6,8 +6,7 @@ |
||
6 | 6 | |
7 | 7 | $page = new AdminPage(); |
8 | 8 | |
9 | -if (isset($_GET['id'])) |
|
10 | -{ |
|
9 | +if (isset($_GET['id'])) { |
|
11 | 10 | $users = new Users(); |
12 | 11 | $users->deleteRole($_GET['id']); |
13 | 12 | } |
@@ -6,8 +6,7 @@ |
||
6 | 6 | |
7 | 7 | $page = new AdminPage(); |
8 | 8 | |
9 | -if (isset($_GET['id'])) |
|
10 | -{ |
|
9 | +if (isset($_GET['id'])) { |
|
11 | 10 | $users = new Users(); |
12 | 11 | $users->deleteRole($_GET['id']); |
13 | 12 | } |