summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6ad2bf5)
raw | patch | inline | side by side (parent: 6ad2bf5)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 22 Dec 2006 11:54:44 +0000 (11:54 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 22 Dec 2006 11:54:44 +0000 (11:54 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5461 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/gofon/macro/class_gofonMacro.inc | patch | blob | history |
index 67221de0240a359b73815ea201dcf6ee30927065..abfd539bd11a283ed0c4d49cce4f709273cc04d6 100755 (executable)
}
/* Create query string */
- $context = "macro-".$this->cn;
+ $context = addslashes("macro-".$this->cn);
/* Remove current macro from each server available */
if($save){
foreach($this->goFonHomeServers as $dn => $Server){
- $query = "DELETE FROM ".$Server['EXT_TABLE']." WHERE context= '".$context."';";
+ $query = "DELETE FROM ".$Server['EXT_TABLE']." WHERE context='".$context."';";
$r_current = @mysql_pconnect($Server['SERVER'],$Server['LOGIN'],$Server['PASSWORD']);
$db_current = @mysql_select_db($Server['DB'],$r_current);
$res = @mysql_query($query,$r_current);
* and add this line to an array that will be inserted
* to each database.
*/
- $exten = $tmp[0];
- $prio = $tmp[1];
- $app = preg_replace("/\(.*\).*$/","",$tmp[2]);
- $para = preg_replace("/^.*\(/","",$tmp[2]);
+ $exten = addslashes($tmp[0]);
+ $prio = addslashes($tmp[1]);
+ $app = addslashes(preg_replace("/\(.*\).*$/","",$tmp[2]));
+ $para = addslashes(preg_replace("/^.*\(/","",$tmp[2]));
$para = preg_replace("/\).*$/","",$para);
$sql.= " ('".$context."','".$exten."','".$prio."','".$app."','".$para."'),";
}
/* Try to add entries to databases */
$str = $this->add_to_database(true);
if($str){
- print_a($str);
+ print_red($str);
}else{
/* Write back to ldap */
$ldap= $this->config->get_ldap_link();