@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | } |
42 | 42 | |
43 | 43 | public function get_js() { |
44 | - return file_get_contents(__DIR__ . "/init.js"); |
|
44 | + return file_get_contents(__DIR__."/init.js"); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | public function showrelated() { |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | print "</div>"; |
100 | 100 | |
101 | - print "<div style='text-align : right' class='text-muted'>" . smart_date_time(strtotime($line["updated"])) . "</div>"; |
|
101 | + print "<div style='text-align : right' class='text-muted'>".smart_date_time(strtotime($line["updated"]))."</div>"; |
|
102 | 102 | |
103 | 103 | print "</li>"; |
104 | 104 | } |
@@ -163,24 +163,24 @@ discard block |
||
163 | 163 | print_hidden("method", "save"); |
164 | 164 | print_hidden("plugin", "af_psql_trgm"); |
165 | 165 | |
166 | - print "<h2>" . __("Global settings") . "</h2>"; |
|
166 | + print "<h2>".__("Global settings")."</h2>"; |
|
167 | 167 | |
168 | 168 | print_notice("Enable for specific feeds in the feed editor."); |
169 | 169 | |
170 | 170 | print "<fieldset>"; |
171 | 171 | |
172 | - print "<label>" . __("Minimum similarity:") . "</label> "; |
|
172 | + print "<label>".__("Minimum similarity:")."</label> "; |
|
173 | 173 | print "<input dojoType=\"dijit.form.NumberSpinner\" |
174 | 174 | placeholder=\"0.75\" id='psql_trgm_similarity' |
175 | 175 | required=\"1\" name=\"similarity\" value=\"$similarity\">"; |
176 | 176 | |
177 | - print "<div dojoType='dijit.Tooltip' connectId='psql_trgm_similarity' position='below'>" . |
|
178 | - __("PostgreSQL trigram extension returns string similarity as a floating point number (0-1). Setting it too low might produce false positives, zero disables checking.") . |
|
177 | + print "<div dojoType='dijit.Tooltip' connectId='psql_trgm_similarity' position='below'>". |
|
178 | + __("PostgreSQL trigram extension returns string similarity as a floating point number (0-1). Setting it too low might produce false positives, zero disables checking."). |
|
179 | 179 | "</div>"; |
180 | 180 | |
181 | 181 | print "</fieldset><fieldset>"; |
182 | 182 | |
183 | - print "<label>" . __("Minimum title length:") . "</label> "; |
|
183 | + print "<label>".__("Minimum title length:")."</label> "; |
|
184 | 184 | print "<input dojoType=\"dijit.form.NumberSpinner\" |
185 | 185 | placeholder=\"32\" |
186 | 186 | required=\"1\" name=\"min_title_length\" value=\"$min_title_length\">"; |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | |
190 | 190 | print "<label class='checkbox'>"; |
191 | 191 | print_checkbox("enable_globally", $enable_globally); |
192 | - print " " . __("Enable for all feeds:"); |
|
192 | + print " ".__("Enable for all feeds:"); |
|
193 | 193 | print "</label>"; |
194 | 194 | |
195 | 195 | print "</fieldset>"; |
@@ -204,14 +204,14 @@ discard block |
||
204 | 204 | $this->host->set($this, "enabled_feeds", $enabled_feeds); |
205 | 205 | |
206 | 206 | if (count($enabled_feeds) > 0) { |
207 | - print "<h3>" . __("Currently enabled for (click to edit):") . "</h3>"; |
|
207 | + print "<h3>".__("Currently enabled for (click to edit):")."</h3>"; |
|
208 | 208 | |
209 | 209 | print "<ul class=\"panel panel-scrollable list list-unstyled\">"; |
210 | 210 | foreach ($enabled_feeds as $f) { |
211 | - print "<li>" . |
|
211 | + print "<li>". |
|
212 | 212 | "<i class='material-icons'>rss_feed</i> <a href='#' |
213 | - onclick='CommonDialogs.editFeed($f)'>" . |
|
214 | - Feeds::getFeedTitle($f) . "</a></li>"; |
|
213 | + onclick='CommonDialogs.editFeed($f)'>". |
|
214 | + Feeds::getFeedTitle($f)."</a></li>"; |
|
215 | 215 | } |
216 | 216 | print "</ul>"; |
217 | 217 | } |
@@ -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 |