@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | print "<fieldset>"; |
| 55 | - print "<label>" . __("Login:") . "</label>"; |
|
| 55 | + print "<label>".__("Login:")."</label>"; |
|
| 56 | 56 | print "<input style='font-size : 16px' |
| 57 | 57 | dojoType='dijit.form.ValidationTextBox' required='1' |
| 58 | 58 | $sel_disabled name='login' value=\"$login\">"; |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | print "<fieldset>"; |
| 67 | 67 | |
| 68 | - print "<label>" . __('Access level: ') . "</label> "; |
|
| 68 | + print "<label>".__('Access level: ')."</label> "; |
|
| 69 | 69 | |
| 70 | 70 | if (!$sel_disabled) { |
| 71 | 71 | print_select_hash("access_level", $access_level, $access_level_names, |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | print "</fieldset>"; |
| 80 | 80 | print "<fieldset>"; |
| 81 | 81 | |
| 82 | - print "<label>" . __("New password:") . "</label> "; |
|
| 82 | + print "<label>".__("New password:")."</label> "; |
|
| 83 | 83 | print "<input dojoType='dijit.form.TextBox' type='password' size='20' placeholder='Change password' |
| 84 | 84 | name='password'>"; |
| 85 | 85 | |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | print "<section>"; |
| 92 | 92 | |
| 93 | 93 | print "<fieldset>"; |
| 94 | - print "<label>" . __("E-mail:") . "</label> "; |
|
| 94 | + print "<label>".__("E-mail:")."</label> "; |
|
| 95 | 95 | print "<input dojoType='dijit.form.TextBox' size='30' name='email' |
| 96 | 96 | value=\"$email\">"; |
| 97 | 97 | print "</fieldset>"; |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | } |
| 338 | 338 | |
| 339 | 339 | print "<div dojoType='fox.form.DropDownButton'>". |
| 340 | - "<span>" . __('Select')."</span>"; |
|
| 340 | + "<span>".__('Select')."</span>"; |
|
| 341 | 341 | print "<div dojoType='dijit.Menu' style='display: none'>"; |
| 342 | 342 | print "<div onclick=\"Tables.select('prefUserList', true)\" |
| 343 | 343 | dojoType='dijit.MenuItem'>".__('All')."</div>"; |
@@ -405,12 +405,12 @@ discard block |
||
| 405 | 405 | print "<td align='center'><input onclick='Tables.onRowChecked(this); event.stopPropagation();' |
| 406 | 406 | dojoType='dijit.form.CheckBox' type='checkbox'></td>"; |
| 407 | 407 | |
| 408 | - print "<td title='".__('Click to edit')."'><i class='material-icons'>person</i> " . $line["login"] . "</td>"; |
|
| 408 | + print "<td title='".__('Click to edit')."'><i class='material-icons'>person</i> ".$line["login"]."</td>"; |
|
| 409 | 409 | |
| 410 | - print "<td>" . $access_level_names[$line["access_level"]] . "</td>"; |
|
| 411 | - print "<td>" . $line["num_feeds"] . "</td>"; |
|
| 412 | - print "<td>" . $line["created"] . "</td>"; |
|
| 413 | - print "<td>" . $line["last_login"] . "</td>"; |
|
| 410 | + print "<td>".$access_level_names[$line["access_level"]]."</td>"; |
|
| 411 | + print "<td>".$line["num_feeds"]."</td>"; |
|
| 412 | + print "<td>".$line["created"]."</td>"; |
|
| 413 | + print "<td>".$line["last_login"]."</td>"; |
|
| 414 | 414 | |
| 415 | 415 | print "</tr>"; |
| 416 | 416 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | function pubOPMLUrl() { |
| 39 | 39 | $url_path = Opml::opml_publish_url(); |
| 40 | 40 | |
| 41 | - print "<header>" . __("Your Public OPML URL is:") . "</header>"; |
|
| 41 | + print "<header>".__("Your Public OPML URL is:")."</header>"; |
|
| 42 | 42 | |
| 43 | 43 | print "<section>"; |
| 44 | 44 | |
@@ -67,18 +67,18 @@ discard block |
||
| 67 | 67 | if ($this->param == 1) { |
| 68 | 68 | print __("Update daemon is enabled in configuration, but daemon process is not running, which prevents all feeds from updating. Please start the daemon process or contact instance owner."); |
| 69 | 69 | |
| 70 | - $stamp = (int) file_get_contents(LOCK_DIRECTORY . "/update_daemon.stamp"); |
|
| 70 | + $stamp = (int) file_get_contents(LOCK_DIRECTORY."/update_daemon.stamp"); |
|
| 71 | 71 | |
| 72 | - print "<p>" . __("Last update:") . " " . date("Y.m.d, G:i", $stamp); |
|
| 72 | + print "<p>".__("Last update:")." ".date("Y.m.d, G:i", $stamp); |
|
| 73 | 73 | |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | if ($this->param == 3) { |
| 77 | 77 | print __("Update daemon is taking too long to perform a feed update. This could indicate a problem like crash or a hang. Please check the daemon process or contact instance owner."); |
| 78 | 78 | |
| 79 | - $stamp = (int) file_get_contents(LOCK_DIRECTORY . "/update_daemon.stamp"); |
|
| 79 | + $stamp = (int) file_get_contents(LOCK_DIRECTORY."/update_daemon.stamp"); |
|
| 80 | 80 | |
| 81 | - print "<p>" . __("Last update:") . " " . date("Y.m.d, G:i", $stamp); |
|
| 81 | + print "<p>".__("Last update:")." ".date("Y.m.d, G:i", $stamp); |
|
| 82 | 82 | |
| 83 | 83 | } |
| 84 | 84 | |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $tags[$line["tag_name"]] = $line["count"]; |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | - if(count($tags) == 0 ){ return; } |
|
| 111 | + if (count($tags) == 0) { return; } |
|
| 112 | 112 | |
| 113 | 113 | ksort($tags); |
| 114 | 114 | |
@@ -138,9 +138,9 @@ discard block |
||
| 138 | 138 | |
| 139 | 139 | $key_escaped = str_replace("'", "\\'", $key); |
| 140 | 140 | |
| 141 | - echo "<a href=\"#\" onclick=\"Feeds.open({feed:'$key_escaped'}) \" style=\"font-size: " . |
|
| 142 | - $size . "px\" title=\"$value articles tagged with " . |
|
| 143 | - $key . '">' . $key . '</a> '; |
|
| 141 | + echo "<a href=\"#\" onclick=\"Feeds.open({feed:'$key_escaped'}) \" style=\"font-size: ". |
|
| 142 | + $size."px\" title=\"$value articles tagged with ". |
|
| 143 | + $key.'">'.$key.'</a> '; |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | |
| 164 | 164 | $key = Feeds::get_feed_access_key($feed_id, $is_cat); |
| 165 | 165 | |
| 166 | - $url_path = htmlspecialchars($this->params[2]) . "&key=" . $key; |
|
| 166 | + $url_path = htmlspecialchars($this->params[2])."&key=".$key; |
|
| 167 | 167 | |
| 168 | 168 | $feed_title = Feeds::getFeedTitle($feed_id, $is_cat); |
| 169 | 169 | |
@@ -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 | 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 | 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 | 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"]; |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | - static function get_all_labels($owner_uid) { |
|
| 40 | + static function get_all_labels($owner_uid) { |
|
| 41 | 41 | $rv = array(); |
| 42 | 42 | |
| 43 | 43 | $pdo = Db::pdo(); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | - static function clear_cache($id) { |
|
| 73 | + static function clear_cache($id) { |
|
| 74 | 74 | |
| 75 | 75 | $pdo = Db::pdo(); |
| 76 | 76 | |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | Labels::clear_cache($id); |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | - static function add_article($id, $label, $owner_uid) { |
|
| 101 | + static function add_article($id, $label, $owner_uid) { |
|
| 102 | 102 | |
| 103 | 103 | $label_id = Labels::find_id($label, $owner_uid); |
| 104 | 104 | |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | if (!$tr_in_progress) $pdo->commit(); |
| 172 | 172 | } |
| 173 | 173 | |
| 174 | - static function create($caption, $fg_color = '', $bg_color = '', $owner_uid = false) { |
|
| 174 | + static function create($caption, $fg_color = '', $bg_color = '', $owner_uid = false) { |
|
| 175 | 175 | |
| 176 | 176 | if (!$owner_uid) $owner_uid = $_SESSION['uid']; |
| 177 | 177 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | $ts = strftime("%H:%M:%S", time()); |
| 42 | 42 | if (function_exists('posix_getpid')) { |
| 43 | - $ts = "$ts/" . posix_getpid(); |
|
| 43 | + $ts = "$ts/".posix_getpid(); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | if (Debug::$logfile) { |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | if (!$locked) { |
| 62 | 62 | fclose($fp); |
| 63 | - user_error("Unable to lock debugging log file: " . Debug::$logfile, E_USER_WARNING); |
|
| 63 | + user_error("Unable to lock debugging log file: ".Debug::$logfile, E_USER_WARNING); |
|
| 64 | 64 | return; |
| 65 | 65 | } |
| 66 | 66 | } |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | return; |
| 78 | 78 | |
| 79 | 79 | } else { |
| 80 | - user_error("Unable to open debugging log file: " . Debug::$logfile, E_USER_WARNING); |
|
| 80 | + user_error("Unable to open debugging log file: ".Debug::$logfile, E_USER_WARNING); |
|
| 81 | 81 | } |
| 82 | 82 | } |
| 83 | 83 | |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | $priority = LOG_INFO; |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | - $errname = Logger::$errornames[$errno] . " ($errno)"; |
|
| 27 | + $errname = Logger::$errornames[$errno]." ($errno)"; |
|
| 28 | 28 | |
| 29 | 29 | syslog($priority, "[tt-rss] $errname ($file:$line) $errstr"); |
| 30 | 30 | |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | $priority = LOG_INFO; |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | - $errname = Logger::$errornames[$errno] . " ($errno)"; |
|
| 27 | + $errname = Logger::$errornames[$errno]." ($errno)"; |
|
| 28 | 28 | |
| 29 | 29 | print "[EEE] $priority $errname ($file:$line) $errstr\n"; |
| 30 | 30 | |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | |
| 24 | 24 | foreach ($server_params as $n => $p) { |
| 25 | 25 | if (isset($_SERVER[$p])) |
| 26 | - $context .= "\n$n: " . $_SERVER[$p]; |
|
| 26 | + $context .= "\n$n: ".$_SERVER[$p]; |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | // passed error message may contain invalid unicode characters, failing to insert an error here |
@@ -7,11 +7,11 @@ discard block |
||
| 7 | 7 | if ($k != "feed" && isset($v)) { |
| 8 | 8 | $x = strip_tags(is_array($v) ? implode(",", $v) : $v); |
| 9 | 9 | |
| 10 | - $tmp .= sha1("$k:" . sha1($x)); |
|
| 10 | + $tmp .= sha1("$k:".sha1($x)); |
|
| 11 | 11 | } |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | - return sha1(implode(",", $pluginhost->get_plugin_names()) . $tmp); |
|
| 14 | + return sha1(implode(",", $pluginhost->get_plugin_names()).$tmp); |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | // Strips utf8mb4 characters (i.e. emoji) for mysql |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | //update_rss_feed($line["id"], true); |
| 138 | 138 | |
| 139 | 139 | if ($tline = $usth->fetch()) { |
| 140 | - Debug::log(" => " . $tline["last_updated"] . ", " . $tline["id"] . " " . $tline["owner_uid"]); |
|
| 140 | + Debug::log(" => ".$tline["last_updated"].", ".$tline["id"]." ".$tline["owner_uid"]); |
|
| 141 | 141 | |
| 142 | 142 | if (array_search($tline["owner_uid"], $batch_owners) === FALSE) |
| 143 | 143 | array_push($batch_owners, $tline["owner_uid"]); |
@@ -323,7 +323,7 @@ discard block |
||
| 323 | 323 | |
| 324 | 324 | $date_feed_processed = date('Y-m-d H:i'); |
| 325 | 325 | |
| 326 | - $cache_filename = CACHE_DIR . "/feeds/" . sha1($fetch_url) . ".xml"; |
|
| 326 | + $cache_filename = CACHE_DIR."/feeds/".sha1($fetch_url).".xml"; |
|
| 327 | 327 | |
| 328 | 328 | $pluginhost = new PluginHost(); |
| 329 | 329 | $user_plugins = get_pref("_ENABLED_PLUGINS", $owner_uid); |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | Debug::log("running HOOK_FETCH_FEED handlers...", Debug::$LOG_VERBOSE); |
| 341 | 341 | |
| 342 | 342 | foreach ($pluginhost->get_hooks(PluginHost::HOOK_FETCH_FEED) as $plugin) { |
| 343 | - Debug::log("... " . get_class($plugin), Debug::$LOG_VERBOSE); |
|
| 343 | + Debug::log("... ".get_class($plugin), Debug::$LOG_VERBOSE); |
|
| 344 | 344 | $start = microtime(true); |
| 345 | 345 | $feed_data = $plugin->hook_fetch_feed($feed_data, $fetch_url, $owner_uid, $feed, 0, $auth_login, $auth_pass); |
| 346 | 346 | Debug::log(sprintf("=== %.4f (sec)", microtime(true) - $start), Debug::$LOG_VERBOSE); |
@@ -402,7 +402,7 @@ discard block |
||
| 402 | 402 | $feed_data = trim($feed_data); |
| 403 | 403 | |
| 404 | 404 | Debug::log("fetch done.", Debug::$LOG_VERBOSE); |
| 405 | - Debug::log("source last modified: " . $fetch_last_modified, Debug::$LOG_VERBOSE); |
|
| 405 | + Debug::log("source last modified: ".$fetch_last_modified, Debug::$LOG_VERBOSE); |
|
| 406 | 406 | |
| 407 | 407 | if ($feed_data && $fetch_last_modified != $stored_last_modified) { |
| 408 | 408 | $sth = $pdo->prepare("UPDATE ttrss_feeds SET last_modified = ? WHERE id = ?"); |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | } |
| 411 | 411 | |
| 412 | 412 | // cache vanilla feed data for re-use |
| 413 | - if ($feed_data && !$auth_pass && !$auth_login && is_writable(CACHE_DIR . "/feeds")) { |
|
| 413 | + if ($feed_data && !$auth_pass && !$auth_login && is_writable(CACHE_DIR."/feeds")) { |
|
| 414 | 414 | $new_rss_hash = sha1($feed_data); |
| 415 | 415 | |
| 416 | 416 | if ($new_rss_hash != $rss_hash) { |
@@ -445,7 +445,7 @@ discard block |
||
| 445 | 445 | $feed_data_checksum = md5($feed_data); |
| 446 | 446 | |
| 447 | 447 | foreach ($pluginhost->get_hooks(PluginHost::HOOK_FEED_FETCHED) as $plugin) { |
| 448 | - Debug::log("... " . get_class($plugin), Debug::$LOG_VERBOSE); |
|
| 448 | + Debug::log("... ".get_class($plugin), Debug::$LOG_VERBOSE); |
|
| 449 | 449 | $start = microtime(true); |
| 450 | 450 | $feed_data = $plugin->hook_feed_fetched($feed_data, $fetch_url, $owner_uid, $feed); |
| 451 | 451 | Debug::log(sprintf("=== %.4f (sec)", microtime(true) - $start), Debug::$LOG_VERBOSE); |
@@ -467,7 +467,7 @@ discard block |
||
| 467 | 467 | // We use local pluginhost here because we need to load different per-user feed plugins |
| 468 | 468 | |
| 469 | 469 | foreach ($pluginhost->get_hooks(PluginHost::HOOK_FEED_PARSED) as $plugin) { |
| 470 | - Debug::log("... " . get_class($plugin), Debug::$LOG_VERBOSE); |
|
| 470 | + Debug::log("... ".get_class($plugin), Debug::$LOG_VERBOSE); |
|
| 471 | 471 | $start = microtime(true); |
| 472 | 472 | $plugin->hook_feed_parsed($rss); |
| 473 | 473 | Debug::log(sprintf("=== %.4f (sec)", microtime(true) - $start), Debug::$LOG_VERBOSE); |
@@ -499,14 +499,14 @@ discard block |
||
| 499 | 499 | $site_url = mb_substr(rewrite_relative_url($fetch_url, clean($rss->get_link())), 0, 245); |
| 500 | 500 | |
| 501 | 501 | Debug::log("site_url: $site_url", Debug::$LOG_VERBOSE); |
| 502 | - Debug::log("feed_title: " . clean($rss->get_title()), Debug::$LOG_VERBOSE); |
|
| 502 | + Debug::log("feed_title: ".clean($rss->get_title()), Debug::$LOG_VERBOSE); |
|
| 503 | 503 | |
| 504 | 504 | if ($favicon_needs_check || $force_refetch) { |
| 505 | 505 | |
| 506 | 506 | /* terrible hack: if we crash on floicon shit here, we won't check |
| 507 | 507 | * the icon avgcolor again (unless the icon got updated) */ |
| 508 | 508 | |
| 509 | - $favicon_file = ICONS_DIR . "/$feed.ico"; |
|
| 509 | + $favicon_file = ICONS_DIR."/$feed.ico"; |
|
| 510 | 510 | $favicon_modified = @filemtime($favicon_file); |
| 511 | 511 | |
| 512 | 512 | Debug::log("checking favicon...", Debug::$LOG_VERBOSE); |
@@ -527,7 +527,7 @@ discard block |
||
| 527 | 527 | |
| 528 | 528 | $favicon_color = calculate_avg_color($favicon_file); |
| 529 | 529 | |
| 530 | - $favicon_colorstring = ",favicon_avg_color = " . $pdo->quote($favicon_color); |
|
| 530 | + $favicon_colorstring = ",favicon_avg_color = ".$pdo->quote($favicon_color); |
|
| 531 | 531 | |
| 532 | 532 | } else if ($favicon_avg_color == 'fail') { |
| 533 | 533 | Debug::log("floicon failed on this file, not trying to recalculate avg color", Debug::$LOG_VERBOSE); |
@@ -546,7 +546,7 @@ discard block |
||
| 546 | 546 | print_r($filters); |
| 547 | 547 | } |
| 548 | 548 | |
| 549 | - Debug::log("" . count($filters) . " filters loaded.", Debug::$LOG_VERBOSE); |
|
| 549 | + Debug::log("".count($filters)." filters loaded.", Debug::$LOG_VERBOSE); |
|
| 550 | 550 | |
| 551 | 551 | $items = $rss->get_items(); |
| 552 | 552 | |
@@ -588,13 +588,13 @@ discard block |
||
| 588 | 588 | |
| 589 | 589 | $entry_guid = "$owner_uid,$entry_guid"; |
| 590 | 590 | |
| 591 | - $entry_guid_hashed = 'SHA1:' . sha1($entry_guid); |
|
| 591 | + $entry_guid_hashed = 'SHA1:'.sha1($entry_guid); |
|
| 592 | 592 | |
| 593 | 593 | Debug::log("guid $entry_guid / $entry_guid_hashed", Debug::$LOG_VERBOSE); |
| 594 | 594 | |
| 595 | - $entry_timestamp = (int)$item->get_date(); |
|
| 595 | + $entry_timestamp = (int) $item->get_date(); |
|
| 596 | 596 | |
| 597 | - Debug::log("orig date: " . $item->get_date(), Debug::$LOG_VERBOSE); |
|
| 597 | + Debug::log("orig date: ".$item->get_date(), Debug::$LOG_VERBOSE); |
|
| 598 | 598 | |
| 599 | 599 | $entry_title = strip_tags($item->get_title()); |
| 600 | 600 | |
@@ -606,7 +606,7 @@ discard block |
||
| 606 | 606 | Debug::log("link $entry_link", Debug::$LOG_VERBOSE); |
| 607 | 607 | Debug::log("language $entry_language", Debug::$LOG_VERBOSE); |
| 608 | 608 | |
| 609 | - if (!$entry_title) $entry_title = date("Y-m-d H:i:s", $entry_timestamp);; |
|
| 609 | + if (!$entry_title) $entry_title = date("Y-m-d H:i:s", $entry_timestamp); ; |
|
| 610 | 610 | |
| 611 | 611 | $entry_content = $item->get_content(); |
| 612 | 612 | if (!$entry_content) $entry_content = $item->get_description(); |
@@ -627,7 +627,7 @@ discard block |
||
| 627 | 627 | Debug::log("looking for tags...", Debug::$LOG_VERBOSE); |
| 628 | 628 | |
| 629 | 629 | $entry_tags = $item->get_categories(); |
| 630 | - Debug::log("tags found: " . join(", ", $entry_tags), Debug::$LOG_VERBOSE); |
|
| 630 | + Debug::log("tags found: ".join(", ", $entry_tags), Debug::$LOG_VERBOSE); |
|
| 631 | 631 | |
| 632 | 632 | Debug::log("done collecting data.", Debug::$LOG_VERBOSE); |
| 633 | 633 | |
@@ -692,14 +692,14 @@ discard block |
||
| 692 | 692 | Debug::log("hash differs, applying plugin filters:", Debug::$LOG_VERBOSE); |
| 693 | 693 | |
| 694 | 694 | foreach ($pluginhost->get_hooks(PluginHost::HOOK_ARTICLE_FILTER) as $plugin) { |
| 695 | - Debug::log("... " . get_class($plugin), Debug::$LOG_VERBOSE); |
|
| 695 | + Debug::log("... ".get_class($plugin), Debug::$LOG_VERBOSE); |
|
| 696 | 696 | |
| 697 | 697 | $start = microtime(true); |
| 698 | 698 | $article = $plugin->hook_article_filter($article); |
| 699 | 699 | |
| 700 | 700 | Debug::log(sprintf("=== %.4f (sec)", microtime(true) - $start), Debug::$LOG_VERBOSE); |
| 701 | 701 | |
| 702 | - $entry_plugin_data .= mb_strtolower(get_class($plugin)) . ","; |
|
| 702 | + $entry_plugin_data .= mb_strtolower(get_class($plugin)).","; |
|
| 703 | 703 | } |
| 704 | 704 | |
| 705 | 705 | if (Debug::get_loglevel() >= 3) { |
@@ -772,7 +772,7 @@ discard block |
||
| 772 | 772 | Debug::log("applying plugin filter actions...", Debug::$LOG_VERBOSE); |
| 773 | 773 | |
| 774 | 774 | foreach ($plugin_filter_names as $pfn) { |
| 775 | - list($pfclass,$pfaction) = explode(":", $pfn["param"]); |
|
| 775 | + list($pfclass, $pfaction) = explode(":", $pfn["param"]); |
|
| 776 | 776 | |
| 777 | 777 | if (isset($plugin_filter_actions[$pfclass])) { |
| 778 | 778 | $plugin = $pluginhost->get_plugin($pfclass); |
@@ -867,7 +867,7 @@ discard block |
||
| 867 | 867 | $entry_current_hash, |
| 868 | 868 | $date_feed_processed, |
| 869 | 869 | $entry_comments, |
| 870 | - (int)$num_comments, |
|
| 870 | + (int) $num_comments, |
|
| 871 | 871 | $entry_plugin_data, |
| 872 | 872 | "$entry_language", |
| 873 | 873 | "$entry_author"]); |
@@ -979,7 +979,7 @@ discard block |
||
| 979 | 979 | ":content" => "$entry_content", |
| 980 | 980 | ":content_hash" => $entry_current_hash, |
| 981 | 981 | ":updated" => $entry_timestamp_fmt, |
| 982 | - ":num_comments" => (int)$num_comments, |
|
| 982 | + ":num_comments" => (int) $num_comments, |
|
| 983 | 983 | ":plugin_data" => $entry_plugin_data, |
| 984 | 984 | ":author" => "$entry_author", |
| 985 | 985 | ":lang" => $entry_language, |
@@ -987,7 +987,7 @@ discard block |
||
| 987 | 987 | |
| 988 | 988 | if (DB_TYPE == "pgsql") { |
| 989 | 989 | $params[":ts_lang"] = $feed_language; |
| 990 | - $params[":ts_content"] = mb_substr(strip_tags($entry_title . " " . $entry_content), 0, 900000); |
|
| 990 | + $params[":ts_content"] = mb_substr(strip_tags($entry_title." ".$entry_content), 0, 900000); |
|
| 991 | 991 | } |
| 992 | 992 | |
| 993 | 993 | $sth->execute($params); |
@@ -1067,7 +1067,7 @@ discard block |
||
| 1067 | 1067 | foreach ($enclosures as $enc) { |
| 1068 | 1068 | $enc_url = $enc[0]; |
| 1069 | 1069 | $enc_type = $enc[1]; |
| 1070 | - $enc_dur = (int)$enc[2]; |
|
| 1070 | + $enc_dur = (int) $enc[2]; |
|
| 1071 | 1071 | $enc_title = $enc[3]; |
| 1072 | 1072 | $enc_width = intval($enc[4]); |
| 1073 | 1073 | $enc_height = intval($enc[5]); |
@@ -1075,7 +1075,7 @@ discard block |
||
| 1075 | 1075 | $esth->execute([$enc_url, $enc_type, $entry_ref_id]); |
| 1076 | 1076 | |
| 1077 | 1077 | if (!$esth->fetch()) { |
| 1078 | - $usth->execute([$enc_url, $enc_type, (string)$enc_title, $enc_dur, $entry_ref_id, $enc_width, $enc_height]); |
|
| 1078 | + $usth->execute([$enc_url, $enc_type, (string) $enc_title, $enc_dur, $entry_ref_id, $enc_width, $enc_height]); |
|
| 1079 | 1079 | } |
| 1080 | 1080 | } |
| 1081 | 1081 | |
@@ -1109,7 +1109,7 @@ discard block |
||
| 1109 | 1109 | $filtered_tags = array_unique($filtered_tags); |
| 1110 | 1110 | |
| 1111 | 1111 | if (Debug::get_loglevel() >= Debug::$LOG_VERBOSE) { |
| 1112 | - Debug::log("filtered tags: " . implode(", ", $filtered_tags), Debug::$LOG_VERBOSE); |
|
| 1112 | + Debug::log("filtered tags: ".implode(", ", $filtered_tags), Debug::$LOG_VERBOSE); |
|
| 1113 | 1113 | |
| 1114 | 1114 | } |
| 1115 | 1115 | |
@@ -1297,11 +1297,11 @@ discard block |
||
| 1297 | 1297 | $num_deleted = 0; |
| 1298 | 1298 | |
| 1299 | 1299 | if (is_writable(LOCK_DIRECTORY)) { |
| 1300 | - $files = glob(LOCK_DIRECTORY . "/*.lock"); |
|
| 1300 | + $files = glob(LOCK_DIRECTORY."/*.lock"); |
|
| 1301 | 1301 | |
| 1302 | 1302 | if ($files) { |
| 1303 | 1303 | foreach ($files as $file) { |
| 1304 | - if (!file_is_locked(basename($file)) && time() - filemtime($file) > 86400*2) { |
|
| 1304 | + if (!file_is_locked(basename($file)) && time() - filemtime($file) > 86400 * 2) { |
|
| 1305 | 1305 | unlink($file); |
| 1306 | 1306 | ++$num_deleted; |
| 1307 | 1307 | } |
@@ -1516,7 +1516,7 @@ discard block |
||
| 1516 | 1516 | static function check_feed_favicon($site_url, $feed) { |
| 1517 | 1517 | # print "FAVICON [$site_url]: $favicon_url\n"; |
| 1518 | 1518 | |
| 1519 | - $icon_file = ICONS_DIR . "/$feed.ico"; |
|
| 1519 | + $icon_file = ICONS_DIR."/$feed.ico"; |
|
| 1520 | 1520 | |
| 1521 | 1521 | if (!file_exists($icon_file)) { |
| 1522 | 1522 | $favicon_url = RSSUtils::get_favicon_url($site_url); |
@@ -1570,14 +1570,14 @@ discard block |
||
| 1570 | 1570 | |
| 1571 | 1571 | static function is_gzipped($feed_data) { |
| 1572 | 1572 | return strpos(substr($feed_data, 0, 3), |
| 1573 | - "\x1f" . "\x8b" . "\x08", 0) === 0; |
|
| 1573 | + "\x1f"."\x8b"."\x08", 0) === 0; |
|
| 1574 | 1574 | } |
| 1575 | 1575 | |
| 1576 | 1576 | static function load_filters($feed_id, $owner_uid) { |
| 1577 | 1577 | $filters = array(); |
| 1578 | 1578 | |
| 1579 | 1579 | $feed_id = (int) $feed_id; |
| 1580 | - $cat_id = (int)Feeds::getFeedCategory($feed_id); |
|
| 1580 | + $cat_id = (int) Feeds::getFeedCategory($feed_id); |
|
| 1581 | 1581 | |
| 1582 | 1582 | if ($cat_id == 0) |
| 1583 | 1583 | $null_cat_qpart = "cat_id IS NULL OR"; |