@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | print_error("This plugin requires PHP 7.0."); |
57 | 57 | } else { |
58 | 58 | |
59 | - print "<h2>" . __("Global settings") . "</h2>"; |
|
59 | + print "<h2>".__("Global settings")."</h2>"; |
|
60 | 60 | |
61 | 61 | print_notice("Enable for specific feeds in the feed editor."); |
62 | 62 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | print "<fieldset>"; |
86 | 86 | print "<label class='checkbox'> "; |
87 | 87 | print_checkbox("enable_share_anything", $enable_share_anything); |
88 | - print " " . __("Provide full-text services to core code (bookmarklets) and other plugins"); |
|
88 | + print " ".__("Provide full-text services to core code (bookmarklets) and other plugins"); |
|
89 | 89 | print "</label>"; |
90 | 90 | print "</fieldset>"; |
91 | 91 | |
@@ -99,13 +99,13 @@ discard block |
||
99 | 99 | $this->host->set($this, "enabled_feeds", $enabled_feeds); |
100 | 100 | |
101 | 101 | if (count($enabled_feeds) > 0) { |
102 | - print "<h3>" . __("Currently enabled for (click to edit):") . "</h3>"; |
|
102 | + print "<h3>".__("Currently enabled for (click to edit):")."</h3>"; |
|
103 | 103 | |
104 | 104 | print "<ul class='panel panel-scrollable list list-unstyled'>"; |
105 | 105 | foreach ($enabled_feeds as $f) { |
106 | 106 | print "<li><i class='material-icons'>rss_feed</i> <a href='#' |
107 | 107 | onclick='CommonDialogs.editFeed($f)'>". |
108 | - Feeds::getFeedTitle($f) . "</a></li>"; |
|
108 | + Feeds::getFeedTitle($f)."</a></li>"; |
|
109 | 109 | } |
110 | 110 | print "</ul>"; |
111 | 111 | } |
@@ -47,7 +47,9 @@ discard block |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | public function hook_prefs_tab($args) { |
50 | - if ($args != "prefFeeds") return; |
|
50 | + if ($args != "prefFeeds") { |
|
51 | + return; |
|
52 | + } |
|
51 | 53 | |
52 | 54 | print "<div dojoType='dijit.layout.AccordionPane' |
53 | 55 | title=\"<i class='material-icons'>extension</i> ".__('Readability settings (af_readability)')."\">"; |
@@ -93,7 +95,9 @@ discard block |
||
93 | 95 | print "</form>"; |
94 | 96 | |
95 | 97 | $enabled_feeds = $this->host->get($this, "enabled_feeds"); |
96 | - if (!is_array($enabled_feeds)) $enabled_feeds = array(); |
|
98 | + if (!is_array($enabled_feeds)) { |
|
99 | + $enabled_feeds = array(); |
|
100 | + } |
|
97 | 101 | |
98 | 102 | $enabled_feeds = $this->filter_unknown_feeds($enabled_feeds); |
99 | 103 | $this->host->set($this, "enabled_feeds", $enabled_feeds); |
@@ -120,7 +124,9 @@ discard block |
||
120 | 124 | print "<section>"; |
121 | 125 | |
122 | 126 | $enabled_feeds = $this->host->get($this, "enabled_feeds"); |
123 | - if (!is_array($enabled_feeds)) $enabled_feeds = array(); |
|
127 | + if (!is_array($enabled_feeds)) { |
|
128 | + $enabled_feeds = array(); |
|
129 | + } |
|
124 | 130 | |
125 | 131 | $key = array_search($feed_id, $enabled_feeds); |
126 | 132 | $checked = $key !== FALSE ? "checked" : ""; |
@@ -137,7 +143,9 @@ discard block |
||
137 | 143 | |
138 | 144 | public function hook_prefs_save_feed($feed_id) { |
139 | 145 | $enabled_feeds = $this->host->get($this, "enabled_feeds"); |
140 | - if (!is_array($enabled_feeds)) $enabled_feeds = array(); |
|
146 | + if (!is_array($enabled_feeds)) { |
|
147 | + $enabled_feeds = array(); |
|
148 | + } |
|
141 | 149 | |
142 | 150 | $enable = checkbox_to_sql_bool($_POST["af_readability_enabled"]); |
143 | 151 | $key = array_search($feed_id, $enabled_feeds); |
@@ -174,8 +182,9 @@ discard block |
||
174 | 182 | if ($tmp && mb_strlen($tmp) < 1024 * 500) { |
175 | 183 | $tmpdoc = new DOMDocument("1.0", "UTF-8"); |
176 | 184 | |
177 | - if (!@$tmpdoc->loadHTML($tmp)) |
|
178 | - return false; |
|
185 | + if (!@$tmpdoc->loadHTML($tmp)) { |
|
186 | + return false; |
|
187 | + } |
|
179 | 188 | |
180 | 189 | // this is the worst hack yet :( |
181 | 190 | if (strtolower($tmpdoc->encoding) != 'utf-8') { |
@@ -237,10 +246,14 @@ discard block |
||
237 | 246 | public function hook_article_filter($article) { |
238 | 247 | |
239 | 248 | $enabled_feeds = $this->host->get($this, "enabled_feeds"); |
240 | - if (!is_array($enabled_feeds)) return $article; |
|
249 | + if (!is_array($enabled_feeds)) { |
|
250 | + return $article; |
|
251 | + } |
|
241 | 252 | |
242 | 253 | $key = array_search($article["feed"]["id"], $enabled_feeds); |
243 | - if ($key === FALSE) return $article; |
|
254 | + if ($key === FALSE) { |
|
255 | + return $article; |
|
256 | + } |
|
244 | 257 | |
245 | 258 | return $this->process_article($article); |
246 | 259 |
@@ -6,5 +6,5 @@ |
||
6 | 6 | |
7 | 7 | class DOMElement extends \DOMElement |
8 | 8 | { |
9 | - use NodeTrait; |
|
9 | + use NodeTrait; |
|
10 | 10 | } |
@@ -6,5 +6,5 @@ |
||
6 | 6 | |
7 | 7 | class DOMCdataSection extends \DOMCdataSection |
8 | 8 | { |
9 | - use NodeTrait; |
|
9 | + use NodeTrait; |
|
10 | 10 | } |
@@ -6,5 +6,5 @@ |
||
6 | 6 | |
7 | 7 | class DOMDocumentType extends \DOMDocumentType |
8 | 8 | { |
9 | - use NodeTrait; |
|
9 | + use NodeTrait; |
|
10 | 10 | } |
@@ -6,5 +6,5 @@ |
||
6 | 6 | |
7 | 7 | class DOMProcessingInstruction extends \DOMProcessingInstruction |
8 | 8 | { |
9 | - use NodeTrait; |
|
9 | + use NodeTrait; |
|
10 | 10 | } |
@@ -6,5 +6,5 @@ |
||
6 | 6 | |
7 | 7 | class DOMCharacterData extends \DOMCharacterData |
8 | 8 | { |
9 | - use NodeTrait; |
|
9 | + use NodeTrait; |
|
10 | 10 | } |
@@ -10,5 +10,5 @@ |
||
10 | 10 | */ |
11 | 11 | class DOMNode extends \DOMNode |
12 | 12 | { |
13 | - use NodeTrait; |
|
13 | + use NodeTrait; |
|
14 | 14 | } |
@@ -6,5 +6,5 @@ |
||
6 | 6 | |
7 | 7 | class DOMAttr extends \DOMAttr |
8 | 8 | { |
9 | - use NodeTrait; |
|
9 | + use NodeTrait; |
|
10 | 10 | } |
@@ -6,5 +6,5 @@ |
||
6 | 6 | |
7 | 7 | class DOMText extends \DOMText |
8 | 8 | { |
9 | - use NodeTrait; |
|
9 | + use NodeTrait; |
|
10 | 10 | } |