File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,16 @@ $description = Common::stripUpTo(trim(filter_var(
1212 ($ object ? $ object ->getContent (true ) : "The requested document does not exist or could not be found. " ),
1313 FILTER_SANITIZE_STRING
1414)), "\n" , 300 );
15- $ this ->opengraph ->attach (new Pair ("url " , "/document/ " . urlencode ($ object_id )));
1615$ this ->opengraph ->attach (new Pair ("type " , "article " ));
1716
1817$ url = Common::relativeUrlToAbsolute ("/document/ " . urlencode ($ object_id ));
19- if ($ object )
18+ if ($ object ) {
2019 $ url .= "/ " . Common::sanitizeForUrl ($ object ->getTitle (), true );
20+ $ this ->opengraph ->attach (new Pair ("url " , "/document/ " . urlencode ($ object_id )
21+ . "/ " . Common::sanitizeForUrl ($ object ->getTitle (), true )));
22+ } else {
23+ $ this ->opengraph ->attach (new Pair ("url " , "/document/ " . urlencode ($ object_id )));
24+ }
2125
2226#$this->additional_css[] = "/a/document.css";
2327require ("./header.inc.phtml " );
Original file line number Diff line number Diff line change @@ -12,15 +12,18 @@ $description = Common::stripUpTo(trim(filter_var(
1212 ($ object ? $ object ->getPacketRemarks (true ) : "The requested packet does not exist or could not be found. " ),
1313 FILTER_SANITIZE_STRING
1414)), "\n" , 300 );
15- $ this ->opengraph ->attach (new Pair ("url " , "/packet/ " . urlencode ($ object_id )));
1615$ this ->opengraph ->attach (new Pair ("type " , "article " ));
1716
1817$ url = Common::relativeUrlToAbsolute ("/packet/ " . urlencode ($ object_id ));
1918if ($ object ) {
2019 $ url .= "/ " . Common::sanitizeForUrl ($ object ->getPacketName (), true );
20+ $ this ->opengraph ->attach (new Pair ("url " , "/packet/ " . urlencode ($ object_id )
21+ . "/ " . Common::sanitizeForUrl ($ object ->getPacketName (), true )));
2122
2223 $ packet_id = $ object ->getPacketId (true );
2324 $ title = $ packet_id . " " . $ title ;
25+ } else {
26+ $ this ->opengraph ->attach (new Pair ("url " , "/packet/ " . urlencode ($ object_id )));
2427}
2528
2629$ this ->additional_css [] = "/a/packet.css " ;
You can’t perform that action at this time.
0 commit comments