Fixed editing bug.
This commit is contained in:
parent
929056065f
commit
960e377bf2
1 changed files with 7 additions and 3 deletions
|
|
@ -130,9 +130,13 @@ sub www_editTemplate {
|
||||||
sub www_editTemplateSave {
|
sub www_editTemplateSave {
|
||||||
if (WebGUI::Privilege::isInGroup($session{setting}{templateManagersGroup})) {
|
if (WebGUI::Privilege::isInGroup($session{setting}{templateManagersGroup})) {
|
||||||
if ($session{form}{tid} eq "new") {
|
if ($session{form}{tid} eq "new") {
|
||||||
($session{form}{tid}) = WebGUI::SQL->quickArray("select max(internationalId)
|
($session{form}{tid}) = WebGUI::SQL->quickArray("select max(templateId)
|
||||||
from international where namespace=".quote($session{form}{namespace}));
|
from template where namespace=".quote($session{form}{namespace}));
|
||||||
$session{form}{tid}++;
|
if ($session{form}{tid} > 999) {
|
||||||
|
$session{form}{tid}++;
|
||||||
|
} else {
|
||||||
|
$session{form}{tid} = 1000;
|
||||||
|
}
|
||||||
WebGUI::SQL->write("insert into template (templateId,namespace) values
|
WebGUI::SQL->write("insert into template (templateId,namespace) values
|
||||||
($session{form}{tid}, ".quote($session{form}{namespace}).")");
|
($session{form}{tid}, ".quote($session{form}{namespace}).")");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue