val oldStatus = #status req;
val newStatus = Apt.statusFromInt (Web.stoi ($"status"));
Apt.modify {req with node = node, data = $"pkgs", msg = $"msg", status = newStatus};
- if oldStatus <> newStatus then
- if not (Apt.notifyMod {old = oldStatus, new = newStatus, changer = Init.getUserName(), req = id}) then
- %><h3>Error sending e-mail notification</h3><%
- end
+ if not (Apt.notifyMod {old = oldStatus, new = newStatus, changer = Init.getUserName(), req = id}) then
+ %><h3>Error sending e-mail notification</h3><%
end
%><h3>Request modified</h3>
Back to: <a href="apt?cmd=open">open requests</a>, <a href="apt?cmd=list">all requests</a>
val oldStatus = #status req;
val newStatus = Cert.statusFromInt (Web.stoi ($"status"));
Cert.modify {req with data = $"req", msg = $"msg", status = newStatus};
- if oldStatus <> newStatus then
- if not (Cert.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then
- %><h3>Error sending e-mail notification</h3><%
- end
+ if not (Cert.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then
+ %><h3>Error sending e-mail notification</h3><%
end
%><h3>Request modified</h3>
Back to: <a href="?cmd=open">open requests</a>, <a href="?cmd=list">all requests</a>
val oldStatus = #status req;
val newStatus = Domain.statusFromInt (Web.stoi ($"status"));
Domain.modify {req with data = $"dom", msg = $"msg", status = newStatus};
- if oldStatus <> newStatus then
- if not (Domain.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then
- %><h3>Error sending e-mail notification</h3><%
- end
+ if not (Domain.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then
+ %><h3>Error sending e-mail notification</h3><%
end
%><h3>Request modified</h3>
Back to: <a href="domain?cmd=open">open requests</a>, <a href="domain?cmd=list">all requests</a>
val oldStatus = #status req;
val newStatus = Ip.statusFromInt (Web.stoi ($"status"));
Ip.modify {req with node = node, data = $"port", msg = $"msg", status = newStatus};
- if oldStatus <> newStatus then
- if not (Ip.notifyMod {old = oldStatus, new = newStatus, changer = Init.getUserName(), req = id}) then
- %><h3>Error sending e-mail notification</h3><%
- end
+ if not (Ip.notifyMod {old = oldStatus, new = newStatus, changer = Init.getUserName(), req = id}) then
+ %><h3>Error sending e-mail notification</h3><%
end
%><h3>Request modified</h3>
Back to: <a href="ip?cmd=open">open requests</a>, <a href="ip?cmd=list">all requests</a>
val oldStatus = #status req;
val newStatus = MailingList.statusFromInt (Web.stoi ($"status"));
MailingList.modify {req with data = $"dom", msg = $"msg", status = newStatus};
- if oldStatus <> newStatus then
- if not (MailingList.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then
- %><h3>Error sending e-mail notification</h3><%
- end
+ if not (MailingList.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then
+ %><h3>Error sending e-mail notification</h3><%
end
%><h3>Request modified</h3>
Back to: <a href="list?cmd=open">open requests</a>, <a href="list?cmd=list">all requests</a>
val oldStatus = #status req;
val newStatus = Quota.statusFromInt (Web.stoi ($"status"));
Quota.modify {req with data = $"req", msg = $"msg", status = newStatus};
- if oldStatus <> newStatus then
- if not (Quota.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then
- %><h3>Error sending e-mail notification</h3><%
- end
+ if not (Quota.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then
+ %><h3>Error sending e-mail notification</h3><%
end
%><h3>Request modified</h3>
Back to: <a href="?cmd=open">open requests</a>, <a href="?cmd=list">all requests</a>
| REJECTED => "Rejected"
fun notifyMod (oldStatus, newStatus, changer, req) =
- notify (fn (_, mail) =>
- (Mail.mwrite (mail, changer);
- Mail.mwrite (mail, " has changed the status of this request from ");
- Mail.mwrite (mail, statusToString oldStatus);
- Mail.mwrite (mail, " to ");
- Mail.mwrite (mail, statusToString newStatus);
- Mail.mwrite (mail, ".\n\n"))) req
+ if oldStatus = newStatus then
+ notify (fn (_, mail) =>
+ (Mail.mwrite (mail, changer);
+ Mail.mwrite (mail, " has added a comment to this request.\n\n"))) req
+ else
+ notify (fn (_, mail) =>
+ (Mail.mwrite (mail, changer);
+ Mail.mwrite (mail, " has changed the status of this request from ");
+ Mail.mwrite (mail, statusToString oldStatus);
+ Mail.mwrite (mail, " to ");
+ Mail.mwrite (mail, statusToString newStatus);
+ Mail.mwrite (mail, ".\n\n"))) req
end
| REJECTED => "Rejected"
fun notifyMod {old, new, changer, req} =
- notify (fn (_, mail) =>
+ if old = new then
+ notify (fn (_, mail) =>
(Mail.mwrite (mail, changer);
- Mail.mwrite (mail, " has changed the status of this request from ");
- Mail.mwrite (mail, statusToString old);
- Mail.mwrite (mail, " to ");
- Mail.mwrite (mail, statusToString new);
- Mail.mwrite (mail, ".\n\n"))) req
+ Mail.mwrite (mail, " has added a comment to this request.\n\n"))) req
+ else
+ notify (fn (_, mail) =>
+ (Mail.mwrite (mail, changer);
+ Mail.mwrite (mail, " has changed the status of this request from ");
+ Mail.mwrite (mail, statusToString old);
+ Mail.mwrite (mail, " to ");
+ Mail.mwrite (mail, statusToString new);
+ Mail.mwrite (mail, ".\n\n"))) req
end
val oldStatus = #status req;
val newStatus = Sec.Req.statusFromInt (Web.stoi ($"status"));
Sec.Req.modify {req with node = nodeNum, data = $"req", msg = $"msg", status = newStatus};
- if oldStatus <> newStatus then
- if not (Sec.Req.notifyMod {old = oldStatus, new = newStatus, changer = Init.getUserName(), req = id}) then
- %><h3>Error sending e-mail notification</h3><%
- end
+ if not (Sec.Req.notifyMod {old = oldStatus, new = newStatus, changer = Init.getUserName(), req = id}) then
+ %><h3>Error sending e-mail notification</h3><%
end
%><h3>Request modified</h3>
Back to: <a href="sec?cmd=open">open requests</a>, <a href="sec?cmd=list">all requests</a>
val oldStatus = #status req;
val newStatus = Sign.statusFromInt (Web.stoi ($"status"));
Sign.modify {req with data = $"req", msg = $"msg", status = newStatus};
- if oldStatus <> newStatus then
- if not (Sign.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then
- %><h3>Error sending e-mail notification</h3><%
- end
+ if not (Sign.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then
+ %><h3>Error sending e-mail notification</h3><%
end
%><h3>Request modified</h3>
Back to: <a href="?cmd=open">open requests</a>, <a href="?cmd=list">all requests</a>