more guid stuff
This commit is contained in:
parent
c975503292
commit
01c69d5291
6 changed files with 33 additions and 33 deletions
|
|
@ -13,16 +13,17 @@ package WebGUI::Operation::MetaData;
|
|||
use Exporter;
|
||||
use strict;
|
||||
use Tie::IxHash;
|
||||
use WebGUI::Icon;
|
||||
use WebGUI::Id;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::MetaData;
|
||||
use WebGUI::Operation::Shared;
|
||||
use WebGUI::Privilege;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
use WebGUI::URL;
|
||||
use WebGUI::Utility;
|
||||
use WebGUI::Operation::Shared;
|
||||
use WebGUI::Icon;
|
||||
use WebGUI::Privilege;
|
||||
use WebGUI::SQL;
|
||||
use WebGUI::MetaData;
|
||||
|
||||
our @ISA = qw(Exporter);
|
||||
our @EXPORT = qw(&www_editMetaDataField &www_manageMetaData &www_editMetaDataFieldSave &www_deleteMetaDataField
|
||||
|
|
@ -109,7 +110,7 @@ sub www_editMetaDataFieldSave {
|
|||
. www_editMetaDataField();
|
||||
}
|
||||
if($session{form}{fid} eq 'new') {
|
||||
$session{form}{fid} = getNextId("metaData_fieldId");
|
||||
$session{form}{fid} = WebGUI::Id::generate();
|
||||
WebGUI::SQL->write("insert into metaData_properties (fieldId, fieldName, defaultValue, description, fieldType, possibleValues) values (".
|
||||
quote($session{form}{fid}).",".
|
||||
quote($session{form}{fieldName}).",".
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ use WebGUI::ErrorHandler;
|
|||
use WebGUI::Grouping;
|
||||
use WebGUI::HTMLForm;
|
||||
use WebGUI::Icon;
|
||||
use WebGUI::Id;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::Navigation;
|
||||
|
|
@ -60,9 +61,9 @@ sub www_copyNavigation {
|
|||
WebGUI::SQL->write("insert into Navigation (navigationId, identifier, depth, method, startAt, stopAtLevel,
|
||||
templateId, showSystemPages, showHiddenPages, showUnprivilegedPages,
|
||||
reverse)
|
||||
values (".getNextId("navigationId").",
|
||||
".quote('Copy of '.$navigation{identifier}).", $navigation{depth}, ".quote($navigation{method}).
|
||||
", ".quote($navigation{startAt}).", $navigation{stopAtLevel}, $navigation{templateId},
|
||||
values (".WebGUI::Id::generate().",
|
||||
".quote($navigation{identifier}.' (copy)').", $navigation{depth}, ".quote($navigation{method}).
|
||||
", ".quote($navigation{startAt}).", $navigation{stopAtLevel}, ".quote($navigation{templateId}).",
|
||||
$navigation{showSystemPages}, $navigation{showHiddenPages},$navigation{showUnprivilegedPages},
|
||||
$navigation{reverse})");
|
||||
return www_listNavigation();
|
||||
|
|
@ -90,7 +91,7 @@ sub www_deleteNavigationConfirm {
|
|||
if ($session{form}{navigationId} < 1000 && $session{form}{navigationId} > 0) {
|
||||
return WebGUI::Privilege::vitalComponent();
|
||||
}
|
||||
WebGUI::SQL->write("delete from Navigation where navigationId = $session{form}{navigationId}");
|
||||
WebGUI::SQL->write("delete from Navigation where navigationId = ".quote($session{form}{navigationId}));
|
||||
|
||||
# Also delete cache
|
||||
WebGUI::Page->recacheNavigation;
|
||||
|
|
@ -258,22 +259,22 @@ sub www_editNavigationSave {
|
|||
return WebGUI::International::get(33,'Navigation').www_editNavigation();
|
||||
}
|
||||
if ($session{form}{navigationId} eq "new") {
|
||||
$session{form}{navigationId} = getNextId("navigationId");
|
||||
$session{form}{navigationId} = WebGUI::Id::generate();
|
||||
WebGUI::SQL->write("insert into Navigation (navigationId, identifier)
|
||||
values ($session{form}{navigationId}, ".quote($session{form}{identifier}).")");
|
||||
values (".quote($session{form}{navigationId}).", ".quote($session{form}{identifier}).")");
|
||||
}
|
||||
$session{form}{startAt} = $session{form}{startAt_new} || $session{form}{startAt}; # Combo field
|
||||
WebGUI::SQL->write("update Navigation set depth = $session{form}{depth},
|
||||
method = ".quote($session{form}{method}).",
|
||||
startAt = ".quote($session{form}{startAt}).",
|
||||
stopAtLevel = ".quote($session{form}{stopAtLevel}).",
|
||||
templateId = $session{form}{templateId},
|
||||
templateId = ".quote($session{form}{templateId}).",
|
||||
showSystemPages = $session{form}{showSystemPages},
|
||||
showHiddenPages = $session{form}{showHiddenPages},
|
||||
showUnprivilegedPages = $session{form}{showUnprivilegedPages},
|
||||
identifier = ".quote($session{form}{identifier}).",
|
||||
reverse = ".quote($session{form}{'reverse'})."
|
||||
where navigationId = $session{form}{navigationId}");
|
||||
where navigationId = ".quote($session{form}{navigationId}));
|
||||
# Delete from cache
|
||||
|
||||
WebGUI::Page->recacheNavigation;
|
||||
|
|
|
|||
|
|
@ -92,14 +92,14 @@ sub www_deleteTemplateConfirm {
|
|||
return WebGUI::Privilege::vitalComponent();
|
||||
} elsif (WebGUI::Grouping::isInGroup(8)) {
|
||||
if ($session{form}{namespace} eq "Page") {
|
||||
$a = WebGUI::SQL->read("select * from page where templateId=".$session{form}{tid});
|
||||
$a = WebGUI::SQL->read("select * from page where templateId=".quote($session{form}{tid}));
|
||||
while (($pageId) = $a->array) {
|
||||
WebGUI::SQL->write("update wobject set templatePosition=1 where pageId=$pageId");
|
||||
WebGUI::SQL->write("update wobject set templatePosition=1 where pageId=".quote($pageId));
|
||||
}
|
||||
$a->finish;
|
||||
WebGUI::SQL->write("update page set templateId=2 where templateId=".$session{form}{tid});
|
||||
WebGUI::SQL->write("update page set templateId=2 where templateId=".quote($session{form}{tid}));
|
||||
}
|
||||
WebGUI::SQL->write("delete from template where templateId=".$session{form}{tid}
|
||||
WebGUI::SQL->write("delete from template where templateId=".quote($session{form}{tid})
|
||||
." and namespace=".quote($session{form}{namespace}));
|
||||
return www_listTemplates();
|
||||
} else {
|
||||
|
|
@ -120,7 +120,7 @@ sub www_editTemplate {
|
|||
$template{template} = "<h1><tmpl_var title></h1>\n\n";
|
||||
}
|
||||
} else {
|
||||
%template = WebGUI::SQL->quickHash("select * from template where templateId=$session{form}{tid} and
|
||||
%template = WebGUI::SQL->quickHash("select * from template where templateId=".quote($session{form}{tid})." and
|
||||
namespace=".quote($session{form}{namespace}));
|
||||
}
|
||||
$output .= helpIcon("template add/edit");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue