@@ -100,10 +100,11 @@ discard block |
||
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 { |
@@ -417,8 +418,12 @@ discard block |
||
417 | 418 | function getContent(&$exp) { |
418 | 419 | $rdf .= '<sioc:Thread rdf:about="'.clean($this->_url)."\">\n"; |
419 | 420 | $rdf .= "\t<sioc:link rdf:resource=\"".clean($this->_url)."\"/>\n"; |
420 | - if ($this->_views) $rdf .= "\t<sioc:num_views>".$this->_views."</sioc:num_views>\n"; |
|
421 | - 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 | + } |
|
422 | 427 | if ($this->_subject) { $rdf .= "\t<dc:title>".$this->_subject."</dc:title>\n"; } |
423 | 428 | if ($this->_created) { $rdf .= "\t<dcterms:created>".$this->_created."</dcterms:created>\n"; } |
424 | 429 | if ($this->_parents) { |
@@ -544,11 +549,19 @@ discard block |
||
544 | 549 | |
545 | 550 | function getContent(&$exp) { |
546 | 551 | $rdf .= '<'.$this->_type.' rdf:about="'.clean($this->_url)."\">\n"; |
547 | - 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 | + } |
|
548 | 555 | $rdf .= "\t<sioc:link rdf:resource=\"".clean($this->_url)."\"/>\n"; |
549 | - if ($this->_blog_title) $rdf .= "\t<dc:title>".$this->_blog_title."</dc:title>\n"; |
|
550 | - if ($this->_description) $rdf .= "\t<dc:description>".$this->_description."</dc:description>\n"; |
|
551 | - 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 | + } |
|
552 | 565 | |
553 | 566 | if ($this->_parents) { |
554 | 567 | foreach ($this->_parents as $id => $uri) { |
@@ -618,8 +631,9 @@ discard block |
||
618 | 631 | if ($this->_administrator->_id) { |
619 | 632 | $rdf .= "\t<sioc:has_administrator>\n"; |
620 | 633 | $rdf .= "\t\t<sioc:UserAccount rdf:about=\"".clean($this->_administrator->_uri)."\">\n"; |
621 | - if ($this->_administrator->_sioc_url) { $rdf .= "\t\t\t<rdfs:seeAlso rdf:resource=\"".$this->_administrator->_sioc_url."\"/>\n"; } |
|
622 | - 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 | + } |
|
623 | 637 | $rdf .= "\t\t</sioc:UserAccount>\n"; |
624 | 638 | $rdf .= "\t</sioc:has_administrator>\n"; |
625 | 639 | } |
@@ -688,7 +702,9 @@ discard block |
||
688 | 702 | |
689 | 703 | function getContent(&$exp) { |
690 | 704 | $rdf = '<'.$this->_type." rdf:about=\"".clean($this->_url)."\">\n"; |
691 | - 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 | + } |
|
692 | 708 | if ($this->_subject) { $rdf .= "\t<dc:title>".$this->_subject."</dc:title>\n"; } |
693 | 709 | if ($this->_creator) { |
694 | 710 | if ($this->_creator->_id) { |
@@ -724,7 +740,9 @@ discard block |
||
724 | 740 | } |
725 | 741 | } |
726 | 742 | $rdf .= "\t<dcterms:created>".$this->_created."</dcterms:created>\n"; |
727 | - 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 | + } |
|
728 | 746 | $rdf .= "\t<sioc:content>".pureContent($this->_content)."</sioc:content>\n"; |
729 | 747 | |
730 | 748 | $rdf .= "\t<content:encoded><![CDATA[".$this->_encoded."]]></content:encoded>\n"; |