@@ -38,7 +38,9 @@ discard block |
||
38 | 38 | // fallback on HTTP parameters |
39 | 39 | if ($input) { |
40 | 40 | $input = json_decode($input, true); |
41 | - if ($input) $_REQUEST = $input; |
|
41 | + if ($input) { |
|
42 | + $_REQUEST = $input; |
|
43 | + } |
|
42 | 44 | } |
43 | 45 | } else { |
44 | 46 | // Accept JSON only |
@@ -55,7 +57,9 @@ discard block |
||
55 | 57 | |
56 | 58 | startup_gettext(); |
57 | 59 | |
58 | -if (!init_plugins()) return; |
|
60 | +if (!init_plugins()) { |
|
61 | + return; |
|
62 | +} |
|
59 | 63 | |
60 | 64 | if ($_SESSION["uid"]) { |
61 | 65 | if (!validate_session()) { |
@@ -14,7 +14,9 @@ |
||
14 | 14 | |
15 | 15 | $script_started = microtime(true); |
16 | 16 | |
17 | - if (!init_plugins()) return; |
|
17 | + if (!init_plugins()) { |
|
18 | + return; |
|
19 | + } |
|
18 | 20 | |
19 | 21 | if (ENABLE_GZIP_OUTPUT && function_exists("ob_gzhandler")) { |
20 | 22 | ob_start("ob_gzhandler"); |
@@ -18,7 +18,9 @@ discard block |
||
18 | 18 | |
19 | 19 | $action = $_REQUEST["action"]; |
20 | 20 | |
21 | - if (!init_plugins()) return; |
|
21 | + if (!init_plugins()) { |
|
22 | + return; |
|
23 | + } |
|
22 | 24 | |
23 | 25 | if ($_REQUEST["format"] == "feed") { |
24 | 26 | header("Content-Type: text/xml"); |
@@ -35,7 +37,9 @@ discard block |
||
35 | 37 | $num_users = db_fetch_result($result, 0, "cu"); |
36 | 38 | |
37 | 39 | $num_users = REG_MAX_USERS - $num_users; |
38 | - if ($num_users < 0) $num_users = 0; |
|
40 | + if ($num_users < 0) { |
|
41 | + $num_users = 0; |
|
42 | + } |
|
39 | 43 | $reg_suffix = "enabled"; |
40 | 44 | } else { |
41 | 45 | $num_users = 0; |
@@ -310,7 +314,9 @@ discard block |
||
310 | 314 | "subject" => "Registration information for Tiny Tiny RSS", |
311 | 315 | "message" => $reg_text]); |
312 | 316 | |
313 | - if (!$rc) print_error($mailer->error()); |
|
317 | + if (!$rc) { |
|
318 | + print_error($mailer->error()); |
|
319 | + } |
|
314 | 320 | |
315 | 321 | $reg_text = "Hi!\n". |
316 | 322 | "\n". |
@@ -324,7 +330,9 @@ discard block |
||
324 | 330 | "subject" => "Registration notice for Tiny Tiny RSS", |
325 | 331 | "message" => $reg_text]); |
326 | 332 | |
327 | - if (!$rc) print_error($mailer->error()); |
|
333 | + if (!$rc) { |
|
334 | + print_error($mailer->error()); |
|
335 | + } |
|
328 | 336 | |
329 | 337 | print_notice(__("Account created successfully.")); |
330 | 338 |
@@ -10,7 +10,9 @@ |
||
10 | 10 | require_once "db.php"; |
11 | 11 | require_once "db-prefs.php"; |
12 | 12 | |
13 | - if (!init_plugins()) return; |
|
13 | + if (!init_plugins()) { |
|
14 | + return; |
|
15 | + } |
|
14 | 16 | |
15 | 17 | $op = $_REQUEST['op']; |
16 | 18 |
@@ -17,7 +17,9 @@ |
||
17 | 17 | |
18 | 18 | $timestamp = filemtime($filename); |
19 | 19 | |
20 | - if ($query) $timestamp .= "&$query"; |
|
20 | + if ($query) { |
|
21 | + $timestamp .= "&$query"; |
|
22 | + } |
|
21 | 23 | |
22 | 24 | return "<script type=\"text/javascript\" charset=\"utf-8\" src=\"$filename?$timestamp\"></script>\n"; |
23 | 25 | } |
@@ -26,7 +26,9 @@ |
||
26 | 26 | require_once "config.php"; |
27 | 27 | require_once "db-prefs.php"; |
28 | 28 | |
29 | - if (!init_plugins()) return; |
|
29 | + if (!init_plugins()) { |
|
30 | + return; |
|
31 | + } |
|
30 | 32 | |
31 | 33 | login_sequence(); |
32 | 34 |
@@ -47,7 +47,9 @@ |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | public function hook_prefs_tab($args) { |
50 | - if ($args != "prefPrefs") return; |
|
50 | + if ($args != "prefPrefs") { |
|
51 | + return; |
|
52 | + } |
|
51 | 53 | |
52 | 54 | print "<div dojoType=\"dijit.layout.AccordionPane\" |
53 | 55 | title=\"<i class='material-icons'>extension</i> ".__("NSFW Plugin")."\">"; |
@@ -44,10 +44,16 @@ |
||
44 | 44 | $try_login = $_SERVER["REMOTE_USER"]; |
45 | 45 | |
46 | 46 | // php-cgi |
47 | - if (!$try_login) $try_login = $_SERVER["REDIRECT_REMOTE_USER"]; |
|
48 | - if (!$try_login) $try_login = $_SERVER["PHP_AUTH_USER"]; |
|
47 | + if (!$try_login) { |
|
48 | + $try_login = $_SERVER["REDIRECT_REMOTE_USER"]; |
|
49 | + } |
|
50 | + if (!$try_login) { |
|
51 | + $try_login = $_SERVER["PHP_AUTH_USER"]; |
|
52 | + } |
|
49 | 53 | |
50 | - if (!$try_login) $try_login = $this->get_login_by_ssl_certificate(); |
|
54 | + if (!$try_login) { |
|
55 | + $try_login = $this->get_login_by_ssl_certificate(); |
|
56 | + } |
|
51 | 57 | |
52 | 58 | if ($try_login) { |
53 | 59 | $user_id = $this->base->auto_create_user($try_login, $password); |
@@ -30,7 +30,9 @@ discard block |
||
30 | 30 | } |
31 | 31 | |
32 | 32 | public function hook_prefs_tab($args) { |
33 | - if ($args != "prefPrefs") return; |
|
33 | + if ($args != "prefPrefs") { |
|
34 | + return; |
|
35 | + } |
|
34 | 36 | |
35 | 37 | print "<div dojoType=\"dijit.layout.AccordionPane\" |
36 | 38 | title=\"<i class='material-icons'>mail</i> ".__('Mail plugin')."\">"; |
@@ -94,7 +96,9 @@ discard block |
||
94 | 96 | $user_name = htmlspecialchars($row['full_name']); |
95 | 97 | } |
96 | 98 | |
97 | - if (!$user_name) $user_name = $_SESSION['name']; |
|
99 | + if (!$user_name) { |
|
100 | + $user_name = $_SESSION['name']; |
|
101 | + } |
|
98 | 102 | |
99 | 103 | print_hidden("from_email", "$user_email"); |
100 | 104 | print_hidden("from_name", "$user_name"); |
@@ -120,8 +124,9 @@ discard block |
||
120 | 124 | |
121 | 125 | while ($line = $sth->fetch()) { |
122 | 126 | |
123 | - if (!$subject) |
|
124 | - $subject = __("[Forwarded]") . " " . htmlspecialchars($line["title"]); |
|
127 | + if (!$subject) { |
|
128 | + $subject = __("[Forwarded]") . " " . htmlspecialchars($line["title"]); |
|
129 | + } |
|
125 | 130 | |
126 | 131 | $tpl->setVariable('ARTICLE_TITLE', strip_tags($line["title"])); |
127 | 132 | $tnote = strip_tags($line["note"]); |