I am using Alpha10 and had a problem with Linked triggers. I found that when I had an expression like:
({Racksaver.Linux:http.last(0)}=1)&({Racksaver.Lin ux:http.time(0)}>061500)&({Racksaver.Linux:http.ti me(0)}<054500)
in my template that only the first expression was changed to the new host and came out like:
({Blade01:http.last(0)}=1)&({Racksaver.Linux:http. time(0)}>061500)&({Racksaver.Linux:http.time(0)}<0 54500)
This caused a lot of problems. I was able to fix this by adding the following line into the function add_trigger_to_templates():
$trigger["expression"] = $expression;
It was on line 388 in triggers.inc.php. Here are the lines surrounding it to help:
$sql="update triggers set expression='".$trigger["expression"]."' where triggerid=$tri$
DBexecute($sql);
$expression=str_replace("{".$row2["functionid"]."}","{".$functionid."}",$trigger["expr$
$trigger["expression"] = $expression;
$sql="update triggers set expression='$expression' where triggerid=$triggerid_new";
DBexecute($sql);
This seemed to fix the problem.
({Racksaver.Linux:http.last(0)}=1)&({Racksaver.Lin ux:http.time(0)}>061500)&({Racksaver.Linux:http.ti me(0)}<054500)
in my template that only the first expression was changed to the new host and came out like:
({Blade01:http.last(0)}=1)&({Racksaver.Linux:http. time(0)}>061500)&({Racksaver.Linux:http.time(0)}<0 54500)
This caused a lot of problems. I was able to fix this by adding the following line into the function add_trigger_to_templates():
$trigger["expression"] = $expression;
It was on line 388 in triggers.inc.php. Here are the lines surrounding it to help:
$sql="update triggers set expression='".$trigger["expression"]."' where triggerid=$tri$
DBexecute($sql);
$expression=str_replace("{".$row2["functionid"]."}","{".$functionid."}",$trigger["expr$
$trigger["expression"] = $expression;
$sql="update triggers set expression='$expression' where triggerid=$triggerid_new";
DBexecute($sql);
This seemed to fix the problem.
Comment