@@ -16,7 +16,7 @@ |
||
16 | 16 | } |
17 | 17 | |
18 | 18 | public function get_js() { |
19 | - return file_get_contents(__DIR__ . "/init.js"); |
|
19 | + return file_get_contents(__DIR__."/init.js"); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | public function hook_main_toolbar_button() { |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | return; |
69 | 69 | } |
70 | 70 | |
71 | - load_user_plugins( $_SESSION["uid"]); |
|
71 | + load_user_plugins($_SESSION["uid"]); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | $method = strtolower($_REQUEST["op"]); |
@@ -84,6 +84,6 @@ discard block |
||
84 | 84 | $handler->after(); |
85 | 85 | } |
86 | 86 | |
87 | -header("Api-Content-Length: " . ob_get_length()); |
|
87 | +header("Api-Content-Length: ".ob_get_length()); |
|
88 | 88 | |
89 | 89 | ob_end_flush(); |
@@ -1,9 +1,9 @@ discard block |
||
1 | 1 | #!/usr/bin/env php |
2 | 2 | <?php |
3 | -set_include_path(dirname(__FILE__) .DIRECTORY_SEPARATOR."include" . PATH_SEPARATOR . |
|
3 | +set_include_path(dirname(__FILE__).DIRECTORY_SEPARATOR."include".PATH_SEPARATOR. |
|
4 | 4 | get_include_path()); |
5 | 5 | |
6 | -declare(ticks = 1); |
|
6 | +declare(ticks=1); |
|
7 | 7 | chdir(dirname(__FILE__)); |
8 | 8 | |
9 | 9 | define('DISABLE_SESSIONS', true); |
@@ -93,9 +93,9 @@ discard block |
||
93 | 93 | |
94 | 94 | function shutdown($caller_pid) { |
95 | 95 | if ($caller_pid == posix_getpid()) { |
96 | - if (file_exists(LOCK_DIRECTORY . "/update_daemon.lock")) { |
|
96 | + if (file_exists(LOCK_DIRECTORY."/update_daemon.lock")) { |
|
97 | 97 | Debug::log("removing lockfile (master)..."); |
98 | - unlink(LOCK_DIRECTORY . "/update_daemon.lock"); |
|
98 | + unlink(LOCK_DIRECTORY."/update_daemon.lock"); |
|
99 | 99 | } |
100 | 100 | } |
101 | 101 | } |
@@ -103,9 +103,9 @@ discard block |
||
103 | 103 | function task_shutdown() { |
104 | 104 | $pid = posix_getpid(); |
105 | 105 | |
106 | - if (file_exists(LOCK_DIRECTORY . "/update_daemon-$pid.lock")) { |
|
106 | + if (file_exists(LOCK_DIRECTORY."/update_daemon-$pid.lock")) { |
|
107 | 107 | Debug::log("removing lockfile ($pid)..."); |
108 | - unlink(LOCK_DIRECTORY . "/update_daemon-$pid.lock"); |
|
108 | + unlink(LOCK_DIRECTORY."/update_daemon-$pid.lock"); |
|
109 | 109 | } |
110 | 110 | } |
111 | 111 | |
@@ -134,15 +134,15 @@ discard block |
||
134 | 134 | |
135 | 135 | $options = getopt("", $longopts); |
136 | 136 | |
137 | -if (isset($options["help"]) ) { |
|
137 | +if (isset($options["help"])) { |
|
138 | 138 | print "Tiny Tiny RSS update daemon.\n\n"; |
139 | 139 | print "Options:\n"; |
140 | 140 | print " --log FILE - log messages to FILE\n"; |
141 | 141 | print " --log-level N - log verbosity level\n"; |
142 | 142 | print " --tasks N - amount of update tasks to spawn\n"; |
143 | - print " default: " . MAX_JOBS . "\n"; |
|
143 | + print " default: ".MAX_JOBS."\n"; |
|
144 | 144 | print " --interval N - task spawn interval\n"; |
145 | - print " default: " . SPAWN_INTERVAL . " seconds.\n"; |
|
145 | + print " default: ".SPAWN_INTERVAL." seconds.\n"; |
|
146 | 146 | print " --quiet - don't output messages to stdout\n"; |
147 | 147 | return; |
148 | 148 | } |
@@ -150,13 +150,13 @@ discard block |
||
150 | 150 | Debug::set_enabled(true); |
151 | 151 | |
152 | 152 | if (isset($options["log-level"])) { |
153 | - Debug::set_loglevel((int)$options["log-level"]); |
|
153 | + Debug::set_loglevel((int) $options["log-level"]); |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | if (isset($options["log"])) { |
157 | 157 | Debug::set_quiet(isset($options['quiet'])); |
158 | 158 | Debug::set_logfile($options["log"]); |
159 | - Debug::log("Logging to " . $options["log"]); |
|
159 | + Debug::log("Logging to ".$options["log"]); |
|
160 | 160 | } else { |
161 | 161 | if (isset($options['quiet'])) { |
162 | 162 | Debug::set_loglevel(Debug::$LOG_DISABLED); |
@@ -164,14 +164,14 @@ discard block |
||
164 | 164 | } |
165 | 165 | |
166 | 166 | if (isset($options["tasks"])) { |
167 | - Debug::log("Set to spawn " . $options["tasks"] . " children."); |
|
167 | + Debug::log("Set to spawn ".$options["tasks"]." children."); |
|
168 | 168 | $max_jobs = $options["tasks"]; |
169 | 169 | } else { |
170 | 170 | $max_jobs = MAX_JOBS; |
171 | 171 | } |
172 | 172 | |
173 | 173 | if (isset($options["interval"])) { |
174 | - Debug::log("Spawn interval: " . $options["interval"] . " seconds."); |
|
174 | + Debug::log("Spawn interval: ".$options["interval"]." seconds."); |
|
175 | 175 | $spawn_interval = $options["interval"]; |
176 | 176 | } else { |
177 | 177 | $spawn_interval = SPAWN_INTERVAL; |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | |
247 | 247 | $my_pid = posix_getpid(); |
248 | 248 | |
249 | - passthru(PHP_EXECUTABLE . " update.php --daemon-loop $quiet $log --task $j --pidlock $my_pid"); |
|
249 | + passthru(PHP_EXECUTABLE." update.php --daemon-loop $quiet $log --task $j --pidlock $my_pid"); |
|
250 | 250 | |
251 | 251 | sleep(1); |
252 | 252 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | #!/usr/bin/env php |
2 | 2 | <?php |
3 | - set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR . |
|
3 | + set_include_path(dirname(__FILE__)."/include".PATH_SEPARATOR. |
|
4 | 4 | get_include_path()); |
5 | 5 | |
6 | 6 | define('DISABLE_SESSIONS', true); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | "help"); |
89 | 89 | |
90 | 90 | foreach (PluginHost::getInstance()->get_commands() as $command => $data) { |
91 | - array_push($longopts, $command . $data["suffix"]); |
|
91 | + array_push($longopts, $command.$data["suffix"]); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | $options = getopt("", $longopts); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | exit; |
120 | 120 | } |
121 | 121 | |
122 | - if (count($options) == 0 || isset($options["help"]) ) { |
|
122 | + if (count($options) == 0 || isset($options["help"])) { |
|
123 | 123 | print "Tiny Tiny RSS data update script.\n\n"; |
124 | 124 | print "Options:\n"; |
125 | 125 | print " --feeds - update feeds\n"; |
@@ -165,13 +165,13 @@ discard block |
||
165 | 165 | Debug::set_enabled(true); |
166 | 166 | |
167 | 167 | if (isset($options["log-level"])) { |
168 | - Debug::set_loglevel((int)$options["log-level"]); |
|
168 | + Debug::set_loglevel((int) $options["log-level"]); |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | if (isset($options["log"])) { |
172 | 172 | Debug::set_quiet(isset($options['quiet'])); |
173 | 173 | Debug::set_logfile($options["log"]); |
174 | - Debug::log("Logging to " . $options["log"]); |
|
174 | + Debug::log("Logging to ".$options["log"]); |
|
175 | 175 | } else { |
176 | 176 | if (isset($options['quiet'])) { |
177 | 177 | Debug::set_loglevel(Debug::$LOG_DISABLED); |
@@ -185,8 +185,8 @@ discard block |
||
185 | 185 | } |
186 | 186 | |
187 | 187 | if (isset($options["task"])) { |
188 | - Debug::log("Using task id " . $options["task"]); |
|
189 | - $lock_filename = $lock_filename . "-task_" . $options["task"]; |
|
188 | + Debug::log("Using task id ".$options["task"]); |
|
189 | + $lock_filename = $lock_filename."-task_".$options["task"]; |
|
190 | 190 | } |
191 | 191 | |
192 | 192 | if (isset($options["pidlock"])) { |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | if (isset($options["force-update"])) { |
216 | 216 | Debug::log("marking all feeds as needing update..."); |
217 | 217 | |
218 | - $pdo->query( "UPDATE ttrss_feeds SET |
|
218 | + $pdo->query("UPDATE ttrss_feeds SET |
|
219 | 219 | last_update_started = '1970-01-01', last_updated = '1970-01-01'"); |
220 | 220 | } |
221 | 221 | |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | $log = isset($options['log']) ? '--log '.$options['log'] : ''; |
233 | 233 | $log_level = isset($options['log-level']) ? '--log-level '.$options['log-level'] : ''; |
234 | 234 | |
235 | - passthru(PHP_EXECUTABLE . " " . $argv[0] ." --daemon-loop $quiet $log $log_level"); |
|
235 | + passthru(PHP_EXECUTABLE." ".$argv[0]." --daemon-loop $quiet $log $log_level"); |
|
236 | 236 | |
237 | 237 | // let's enforce a minimum spawn interval as to not forkbomb the host |
238 | 238 | $spawn_interval = max(60, DAEMON_SLEEP_INTERVAL); |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | } |
257 | 257 | |
258 | 258 | if (isset($options["cleanup-tags"])) { |
259 | - $rc = cleanup_tags( 14, 50000); |
|
259 | + $rc = cleanup_tags(14, 50000); |
|
260 | 260 | Debug::log("$rc tags deleted.\n"); |
261 | 261 | } |
262 | 262 | |
@@ -270,18 +270,18 @@ discard block |
||
270 | 270 | Debug::log("clearing existing indexes..."); |
271 | 271 | |
272 | 272 | if (DB_TYPE == "pgsql") { |
273 | - $sth = $pdo->query( "SELECT relname FROM |
|
273 | + $sth = $pdo->query("SELECT relname FROM |
|
274 | 274 | pg_catalog.pg_class WHERE relname LIKE 'ttrss_%' |
275 | 275 | AND relname NOT LIKE '%_pkey' |
276 | 276 | AND relkind = 'i'"); |
277 | 277 | } else { |
278 | - $sth = $pdo->query( "SELECT index_name,table_name FROM |
|
278 | + $sth = $pdo->query("SELECT index_name,table_name FROM |
|
279 | 279 | information_schema.statistics WHERE index_name LIKE 'ttrss_%'"); |
280 | 280 | } |
281 | 281 | |
282 | 282 | while ($line = $sth->fetch()) { |
283 | 283 | if (DB_TYPE == "pgsql") { |
284 | - $statement = "DROP INDEX " . $line["relname"]; |
|
284 | + $statement = "DROP INDEX ".$line["relname"]; |
|
285 | 285 | Debug::log($statement); |
286 | 286 | } else { |
287 | 287 | $statement = "ALTER TABLE ". |
@@ -291,9 +291,9 @@ discard block |
||
291 | 291 | $pdo->query($statement); |
292 | 292 | } |
293 | 293 | |
294 | - Debug::log("reading indexes from schema for: " . DB_TYPE); |
|
294 | + Debug::log("reading indexes from schema for: ".DB_TYPE); |
|
295 | 295 | |
296 | - $fp = fopen("schema/ttrss_schema_" . DB_TYPE . ".sql", "r"); |
|
296 | + $fp = fopen("schema/ttrss_schema_".DB_TYPE.".sql", "r"); |
|
297 | 297 | if ($fp) { |
298 | 298 | while ($line = fgets($fp)) { |
299 | 299 | $matches = array(); |
@@ -336,9 +336,9 @@ discard block |
||
336 | 336 | $filter = array(); |
337 | 337 | |
338 | 338 | if (sql_bool_to_bool($line["cat_filter"])) { |
339 | - $feed_id = "CAT:" . (int)$line["cat_id"]; |
|
339 | + $feed_id = "CAT:".(int) $line["cat_id"]; |
|
340 | 340 | } else { |
341 | - $feed_id = (int)$line["feed_id"]; |
|
341 | + $feed_id = (int) $line["feed_id"]; |
|
342 | 342 | } |
343 | 343 | |
344 | 344 | $filter["enabled"] = $line["enabled"] ? "on" : "off"; |
@@ -367,12 +367,12 @@ discard block |
||
367 | 367 | } |
368 | 368 | |
369 | 369 | if (isset($options["update-schema"])) { |
370 | - Debug::log("Checking for updates (" . DB_TYPE . ")..."); |
|
370 | + Debug::log("Checking for updates (".DB_TYPE.")..."); |
|
371 | 371 | |
372 | 372 | $updater = new DbUpdater(DB_TYPE, SCHEMA_VERSION); |
373 | 373 | |
374 | 374 | if ($updater->isUpdateRequired()) { |
375 | - Debug::log("Schema update required, version " . $updater->getSchemaVersion() . " to " . SCHEMA_VERSION); |
|
375 | + Debug::log("Schema update required, version ".$updater->getSchemaVersion()." to ".SCHEMA_VERSION); |
|
376 | 376 | |
377 | 377 | if (DB_TYPE == "mysql") |
378 | 378 | Debug::Log("READ THIS: Due to MySQL limitations, your database is not completely protected while updating.\n". |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | if (read_stdin() != 'yes') |
386 | 386 | exit; |
387 | 387 | |
388 | - Debug::log("Performing updates to version " . SCHEMA_VERSION); |
|
388 | + Debug::log("Performing updates to version ".SCHEMA_VERSION); |
|
389 | 389 | |
390 | 390 | for ($i = $updater->getSchemaVersion() + 1; $i <= SCHEMA_VERSION; $i++) { |
391 | 391 | Debug::log("* Updating to version $i..."); |
@@ -428,7 +428,7 @@ discard block |
||
428 | 428 | while (true) { |
429 | 429 | |
430 | 430 | while ($line = $sth->fetch()) { |
431 | - $tsvector_combined = mb_substr(strip_tags($line["title"] . " " . $line["content"]), 0, 1000000); |
|
431 | + $tsvector_combined = mb_substr(strip_tags($line["title"]." ".$line["content"]), 0, 1000000); |
|
432 | 432 | |
433 | 433 | $usth->execute([$tsvector_combined, $line['id']]); |
434 | 434 | |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | |
486 | 486 | PluginHost::getInstance()->run_commands($options); |
487 | 487 | |
488 | - if (file_exists(LOCK_DIRECTORY . "/$lock_filename")) |
|
488 | + if (file_exists(LOCK_DIRECTORY."/$lock_filename")) |
|
489 | 489 | if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') |
490 | 490 | fclose($lock_handle); |
491 | - unlink(LOCK_DIRECTORY . "/$lock_filename"); |
|
491 | + unlink(LOCK_DIRECTORY."/$lock_filename"); |
@@ -14,7 +14,7 @@ |
||
14 | 14 | } |
15 | 15 | |
16 | 16 | public function get_js() { |
17 | - return file_get_contents(__DIR__ . "/init.js"); |
|
17 | + return file_get_contents(__DIR__."/init.js"); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | public function api_version() { |
@@ -14,7 +14,7 @@ |
||
14 | 14 | } |
15 | 15 | |
16 | 16 | public function get_js() { |
17 | - return file_get_contents(__DIR__ . "/init.js"); |
|
17 | + return file_get_contents(__DIR__."/init.js"); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | public function api_version() { |
@@ -14,7 +14,7 @@ |
||
14 | 14 | } |
15 | 15 | |
16 | 16 | public function get_js() { |
17 | - return file_get_contents(__DIR__ . "/init.js"); |
|
17 | + return file_get_contents(__DIR__."/init.js"); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | public function api_version() { |
@@ -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 | } |
@@ -194,12 +194,12 @@ discard block |
||
194 | 194 | !is_dir(__DIR__."/../plugins.local/$class_file")) continue; |
195 | 195 | |
196 | 196 | // try system plugin directory first |
197 | - $file = __DIR__ . "/../plugins/$class_file/init.php"; |
|
198 | - $vendor_dir = __DIR__ . "/../plugins/$class_file/vendor"; |
|
197 | + $file = __DIR__."/../plugins/$class_file/init.php"; |
|
198 | + $vendor_dir = __DIR__."/../plugins/$class_file/vendor"; |
|
199 | 199 | |
200 | 200 | if (!file_exists($file)) { |
201 | - $file = __DIR__ . "/../plugins.local/$class_file/init.php"; |
|
202 | - $vendor_dir = __DIR__ . "/../plugins.local/$class_file/vendor"; |
|
201 | + $file = __DIR__."/../plugins.local/$class_file/init.php"; |
|
202 | + $vendor_dir = __DIR__."/../plugins.local/$class_file/vendor"; |
|
203 | 203 | } |
204 | 204 | |
205 | 205 | if (!isset($this->plugins[$class])) { |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | list ($namespace, $class_name) = explode('\\', $class, 2); |
218 | 218 | |
219 | 219 | if ($namespace && $class_name) { |
220 | - $class_file = "$vendor_dir/$namespace/" . str_replace('\\', '/', $class_name) . ".php"; |
|
220 | + $class_file = "$vendor_dir/$namespace/".str_replace('\\', '/', $class_name).".php"; |
|
221 | 221 | |
222 | 222 | if (file_exists($class_file)) |
223 | 223 | require_once $class_file; |
@@ -231,12 +231,12 @@ discard block |
||
231 | 231 | $plugin_api = $plugin->api_version(); |
232 | 232 | |
233 | 233 | if ($plugin_api < PluginHost::API_VERSION) { |
234 | - user_error("plugin $class is not compatible with current API version (need: " . PluginHost::API_VERSION . ", got: $plugin_api)", E_USER_WARNING); |
|
234 | + user_error("plugin $class is not compatible with current API version (need: ".PluginHost::API_VERSION.", got: $plugin_api)", E_USER_WARNING); |
|
235 | 235 | continue; |
236 | 236 | } |
237 | 237 | |
238 | - if (file_exists(dirname($file) . "/locale")) { |
|
239 | - _bindtextdomain($class, dirname($file) . "/locale"); |
|
238 | + if (file_exists(dirname($file)."/locale")) { |
|
239 | + _bindtextdomain($class, dirname($file)."/locale"); |
|
240 | 240 | _bind_textdomain_codeset($class, "UTF-8"); |
241 | 241 | } |
242 | 242 | |
@@ -319,13 +319,13 @@ discard block |
||
319 | 319 | } |
320 | 320 | |
321 | 321 | public function del_command($command) { |
322 | - $command = "-" . strtolower($command); |
|
322 | + $command = "-".strtolower($command); |
|
323 | 323 | |
324 | 324 | unset($this->commands[$command]); |
325 | 325 | } |
326 | 326 | |
327 | 327 | public function lookup_command($command) { |
328 | - $command = "-" . strtolower($command); |
|
328 | + $command = "-".strtolower($command); |
|
329 | 329 | |
330 | 330 | if (is_array($this->commands[$command])) { |
331 | 331 | return $this->commands[$command]["class"]; |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | } |
349 | 349 | |
350 | 350 | public function load_data() { |
351 | - if ($this->owner_uid) { |
|
351 | + if ($this->owner_uid) { |
|
352 | 352 | $sth = $this->pdo->prepare("SELECT name, content FROM ttrss_plugin_storage |
353 | 353 | WHERE owner_uid = ?"); |
354 | 354 | $sth->execute([$this->owner_uid]); |
@@ -375,13 +375,13 @@ discard block |
||
375 | 375 | if ($sth->fetch()) { |
376 | 376 | $sth = $this->pdo->prepare("UPDATE ttrss_plugin_storage SET content = ? |
377 | 377 | WHERE owner_uid= ? AND name = ?"); |
378 | - $sth->execute([(string)$content, $this->owner_uid, $plugin]); |
|
378 | + $sth->execute([(string) $content, $this->owner_uid, $plugin]); |
|
379 | 379 | |
380 | 380 | } else { |
381 | 381 | $sth = $this->pdo->prepare("INSERT INTO ttrss_plugin_storage |
382 | 382 | (name,owner_uid,content) VALUES |
383 | 383 | (?, ?, ?)"); |
384 | - $sth->execute([$plugin, $this->owner_uid, (string)$content]); |
|
384 | + $sth->execute([$plugin, $this->owner_uid, (string) $content]); |
|
385 | 385 | } |
386 | 386 | |
387 | 387 | $this->pdo->commit(); |
@@ -495,8 +495,8 @@ discard block |
||
495 | 495 | } |
496 | 496 | |
497 | 497 | // handled by classes/pluginhandler.php, requires valid session |
498 | - public function get_method_url($sender, $method, $params) { |
|
499 | - return get_self_url_prefix() . "/backend.php?" . |
|
498 | + public function get_method_url($sender, $method, $params) { |
|
499 | + return get_self_url_prefix()."/backend.php?". |
|
500 | 500 | http_build_query( |
501 | 501 | array_merge( |
502 | 502 | [ |
@@ -508,9 +508,9 @@ discard block |
||
508 | 508 | } |
509 | 509 | |
510 | 510 | // WARNING: endpoint in public.php, exposed to unauthenticated users |
511 | - public function get_public_method_url($sender, $method, $params) { |
|
511 | + public function get_public_method_url($sender, $method, $params) { |
|
512 | 512 | if ($sender->is_public_method($method)) { |
513 | - return get_self_url_prefix() . "/public.php?" . |
|
513 | + return get_self_url_prefix()."/public.php?". |
|
514 | 514 | http_build_query( |
515 | 515 | array_merge( |
516 | 516 | [ |
@@ -520,7 +520,7 @@ discard block |
||
520 | 520 | ], |
521 | 521 | $params)); |
522 | 522 | } else { |
523 | - user_error("get_public_method_url: requested method '$method' of '" . get_class($sender) . "' is private."); |
|
523 | + user_error("get_public_method_url: requested method '$method' of '".get_class($sender)."' is private."); |
|
524 | 524 | } |
525 | 525 | } |
526 | 526 | } |