]> git.mxchange.org Git - friendica.git/commitdiff
Mailimport is now realized like a wall-to-wall-post
authorMichael Vogel <icarus@dabo.de>
Wed, 19 Dec 2012 14:58:38 +0000 (15:58 +0100)
committerMichael Vogel <icarus@dabo.de>
Wed, 19 Dec 2012 14:58:38 +0000 (15:58 +0100)
include/items.php
include/onepoll.php
view/theme/vier/style.css

index 5bd4423cfadc8a318552af0b0e3f84ef9ad6f2a4..b5e6062b23f7c55eebf6ffdc1aab09a84b348eff 100755 (executable)
@@ -806,7 +806,7 @@ function get_atom_elements($feed,$item) {
                $avatar = $avatar["href"];
 
                if (($name != "") and ($uri != "") and ($avatar != "") and ($message != "")) {
-                       logger('get_atom_elements: fixing sender of repeated message. '.print_r($child, true));
+                       logger('get_atom_elements: fixing sender of repeated message.');
 
                        /*$res["owner-name"] = $res["author-name"];
                        $res["owner-link"] = $res["author-link"];
index 7b2eba70d1c9322be5b06cacef0e388b49dadba9..2abd41b7898d9bb14669f72ac604d0e11b15f067 100644 (file)
@@ -437,7 +437,29 @@ function onepoll_run(&$argv, &$argc){
                                                                else
                                                                        $fromdecoded .= $frompart->text;
 
-                                                       $datarray['body'] = "[b]".t('From: ') . escape_tags($fromdecoded) . "[/b]\n\n" . $datarray['body'];
+                                                       $fromarr = imap_rfc822_parse_adrlist($fromdecoded, $a->get_hostname());
+
+                                                       $frommail = $fromarr[0]->mailbox."@".$fromarr[0]->host;
+
+                                                       if (isset($fromarr[0]->personal))
+                                                               $fromname = $fromarr[0]->personal;
+                                                       else
+                                                               $fromname = $frommail;
+
+                                                       //$datarray['body'] = "[b]".t('From: ') . escape_tags($fromdecoded) . "[/b]\n\n" . $datarray['body'];
+
+                                                       $datarray['author-name'] = $fromname;
+                                                       $datarray['author-link'] = "mailto:".$frommail;
+                                                       $datarray['author-avatar'] = $contact['photo'];
+
+                                                       $datarray['owner-name'] = $contact['name'];
+                                                       $datarray['owner-link'] = "mailto:".$contact['addr'];
+                                                       $datarray['owner-avatar'] = $contact['photo'];
+
+                                               } else {
+                                                       $datarray['author-name'] = $contact['name'];
+                                                       $datarray['author-link'] = 'mailbox';
+                                                       $datarray['author-avatar'] = $contact['photo'];
                                                }
 
                                                $datarray['uid'] = $importer_uid;
@@ -448,9 +470,6 @@ function onepoll_run(&$argv, &$argc){
                                                        $datarray['private'] = 1;
                                                        $datarray['allow_cid'] = '<' . $contact['id'] . '>';
                                                }
-                                               $datarray['author-name'] = $contact['name'];
-                                               $datarray['author-link'] = 'mailbox';
-                                               $datarray['author-avatar'] = $contact['photo'];
 
                                                $stored_item = item_store($datarray);
                                                q("UPDATE `item` SET `last-child` = 0 WHERE `parent-uri` = '%s' AND `uid` = %d",
index 91680f41cb8661071a915364e92048af805f726c..b6aaae51d56c2f1657854ca1485506c55610c37d 100644 (file)
        cursor: url('lock.cur'), pointer;
 }
 
+#birthday-title, #event-title {
+  font-weight: bold;
+  margin-bottom: 5px;
+}
 
 div.pager, .birthday-notice {
   text-align: center;