svn: /web/doc-editor/trunk/ php/AccountManager.php scripts/cron/check_build.php

[email protected] (Yannick Torres)
Newsgroups php.doc.web
Message-ID <[email protected]>
yannick                                  Fri, 18 Dec 2009 23:37:08 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=292301

Log:
Fix Bug spotted by Philip on email method ; Fix bug introduice with last change on configuration option

Changed paths:
    U   web/doc-editor/trunk/php/AccountManager.php
    U   web/doc-editor/trunk/scripts/cron/check_build.php

Modified: web/doc-editor/trunk/php/AccountManager.php
===================================================================
--- web/doc-editor/trunk/php/AccountManager.php	2009-12-18 22:32:15 UTC (rev 292300)
+++ web/doc-editor/trunk/php/AccountManager.php	2009-12-18 23:37:08 UTC (rev 292301)
@@ -219,8 +219,8 @@
         }

         // In session
-        $this->userConf[$item] = $value;
-        $_SESSION['userConf'][$item] = $value;
+        $this->userConf->$item = $value;
+        $_SESSION['userConf']->$item = $value;
         $db = DBConnection::getInstance();

         // In DB
@@ -258,10 +258,13 @@
      * @param $to The Receiver.
      * @param $subject The subject of the email.
      * @param $msg The content of the email. Don't use HTML here ; only plain text.
+     * @param $from The email we place into From header.
      */
-    public function email($to, $subject, $msg)
+    public function email($to, $subject, $msg, $from='')
     {
-        $headers = 'From: '.$this->vcsLogin.'@php.net' . "\r\n" .
+        if( $from != 'www' ) $from = $this->vcsLogin;
+
+        $headers = 'From: '.$from.'@php.net' . "\r\n" .
                    'X-Mailer: PhpDocumentation Online Editor' ."\r\n" .
                    'Content-Type: text/plain; charset="utf-8"'."\n";


Modified: web/doc-editor/trunk/scripts/cron/check_build.php
===================================================================
--- web/doc-editor/trunk/scripts/cron/check_build.php	2009-12-18 22:32:15 UTC (rev 292300)
+++ web/doc-editor/trunk/scripts/cron/check_build.php	2009-12-18 23:37:08 UTC (rev 292301)
@@ -42,7 +42,7 @@
         $subject = "[DOC-".strtoupper($lang)."] - Your documentation is broken";

         // We send an email for this failed build
-        AccountManager::getInstance()->email($to, $subject, $msg);
+        AccountManager::getInstance()->email($to, $subject, $msg, 'www');

         // We store it into DB
         LogManager::getInstance()->saveFailedBuild($lang, $return["logContent"]);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.