Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

554
 
757
 
757
 
email.php
_> 11 <?php
  22 /*
<> 3 -  $Id: email.php 554 2006-04-29 16:26:53Z hpdl $
   3+  $Id: email.php 757 2006-08-23 12:22:54Z hpdl $
44 
  55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
     
 !
7272 
  7373       reset($headers);
  7474       while (list(,$value) = each($headers)) {
<> 75 -        if (tep_not_null($value)) {
   75+        if (!empty($value)) {
7676           $this->headers[] = $value;
  7777         }
  7878       }
     
 !
128128         }
  129129       }
  130130 
<> 131 -      if (tep_not_null($html_images)) {
   131+      if (!empty($html_images)) {
132132 // If duplicate images are embedded, they may show up as attachments, so remove them.
  133133         $html_images = array_unique($html_images);
  134134         sort($html_images);
     
 !
148148  */
  149149 
  150150     function add_text($text = '') {
<> 151 -      $this->text = tep_convert_linefeeds(array("\r\n", "\n", "\r"), $this->lf, $text);
   151+      $this->text = str_replace(array("\r\n", "\n", "\r"), $this->lf, $text);
152152     }
  153153 
  154154 /**
     
 !
158158  */
  159159 
  160160     function add_html($html, $text = NULL, $images_dir = NULL) {
<> 161 -      $this->html = tep_convert_linefeeds(array("\r\n", "\n", "\r"), '<br />', $html);
  162 -      $this->html_text = tep_convert_linefeeds(array("\r\n", "\n", "\r"), $this->lf, $text);
   161+      $this->html = str_replace(array("\r\n", "\n", "\r"), '<br />', $html);
   162+      $this->html_text = str_replace(array("\r\n", "\n", "\r"), $this->lf, $text);
163163 
  164164       if (isset($images_dir)) $this->find_html_images($images_dir);
  165165     }
     
 !
330330         }
  331331       }
  332332 
<> 333 -      if (tep_not_null($this->html_images)) {
   333+      if (!empty($this->html_images)) {
334334         reset($this->html_images);
  335335         while (list(,$value) = each($this->html_images)) {
  336336           $this->html = str_replace($value['name'], 'cid:' . $value['cid'], $this->html);
  337337         }
  338338       }
  339339 
  340340       $null = NULL;
<> 341 -      $attachments = ((tep_not_null($this->attachments)) ? true : false);
  342 -      $html_images = ((tep_not_null($this->html_images)) ? true : false);
  343 -      $html = ((tep_not_null($this->html)) ? true : false);
  344 -      $text = ((tep_not_null($this->text)) ? true : false);
   341+      $attachments = ((!empty($this->attachments)) ? true : false);
   342+      $html_images = ((!empty($this->html_images)) ? true : false);
   343+      $html = ((!empty($this->html)) ? true : false);
   344+      $text = ((!empty($this->text)) ? true : false);
345345 
  346346       switch (true) {
  347347         case (($text == true) && ($attachments == false)):
     
 !
369369           }
  370370           break;
  371371         case (($html == true) && ($attachments == false) && ($html_images == false)):
<> 372 -          if (tep_not_null($this->html_text)) {
   372+          if (!empty($this->html_text)) {
373373 /* HPDL PHP3 */
  374374 //            $message =& $this->add_alternative_part($null);
  375375             $message = $this->add_alternative_part($null);
     
 !
382382           }
  383383           break;
  384384         case (($html == true) && ($attachments == false) && ($html_images == true)):
<> 385 -          if (tep_not_null($this->html_text)) {
   385+          if (!empty($this->html_text)) {
386386 /* HPDL PHP3 */
  387387 //            $message =& $this->add_alternative_part($null);
  388388             $message = $this->add_alternative_part($null);
     
 !
407407 /* HPDL PHP3 */
  408408 //          $message =& $this->add_mixed_part();
  409409           $message = $this->add_mixed_part();
<> 410 -          if (tep_not_null($this->html_text)) {
   410+          if (!empty($this->html_text)) {
411411 /* HPDL PHP3 */
  412412 //            $alt =& $this->add_alternative_part($message);
  413413             $alt = $this->add_alternative_part($message);
     
 !
426426 //          $message =& $this->add_mixed_part();
  427427           $message = $this->add_mixed_part();
  428428 
<> 429 -          if (tep_not_null($this->html_text)) {
   429+          if (!empty($this->html_text)) {
<_ 430430 /* HPDL PHP3 */
  431431 //            $alt =& $this->add_alternative_part($message);
  432432             $alt = $this->add_alternative_part($message);