]> git.mxchange.org Git - friendica.git/blobdiff - include/email.php
modified: view/theme/smoothly/style.css
[friendica.git] / include / email.php
old mode 100755 (executable)
new mode 100644 (file)
index 43f04d7..46feb45
@@ -48,15 +48,15 @@ function construct_mailbox_name($mailacct) {
 
 
 function email_msg_meta($mbox,$uid) {
-       $ret = (($mbox && $uid) ? @imap_fetch_overview($mbox,$uid,FT_UID) : array(array()));
-       return ((count($ret)) ? $ret[0] : array());
+       $ret = (($mbox && $uid) ? @imap_fetch_overview($mbox,$uid,FT_UID) : array(array())); // POSSIBLE CLEANUP --> array(array()) is probably redundant now
+       return ((count($ret)) ? $ret : array());
 }
 
 function email_msg_headers($mbox,$uid) {
        $raw_header = (($mbox && $uid) ? @imap_fetchheader($mbox,$uid,FT_UID) : '');
        $raw_header = str_replace("\r",'',$raw_header);
        $ret = array();
-       $h = split("\n",$raw_header);
+       $h = explode("\n",$raw_header);
        if(count($h))
        foreach($h as $line ) {
            if (preg_match("/^[a-zA-Z]/", $line)) {
@@ -250,7 +250,7 @@ function email_header_encode($in_str, $charset) {
 
         // remove trailing spacer and
         // add start and end delimiters
-        $spacer = preg_quote($spacer);
+        $spacer = preg_quote($spacer,'/');
         $out_str = preg_replace("/" . $spacer . "$/", "", $out_str);
         $out_str = $start . $out_str . $end;
     }