Open GoogleCodeExporter opened 9 years ago
Thank you for your suggestion.
Can you provide your modifications so that I can add it in the next release.
Thanks
Original comment by nils.cpa...@gmail.com
on 15 Dec 2011 at 9:47
In the file items.queries.php, under the section which begins with:
/*
* CASE
* update an ITEM
*/
case "update_item":
I added the following lines (basically copying the same code you added already
in the create new item section above):
I added this code immediately following the lines:
//Update CACHE table
UpdateCacheTable("update_value", $data_received['id']);
// This whole section added by Reuv
//Announce by email?
if ( $data_received['annonce'] == 1 ){
require_once("../includes/libraries/phpmailer/class.phpmailer.php");
//envoyer email
$destinataire= explode(';',$data_received['diffusion']);
foreach($destinataire as $mail_destinataire){
//envoyer ay destinataire
$mail = new PHPMailer();
$mail->SetLanguage("en","../includes/libraries/phpmailer/language");
$mail->IsSMTP(); // send via SMTP
$mail->Host = $smtp_server; // SMTP servers
$mail->SMTPAuth = $smtp_auth; // turn on SMTP authentication
$mail->Username = $smtp_auth_username; // SMTP username
$mail->Password = $smtp_auth_password; // SMTP password
$mail->From = $email_from;
$mail->FromName = $email_from_name;
$mail->AddAddress($mail_destinataire); //Destinataire
$mail->WordWrap = 80; // set word wrap
$mail->IsHTML(true); // send as HTML
$mail->Subject = $txt['email_itemedit_subject'];
$mail->AltBody = $txt['email_altbody_1']." ".mysql_real_escape_string(stripslashes(($_POST['label'])))." ".$txt['email_altbody_2'];
$corpsDeMail = $txt['email_body_1'].mysql_real_escape_string(stripslashes(($_POST['label']))).$txt['email_body_2'].
$_SESSION['settings']['cpassman_url']."/index.php?page=items&group=".$_POST['categorie']."&id=".$new_id.$txt['email_body_3'];
$mail->Body = $corpsDeMail;
$mail->Send();
}
}
// End of section added by Reuv
Finally, I added this piece into the languages files (I'm using english so I
put it there):
$txt['email_itemedit_subject'] = "A password has been modified in TeamPass";
Obviously, the text there could be changed to whatever works for you. :-)
Keep up the good work,
Reuv
Original comment by r0bertc...@gmail.com
on 18 Dec 2011 at 7:16
Code modification (error pointed out by my colleague):
$_SESSION['settings']['cpassman_url']."/index.php?page=items&group=".$data_recei
ved['categorie']."&id=".$data_received['id'].$txt['email_body_3'];
The above replaces the similar line in the code above which wasn't working
properly.
Reuv
Original comment by r0bertc...@gmail.com
on 19 Dec 2011 at 1:02
Original issue reported on code.google.com by
r0bertc...@gmail.com
on 15 Dec 2011 at 9:06