Browse Source

Merge branch '1.10.x' of github.com:chamilo/chamilo-lms into 1.10.x

Yannick Warnier 10 years ago
parent
commit
dc275d0896

+ 1 - 1
main/dropbox/dropbox_class.inc.php

@@ -102,7 +102,7 @@ class Dropbox_Work
         $this->filesize = $filesize;
         $this->title = $title;
         $this->description = $description;
-        $this->author = api_get_person_name($_user['firstName'], $_user['lastName']);
+        $this->author = $author;
         $this->last_upload_date = api_get_utc_datetime();
         $course_id = api_get_course_int_id();
 

+ 1 - 0
main/inc/conf/mail.conf.dist.php

@@ -16,3 +16,4 @@ $platform_email['SMTP_AUTH']         = 0;
 $platform_email['SMTP_USER']         = '';
 $platform_email['SMTP_PASS']         = '';
 $platform_email['SMTP_CHARSET']      = api_get_system_encoding();
+$platform_email['SMTP_UNIQUE_SENDER']= 0; // to send all mails from the same user

+ 5 - 1
main/inc/lib/api.lib.php

@@ -7897,7 +7897,11 @@ function api_mail_html(
         $mail->Sender = $extra_headers['reply_to']['mail'];
         unset($extra_headers['reply_to']);
     }
-
+    //If the SMTP configuration only accept one sender
+    if ($platform_email['SMTP_UNIQUE_SENDER']) {
+        $senderName = $platform_email['SMTP_FROM_NAME'];
+        $senderEmail = $platform_email['SMTP_FROM_EMAIL'];
+    } 
     $mail->SetFrom($senderEmail, $senderName);
 
     $mail->Subject = $subject;