Passed
Pull Request — master (#6)
by Mark
02:09
created
_test/general.test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      * Simple test to make sure the plugin.info.txt is in correct format
30 30
      */
31 31
     public function test_plugininfo(): void {
32
-        $file = __DIR__ . '/../plugin.info.txt';
32
+        $file = __DIR__.'/../plugin.info.txt';
33 33
         $this->assertFileExists($file);
34 34
 
35 35
         $info = confToHash($file);
Please login to merge, or discard this patch.
lib/sioc_dokuwiki.php 1 patch
Spacing   +79 added lines, -79 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     }
58 58
 
59 59
     public function addLinks($links) {
60
-        if(is_array($links) && count($links) > 0) {
60
+        if (is_array($links) && count($links) > 0) {
61 61
             $this->links = $links;
62 62
         }
63 63
     }
@@ -92,9 +92,9 @@  discard block
 block discarded – undo
92 92
     }
93 93
 
94 94
     public function getContent(&$exp): string {
95
-        $rdf = '<' . $this->type . " rdf:about=\"" . clean($this->url, true) . "\">\n";
96
-        if($this->subject) {
97
-            $rdf .= "\t<dc:title>" . clean($this->subject) . "</dc:title>\n";
95
+        $rdf = '<'.$this->type." rdf:about=\"".clean($this->url, true)."\">\n";
96
+        if ($this->subject) {
97
+            $rdf .= "\t<dc:title>".clean($this->subject)."</dc:title>\n";
98 98
             // if(strcmp($this->has_container, 'http://en.wikipedia.org')===0)
99 99
             //    $rdf .= "\t<foaf:primaryTopic rdf:resource=\"".clean('http://dbpedia.org/resource/'
100 100
             //      .$this->subject)."\"/>\n";
@@ -102,59 +102,59 @@  discard block
 block discarded – undo
102 102
 
103 103
         $creator_name = null;
104 104
 
105
-        if(count($this->contributors) > 0) {
106
-            foreach($this->contributors as $cont_id => $cont_name) {
107
-                if(!isset($this->creator['sioc:modifier']) || ($this->creator['sioc:modifier'] != $cont_id)) {
108
-                    $rdf .= "\t<sioc:has_modifier rdf:resource=\"" . normalizeUri($exp->siocURL('user', $cont_id))
109
-                        . "\" rdfs:label=\"" . clean($cont_name) . "\"/>\n";
105
+        if (count($this->contributors) > 0) {
106
+            foreach ($this->contributors as $cont_id => $cont_name) {
107
+                if (!isset($this->creator['sioc:modifier']) || ($this->creator['sioc:modifier'] != $cont_id)) {
108
+                    $rdf .= "\t<sioc:has_modifier rdf:resource=\"".normalizeUri($exp->siocURL('user', $cont_id))
109
+                        . "\" rdfs:label=\"".clean($cont_name)."\"/>\n";
110 110
                 }
111 111
             }
112 112
 
113
-            if(isset($this->contributors[$this->creator['sioc:modifier']])) {
114
-                $creator_name = 'rdfs:label="' . clean($this->contributors[$this->creator['sioc:modifier']]) . '"';
113
+            if (isset($this->contributors[$this->creator['sioc:modifier']])) {
114
+                $creator_name = 'rdfs:label="'.clean($this->contributors[$this->creator['sioc:modifier']]).'"';
115 115
             }
116 116
         }
117 117
 
118
-        if(is_array($this->creator)) {
118
+        if (is_array($this->creator)) {
119 119
             // if ($this->creator['foaf:maker'])
120 120
             //     $rdf .= "\t<foaf:maker rdf:resource=\"".clean($this->creator['foaf:maker'])."\"/>\n";
121
-            if($this->creator['sioc:modifier']) {
122
-                if($this->is_creator === false) {
121
+            if ($this->creator['sioc:modifier']) {
122
+                if ($this->is_creator === false) {
123 123
                     $rdf .= "\t<sioc:has_modifier rdf:resource=\""
124
-                        . normalizeUri($exp->siocURL('user', $this->creator['sioc:modifier'])) . "\" $creator_name/>\n";
124
+                        . normalizeUri($exp->siocURL('user', $this->creator['sioc:modifier']))."\" $creator_name/>\n";
125 125
                 }
126
-                if($this->is_creator === true) {
126
+                if ($this->is_creator === true) {
127 127
                     $rdf .= "\t<sioc:has_creator rdf:resource=\""
128
-                        . normalizeUri($exp->siocURL('user', $this->creator['sioc:modifier'])) . "\" $creator_name/>\n";
128
+                        . normalizeUri($exp->siocURL('user', $this->creator['sioc:modifier']))."\" $creator_name/>\n";
129 129
                 }
130 130
             }
131 131
         }
132 132
 
133
-        if($this->created) {
134
-            $rdf .= "\t<dcterms:created>" . $this->created . "</dcterms:created>\n";
133
+        if ($this->created) {
134
+            $rdf .= "\t<dcterms:created>".$this->created."</dcterms:created>\n";
135 135
         }
136 136
 
137
-        if($this->modified) {
138
-            $rdf .= "\t<dcterms:modified>" . $this->modified . "</dcterms:modified>\n";
137
+        if ($this->modified) {
138
+            $rdf .= "\t<dcterms:modified>".$this->modified."</dcterms:modified>\n";
139 139
         }
140 140
 
141
-        if($this->has_space) {
142
-            $rdf .= "\t<sioc:has_space rdf:resource=\"" . clean($this->has_space, true) . "\" />\n";
141
+        if ($this->has_space) {
142
+            $rdf .= "\t<sioc:has_space rdf:resource=\"".clean($this->has_space, true)."\" />\n";
143 143
             // TODO: rdfs:label
144 144
         }
145 145
 
146
-        if($this->has_container) {
146
+        if ($this->has_container) {
147 147
             $rdf .= "\t<sioc:has_container rdf:resource=\""
148
-                . normalizeUri($exp->siocURL('container', $this->has_container)) . "\" />\n";
148
+                . normalizeUri($exp->siocURL('container', $this->has_container))."\" />\n";
149 149
             // TODO: rdfs:label
150 150
         }
151 151
 
152
-        if($this->content) {
153
-            $rdf .= "\t<sioc:content><![CDATA[" . pureContent($this->content) . "]]></sioc:content>\n";
152
+        if ($this->content) {
153
+            $rdf .= "\t<sioc:content><![CDATA[".pureContent($this->content)."]]></sioc:content>\n";
154 154
         }
155 155
 
156
-        if($this->content_encoded) {
157
-            $rdf .= "\t<content:encoded><![CDATA[" . $this->content_encoded . "]]></content:encoded>\n";
156
+        if ($this->content_encoded) {
157
+            $rdf .= "\t<content:encoded><![CDATA[".$this->content_encoded."]]></content:encoded>\n";
158 158
         }
159 159
 
160 160
         /*
@@ -172,21 +172,21 @@  discard block
 block discarded – undo
172 172
         }
173 173
         */
174 174
 
175
-        if(is_array($this->links) && count($this->links) > 0) {
176
-            foreach($this->links as $link_id => $link_exists) {
177
-                if($link_exists && !isHiddenPage($link_id)) {
175
+        if (is_array($this->links) && count($this->links) > 0) {
176
+            foreach ($this->links as $link_id => $link_exists) {
177
+                if ($link_exists && !isHiddenPage($link_id)) {
178 178
                     $rdf .= "\t<sioc:links_to rdf:resource=\""
179
-                        . normalizeUri($exp->siocURL('post', $link_id)) . "\"/>\n";
179
+                        . normalizeUri($exp->siocURL('post', $link_id))."\"/>\n";
180 180
                     // TODO: rdfs:label
181 181
                 }
182 182
             }
183 183
         }
184 184
 
185
-        if(count($this->backlinks) > 0) {
186
-            foreach($this->backlinks as $link_id) {
187
-                if(!isHiddenPage($link_id)) {
185
+        if (count($this->backlinks) > 0) {
186
+            foreach ($this->backlinks as $link_id) {
187
+                if (!isHiddenPage($link_id)) {
188 188
                     $rdf .= "\t<dcterms:isReferencedBy rdf:resource=\""
189
-                        . normalizeUri($exp->siocURL('post', $link_id)) . "\"/>\n";
189
+                        . normalizeUri($exp->siocURL('post', $link_id))."\"/>\n";
190 190
                     // TODO: rdfs:label
191 191
                 }
192 192
             }
@@ -200,52 +200,52 @@  discard block
 block discarded – undo
200 200
         }
201 201
         */
202 202
 
203
-        if($this->previous_version) {
203
+        if ($this->previous_version) {
204 204
             $rdf .= "\t<sioc:previous_version rdf:resource=\""
205 205
                 . normalizeUri(
206 206
                     $exp->siocURL(
207
-                        'post', $this->id . $exp->_urlseparator . 'rev' . $exp->_urlequal
207
+                        'post', $this->id.$exp->_urlseparator.'rev'.$exp->_urlequal
208 208
                               . $this->previous_version
209 209
                     )
210
-                ) . "\"/>\n";
210
+                )."\"/>\n";
211 211
             // TODO: rdfs:label
212 212
 
213 213
             /* If there is support for inference and transitivity the following is not needed */
214 214
             $rdf .= "\t<sioc:earlier_version rdf:resource=\""
215 215
                 . normalizeUri(
216 216
                     $exp->siocURL(
217
-                        'post', $this->id . $exp->_urlseparator . 'rev' . $exp->_urlequal
217
+                        'post', $this->id.$exp->_urlseparator.'rev'.$exp->_urlequal
218 218
                               . $this->previous_version
219 219
                     )
220
-                ) . "\"/>\n";
220
+                )."\"/>\n";
221 221
             // TODO: rdfs:label
222 222
 
223 223
         }
224 224
 
225
-        if($this->next_version) {
225
+        if ($this->next_version) {
226 226
             $rdf .= "\t<sioc:next_version rdf:resource=\""
227 227
                 . normalizeUri(
228 228
                     $exp->siocURL(
229
-                        'post', $this->id . $exp->_urlseparator . 'rev' . $exp->_urlequal
229
+                        'post', $this->id.$exp->_urlseparator.'rev'.$exp->_urlequal
230 230
                               . $this->next_version
231 231
                     )
232
-                ) . "\"/>\n";
232
+                )."\"/>\n";
233 233
             // TODO: rdfs:label
234 234
 
235 235
             /* If there is support for inference and transitivity the following is not needed */
236 236
             $rdf .= "\t<sioc:later_version rdf:resource=\""
237 237
                 . normalizeUri(
238 238
                     $exp->siocURL(
239
-                        'post', $this->id . $exp->_urlseparator . 'rev' . $exp->_urlequal
239
+                        'post', $this->id.$exp->_urlseparator.'rev'.$exp->_urlequal
240 240
                               . $this->next_version
241 241
                     )
242
-                ) . "\"/>\n";
242
+                )."\"/>\n";
243 243
             // TODO: rdfs:label
244 244
         }
245 245
 
246
-        if($this->latest_version) {
246
+        if ($this->latest_version) {
247 247
             $rdf .= "\t<sioc:latest_version rdf:resource=\""
248
-                . normalizeUri($exp->siocURL('post', $this->id)) . "\"/>\n";
248
+                . normalizeUri($exp->siocURL('post', $this->id))."\"/>\n";
249 249
             // TODO: rdfs:label
250 250
         }
251 251
 
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
         }
274 274
         */
275 275
 
276
-        $rdf .= "</" . $this->type . ">\n";
276
+        $rdf .= "</".$this->type.">\n";
277 277
         return $rdf;
278 278
     }
279 279
 }
@@ -306,45 +306,45 @@  discard block
 block discarded – undo
306 306
         //$this->email = $email;
307 307
         $this->url = $url;
308 308
 
309
-        if(preg_match_all('/^.+@.+\..+$/Ui', $email, $check, PREG_SET_ORDER)) {
310
-            if(preg_match_all('/^mailto:(.+@.+\..+$)/Ui', $email, $matches, PREG_SET_ORDER)) {
309
+        if (preg_match_all('/^.+@.+\..+$/Ui', $email, $check, PREG_SET_ORDER)) {
310
+            if (preg_match_all('/^mailto:(.+@.+\..+$)/Ui', $email, $matches, PREG_SET_ORDER)) {
311 311
                 $this->email = $email;
312 312
                 $this->sha1  = sha1($email);
313 313
             } else {
314
-                $this->email = "mailto:" . $email;
315
-                $this->sha1  = sha1("mailto:" . $email);
314
+                $this->email = "mailto:".$email;
315
+                $this->sha1  = sha1("mailto:".$email);
316 316
             }
317 317
         }
318 318
     }
319 319
 
320 320
     public function getContent(&$exp): string {
321
-        $rdf = "<sioc:UserAccount rdf:about=\"" . clean($this->url, true) . "\">\n";
322
-        if($this->nick) {
323
-            $rdf .= "\t<sioc:name>" . clean($this->nick) . "</sioc:name>\n";
321
+        $rdf = "<sioc:UserAccount rdf:about=\"".clean($this->url, true)."\">\n";
322
+        if ($this->nick) {
323
+            $rdf .= "\t<sioc:name>".clean($this->nick)."</sioc:name>\n";
324 324
         }
325
-        if($this->email) {
326
-            if($exp->_export_email) {
327
-                $rdf .= "\t<sioc:email rdf:resource=\"" . $this->email . "\"/>\n";
325
+        if ($this->email) {
326
+            if ($exp->_export_email) {
327
+                $rdf .= "\t<sioc:email rdf:resource=\"".$this->email."\"/>\n";
328 328
             }
329
-            $rdf .= "\t<sioc:email_sha1>" . $this->sha1 . "</sioc:email_sha1>\n";
329
+            $rdf .= "\t<sioc:email_sha1>".$this->sha1."</sioc:email_sha1>\n";
330 330
         }
331
-        if($this->role) {
331
+        if ($this->role) {
332 332
             $rdf .= "\t<sioc:has_function>\n";
333 333
             $rdf .= "\t\t<sioc:Role>\n";
334
-            $rdf .= "\t\t\t<sioc:name>" . $this->role . "</sioc:name>\n";
334
+            $rdf .= "\t\t\t<sioc:name>".$this->role."</sioc:name>\n";
335 335
             $rdf .= "\t\t</sioc:Role>\n";
336 336
             $rdf .= "\t</sioc:has_function>\n";
337 337
         }
338 338
         $rdf .= "\t<sioc:account_of>\n";
339 339
         $rdf .= "\t\t<foaf:Person>\n";
340
-        if($this->name) {
341
-            $rdf .= "\t\t\t<foaf:name>" . clean($this->name) . "</foaf:name>\n";
340
+        if ($this->name) {
341
+            $rdf .= "\t\t\t<foaf:name>".clean($this->name)."</foaf:name>\n";
342 342
         }
343
-        if($this->email) {
344
-            $rdf .= "\t\t\t<foaf:mbox_sha1sum>" . $this->sha1 . "</foaf:mbox_sha1sum>\n";
343
+        if ($this->email) {
344
+            $rdf .= "\t\t\t<foaf:mbox_sha1sum>".$this->sha1."</foaf:mbox_sha1sum>\n";
345 345
         }
346
-        if($this->foaf_url) {
347
-            $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $this->foaf_url . "\"/>\n";
346
+        if ($this->foaf_url) {
347
+            $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$this->foaf_url."\"/>\n";
348 348
         }
349 349
         $rdf .= "\t\t</foaf:Person>\n";
350 350
         $rdf .= "\t</sioc:account_of>\n";
@@ -397,32 +397,32 @@  discard block
 block discarded – undo
397 397
     }
398 398
 
399 399
     public function getContent(&$exp): string {
400
-        $rdf = '<' . $this->type . " rdf:about=\"" . normalizeUri(clean($this->url, true)) . "\" >\n";
400
+        $rdf = '<'.$this->type." rdf:about=\"".normalizeUri(clean($this->url, true))."\" >\n";
401 401
 
402
-        if($this->title) {
403
-            $rdf .= "\t<sioc:name>" . clean($this->title) . "</sioc:name>\n";
402
+        if ($this->title) {
403
+            $rdf .= "\t<sioc:name>".clean($this->title)."</sioc:name>\n";
404 404
         }
405 405
 
406
-        if($this->_has_parent) {
406
+        if ($this->_has_parent) {
407 407
             $rdf .= "\t<sioc:has_parent rdf:resource=\""
408
-                . normalizeUri($exp->siocURL('container', $this->_has_parent)) . "\" />\n";
408
+                . normalizeUri($exp->siocURL('container', $this->_has_parent))."\" />\n";
409 409
             // TODO: rdfs:label
410 410
         }
411 411
 
412
-        foreach($this->posts as $article) {
412
+        foreach ($this->posts as $article) {
413 413
             // TODO: test permission before?
414 414
             $rdf .= "\t<sioc:container_of rdf:resource=\""
415
-                . normalizeUri($exp->siocURL('post', $article['id'])) . "\"/>\n";
415
+                . normalizeUri($exp->siocURL('post', $article['id']))."\"/>\n";
416 416
             // TODO: inluding title/name
417 417
         }
418 418
 
419
-        foreach($this->subcontainers as $container) {
419
+        foreach ($this->subcontainers as $container) {
420 420
             $rdf .= "\t<sioc:parent_of rdf:resource=\""
421
-                . normalizeUri($exp->siocURL('container', $container['id'])) . "\"/>\n";
421
+                . normalizeUri($exp->siocURL('container', $container['id']))."\"/>\n";
422 422
             // TODO: inluding title/name
423 423
         }
424 424
 
425
-        $rdf .= "</" . $this->type . ">\n";
425
+        $rdf .= "</".$this->type.">\n";
426 426
         return $rdf;
427 427
     }
428 428
 
Please login to merge, or discard this patch.
lib/sioc_inc.php 1 patch
Spacing   +264 added lines, -264 removed lines patch added patch discarded remove patch
@@ -106,35 +106,35 @@  discard block
 block discarded – undo
106 106
     }
107 107
 
108 108
     public function siocURL($type, $id, $page = "") {
109
-        $type_part = $this->url4type . $this->urlequal . $type;
109
+        $type_part = $this->url4type.$this->urlequal.$type;
110 110
 
111
-        if($id) {
112
-            if(isset($this->type_table[$type]))
111
+        if ($id) {
112
+            if (isset($this->type_table[$type]))
113 113
                 $myID = $this->type_table[$type];
114 114
             else
115
-                $myID = (($this->url_usetype) ? $type . '_' : '') . $this->url4id;
115
+                $myID = (($this->url_usetype) ? $type.'_' : '').$this->url4id;
116 116
 
117
-            $id_part = $this->urlseparator . $myID . $this->urlequal . $id;
117
+            $id_part = $this->urlseparator.$myID.$this->urlequal.$id;
118 118
         } else {
119 119
             $id_part = '';
120 120
         }
121 121
 
122
-        ($page) ? $page_part = $this->urlseparator . $this->url4page . $this->urlequal . $page : $page_part = '';
122
+        ($page) ? $page_part = $this->urlseparator.$this->url4page.$this->urlequal.$page : $page_part = '';
123 123
 
124 124
         ($this->url_suffix && !isset($this->ignore_suffix[$type])) ? $suffix = $this->urlseparator
125 125
             . $this->url_suffix : $suffix = '';
126 126
 
127
-        $siocURL = $this->sioc_url . $type_part . $id_part . $page_part . $suffix;
127
+        $siocURL = $this->sioc_url.$type_part.$id_part.$page_part.$suffix;
128 128
         return clean($siocURL, true);
129 129
     }
130 130
 
131 131
     public function export($rdf_content = '') {
132
-        header('Content-Type: application/rdf+xml; charset=' . $this->encoding, true, 200);
132
+        header('Content-Type: application/rdf+xml; charset='.$this->encoding, true, 200);
133 133
         echo $this->makeRDF($rdf_content);
134 134
     }
135 135
 
136 136
     public function makeRDF($rdf_content = '') {
137
-        $rdf = '<?xml version="1.0" encoding="' . $this->encoding . '" ?>' . "\n";
137
+        $rdf = '<?xml version="1.0" encoding="'.$this->encoding.'" ?>'."\n";
138 138
         $rdf .= ' 
139 139
 <rdf:RDF
140 140
     xmlns="http://xmlns.com/foaf/0.1/"
@@ -149,18 +149,18 @@  discard block
 block discarded – undo
149 149
     xmlns:sioc="http://rdfs.org/sioc/ns#"
150 150
     xmlns:sioct="http://rdfs.org/sioc/types#"
151 151
     xmlns:owl="http://www.w3.org/2002/07/owl">
152
-<foaf:Document rdf:about="' . clean($this->profile_url, true) . '">
153
-	<dc:title>"' . clean($this->title) . '" (SIOC profile)</dc:title>
154
-	<foaf:primaryTopic rdf:resource="' . clean($this->objects[0]->_url, true) . '"/>
155
-	<admin:generatorAgent rdf:resource="' . clean($this->generator, true) . '"/>
156
-	<admin:generatorAgent rdf:resource="' . clean(EXPORTER_URL, true) . '?version=' . EXPORTER_VERSION . '"/>
152
+<foaf:Document rdf:about="' . clean($this->profile_url, true).'">
153
+	<dc:title>"' . clean($this->title).'" (SIOC profile)</dc:title>
154
+	<foaf:primaryTopic rdf:resource="' . clean($this->objects[0]->_url, true).'"/>
155
+	<admin:generatorAgent rdf:resource="' . clean($this->generator, true).'"/>
156
+	<admin:generatorAgent rdf:resource="' . clean(EXPORTER_URL, true).'?version='.EXPORTER_VERSION.'"/>
157 157
 </foaf:Document>' . "\n";
158
-        if($rdf_content) {
158
+        if ($rdf_content) {
159 159
             $rdf .= $rdf_content;
160 160
         }
161
-        if(count($this->objects)) {
162
-            foreach($this->objects as $object) {
163
-                if($object) {
161
+        if (count($this->objects)) {
162
+            foreach ($this->objects as $object) {
163
+                if ($object) {
164 164
                     $rdf .= $object->getContent($this);
165 165
                 }
166 166
             }
@@ -241,52 +241,52 @@  discard block
 block discarded – undo
241 241
     }
242 242
 
243 243
     public function getContent(&$exp): string {
244
-        $rdf = "<sioc:Site rdf:about=\"" . clean($this->url) . "\">\n";
245
-        $rdf .= "\t<dc:title>" . clean($this->name) . "</dc:title>\n";
246
-        $rdf .= "\t<dc:description>" . clean($this->description) . "</dc:description>\n";
247
-        $rdf .= "\t<sioc:link rdf:resource=\"" . clean($this->url) . "\"/>\n";
248
-        if($this->forums) {
249
-            foreach($this->forums as $id => $url) {
250
-                $rdf .= "\t<sioc:host_of rdf:resource=\"" . clean($url) . "\"/>\n";
244
+        $rdf = "<sioc:Site rdf:about=\"".clean($this->url)."\">\n";
245
+        $rdf .= "\t<dc:title>".clean($this->name)."</dc:title>\n";
246
+        $rdf .= "\t<dc:description>".clean($this->description)."</dc:description>\n";
247
+        $rdf .= "\t<sioc:link rdf:resource=\"".clean($this->url)."\"/>\n";
248
+        if ($this->forums) {
249
+            foreach ($this->forums as $id => $url) {
250
+                $rdf .= "\t<sioc:host_of rdf:resource=\"".clean($url)."\"/>\n";
251 251
             }
252 252
         }
253
-        if($this->next_forums) {
254
-            $rdf .= "\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('site', "", $this->page + 1) . "\"/>\n";
253
+        if ($this->next_forums) {
254
+            $rdf .= "\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('site', "", $this->page + 1)."\"/>\n";
255 255
         }
256
-        if($this->usergroup_uri) {
257
-            $rdf .= "\t<sioc:has_Usergroup rdf:resource=\"" . $this->usergroup_uri . "\"/>\n";
256
+        if ($this->usergroup_uri) {
257
+            $rdf .= "\t<sioc:has_Usergroup rdf:resource=\"".$this->usergroup_uri."\"/>\n";
258 258
         } else {
259
-            $rdf .= "\t<sioc:has_Usergroup rdf:nodeID=\"" . AUTHORS_NODE . "\"/>\n";
259
+            $rdf .= "\t<sioc:has_Usergroup rdf:nodeID=\"".AUTHORS_NODE."\"/>\n";
260 260
         }
261 261
         $rdf .= "</sioc:Site>\n";
262 262
         // Forums
263
-        if($this->forums) {
263
+        if ($this->forums) {
264 264
             $rdf .= "\n";
265
-            foreach($this->forums as $id => $url) {
266
-                $rdf .= '<sioc:Forum rdf:about="' . clean($url) . "\">\n";
267
-                $rdf .= "\t<sioc:link rdf:resource=\"" . clean($url) . "\"/>\n";
268
-                $rdf .= "\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('forum', $id) . "\"/>\n";
265
+            foreach ($this->forums as $id => $url) {
266
+                $rdf .= '<sioc:Forum rdf:about="'.clean($url)."\">\n";
267
+                $rdf .= "\t<sioc:link rdf:resource=\"".clean($url)."\"/>\n";
268
+                $rdf .= "\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('forum', $id)."\"/>\n";
269 269
                 $rdf .= "</sioc:Forum>\n";
270 270
             }
271 271
         }
272 272
         // Usergroup
273
-        if($this->users) {
273
+        if ($this->users) {
274 274
             $rdf .= "\n";
275
-            if($this->usergroup_uri) {
276
-                $rdf .= '<sioc:UserAccountgroup rdf:about="' . $this->usergroup_uri . "\">\n";
275
+            if ($this->usergroup_uri) {
276
+                $rdf .= '<sioc:UserAccountgroup rdf:about="'.$this->usergroup_uri."\">\n";
277 277
             } else {
278
-                $rdf .= '<sioc:UserAccountgroup rdf:nodeID="' . AUTHORS_NODE . "\">\n";
278
+                $rdf .= '<sioc:UserAccountgroup rdf:nodeID="'.AUTHORS_NODE."\">\n";
279 279
             }
280
-            $rdf .= "\t<sioc:name>Authors for \"" . clean($this->name) . "\"</sioc:name>\n";
281
-            foreach($this->users as $id => $url) {
280
+            $rdf .= "\t<sioc:name>Authors for \"".clean($this->name)."\"</sioc:name>\n";
281
+            foreach ($this->users as $id => $url) {
282 282
                 $rdf .= "\t<sioc:has_member>\n";
283
-                $rdf .= "\t\t<sioc:UserAccount rdf:about=\"" . clean($url) . "\">\n";
284
-                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('user', $id) . "\"/>\n";
283
+                $rdf .= "\t\t<sioc:UserAccount rdf:about=\"".clean($url)."\">\n";
284
+                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('user', $id)."\"/>\n";
285 285
                 $rdf .= "\t\t</sioc:UserAccount>\n";
286 286
                 $rdf .= "\t</sioc:has_member>\n";
287 287
             }
288
-            if($this->next_users) {
289
-                $rdf .= "\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('site', "", $this->page + 1) . "\"/>\n";
288
+            if ($this->next_users) {
289
+                $rdf .= "\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('site', "", $this->page + 1)."\"/>\n";
290 290
             }
291 291
             $rdf .= "</sioc:UserAccountgroup>\n";
292 292
         }
@@ -334,13 +334,13 @@  discard block
 block discarded – undo
334 334
         $this->uri  = $uri;
335 335
         $this->name = $name;
336 336
 
337
-        if(preg_match_all('/^.+@.+\..+$/Ui', $email, $check, PREG_SET_ORDER)) {
338
-            if(preg_match_all('/^mailto:(.+@.+\..+$)/Ui', $email, $matches, PREG_SET_ORDER)) {
337
+        if (preg_match_all('/^.+@.+\..+$/Ui', $email, $check, PREG_SET_ORDER)) {
338
+            if (preg_match_all('/^mailto:(.+@.+\..+$)/Ui', $email, $matches, PREG_SET_ORDER)) {
339 339
                 $this->email = $email;
340 340
                 $this->sha1  = sha1($email);
341 341
             } else {
342
-                $this->email = "mailto:" . $email;
343
-                $this->sha1  = sha1("mailto:" . $email);
342
+                $this->email = "mailto:".$email;
343
+                $this->sha1  = sha1("mailto:".$email);
344 344
             }
345 345
         }
346 346
         $this->homepage = $homepage;
@@ -353,36 +353,36 @@  discard block
 block discarded – undo
353 353
     }
354 354
 
355 355
     public function getContent(&$exp): string {
356
-        $rdf = "<foaf:Person rdf:about=\"" . clean($this->foaf_uri) . "\">\n";
357
-        if($this->name) {
358
-            $rdf .= "\t<foaf:name>" . $this->name . "</foaf:name>\n";
356
+        $rdf = "<foaf:Person rdf:about=\"".clean($this->foaf_uri)."\">\n";
357
+        if ($this->name) {
358
+            $rdf .= "\t<foaf:name>".$this->name."</foaf:name>\n";
359 359
         }
360
-        if($this->email) {
361
-            $rdf .= "\t<foaf:mbox_sha1sum>" . $this->sha1 . "</foaf:mbox_sha1sum>\n";
360
+        if ($this->email) {
361
+            $rdf .= "\t<foaf:mbox_sha1sum>".$this->sha1."</foaf:mbox_sha1sum>\n";
362 362
         }
363
-        if($this->foaf_url) {
364
-            $rdf .= "\t<rdfs:seeAlso rdf:resource=\"" . $this->foaf_url . "\"/>\n";
363
+        if ($this->foaf_url) {
364
+            $rdf .= "\t<rdfs:seeAlso rdf:resource=\"".$this->foaf_url."\"/>\n";
365 365
         }
366 366
         $rdf .= "\t<foaf:holdsAccount>\n";
367
-        $rdf .= "\t\t<sioc:UserAccount rdf:about=\"" . clean($this->uri) . "\">\n";
368
-        if($this->nick) {
369
-            $rdf .= "\t\t\t<sioc:name>" . $this->nick . "</sioc:name>\n";
367
+        $rdf .= "\t\t<sioc:UserAccount rdf:about=\"".clean($this->uri)."\">\n";
368
+        if ($this->nick) {
369
+            $rdf .= "\t\t\t<sioc:name>".$this->nick."</sioc:name>\n";
370 370
         }
371
-        if($this->email) {
372
-            if($exp->_export_email) {
373
-                $rdf .= "\t\t\t<sioc:email rdf:resource=\"" . $this->email . "\"/>\n";
371
+        if ($this->email) {
372
+            if ($exp->_export_email) {
373
+                $rdf .= "\t\t\t<sioc:email rdf:resource=\"".$this->email."\"/>\n";
374 374
             }
375
-            $rdf .= "\t\t\t<sioc:email_sha1>" . $this->sha1 . "</sioc:email_sha1>\n";
375
+            $rdf .= "\t\t\t<sioc:email_sha1>".$this->sha1."</sioc:email_sha1>\n";
376 376
         }
377
-        if($this->role) {
377
+        if ($this->role) {
378 378
             $rdf .= "\t\t\t<sioc:has_function>\n";
379 379
             $rdf .= "\t\t\t\t<sioc:Role>\n";
380
-            $rdf .= "\t\t\t\t\t<sioc:name>" . $this->role . "</sioc:name>\n";
380
+            $rdf .= "\t\t\t\t\t<sioc:name>".$this->role."</sioc:name>\n";
381 381
             $rdf .= "\t\t\t\t</sioc:Role>\n";
382 382
             $rdf .= "\t\t\t</sioc:has_function>\n";
383 383
         }
384
-        if($this->sioc_url) {
385
-            $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $this->sioc_url . "\"/>\n";
384
+        if ($this->sioc_url) {
385
+            $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$this->sioc_url."\"/>\n";
386 386
         }
387 387
         $rdf .= "\t\t</sioc:UserAccount>\n";
388 388
         $rdf .= "\t</foaf:holdsAccount>\n";
@@ -449,29 +449,29 @@  discard block
 block discarded – undo
449 449
     }
450 450
 
451 451
     public function getContent(&$exp): string {
452
-        $rdf = '<sioc:Thread rdf:about="' . clean($this->url) . "\">\n";
453
-        $rdf .= "\t<sioc:link rdf:resource=\"" . clean($this->url) . "\"/>\n";
454
-        if($this->views) $rdf .= "\t<sioc:num_views>" . $this->views . "</sioc:num_views>\n";
455
-        if($this->note) $rdf .= "\t<rdfs:comment>" . $this->note . "</rdfs:comment>\n";
456
-        if($this->subject) {
457
-            $rdf .= "\t<dc:title>" . $this->subject . "</dc:title>\n";
452
+        $rdf = '<sioc:Thread rdf:about="'.clean($this->url)."\">\n";
453
+        $rdf .= "\t<sioc:link rdf:resource=\"".clean($this->url)."\"/>\n";
454
+        if ($this->views) $rdf .= "\t<sioc:num_views>".$this->views."</sioc:num_views>\n";
455
+        if ($this->note) $rdf .= "\t<rdfs:comment>".$this->note."</rdfs:comment>\n";
456
+        if ($this->subject) {
457
+            $rdf .= "\t<dc:title>".$this->subject."</dc:title>\n";
458 458
         }
459
-        if($this->created) {
460
-            $rdf .= "\t<dcterms:created>" . $this->created . "</dcterms:created>\n";
459
+        if ($this->created) {
460
+            $rdf .= "\t<dcterms:created>".$this->created."</dcterms:created>\n";
461 461
         }
462
-        if($this->parents) {
463
-            foreach($this->parents as $id => $uri) {
462
+        if ($this->parents) {
463
+            foreach ($this->parents as $id => $uri) {
464 464
                 $rdf .= "\t<sioc:has_parent>\n";
465
-                $rdf .= "\t\t<sioc:Forum rdf:about=\"" . clean($uri) . "\">\n";
466
-                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('forum', $id) . "\"/>\n";
465
+                $rdf .= "\t\t<sioc:Forum rdf:about=\"".clean($uri)."\">\n";
466
+                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('forum', $id)."\"/>\n";
467 467
                 $rdf .= "\t\t</sioc:Forum>\n";
468 468
                 $rdf .= "\t</sioc:has_parent>\n";
469 469
             }
470 470
         }
471 471
         // here the tags are just used as keywords for dc:subject
472
-        if($this->tags) {
473
-            foreach($this->tags as $id => $tag) {
474
-                $rdf .= "\t<dc:subject>" . $tag . "</dc:subject>\n";
472
+        if ($this->tags) {
473
+            foreach ($this->tags as $id => $tag) {
474
+                $rdf .= "\t<dc:subject>".$tag."</dc:subject>\n";
475 475
             }
476 476
         }
477 477
         // here the tags are used by creating a tag object with a blank node, with the keyword as moat:name - if you
@@ -497,31 +497,31 @@  discard block
 block discarded – undo
497 497
                 }
498 498
             }
499 499
             */
500
-        if($this->related) {
501
-            foreach($this->related as $id => $url) {
500
+        if ($this->related) {
501
+            foreach ($this->related as $id => $url) {
502 502
                 $rdf .= "\t<sioc:related_to>\n";
503
-                $rdf .= "\t\t<sioc:Thread rdf:about=\"" . clean($url) . "\"/>\n";
503
+                $rdf .= "\t\t<sioc:Thread rdf:about=\"".clean($url)."\"/>\n";
504 504
                 $rdf .= "\t</sioc:related_to>\n"; // todo - each topic needs to have a URI
505 505
             }
506 506
         }
507 507
 
508
-        if($this->posts) {
509
-            foreach($this->posts as $id => $data) {
508
+        if ($this->posts) {
509
+            foreach ($this->posts as $id => $data) {
510 510
                 $rdf .= "\t<sioc:container_of>\n";
511
-                $rdf .= "\t\t<sioc:Post rdf:about=\"" . clean($data[url]) . "\">\n";
512
-                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('post', $id) . "\"/>\n";
513
-                if($data[prev]) {
514
-                    $rdf .= "\t\t\t<sioc:previous_by_date rdf:resource=\"" . clean($data[prev]) . "\"/>\n";
511
+                $rdf .= "\t\t<sioc:Post rdf:about=\"".clean($data[url])."\">\n";
512
+                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('post', $id)."\"/>\n";
513
+                if ($data[prev]) {
514
+                    $rdf .= "\t\t\t<sioc:previous_by_date rdf:resource=\"".clean($data[prev])."\"/>\n";
515 515
                 }
516
-                if($data[next]) {
517
-                    $rdf .= "\t\t\t<sioc:next_by_date rdf:resource=\"" . clean($data[next]) . "\"/>\n";
516
+                if ($data[next]) {
517
+                    $rdf .= "\t\t\t<sioc:next_by_date rdf:resource=\"".clean($data[next])."\"/>\n";
518 518
                 }
519 519
                 $rdf .= "\t\t</sioc:Post>\n";
520 520
                 $rdf .= "\t</sioc:container_of>\n";
521 521
             }
522 522
         }
523
-        if($this->next) {
524
-            $rdf .= "\r<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('thread', $this->id, $this->page + 1)
523
+        if ($this->next) {
524
+            $rdf .= "\r<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('thread', $this->id, $this->page + 1)
525 525
                 . "\"/>\n";
526 526
         }
527 527
         $rdf .= "</sioc:Thread>\n";
@@ -601,61 +601,61 @@  discard block
 block discarded – undo
601 601
     }
602 602
 
603 603
     public function getContent(&$exp): string {
604
-        $rdf = '<' . $this->_type . ' rdf:about="' . clean($this->url) . "\">\n";
605
-        if($this->_type != 'sioc:Forum') $rdf .= "\t<rdf:type rdf:resource=\"http://rdfs.org/sioc/ns#Forum\" />\n";
606
-        $rdf .= "\t<sioc:link rdf:resource=\"" . clean($this->url) . "\"/>\n";
607
-        if($this->blog_title) $rdf .= "\t<dc:title>" . $this->blog_title . "</dc:title>\n";
608
-        if($this->description) $rdf .= "\t<dc:description>" . $this->description . "</dc:description>\n";
609
-        if($this->note) $rdf .= "\t<rdfs:comment>" . $this->note . "</rdfs:comment>\n";
610
-
611
-        if($this->parents) {
612
-            foreach($this->parents as $id => $uri) {
604
+        $rdf = '<'.$this->_type.' rdf:about="'.clean($this->url)."\">\n";
605
+        if ($this->_type != 'sioc:Forum') $rdf .= "\t<rdf:type rdf:resource=\"http://rdfs.org/sioc/ns#Forum\" />\n";
606
+        $rdf .= "\t<sioc:link rdf:resource=\"".clean($this->url)."\"/>\n";
607
+        if ($this->blog_title) $rdf .= "\t<dc:title>".$this->blog_title."</dc:title>\n";
608
+        if ($this->description) $rdf .= "\t<dc:description>".$this->description."</dc:description>\n";
609
+        if ($this->note) $rdf .= "\t<rdfs:comment>".$this->note."</rdfs:comment>\n";
610
+
611
+        if ($this->parents) {
612
+            foreach ($this->parents as $id => $uri) {
613 613
                 $rdf .= "\t<sioc:has_parent>\n";
614
-                $rdf .= "\t\t<sioc:Forum rdf:about=\"" . clean($uri) . "\">\n";
615
-                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('forum', $id) . "\"/>\n";
614
+                $rdf .= "\t\t<sioc:Forum rdf:about=\"".clean($uri)."\">\n";
615
+                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('forum', $id)."\"/>\n";
616 616
                 $rdf .= "\t\t</sioc:Forum>\n";
617 617
                 $rdf .= "\t</sioc:has_parent>\n";
618 618
             }
619 619
         }
620 620
 
621
-        if($this->threads) {
622
-            foreach($this->threads as $id => $uri) {
621
+        if ($this->threads) {
622
+            foreach ($this->threads as $id => $uri) {
623 623
                 $rdf .= "\t<sioc:parent_of>\n";
624
-                $rdf .= "\t\t<sioc:Thread rdf:about=\"" . clean($uri) . "\">\n";
625
-                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('thread', $id) . "\"/>\n";
624
+                $rdf .= "\t\t<sioc:Thread rdf:about=\"".clean($uri)."\">\n";
625
+                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('thread', $id)."\"/>\n";
626 626
                 $rdf .= "\t\t</sioc:Thread>\n";
627 627
                 $rdf .= "\t</sioc:parent_of>\n";
628 628
             }
629 629
         }
630 630
 
631
-        if($this->posts) {
632
-            foreach($this->posts as $id => $url) {
631
+        if ($this->posts) {
632
+            foreach ($this->posts as $id => $url) {
633 633
                 $rdf .= "\t<sioc:container_of>\n";
634
-                $rdf .= "\t\t<sioc:Post rdf:about=\"" . clean($url) . "\">\n";
635
-                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('post', $id) . "\"/>\n";
634
+                $rdf .= "\t\t<sioc:Post rdf:about=\"".clean($url)."\">\n";
635
+                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('post', $id)."\"/>\n";
636 636
                 $rdf .= "\t\t</sioc:Post>\n";
637 637
                 $rdf .= "\t</sioc:container_of>\n";
638 638
             }
639 639
         }
640 640
 
641
-        if($this->creator) {
642
-            if($this->creator->_id) {
641
+        if ($this->creator) {
642
+            if ($this->creator->_id) {
643 643
                 $rdf .= "\t<sioc:has_creator>\n";
644
-                $rdf .= "\t\t<sioc:UserAccount rdf:about=\"" . clean($this->creator->_uri) . "\">\n";
645
-                if($this->creator->_sioc_url) {
646
-                    $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $this->creator->_sioc_url . "\"/>\n";
644
+                $rdf .= "\t\t<sioc:UserAccount rdf:about=\"".clean($this->creator->_uri)."\">\n";
645
+                if ($this->creator->_sioc_url) {
646
+                    $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$this->creator->_sioc_url."\"/>\n";
647 647
                 } else {
648
-                    $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('user', $this->creator->_id)
648
+                    $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('user', $this->creator->_id)
649 649
                         . "\"/>\n";
650 650
                 }
651 651
                 $rdf .= "\t\t</sioc:UserAccount>\n";
652 652
                 $rdf .= "\t</sioc:has_creator>\n";
653 653
                 $rdf .= "\t<foaf:maker>\n";
654
-                $rdf .= "\t\t<foaf:Person rdf:about=\"" . clean($this->creator->_foaf_uri) . "\">\n";
655
-                if($this->creator->_foaf_url) {
656
-                    $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $this->creator->_foaf_url . "\"/>\n";
654
+                $rdf .= "\t\t<foaf:Person rdf:about=\"".clean($this->creator->_foaf_uri)."\">\n";
655
+                if ($this->creator->_foaf_url) {
656
+                    $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$this->creator->_foaf_url."\"/>\n";
657 657
                 } else {
658
-                    $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('user', $this->creator->_id)
658
+                    $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('user', $this->creator->_id)
659 659
                         . "\"/>\n";
660 660
                 }
661 661
                 $rdf .= "\t\t</foaf:Person>\n";
@@ -663,14 +663,14 @@  discard block
 block discarded – undo
663 663
             } else {
664 664
                 $rdf .= "\t<foaf:maker>\n";
665 665
                 $rdf .= "\t\t<foaf:Person";
666
-                if($this->creator->_name) {
667
-                    $rdf .= " foaf:name=\"" . $this->creator->_name . "\"";
666
+                if ($this->creator->_name) {
667
+                    $rdf .= " foaf:name=\"".$this->creator->_name."\"";
668 668
                 }
669
-                if($this->creator->_sha1) {
670
-                    $rdf .= " foaf:mbox_sha1sum=\"" . $this->creator->_sha1 . "\"";
669
+                if ($this->creator->_sha1) {
670
+                    $rdf .= " foaf:mbox_sha1sum=\"".$this->creator->_sha1."\"";
671 671
                 }
672
-                if($this->creator->_name) {
673
-                    $rdf .= ">\n\t\t\t<foaf:homepage rdf:resource=\"" . $this->creator->_homepage
672
+                if ($this->creator->_name) {
673
+                    $rdf .= ">\n\t\t\t<foaf:homepage rdf:resource=\"".$this->creator->_homepage
674 674
                         . "\"/>\n\t\t</foaf:Person>\n";
675 675
                 } else {
676 676
                     $rdf .= "/>\n";
@@ -679,28 +679,28 @@  discard block
 block discarded – undo
679 679
             }
680 680
         }
681 681
 
682
-        if($this->administrator) {
683
-            if($this->administrator->_id) {
682
+        if ($this->administrator) {
683
+            if ($this->administrator->_id) {
684 684
                 $rdf .= "\t<sioc:has_administrator>\n";
685
-                $rdf .= "\t\t<sioc:UserAccount rdf:about=\"" . clean($this->administrator->_uri) . "\">\n";
686
-                if($this->administrator->_sioc_url) {
687
-                    $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $this->administrator->_sioc_url . "\"/>\n";
688
-                } else $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('user', $this->administrator->_id)
685
+                $rdf .= "\t\t<sioc:UserAccount rdf:about=\"".clean($this->administrator->_uri)."\">\n";
686
+                if ($this->administrator->_sioc_url) {
687
+                    $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$this->administrator->_sioc_url."\"/>\n";
688
+                } else $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('user', $this->administrator->_id)
689 689
                     . "\"/>\n";
690 690
                 $rdf .= "\t\t</sioc:UserAccount>\n";
691 691
                 $rdf .= "\t</sioc:has_administrator>\n";
692 692
             }
693 693
         }
694
-        if($this->links) {
695
-            foreach($this->links as $url => $link) {
696
-                $rdf .= "\t<sioc:links_to rdfs:label=\"$link\" rdf:resource=\"" . clean($url) . "\"/>\n";
694
+        if ($this->links) {
695
+            foreach ($this->links as $url => $link) {
696
+                $rdf .= "\t<sioc:links_to rdfs:label=\"$link\" rdf:resource=\"".clean($url)."\"/>\n";
697 697
             }
698 698
         }
699 699
 
700
-        if($this->next) {
701
-            $rdf .= "\r<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('forum', $this->id, $this->page + 1) . "\"/>\n";
700
+        if ($this->next) {
701
+            $rdf .= "\r<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('forum', $this->id, $this->page + 1)."\"/>\n";
702 702
         }
703
-        $rdf .= "</" . $this->_type . ">";
703
+        $rdf .= "</".$this->_type.">";
704 704
 
705 705
         return $rdf;
706 706
     }
@@ -765,29 +765,29 @@  discard block
 block discarded – undo
765 765
     }
766 766
 
767 767
     public function getContent(&$exp): string {
768
-        $rdf = '<' . $this->_type . " rdf:about=\"" . clean($this->url) . "\">\n";
769
-        if($this->_type != 'sioc:Post') $rdf .= "\t<rdf:type rdf:resource=\"http://rdfs.org/sioc/ns#Post\" />\n";
770
-        if($this->subject) {
771
-            $rdf .= "\t<dc:title>" . $this->subject . "</dc:title>\n";
768
+        $rdf = '<'.$this->_type." rdf:about=\"".clean($this->url)."\">\n";
769
+        if ($this->_type != 'sioc:Post') $rdf .= "\t<rdf:type rdf:resource=\"http://rdfs.org/sioc/ns#Post\" />\n";
770
+        if ($this->subject) {
771
+            $rdf .= "\t<dc:title>".$this->subject."</dc:title>\n";
772 772
         }
773
-        if($this->creator) {
774
-            if($this->creator->_id) {
773
+        if ($this->creator) {
774
+            if ($this->creator->_id) {
775 775
                 $rdf .= "\t<sioc:has_creator>\n";
776
-                $rdf .= "\t\t<sioc:UserAccount rdf:about=\"" . clean($this->creator->_uri) . "\">\n";
777
-                if($this->creator->_sioc_url) {
778
-                    $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $this->creator->_sioc_url . "\"/>\n";
776
+                $rdf .= "\t\t<sioc:UserAccount rdf:about=\"".clean($this->creator->_uri)."\">\n";
777
+                if ($this->creator->_sioc_url) {
778
+                    $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$this->creator->_sioc_url."\"/>\n";
779 779
                 } else {
780
-                    $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('user', $this->creator->_id)
780
+                    $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('user', $this->creator->_id)
781 781
                         . "\"/>\n";
782 782
                 }
783 783
                 $rdf .= "\t\t</sioc:UserAccount>\n";
784 784
                 $rdf .= "\t</sioc:has_creator>\n";
785 785
                 $rdf .= "\t<foaf:maker>\n";
786
-                $rdf .= "\t\t<foaf:Person rdf:about=\"" . clean($this->creator->_foaf_uri) . "\">\n";
787
-                if($this->creator->_foaf_url) {
788
-                    $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $this->creator->_foaf_url . "\"/>\n";
786
+                $rdf .= "\t\t<foaf:Person rdf:about=\"".clean($this->creator->_foaf_uri)."\">\n";
787
+                if ($this->creator->_foaf_url) {
788
+                    $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$this->creator->_foaf_url."\"/>\n";
789 789
                 } else {
790
-                    $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('user', $this->creator->_id)
790
+                    $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('user', $this->creator->_id)
791 791
                         . "\"/>\n";
792 792
                 }
793 793
                 $rdf .= "\t\t</foaf:Person>\n";
@@ -795,14 +795,14 @@  discard block
 block discarded – undo
795 795
             } else {
796 796
                 $rdf .= "\t<foaf:maker>\n";
797 797
                 $rdf .= "\t\t<foaf:Person";
798
-                if($this->creator->_name) {
799
-                    $rdf .= " foaf:name=\"" . $this->creator->_name . "\"";
798
+                if ($this->creator->_name) {
799
+                    $rdf .= " foaf:name=\"".$this->creator->_name."\"";
800 800
                 }
801
-                if($this->creator->_sha1) {
802
-                    $rdf .= " foaf:mbox_sha1sum=\"" . $this->creator->_sha1 . "\"";
801
+                if ($this->creator->_sha1) {
802
+                    $rdf .= " foaf:mbox_sha1sum=\"".$this->creator->_sha1."\"";
803 803
                 }
804
-                if($this->creator->_name) {
805
-                    $rdf .= ">\n\t\t\t<foaf:homepage rdf:resource=\"" . $this->creator->_homepage
804
+                if ($this->creator->_name) {
805
+                    $rdf .= ">\n\t\t\t<foaf:homepage rdf:resource=\"".$this->creator->_homepage
806 806
                         . "\"/>\n\t\t</foaf:Person>\n";
807 807
                 } else {
808 808
                     $rdf .= "/>\n";
@@ -810,51 +810,51 @@  discard block
 block discarded – undo
810 810
                 $rdf .= "\t</foaf:maker>\n";
811 811
             }
812 812
         }
813
-        $rdf .= "\t<dcterms:created>" . $this->created . "</dcterms:created>\n";
814
-        if($this->updated and ($this->created != $this->updated)) $rdf .= "\t<dcterms:modified>"
815
-            . $this->updated . "</dcterms:modified>\n";
816
-        $rdf .= "\t<sioc:content>" . pureContent($this->content) . "</sioc:content>\n";
817
-
818
-        $rdf .= "\t<content:encoded><![CDATA[" . $this->encoded . "]]></content:encoded>\n";
819
-        if($this->topics) {
820
-            foreach($this->topics as $url => $topic) {
821
-                $rdf .= "\t<sioc:topic rdfs:label=\"$topic\" rdf:resource=\"" . clean($url) . "\"/>\n";
813
+        $rdf .= "\t<dcterms:created>".$this->created."</dcterms:created>\n";
814
+        if ($this->updated and ($this->created != $this->updated)) $rdf .= "\t<dcterms:modified>"
815
+            . $this->updated."</dcterms:modified>\n";
816
+        $rdf .= "\t<sioc:content>".pureContent($this->content)."</sioc:content>\n";
817
+
818
+        $rdf .= "\t<content:encoded><![CDATA[".$this->encoded."]]></content:encoded>\n";
819
+        if ($this->topics) {
820
+            foreach ($this->topics as $url => $topic) {
821
+                $rdf .= "\t<sioc:topic rdfs:label=\"$topic\" rdf:resource=\"".clean($url)."\"/>\n";
822 822
             }
823 823
         }
824
-        if($this->links) {
825
-            foreach($this->links as $url => $link) {
826
-                $rdf .= "\t<sioc:links_to rdfs:label=\"$link\" rdf:resource=\"" . clean($url) . "\"/>\n";
824
+        if ($this->links) {
825
+            foreach ($this->links as $url => $link) {
826
+                $rdf .= "\t<sioc:links_to rdfs:label=\"$link\" rdf:resource=\"".clean($url)."\"/>\n";
827 827
             }
828 828
         }
829
-        if($this->has_part) {
830
-            foreach($this->has_part as $id => $url) {
829
+        if ($this->has_part) {
830
+            foreach ($this->has_part as $id => $url) {
831 831
                 $rdf .= "\t<dcterms:hasPart>\n";
832
-                $rdf .= "\t\t<dcmitype:Image rdf:about=\"" . clean($url) . "\"/>\n";
832
+                $rdf .= "\t\t<dcmitype:Image rdf:about=\"".clean($url)."\"/>\n";
833 833
                 $rdf .= "\t</dcterms:hasPart>\n";
834 834
             }
835 835
         }
836
-        if($this->reply_of) {
837
-            foreach($this->reply_of as $id => $url) {
836
+        if ($this->reply_of) {
837
+            foreach ($this->reply_of as $id => $url) {
838 838
                 $rdf .= "\t<sioc:reply_of>\n";
839
-                $rdf .= "\t\t<sioc:Post rdf:about=\"" . clean($url) . "\">\n";
840
-                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('post', $id) . "\"/>\n";
839
+                $rdf .= "\t\t<sioc:Post rdf:about=\"".clean($url)."\">\n";
840
+                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('post', $id)."\"/>\n";
841 841
                 $rdf .= "\t\t</sioc:Post>\n";
842 842
                 $rdf .= "\t</sioc:reply_of>\n";
843 843
             }
844 844
         }
845
-        if($this->comments) {
846
-            foreach($this->comments as $id => $url) {
845
+        if ($this->comments) {
846
+            foreach ($this->comments as $id => $url) {
847 847
                 $rdf .= "\t<sioc:has_reply>\n";
848
-                $rdf .= "\t\t<sioc:Post rdf:about=\"" . clean($url) . "\">\n";
848
+                $rdf .= "\t\t<sioc:Post rdf:about=\"".clean($url)."\">\n";
849 849
                 //        if($comments->f('comment_trackback')) $rdf .= "\t\t\t<sioc:type>"
850 850
                 // . POST_TRACKBACK . "</sioc:type>\n";
851 851
                 //        else $rdf .= "\t\t\t<sioc:type>" . POST_COMMENT  . "</sioc:type>\n";
852
-                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('comment', $id) . "\"/>\n";
852
+                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('comment', $id)."\"/>\n";
853 853
                 $rdf .= "\t\t</sioc:Post>\n";
854 854
                 $rdf .= "\t</sioc:has_reply>\n";
855 855
             }
856 856
         }
857
-        $rdf .= "</" . $this->_type . ">\n";
857
+        $rdf .= "</".$this->_type.">\n";
858 858
         return $rdf;
859 859
     }
860 860
 }
@@ -918,17 +918,17 @@  discard block
 block discarded – undo
918 918
     }
919 919
 
920 920
     public function getContent(&$exp): string {
921
-        $rdf = '<' . $this->_type . " rdf:about=\"" . clean($this->url) . "\">\n";
922
-        if($this->subject) {
923
-            $rdf .= "\t<dc:title>" . clean($this->subject) . "</dc:title>\n";
924
-            if(strcmp($this->has_container, 'http://en.wikipedia.org') === 0) {
925
-                $rdf .= "\t<foaf:primaryTopic rdf:resource=\"" . clean(
921
+        $rdf = '<'.$this->_type." rdf:about=\"".clean($this->url)."\">\n";
922
+        if ($this->subject) {
923
+            $rdf .= "\t<dc:title>".clean($this->subject)."</dc:title>\n";
924
+            if (strcmp($this->has_container, 'http://en.wikipedia.org') === 0) {
925
+                $rdf .= "\t<foaf:primaryTopic rdf:resource=\"".clean(
926 926
                         'http://dbpedia.org/resource/'
927 927
                         . $this->subject
928
-                    ) . "\"/>\n";
928
+                    )."\"/>\n";
929 929
             }
930 930
         }
931
-        if($this->creator->_nick) {
931
+        if ($this->creator->_nick) {
932 932
             /*if ($this->creator->id) {
933 933
                 $rdf .= "\t<sioc:has_creator>\n";
934 934
                 $rdf .= "\t\t<sioc:UserAccount rdf:about=\"" . clean($this->creator->uri) ."\">\n";
@@ -948,16 +948,16 @@  discard block
 block discarded – undo
948 948
                 $rdf .= "\t</foaf:maker>\n";
949 949
             } else {*/
950 950
             $rdf .= "\t<sioc:has_creator>\n";
951
-            $rdf .= "\t\t<sioc:UserAccount rdf:about=\"" . clean($this->creator->_uri) . "\">\n";
952
-            $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" .
953
-                clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki=' . $this->creator->_uri);
954
-            if($this->api) {
955
-                $rdf .= clean("&api=" . $this->api);
951
+            $rdf .= "\t\t<sioc:UserAccount rdf:about=\"".clean($this->creator->_uri)."\">\n";
952
+            $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".
953
+                clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki='.$this->creator->_uri);
954
+            if ($this->api) {
955
+                $rdf .= clean("&api=".$this->api);
956 956
             }
957 957
             $rdf .= "\"/>\n";
958 958
             $rdf .= "\t\t</sioc:UserAccount>\n";
959 959
             $rdf .= "\t</sioc:has_creator>\n";
960
-            $rdf .= "\t<dc:contributor>" . clean($this->creator->_nick) . "</dc:contributor>\n";
960
+            $rdf .= "\t<dc:contributor>".clean($this->creator->_nick)."</dc:contributor>\n";
961 961
             /*$rdf .= "\t<foaf:maker>\n";
962 962
             $rdf .= "\t\t<foaf:Person";
963 963
             if($this->creator->name) $rdf .= " foaf:name=\"" . $this->creator->name ."\"";
@@ -968,69 +968,69 @@  discard block
 block discarded – undo
968 968
             $rdf .= "\t</foaf:maker>\n";
969 969
         }*/
970 970
         } else {
971
-            if($this->creator !== 'void') {
971
+            if ($this->creator !== 'void') {
972 972
                 $rdf .= "\t<sioc:has_creator>\n";
973 973
                 $rdf .= "\t\t<sioc:UserAccount>\n";
974 974
                 $rdf .= "\t\t</sioc:UserAccount>\n";
975 975
                 $rdf .= "\t</sioc:has_creator>\n";
976 976
             }
977 977
         }
978
-        if($this->created) {
979
-            $rdf .= "\t<dcterms:created>" . $this->created . "</dcterms:created>\n";
978
+        if ($this->created) {
979
+            $rdf .= "\t<dcterms:created>".$this->created."</dcterms:created>\n";
980 980
         }
981
-        if(is_array($this->topics)) {
982
-            foreach($this->topics as $topic => $url) {
981
+        if (is_array($this->topics)) {
982
+            foreach ($this->topics as $topic => $url) {
983 983
                 $rdf .= "\t<sioc:topic>\n";
984
-                $rdf .= "\t\t<sioct:Category rdf:about=\"" . clean($url) . "\">\n";
985
-                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" .
986
-                    clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki=' . $url);
987
-                if($this->api) {
988
-                    $rdf .= clean("&api=" . $this->api);
984
+                $rdf .= "\t\t<sioct:Category rdf:about=\"".clean($url)."\">\n";
985
+                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".
986
+                    clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki='.$url);
987
+                if ($this->api) {
988
+                    $rdf .= clean("&api=".$this->api);
989 989
                 }
990 990
                 $rdf .= "\"/>\n";
991 991
                 $rdf .= "\t\t</sioct:Category>\n";
992 992
                 $rdf .= "\t</sioc:topic>\n";
993 993
             }
994 994
         }
995
-        if(is_array($this->links)) {
996
-            foreach($this->links as $label => $url) {
995
+        if (is_array($this->links)) {
996
+            foreach ($this->links as $label => $url) {
997 997
                 $rdf .= "\t<sioc:links_to>\n";
998
-                $rdf .= "\t\t<sioct:WikiArticle rdf:about=\"" . clean($url) . "\">\n";
999
-                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" .
1000
-                    clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki=' . $url);
1001
-                if($this->api) {
1002
-                    $rdf .= clean("&api=" . $this->api);
998
+                $rdf .= "\t\t<sioct:WikiArticle rdf:about=\"".clean($url)."\">\n";
999
+                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".
1000
+                    clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki='.$url);
1001
+                if ($this->api) {
1002
+                    $rdf .= clean("&api=".$this->api);
1003 1003
                 }
1004 1004
                 $rdf .= "\"/>\n";
1005 1005
                 $rdf .= "\t\t</sioct:WikiArticle>\n";
1006 1006
                 $rdf .= "\t</sioc:links_to>\n";
1007 1007
             }
1008 1008
         } else {
1009
-            if($this->links) {
1009
+            if ($this->links) {
1010 1010
                 $rdf .= "\t<sioc:links_to>\n";
1011
-                $rdf .= "\t\t<sioct:WikiArticle rdf:about=\"" . clean($this->links) . "\">\n";
1012
-                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" .
1013
-                    clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki=' . $this->links);
1014
-                if($this->api) {
1015
-                    $rdf .= clean("&api=" . $this->api);
1011
+                $rdf .= "\t\t<sioct:WikiArticle rdf:about=\"".clean($this->links)."\">\n";
1012
+                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".
1013
+                    clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki='.$this->links);
1014
+                if ($this->api) {
1015
+                    $rdf .= clean("&api=".$this->api);
1016 1016
                 }
1017 1017
                 $rdf .= "\"/>\n";
1018 1018
                 $rdf .= "\t\t</sioct:WikiArticle>\n";
1019 1019
                 $rdf .= "\t</sioc:links_to>\n";
1020 1020
             }
1021 1021
         }
1022
-        if(is_array($this->ext_links)) {
1023
-            foreach($this->ext_links as $label => $url) {
1024
-                $rdf .= "\t<sioc:links_to rdf:resource=\"" . clean($url) . "\"/>\n";
1022
+        if (is_array($this->ext_links)) {
1023
+            foreach ($this->ext_links as $label => $url) {
1024
+                $rdf .= "\t<sioc:links_to rdf:resource=\"".clean($url)."\"/>\n";
1025 1025
             }
1026 1026
         }
1027
-        if($this->previous_version) {
1027
+        if ($this->previous_version) {
1028 1028
             $rdf .= "\t<sioc:previous_version>\n";
1029
-            $rdf .= "\t\t<sioct:WikiArticle rdf:about=\"" . clean($this->previous_version) . "\">\n";
1030
-            $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" .
1031
-                clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki=' . $this->previous_version);
1032
-            if($this->api) {
1033
-                $rdf .= clean("&api=" . $this->api);
1029
+            $rdf .= "\t\t<sioct:WikiArticle rdf:about=\"".clean($this->previous_version)."\">\n";
1030
+            $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".
1031
+                clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki='.$this->previous_version);
1032
+            if ($this->api) {
1033
+                $rdf .= clean("&api=".$this->api);
1034 1034
             }
1035 1035
             $rdf .= "\"/>\n";
1036 1036
             $rdf .= "\t\t</sioct:WikiArticle>\n";
@@ -1048,13 +1048,13 @@  discard block
 block discarded – undo
1048 1048
             $rdf .= "\t</sioc:earlier_version>\n";
1049 1049
              */
1050 1050
         }
1051
-        if($this->next_version) {
1051
+        if ($this->next_version) {
1052 1052
             $rdf .= "\t<sioc:next_version>\n";
1053
-            $rdf .= "\t\t<sioct:WikiArticle rdf:about=\"" . clean($this->next_version) . "\">\n";
1054
-            $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" .
1055
-                clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki=' . $this->next_version);
1056
-            if($this->api) {
1057
-                $rdf .= clean("&api=" . $this->api);
1053
+            $rdf .= "\t\t<sioct:WikiArticle rdf:about=\"".clean($this->next_version)."\">\n";
1054
+            $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".
1055
+                clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki='.$this->next_version);
1056
+            if ($this->api) {
1057
+                $rdf .= clean("&api=".$this->api);
1058 1058
             }
1059 1059
             $rdf .= "\"/>\n";
1060 1060
             $rdf .= "\t\t</sioct:WikiArticle>\n";
@@ -1072,46 +1072,46 @@  discard block
 block discarded – undo
1072 1072
             $rdf .= "\t</sioc:later_version>\n";
1073 1073
              */
1074 1074
         }
1075
-        if($this->latest_version) {
1075
+        if ($this->latest_version) {
1076 1076
             $rdf .= "\t<sioc:latest_version>\n";
1077
-            $rdf .= "\t\t<sioct:WikiArticle rdf:about=\"" . clean($this->latest_version) . "\">\n";
1078
-            $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" .
1079
-                clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki=' . $this->latest_version);
1080
-            if($this->api) {
1081
-                $rdf .= clean("&api=" . $this->api);
1077
+            $rdf .= "\t\t<sioct:WikiArticle rdf:about=\"".clean($this->latest_version)."\">\n";
1078
+            $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".
1079
+                clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki='.$this->latest_version);
1080
+            if ($this->api) {
1081
+                $rdf .= clean("&api=".$this->api);
1082 1082
             }
1083 1083
             $rdf .= "\"/>\n";
1084 1084
             $rdf .= "\t\t</sioct:WikiArticle>\n";
1085 1085
             $rdf .= "\t</sioc:latest_version>\n";
1086 1086
         }
1087
-        if($this->has_discussion && (strpos($this->has_discussion, 'Talk:Talk:') == false)) {
1087
+        if ($this->has_discussion && (strpos($this->has_discussion, 'Talk:Talk:') == false)) {
1088 1088
             $rdf .= "\t<sioc:has_discussion>\n";
1089
-            $rdf .= "\t\t<sioct:WikiArticle rdf:about=\"" . clean($this->has_discussion) . "\">\n";
1090
-            $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" .
1091
-                clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki=' . $this->has_discussion);
1092
-            if($this->api) {
1093
-                $rdf .= clean("&api=" . $this->api);
1089
+            $rdf .= "\t\t<sioct:WikiArticle rdf:about=\"".clean($this->has_discussion)."\">\n";
1090
+            $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".
1091
+                clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki='.$this->has_discussion);
1092
+            if ($this->api) {
1093
+                $rdf .= clean("&api=".$this->api);
1094 1094
             }
1095 1095
             $rdf .= "\"/>\n";
1096 1096
             $rdf .= "\t\t</sioct:WikiArticle>\n";
1097 1097
             $rdf .= "\t</sioc:has_discussion>\n";
1098 1098
         }
1099
-        if($this->has_container) {
1099
+        if ($this->has_container) {
1100 1100
             $rdf .= "\t<sioc:has_container>\n";
1101
-            $rdf .= "\t\t<sioct:Wiki rdf:about=\"" . clean($this->has_container) . "\"/>\n";
1101
+            $rdf .= "\t\t<sioct:Wiki rdf:about=\"".clean($this->has_container)."\"/>\n";
1102 1102
             $rdf .= "\t</sioc:has_container>\n";
1103 1103
         }
1104
-        if($this->redirpage) {
1105
-            $rdf .= "\t<owl:sameAs rdf:resource=\"" . clean($this->redirpage) . "\"/>\n";
1106
-            $rdf .= "\t<rdfs:seeAlso rdf:resource=\"" .
1107
-                clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki=' . $this->redirpage);
1108
-            if($this->api) {
1109
-                $rdf .= clean("&api=" . $this->api);
1104
+        if ($this->redirpage) {
1105
+            $rdf .= "\t<owl:sameAs rdf:resource=\"".clean($this->redirpage)."\"/>\n";
1106
+            $rdf .= "\t<rdfs:seeAlso rdf:resource=\"".
1107
+                clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki='.$this->redirpage);
1108
+            if ($this->api) {
1109
+                $rdf .= clean("&api=".$this->api);
1110 1110
             }
1111 1111
             $rdf .= "\"/>\n";
1112 1112
         }
1113 1113
 
1114
-        $rdf .= "</" . $this->_type . ">\n";
1114
+        $rdf .= "</".$this->_type.">\n";
1115 1115
         return $rdf;
1116 1116
     }
1117 1117
 }
@@ -1132,7 +1132,7 @@  discard block
 block discarded – undo
1132 1132
     }
1133 1133
 
1134 1134
     public function getContent(&$exp): string {
1135
-        $rdf = '<' . $this->type . " rdf:about=\"" . clean($this->url) . "\"/>\n";
1135
+        $rdf = '<'.$this->type." rdf:about=\"".clean($this->url)."\"/>\n";
1136 1136
         return $rdf;
1137 1137
     }
1138 1138
 }
@@ -1153,7 +1153,7 @@  discard block
 block discarded – undo
1153 1153
     }
1154 1154
 
1155 1155
     public function getContent(&$exp): string {
1156
-        $rdf = '<' . $this->type . " rdf:about=\"" . clean($this->url) . "\"/>\n";
1156
+        $rdf = '<'.$this->type." rdf:about=\"".clean($this->url)."\"/>\n";
1157 1157
         return $rdf;
1158 1158
     }
1159 1159
 }
@@ -1163,13 +1163,13 @@  discard block
 block discarded – undo
1163 1163
  *
1164 1164
  * Transforms text so that it can be safely put into XML markup
1165 1165
  */
1166
-if(!function_exists('clean')) {
1166
+if (!function_exists('clean')) {
1167 1167
     function clean($text, $url = false) {
1168 1168
 #    return htmlentities( $text );
1169 1169
 #    return htmlentities2( $text );
1170 1170
         // double encoding is preventable now
1171 1171
         // $text = htmlspecialchars_decode($text, ENT_COMPAT);
1172
-        if($url) {
1172
+        if ($url) {
1173 1173
             $text = str_replace('&amp;', '&', $text);
1174 1174
         }
1175 1175
         return htmlspecialchars($text, ENT_COMPAT, 'UTF-8');
@@ -1181,7 +1181,7 @@  discard block
 block discarded – undo
1181 1181
  *
1182 1182
  * Same a HTMLEntities, but avoids double-encoding of entities
1183 1183
  */
1184
-if(!function_exists('htmlentities2')) {
1184
+if (!function_exists('htmlentities2')) {
1185 1185
     function htmlentities2($myHTML) {
1186 1186
         $translation_table          = get_html_translation_table(HTML_ENTITIES, ENT_QUOTES);
1187 1187
         $translation_table[chr(38)] = '&';
@@ -1198,7 +1198,7 @@  discard block
 block discarded – undo
1198 1198
  *
1199 1199
  * Prepares text-only representation of HTML content
1200 1200
  */
1201
-if(!function_exists('pureContent')) {
1201
+if (!function_exists('pureContent')) {
1202 1202
     function pureContent($content) {
1203 1203
         // Remove HTML tags
1204 1204
         // May add more cleanup code later, if validation errors are found
Please login to merge, or discard this patch.
action.php 1 patch
Spacing   +89 added lines, -89 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         // test the requested action
84 84
         $controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'checkAction', $controller);
85 85
         // pingthesemanticweb.com
86
-        if($this->getConf('pingsw')) {
86
+        if ($this->getConf('pingsw')) {
87 87
             $controller->register_hook('ACTION_SHOW_REDIRECT', 'BEFORE', $this, 'pingService', $controller);
88 88
         }
89 89
     }
@@ -95,20 +95,20 @@  discard block
 block discarded – undo
95 95
         //print_r($INFO); die();
96 96
         //print_r(headers_list()); die();
97 97
 
98
-        if($action->data == 'export_siocxml') {
98
+        if ($action->data == 'export_siocxml') {
99 99
             // give back rdf
100 100
             $this->exportSioc();
101
-        } elseif(($action->data == 'show' || $action->data == 'index') && $INFO['perm']
101
+        } elseif (($action->data == 'show' || $action->data == 'index') && $INFO['perm']
102 102
             && !defined('DOKU_MEDIADETAIL')
103 103
             && ($INFO['exists'] || getDwUserInfo($INFO['id'], $this)) && !isHiddenPage($INFO['id'])) {
104
-            if($this->isRdfXmlRequest()) {
104
+            if ($this->isRdfXmlRequest()) {
105 105
                 // forward to rdfxml document if requested
106 106
                 // print_r(headers_list()); die();
107 107
                 $location = $this->createRdfLink();
108
-                if(function_exists('header_remove')) {
108
+                if (function_exists('header_remove')) {
109 109
                     header_remove();
110 110
                 }
111
-                header('Location: ' . $location['href'], true, 303);
111
+                header('Location: '.$location['href'], true, 303);
112 112
                 exit();
113 113
             } else {
114 114
                 // add meta link to html head
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 
131 131
         // Test for hidden pages
132 132
 
133
-        if(isHiddenPage($ID)) {
133
+        if (isHiddenPage($ID)) {
134 134
             $this->exit("HTTP/1.0 404 Not Found");
135 135
         }
136 136
 
@@ -140,26 +140,26 @@  discard block
 block discarded – undo
140 140
 
141 141
         // Test for valid types
142 142
 
143
-        if(!(($sioc_type == 'post' && $INFO['exists']) || $sioc_type == 'user' || $sioc_type == 'container')) {
143
+        if (!(($sioc_type == 'post' && $INFO['exists']) || $sioc_type == 'user' || $sioc_type == 'container')) {
144 144
             $this->exit("HTTP/1.0 404 Not Found");
145 145
         }
146 146
 
147 147
         // Test for permission
148 148
 
149
-        if(!$INFO['perm']) {
149
+        if (!$INFO['perm']) {
150 150
             // not enough rights to see the wiki page
151 151
             $this->exit("HTTP/1.0 401 Unauthorized");
152 152
         }
153 153
 
154 154
         // Forward to URI with explicit type attribut
155
-        if(!isset($_GET['type'])) {
156
-            header('Location:' . $_SERVER['REQUEST_URI'] . '&type=' . $sioc_type, true, 302);
155
+        if (!isset($_GET['type'])) {
156
+            header('Location:'.$_SERVER['REQUEST_URI'].'&type='.$sioc_type, true, 302);
157 157
         }
158 158
 
159 159
         // Include SIOC libs
160 160
 
161
-        require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'sioc_inc.php');
162
-        require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'sioc_dokuwiki.php');
161
+        require_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'lib'.DIRECTORY_SEPARATOR.'sioc_inc.php');
162
+        require_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'lib'.DIRECTORY_SEPARATOR.'sioc_dokuwiki.php');
163 163
 
164 164
         // Create exporter
165 165
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 
177 177
         // Create SIOC-RDF content
178 178
 
179
-        switch($sioc_type) {
179
+        switch ($sioc_type) {
180 180
             case 'container':
181 181
                 $rdf = $this->exportContainercontent($rdf);
182 182
                 break;
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         }
193 193
 
194 194
         // export
195
-        if($this->getConf('noindx')) {
195
+        if ($this->getConf('noindx')) {
196 196
             header("X-Robots-Tag: noindex", true);
197 197
         }
198 198
         $rdf->export();
@@ -212,12 +212,12 @@  discard block
 block discarded – undo
212 212
         global $ID, $conf;
213 213
 
214 214
         // check for type if unknown
215
-        if(!($_GET['type'] ?? "")) {
215
+        if (!($_GET['type'] ?? "")) {
216 216
             $userinfo = getDwUserInfo($ID, $this);
217 217
 
218
-            if($userinfo) {
218
+            if ($userinfo) {
219 219
                 $type = 'user';
220
-            } elseif(isset($_GET['do']) && $_GET['do'] == 'index') {
220
+            } elseif (isset($_GET['do']) && $_GET['do'] == 'index') {
221 221
                 $type = 'container';
222 222
             } else {
223 223
                 $type = 'post';
@@ -234,18 +234,18 @@  discard block
 block discarded – undo
234 234
     private function exportContainercontent($exporter) {
235 235
         global $ID, $INFO, $conf;
236 236
 
237
-        if($ID == $conf['start']) {
237
+        if ($ID == $conf['start']) {
238 238
             $title = $conf['title'];
239
-        } elseif(isset($INFO['meta']['title'])) {
239
+        } elseif (isset($INFO['meta']['title'])) {
240 240
             $title = $INFO['meta']['title'];
241 241
         } else {
242 242
             $title = $ID;
243 243
         }
244 244
 
245 245
         $exporter->setParameters(
246
-            'Container: ' . $title,
246
+            'Container: '.$title,
247 247
             getAbsUrl(),
248
-            getAbsUrl() . 'doku.php?',
248
+            getAbsUrl().'doku.php?',
249 249
             'utf-8',
250 250
             $this->agentlink
251 251
         );
@@ -257,44 +257,44 @@  discard block
 block discarded – undo
257 257
         );
258 258
 
259 259
         /* container is type=wiki */
260
-        if($ID == $conf['start']) {
260
+        if ($ID == $conf['start']) {
261 261
             $wikicontainer->isWiki();
262 262
         }
263 263
         /* sioc:name              */
264
-        if($INFO['exists']) {
264
+        if ($INFO['exists']) {
265 265
             $wikicontainer->addTitle($INFO['meta']['title']);
266 266
         }
267 267
         /* has_parent             */
268
-        if($INFO['namespace']) {
268
+        if ($INFO['namespace']) {
269 269
             $wikicontainer->addParent($INFO['namespace']);
270 270
         }
271 271
 
272 272
         // search next level entries (posts, sub containers) in container
273
-        require_once(DOKU_INC . 'inc/search.php');
273
+        require_once(DOKU_INC.'inc/search.php');
274 274
         $dir        = utf8_encodeFN(str_replace(':', '/', $ID));
275 275
         $entries    = array();
276 276
         $posts      = array();
277 277
         $containers = array();
278 278
         search($entries, $conf['datadir'], 'search_index', array('ns' => $ID), $dir);
279
-        foreach($entries as $entry) {
280
-            if($entry['type'] === 'f') {
279
+        foreach ($entries as $entry) {
280
+            if ($entry['type'] === 'f') {
281 281
                 // wikisite
282 282
                 $posts[] = $entry;
283
-            } elseif($entry['type'] === 'd') {
283
+            } elseif ($entry['type'] === 'd') {
284 284
                 // sub container
285 285
                 $containers[] = $entry;
286 286
             }
287 287
         }
288 288
 
289 289
         // without sub content it can't be a container (so it does not exist as a container)
290
-        if(count($posts) + count($containers) == 0) {
290
+        if (count($posts) + count($containers) == 0) {
291 291
             $this->exit("HTTP/1.0 404 Not Found");
292 292
         }
293 293
 
294
-        if(count($posts) > 0) {
294
+        if (count($posts) > 0) {
295 295
             $wikicontainer->addArticles($posts);
296 296
         }
297
-        if(count($containers) > 0) {
297
+        if (count($containers) > 0) {
298 298
             $wikicontainer->addContainers($containers);
299 299
         }
300 300
 
@@ -315,14 +315,14 @@  discard block
 block discarded – undo
315 315
         $userinfo = getDwUserInfo($ID, $this);
316 316
 
317 317
         // no userinfo means there is no user space or user does not exists
318
-        if($userinfo === false) {
318
+        if ($userinfo === false) {
319 319
             $this->exit("HTTP/1.0 404 Not Found");
320 320
         }
321 321
 
322 322
         $exporter->setParameters(
323
-            'Account: ' . $userinfo['name'],
323
+            'Account: '.$userinfo['name'],
324 324
             getAbsUrl(),
325
-            getAbsUrl() . 'doku.php?',
325
+            getAbsUrl().'doku.php?',
326 326
             'utf-8',
327 327
             $this->agentlink
328 328
         );
@@ -349,16 +349,16 @@  discard block
 block discarded – undo
349 349
         global $ID, $INFO, $REV, $conf;
350 350
 
351 351
         $exporter->setParameters(
352
-            'Article: ' . $INFO['meta']['title'] . ($REV ? ' (rev ' . $REV . ')' : ''),
352
+            'Article: '.$INFO['meta']['title'].($REV ? ' (rev '.$REV.')' : ''),
353 353
             $this->getDokuUrl(),
354
-            $this->getDokuUrl() . 'doku.php?',
354
+            $this->getDokuUrl().'doku.php?',
355 355
             'utf-8',
356 356
             $this->agentlink
357 357
         );
358 358
 
359 359
         // create user object
360 360
         // $id, $uri, $name, $email, $homepage='', $foaf_uri='', $role=false, $nick='', $sioc_url='', $foaf_url=''
361
-        $dwuserpage_id = cleanID($this->getConf('userns')) . ($conf['useslash'] ? '/' : ':') . $INFO['editor'];
361
+        $dwuserpage_id = cleanID($this->getConf('userns')).($conf['useslash'] ? '/' : ':').$INFO['editor'];
362 362
         /*
363 363
         if ($INFO['editor'] && $this->getConf('userns'))
364 364
             $pageuser = new SIOCUser($INFO['editor'],
@@ -379,49 +379,49 @@  discard block
 block discarded – undo
379 379
             $ID, // id
380 380
             normalizeUri(
381 381
                 $exporter->siocURL(
382
-                    'post', $ID . ($REV ? $exporter->_urlseparator . 'rev'
383
-                              . $exporter->_urlequal . $REV : '')
382
+                    'post', $ID.($REV ? $exporter->_urlseparator.'rev'
383
+                              . $exporter->_urlequal.$REV : '')
384 384
                 )
385 385
             ), // url
386
-            $INFO['meta']['title'] . ($REV ? ' (rev ' . $REV . ')' : ''), // subject
386
+            $INFO['meta']['title'].($REV ? ' (rev '.$REV.')' : ''), // subject
387 387
             rawWiki($ID, $REV) // body (content)
388 388
         );
389 389
         /* encoded content   */
390 390
         $wikipage->addContentEncoded(p_cached_output(wikiFN($ID, $REV), 'xhtml'));
391 391
         /* created           */
392
-        if(isset($INFO['meta']['date']['created'])) {
392
+        if (isset($INFO['meta']['date']['created'])) {
393 393
             $wikipage->addCreated(date('c', $INFO['meta']['date']['created']));
394 394
         }
395 395
         /* or modified       */
396
-        if(isset($INFO['meta']['date']['modified'])) {
396
+        if (isset($INFO['meta']['date']['modified'])) {
397 397
             $wikipage->addModified(date('c', $INFO['meta']['date']['modified']));
398 398
         }
399 399
         /* creator/modifier  */
400
-        if($INFO['editor'] && $this->getConf('userns')) {
401
-            $wikipage->addCreator(array('foaf:maker' => '#' . $INFO['editor'], 'sioc:modifier' => $dwuserpage_id));
400
+        if ($INFO['editor'] && $this->getConf('userns')) {
401
+            $wikipage->addCreator(array('foaf:maker' => '#'.$INFO['editor'], 'sioc:modifier' => $dwuserpage_id));
402 402
         }
403 403
         /* is creator        */
404
-        if(isset($INFO['meta']['date']['created'])) {
404
+        if (isset($INFO['meta']['date']['created'])) {
405 405
             $wikipage->isCreator();
406 406
         }
407 407
         /* intern wiki links */
408 408
         $wikipage->addLinks($INFO['meta']['relation']['references']);
409 409
 
410 410
         // contributors - only for last revision b/c of wrong meta data for older revisions
411
-        if(!$REV && $this->getConf('userns') && isset($INFO['meta']['contributor'])) {
411
+        if (!$REV && $this->getConf('userns') && isset($INFO['meta']['contributor'])) {
412 412
             $cont_temp = array();
413
-            $cont_ns   = $this->getConf('userns') . ($conf['useslash'] ? '/' : ':');
414
-            foreach($INFO['meta']['contributor'] as $cont_id => $cont_name) {
415
-                $cont_temp[$cont_ns . $cont_id] = $cont_name;
413
+            $cont_ns   = $this->getConf('userns').($conf['useslash'] ? '/' : ':');
414
+            foreach ($INFO['meta']['contributor'] as $cont_id => $cont_name) {
415
+                $cont_temp[$cont_ns.$cont_id] = $cont_name;
416 416
             }
417 417
             $wikipage->addContributors($cont_temp);
418 418
         }
419 419
 
420 420
         // backlinks - only for last revision
421
-        if(!$REV) {
422
-            require_once(DOKU_INC . 'inc/fulltext.php');
421
+        if (!$REV) {
422
+            require_once(DOKU_INC.'inc/fulltext.php');
423 423
             $backlinks = ft_backlinks($ID);
424
-            if(count($backlinks) > 0) {
424
+            if (count($backlinks) > 0) {
425 425
                 $wikipage->addBacklinks($backlinks);
426 426
             }
427 427
         }
@@ -433,37 +433,37 @@  discard block
 block discarded – undo
433 433
         $pagerevs  = $changelog->getRevisions(0, $conf['recent'] + 1);
434 434
         $prevrev   = false;
435 435
         $nextrev   = false;
436
-        if(!$REV) {
436
+        if (!$REV) {
437 437
             // latest revision, previous rev is on top in array
438 438
             $prevrev = 0;
439 439
         } else {
440 440
             // other revision
441 441
             $currentrev = array_search($REV, $pagerevs);
442
-            if($currentrev !== false) {
442
+            if ($currentrev !== false) {
443 443
                 $prevrev = $currentrev + 1;
444 444
                 $nextrev = $currentrev - 1;
445 445
             }
446 446
         }
447
-        if($prevrev !== false && $prevrev > -1 && page_exists($ID, $pagerevs[$prevrev])) {
447
+        if ($prevrev !== false && $prevrev > -1 && page_exists($ID, $pagerevs[$prevrev])) {
448 448
             /* previous revision*/
449 449
             $wikipage->addVersionPrevious($pagerevs[$prevrev]);
450 450
         }
451
-        if($nextrev !== false && $nextrev > -1 && page_exists($ID, $pagerevs[$nextrev])) {
451
+        if ($nextrev !== false && $nextrev > -1 && page_exists($ID, $pagerevs[$nextrev])) {
452 452
             /* next revision*/
453 453
             $wikipage->addVersionNext($pagerevs[$nextrev]);
454 454
         }
455 455
 
456 456
         /* latest revision   */
457
-        if($REV) {
457
+        if ($REV) {
458 458
             $wikipage->addVersionLatest();
459 459
         }
460 460
         // TODO: topics
461 461
         /* has_container     */
462
-        if($INFO['namespace']) {
462
+        if ($INFO['namespace']) {
463 463
             $wikipage->addContainer($INFO['namespace']);
464 464
         }
465 465
         /* has_space         */
466
-        if($this->getConf('owners')) {
466
+        if ($this->getConf('owners')) {
467 467
             $wikipage->addSite($this->getConf('owners'));
468 468
         }
469 469
         // TODO: dc:contributor / has_modifier
@@ -501,19 +501,19 @@  discard block
 block discarded – undo
501 501
 
502 502
         // soft check, route to RDF when client requests it (don't check quality of request)
503 503
 
504
-        if($this->getConf('softck') && strpos($_SERVER['HTTP_ACCEPT'], 'application/rdf+xml') !== false) {
504
+        if ($this->getConf('softck') && strpos($_SERVER['HTTP_ACCEPT'], 'application/rdf+xml') !== false) {
505 505
             return true;
506 506
         }
507 507
 
508
-        if(count($accepted) > 0) {
508
+        if (count($accepted) > 0) {
509 509
             // hard check, only serve RDF if it is requested first or equal to first type
510 510
 
511 511
             // extract accepting ratio
512 512
             $test_accept = array();
513
-            foreach($accepted as $format) {
513
+            foreach ($accepted as $format) {
514 514
                 $formatspec = explode(';', $format);
515 515
                 $k          = trim($formatspec[0]);
516
-                if(count($formatspec) == 2) {
516
+                if (count($formatspec) == 2) {
517 517
                     $test_accept[$k] = trim($formatspec[1]);
518 518
                 } else {
519 519
                     $test_accept[$k] = 'q=1.0';
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
             arsort($test_accept);
525 525
             $accepted_order = array_keys($test_accept);
526 526
 
527
-            if($accepted_order[0] == 'application/rdf+xml' ||
527
+            if ($accepted_order[0] == 'application/rdf+xml' ||
528 528
                 (array_key_exists('application/rdf+xml', $test_accept)
529 529
                     && $test_accept['application/rdf+xml'] == 'q=1.0')
530 530
             ) {
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
 
546 546
         // Test for hidden pages
547 547
 
548
-        if(isHiddenPage($ID)) {
548
+        if (isHiddenPage($ID)) {
549 549
             return false;
550 550
         }
551 551
 
@@ -555,13 +555,13 @@  discard block
 block discarded – undo
555 555
 
556 556
         // Test for valid types
557 557
 
558
-        if(!(($sioc_type == 'post' && $INFO['exists']) || $sioc_type == 'user' || $sioc_type == 'container')) {
558
+        if (!(($sioc_type == 'post' && $INFO['exists']) || $sioc_type == 'user' || $sioc_type == 'container')) {
559 559
             return false;
560 560
         }
561 561
 
562 562
         // Test for permission
563 563
 
564
-        if(!$INFO['perm']) {
564
+        if (!$INFO['perm']) {
565 565
             // not enough rights to see the wiki page
566 566
             return false;
567 567
         }
@@ -573,24 +573,24 @@  discard block
 block discarded – undo
573 573
         $metalink['type'] = 'application/rdf+xml';
574 574
         $metalink['rel']  = 'meta';
575 575
 
576
-        switch($sioc_type) {
576
+        switch ($sioc_type) {
577 577
             case 'container':
578 578
                 $title     = htmlentities(
579
-                    "Container '" . ($INFO['meta']['title'] ?? $ID) . "' (SIOC document as RDF/XML)"
579
+                    "Container '".($INFO['meta']['title'] ?? $ID)."' (SIOC document as RDF/XML)"
580 580
                 );
581 581
                 $queryAttr = array('type' => 'container');
582 582
                 break;
583 583
 
584 584
             case 'user':
585
-                $title     = htmlentities("User account '" . $userinfo['name'] . "' (SIOC document as RDF/XML)");
585
+                $title     = htmlentities("User account '".$userinfo['name']."' (SIOC document as RDF/XML)");
586 586
                 $queryAttr = array('type' => 'user');
587 587
                 break;
588 588
 
589 589
             case 'post':
590 590
             default:
591
-                $title     = htmlentities("Article '" . $INFO['meta']['title'] . "' (SIOC document as RDF/XML)");
591
+                $title     = htmlentities("Article '".$INFO['meta']['title']."' (SIOC document as RDF/XML)");
592 592
                 $queryAttr = array('type' => 'post');
593
-                if(isset($_GET['rev']) && $_GET['rev'] === (int) $_GET['rev']) {
593
+                if (isset($_GET['rev']) && $_GET['rev'] === (int) $_GET['rev']) {
594 594
                     $queryAttr['rev'] = $_GET['rev'];
595 595
                 }
596 596
                 break;
@@ -599,11 +599,11 @@  discard block
 block discarded – undo
599 599
         $metalink['title'] = $title;
600 600
         $metalink['href']  = normalizeUri(getAbsUrl(exportlink($ID, 'siocxml', $queryAttr, false, '&')));
601 601
 
602
-        if($event !== null) {
602
+        if ($event !== null) {
603 603
             $event->data['link'][] = $metalink;
604 604
 
605 605
             // set canocial link for type URIs to prevent indexing double content
606
-            if($_GET['type'] ?? "") {
606
+            if ($_GET['type'] ?? "") {
607 607
                 $event->data['link'][] = array('rel' => 'canonical', 'href' => getAbsUrl(wl($ID)));
608 608
             }
609 609
         }
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
         // TODO: test acl
616 616
         // TODO: write in message queue (?)
617 617
 
618
-        if($data->data['preact'] == array('save' => 'Save') || $data->data['preact'] == 'save') {
618
+        if ($data->data['preact'] == array('save' => 'Save') || $data->data['preact'] == 'save') {
619 619
             //die('http://pingthesemanticweb.com/rest/?url='.urlencode(getAbsUrl(wl($data->data['id']))));
620 620
             //$ping = fopen('http://pingthesemanticweb.com/rest/?url='.urlencode(getAbsUrl(wl($data->data['id']))),'r');
621 621
             // it must be a post, and it's the last revision
@@ -636,7 +636,7 @@  discard block
 block discarded – undo
636 636
     }
637 637
 
638 638
     private function getDate($date, $date_alt = null) {
639
-        if(!$date) {
639
+        if (!$date) {
640 640
             $date = $date_alt;
641 641
         }
642 642
         return date('c', $date);
@@ -644,19 +644,19 @@  discard block
 block discarded – undo
644 644
 
645 645
 }
646 646
 
647
-if(!function_exists('getAbsUrl')) {
647
+if (!function_exists('getAbsUrl')) {
648 648
     function getAbsUrl($url = null) {
649
-        if($url == null) {
649
+        if ($url == null) {
650 650
             $url = DOKU_BASE;
651 651
         }
652 652
         return str_replace(DOKU_BASE, DOKU_URL, $url);
653 653
     }
654 654
 }
655 655
 
656
-if(!function_exists('getDwUserEmail')) {
656
+if (!function_exists('getDwUserEmail')) {
657 657
     function getDwUserEmail($user) {
658 658
         global $auth;
659
-        if($info = $auth->getUserData($user)) {
659
+        if ($info = $auth->getUserData($user)) {
660 660
             return $info['mail'];
661 661
         } else {
662 662
             return false;
@@ -664,19 +664,19 @@  discard block
 block discarded – undo
664 664
     }
665 665
 }
666 666
 
667
-if(!function_exists('getDwUserInfo')) {
667
+if (!function_exists('getDwUserInfo')) {
668 668
     function getDwUserInfo($id, $pobj, $key = null) {
669 669
         global $auth, $conf;
670 670
 
671
-        if(!$pobj->getConf('userns')) {
671
+        if (!$pobj->getConf('userns')) {
672 672
             return false;
673 673
         }
674 674
 
675 675
         // get user id
676
-        $userid = str_replace(cleanID($pobj->getConf('userns')) . ($conf['useslash'] ? '/' : ':'), '', $id);
676
+        $userid = str_replace(cleanID($pobj->getConf('userns')).($conf['useslash'] ? '/' : ':'), '', $id);
677 677
 
678
-        if($info = $auth->getUserData($userid)) {
679
-            if($key) {
678
+        if ($info = $auth->getUserData($userid)) {
679
+            if ($key) {
680 680
                 return $info['key'];
681 681
             } else {
682 682
                 return $info;
@@ -688,18 +688,18 @@  discard block
 block discarded – undo
688 688
 }
689 689
 
690 690
 // sort query attributes by name
691
-if(!function_exists('normalizeUri')) {
691
+if (!function_exists('normalizeUri')) {
692 692
     function normalizeUri($uri) {
693 693
         // part URI
694 694
         $parts = explode('?', $uri);
695 695
 
696 696
         // part query
697
-        if(isset($parts[1])) {
697
+        if (isset($parts[1])) {
698 698
             $query = $parts[1];
699 699
 
700 700
             // test separator
701 701
             $sep = '&';
702
-            if(strpos($query, '&amp;') !== false) {
702
+            if (strpos($query, '&amp;') !== false) {
703 703
                 $sep = '&amp;';
704 704
             }
705 705
             $attr = explode($sep, $query);
Please login to merge, or discard this patch.