@@ -7,11 +7,10 @@ use \BNETDocs\Libraries\Pair;
77$ object_id = $ this ->getContext ()->packet_id ;
88$ object = $ this ->getContext ()->packet ;
99
10- $ title = ($ object ? $ object ->getPacketName () : "Packet Not Found " );
11- $ description = Common::stripUpTo (trim (filter_var (
12- ($ object ? $ object ->getPacketRemarks (true ) : "The requested packet does not exist or could not be found. " ),
13- FILTER_SANITIZE_STRING
14- )), "\n" , 300 );
10+ $ title = "Packet Not Found " ;
11+ $ description = "The requested packet does not exist or could not be found. " ;
12+ $ description = "The requested packet does not exist or could not be found. " ;
13+
1514$ this ->opengraph ->attach (new Pair ("type " , "article " ));
1615
1716$ url = Common::relativeUrlToAbsolute ("/packet/ " . urlencode ($ object_id ));
@@ -22,7 +21,11 @@ if ($object) {
2221
2322 $ packet_id = $ object ->getPacketId (true );
2423 $ title = htmlspecialchars ($ object ->getPacketDirectionTag (), ENT_HTML5 , "UTF-8 " )
25- . " " . $ packet_id . " " . $ title ;
24+ . " " . $ packet_id . " "
25+ . htmlspecialchars ($ object ->getPacketName (), ENT_HTML5 , "UTF-8 " );
26+ $ description = Common::stripUpTo (trim (filter_var (
27+ $ object ->getPacketRemarks (true ), FILTER_SANITIZE_STRING
28+ )), "\n" , 300 );
2629} else {
2730 $ this ->opengraph ->attach (new Pair ("url " , "/packet/ " . urlencode ($ object_id )));
2831}
@@ -35,7 +38,7 @@ require("./header.inc.phtml");
3538 <a href="https://plus.google.com/share?url=<?php echo urlencode ($ url ); ?> " rel="external" data-popup="1"><img class="social-btn float-right" src="<?php echo Common::relativeUrlToAbsolute ("/a/social-gplus-24px.png " ); ?> "/></a>
3639 <a href="https://twitter.com/share?text=<?php echo urlencode ($ packet_id . " " . $ object ->getPacketName ()); ?> &url=<?php echo urlencode ($ url ); ?> " rel="external" data-popup="1"><img class="social-btn float-right" src="<?php echo Common::relativeUrlToAbsolute ("/a/social-twitter-24px.png " ); ?> "/></a>
3740 <a href="https://facebook.com/sharer/sharer.php?u=<?php echo urlencode ($ url ); ?> " rel="external" data-popup="1"><img class="social-btn float-right" src="<?php echo Common::relativeUrlToAbsolute ("/a/social-facebook-24px.png " ); ?> "/></a>
38- <header><a href="<?php echo $ url ; ?> "><?php echo htmlspecialchars ( $ packet_id . " " . $ object -> getPacketName (), ENT_HTML5 , " UTF-8 " ) ; ?> </a></header>
41+ <header><a href="<?php echo $ url ; ?> "><?php echo $ title ; ?> </a></header>
3942 <section>
4043 <table class="info"><tbody>
4144 <tr><th style="width:20%;">Message Id:</th><td><?php echo $ packet_id ; ?> </td></tr>
0 commit comments