HomeHelpTrac

Changeset 10410


Ignore:
Timestamp:
05/05/09 01:32:44 (3 years ago)
Author:
Leonid Sokushev
Message:

Changed notify procedure and fix error with EmailNotify

Location:
tags/6.1.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tags/6.1.5/inc/match.inc.php

    r10242 r10410  
    6262    } 
    6363 
    64     $sAllProfSQL = "SELECT DISTINCT `Profiles`.* FROM `Profiles` WHERE `Status`='Active' AND (`Couple`='0' OR `Couple`>`ID`)"; 
     64    $sAllProfSQL = "SELECT DISTINCT `ID`, `NickName`, `Email`, 'HTML' as `EmailFlag` FROM `Profiles` WHERE `Status`='Active' AND (`Couple`='0' OR `Couple`>`ID`) AND `EmailNotify`='1'"; 
    6565    $vAllProf = db_res($sAllProfSQL); 
    6666    while ($aAnyProf = mysql_fetch_array($vAllProf)) { 
     
    9494    $message    = addslashes($message); 
    9595 
    96     if ('Text' == $aAnyProf['EmailFlag']) { 
    97         $message = html2txt($message); 
    98     } 
    99     if ('HTML' == $aAnyProf['EmailFlag']) { 
     96     
     97    if ('HTML' == $aAnyProf['EmailFlag']) 
    10098        $headers = "MIME-Version: 1.0\r\n" . "Content-type: text/html; charset=UTF-8\r\n" . $headers; 
    101     } 
     99    else 
     100        $message = html2txt($message); 
    102101 
    103102    $sql = "INSERT INTO `NotifyQueue` SET `Email` = {$aAnyProf['ID']}, Msg = 0, `From` = 'ProfilesMsgText', Creation = NOW(), MsgText = '$message', MsgSubj = '$subject'"; 
  • tags/6.1.5/periodic/notifies.php

    r10242 r10410  
    115115            WHERE 
    116116                NotifyQueue.`From` = 'Profiles' AND 
    117                 Profiles.EmailNotify  = 'NotifyMe' 
     117                Profiles.EmailNotify  = '1' 
    118118            ",0 ); 
    119119         
     
    150150            WHERE 
    151151                NotifyQueue.`From` = 'ProfilesMsgText' AND 
    152                 Profiles.EmailNotify  = 'NotifyMe' 
     152                Profiles.EmailNotify  = '1' 
    153153            ",0); 
    154154         
Note: See TracChangeset for help on using the changeset viewer.