Passed
Push — master ( 29a119...08b093 )
by Mark
02:48 queued 54s
created
lib/sioc_dokuwiki.php 1 patch
Braces   +13 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,7 +47,10 @@  discard block
 block discarded – undo
47 47
     function addCreator($creator) { $this->_creator = $creator; }
48 48
     function addContributors($contributors) { $this->_contributors = $contributors; }
49 49
     function isCreator() { $this->_is_creator = true; }
50
-    function addLinks($links) { if (is_array($links) && count($links) > 0) $this->_links = $links; }
50
+    function addLinks($links) { if (is_array($links) && count($links) > 0) {
51
+      $this->_links = $links;
52
+    }
53
+    }
51 54
     function addBacklinks($links) { $this->_backlinks = $links; }
52 55
     //function addLinksExtern($links) { if (is_array($links) && count($links)>0) $this->_ext_links = $links; }
53 56
     function addVersionPrevious($rev) { $this->_previous_version = $rev; }
@@ -74,8 +77,9 @@  discard block
 block discarded – undo
74 77
         {
75 78
             foreach ($this->_contributors as $cont_id => $cont_name)
76 79
             {
77
-                if (!isset($this->_creator['sioc:modifier']) || ($this->_creator['sioc:modifier'] != $cont_id))
78
-                    $rdf .= "\t<sioc:has_modifier rdf:resource=\"".normalizeUri($exp->siocURL('user', $cont_id))."\" rdfs:label=\"".clean($cont_name)."\"/>\n";
80
+                if (!isset($this->_creator['sioc:modifier']) || ($this->_creator['sioc:modifier'] != $cont_id)) {
81
+                                    $rdf .= "\t<sioc:has_modifier rdf:resource=\"".normalizeUri($exp->siocURL('user', $cont_id))."\" rdfs:label=\"".clean($cont_name)."\"/>\n";
82
+                }
79 83
             }
80 84
             
81 85
             if (isset($this->_contributors[$this->_creator['sioc:modifier']]))
@@ -274,7 +278,9 @@  discard block
 block discarded – undo
274 278
 
275 279
     function getContent(&$exp) {
276 280
         $rdf = "<sioc:UserAccount rdf:about=\"".clean($this->_url, true)."\">\n";
277
-        if ($this->_nick) $rdf .= "\t<sioc:name>".clean($this->_nick)."</sioc:name>\n";
281
+        if ($this->_nick) {
282
+          $rdf .= "\t<sioc:name>".clean($this->_nick)."</sioc:name>\n";
283
+        }
278 284
         if ($this->_email) {
279 285
             if ($exp->_export_email) { $rdf .= "\t<sioc:email rdf:resource=\"".$this->_email."\"/>\n"; }
280 286
             $rdf .= "\t<sioc:email_sha1>".$this->_sha1."</sioc:email_sha1>\n";
@@ -288,7 +294,9 @@  discard block
 block discarded – undo
288 294
         }
289 295
         $rdf .= "\t<sioc:account_of>\n";
290 296
         $rdf .= "\t\t<foaf:Person>\n";
291
-        if ($this->_name) $rdf .= "\t\t\t<foaf:name>".clean($this->_name)."</foaf:name>\n";
297
+        if ($this->_name) {
298
+          $rdf .= "\t\t\t<foaf:name>".clean($this->_name)."</foaf:name>\n";
299
+        }
292 300
         if ($this->_email) { $rdf .= "\t\t\t<foaf:mbox_sha1sum>".$this->_sha1."</foaf:mbox_sha1sum>\n"; }
293 301
         if ($this->_foaf_url) { $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$this->_foaf_url."\"/>\n"; }
294 302
         $rdf .= "\t\t</foaf:Person>\n";  
Please login to merge, or discard this patch.
lib/sioc_inc.php 2 patches
Spacing   +121 added lines, -121 removed lines patch added patch discarded remove patch
@@ -96,34 +96,34 @@  discard block
 block discarded – undo
96 96
         $this->_ignore_suffix[$type] = 1;
97 97
     }
98 98
 
99
-  function siocURL($type, $id, $page=""){
100
-    $type_part = $this->_url4type .$this->_urlequal .  $type ;
99
+  function siocURL($type, $id, $page = "") {
100
+    $type_part = $this->_url4type.$this->_urlequal.$type;
101 101
 			
102 102
     if ($id) {
103
-      if ( isset($this->_type_table[$type]) ) 
104
-              $myID = $this->_type_table[$type] ; 
103
+      if (isset($this->_type_table[$type])) 
104
+              $myID = $this->_type_table[$type]; 
105 105
           else 
106
-              $myID = (($this->_url_usetype) ? $type . '_' : '') . $this->_url4id ;
106
+              $myID = (($this->_url_usetype) ? $type.'_' : '').$this->_url4id;
107 107
 				
108
-      $id_part = $this->_urlseparator . $myID . $this->_urlequal . $id  ;
108
+      $id_part = $this->_urlseparator.$myID.$this->_urlequal.$id;
109 109
     } else {
110 110
       $id_part = '';
111 111
     }
112 112
 		
113
-    ($page) ? $page_part = $this->_urlseparator . $this->_url4page . $this->_urlequal . $page : $page_part='' ;
113
+    ($page) ? $page_part = $this->_urlseparator.$this->_url4page.$this->_urlequal.$page : $page_part = '';
114 114
 			
115
-    ($this->_url_suffix && !isset($this->_ignore_suffix[$type])) ? $suffix = $this->_urlseparator . $this->_url_suffix : $suffix = '';
115
+    ($this->_url_suffix && !isset($this->_ignore_suffix[$type])) ? $suffix = $this->_urlseparator.$this->_url_suffix : $suffix = '';
116 116
 		
117
-    $siocURL = $this->_sioc_url . $type_part . $id_part . $page_part . $suffix ;
117
+    $siocURL = $this->_sioc_url.$type_part.$id_part.$page_part.$suffix;
118 118
     return clean($siocURL, true);
119 119
   }
120 120
 	
121
-    function export( $rdf_content='' ) {
121
+    function export($rdf_content = '') {
122 122
         header('Content-Type: application/rdf+xml; charset='.$this->_encoding, true, 200);
123 123
         echo $this->makeRDF($rdf_content);
124 124
     }
125 125
 
126
-    function makeRDF( $rdf_content='' ) {
126
+    function makeRDF($rdf_content = '') {
127 127
         $rdf = '<?xml version="1.0" encoding="'.$this->_encoding.'" ?>'."\n";
128 128
         $rdf .= ' 
129 129
 <rdf:RDF
@@ -226,53 +226,53 @@  discard block
 block discarded – undo
226 226
         $this->_next_forums = $next;
227 227
     }
228 228
 	
229
-    function getContent( &$exp ) {
230
-        $rdf = "<sioc:Site rdf:about=\"" . clean($this->_url) ."\">\n";
231
-        $rdf .="\t<dc:title>" . clean($this->_name) . "</dc:title>\n";
232
-        $rdf .= "\t<dc:description>" . clean($this->_description) . "</dc:description>\n";
233
-        $rdf .= "\t<sioc:link rdf:resource=\"" . clean($this->_url) ."\"/>\n";
234
-        if($this->_forums) {
229
+    function getContent(&$exp) {
230
+        $rdf = "<sioc:Site rdf:about=\"".clean($this->_url)."\">\n";
231
+        $rdf .= "\t<dc:title>".clean($this->_name)."</dc:title>\n";
232
+        $rdf .= "\t<dc:description>".clean($this->_description)."</dc:description>\n";
233
+        $rdf .= "\t<sioc:link rdf:resource=\"".clean($this->_url)."\"/>\n";
234
+        if ($this->_forums) {
235 235
             foreach ($this->_forums as $id => $url) { 
236
-                $rdf .= "\t<sioc:host_of rdf:resource=\"" . clean($url) . "\"/>\n";
236
+                $rdf .= "\t<sioc:host_of rdf:resource=\"".clean($url)."\"/>\n";
237 237
             }
238 238
         }  
239
-    if($this->_next_forums) {
240
-            $rdf .= "\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('site', "", $this->_page+1) ."\"/>\n";
239
+    if ($this->_next_forums) {
240
+            $rdf .= "\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('site', "", $this->_page + 1)."\"/>\n";
241 241
         }	
242
-    if($this->_usergroup_uri) {
243
-      $rdf .= "\t<sioc:has_Usergroup rdf:resource=\"" . $this->_usergroup_uri . "\"/>\n";
242
+    if ($this->_usergroup_uri) {
243
+      $rdf .= "\t<sioc:has_Usergroup rdf:resource=\"".$this->_usergroup_uri."\"/>\n";
244 244
     } else {
245
-      $rdf .= "\t<sioc:has_Usergroup rdf:nodeID=\"" . AUTHORS_NODE . "\"/>\n";
245
+      $rdf .= "\t<sioc:has_Usergroup rdf:nodeID=\"".AUTHORS_NODE."\"/>\n";
246 246
     }
247 247
         $rdf .= "</sioc:Site>\n";
248 248
         // Forums
249
-        if($this->_forums) {
249
+        if ($this->_forums) {
250 250
             $rdf .= "\n";
251 251
             foreach ($this->_forums as $id => $url) { 
252
-                $rdf .= '<sioc:Forum rdf:about="' . clean($url) ."\">\n";
253
-                $rdf .= "\t<sioc:link rdf:resource=\"" . clean($url) . "\"/>\n";
254
-                $rdf .= "\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('forum', $id) ."\"/>\n";
252
+                $rdf .= '<sioc:Forum rdf:about="'.clean($url)."\">\n";
253
+                $rdf .= "\t<sioc:link rdf:resource=\"".clean($url)."\"/>\n";
254
+                $rdf .= "\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('forum', $id)."\"/>\n";
255 255
                 $rdf .= "</sioc:Forum>\n";
256 256
             }
257 257
         }
258 258
         // Usergroup
259
-        if($this->_users) {
259
+        if ($this->_users) {
260 260
             $rdf .= "\n";
261
-      if($this->_usergroup_uri) {
262
-        $rdf .= '<sioc:UserAccountgroup rdf:about="' . $this->_usergroup_uri . "\">\n";
261
+      if ($this->_usergroup_uri) {
262
+        $rdf .= '<sioc:UserAccountgroup rdf:about="'.$this->_usergroup_uri."\">\n";
263 263
       } else {
264
-        $rdf .= '<sioc:UserAccountgroup rdf:nodeID="' . AUTHORS_NODE . "\">\n";
264
+        $rdf .= '<sioc:UserAccountgroup rdf:nodeID="'.AUTHORS_NODE."\">\n";
265 265
       }
266
-            $rdf .= "\t<sioc:name>Authors for \"" . clean($this->_name) . "\"</sioc:name>\n";
266
+            $rdf .= "\t<sioc:name>Authors for \"".clean($this->_name)."\"</sioc:name>\n";
267 267
                 foreach ($this->_users as $id => $url) {
268 268
                     $rdf .= "\t<sioc:has_member>\n";
269
-                    $rdf .= "\t\t<sioc:UserAccount rdf:about=\"" . clean($url) ."\">\n";
270
-                    $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('user', $id). "\"/>\n";
269
+                    $rdf .= "\t\t<sioc:UserAccount rdf:about=\"".clean($url)."\">\n";
270
+                    $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('user', $id)."\"/>\n";
271 271
                     $rdf .= "\t\t</sioc:UserAccount>\n";
272 272
                     $rdf .= "\t</sioc:has_member>\n";
273 273
                 }
274
-      if($this->_next_users) {
275
-            $rdf .= "\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('site', "", $this->_page+1) ."\"/>\n";
274
+      if ($this->_next_users) {
275
+            $rdf .= "\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('site', "", $this->_page + 1)."\"/>\n";
276 276
       }
277 277
             $rdf .= "</sioc:UserAccountgroup>\n";
278 278
         }
@@ -406,18 +406,18 @@  discard block
 block discarded – undo
406 406
         $this->_parents[$id] = $url;
407 407
     }
408 408
 
409
-    function getContent( &$exp) {
410
-        $rdf .= '<sioc:Thread rdf:about="' . clean($this->_url) . "\">\n";
411
-        $rdf .= "\t<sioc:link rdf:resource=\"" . clean($this->_url) . "\"/>\n";
412
-        if ($this->_views)  $rdf .= "\t<sioc:num_views>" . $this->_views . "</sioc:num_views>\n";
413
-        if ($this->_note)   $rdf .= "\t<rdfs:comment>" . $this->_note . "</rdfs:comment>\n";
414
-    if ($this->_subject) { $rdf .= "\t<dc:title>" . $this->_subject . "</dc:title>\n"; }
415
-        if ($this->_created) { $rdf .= "\t<dcterms:created>" . $this->_created . "</dcterms:created>\n"; }
409
+    function getContent(&$exp) {
410
+        $rdf .= '<sioc:Thread rdf:about="'.clean($this->_url)."\">\n";
411
+        $rdf .= "\t<sioc:link rdf:resource=\"".clean($this->_url)."\"/>\n";
412
+        if ($this->_views)  $rdf .= "\t<sioc:num_views>".$this->_views."</sioc:num_views>\n";
413
+        if ($this->_note)   $rdf .= "\t<rdfs:comment>".$this->_note."</rdfs:comment>\n";
414
+    if ($this->_subject) { $rdf .= "\t<dc:title>".$this->_subject."</dc:title>\n"; }
415
+        if ($this->_created) { $rdf .= "\t<dcterms:created>".$this->_created."</dcterms:created>\n"; }
416 416
         if ($this->_parents) {
417
-      foreach($this->_parents as $id => $uri) {
417
+      foreach ($this->_parents as $id => $uri) {
418 418
         $rdf .= "\t<sioc:has_parent>\n";
419
-        $rdf .= "\t\t<sioc:Forum rdf:about=\"" .clean($uri) ."\">\n";
420
-        $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('forum', $id) . "\"/>\n";
419
+        $rdf .= "\t\t<sioc:Forum rdf:about=\"".clean($uri)."\">\n";
420
+        $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('forum', $id)."\"/>\n";
421 421
         $rdf .= "\t\t</sioc:Forum>\n";
422 422
         $rdf .= "\t</sioc:has_parent>\n";
423 423
       }
@@ -452,24 +452,24 @@  discard block
 block discarded – undo
452 452
     if ($this->_related) { 
453 453
       foreach ($this->_related as $id => $url) {
454 454
           $rdf .= "\t<sioc:related_to>\n";
455
-          $rdf .= "\t\t<sioc:Thread rdf:about=\"" .clean($url) ."\"/>\n";
455
+          $rdf .= "\t\t<sioc:Thread rdf:about=\"".clean($url)."\"/>\n";
456 456
           $rdf .= "\t</sioc:related_to>\n"; // todo - each topic needs to have a URI
457 457
       }
458 458
     }		
459 459
 		
460 460
         if ($this->_posts) {
461
-            foreach($this->_posts as $id => $data) {
461
+            foreach ($this->_posts as $id => $data) {
462 462
                 $rdf .= "\t<sioc:container_of>\n";
463
-                $rdf .= "\t\t<sioc:Post rdf:about=\"" .clean($data[url]) ."\">\n";
464
-                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('post', $id) . "\"/>\n";
465
-                if ($data[prev]) { $rdf .= "\t\t\t<sioc:previous_by_date rdf:resource=\"" . clean($data[prev]) . "\"/>\n"; }
466
-                if ($data[next]) { $rdf .= "\t\t\t<sioc:next_by_date rdf:resource=\"" . clean($data[next]) . "\"/>\n"; }
463
+                $rdf .= "\t\t<sioc:Post rdf:about=\"".clean($data[url])."\">\n";
464
+                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('post', $id)."\"/>\n";
465
+                if ($data[prev]) { $rdf .= "\t\t\t<sioc:previous_by_date rdf:resource=\"".clean($data[prev])."\"/>\n"; }
466
+                if ($data[next]) { $rdf .= "\t\t\t<sioc:next_by_date rdf:resource=\"".clean($data[next])."\"/>\n"; }
467 467
                 $rdf .= "\t\t</sioc:Post>\n";
468 468
                 $rdf .= "\t</sioc:container_of>\n";
469 469
             }
470 470
         }
471
-        if($this->_next) {
472
-            $rdf .= "\r<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('thread', $this->_id, $this->_page+1) ."\"/>\n";
471
+        if ($this->_next) {
472
+            $rdf .= "\r<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('thread', $this->_id, $this->_page + 1)."\"/>\n";
473 473
         }
474 474
         $rdf .= "</sioc:Thread>\n";
475 475
         return $rdf;
@@ -534,39 +534,39 @@  discard block
 block discarded – undo
534 534
         $this->_next = $next;
535 535
     }
536 536
 
537
-    function getContent( &$exp) {
538
-        $rdf .= '<'.$this->_type. ' rdf:about="' . clean($this->_url) . "\">\n";
537
+    function getContent(&$exp) {
538
+        $rdf .= '<'.$this->_type.' rdf:about="'.clean($this->_url)."\">\n";
539 539
     if ($this->_type != 'sioc:Forum') $rdf .= "\t<rdf:type rdf:resource=\"http://rdfs.org/sioc/ns#Forum\" />\n";
540
-        $rdf .= "\t<sioc:link rdf:resource=\"" . clean($this->_url) . "\"/>\n";
541
-        if ($this->_blog_title)  $rdf .= "\t<dc:title>" . $this->_blog_title . "</dc:title>\n";
542
-        if ($this->_description) $rdf .= "\t<dc:description>" . $this->_description . "</dc:description>\n";
543
-        if ($this->_note)        $rdf .= "\t<rdfs:comment>" . $this->_note . "</rdfs:comment>\n";
540
+        $rdf .= "\t<sioc:link rdf:resource=\"".clean($this->_url)."\"/>\n";
541
+        if ($this->_blog_title)  $rdf .= "\t<dc:title>".$this->_blog_title."</dc:title>\n";
542
+        if ($this->_description) $rdf .= "\t<dc:description>".$this->_description."</dc:description>\n";
543
+        if ($this->_note)        $rdf .= "\t<rdfs:comment>".$this->_note."</rdfs:comment>\n";
544 544
 		
545 545
     if ($this->_parents) {
546
-      foreach($this->_parents as $id => $uri) {
546
+      foreach ($this->_parents as $id => $uri) {
547 547
         $rdf .= "\t<sioc:has_parent>\n";
548
-        $rdf .= "\t\t<sioc:Forum rdf:about=\"" .clean($uri) ."\">\n";
549
-        $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('forum', $id) . "\"/>\n";
548
+        $rdf .= "\t\t<sioc:Forum rdf:about=\"".clean($uri)."\">\n";
549
+        $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('forum', $id)."\"/>\n";
550 550
         $rdf .= "\t\t</sioc:Forum>\n";
551 551
         $rdf .= "\t</sioc:has_parent>\n";
552 552
             }
553 553
     }
554 554
 		
555 555
     if ($this->_threads) {
556
-      foreach($this->_threads as $id => $uri) {
556
+      foreach ($this->_threads as $id => $uri) {
557 557
         $rdf .= "\t<sioc:parent_of>\n";
558
-        $rdf .= "\t\t<sioc:Thread rdf:about=\"" .clean($uri) ."\">\n";
559
-        $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('thread', $id) . "\"/>\n";
558
+        $rdf .= "\t\t<sioc:Thread rdf:about=\"".clean($uri)."\">\n";
559
+        $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('thread', $id)."\"/>\n";
560 560
         $rdf .= "\t\t</sioc:Thread>\n";
561 561
         $rdf .= "\t</sioc:parent_of>\n";
562 562
             }
563 563
     }
564 564
 		
565
-        if($this->_posts) {
566
-            foreach($this->_posts as $id => $url) {
565
+        if ($this->_posts) {
566
+            foreach ($this->_posts as $id => $url) {
567 567
                 $rdf .= "\t<sioc:container_of>\n";
568
-                $rdf .= "\t\t<sioc:Post rdf:about=\"" .clean($url) ."\">\n";
569
-                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('post', $id) . "\"/>\n";
568
+                $rdf .= "\t\t<sioc:Post rdf:about=\"".clean($url)."\">\n";
569
+                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('post', $id)."\"/>\n";
570 570
                 $rdf .= "\t\t</sioc:Post>\n";
571 571
                 $rdf .= "\t</sioc:container_of>\n";
572 572
             }
@@ -600,23 +600,23 @@  discard block
 block discarded – undo
600 600
     if ($this->_administrator) {
601 601
             if ($this->_administrator->_id) {
602 602
                 $rdf .= "\t<sioc:has_administrator>\n";
603
-                $rdf .= "\t\t<sioc:UserAccount rdf:about=\"" . clean($this->_administrator->_uri) ."\">\n";
604
-                if($this->_administrator->_sioc_url) { $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"". $this->_administrator->_sioc_url ."\"/>\n"; }
605
-                else $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('user', $this->_administrator->_id). "\"/>\n";
603
+                $rdf .= "\t\t<sioc:UserAccount rdf:about=\"".clean($this->_administrator->_uri)."\">\n";
604
+                if ($this->_administrator->_sioc_url) { $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$this->_administrator->_sioc_url."\"/>\n"; }
605
+                else $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('user', $this->_administrator->_id)."\"/>\n";
606 606
                 $rdf .= "\t\t</sioc:UserAccount>\n";
607 607
                 $rdf .= "\t</sioc:has_administrator>\n";
608 608
             } 
609 609
         }
610 610
     if ($this->_links) {
611
-            foreach($this->_links as $url=>$link) {
612
-                $rdf .= "\t<sioc:links_to rdfs:label=\"$link\" rdf:resource=\"" . clean($url) ."\"/>\n";
611
+            foreach ($this->_links as $url=>$link) {
612
+                $rdf .= "\t<sioc:links_to rdfs:label=\"$link\" rdf:resource=\"".clean($url)."\"/>\n";
613 613
             }
614 614
         }
615 615
 
616
-        if($this->_next) {
617
-            $rdf .= "\r<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('forum', $this->_id, $this->_page+1) ."\"/>\n";
616
+        if ($this->_next) {
617
+            $rdf .= "\r<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('forum', $this->_id, $this->_page + 1)."\"/>\n";
618 618
         }
619
-    $rdf .=  "</".$this->_type.">";
619
+    $rdf .= "</".$this->_type.">";
620 620
 		
621 621
         return $rdf;
622 622
     }
@@ -669,86 +669,86 @@  discard block
 block discarded – undo
669 669
         $this->_reply_of[$id] = $url;    
670 670
     }
671 671
 
672
-    function getContent( &$exp ) {
673
-        $rdf = '<'.$this->_type." rdf:about=\"" . clean($this->_url) . "\">\n";
672
+    function getContent(&$exp) {
673
+        $rdf = '<'.$this->_type." rdf:about=\"".clean($this->_url)."\">\n";
674 674
         if ($this->_type != 'sioc:Post') $rdf .= "\t<rdf:type rdf:resource=\"http://rdfs.org/sioc/ns#Post\" />\n";
675
-        if ($this->_subject) { $rdf .= "\t<dc:title>" . $this->_subject . "</dc:title>\n"; }
675
+        if ($this->_subject) { $rdf .= "\t<dc:title>".$this->_subject."</dc:title>\n"; }
676 676
         if ($this->_creator) {
677 677
             if ($this->_creator->_id) {
678 678
                 $rdf .= "\t<sioc:has_creator>\n";
679
-                $rdf .= "\t\t<sioc:UserAccount rdf:about=\"" . clean($this->_creator->_uri) ."\">\n";
680
-                if($this->_creator->_sioc_url) { $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"". $this->_creator->_sioc_url ."\"/>\n"; } else {
681
-                  $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('user', $this->_creator->_id). "\"/>\n";
679
+                $rdf .= "\t\t<sioc:UserAccount rdf:about=\"".clean($this->_creator->_uri)."\">\n";
680
+                if ($this->_creator->_sioc_url) { $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$this->_creator->_sioc_url."\"/>\n"; } else {
681
+                  $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('user', $this->_creator->_id)."\"/>\n";
682 682
                 }
683 683
                 $rdf .= "\t\t</sioc:UserAccount>\n";
684 684
                 $rdf .= "\t</sioc:has_creator>\n";
685 685
                 $rdf .= "\t<foaf:maker>\n";
686
-                $rdf .= "\t\t<foaf:Person rdf:about=\"" . clean($this->_creator->_foaf_uri) ."\">\n";
687
-                if($this->_creator->_foaf_url) { $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"". $this->_creator->_foaf_url ."\"/>\n"; } else {
688
-                  $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('user', $this->_creator->_id). "\"/>\n";
686
+                $rdf .= "\t\t<foaf:Person rdf:about=\"".clean($this->_creator->_foaf_uri)."\">\n";
687
+                if ($this->_creator->_foaf_url) { $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$this->_creator->_foaf_url."\"/>\n"; } else {
688
+                  $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('user', $this->_creator->_id)."\"/>\n";
689 689
                 }
690 690
                 $rdf .= "\t\t</foaf:Person>\n";
691 691
                 $rdf .= "\t</foaf:maker>\n";
692 692
             } else {
693 693
                 $rdf .= "\t<foaf:maker>\n";
694 694
                 $rdf .= "\t\t<foaf:Person";
695
-                if($this->_creator->_name) {
696
-                  $rdf .= " foaf:name=\"" . $this->_creator->_name ."\"";
695
+                if ($this->_creator->_name) {
696
+                  $rdf .= " foaf:name=\"".$this->_creator->_name."\"";
697 697
                 }
698
-                if($this->_creator->_sha1) {
699
-                  $rdf .= " foaf:mbox_sha1sum=\"" . $this->_creator->_sha1 ."\"";
698
+                if ($this->_creator->_sha1) {
699
+                  $rdf .= " foaf:mbox_sha1sum=\"".$this->_creator->_sha1."\"";
700 700
                 }
701
-                if($this->_creator->_name) {
702
-                  $rdf .= ">\n\t\t\t<foaf:homepage rdf:resource=\"" . $this->_creator->_homepage ."\"/>\n\t\t</foaf:Person>\n";
701
+                if ($this->_creator->_name) {
702
+                  $rdf .= ">\n\t\t\t<foaf:homepage rdf:resource=\"".$this->_creator->_homepage."\"/>\n\t\t</foaf:Person>\n";
703 703
                 } else {
704 704
                   $rdf .= "/>\n";
705 705
                 }
706 706
                 $rdf .= "\t</foaf:maker>\n";
707 707
             }
708 708
         }
709
-        $rdf .= "\t<dcterms:created>" . $this->_created . "</dcterms:created>\n";
710
-        if ($this->_updated AND ($this->_created != $this->_updated) ) $rdf .= "\t<dcterms:modified>" . $this->_updated . "</dcterms:modified>\n";
711
-        $rdf .= "\t<sioc:content>" . pureContent($this->_content) . "</sioc:content>\n";
709
+        $rdf .= "\t<dcterms:created>".$this->_created."</dcterms:created>\n";
710
+        if ($this->_updated AND ($this->_created != $this->_updated)) $rdf .= "\t<dcterms:modified>".$this->_updated."</dcterms:modified>\n";
711
+        $rdf .= "\t<sioc:content>".pureContent($this->_content)."</sioc:content>\n";
712 712
 			
713
-        $rdf .= "\t<content:encoded><![CDATA[" . $this->_encoded . "]]></content:encoded>\n";
714
-        if($this->_topics) {
715
-            foreach($this->_topics as $url=>$topic) {
716
-                $rdf .= "\t<sioc:topic rdfs:label=\"$topic\" rdf:resource=\"" . clean($url) ."\"/>\n";
713
+        $rdf .= "\t<content:encoded><![CDATA[".$this->_encoded."]]></content:encoded>\n";
714
+        if ($this->_topics) {
715
+            foreach ($this->_topics as $url=>$topic) {
716
+                $rdf .= "\t<sioc:topic rdfs:label=\"$topic\" rdf:resource=\"".clean($url)."\"/>\n";
717 717
             }
718 718
         }
719
-        if($this->_links) {
720
-            foreach($this->_links as $url=>$link) {
721
-                $rdf .= "\t<sioc:links_to rdfs:label=\"$link\" rdf:resource=\"" . clean($url) ."\"/>\n";
719
+        if ($this->_links) {
720
+            foreach ($this->_links as $url=>$link) {
721
+                $rdf .= "\t<sioc:links_to rdfs:label=\"$link\" rdf:resource=\"".clean($url)."\"/>\n";
722 722
             }
723 723
         }
724
-    if($this->_has_part) {
725
-            foreach($this->_has_part as $id=>$url) {
724
+    if ($this->_has_part) {
725
+            foreach ($this->_has_part as $id=>$url) {
726 726
                 $rdf .= "\t<dcterms:hasPart>\n";
727
-        $rdf .= "\t\t<dcmitype:Image rdf:about=\"" . clean($url) . "\"/>\n";
727
+        $rdf .= "\t\t<dcmitype:Image rdf:about=\"".clean($url)."\"/>\n";
728 728
         $rdf .= "\t</dcterms:hasPart>\n";
729 729
             }
730 730
         }
731
-        if($this->_reply_of) {
732
-            foreach($this->_reply_of as $id => $url) {
731
+        if ($this->_reply_of) {
732
+            foreach ($this->_reply_of as $id => $url) {
733 733
                 $rdf .= "\t<sioc:reply_of>\n";
734
-                $rdf .= "\t\t<sioc:Post rdf:about=\"" . clean($url) . "\">\n";
735
-                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('post', $id) . "\"/>\n";
734
+                $rdf .= "\t\t<sioc:Post rdf:about=\"".clean($url)."\">\n";
735
+                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('post', $id)."\"/>\n";
736 736
                 $rdf .= "\t\t</sioc:Post>\n";
737 737
                 $rdf .= "\t</sioc:reply_of>\n";
738 738
             }
739 739
         }
740
-        if($this->_comments) {
741
-            foreach($this->_comments as $id => $url) {
740
+        if ($this->_comments) {
741
+            foreach ($this->_comments as $id => $url) {
742 742
                 $rdf .= "\t<sioc:has_reply>\n";
743
-                $rdf .= "\t\t<sioc:Post rdf:about=\"" . clean($url) ."\">\n";
743
+                $rdf .= "\t\t<sioc:Post rdf:about=\"".clean($url)."\">\n";
744 744
         //        if($comments->f('comment_trackback')) $rdf .= "\t\t\t<sioc:type>" . POST_TRACKBACK . "</sioc:type>\n"; 
745 745
         //        else $rdf .= "\t\t\t<sioc:type>" . POST_COMMENT  . "</sioc:type>\n";
746
-                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('comment', $id) . "\"/>\n";
746
+                $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('comment', $id)."\"/>\n";
747 747
                 $rdf .= "\t\t</sioc:Post>\n";
748 748
                 $rdf .= "\t</sioc:has_reply>\n";
749 749
             }
750 750
         }
751
-        $rdf .=  "</".$this->_type.">\n";
751
+        $rdf .= "</".$this->_type.">\n";
752 752
         return $rdf;    
753 753
     }
754 754
 }
@@ -982,13 +982,13 @@  discard block
 block discarded – undo
982 982
     var $_url;
983 983
     var $_type;
984 984
 
985
-    function SIOCWiki ($url, $type='sioct:Wiki') {
985
+    function SIOCWiki($url, $type = 'sioct:Wiki') {
986 986
         $this->_url = $url;
987 987
           $this->_type = $type;
988 988
     }
989 989
 
990
-    function getContent( &$exp ) {
991
-        $rdf = '<'.$this->_type." rdf:about=\"" . clean($this->_url) . "\"/>\n";
990
+    function getContent(&$exp) {
991
+        $rdf = '<'.$this->_type." rdf:about=\"".clean($this->_url)."\"/>\n";
992 992
         return $rdf;
993 993
     }
994 994
 }
@@ -1003,13 +1003,13 @@  discard block
 block discarded – undo
1003 1003
     var $_url;
1004 1004
     var $_type;
1005 1005
 
1006
-    function SIOCCategory ($url, $type='sioct:Category') {
1006
+    function SIOCCategory($url, $type = 'sioct:Category') {
1007 1007
         $this->_url = $url;
1008 1008
           $this->_type = $type;
1009 1009
     }
1010 1010
 
1011
-    function getContent( &$exp ) {
1012
-        $rdf = '<'.$this->_type." rdf:about=\"" . clean($this->_url) . "\"/>\n";
1011
+    function getContent(&$exp) {
1012
+        $rdf = '<'.$this->_type." rdf:about=\"".clean($this->_url)."\"/>\n";
1013 1013
         return $rdf;
1014 1014
     }
1015 1015
 }
Please login to merge, or discard this patch.
Braces   +94 added lines, -38 removed lines patch added patch discarded remove patch
@@ -100,10 +100,11 @@  discard block
 block discarded – undo
100 100
     $type_part = $this->_url4type .$this->_urlequal .  $type ;
101 101
 			
102 102
     if ($id) {
103
-      if ( isset($this->_type_table[$type]) ) 
104
-              $myID = $this->_type_table[$type] ; 
105
-          else 
106
-              $myID = (($this->_url_usetype) ? $type . '_' : '') . $this->_url4id ;
103
+      if ( isset($this->_type_table[$type]) ) {
104
+                    $myID = $this->_type_table[$type] ;
105
+      } else {
106
+                        $myID = (($this->_url_usetype) ? $type . '_' : '') . $this->_url4id ;
107
+          }
107 108
 				
108 109
       $id_part = $this->_urlseparator . $myID . $this->_urlequal . $id  ;
109 110
     } else {
@@ -145,10 +146,14 @@  discard block
 block discarded – undo
145 146
 	<admin:generatorAgent rdf:resource="'.clean($this->_generator, true).'"/>
146 147
 	<admin:generatorAgent rdf:resource="'.clean(EXPORTER_URL, true).'?version='.EXPORTER_VERSION.'"/>
147 148
 </foaf:Document>'."\n";
148
-        if ($rdf_content) $rdf .= $rdf_content; 
149
+        if ($rdf_content) {
150
+          $rdf .= $rdf_content;
151
+        }
149 152
         if (sizeof($this->_objects)) {
150 153
             foreach ($this->_objects as $object) {
151
-                if ($object) $rdf .= $object->getContent($this);
154
+                if ($object) {
155
+                  $rdf .= $object->getContent($this);
156
+                }
152 157
             }
153 158
         }
154 159
         $rdf .= "\n</rdf:RDF>";
@@ -328,12 +333,16 @@  discard block
 block discarded – undo
328 333
 
329 334
     function getContent(&$exp) {
330 335
         $rdf = "<foaf:Person rdf:about=\"".clean($this->_foaf_uri)."\">\n";
331
-        if ($this->_name) $rdf .= "\t<foaf:name>".$this->_name."</foaf:name>\n";
336
+        if ($this->_name) {
337
+          $rdf .= "\t<foaf:name>".$this->_name."</foaf:name>\n";
338
+        }
332 339
         if ($this->_email) { $rdf .= "\t<foaf:mbox_sha1sum>".$this->_sha1."</foaf:mbox_sha1sum>\n"; }
333 340
         if ($this->_foaf_url) { $rdf .= "\t<rdfs:seeAlso rdf:resource=\"".$this->_foaf_url."\"/>\n"; }
334 341
         $rdf .= "\t<foaf:holdsAccount>\n";
335 342
         $rdf .= "\t\t<sioc:UserAccount rdf:about=\"".clean($this->_uri)."\">\n";
336
-        if ($this->_nick) $rdf .= "\t\t\t<sioc:name>".$this->_nick."</sioc:name>\n";
343
+        if ($this->_nick) {
344
+          $rdf .= "\t\t\t<sioc:name>".$this->_nick."</sioc:name>\n";
345
+        }
337 346
         if ($this->_email) {
338 347
             if ($exp->_export_email) { $rdf .= "\t\t\t<sioc:email rdf:resource=\"".$this->_email."\"/>\n"; }
339 348
             $rdf .= "\t\t\t<sioc:email_sha1>".$this->_sha1."</sioc:email_sha1>\n";
@@ -409,8 +418,12 @@  discard block
 block discarded – undo
409 418
     function getContent( &$exp) {
410 419
         $rdf .= '<sioc:Thread rdf:about="' . clean($this->_url) . "\">\n";
411 420
         $rdf .= "\t<sioc:link rdf:resource=\"" . clean($this->_url) . "\"/>\n";
412
-        if ($this->_views)  $rdf .= "\t<sioc:num_views>" . $this->_views . "</sioc:num_views>\n";
413
-        if ($this->_note)   $rdf .= "\t<rdfs:comment>" . $this->_note . "</rdfs:comment>\n";
421
+        if ($this->_views) {
422
+          $rdf .= "\t<sioc:num_views>" . $this->_views . "</sioc:num_views>\n";
423
+        }
424
+        if ($this->_note) {
425
+          $rdf .= "\t<rdfs:comment>" . $this->_note . "</rdfs:comment>\n";
426
+        }
414 427
     if ($this->_subject) { $rdf .= "\t<dc:title>" . $this->_subject . "</dc:title>\n"; }
415 428
         if ($this->_created) { $rdf .= "\t<dcterms:created>" . $this->_created . "</dcterms:created>\n"; }
416 429
         if ($this->_parents) {
@@ -536,11 +549,19 @@  discard block
 block discarded – undo
536 549
 
537 550
     function getContent( &$exp) {
538 551
         $rdf .= '<'.$this->_type. ' rdf:about="' . clean($this->_url) . "\">\n";
539
-    if ($this->_type != 'sioc:Forum') $rdf .= "\t<rdf:type rdf:resource=\"http://rdfs.org/sioc/ns#Forum\" />\n";
552
+    if ($this->_type != 'sioc:Forum') {
553
+      $rdf .= "\t<rdf:type rdf:resource=\"http://rdfs.org/sioc/ns#Forum\" />\n";
554
+    }
540 555
         $rdf .= "\t<sioc:link rdf:resource=\"" . clean($this->_url) . "\"/>\n";
541
-        if ($this->_blog_title)  $rdf .= "\t<dc:title>" . $this->_blog_title . "</dc:title>\n";
542
-        if ($this->_description) $rdf .= "\t<dc:description>" . $this->_description . "</dc:description>\n";
543
-        if ($this->_note)        $rdf .= "\t<rdfs:comment>" . $this->_note . "</rdfs:comment>\n";
556
+        if ($this->_blog_title) {
557
+          $rdf .= "\t<dc:title>" . $this->_blog_title . "</dc:title>\n";
558
+        }
559
+        if ($this->_description) {
560
+          $rdf .= "\t<dc:description>" . $this->_description . "</dc:description>\n";
561
+        }
562
+        if ($this->_note) {
563
+          $rdf .= "\t<rdfs:comment>" . $this->_note . "</rdfs:comment>\n";
564
+        }
544 565
 		
545 566
     if ($this->_parents) {
546 567
       foreach($this->_parents as $id => $uri) {
@@ -576,23 +597,32 @@  discard block
 block discarded – undo
576 597
             if ($this->_creator->_id) {
577 598
                 $rdf .= "\t<sioc:has_creator>\n";
578 599
                 $rdf .= "\t\t<sioc:UserAccount rdf:about=\"".clean($this->_creator->_uri)."\">\n";
579
-                if ($this->_creator->_sioc_url) { $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$this->_creator->_sioc_url."\"/>\n"; }
580
-                else $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('user', $this->_creator->_id)."\"/>\n";
600
+                if ($this->_creator->_sioc_url) { $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$this->_creator->_sioc_url."\"/>\n"; } else {
601
+                  $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('user', $this->_creator->_id)."\"/>\n";
602
+                }
581 603
                 $rdf .= "\t\t</sioc:UserAccount>\n";
582 604
                 $rdf .= "\t</sioc:has_creator>\n";
583 605
                 $rdf .= "\t<foaf:maker>\n";
584 606
                 $rdf .= "\t\t<foaf:Person rdf:about=\"".clean($this->_creator->_foaf_uri)."\">\n";
585
-                if ($this->_creator->_foaf_url) { $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$this->_creator->_foaf_url."\"/>\n"; }
586
-                else $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('user', $this->_creator->_id)."\"/>\n";
607
+                if ($this->_creator->_foaf_url) { $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$this->_creator->_foaf_url."\"/>\n"; } else {
608
+                  $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$exp->siocURL('user', $this->_creator->_id)."\"/>\n";
609
+                }
587 610
                 $rdf .= "\t\t</foaf:Person>\n";
588 611
                 $rdf .= "\t</foaf:maker>\n";
589 612
             } else {
590 613
                 $rdf .= "\t<foaf:maker>\n";
591 614
                 $rdf .= "\t\t<foaf:Person";
592
-                if ($this->_creator->_name) $rdf .= " foaf:name=\"".$this->_creator->_name."\"";
593
-                if ($this->_creator->_sha1) $rdf .= " foaf:mbox_sha1sum=\"".$this->_creator->_sha1."\"";
594
-                if ($this->_creator->_name) $rdf .= ">\n\t\t\t<foaf:homepage rdf:resource=\"".$this->_creator->_homepage."\"/>\n\t\t</foaf:Person>\n";
595
-                else $rdf .= "/>\n";
615
+                if ($this->_creator->_name) {
616
+                  $rdf .= " foaf:name=\"".$this->_creator->_name."\"";
617
+                }
618
+                if ($this->_creator->_sha1) {
619
+                  $rdf .= " foaf:mbox_sha1sum=\"".$this->_creator->_sha1."\"";
620
+                }
621
+                if ($this->_creator->_name) {
622
+                  $rdf .= ">\n\t\t\t<foaf:homepage rdf:resource=\"".$this->_creator->_homepage."\"/>\n\t\t</foaf:Person>\n";
623
+                } else {
624
+                  $rdf .= "/>\n";
625
+                }
596 626
                 $rdf .= "\t</foaf:maker>\n";
597 627
             }
598 628
         }
@@ -601,8 +631,9 @@  discard block
 block discarded – undo
601 631
             if ($this->_administrator->_id) {
602 632
                 $rdf .= "\t<sioc:has_administrator>\n";
603 633
                 $rdf .= "\t\t<sioc:UserAccount rdf:about=\"" . clean($this->_administrator->_uri) ."\">\n";
604
-                if($this->_administrator->_sioc_url) { $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"". $this->_administrator->_sioc_url ."\"/>\n"; }
605
-                else $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('user', $this->_administrator->_id). "\"/>\n";
634
+                if($this->_administrator->_sioc_url) { $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"". $this->_administrator->_sioc_url ."\"/>\n"; } else {
635
+                  $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"" . $exp->siocURL('user', $this->_administrator->_id). "\"/>\n";
636
+                }
606 637
                 $rdf .= "\t\t</sioc:UserAccount>\n";
607 638
                 $rdf .= "\t</sioc:has_administrator>\n";
608 639
             } 
@@ -671,7 +702,9 @@  discard block
 block discarded – undo
671 702
 
672 703
     function getContent( &$exp ) {
673 704
         $rdf = '<'.$this->_type." rdf:about=\"" . clean($this->_url) . "\">\n";
674
-        if ($this->_type != 'sioc:Post') $rdf .= "\t<rdf:type rdf:resource=\"http://rdfs.org/sioc/ns#Post\" />\n";
705
+        if ($this->_type != 'sioc:Post') {
706
+          $rdf .= "\t<rdf:type rdf:resource=\"http://rdfs.org/sioc/ns#Post\" />\n";
707
+        }
675 708
         if ($this->_subject) { $rdf .= "\t<dc:title>" . $this->_subject . "</dc:title>\n"; }
676 709
         if ($this->_creator) {
677 710
             if ($this->_creator->_id) {
@@ -707,7 +740,9 @@  discard block
 block discarded – undo
707 740
             }
708 741
         }
709 742
         $rdf .= "\t<dcterms:created>" . $this->_created . "</dcterms:created>\n";
710
-        if ($this->_updated AND ($this->_created != $this->_updated) ) $rdf .= "\t<dcterms:modified>" . $this->_updated . "</dcterms:modified>\n";
743
+        if ($this->_updated AND ($this->_created != $this->_updated) ) {
744
+          $rdf .= "\t<dcterms:modified>" . $this->_updated . "</dcterms:modified>\n";
745
+        }
711 746
         $rdf .= "\t<sioc:content>" . pureContent($this->_content) . "</sioc:content>\n";
712 747
 			
713 748
         $rdf .= "\t<content:encoded><![CDATA[" . $this->_encoded . "]]></content:encoded>\n";
@@ -801,8 +836,9 @@  discard block
 block discarded – undo
801 836
         if ($this->_subject)
802 837
         {
803 838
             $rdf .= "\t<dc:title>".clean($this->_subject)."</dc:title>\n";
804
-            if (strcmp($this->_has_container, 'http://en.wikipedia.org') === 0)
805
-                $rdf .= "\t<foaf:primaryTopic rdf:resource=\"".clean('http://dbpedia.org/resource/'.$this->_subject)."\"/>\n";
839
+            if (strcmp($this->_has_container, 'http://en.wikipedia.org') === 0) {
840
+                            $rdf .= "\t<foaf:primaryTopic rdf:resource=\"".clean('http://dbpedia.org/resource/'.$this->_subject)."\"/>\n";
841
+            }
806 842
         }
807 843
         if ($this->_creator->_nick) {
808 844
             /*if ($this->_creator->_id) {
@@ -823,7 +859,9 @@  discard block
 block discarded – undo
823 859
                 $rdf .= "\t\t<sioc:UserAccount rdf:about=\"".clean($this->_creator->_uri)."\">\n";
824 860
                 $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".
825 861
                         clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki='.$this->_creator->_uri);
826
-                if ($this->_api) $rdf .= clean("&api=".$this->_api);
862
+                if ($this->_api) {
863
+                  $rdf .= clean("&api=".$this->_api);
864
+                }
827 865
                 $rdf .= "\"/>\n";
828 866
                 $rdf .= "\t\t</sioc:UserAccount>\n";
829 867
                 $rdf .= "\t</sioc:has_creator>\n";
@@ -854,7 +892,9 @@  discard block
 block discarded – undo
854 892
                 $rdf .= "\t\t<sioct:Category rdf:about=\"".clean($url)."\">\n";
855 893
                 $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".
856 894
                         clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki='.$url);
857
-                if ($this->_api) $rdf .= clean("&api=".$this->_api);
895
+                if ($this->_api) {
896
+                  $rdf .= clean("&api=".$this->_api);
897
+                }
858 898
                 $rdf .= "\"/>\n";
859 899
                 $rdf .= "\t\t</sioct:Category>\n";
860 900
                 $rdf .= "\t</sioc:topic>\n";
@@ -866,7 +906,9 @@  discard block
 block discarded – undo
866 906
                 $rdf .= "\t\t<sioct:WikiArticle rdf:about=\"".clean($url)."\">\n";
867 907
                 $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".
868 908
                         clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki='.$url);
869
-                if ($this->_api) $rdf .= clean("&api=".$this->_api);
909
+                if ($this->_api) {
910
+                  $rdf .= clean("&api=".$this->_api);
911
+                }
870 912
                 $rdf .= "\"/>\n";
871 913
                 $rdf .= "\t\t</sioct:WikiArticle>\n";
872 914
                 $rdf .= "\t</sioc:links_to>\n";
@@ -878,7 +920,9 @@  discard block
 block discarded – undo
878 920
                 $rdf .= "\t\t<sioct:WikiArticle rdf:about=\"".clean($this->_links)."\">\n";
879 921
                 $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".
880 922
                         clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki='.$this->_links);
881
-                if ($this->_api) $rdf .= clean("&api=".$this->_api);
923
+                if ($this->_api) {
924
+                  $rdf .= clean("&api=".$this->_api);
925
+                }
882 926
                 $rdf .= "\"/>\n";
883 927
                 $rdf .= "\t\t</sioct:WikiArticle>\n";
884 928
                 $rdf .= "\t</sioc:links_to>\n";
@@ -894,7 +938,9 @@  discard block
 block discarded – undo
894 938
                 $rdf .= "\t\t<sioct:WikiArticle rdf:about=\"".clean($this->_previous_version)."\">\n";
895 939
                 $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".
896 940
                         clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki='.$this->_previous_version);
897
-                if ($this->_api) $rdf .= clean("&api=".$this->_api);
941
+                if ($this->_api) {
942
+                  $rdf .= clean("&api=".$this->_api);
943
+                }
898 944
                 $rdf .= "\"/>\n";
899 945
                 $rdf .= "\t\t</sioct:WikiArticle>\n";
900 946
                 $rdf .= "\t</sioc:previous_version>\n";
@@ -916,7 +962,9 @@  discard block
 block discarded – undo
916 962
                 $rdf .= "\t\t<sioct:WikiArticle rdf:about=\"".clean($this->_next_version)."\">\n";
917 963
                 $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".
918 964
                         clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki='.$this->_next_version);
919
-                if ($this->_api) $rdf .= clean("&api=".$this->_api);
965
+                if ($this->_api) {
966
+                  $rdf .= clean("&api=".$this->_api);
967
+                }
920 968
                 $rdf .= "\"/>\n";
921 969
                 $rdf .= "\t\t</sioct:WikiArticle>\n";
922 970
                 $rdf .= "\t</sioc:next_version>\n";
@@ -938,7 +986,9 @@  discard block
 block discarded – undo
938 986
                 $rdf .= "\t\t<sioct:WikiArticle rdf:about=\"".clean($this->_latest_version)."\">\n";
939 987
                 $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".
940 988
                         clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki='.$this->_latest_version);
941
-                if ($this->_api) $rdf .= clean("&api=".$this->_api);
989
+                if ($this->_api) {
990
+                  $rdf .= clean("&api=".$this->_api);
991
+                }
942 992
                 $rdf .= "\"/>\n";
943 993
                 $rdf .= "\t\t</sioct:WikiArticle>\n";
944 994
                 $rdf .= "\t</sioc:latest_version>\n";
@@ -948,7 +998,9 @@  discard block
 block discarded – undo
948 998
                 $rdf .= "\t\t<sioct:WikiArticle rdf:about=\"".clean($this->_has_discussion)."\">\n";
949 999
                 $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".
950 1000
                         clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki='.$this->_has_discussion);
951
-                if ($this->_api) $rdf .= clean("&api=".$this->_api);
1001
+                if ($this->_api) {
1002
+                  $rdf .= clean("&api=".$this->_api);
1003
+                }
952 1004
                 $rdf .= "\"/>\n";
953 1005
                 $rdf .= "\t\t</sioct:WikiArticle>\n";
954 1006
                 $rdf .= "\t</sioc:has_discussion>\n";
@@ -963,7 +1015,9 @@  discard block
 block discarded – undo
963 1015
             $rdf .= "\t<owl:sameAs rdf:resource=\"".clean($this->_redirpage)."\"/>\n";
964 1016
             $rdf .= "\t<rdfs:seeAlso rdf:resource=\"". 
965 1017
                         clean('http://ws.sioc-project.org/mediawiki/mediawiki.php?wiki='.$this->_redirpage);
966
-            if ($this->_api) $rdf .= clean("&api=".$this->_api);
1018
+            if ($this->_api) {
1019
+              $rdf .= clean("&api=".$this->_api);
1020
+            }
967 1021
             $rdf .= "\"/>\n";
968 1022
         }
969 1023
 
@@ -1026,7 +1080,9 @@  discard block
 block discarded – undo
1026 1080
 #    return htmlentities2( $text );
1027 1081
     // double encoding is preventable now
1028 1082
     // $text = htmlspecialchars_decode($text, ENT_COMPAT);
1029
-    if ($url) $text = str_replace('&amp;', '&', $text);
1083
+    if ($url) {
1084
+      $text = str_replace('&amp;', '&', $text);
1085
+    }
1030 1086
     return htmlspecialchars($text, ENT_COMPAT, 'UTF-8');
1031 1087
   }
1032 1088
 }
Please login to merge, or discard this patch.