$id, 'PROJECT' => $project, 'FIELD' => $field, 'OLDVALUE' => $oldvalue, 'VALUE' => $value,) as $var => $val) { $body = str_replace('@' . $var . '@', $val, $body); $subject = str_replace('@' . $var . '@', $val, $subject); } $from= $conf['plugin']['dokumicrobugtracker']['email_address']; $to=$email; mail_send($to, $subject, $body, $from, $cc='', $bcc='', $headers=null, $params=null); } } function metaFN2($id,$ext){ global $conf; $id = cleanID($id); $id = str_replace(':','/',$id); $fn = $conf['metadir'].'/'.utf8_encodeFN($id).$ext; return $fn;} $exploded = explode(' ',htmlspecialchars(stripslashes($_POST['row_id']))); $project = $exploded[0]; $id_bug = intval($exploded[1]); // get bugs file contents $pfile = metaFN2(md5($project), '.bugs'); if (@file_exists($pfile)) {$bugs = unserialize(@file_get_contents($pfile));} else {$bugs = array();} $field = strtolower(htmlspecialchars($_POST['field'])); $value = htmlspecialchars(stripslashes($_POST['value'])); if (($field == 'status') || ($field == 'severity') || ($field == 'version') || ($field == 'description')|| ($field == 'resolution') || ($field == 'delete') && (auth_isadmin()==1)) { if ($field == 'delete') {unset($bugs[$id_bug]);echo 'Deleted : ' . $id_bug;} else { emailForChange($bugs[$id_bug]['author'],$id_bug, $project, $field, $bugs[$id_bug][$field], $value); $bugs[$id_bug][$field]=$value; } } // Save bugs file contents $fh = fopen($pfile, 'w'); fwrite($fh, serialize($bugs)); fclose($fh); echo $_POST['value']; ?>