@@ -38,17 +38,17 @@ discard block |
||
38 | 38 | var $error = 0; // public variable that holds error code (0 if no error) |
39 | 39 | |
40 | 40 | //private: |
41 | - var $BYTEORDER = 0; // 0: low endian, 1: big endian |
|
41 | + var $BYTEORDER = 0; // 0: low endian, 1: big endian |
|
42 | 42 | var $STREAM = NULL; |
43 | 43 | var $short_circuit = false; |
44 | 44 | var $enable_cache = false; |
45 | - var $originals = NULL; // offset of original table |
|
46 | - var $translations = NULL; // offset of translation table |
|
47 | - var $pluralheader = NULL; // cache header field for plural forms |
|
48 | - var $total = 0; // total string count |
|
49 | - var $table_originals = NULL; // table for original strings (offsets) |
|
50 | - var $table_translations = NULL; // table for translated strings (offsets) |
|
51 | - var $cache_translations = NULL; // original -> translation mapping |
|
45 | + var $originals = NULL; // offset of original table |
|
46 | + var $translations = NULL; // offset of translation table |
|
47 | + var $pluralheader = NULL; // cache header field for plural forms |
|
48 | + var $total = 0; // total string count |
|
49 | + var $table_originals = NULL; // table for original strings (offsets) |
|
50 | + var $table_translations = NULL; // table for translated strings (offsets) |
|
51 | + var $cache_translations = NULL; // original -> translation mapping |
|
52 | 52 | |
53 | 53 | |
54 | 54 | /* Methods */ |
@@ -63,11 +63,11 @@ discard block |
||
63 | 63 | function readint() { |
64 | 64 | if ($this->BYTEORDER == 0) { |
65 | 65 | // low endian |
66 | - $input=unpack('V', $this->STREAM->read(4)); |
|
66 | + $input = unpack('V', $this->STREAM->read(4)); |
|
67 | 67 | return array_shift($input); |
68 | 68 | } else { |
69 | 69 | // big endian |
70 | - $input=unpack('N', $this->STREAM->read(4)); |
|
70 | + $input = unpack('N', $this->STREAM->read(4)); |
|
71 | 71 | return array_shift($input); |
72 | 72 | } |
73 | 73 | } |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | */ |
101 | 101 | function __construct($Reader, $enable_cache = true) { |
102 | 102 | // If there isn't a StreamReader, turn on short circuit mode. |
103 | - if (! $Reader || isset($Reader->error) ) { |
|
103 | + if (!$Reader || isset($Reader->error)) { |
|
104 | 104 | $this->short_circuit = true; |
105 | 105 | return; |
106 | 106 | } |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | } |
155 | 155 | |
156 | 156 | if ($this->enable_cache) { |
157 | - $this->cache_translations = array (); |
|
157 | + $this->cache_translations = array(); |
|
158 | 158 | /* read all strings in the cache */ |
159 | 159 | for ($i = 0; $i < $this->total; $i++) { |
160 | 160 | $this->STREAM->seekto($this->table_originals[$i * 2 + 2]); |
@@ -176,11 +176,11 @@ discard block |
||
176 | 176 | function get_original_string($num) { |
177 | 177 | $length = $this->table_originals[$num * 2 + 1]; |
178 | 178 | $offset = $this->table_originals[$num * 2 + 2]; |
179 | - if (! $length) |
|
179 | + if (!$length) |
|
180 | 180 | return ''; |
181 | 181 | $this->STREAM->seekto($offset); |
182 | 182 | $data = $this->STREAM->read($length); |
183 | - return (string)$data; |
|
183 | + return (string) $data; |
|
184 | 184 | } |
185 | 185 | |
186 | 186 | /** |
@@ -193,11 +193,11 @@ discard block |
||
193 | 193 | function get_translation_string($num) { |
194 | 194 | $length = $this->table_translations[$num * 2 + 1]; |
195 | 195 | $offset = $this->table_translations[$num * 2 + 2]; |
196 | - if (! $length) |
|
196 | + if (!$length) |
|
197 | 197 | return ''; |
198 | 198 | $this->STREAM->seekto($offset); |
199 | 199 | $data = $this->STREAM->read($length); |
200 | - return (string)$data; |
|
200 | + return (string) $data; |
|
201 | 201 | } |
202 | 202 | |
203 | 203 | /** |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | return $this->find_string($string, $end, $start); |
228 | 228 | } else { |
229 | 229 | // Divide table in two parts |
230 | - $half = (int)(($start + $end) / 2); |
|
230 | + $half = (int) (($start + $end) / 2); |
|
231 | 231 | $cmp = strcmp($string, $this->get_original_string($half)); |
232 | 232 | if ($cmp == 0) |
233 | 233 | // string is exactly in the middle => return it |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | $res .= ') : ('; |
295 | 295 | break; |
296 | 296 | case ';': |
297 | - $res .= str_repeat( ')', $p) . ';'; |
|
297 | + $res .= str_repeat(')', $p).';'; |
|
298 | 298 | $p = 0; |
299 | 299 | break; |
300 | 300 | default: |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | $this->load_tables(); |
331 | 331 | |
332 | 332 | // cache header field for plural forms |
333 | - if (! is_string($this->pluralheader)) { |
|
333 | + if (!is_string($this->pluralheader)) { |
|
334 | 334 | if ($this->enable_cache) { |
335 | 335 | $header = $this->cache_translations[""]; |
336 | 336 | } else { |
@@ -352,12 +352,12 @@ discard block |
||
352 | 352 | function select_string($n) { |
353 | 353 | if (!is_int($n)) { |
354 | 354 | throw new InvalidArgumentException( |
355 | - "Select_string only accepts integers: " . $n); |
|
355 | + "Select_string only accepts integers: ".$n); |
|
356 | 356 | } |
357 | 357 | $string = $this->get_plural_forms(); |
358 | - $string = str_replace('nplurals',"\$total",$string); |
|
359 | - $string = str_replace("n",$n,$string); |
|
360 | - $string = str_replace('plural',"\$plural",$string); |
|
358 | + $string = str_replace('nplurals', "\$total", $string); |
|
359 | + $string = str_replace("n", $n, $string); |
|
360 | + $string = str_replace('plural', "\$plural", $string); |
|
361 | 361 | |
362 | 362 | $total = 0; |
363 | 363 | $plural = 0; |
@@ -388,11 +388,11 @@ discard block |
||
388 | 388 | $select = $this->select_string($number); |
389 | 389 | |
390 | 390 | // this should contains all strings separated by NULLs |
391 | - $key = $single . chr(0) . $plural; |
|
391 | + $key = $single.chr(0).$plural; |
|
392 | 392 | |
393 | 393 | |
394 | 394 | if ($this->enable_cache) { |
395 | - if (! array_key_exists($key, $this->cache_translations)) { |
|
395 | + if (!array_key_exists($key, $this->cache_translations)) { |
|
396 | 396 | return ($number != 1) ? $plural : $single; |
397 | 397 | } else { |
398 | 398 | $result = $this->cache_translations[$key]; |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | } |
413 | 413 | |
414 | 414 | function pgettext($context, $msgid) { |
415 | - $key = $context . chr(4) . $msgid; |
|
415 | + $key = $context.chr(4).$msgid; |
|
416 | 416 | $ret = $this->translate($key); |
417 | 417 | if (strpos($ret, "\004") !== FALSE) { |
418 | 418 | return $msgid; |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | } |
423 | 423 | |
424 | 424 | function npgettext($context, $singular, $plural, $number) { |
425 | - $key = $context . chr(4) . $singular; |
|
425 | + $key = $context.chr(4).$singular; |
|
426 | 426 | $ret = $this->ngettext($key, $plural, $number); |
427 | 427 | if (strpos($ret, "\004") !== FALSE) { |
428 | 428 | return $singular; |
@@ -12,11 +12,11 @@ |
||
12 | 12 | // we need a separate check here because functions.php might get parsed |
13 | 13 | // incorrectly before 5.3 because of :: syntax. |
14 | 14 | if (version_compare(PHP_VERSION, '5.6.0', '<')) { |
15 | - print "<b>Fatal Error</b>: PHP version 5.6.0 or newer required. You're using " . PHP_VERSION . ".\n"; |
|
15 | + print "<b>Fatal Error</b>: PHP version 5.6.0 or newer required. You're using ".PHP_VERSION.".\n"; |
|
16 | 16 | exit; |
17 | 17 | } |
18 | 18 | |
19 | - set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR . |
|
19 | + set_include_path(dirname(__FILE__)."/include".PATH_SEPARATOR. |
|
20 | 20 | get_include_path()); |
21 | 21 | |
22 | 22 | require_once "autoload.php"; |
@@ -6,10 +6,10 @@ |
||
6 | 6 | |
7 | 7 | $ERRORS[0] = ""; |
8 | 8 | |
9 | -$ERRORS[1] = __("This program requires XmlHttpRequest " . |
|
9 | +$ERRORS[1] = __("This program requires XmlHttpRequest ". |
|
10 | 10 | "to function properly. Your browser doesn't seem to support it."); |
11 | 11 | |
12 | -$ERRORS[2] = __("This program requires cookies " . |
|
12 | +$ERRORS[2] = __("This program requires cookies ". |
|
13 | 13 | "to function properly. Your browser doesn't seem to support them."); |
14 | 14 | |
15 | 15 | $ERRORS[3] = __("Backend sanity check failed."); |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | $new_feed_id = $row['id']; |
238 | 238 | } else { |
239 | 239 | $row = $this->pdo->query("SELECT MAX(id) AS id FROM ttrss_archived_feeds")->fetch(); |
240 | - $new_feed_id = (int)$row['id'] + 1; |
|
240 | + $new_feed_id = (int) $row['id'] + 1; |
|
241 | 241 | |
242 | 242 | $sth = $this->pdo->prepare("INSERT INTO ttrss_archived_feeds |
243 | 243 | (id, owner_uid, title, feed_url, site_url, created) |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | /* GET["cmode"] = 0 - mark as read, 1 - as unread, 2 - toggle */ |
288 | 288 | public function catchupSelected() { |
289 | 289 | $ids = explode(",", clean($_REQUEST["ids"])); |
290 | - $cmode = (int)clean($_REQUEST["cmode"]); |
|
290 | + $cmode = (int) clean($_REQUEST["cmode"]); |
|
291 | 291 | |
292 | 292 | Article::catchupArticlesById($ids, $cmode); |
293 | 293 | |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | |
297 | 297 | public function markSelected() { |
298 | 298 | $ids = explode(",", clean($_REQUEST["ids"])); |
299 | - $cmode = (int)clean($_REQUEST["cmode"]); |
|
299 | + $cmode = (int) clean($_REQUEST["cmode"]); |
|
300 | 300 | |
301 | 301 | $this->markArticlesById($ids, $cmode); |
302 | 302 | |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | |
306 | 306 | public function publishSelected() { |
307 | 307 | $ids = explode(",", clean($_REQUEST["ids"])); |
308 | - $cmode = (int)clean($_REQUEST["cmode"]); |
|
308 | + $cmode = (int) clean($_REQUEST["cmode"]); |
|
309 | 309 | |
310 | 310 | $this->publishArticlesById($ids, $cmode); |
311 | 311 | |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | |
343 | 343 | print "<ul>"; |
344 | 344 | while ($line = $sth->fetch()) { |
345 | - print "<li>" . $line["caption"] . "</li>"; |
|
345 | + print "<li>".$line["caption"]."</li>"; |
|
346 | 346 | } |
347 | 347 | print "</ul>"; |
348 | 348 | } |
@@ -578,7 +578,7 @@ discard block |
||
578 | 578 | |
579 | 579 | if ($msg) { |
580 | 580 | Logger::get()->log_error(E_USER_WARNING, |
581 | - $msg, 'client-js:' . $file, $line, $context); |
|
581 | + $msg, 'client-js:'.$file, $line, $context); |
|
582 | 582 | |
583 | 583 | echo json_encode(array("message" => "HOST_ERROR_LOGGED")); |
584 | 584 | } else { |
@@ -602,7 +602,7 @@ discard block |
||
602 | 602 | $content = json_decode($content, true); |
603 | 603 | |
604 | 604 | if ($content && isset($content["changeset"])) { |
605 | - if ($git_timestamp < (int)$content["changeset"]["timestamp"] && |
|
605 | + if ($git_timestamp < (int) $content["changeset"]["timestamp"] && |
|
606 | 606 | $git_commit != $content["changeset"]["id"]) { |
607 | 607 | |
608 | 608 | $rv = $content["changeset"]; |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | public static function create_published_article($title, $url, $content, $labels_str, |
31 | 31 | $owner_uid) { |
32 | 32 | |
33 | - $guid = 'SHA1:' . sha1("ttshared:" . $url . $owner_uid); // include owner_uid to prevent global GUID clash |
|
33 | + $guid = 'SHA1:'.sha1("ttshared:".$url.$owner_uid); // include owner_uid to prevent global GUID clash |
|
34 | 34 | |
35 | 35 | if (!$content) { |
36 | 36 | $pluginhost = new PluginHost(); |
@@ -85,12 +85,12 @@ discard block |
||
85 | 85 | content = ?, content_hash = ? WHERE id = ?"); |
86 | 86 | $sth->execute([$content, $content_hash, $ref_id]); |
87 | 87 | |
88 | - if (DB_TYPE == "pgsql"){ |
|
88 | + if (DB_TYPE == "pgsql") { |
|
89 | 89 | $sth = $pdo->prepare("UPDATE ttrss_entries |
90 | 90 | SET tsvector_combined = to_tsvector( :ts_content) |
91 | 91 | WHERE id = :id"); |
92 | 92 | $params = [ |
93 | - ":ts_content" => mb_substr(strip_tags($content ), 0, 900000), |
|
93 | + ":ts_content" => mb_substr(strip_tags($content), 0, 900000), |
|
94 | 94 | ":id" => $ref_id]; |
95 | 95 | $sth->execute($params); |
96 | 96 | } |
@@ -130,12 +130,12 @@ discard block |
||
130 | 130 | |
131 | 131 | if ($row = $sth->fetch()) { |
132 | 132 | $ref_id = $row["id"]; |
133 | - if (DB_TYPE == "pgsql"){ |
|
133 | + if (DB_TYPE == "pgsql") { |
|
134 | 134 | $sth = $pdo->prepare("UPDATE ttrss_entries |
135 | 135 | SET tsvector_combined = to_tsvector( :ts_content) |
136 | 136 | WHERE id = :id"); |
137 | 137 | $params = [ |
138 | - ":ts_content" => mb_substr(strip_tags($content ), 0, 900000), |
|
138 | + ":ts_content" => mb_substr(strip_tags($content), 0, 900000), |
|
139 | 139 | ":id" => $ref_id]; |
140 | 140 | $sth->execute($params); |
141 | 141 | } |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | print_hidden("op", "article"); |
174 | 174 | print_hidden("method", "setArticleTags"); |
175 | 175 | |
176 | - print "<header class='horizontal'>" . __("Tags for this article (separated by commas):")."</header>"; |
|
176 | + print "<header class='horizontal'>".__("Tags for this article (separated by commas):")."</header>"; |
|
177 | 177 | |
178 | 178 | print "<section>"; |
179 | 179 | print "<textarea dojoType='dijit.form.SimpleTextarea' rows='4' |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | |
195 | 195 | public function setScore() { |
196 | 196 | $ids = explode(",", clean($_REQUEST['id'])); |
197 | - $score = (int)clean($_REQUEST['score']); |
|
197 | + $score = (int) clean($_REQUEST['score']); |
|
198 | 198 | |
199 | 199 | $ids_qmarks = arr_qmarks($ids); |
200 | 200 | |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | |
204 | 204 | $sth->execute(array_merge([$score], $ids, [$_SESSION['uid']])); |
205 | 205 | |
206 | - print json_encode(["id" => $ids, "score" => (int)$score]); |
|
206 | + print json_encode(["id" => $ids, "score" => (int) $score]); |
|
207 | 207 | } |
208 | 208 | |
209 | 209 | public function getScore() { |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | |
216 | 216 | $score = $row['score']; |
217 | 217 | |
218 | - print json_encode(["id" => $id, "score" => (int)$score]); |
|
218 | + print json_encode(["id" => $id, "score" => (int) $score]); |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | |
294 | 294 | print "<ul>"; |
295 | 295 | while ($line = $sth->fetch()) { |
296 | - print "<li>" . $line["tag_name"] . "</li>"; |
|
296 | + print "<li>".$line["tag_name"]."</li>"; |
|
297 | 297 | } |
298 | 298 | print "</ul>"; |
299 | 299 | } |
@@ -432,21 +432,21 @@ discard block |
||
432 | 432 | if (!$hide_images) { |
433 | 433 | $encsize = ''; |
434 | 434 | if ($entry['height'] > 0) |
435 | - $encsize .= ' height="' . intval($entry['height']) . '"'; |
|
435 | + $encsize .= ' height="'.intval($entry['height']).'"'; |
|
436 | 436 | if ($entry['width'] > 0) |
437 | - $encsize .= ' width="' . intval($entry['width']) . '"'; |
|
437 | + $encsize .= ' width="'.intval($entry['width']).'"'; |
|
438 | 438 | $rv .= "<p><img |
439 | 439 | alt=\"".htmlspecialchars($entry["filename"])."\" |
440 | - src=\"" .htmlspecialchars($entry["url"]) . "\" |
|
441 | - " . $encsize . " /></p>"; |
|
440 | + src=\"" .htmlspecialchars($entry["url"])."\" |
|
441 | + " . $encsize." /></p>"; |
|
442 | 442 | } else { |
443 | 443 | $rv .= "<p><a target=\"_blank\" rel=\"noopener noreferrer\" |
444 | 444 | href=\"".htmlspecialchars($entry["url"])."\" |
445 | - >" .htmlspecialchars($entry["url"]) . "</a></p>"; |
|
445 | + >" .htmlspecialchars($entry["url"])."</a></p>"; |
|
446 | 446 | } |
447 | 447 | |
448 | 448 | if ($entry['title']) { |
449 | - $rv.= "<div class=\"enclosure_title\">${entry['title']}</div>"; |
|
449 | + $rv .= "<div class=\"enclosure_title\">${entry['title']}</div>"; |
|
450 | 450 | } |
451 | 451 | } |
452 | 452 | } |
@@ -461,13 +461,13 @@ discard block |
||
461 | 461 | } |
462 | 462 | |
463 | 463 | $rv .= "<div class=\"attachments\" dojoType=\"fox.form.DropDownButton\">". |
464 | - "<span>" . __('Attachments')."</span>"; |
|
464 | + "<span>".__('Attachments')."</span>"; |
|
465 | 465 | |
466 | 466 | $rv .= "<div dojoType=\"dijit.Menu\" style=\"display: none;\">"; |
467 | 467 | |
468 | 468 | foreach ($entries as $entry) { |
469 | 469 | if ($entry["title"]) |
470 | - $title = " — " . truncate_string($entry["title"], 30); |
|
470 | + $title = " — ".truncate_string($entry["title"], 30); |
|
471 | 471 | else |
472 | 472 | $title = ""; |
473 | 473 | |
@@ -477,7 +477,7 @@ discard block |
||
477 | 477 | $filename = ""; |
478 | 478 | |
479 | 479 | $rv .= "<div onclick='popupOpenUrl(\"".htmlspecialchars($entry["url"])."\")' |
480 | - dojoType=\"dijit.MenuItem\">".$filename . $title."</div>"; |
|
480 | + dojoType=\"dijit.MenuItem\">".$filename.$title."</div>"; |
|
481 | 481 | |
482 | 482 | }; |
483 | 483 | |
@@ -546,10 +546,10 @@ discard block |
||
546 | 546 | $tags_str = ""; |
547 | 547 | |
548 | 548 | for ($i = 0; $i < $maxtags; $i++) { |
549 | - $tags_str .= "<a class=\"tag\" href=\"#\" onclick=\"Feeds.open({feed:'".$tags[$i]."'})\">" . $tags[$i] . "</a>, "; |
|
549 | + $tags_str .= "<a class=\"tag\" href=\"#\" onclick=\"Feeds.open({feed:'".$tags[$i]."'})\">".$tags[$i]."</a>, "; |
|
550 | 550 | } |
551 | 551 | |
552 | - $tags_str = mb_substr($tags_str, 0, mb_strlen($tags_str)-2); |
|
552 | + $tags_str = mb_substr($tags_str, 0, mb_strlen($tags_str) - 2); |
|
553 | 553 | |
554 | 554 | if (count($tags) > $maxtags) |
555 | 555 | $tags_str .= ", …"; |
@@ -741,7 +741,7 @@ discard block |
||
741 | 741 | if (!$article_image && !$article_stream) { |
742 | 742 | $tmpdoc = new DOMDocument(); |
743 | 743 | |
744 | - if (@$tmpdoc->loadHTML('<?xml encoding="UTF-8">' . mb_substr($content, 0, 131070))) { |
|
744 | + if (@$tmpdoc->loadHTML('<?xml encoding="UTF-8">'.mb_substr($content, 0, 131070))) { |
|
745 | 745 | $tmpxpath = new DOMXPath($tmpdoc); |
746 | 746 | $elems = $tmpxpath->query('(//img[@src]|//video[@poster]|//iframe[contains(@src , "youtube.com/embed/")])'); |
747 | 747 | |
@@ -749,8 +749,8 @@ discard block |
||
749 | 749 | if ($e->nodeName == "iframe") { |
750 | 750 | $matches = []; |
751 | 751 | if (preg_match("/\/embed\/([\w-]+)/", $e->getAttribute("src"), $matches)) { |
752 | - $article_image = "https://img.youtube.com/vi/" . $matches[1] . "/hqdefault.jpg"; |
|
753 | - $article_stream = "https://youtu.be/" . $matches[1]; |
|
752 | + $article_image = "https://img.youtube.com/vi/".$matches[1]."/hqdefault.jpg"; |
|
753 | + $article_stream = "https://youtu.be/".$matches[1]; |
|
754 | 754 | break; |
755 | 755 | } |
756 | 756 | } else if ($e->nodeName == "video") { |
@@ -74,11 +74,11 @@ discard block |
||
74 | 74 | } |
75 | 75 | |
76 | 76 | if (get_pref("ENABLE_API_ACCESS", $uid)) { |
77 | - if (authenticate_user($login, $password, false, Auth_Base::AUTH_SERVICE_API)) { // try login with normal password |
|
77 | + if (authenticate_user($login, $password, false, Auth_Base::AUTH_SERVICE_API)) { // try login with normal password |
|
78 | 78 | $this->wrap(self::STATUS_OK, array("session_id" => session_id(), |
79 | 79 | "api_level" => self::API_LEVEL)); |
80 | 80 | } else if (authenticate_user($login, $password_base64, false, Auth_Base::AUTH_SERVICE_API)) { // else try with base64_decoded password |
81 | - $this->wrap(self::STATUS_OK, array("session_id" => session_id(), |
|
81 | + $this->wrap(self::STATUS_OK, array("session_id" => session_id(), |
|
82 | 82 | "api_level" => self::API_LEVEL)); |
83 | 83 | } else { // else we are not logged in |
84 | 84 | user_error("Failed login attempt for $login from {$_SERVER['REMOTE_ADDR']}", E_USER_WARNING); |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | } |
170 | 170 | } |
171 | 171 | |
172 | - foreach (array(-2,-1,0) as $cat_id) { |
|
172 | + foreach (array(-2, -1, 0) as $cat_id) { |
|
173 | 173 | if ($include_empty || !$this->isCategoryEmpty($cat_id)) { |
174 | 174 | $unread = getFeedUnread($cat_id, true); |
175 | 175 | |
@@ -190,11 +190,11 @@ discard block |
||
190 | 190 | |
191 | 191 | if (is_numeric($feed_id)) $feed_id = (int) $feed_id; |
192 | 192 | |
193 | - $limit = (int)clean($_REQUEST["limit"]); |
|
193 | + $limit = (int) clean($_REQUEST["limit"]); |
|
194 | 194 | |
195 | 195 | if (!$limit || $limit >= 200) $limit = 200; |
196 | 196 | |
197 | - $offset = (int)clean($_REQUEST["skip"]); |
|
197 | + $offset = (int) clean($_REQUEST["skip"]); |
|
198 | 198 | $filter = clean($_REQUEST["filter"]); |
199 | 199 | $is_cat = API::param_to_bool(clean($_REQUEST["is_cat"])); |
200 | 200 | $show_excerpt = API::param_to_bool(clean($_REQUEST["show_excerpt"])); |
@@ -202,14 +202,14 @@ discard block |
||
202 | 202 | /* all_articles, unread, adaptive, marked, updated */ |
203 | 203 | $view_mode = clean($_REQUEST["view_mode"]); |
204 | 204 | $include_attachments = API::param_to_bool(clean($_REQUEST["include_attachments"])); |
205 | - $since_id = (int)clean($_REQUEST["since_id"]); |
|
205 | + $since_id = (int) clean($_REQUEST["since_id"]); |
|
206 | 206 | $include_nested = API::param_to_bool(clean($_REQUEST["include_nested"])); |
207 | 207 | $sanitize_content = !isset($_REQUEST["sanitize"]) || |
208 | 208 | API::param_to_bool($_REQUEST["sanitize"]); |
209 | 209 | $force_update = API::param_to_bool(clean($_REQUEST["force_update"])); |
210 | 210 | $has_sandbox = API::param_to_bool(clean($_REQUEST["has_sandbox"])); |
211 | - $excerpt_length = (int)clean($_REQUEST["excerpt_length"]); |
|
212 | - $check_first_id = (int)clean($_REQUEST["check_first_id"]); |
|
211 | + $excerpt_length = (int) clean($_REQUEST["excerpt_length"]); |
|
212 | + $check_first_id = (int) clean($_REQUEST["check_first_id"]); |
|
213 | 213 | $include_header = API::param_to_bool(clean($_REQUEST["include_header"])); |
214 | 214 | |
215 | 215 | $_SESSION['hasSandbox'] = $has_sandbox; |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | $article_ids = explode(",", clean($_REQUEST["article_ids"])); |
254 | 254 | $mode = (int) clean($_REQUEST["mode"]); |
255 | 255 | $data = clean($_REQUEST["data"]); |
256 | - $field_raw = (int)clean($_REQUEST["field"]); |
|
256 | + $field_raw = (int) clean($_REQUEST["field"]); |
|
257 | 257 | |
258 | 258 | $field = ""; |
259 | 259 | $set_to = ""; |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | "updated" => (int) strtotime($line["updated"]), |
361 | 361 | "feed_id" => $line["feed_id"], |
362 | 362 | "attachments" => $attachments, |
363 | - "score" => (int)$line["score"], |
|
363 | + "score" => (int) $line["score"], |
|
364 | 364 | "feed_title" => $line["feed_title"], |
365 | 365 | "note" => $line["note"], |
366 | 366 | "lang" => $line["lang"] |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | } |
435 | 435 | |
436 | 436 | public function getLabels() { |
437 | - $article_id = (int)clean($_REQUEST['article_id']); |
|
437 | + $article_id = (int) clean($_REQUEST['article_id']); |
|
438 | 438 | |
439 | 439 | $rv = array(); |
440 | 440 | |
@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | } |
460 | 460 | |
461 | 461 | array_push($rv, array( |
462 | - "id" => (int)Labels::label_to_feed_id($line['id']), |
|
462 | + "id" => (int) Labels::label_to_feed_id($line['id']), |
|
463 | 463 | "caption" => $line['caption'], |
464 | 464 | "fg_color" => $line['fg_color'], |
465 | 465 | "bg_color" => $line['bg_color'], |
@@ -644,10 +644,10 @@ discard block |
||
644 | 644 | $row = array( |
645 | 645 | "feed_url" => $line["feed_url"], |
646 | 646 | "title" => $line["title"], |
647 | - "id" => (int)$line["id"], |
|
648 | - "unread" => (int)$unread, |
|
647 | + "id" => (int) $line["id"], |
|
648 | + "unread" => (int) $unread, |
|
649 | 649 | "has_icon" => $has_icon, |
650 | - "cat_id" => (int)$line["cat_id"], |
|
650 | + "cat_id" => (int) $line["cat_id"], |
|
651 | 651 | "last_updated" => (int) strtotime($line["last_updated"]), |
652 | 652 | "order_id" => (int) $line["order_id"], |
653 | 653 | ); |
@@ -748,12 +748,12 @@ discard block |
||
748 | 748 | if (!is_array($labels)) $labels = Article::get_article_labels($line["id"]); |
749 | 749 | |
750 | 750 | $headline_row = array( |
751 | - "id" => (int)$line["id"], |
|
751 | + "id" => (int) $line["id"], |
|
752 | 752 | "guid" => $line["guid"], |
753 | 753 | "unread" => API::param_to_bool($line["unread"]), |
754 | 754 | "marked" => API::param_to_bool($line["marked"]), |
755 | 755 | "published" => API::param_to_bool($line["published"]), |
756 | - "updated" => (int)strtotime($line["updated"]), |
|
756 | + "updated" => (int) strtotime($line["updated"]), |
|
757 | 757 | "is_updated" => $is_updated, |
758 | 758 | "title" => $line["title"], |
759 | 759 | "link" => $line["link"], |
@@ -786,17 +786,16 @@ discard block |
||
786 | 786 | |
787 | 787 | $headline_row["labels"] = $labels; |
788 | 788 | |
789 | - $headline_row["feed_title"] = $line["feed_title"] ? $line["feed_title"] : |
|
790 | - $feed_title; |
|
789 | + $headline_row["feed_title"] = $line["feed_title"] ? $line["feed_title"] : $feed_title; |
|
791 | 790 | |
792 | - $headline_row["comments_count"] = (int)$line["num_comments"]; |
|
791 | + $headline_row["comments_count"] = (int) $line["num_comments"]; |
|
793 | 792 | $headline_row["comments_link"] = $line["comments"]; |
794 | 793 | |
795 | 794 | $headline_row["always_display_attachments"] = API::param_to_bool($line["always_display_enclosures"]); |
796 | 795 | |
797 | 796 | $headline_row["author"] = $line["author"]; |
798 | 797 | |
799 | - $headline_row["score"] = (int)$line["score"]; |
|
798 | + $headline_row["score"] = (int) $line["score"]; |
|
800 | 799 | $headline_row["note"] = $line["note"]; |
801 | 800 | $headline_row["lang"] = $line["lang"]; |
802 | 801 | |
@@ -858,7 +857,7 @@ discard block |
||
858 | 857 | $_REQUEST['mode'] = 2; |
859 | 858 | $_REQUEST['force_show_empty'] = $include_empty; |
860 | 859 | |
861 | - if ($pf){ |
|
860 | + if ($pf) { |
|
862 | 861 | $data = $pf->makefeedtree(); |
863 | 862 | $this->wrap(self::STATUS_OK, array("categories" => $data)); |
864 | 863 | } else { |
@@ -2,8 +2,8 @@ discard block |
||
2 | 2 | require_once "colors.php"; |
3 | 3 | |
4 | 4 | class Feeds extends Handler_Protected { |
5 | - const NEVER_GROUP_FEEDS = [ -6, 0 ]; |
|
6 | - const NEVER_GROUP_BY_DATE = [ -2, -1, -3 ]; |
|
5 | + const NEVER_GROUP_FEEDS = [ -6, 0]; |
|
6 | + const NEVER_GROUP_BY_DATE = [ -2, -1, -3]; |
|
7 | 7 | |
8 | 8 | private $params; |
9 | 9 | |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | $reply = ""; |
29 | 29 | |
30 | - $rss_link = htmlspecialchars(get_self_url_prefix() . |
|
30 | + $rss_link = htmlspecialchars(get_self_url_prefix(). |
|
31 | 31 | "/public.php?op=rss&id=$feed_id$cat_q$search_q"); |
32 | 32 | |
33 | 33 | $reply .= "<span class='left'>"; |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | if ($error) |
52 | - $reply .= " <i title=\"" . htmlspecialchars($error) . "\" class='material-icons icon-error'>error</i>"; |
|
52 | + $reply .= " <i title=\"".htmlspecialchars($error)."\" class='material-icons icon-error'>error</i>"; |
|
53 | 53 | |
54 | 54 | $reply .= "</span>"; |
55 | 55 | $reply .= "<span id='feed_current_unread' style='display: none'></span>"; |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | $sth->execute([$feed]); |
140 | 140 | } |
141 | 141 | |
142 | - if ($method_split[0] == "MarkAllReadGR") { |
|
142 | + if ($method_split[0] == "MarkAllReadGR") { |
|
143 | 143 | $this->catchup_feed($method_split[1], false); |
144 | 144 | } |
145 | 145 | |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | if (!get_pref('SHOW_CONTENT_PREVIEW')) { |
244 | 244 | $line["content_preview"] = ""; |
245 | 245 | } else { |
246 | - $line["content_preview"] = "— " . truncate_string(strip_tags($line["content"]), 250); |
|
246 | + $line["content_preview"] = "— ".truncate_string(strip_tags($line["content"]), 250); |
|
247 | 247 | |
248 | 248 | foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) { |
249 | 249 | $line = $p->hook_query_headlines($line, 250, false); |
@@ -322,10 +322,10 @@ discard block |
||
322 | 322 | if (!get_pref("CDM_EXPANDED")) { |
323 | 323 | $line["cdm_excerpt"] = "<span class='collapse'> |
324 | 324 | <i class='material-icons' onclick='return Article.cdmUnsetActive(event)' |
325 | - title=\"" . __("Collapse article") . "\">remove_circle</i></span>"; |
|
325 | + title=\"" . __("Collapse article")."\">remove_circle</i></span>"; |
|
326 | 326 | |
327 | 327 | if (get_pref('SHOW_CONTENT_PREVIEW')) { |
328 | - $line["cdm_excerpt"] .= "<span class='excerpt'>" . $line["content_preview"] . "</span>"; |
|
328 | + $line["cdm_excerpt"] .= "<span class='excerpt'>".$line["content_preview"]."</span>"; |
|
329 | 329 | } |
330 | 330 | } |
331 | 331 | |
@@ -339,11 +339,11 @@ discard block |
||
339 | 339 | $ofgh->execute([$line["orig_feed_id"], $_SESSION['uid']]); |
340 | 340 | |
341 | 341 | if ($tmp_line = $ofgh->fetch()) { |
342 | - $line["orig_feed"] = [ $tmp_line["title"], $tmp_line["site_url"], $tmp_line["feed_url"] ]; |
|
342 | + $line["orig_feed"] = [$tmp_line["title"], $tmp_line["site_url"], $tmp_line["feed_url"]]; |
|
343 | 343 | } |
344 | 344 | } |
345 | 345 | |
346 | - $line["updated_long"] = make_local_datetime($line["updated"],true); |
|
346 | + $line["updated_long"] = make_local_datetime($line["updated"], true); |
|
347 | 347 | $line["updated"] = make_local_datetime($line["updated"], false, false, false, true); |
348 | 348 | |
349 | 349 | |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | } |
378 | 378 | |
379 | 379 | if (isset($rgba_cache[$feed_id])) { |
380 | - $line['feed_bg_color'] = 'rgba(' . implode(",", $rgba_cache[$feed_id]) . ',0.3)'; |
|
380 | + $line['feed_bg_color'] = 'rgba('.implode(",", $rgba_cache[$feed_id]).',0.3)'; |
|
381 | 381 | } |
382 | 382 | |
383 | 383 | /* we don't need those */ |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | |
422 | 422 | $reply['content'] .= "<p><span class=\"text-muted\">"; |
423 | 423 | |
424 | - $sth = $this->pdo->prepare("SELECT " . SUBSTRING_FOR_DATE . "(MAX(last_updated), 1, 19) AS last_updated FROM ttrss_feeds |
|
424 | + $sth = $this->pdo->prepare("SELECT ".SUBSTRING_FOR_DATE."(MAX(last_updated), 1, 19) AS last_updated FROM ttrss_feeds |
|
425 | 425 | WHERE owner_uid = ?"); |
426 | 426 | $sth->execute([$_SESSION['uid']]); |
427 | 427 | $row = $sth->fetch(); |
@@ -439,8 +439,8 @@ discard block |
||
439 | 439 | |
440 | 440 | if ($num_errors > 0) { |
441 | 441 | $reply['content'] .= "<br/>"; |
442 | - $reply['content'] .= "<a class=\"text-muted\" href=\"#\" onclick=\"CommonDialogs.showFeedsWithErrors()\">" . |
|
443 | - __('Some feeds have update errors (click for details)') . "</a>"; |
|
442 | + $reply['content'] .= "<a class=\"text-muted\" href=\"#\" onclick=\"CommonDialogs.showFeedsWithErrors()\">". |
|
443 | + __('Some feeds have update errors (click for details)')."</a>"; |
|
444 | 444 | } |
445 | 445 | $reply['content'] .= "</span></p></div>"; |
446 | 446 | |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | $reply['headlines']['is_cat'] = false; |
636 | 636 | |
637 | 637 | $reply['headlines']['toolbar'] = ''; |
638 | - $reply['headlines']['content'] = "<div class='whiteBox'>". $error . "</div>"; |
|
638 | + $reply['headlines']['content'] = "<div class='whiteBox'>".$error."</div>"; |
|
639 | 639 | |
640 | 640 | $reply['headlines-info'] = array("count" => 0, |
641 | 641 | "unread" => 0, |
@@ -669,7 +669,7 @@ discard block |
||
669 | 669 | print "<fieldset>"; |
670 | 670 | |
671 | 671 | if (get_pref('ENABLE_FEED_CATS')) { |
672 | - print "<label class='inline'>" . __('Place in category:') . "</label> "; |
|
672 | + print "<label class='inline'>".__('Place in category:')."</label> "; |
|
673 | 673 | print_feed_cat_select("cat", false, 'dojoType="fox.form.Select"'); |
674 | 674 | } |
675 | 675 | |
@@ -678,7 +678,7 @@ discard block |
||
678 | 678 | print "</section>"; |
679 | 679 | |
680 | 680 | print '<div id="feedDlg_feedsContainer" style="display : none"> |
681 | - <header>' . __('Available feeds') . '</header> |
|
681 | + <header>' . __('Available feeds').'</header> |
|
682 | 682 | <section> |
683 | 683 | <fieldset> |
684 | 684 | <select id="feedDlg_feedContainerSelect" |
@@ -743,7 +743,7 @@ discard block |
||
743 | 743 | |
744 | 744 | if (DB_TYPE == "pgsql") { |
745 | 745 | print "<fieldset>"; |
746 | - print "<label class='inline'>" . __("Language:") . "</label>"; |
|
746 | + print "<label class='inline'>".__("Language:")."</label>"; |
|
747 | 747 | print_select("search_language", get_pref('DEFAULT_SEARCH_LANGUAGE'), Pref_Feeds::get_ts_languages(), |
748 | 748 | "dojoType='fox.form.Select' title=\"".__('Used for word stemming')."\""); |
749 | 749 | print "</fieldset>"; |
@@ -772,7 +772,7 @@ discard block |
||
772 | 772 | Debug::set_enabled(true); |
773 | 773 | Debug::set_loglevel($_REQUEST["xdebug"]); |
774 | 774 | |
775 | - $feed_id = (int)$_REQUEST["feed_id"]; |
|
775 | + $feed_id = (int) $_REQUEST["feed_id"]; |
|
776 | 776 | @$do_update = $_REQUEST["action"] == "do_update"; |
777 | 777 | $csrf_token = $_REQUEST["csrf_token"]; |
778 | 778 | |
@@ -811,7 +811,7 @@ discard block |
||
811 | 811 | </script> |
812 | 812 | |
813 | 813 | <div class="container"> |
814 | - <h1>Feed Debugger: <?php echo "$feed_id: " . $this->getFeedTitle($feed_id) ?></h1> |
|
814 | + <h1>Feed Debugger: <?php echo "$feed_id: ".$this->getFeedTitle($feed_id) ?></h1> |
|
815 | 815 | <div class="content"> |
816 | 816 | <form method="GET" action=""> |
817 | 817 | <input type="hidden" name="op" value="feeds"> |
@@ -1074,7 +1074,7 @@ discard block |
||
1074 | 1074 | } else if ($n_feed >= 0) { |
1075 | 1075 | |
1076 | 1076 | if ($n_feed != 0) { |
1077 | - $match_part = "feed_id = " . (int)$n_feed; |
|
1077 | + $match_part = "feed_id = ".(int) $n_feed; |
|
1078 | 1078 | } else { |
1079 | 1079 | $match_part = "feed_id IS NULL"; |
1080 | 1080 | } |
@@ -1184,7 +1184,7 @@ discard block |
||
1184 | 1184 | (owner_uid,feed_url,title,cat_id, auth_login,auth_pass,update_method,auth_pass_encrypted) |
1185 | 1185 | VALUES (?, ?, ?, ?, ?, ?, 0, false)"); |
1186 | 1186 | |
1187 | - $sth->execute([$_SESSION['uid'], $url, "[Unknown]", $cat_id, (string)$auth_login, (string)$auth_pass]); |
|
1187 | + $sth->execute([$_SESSION['uid'], $url, "[Unknown]", $cat_id, (string) $auth_login, (string) $auth_pass]); |
|
1188 | 1188 | |
1189 | 1189 | $sth = $pdo->prepare("SELECT id FROM ttrss_feeds WHERE feed_url = ? |
1190 | 1190 | AND owner_uid = ?"); |
@@ -1203,11 +1203,11 @@ discard block |
||
1203 | 1203 | } |
1204 | 1204 | |
1205 | 1205 | public static function getIconFile($feed_id) { |
1206 | - return ICONS_DIR . "/$feed_id.ico"; |
|
1206 | + return ICONS_DIR."/$feed_id.ico"; |
|
1207 | 1207 | } |
1208 | 1208 | |
1209 | 1209 | public static function feedHasIcon($id) { |
1210 | - return is_file(ICONS_DIR . "/$id.ico") && filesize(ICONS_DIR . "/$id.ico") > 0; |
|
1210 | + return is_file(ICONS_DIR."/$id.ico") && filesize(ICONS_DIR."/$id.ico") > 0; |
|
1211 | 1211 | } |
1212 | 1212 | |
1213 | 1213 | public static function getFeedIcon($id) { |
@@ -1231,7 +1231,7 @@ discard block |
||
1231 | 1231 | $icon = self::getIconFile($id); |
1232 | 1232 | |
1233 | 1233 | if ($icon && file_exists($icon)) { |
1234 | - return ICONS_URL . "/" . basename($icon) . "?" . filemtime($icon); |
|
1234 | + return ICONS_URL."/".basename($icon)."?".filemtime($icon); |
|
1235 | 1235 | } |
1236 | 1236 | } |
1237 | 1237 | } |
@@ -1303,7 +1303,7 @@ discard block |
||
1303 | 1303 | |
1304 | 1304 | $cat_feeds = array(); |
1305 | 1305 | while ($line = $sth->fetch()) { |
1306 | - array_push($cat_feeds, "feed_id = " . (int)$line["id"]); |
|
1306 | + array_push($cat_feeds, "feed_id = ".(int) $line["id"]); |
|
1307 | 1307 | } |
1308 | 1308 | |
1309 | 1309 | if (count($cat_feeds) == 0) return 0; |
@@ -1517,7 +1517,7 @@ discard block |
||
1517 | 1517 | } |
1518 | 1518 | |
1519 | 1519 | if ($limit > 0) { |
1520 | - $limit_query_part = "LIMIT " . (int)$limit; |
|
1520 | + $limit_query_part = "LIMIT ".(int) $limit; |
|
1521 | 1521 | } |
1522 | 1522 | |
1523 | 1523 | $allow_archived = false; |
@@ -1544,7 +1544,7 @@ discard block |
||
1544 | 1544 | implode(",", $subcats).")"; |
1545 | 1545 | |
1546 | 1546 | } else { |
1547 | - $query_strategy_part = "cat_id = " . $pdo->quote($feed); |
|
1547 | + $query_strategy_part = "cat_id = ".$pdo->quote($feed); |
|
1548 | 1548 | } |
1549 | 1549 | |
1550 | 1550 | } else { |
@@ -1554,7 +1554,7 @@ discard block |
||
1554 | 1554 | $vfeed_query_part = "ttrss_feeds.title AS feed_title,"; |
1555 | 1555 | |
1556 | 1556 | } else { |
1557 | - $query_strategy_part = "feed_id = " . $pdo->quote($feed); |
|
1557 | + $query_strategy_part = "feed_id = ".$pdo->quote($feed); |
|
1558 | 1558 | } |
1559 | 1559 | } else if ($feed == 0 && !$cat_view) { // archive virtual feed |
1560 | 1560 | $query_strategy_part = "feed_id IS NULL"; |
@@ -1676,7 +1676,7 @@ discard block |
||
1676 | 1676 | $content_query_part = "content, "; |
1677 | 1677 | |
1678 | 1678 | if ($limit_query_part) { |
1679 | - $offset_query_part = "OFFSET " . (int)$offset; |
|
1679 | + $offset_query_part = "OFFSET ".(int) $offset; |
|
1680 | 1680 | } else { |
1681 | 1681 | $offset_query_part = ""; |
1682 | 1682 | } |
@@ -1765,7 +1765,7 @@ discard block |
||
1765 | 1765 | $res = $pdo->query($query); |
1766 | 1766 | |
1767 | 1767 | if ($row = $res->fetch()) { |
1768 | - $first_id = (int)$row["id"]; |
|
1768 | + $first_id = (int) $row["id"]; |
|
1769 | 1769 | |
1770 | 1770 | if ($offset > 0 && $first_id && $check_first_id && $first_id != $check_first_id) { |
1771 | 1771 | return array(-1, $feed_title, $feed_site_url, $last_error, $last_updated, $search_words, $first_id, $vfeed_query_part != "", $query_error_override); |
@@ -1912,9 +1912,9 @@ discard block |
||
1912 | 1912 | } |
1913 | 1913 | |
1914 | 1914 | function color_of($name) { |
1915 | - $colormap = [ "#1cd7d7","#d91111","#1212d7","#8e16e5","#7b7b7b", |
|
1916 | - "#39f110","#0bbea6","#ec0e0e","#1534f2","#b9e416", |
|
1917 | - "#479af2","#f36b14","#10c7e9","#1e8fe7","#e22727" ]; |
|
1915 | + $colormap = ["#1cd7d7", "#d91111", "#1212d7", "#8e16e5", "#7b7b7b", |
|
1916 | + "#39f110", "#0bbea6", "#ec0e0e", "#1534f2", "#b9e416", |
|
1917 | + "#479af2", "#f36b14", "#10c7e9", "#1e8fe7", "#e22727"]; |
|
1918 | 1918 | |
1919 | 1919 | $sum = 0; |
1920 | 1920 | |
@@ -1978,13 +1978,13 @@ discard block |
||
1978 | 1978 | |
1979 | 1979 | // support schema-less urls |
1980 | 1980 | if (strpos($url, '//') === 0) { |
1981 | - $url = 'https:' . $url; |
|
1981 | + $url = 'https:'.$url; |
|
1982 | 1982 | } |
1983 | 1983 | |
1984 | 1984 | if (strpos($url, '://') === false) { |
1985 | - $url = 'http://' . $url; |
|
1985 | + $url = 'http://'.$url; |
|
1986 | 1986 | } else if (substr($url, 0, 5) == 'feed:') { |
1987 | - $url = 'http:' . substr($url, 5); |
|
1987 | + $url = 'http:'.substr($url, 5); |
|
1988 | 1988 | } |
1989 | 1989 | |
1990 | 1990 | //prepend slash if the URL has no slash in it |
@@ -2034,7 +2034,7 @@ discard block |
||
2034 | 2034 | |
2035 | 2035 | $sth = $pdo->prepare("INSERT INTO ttrss_feed_categories (owner_uid,title,parent_cat,order_id) |
2036 | 2036 | VALUES (?, ?, ?, ?)"); |
2037 | - $sth->execute([$_SESSION['uid'], $feed_cat, $parent_cat_id, (int)$order_id]); |
|
2037 | + $sth->execute([$_SESSION['uid'], $feed_cat, $parent_cat_id, (int) $order_id]); |
|
2038 | 2038 | |
2039 | 2039 | if (!$tr_in_progress) $pdo->commit(); |
2040 | 2040 | |
@@ -2134,7 +2134,7 @@ discard block |
||
2134 | 2134 | $sth->execute([$feed_id]); |
2135 | 2135 | |
2136 | 2136 | } else { |
2137 | - $sth = $pdo->prepare("DELETE FROM ttrss_user_entries |
|
2137 | + $sth = $pdo->prepare("DELETE FROM ttrss_user_entries |
|
2138 | 2138 | USING ttrss_user_entries, ttrss_entries |
2139 | 2139 | WHERE ttrss_entries.id = ref_id AND |
2140 | 2140 | marked = false AND |
@@ -2204,7 +2204,7 @@ discard block |
||
2204 | 2204 | case "title": |
2205 | 2205 | if ($commandpair[1]) { |
2206 | 2206 | array_push($query_keywords, "($not (LOWER(ttrss_entries.title) LIKE ". |
2207 | - $pdo->quote('%' . mb_strtolower($commandpair[1]) . '%') ."))"); |
|
2207 | + $pdo->quote('%'.mb_strtolower($commandpair[1]).'%')."))"); |
|
2208 | 2208 | } else { |
2209 | 2209 | array_push($query_keywords, "(UPPER(ttrss_entries.title) $not LIKE UPPER('%$k%') |
2210 | 2210 | OR UPPER(ttrss_entries.content) $not LIKE UPPER(".$pdo->quote("%$k%")."))"); |
@@ -2214,7 +2214,7 @@ discard block |
||
2214 | 2214 | case "author": |
2215 | 2215 | if ($commandpair[1]) { |
2216 | 2216 | array_push($query_keywords, "($not (LOWER(author) LIKE ". |
2217 | - $pdo->quote('%' . mb_strtolower($commandpair[1]) . '%')."))"); |
|
2217 | + $pdo->quote('%'.mb_strtolower($commandpair[1]).'%')."))"); |
|
2218 | 2218 | } else { |
2219 | 2219 | array_push($query_keywords, "(UPPER(ttrss_entries.title) $not LIKE UPPER('%$k%') |
2220 | 2220 | OR UPPER(ttrss_entries.content) $not LIKE UPPER(".$pdo->quote("%$k%")."))"); |
@@ -2229,7 +2229,7 @@ discard block |
||
2229 | 2229 | array_push($query_keywords, "($not (note IS NULL OR note = ''))"); |
2230 | 2230 | else |
2231 | 2231 | array_push($query_keywords, "($not (LOWER(note) LIKE ". |
2232 | - $pdo->quote('%' . mb_strtolower($commandpair[1]) . '%')."))"); |
|
2232 | + $pdo->quote('%'.mb_strtolower($commandpair[1]).'%')."))"); |
|
2233 | 2233 | } else { |
2234 | 2234 | array_push($query_keywords, "(UPPER(ttrss_entries.title) $not LIKE UPPER(".$pdo->quote("%$k%").") |
2235 | 2235 | OR UPPER(ttrss_entries.content) $not LIKE UPPER(".$pdo->quote("%$k%")."))"); |
@@ -2306,7 +2306,7 @@ discard block |
||
2306 | 2306 | |
2307 | 2307 | // if there's no joiners consider this a "simple" search and |
2308 | 2308 | // concatenate everything with &, otherwise don't try to mess with tsquery syntax |
2309 | - if (preg_match("/[&|]/", implode(" " , $search_query_leftover))) { |
|
2309 | + if (preg_match("/[&|]/", implode(" ", $search_query_leftover))) { |
|
2310 | 2310 | $tsquery = $pdo->quote(implode(" ", $search_query_leftover)); |
2311 | 2311 | } else { |
2312 | 2312 | $tsquery = $pdo->quote(implode(" & ", $search_query_leftover)); |
@@ -60,8 +60,8 @@ discard block |
||
60 | 60 | while ($line = $sth->fetch()) { |
61 | 61 | |
62 | 62 | $cat = array(); |
63 | - $cat['id'] = 'CAT:' . $line['id']; |
|
64 | - $cat['bare_id'] = (int)$line['id']; |
|
63 | + $cat['id'] = 'CAT:'.$line['id']; |
|
64 | + $cat['bare_id'] = (int) $line['id']; |
|
65 | 65 | $cat['name'] = $line['title']; |
66 | 66 | $cat['items'] = array(); |
67 | 67 | $cat['checkbox'] = false; |
@@ -93,8 +93,8 @@ discard block |
||
93 | 93 | |
94 | 94 | while ($feed_line = $fsth->fetch()) { |
95 | 95 | $feed = array(); |
96 | - $feed['id'] = 'FEED:' . $feed_line['id']; |
|
97 | - $feed['bare_id'] = (int)$feed_line['id']; |
|
96 | + $feed['id'] = 'FEED:'.$feed_line['id']; |
|
97 | + $feed['bare_id'] = (int) $feed_line['id']; |
|
98 | 98 | $feed['auxcounter'] = -1; |
99 | 99 | $feed['name'] = $feed_line['title']; |
100 | 100 | $feed['checkbox'] = false; |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $feed['icon'] = Feeds::getFeedIcon($feed_line['id']); |
104 | 104 | $feed['param'] = make_local_datetime( |
105 | 105 | $feed_line['last_updated'], true); |
106 | - $feed['updates_disabled'] = (int)($feed_line['update_interval'] < 0); |
|
106 | + $feed['updates_disabled'] = (int) ($feed_line['update_interval'] < 0); |
|
107 | 107 | |
108 | 108 | array_push($items, $feed); |
109 | 109 | } |
@@ -151,8 +151,8 @@ discard block |
||
151 | 151 | $feed_id = PluginHost::pfeed_to_feed_id($feed['id']); |
152 | 152 | |
153 | 153 | $item = array(); |
154 | - $item['id'] = 'FEED:' . $feed_id; |
|
155 | - $item['bare_id'] = (int)$feed_id; |
|
154 | + $item['id'] = 'FEED:'.$feed_id; |
|
155 | + $item['bare_id'] = (int) $feed_id; |
|
156 | 156 | $item['auxcounter'] = -1; |
157 | 157 | $item['name'] = $feed['title']; |
158 | 158 | $item['checkbox'] = false; |
@@ -216,8 +216,8 @@ discard block |
||
216 | 216 | |
217 | 217 | while ($line = $sth->fetch()) { |
218 | 218 | $cat = array(); |
219 | - $cat['id'] = 'CAT:' . $line['id']; |
|
220 | - $cat['bare_id'] = (int)$line['id']; |
|
219 | + $cat['id'] = 'CAT:'.$line['id']; |
|
220 | + $cat['bare_id'] = (int) $line['id']; |
|
221 | 221 | $cat['auxcounter'] = -1; |
222 | 222 | $cat['name'] = $line['title']; |
223 | 223 | $cat['items'] = array(); |
@@ -261,8 +261,8 @@ discard block |
||
261 | 261 | |
262 | 262 | while ($feed_line = $fsth->fetch()) { |
263 | 263 | $feed = array(); |
264 | - $feed['id'] = 'FEED:' . $feed_line['id']; |
|
265 | - $feed['bare_id'] = (int)$feed_line['id']; |
|
264 | + $feed['id'] = 'FEED:'.$feed_line['id']; |
|
265 | + $feed['bare_id'] = (int) $feed_line['id']; |
|
266 | 266 | $feed['auxcounter'] = -1; |
267 | 267 | $feed['name'] = $feed_line['title']; |
268 | 268 | $feed['checkbox'] = false; |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | $feed_line['last_updated'], true); |
273 | 273 | $feed['unread'] = -1; |
274 | 274 | $feed['type'] = 'feed'; |
275 | - $feed['updates_disabled'] = (int)($feed_line['update_interval'] < 0); |
|
275 | + $feed['updates_disabled'] = (int) ($feed_line['update_interval'] < 0); |
|
276 | 276 | |
277 | 277 | array_push($cat['items'], $feed); |
278 | 278 | } |
@@ -296,8 +296,8 @@ discard block |
||
296 | 296 | |
297 | 297 | while ($feed_line = $fsth->fetch()) { |
298 | 298 | $feed = array(); |
299 | - $feed['id'] = 'FEED:' . $feed_line['id']; |
|
300 | - $feed['bare_id'] = (int)$feed_line['id']; |
|
299 | + $feed['id'] = 'FEED:'.$feed_line['id']; |
|
300 | + $feed['bare_id'] = (int) $feed_line['id']; |
|
301 | 301 | $feed['auxcounter'] = -1; |
302 | 302 | $feed['name'] = $feed_line['title']; |
303 | 303 | $feed['checkbox'] = false; |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | $feed_line['last_updated'], true); |
308 | 308 | $feed['unread'] = -1; |
309 | 309 | $feed['type'] = 'feed'; |
310 | - $feed['updates_disabled'] = (int)($feed_line['update_interval'] < 0); |
|
310 | + $feed['updates_disabled'] = (int) ($feed_line['update_interval'] < 0); |
|
311 | 311 | |
312 | 312 | array_push($root['items'], $feed); |
313 | 313 | } |
@@ -348,11 +348,11 @@ discard block |
||
348 | 348 | |
349 | 349 | Debug::log("$prefix C: $item_id P: $parent_id"); |
350 | 350 | |
351 | - $bare_item_id = substr($item_id, strpos($item_id, ':')+1); |
|
351 | + $bare_item_id = substr($item_id, strpos($item_id, ':') + 1); |
|
352 | 352 | |
353 | 353 | if ($item_id != 'root') { |
354 | 354 | if ($parent_id && $parent_id != 'root') { |
355 | - $parent_bare_id = substr($parent_id, strpos($parent_id, ':')+1); |
|
355 | + $parent_bare_id = substr($parent_id, strpos($parent_id, ':') + 1); |
|
356 | 356 | $parent_qpart = $parent_bare_id; |
357 | 357 | } else { |
358 | 358 | $parent_qpart = null; |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | if ($cat && is_array($cat)) { |
372 | 372 | foreach ($cat as $item) { |
373 | 373 | $id = $item['_reference']; |
374 | - $bare_id = substr($id, strpos($id, ':')+1); |
|
374 | + $bare_id = substr($id, strpos($id, ':') + 1); |
|
375 | 375 | |
376 | 376 | Debug::log("$prefix [$order_id] $id/$bare_id"); |
377 | 377 | |
@@ -389,7 +389,7 @@ discard block |
||
389 | 389 | |
390 | 390 | } else if (strpos($id, "CAT:") === 0) { |
391 | 391 | $this->process_category_order($data_map, $item['_reference'], $item_id, |
392 | - $nest_level+1); |
|
392 | + $nest_level + 1); |
|
393 | 393 | |
394 | 394 | $sth = $this->pdo->prepare("UPDATE ttrss_feed_categories |
395 | 395 | SET order_id = ? WHERE id = ? AND |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | $sth->execute([$feed_id, $_SESSION['uid']]); |
447 | 447 | |
448 | 448 | if ($sth->fetch()) { |
449 | - @unlink(ICONS_DIR . "/$feed_id.ico"); |
|
449 | + @unlink(ICONS_DIR."/$feed_id.ico"); |
|
450 | 450 | |
451 | 451 | $sth = $this->pdo->prepare("UPDATE ttrss_feeds SET favicon_avg_color = NULL where id = ?"); |
452 | 452 | $sth->execute([$feed_id]); |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | header("Content-type: text/html"); |
458 | 458 | |
459 | 459 | if (is_uploaded_file($_FILES['icon_file']['tmp_name'])) { |
460 | - $tmp_file = tempnam(CACHE_DIR . '/upload', 'icon'); |
|
460 | + $tmp_file = tempnam(CACHE_DIR.'/upload', 'icon'); |
|
461 | 461 | |
462 | 462 | $result = move_uploaded_file($_FILES['icon_file']['tmp_name'], |
463 | 463 | $tmp_file); |
@@ -480,8 +480,8 @@ discard block |
||
480 | 480 | $sth->execute([$feed_id, $_SESSION['uid']]); |
481 | 481 | |
482 | 482 | if ($sth->fetch()) { |
483 | - @unlink(ICONS_DIR . "/$feed_id.ico"); |
|
484 | - if (rename($icon_file, ICONS_DIR . "/$feed_id.ico")) { |
|
483 | + @unlink(ICONS_DIR."/$feed_id.ico"); |
|
484 | + if (rename($icon_file, ICONS_DIR."/$feed_id.ico")) { |
|
485 | 485 | |
486 | 486 | $sth = $this->pdo->prepare("UPDATE ttrss_feeds SET favicon_avg_color = '' WHERE id = ?"); |
487 | 487 | $sth->execute([$feed_id]); |
@@ -540,7 +540,7 @@ discard block |
||
540 | 540 | |
541 | 541 | print "<fieldset>"; |
542 | 542 | |
543 | - print "<label>" . __('URL:') . "</label> "; |
|
543 | + print "<label>".__('URL:')."</label> "; |
|
544 | 544 | print "<input dojoType='dijit.form.ValidationTextBox' required='1' |
545 | 545 | placeHolder=\"".__("Feed URL")."\" |
546 | 546 | regExp='^(http|https)://.*' style='width : 300px' |
@@ -563,7 +563,7 @@ discard block |
||
563 | 563 | |
564 | 564 | print "<fieldset>"; |
565 | 565 | |
566 | - print "<label>" . __('Place in category:') . "</label> "; |
|
566 | + print "<label>".__('Place in category:')."</label> "; |
|
567 | 567 | |
568 | 568 | print_feed_cat_select("cat_id", $cat_id, |
569 | 569 | 'dojoType="fox.form.Select"'); |
@@ -577,7 +577,7 @@ discard block |
||
577 | 577 | |
578 | 578 | print "<fieldset>"; |
579 | 579 | |
580 | - print "<label>" . __('Site URL:') . "</label> "; |
|
580 | + print "<label>".__('Site URL:')."</label> "; |
|
581 | 581 | print "<input dojoType='dijit.form.ValidationTextBox' required='1' |
582 | 582 | placeHolder=\"".__("Site URL")."\" |
583 | 583 | regExp='^(http|https)://.*' style='width : 300px' |
@@ -595,7 +595,7 @@ discard block |
||
595 | 595 | |
596 | 596 | print "<fieldset>"; |
597 | 597 | |
598 | - print "<label>" . __('Language:') . "</label> "; |
|
598 | + print "<label>".__('Language:')."</label> "; |
|
599 | 599 | print_select("feed_language", $feed_language, $this::get_ts_languages(), |
600 | 600 | 'dojoType="fox.form.Select"'); |
601 | 601 | |
@@ -626,10 +626,10 @@ discard block |
||
626 | 626 | |
627 | 627 | print "<fieldset>"; |
628 | 628 | |
629 | - print "<label>" . __('Article purging:') . "</label> "; |
|
629 | + print "<label>".__('Article purging:')."</label> "; |
|
630 | 630 | |
631 | 631 | print_select_hash("purge_interval", $purge_interval, $purge_intervals, |
632 | - 'dojoType="fox.form.Select" ' . |
|
632 | + 'dojoType="fox.form.Select" '. |
|
633 | 633 | ((FORCE_ARTICLE_PURGE == 0) ? "" : 'disabled="1"')); |
634 | 634 | |
635 | 635 | print "</fieldset>"; |
@@ -736,7 +736,7 @@ discard block |
||
736 | 736 | print "<fieldset class='narrow'>"; |
737 | 737 | |
738 | 738 | print "<label class='checkbox'><input dojoType='dijit.form.CheckBox' type='checkbox' id='cache_images' |
739 | - name='cache_images' $checked> ". __('Cache media')."</label>"; |
|
739 | + name='cache_images' $checked> ".__('Cache media')."</label>"; |
|
740 | 740 | |
741 | 741 | print "</fieldset>"; |
742 | 742 | |
@@ -818,7 +818,7 @@ discard block |
||
818 | 818 | |
819 | 819 | print "<fieldset>"; |
820 | 820 | |
821 | - print "<label>" . __('Place in category:') . "</label> "; |
|
821 | + print "<label>".__('Place in category:')."</label> "; |
|
822 | 822 | |
823 | 823 | print_feed_cat_select("cat_id", false, |
824 | 824 | 'disabled="1" dojoType="fox.form.Select"'); |
@@ -833,7 +833,7 @@ discard block |
||
833 | 833 | if (DB_TYPE == "pgsql") { |
834 | 834 | print "<fieldset>"; |
835 | 835 | |
836 | - print "<label>" . __('Language:') . "</label> "; |
|
836 | + print "<label>".__('Language:')."</label> "; |
|
837 | 837 | print_select("feed_language", "", $this::get_ts_languages(), |
838 | 838 | 'disabled="1" dojoType="fox.form.Select"'); |
839 | 839 | |
@@ -866,7 +866,7 @@ discard block |
||
866 | 866 | |
867 | 867 | print "<fieldset>"; |
868 | 868 | |
869 | - print "<label>" . __('Article purging:') . "</label> "; |
|
869 | + print "<label>".__('Article purging:')."</label> "; |
|
870 | 870 | |
871 | 871 | print_select_hash("purge_interval", "", $purge_intervals, |
872 | 872 | 'disabled="1" dojoType="fox.form.Select"'); |
@@ -1026,12 +1026,12 @@ discard block |
||
1026 | 1026 | ":purge_intl" => $purge_intl, |
1027 | 1027 | ":auth_login" => $auth_login, |
1028 | 1028 | ":auth_pass" => $auth_pass, |
1029 | - ":private" => (int)$private, |
|
1030 | - ":cache_images" => (int)$cache_images, |
|
1031 | - ":hide_images" => (int)$hide_images, |
|
1032 | - ":include_in_digest" => (int)$include_in_digest, |
|
1033 | - ":always_display_enclosures" => (int)$always_display_enclosures, |
|
1034 | - ":mark_unread_on_update" => (int)$mark_unread_on_update, |
|
1029 | + ":private" => (int) $private, |
|
1030 | + ":cache_images" => (int) $cache_images, |
|
1031 | + ":hide_images" => (int) $hide_images, |
|
1032 | + ":include_in_digest" => (int) $include_in_digest, |
|
1033 | + ":always_display_enclosures" => (int) $always_display_enclosures, |
|
1034 | + ":mark_unread_on_update" => (int) $mark_unread_on_update, |
|
1035 | 1035 | ":feed_language" => $feed_language, |
1036 | 1036 | ":id" => $feed_id, |
1037 | 1037 | ":uid" => $_SESSION['uid']]); |
@@ -1062,57 +1062,57 @@ discard block |
||
1062 | 1062 | |
1063 | 1063 | switch ($k) { |
1064 | 1064 | case "title": |
1065 | - $qpart = "title = " . $this->pdo->quote($feed_title); |
|
1065 | + $qpart = "title = ".$this->pdo->quote($feed_title); |
|
1066 | 1066 | break; |
1067 | 1067 | |
1068 | 1068 | case "feed_url": |
1069 | - $qpart = "feed_url = " . $this->pdo->quote($feed_url); |
|
1069 | + $qpart = "feed_url = ".$this->pdo->quote($feed_url); |
|
1070 | 1070 | break; |
1071 | 1071 | |
1072 | 1072 | case "update_interval": |
1073 | - $qpart = "update_interval = " . $this->pdo->quote($upd_intl); |
|
1073 | + $qpart = "update_interval = ".$this->pdo->quote($upd_intl); |
|
1074 | 1074 | break; |
1075 | 1075 | |
1076 | 1076 | case "purge_interval": |
1077 | - $qpart = "purge_interval =" . $this->pdo->quote($purge_intl); |
|
1077 | + $qpart = "purge_interval =".$this->pdo->quote($purge_intl); |
|
1078 | 1078 | break; |
1079 | 1079 | |
1080 | 1080 | case "auth_login": |
1081 | - $qpart = "auth_login = " . $this->pdo->quote($auth_login); |
|
1081 | + $qpart = "auth_login = ".$this->pdo->quote($auth_login); |
|
1082 | 1082 | break; |
1083 | 1083 | |
1084 | 1084 | case "auth_pass": |
1085 | - $qpart = "auth_pass =" . $this->pdo->quote($auth_pass). ", auth_pass_encrypted = false"; |
|
1085 | + $qpart = "auth_pass =".$this->pdo->quote($auth_pass).", auth_pass_encrypted = false"; |
|
1086 | 1086 | break; |
1087 | 1087 | |
1088 | 1088 | case "private": |
1089 | - $qpart = "private = " . $this->pdo->quote($private); |
|
1089 | + $qpart = "private = ".$this->pdo->quote($private); |
|
1090 | 1090 | break; |
1091 | 1091 | |
1092 | 1092 | case "include_in_digest": |
1093 | - $qpart = "include_in_digest = " . $this->pdo->quote($include_in_digest); |
|
1093 | + $qpart = "include_in_digest = ".$this->pdo->quote($include_in_digest); |
|
1094 | 1094 | break; |
1095 | 1095 | |
1096 | 1096 | case "always_display_enclosures": |
1097 | - $qpart = "always_display_enclosures = " . $this->pdo->quote($always_display_enclosures); |
|
1097 | + $qpart = "always_display_enclosures = ".$this->pdo->quote($always_display_enclosures); |
|
1098 | 1098 | break; |
1099 | 1099 | |
1100 | 1100 | case "mark_unread_on_update": |
1101 | - $qpart = "mark_unread_on_update = " . $this->pdo->quote($mark_unread_on_update); |
|
1101 | + $qpart = "mark_unread_on_update = ".$this->pdo->quote($mark_unread_on_update); |
|
1102 | 1102 | break; |
1103 | 1103 | |
1104 | 1104 | case "cache_images": |
1105 | - $qpart = "cache_images = " . $this->pdo->quote($cache_images); |
|
1105 | + $qpart = "cache_images = ".$this->pdo->quote($cache_images); |
|
1106 | 1106 | break; |
1107 | 1107 | |
1108 | 1108 | case "hide_images": |
1109 | - $qpart = "hide_images = " . $this->pdo->quote($hide_images); |
|
1109 | + $qpart = "hide_images = ".$this->pdo->quote($hide_images); |
|
1110 | 1110 | break; |
1111 | 1111 | |
1112 | 1112 | case "cat_id": |
1113 | 1113 | if (get_pref('ENABLE_FEED_CATS')) { |
1114 | 1114 | if ($cat_id) { |
1115 | - $qpart = "cat_id = " . $this->pdo->quote($cat_id); |
|
1115 | + $qpart = "cat_id = ".$this->pdo->quote($cat_id); |
|
1116 | 1116 | } else { |
1117 | 1117 | $qpart = 'cat_id = NULL'; |
1118 | 1118 | } |
@@ -1123,7 +1123,7 @@ discard block |
||
1123 | 1123 | break; |
1124 | 1124 | |
1125 | 1125 | case "feed_language": |
1126 | - $qpart = "feed_language = " . $this->pdo->quote($feed_language); |
|
1126 | + $qpart = "feed_language = ".$this->pdo->quote($feed_language); |
|
1127 | 1127 | break; |
1128 | 1128 | |
1129 | 1129 | } |
@@ -1184,14 +1184,14 @@ discard block |
||
1184 | 1184 | |
1185 | 1185 | $error_button = "<button dojoType=\"dijit.form.Button\" |
1186 | 1186 | onclick=\"CommonDialogs.showFeedsWithErrors()\" id=\"errorButton\">" . |
1187 | - __("Feeds with errors") . "</button>"; |
|
1187 | + __("Feeds with errors")."</button>"; |
|
1188 | 1188 | } |
1189 | 1189 | |
1190 | 1190 | $inactive_button = "<button dojoType=\"dijit.form.Button\" |
1191 | 1191 | id=\"pref_feeds_inactive_btn\" |
1192 | 1192 | style=\"display : none\" |
1193 | 1193 | onclick=\"dijit.byId('feedTree').showInactiveFeeds()\">" . |
1194 | - __("Inactive feeds") . "</button>"; |
|
1194 | + __("Inactive feeds")."</button>"; |
|
1195 | 1195 | |
1196 | 1196 | $feed_search = clean($_REQUEST["search"]); |
1197 | 1197 | |
@@ -1213,7 +1213,7 @@ discard block |
||
1213 | 1213 | </div>"; |
1214 | 1214 | |
1215 | 1215 | print "<div dojoType=\"fox.form.DropDownButton\">". |
1216 | - "<span>" . __('Select')."</span>"; |
|
1216 | + "<span>".__('Select')."</span>"; |
|
1217 | 1217 | print "<div dojoType=\"dijit.Menu\" style=\"display: none;\">"; |
1218 | 1218 | print "<div onclick=\"dijit.byId('feedTree').model.setAllChecked(true)\" |
1219 | 1219 | dojoType=\"dijit.MenuItem\">".__('All')."</div>"; |
@@ -1222,7 +1222,7 @@ discard block |
||
1222 | 1222 | print "</div></div>"; |
1223 | 1223 | |
1224 | 1224 | print "<div dojoType=\"fox.form.DropDownButton\">". |
1225 | - "<span>" . __('Feeds')."</span>"; |
|
1225 | + "<span>".__('Feeds')."</span>"; |
|
1226 | 1226 | print "<div dojoType=\"dijit.Menu\" style=\"display: none;\">"; |
1227 | 1227 | print "<div onclick=\"CommonDialogs.quickAddFeed()\" |
1228 | 1228 | dojoType=\"dijit.MenuItem\">".__('Subscribe to feed')."</div>"; |
@@ -1238,7 +1238,7 @@ discard block |
||
1238 | 1238 | |
1239 | 1239 | if (get_pref('ENABLE_FEED_CATS')) { |
1240 | 1240 | print "<div dojoType=\"fox.form.DropDownButton\">". |
1241 | - "<span>" . __('Categories')."</span>"; |
|
1241 | + "<span>".__('Categories')."</span>"; |
|
1242 | 1242 | print "<div dojoType=\"dijit.Menu\" style=\"display: none;\">"; |
1243 | 1243 | print "<div onclick=\"dijit.byId('feedTree').createCategory()\" |
1244 | 1244 | dojoType=\"dijit.MenuItem\">".__('Add category')."</div>"; |
@@ -1305,7 +1305,7 @@ discard block |
||
1305 | 1305 | print "<div dojoType='dijit.layout.AccordionPane' |
1306 | 1306 | title='<i class=\"material-icons\">import_export</i> ".__('OPML')."'>"; |
1307 | 1307 | |
1308 | - print "<h3>" . __("Using OPML you can export and import your feeds, filters, labels and Tiny Tiny RSS settings.") . "</h3>"; |
|
1308 | + print "<h3>".__("Using OPML you can export and import your feeds, filters, labels and Tiny Tiny RSS settings.")."</h3>"; |
|
1309 | 1309 | |
1310 | 1310 | print_notice("Only main settings profile can be migrated using OPML."); |
1311 | 1311 | |
@@ -1322,7 +1322,7 @@ discard block |
||
1322 | 1322 | <input type='hidden' name='op' value='dlg'> |
1323 | 1323 | <input type='hidden' name='method' value='importOpml'> |
1324 | 1324 | <button dojoType='dijit.form.Button' class='alt-primary' onclick=\"return Helpers.OPML.import();\" type=\"submit\">" . |
1325 | - __('Import OPML') . "</button>"; |
|
1325 | + __('Import OPML')."</button>"; |
|
1326 | 1326 | |
1327 | 1327 | print "</form>"; |
1328 | 1328 | |
@@ -1330,22 +1330,22 @@ discard block |
||
1330 | 1330 | |
1331 | 1331 | print "<button dojoType='dijit.form.Button' |
1332 | 1332 | onclick='Helpers.OPML.export()' >" . |
1333 | - __('Export OPML') . "</button>"; |
|
1333 | + __('Export OPML')."</button>"; |
|
1334 | 1334 | |
1335 | 1335 | print " <label class='checkbox'>"; |
1336 | 1336 | print_checkbox("include_settings", true, "1", ""); |
1337 | - print " " . __("Include settings"); |
|
1337 | + print " ".__("Include settings"); |
|
1338 | 1338 | print "</label>"; |
1339 | 1339 | |
1340 | 1340 | print "</form>"; |
1341 | 1341 | |
1342 | 1342 | print "<p/>"; |
1343 | 1343 | |
1344 | - print "<h2>" . __("Published OPML") . "</h2>"; |
|
1344 | + print "<h2>".__("Published OPML")."</h2>"; |
|
1345 | 1345 | |
1346 | - print "<p>" . __('Your OPML can be published publicly and can be subscribed by anyone who knows the URL below.') . |
|
1347 | - " " . |
|
1348 | - __("Published OPML does not include your Tiny Tiny RSS settings, feeds that require authentication or feeds hidden from Popular feeds.") . "</p>"; |
|
1346 | + print "<p>".__('Your OPML can be published publicly and can be subscribed by anyone who knows the URL below.'). |
|
1347 | + " ". |
|
1348 | + __("Published OPML does not include your Tiny Tiny RSS settings, feeds that require authentication or feeds hidden from Popular feeds.")."</p>"; |
|
1349 | 1349 | |
1350 | 1350 | print "<button dojoType='dijit.form.Button' class='alt-primary' onclick=\"return App.displayDlg('".__("Public OPML URL")."','pubOPMLUrl')\">". |
1351 | 1351 | __('Display published OPML URL')."</button> "; |
@@ -1358,10 +1358,10 @@ discard block |
||
1358 | 1358 | print "<div dojoType=\"dijit.layout.AccordionPane\" |
1359 | 1359 | title=\"<i class='material-icons'>share</i> ".__('Published & shared articles / Generated feeds')."\">"; |
1360 | 1360 | |
1361 | - print "<h3>" . __('Published articles can be subscribed by anyone who knows the following URL:') . "</h3>"; |
|
1361 | + print "<h3>".__('Published articles can be subscribed by anyone who knows the following URL:')."</h3>"; |
|
1362 | 1362 | |
1363 | - $rss_url = '-2::' . htmlspecialchars(get_self_url_prefix() . |
|
1364 | - "/public.php?op=rss&id=-2&view-mode=all_articles");; |
|
1363 | + $rss_url = '-2::'.htmlspecialchars(get_self_url_prefix(). |
|
1364 | + "/public.php?op=rss&id=-2&view-mode=all_articles"); ; |
|
1365 | 1365 | |
1366 | 1366 | print "<button dojoType='dijit.form.Button' class='alt-primary' onclick=\"return App.displayDlg('".__("Show as feed")."','generatedFeed', '$rss_url')\">". |
1367 | 1367 | __('Display URL')."</button> "; |
@@ -1390,7 +1390,7 @@ discard block |
||
1390 | 1390 | $cat_unread = Feeds::getCategoryUnread($cat_id); |
1391 | 1391 | } |
1392 | 1392 | |
1393 | - $obj['id'] = 'CAT:' . $cat_id; |
|
1393 | + $obj['id'] = 'CAT:'.$cat_id; |
|
1394 | 1394 | $obj['items'] = array(); |
1395 | 1395 | $obj['name'] = Feeds::getCategoryTitle($cat_id); |
1396 | 1396 | $obj['type'] = 'category'; |
@@ -1410,7 +1410,7 @@ discard block |
||
1410 | 1410 | if ($unread === false) |
1411 | 1411 | $unread = getFeedUnread($feed_id, false); |
1412 | 1412 | |
1413 | - $obj['id'] = 'FEED:' . $feed_id; |
|
1413 | + $obj['id'] = 'FEED:'.$feed_id; |
|
1414 | 1414 | $obj['name'] = $title; |
1415 | 1415 | $obj['unread'] = (int) $unread; |
1416 | 1416 | $obj['type'] = 'feed'; |
@@ -1446,7 +1446,7 @@ discard block |
||
1446 | 1446 | |
1447 | 1447 | print "<div dojoType='fox.Toolbar'>"; |
1448 | 1448 | print "<div dojoType='fox.form.DropDownButton'>". |
1449 | - "<span>" . __('Select')."</span>"; |
|
1449 | + "<span>".__('Select')."</span>"; |
|
1450 | 1450 | print "<div dojoType='dijit.Menu' style='display: none'>"; |
1451 | 1451 | print "<div onclick=\"Tables.select('inactive-feeds-list', true)\" |
1452 | 1452 | dojoType='dijit.MenuItem'>".__('All')."</div>"; |
@@ -1503,7 +1503,7 @@ discard block |
||
1503 | 1503 | |
1504 | 1504 | print "<div dojoType=\"fox.Toolbar\">"; |
1505 | 1505 | print "<div dojoType=\"fox.form.DropDownButton\">". |
1506 | - "<span>" . __('Select')."</span>"; |
|
1506 | + "<span>".__('Select')."</span>"; |
|
1507 | 1507 | print "<div dojoType=\"dijit.Menu\" style=\"display: none;\">"; |
1508 | 1508 | print "<div onclick=\"Tables.select('error-feeds-list', true)\" |
1509 | 1509 | dojoType=\"dijit.MenuItem\">".__('All')."</div>"; |
@@ -1567,7 +1567,7 @@ discard block |
||
1567 | 1567 | |
1568 | 1568 | public static function remove_feed($id, $owner_uid) { |
1569 | 1569 | foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_UNSUBSCRIBE_FEED) as $p) { |
1570 | - if (! $p->hook_unsubscribe_feed($id, $owner_uid)) { |
|
1570 | + if (!$p->hook_unsubscribe_feed($id, $owner_uid)) { |
|
1571 | 1571 | user_error("Feed $id (owner: $owner_uid) not removed due to plugin error (HOOK_UNSUBSCRIBE_FEED).", E_USER_WARNING); |
1572 | 1572 | return; |
1573 | 1573 | } |
@@ -1599,7 +1599,7 @@ discard block |
||
1599 | 1599 | $res = $pdo->query("SELECT MAX(id) AS id FROM ttrss_archived_feeds"); |
1600 | 1600 | $row = $res->fetch(); |
1601 | 1601 | |
1602 | - $new_feed_id = (int)$row['id'] + 1; |
|
1602 | + $new_feed_id = (int) $row['id'] + 1; |
|
1603 | 1603 | |
1604 | 1604 | $sth = $pdo->prepare("INSERT INTO ttrss_archived_feeds |
1605 | 1605 | (id, owner_uid, title, feed_url, site_url, created) |
@@ -1631,8 +1631,8 @@ discard block |
||
1631 | 1631 | |
1632 | 1632 | $pdo->commit(); |
1633 | 1633 | |
1634 | - if (file_exists(ICONS_DIR . "/$id.ico")) { |
|
1635 | - unlink(ICONS_DIR . "/$id.ico"); |
|
1634 | + if (file_exists(ICONS_DIR."/$id.ico")) { |
|
1635 | + unlink(ICONS_DIR."/$id.ico"); |
|
1636 | 1636 | } |
1637 | 1637 | |
1638 | 1638 | CCache::remove($id, $owner_uid); |
@@ -1656,7 +1656,7 @@ discard block |
||
1656 | 1656 | |
1657 | 1657 | if (get_pref('ENABLE_FEED_CATS')) { |
1658 | 1658 | print "<fieldset>"; |
1659 | - print "<label>" . __('Place in category:') . "</label> "; |
|
1659 | + print "<label>".__('Place in category:')."</label> "; |
|
1660 | 1660 | print_feed_cat_select("cat", false, 'dojoType="fox.form.Select"'); |
1661 | 1661 | print "</fieldset>"; |
1662 | 1662 | } |
@@ -1665,7 +1665,7 @@ discard block |
||
1665 | 1665 | |
1666 | 1666 | print "<div id='feedDlg_loginContainer' style='display : none'>"; |
1667 | 1667 | |
1668 | - print "<header>" . __("Authentication") . "</header>"; |
|
1668 | + print "<header>".__("Authentication")."</header>"; |
|
1669 | 1669 | print "<section>"; |
1670 | 1670 | |
1671 | 1671 | print "<input dojoType='dijit.form.TextBox' name='login' placeHolder=\"".__("Login")."\"> |
@@ -1784,12 +1784,12 @@ discard block |
||
1784 | 1784 | $sth->execute([$_SESSION['uid']]); |
1785 | 1785 | |
1786 | 1786 | if ($row = $sth->fetch()) { |
1787 | - print (int)$row["num_inactive"]; |
|
1787 | + print (int) $row["num_inactive"]; |
|
1788 | 1788 | } |
1789 | 1789 | } |
1790 | 1790 | |
1791 | 1791 | public static function subscribe_to_feed_url() { |
1792 | - $url_path = get_self_url_prefix() . |
|
1792 | + $url_path = get_self_url_prefix(). |
|
1793 | 1793 | "/public.php?op=subscribe&feed_url=%s"; |
1794 | 1794 | return $url_path; |
1795 | 1795 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | "ENABLE_API_ACCESS" => array(__("Enable API"), __("Allows accessing this account through the API")), |
83 | 83 | "ENABLE_FEED_CATS" => array(__("Enable categories")), |
84 | 84 | "FEEDS_SORT_BY_UNREAD" => array(__("Sort feeds by unread articles count"), ""), |
85 | - "FRESH_ARTICLE_MAX_AGE" => array(__("Maximum age of fresh articles"), "<strong>" . __("hours") . "</strong>"), |
|
85 | + "FRESH_ARTICLE_MAX_AGE" => array(__("Maximum age of fresh articles"), "<strong>".__("hours")."</strong>"), |
|
86 | 86 | "HIDE_READ_FEEDS" => array(__("Hide read feeds")), |
87 | 87 | "HIDE_READ_SHOWS_SPECIAL" => array(__("Always show special feeds"), __("While hiding read feeds")), |
88 | 88 | "LONG_DATE_FORMAT" => array(__("Long date format"), __("Syntax is identical to PHP <a href='http://php.net/manual/function.date.php'>date()</a> function.")), |
@@ -403,7 +403,7 @@ discard block |
||
403 | 403 | |
404 | 404 | if ($_SESSION["auth_module"] == "auth_internal") { |
405 | 405 | |
406 | - print "<div dojoType='dijit.layout.ContentPane' title=\"" . __('App passwords') . "\">"; |
|
406 | + print "<div dojoType='dijit.layout.ContentPane' title=\"".__('App passwords')."\">"; |
|
407 | 407 | |
408 | 408 | print_notice("You can create separate passwords for API clients. Using one is required if you enable OTP."); |
409 | 409 | |
@@ -415,11 +415,11 @@ discard block |
||
415 | 415 | |
416 | 416 | print "<button style='float : left' class='alt-primary' dojoType='dijit.form.Button' |
417 | 417 | onclick=\"Helpers.AppPasswords.generate()\">" . |
418 | - __('Generate new password') . "</button> "; |
|
418 | + __('Generate new password')."</button> "; |
|
419 | 419 | |
420 | 420 | print "<button style='float : left' class='alt-danger' dojoType='dijit.form.Button' |
421 | 421 | onclick=\"Helpers.AppPasswords.removeSelected()\">" . |
422 | - __('Remove selected passwords') . "</button>"; |
|
422 | + __('Remove selected passwords')."</button>"; |
|
423 | 423 | |
424 | 424 | print "</div>"; # content pane |
425 | 425 | } |
@@ -474,13 +474,13 @@ discard block |
||
474 | 474 | print_notice("You will need to generate app passwords for the API clients if you enable OTP."); |
475 | 475 | |
476 | 476 | if (function_exists("imagecreatefromstring")) { |
477 | - print "<h3>" . __("Scan the following code by the Authenticator application or copy the key manually") . "</h3>"; |
|
477 | + print "<h3>".__("Scan the following code by the Authenticator application or copy the key manually")."</h3>"; |
|
478 | 478 | |
479 | 479 | $csrf_token = $_SESSION["csrf_token"]; |
480 | 480 | print "<img alt='otp qr-code' src='backend.php?op=pref-prefs&method=otpqrcode&csrf_token=$csrf_token'>"; |
481 | 481 | } else { |
482 | 482 | print_error("PHP GD functions are required to generate QR codes."); |
483 | - print "<h3>" . __("Use the following OTP key with a compatible Authenticator application") . "</h3>"; |
|
483 | + print "<h3>".__("Use the following OTP key with a compatible Authenticator application")."</h3>"; |
|
484 | 484 | } |
485 | 485 | |
486 | 486 | print "<form dojoType='dijit.form.Form' id='changeOtpForm'>"; |
@@ -647,7 +647,7 @@ discard block |
||
647 | 647 | print "<fieldset class='prefs'>"; |
648 | 648 | |
649 | 649 | print "<label for='CB_$pref_name'>"; |
650 | - print $item['short_desc'] . ":"; |
|
650 | + print $item['short_desc'].":"; |
|
651 | 651 | print "</label>"; |
652 | 652 | |
653 | 653 | $value = $item['value']; |
@@ -684,7 +684,7 @@ discard block |
||
684 | 684 | print "</select>"; |
685 | 685 | |
686 | 686 | print " <button dojoType=\"dijit.form.Button\" class='alt-info' |
687 | - onclick=\"Helpers.customizeCSS()\">" . __('Customize') . "</button>"; |
|
687 | + onclick=\"Helpers.customizeCSS()\">" . __('Customize')."</button>"; |
|
688 | 688 | |
689 | 689 | print " <button dojoType='dijit.form.Button' onclick='window.open(\"https://tt-rss.org/wiki/Themes\")'> |
690 | 690 | <i class='material-icons'>open_in_new</i> ".__("More themes...")."</button>"; |
@@ -747,12 +747,12 @@ discard block |
||
747 | 747 | $has_serial = ($cert_serial) ? "false" : "true"; |
748 | 748 | |
749 | 749 | print "<button dojoType='dijit.form.Button' disabled='$has_serial' |
750 | - onclick=\"dijit.byId('SSL_CERT_SERIAL').attr('value', '$cert_serial')\">" . |
|
751 | - __('Register') . "</button>"; |
|
750 | + onclick=\"dijit.byId('SSL_CERT_SERIAL').attr('value', '$cert_serial')\">". |
|
751 | + __('Register')."</button>"; |
|
752 | 752 | |
753 | 753 | print "<button dojoType='dijit.form.Button' class='alt-danger' |
754 | 754 | onclick=\"dijit.byId('SSL_CERT_SERIAL').attr('value', '')\">" . |
755 | - __('Clear') . "</button>"; |
|
755 | + __('Clear')."</button>"; |
|
756 | 756 | |
757 | 757 | print "<button dojoType='dijit.form.Button' class='alt-info' |
758 | 758 | onclick='window.open(\"https://tt-rss.org/wiki/SSL%20Certificate%20Authentication\")'> |
@@ -763,7 +763,7 @@ discard block |
||
763 | 763 | id=\"$pref_name\" regexp=\"[012]?\d:\d\d\" placeHolder=\"12:00\" |
764 | 764 | name=\"$pref_name\" value=\"$value\">"; |
765 | 765 | |
766 | - $item['help_text'] .= ". " . T_sprintf("Current server time: %s", date("H:i")); |
|
766 | + $item['help_text'] .= ". ".T_sprintf("Current server time: %s", date("H:i")); |
|
767 | 767 | } else { |
768 | 768 | $regexp = ($type_name == 'integer') ? 'regexp="^\d*$"' : ''; |
769 | 769 | |
@@ -849,7 +849,7 @@ discard block |
||
849 | 849 | print_warning("Your PHP configuration has open_basedir restrictions enabled. Some plugins relying on CURL for functionality may not work correctly."); |
850 | 850 | } |
851 | 851 | |
852 | - $feed_handler_whitelist = [ "Af_Comics" ]; |
|
852 | + $feed_handler_whitelist = ["Af_Comics"]; |
|
853 | 853 | |
854 | 854 | $feed_handlers = array_merge( |
855 | 855 | PluginHost::getInstance()->get_hooks(PluginHost::HOOK_FEED_FETCHED), |
@@ -861,9 +861,9 @@ discard block |
||
861 | 861 | |
862 | 862 | if (count($feed_handlers) > 0) { |
863 | 863 | print_error( |
864 | - T_sprintf("The following plugins use per-feed content hooks. This may cause excessive data usage and origin server load resulting in a ban of your instance: <b>%s</b>" , |
|
864 | + T_sprintf("The following plugins use per-feed content hooks. This may cause excessive data usage and origin server load resulting in a ban of your instance: <b>%s</b>", |
|
865 | 865 | implode(", ", array_map(function($plugin) { return get_class($plugin); }, $feed_handlers)) |
866 | - ) . " (<a href='https://tt-rss.org/wiki/FeedHandlerPlugins' target='_blank'>".__("More info...")."</a>)" |
|
866 | + )." (<a href='https://tt-rss.org/wiki/FeedHandlerPlugins' target='_blank'>".__("More info...")."</a>)" |
|
867 | 867 | ); |
868 | 868 | } |
869 | 869 | |
@@ -892,7 +892,7 @@ discard block |
||
892 | 892 | <label class='checkbox description text-muted' id='PLABEL-$name'> |
893 | 893 | <input disabled='1' |
894 | 894 | dojoType='dijit.form.CheckBox' $checked type='checkbox'> |
895 | - ".htmlspecialchars($about[1]). "</label>"; |
|
895 | + ".htmlspecialchars($about[1])."</label>"; |
|
896 | 896 | |
897 | 897 | if (@$about[4]) { |
898 | 898 | print "<button dojoType='dijit.form.Button' class='alt-info' |
@@ -1154,7 +1154,7 @@ discard block |
||
1154 | 1154 | print "<div dojoType='fox.Toolbar'>"; |
1155 | 1155 | |
1156 | 1156 | print "<div dojoType='fox.form.DropDownButton'>". |
1157 | - "<span>" . __('Select')."</span>"; |
|
1157 | + "<span>".__('Select')."</span>"; |
|
1158 | 1158 | print "<div dojoType='dijit.Menu' style='display: none'>"; |
1159 | 1159 | print "<div onclick=\"Tables.select('pref-profiles-list', true)\" |
1160 | 1160 | dojoType='dijit.MenuItem'>".__('All')."</div>"; |
@@ -1192,7 +1192,7 @@ discard block |
||
1192 | 1192 | $is_active = ""; |
1193 | 1193 | } |
1194 | 1194 | |
1195 | - print "<td width='100%'><span>" . __("Default profile") . " $is_active</span></td>"; |
|
1195 | + print "<td width='100%'><span>".__("Default profile")." $is_active</span></td>"; |
|
1196 | 1196 | |
1197 | 1197 | print "</tr>"; |
1198 | 1198 | |
@@ -1214,7 +1214,7 @@ discard block |
||
1214 | 1214 | |
1215 | 1215 | print "<td><span dojoType='dijit.InlineEditBox' |
1216 | 1216 | width='300px' autoSave='false' |
1217 | - profile-id='$profile_id'>" . $edit_title . |
|
1217 | + profile-id='$profile_id'>".$edit_title. |
|
1218 | 1218 | "<script type='dojo/method' event='onChange' args='item'> |
1219 | 1219 | var elem = this; |
1220 | 1220 | dojo.xhrPost({ |
@@ -1263,13 +1263,13 @@ discard block |
||
1263 | 1263 | |
1264 | 1264 | private function appPasswordList() { |
1265 | 1265 | print "<div dojoType='fox.Toolbar'>"; |
1266 | - print "<div dojoType='fox.form.DropDownButton'>" . |
|
1267 | - "<span>" . __('Select') . "</span>"; |
|
1266 | + print "<div dojoType='fox.form.DropDownButton'>". |
|
1267 | + "<span>".__('Select')."</span>"; |
|
1268 | 1268 | print "<div dojoType='dijit.Menu' style='display: none'>"; |
1269 | 1269 | print "<div onclick=\"Tables.select('app-password-list', true)\" |
1270 | - dojoType=\"dijit.MenuItem\">" . __('All') . "</div>"; |
|
1270 | + dojoType=\"dijit.MenuItem\">" . __('All')."</div>"; |
|
1271 | 1271 | print "<div onclick=\"Tables.select('app-password-list', false)\" |
1272 | - dojoType=\"dijit.MenuItem\">" . __('None') . "</div>"; |
|
1272 | + dojoType=\"dijit.MenuItem\">" . __('None')."</div>"; |
|
1273 | 1273 | print "</div></div>"; |
1274 | 1274 | print "</div>"; #toolbar |
1275 | 1275 | |
@@ -1294,7 +1294,7 @@ discard block |
||
1294 | 1294 | |
1295 | 1295 | print "<td align='center'> |
1296 | 1296 | <input onclick='Tables.onRowChecked(this)' dojoType='dijit.form.CheckBox' type='checkbox'></td>"; |
1297 | - print "<td>" . htmlspecialchars($row["title"]) . "</td>"; |
|
1297 | + print "<td>".htmlspecialchars($row["title"])."</td>"; |
|
1298 | 1298 | |
1299 | 1299 | print "<td align='right' class='text-muted'>"; |
1300 | 1300 | print make_local_datetime($row['created'], false); |
@@ -1314,7 +1314,7 @@ discard block |
||
1314 | 1314 | private function encryptAppPassword($password) { |
1315 | 1315 | $salt = substr(bin2hex(get_random_bytes(24)), 0, 24); |
1316 | 1316 | |
1317 | - return "SSHA-512:".hash('sha512', $salt . $password). ":$salt"; |
|
1317 | + return "SSHA-512:".hash('sha512', $salt.$password).":$salt"; |
|
1318 | 1318 | } |
1319 | 1319 | |
1320 | 1320 | public function deleteAppPassword() { |