]> git.mxchange.org Git - friendica-addons.git/commitdiff
Merge pull request #356 from annando/1606-rendertime-session
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Thu, 23 Jun 2016 18:45:31 +0000 (20:45 +0200)
committerGitHub <noreply@github.com>
Thu, 23 Jun 2016 18:45:31 +0000 (20:45 +0200)
Rendertime: Show the value for session creation

cal/cal.php
wppost/wppost.php

index 38f104628d36e52aa28d05b96eace6fe5c77c8c0..5c2f102191c51afb1bc6cff2a8c6dc756fe9e8f2 100644 (file)
@@ -5,6 +5,7 @@
  * Version: 0.1
  * Author: Tobias Diekershoff <https://f.diekershoff.de/profile/tobias>
  * License: MIT
+ * Status: Unsupported
  * ******************************************************************/
 
 
index 5e197ab65c96b9f00a75597fdea4f348bd9976ef..fc3d3a10acccd1058099181e7619956834426e4b 100755 (executable)
@@ -219,9 +219,10 @@ function wppost_send(&$a,&$b) {
 
                // If the title is empty then try to guess
                if ($wptitle == '') {
-                       // Take the description from the bookmark
-                       if(preg_match("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/is",$b['body'],$matches))
-                               $wptitle = $matches[2];
+                       // Fetch information about the post
+                       $siteinfo = get_attached_data($b["body"]);
+                       if (isset($siteinfo["title"]))
+                               $wptitle = $siteinfo["title"];
 
                        // If no bookmark is found then take the first line
                        if ($wptitle == '') {