Move 'isvalid_email' into platal.inc.php
[platal.git] / include / banana / hooks.inc.php
index 4c92e09..b74933c 100644 (file)
@@ -28,7 +28,7 @@ function hook_formatDisplayHeader($_header, $_text, $in_spool = false)
         $addresses = preg_split("/ *, */", $_text);
         $text = '';
         foreach ($addresses as $address) {
-            $address = BananaMessage::formatFrom(trim($address));
+            $address = BananaMessage::formatFrom(trim($address), Banana::$message->getHeaderValue('subject'));
             if ($_header == 'from') {
                 if ($id = Banana::$message->getHeaderValue('x-org-id')) {
                     return $address . ' <a href="profile/' . $id . '" class="popup2" title="' . $id . '">'
@@ -113,7 +113,8 @@ function hook_platalMessageLink($params)
 
 function hook_makeImg($img, $alt, $height, $width)
 {
-    $url = 'images/banana/' . $img;
+    global $globals;
+    $url = $globals->baseurl . '/images/banana/' . $img;
 
     if (!is_null($width)) {
         $width = ' width="' . $width . '"';
@@ -167,6 +168,13 @@ function hook_makeLink($params)
 }
 }
 
+function hook_makeJs($src)
+{
+    global $page;
+    $page->addJsLink("$src.js");
+    return ' ';
+}
+
 function get_banana_params(array &$get, $group = null, $action = null, $artid = null)
 {
     if (!is_null($group)) {