more session related changes
This commit is contained in:
parent
1a959e2681
commit
d470a7cdd4
63 changed files with 377 additions and 317 deletions
|
|
@ -237,7 +237,7 @@ sub view {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_deleteEvent {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
my ($output);
|
||||
$output = '<h1>'.WebGUI::International::get(42,"Asset_Event").'</h1>';
|
||||
$output .= WebGUI::International::get(75,"Asset_Event").'<p><blockquote>';
|
||||
|
|
@ -253,7 +253,7 @@ sub www_deleteEvent {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_deleteEventConfirm {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
if (($self->session->form->process("rid") ne "") and ($self->session->form->process("rid") ne "0")) {
|
||||
my $series = $self->getParent->getLineage(["descendants"],{returnObjects=>1});
|
||||
foreach my $event (@{$series}) {
|
||||
|
|
@ -269,7 +269,7 @@ sub www_deleteEventConfirm {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_edit {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("event add/edit","Asset_Event");
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get('13', 'Asset_Event'));
|
||||
}
|
||||
|
|
@ -277,7 +277,7 @@ sub www_edit {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_view {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canView);
|
||||
return $self->session->privilege->insufficient() unless ($self->canView);
|
||||
return $self->session->style->process($self->view,$self->getParent->getValue("styleTemplateId"));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ sub view {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_edit {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
my $tabform = $self->getEditForm;
|
||||
$tabform->getTab("display")->template(
|
||||
-value=>$self->getValue("templateId"),
|
||||
|
|
@ -291,7 +291,7 @@ sub www_edit {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_view {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::noAccess() unless $self->canView;
|
||||
return $self->session->privilege->noAccess() unless $self->canView;
|
||||
if ($self->session->var->get("adminOn")) {
|
||||
return $self->getContainer->www_view;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ sub view {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_edit {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->addSubmenuItem($self->getUrl('func=resize'),WebGUI::International::get("resize image","Asset_Image")) if ($self->get("filename"));
|
||||
my $tabform = $self->getEditForm;
|
||||
$tabform->getTab("display")->template(
|
||||
|
|
@ -241,7 +241,7 @@ sub www_edit {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_resize {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
if ($self->session->form->process("newWidth") || $self->session->form->process("newHeight")) {
|
||||
$self->getStorageLocation->resize($self->get("filename"),$self->session->form->process("newWidth"),$self->session->form->process("newHeight"));
|
||||
$self->setSize($self->getStorageLocation->getFileSize($self->get("filename")));
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ Web facing method which is the default edit page
|
|||
|
||||
sub www_edit {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("zip archive add/edit", "Asset_ZipArchive");
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,
|
||||
WebGUI::International::get('zip archive add/edit title',"Asset_ZipArchive"));
|
||||
|
|
@ -299,7 +299,7 @@ Web facing method which is the default view page. This method does a
|
|||
|
||||
sub www_view {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::noAccess() unless $self->canView;
|
||||
return $self->session->privilege->noAccess() unless $self->canView;
|
||||
if (WebGUI::Session::isAdminOn()) {
|
||||
return $self->getContainer->www_view;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -975,7 +975,7 @@ sub www_edit {
|
|||
$title = $self->session->form->process("title");
|
||||
if ($self->session->form->process("class") eq "WebGUI::Asset::Post") { # new reply
|
||||
$self->{_thread} = $self->getParent->getThread;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->getThread->canReply);
|
||||
return $self->session->privilege->insufficient() unless ($self->getThread->canReply);
|
||||
$var{isReply} = 1;
|
||||
$var{'reply.title'} = $self->getParent->get("title");
|
||||
$var{'reply.synopsis'} = $self->getParent->get("synopsis");
|
||||
|
|
@ -993,7 +993,7 @@ sub www_edit {
|
|||
value=>$self->session->form->process("subscribe")
|
||||
});
|
||||
} elsif ($self->session->form->process("class") eq "WebGUI::Asset::Post::Thread") { # new thread
|
||||
return WebGUI::Privilege::insufficient() unless ($self->getThread->getParent->canPost);
|
||||
return $self->session->privilege->insufficient() unless ($self->getThread->getParent->canPost);
|
||||
$var{isNewThread} = 1;
|
||||
if ($self->getThread->getParent->canModerate) {
|
||||
$var{'sticky.form'} = WebGUI::Form::yesNo({
|
||||
|
|
@ -1012,7 +1012,7 @@ sub www_edit {
|
|||
}
|
||||
$content .= "\n\n".$self->session->user->profileField("signature") if ($self->session->user->profileField("signature") && !$self->session->form->process("content"));
|
||||
} else { # edit
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$var{'form.header'} = WebGUI::Form::formHeader({action=>$self->getUrl})
|
||||
.WebGUI::Form::hidden({
|
||||
name=>"func",
|
||||
|
|
|
|||
|
|
@ -790,7 +790,7 @@ sub www_unsubscribe {
|
|||
sub www_view {
|
||||
my $self = shift;
|
||||
my $postId = shift;
|
||||
return WebGUI::Privilege::noAccess() unless $self->canView;
|
||||
return $self->session->privilege->noAccess() unless $self->canView;
|
||||
my $cache;
|
||||
my $output;
|
||||
my $useCache = (
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ sub getEditForm {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_edit {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("redirect add/edit", "Asset_Redirect");
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get('redirect add/edit title', 'Asset_Redirect'));
|
||||
}
|
||||
|
|
@ -116,7 +116,7 @@ A web executable method that redirects the user to the specified page, or displa
|
|||
|
||||
sub www_view {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::noAccess() unless $self->canView;
|
||||
return $self->session->privilege->noAccess() unless $self->canView;
|
||||
if ($self->session->var->isAdminOn() && $self->canEdit) {
|
||||
my $i18n = WebGUI::International->new("Asset_Redirect");
|
||||
return $self->getAdminConsole->render($i18n->get("what do you want to do with this redirect").'
|
||||
|
|
|
|||
|
|
@ -496,7 +496,7 @@ sub view {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_edit {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("rich edit edit config","Asset_RichEdit"));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -626,7 +626,7 @@ sub view {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_edit {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("shortcut add/edit","Asset_Shortcut");
|
||||
$self->getAdminConsole->addSubmenuItem($self->getUrl("func=manageOverrides"),WebGUI::International::get("Manage Shortcut Overrides","Asset_Shortcut"));
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get(2,"Asset_Shortcut"));
|
||||
|
|
@ -676,14 +676,14 @@ sub www_getUserPrefsForm {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_manageOverrides {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
return $self->_submenu($self->getOverridesList,WebGUI::International::get("Manage Shortcut Overrides","Asset_Shortcut"));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_purgeOverrideCache {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
$self->uncacheOverrides;
|
||||
return $self->www_manageOverrides;
|
||||
}
|
||||
|
|
@ -691,7 +691,7 @@ sub www_purgeOverrideCache {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_deleteOverride {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
$self->session->db->write('delete from Shortcut_overrides where assetId='.$self->session->db->quote($self->getId).' and fieldName='.$self->session->db->quote($self->session->form->process("fieldName")));
|
||||
$self->uncacheOverrides;
|
||||
return $self->www_manageOverrides;
|
||||
|
|
@ -731,7 +731,7 @@ sub www_getNewTitle {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_editOverride {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
my $i18n = WebGUI::International->new("Asset_Shortcut");
|
||||
my $fieldName = $self->session->form->process("fieldName");
|
||||
my %overrides = $self->getOverrides;
|
||||
|
|
@ -772,7 +772,7 @@ sub www_editOverride {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_saveOverride {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
my $fieldName = $self->session->form->process("overrideFieldName");
|
||||
my %overrides = $self->getOverrides;
|
||||
my $output = '';
|
||||
|
|
@ -793,7 +793,7 @@ sub www_saveOverride {
|
|||
sub www_view {
|
||||
my $self = shift;
|
||||
if ($self->isDashlet) {
|
||||
return WebGUI::Privilege::noAccess() unless $self->canView;
|
||||
return $self->session->privilege->noAccess() unless $self->canView;
|
||||
$self->session->asset = $self->getParent;
|
||||
return $self->session->asset->www_view;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ sub view {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_edit {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("snippet add/edit","Asset_Snippet");
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get('snippet add/edit title',"Asset_Snippet"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ sub view {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_edit {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("template add/edit","Asset_Template");
|
||||
$self->getAdminConsole->addSubmenuItem($self->getUrl('func=styleWizard'),WebGUI::International::get("style wizard","Asset_Template")) if ($self->get("namespace") eq "style");
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get('edit template', 'Asset_Template'));
|
||||
|
|
@ -354,7 +354,7 @@ sub www_manage {
|
|||
|
||||
sub www_styleWizard {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
my $output = "";
|
||||
if ($self->session->form->process("step") == 2) {
|
||||
my $f = WebGUI::HTMLForm->new({action=>$self->getUrl});
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ A comparison expression to be used when checking whether the action should be al
|
|||
=cut
|
||||
|
||||
sub confirm {
|
||||
return WebGUI::Privilege::vitalComponent() if ($_[4]);
|
||||
return $self->session->privilege->vitalComponent() if ($_[4]);
|
||||
my $noURL = $_[3] || $_[0]->getUrl;
|
||||
my $output = '<h1>'.WebGUI::International::get(42,'Wobject').'</h1>';
|
||||
$output .= $_[1].'<p>';
|
||||
|
|
@ -553,7 +553,7 @@ sub setCollateral {
|
|||
|
||||
sub www_edit {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
my ($tag) = ($self->get("className") =~ /::(\w+)$/);
|
||||
my $tag2 = $tag;
|
||||
$tag =~ s/([a-z])([A-Z])/$1 $2/g; #Separate studly caps
|
||||
|
|
@ -576,7 +576,7 @@ sub www_view {
|
|||
my $disableCache = shift;
|
||||
unless ($self->canView) {
|
||||
if ($self->get("state") eq "published") { # no privileges, make em log in
|
||||
return WebGUI::Privilege::noAccess();
|
||||
return $self->session->privilege->noAccess();
|
||||
} elsif ($self->session->var->get("adminOn") && $self->get("state") =~ /^trash/) { # show em trash
|
||||
WebGUI::HTTP::setRedirect($self->getUrl("func=manageTrash"));
|
||||
return "";
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ sub view {
|
|||
sub www_setContentPositions {
|
||||
my $self = shift;
|
||||
return 'Visitors cannot save settings' if($self->session->user->profileField("userId") eq '1');
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canPersonalize);
|
||||
return $self->session->privilege->insufficient() unless ($self->canPersonalize);
|
||||
return 'empty' unless $self->get("isInitialized");
|
||||
my $dummy = $self->initialize unless $self->get("isInitialized");
|
||||
my $u = WebGUI::User->new($self->discernUserId);
|
||||
|
|
|
|||
|
|
@ -671,7 +671,7 @@ sub viewForm {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_deleteAllEntries {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
my $assetId = $self->session->form->process("entryId");
|
||||
$self->deleteCollateral("DataForm_entry","assetId",$assetId);
|
||||
$self->session->form->process("entryId") = 'list';
|
||||
|
|
@ -681,7 +681,7 @@ sub www_deleteAllEntries {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_deleteAllEntriesConfirm {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit && $self->session->form->process("entryId")==$self->getId);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit && $self->session->form->process("entryId")==$self->getId);
|
||||
$self->session->db->write("delete from DataForm_entry where assetId=".$self->session->db->quote($self->getId));
|
||||
return $self->www_view;
|
||||
}
|
||||
|
|
@ -690,7 +690,7 @@ sub www_deleteAllEntriesConfirm {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_deleteEntry {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
my $entryId = $self->session->form->process("entryId");
|
||||
$self->deleteCollateral("DataForm_entry","DataForm_entryId",$entryId);
|
||||
$self->session->form->process("entryId") = 'list';
|
||||
|
|
@ -700,7 +700,7 @@ sub www_deleteEntry {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_deleteFieldConfirm {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
$self->deleteCollateral("DataForm_field","DataForm_fieldId",$self->session->form->process("fid"));
|
||||
$self->reorderCollateral("DataForm_field","DataForm_fieldId");
|
||||
return "";
|
||||
|
|
@ -709,7 +709,7 @@ sub www_deleteFieldConfirm {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_deleteTabConfirm {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
$self->deleteCollateral("DataForm_tab","DataForm_tabId",$self->session->form->process("tid"));
|
||||
$self->deleteCollateral("DataForm_field","DataForm_tabId",$self->session->form->process("tid"));
|
||||
$self->reorderCollateral("DataForm_tab","DataForm_tabId");
|
||||
|
|
@ -719,7 +719,7 @@ sub www_deleteTabConfirm {
|
|||
#-------------------------------------------------------------------
|
||||
#sub www_edit {
|
||||
# my $self = shift;
|
||||
# return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
# return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
# $self->getAdminConsole->setHelp("data form add/edit","Asset_DataForm");
|
||||
# return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("7","Asset_DataForm"));
|
||||
#}
|
||||
|
|
@ -727,7 +727,7 @@ sub www_deleteTabConfirm {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_editField {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
my (%field, $f, %fieldStatus,$tab);
|
||||
tie %field, 'Tie::CPHash';
|
||||
tie %fieldStatus, 'Tie::IxHash';
|
||||
|
|
@ -857,7 +857,7 @@ sub www_editField {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_editFieldSave {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
$self->session->form->process("name") = $self->session->form->process("label") if ($self->session->form->process("name") eq "");
|
||||
$self->session->form->process("tid") = "0" if ($self->session->form->process("tid") eq "");
|
||||
$self->session->form->process("name") = $self->session->url->urlize($self->session->form->process("name"));
|
||||
|
|
@ -893,7 +893,7 @@ sub www_editFieldSave {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_editTab {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
my (%tab, $f);
|
||||
tie %tab, 'Tie::CPHash';
|
||||
$self->session->form->process("tid") = "new" if ($self->session->form->process("tid") eq "");
|
||||
|
|
@ -938,7 +938,7 @@ sub www_editTab {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_editTabSave {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
$self->session->form->process("name") = $self->session->form->process("label") if ($self->session->form->process("name") eq "");
|
||||
$self->session->form->process("name") = $self->session->url->urlize($self->session->form->process("name"));
|
||||
$self->session->form->process("name") =~ s/\-//g;
|
||||
|
|
@ -958,7 +958,7 @@ sub www_editTabSave {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_exportTab {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
WebGUI::HTTP::setFilename($self->get("url").".tab","text/plain");
|
||||
my %fields = $self->session->db->buildHash("select DataForm_fieldId,name from DataForm_field where
|
||||
assetId=".$self->session->db->quote($self->getId)." order by sequenceNumber");
|
||||
|
|
@ -1008,7 +1008,7 @@ sub www_exportTab {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_moveFieldDown {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
$self->moveCollateralDown("DataForm_field","DataForm_fieldId",$self->session->form->process("fid"),_tonull("DataForm_tabId",$self->session->form->process("tid")));
|
||||
return "";
|
||||
}
|
||||
|
|
@ -1016,7 +1016,7 @@ sub www_moveFieldDown {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_moveFieldUp {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
$self->moveCollateralUp("DataForm_field","DataForm_fieldId",$self->session->form->process("fid"),_tonull("DataForm_tabId",$self->session->form->process("tid")));
|
||||
return "";
|
||||
}
|
||||
|
|
@ -1024,7 +1024,7 @@ sub www_moveFieldUp {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_moveTabRight {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
$self->moveCollateralDown("DataForm_tab","DataForm_tabId",$self->session->form->process("tid"));
|
||||
return "";
|
||||
}
|
||||
|
|
@ -1032,7 +1032,7 @@ sub www_moveTabRight {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_moveTabLeft {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
$self->moveCollateralUp("DataForm_tab","DataForm_tabId",$self->session->form->process("tid"));
|
||||
return "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -459,7 +459,7 @@ sub view {
|
|||
#-------------------------------------------------------------------
|
||||
#sub www_edit {
|
||||
# my $self = shift;
|
||||
# return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
# return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
# $self->getAdminConsole->setHelp("events calendar add/edit","Asset_EventsCalendar");
|
||||
# return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("12","Asset_EventsCalendar"));
|
||||
#}
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ sub view {
|
|||
|
||||
#sub www_edit {
|
||||
# my $self = shift;
|
||||
# return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
# return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
# $self->getAdminConsole->setHelp("folder add/edit","Asset_Folder");
|
||||
# return $self->getAdminConsole->render($self->getEditForm->print,"Edit Folder");
|
||||
#}
|
||||
|
|
|
|||
|
|
@ -344,7 +344,7 @@ sub view {
|
|||
#-------------------------------------------------------------------
|
||||
#sub www_edit {
|
||||
# my $self = shift;
|
||||
# return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
# return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
# $self->getAdminConsole->setHelp("http proxy add/edit","Asset_HttpProxy");
|
||||
# return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("2","Asset_HttpProxy"));
|
||||
#}
|
||||
|
|
@ -354,7 +354,7 @@ sub view {
|
|||
sub www_view {
|
||||
my $self = shift;
|
||||
my $output = $self->view;
|
||||
return WebGUI::Privilege::noAccess() unless $self->canView;
|
||||
return $self->session->privilege->noAccess() unless $self->canView;
|
||||
# this is s a stop gap. we need to do something here that deals with the real www_view and caching, etc.
|
||||
if (WebGUI::HTTP::getMimeType() ne "text/html") {
|
||||
return $output;
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ order by department, lastName, firstName";
|
|||
#-------------------------------------------------------------------
|
||||
sub www_edit {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("18","Asset_InOutBoard"));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -380,7 +380,7 @@ sub view {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_edit {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("search add/edit", "Asset_IndexedSearch");
|
||||
my $form = $self->getEditForm;
|
||||
my $output = $form;
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ sub view {
|
|||
|
||||
sub www_setContentPositions {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$self->addRevision({
|
||||
contentPositions=>$self->session->form->process("map")
|
||||
});
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ sub setRatings {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_approveListing {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless($self->canEdit);
|
||||
my $listing = $self->session->db->getRow("Matrix_listing","listingId",$self->session->form->process("listingId"));
|
||||
$self->session->db->write("update Matrix_listing set status='approved' where listingId=".$self->session->db->quote($self->session->form->process("listingId")));
|
||||
WebGUI::MessageLog::addEntry($listing->{maintainerId},"","New Listing Approved","Your new listing, ".$listing->{productName}.", has been approved.",
|
||||
|
|
@ -324,7 +324,7 @@ sub www_deleteListing {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_deleteListingConfirm {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless($self->canEdit);
|
||||
my $listing = $self->session->db->getRow("Matrix_listing","listingId",$self->session->form->process("listingId"));
|
||||
WebGUI::Asset::Wobject::Collaboration->new($listing->{forumId})->purge;
|
||||
$self->session->db->write("delete from Matrix_listing where listingId=".$self->session->db->quote($self->session->form->process("listingId")));
|
||||
|
|
@ -430,7 +430,7 @@ sub getEditForm {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_edit {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,
|
||||
WebGUI::International::get("edit matrix",'Asset_Matrix'));
|
||||
}
|
||||
|
|
@ -643,7 +643,7 @@ sub www_editListingSave {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_editField {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless($self->canEdit);
|
||||
my $field = $self->session->db->getRow("Matrix_field","fieldId",$self->session->form->process("fieldId"));
|
||||
my $f = WebGUI::HTMLForm->new(-action=>$self->getUrl);
|
||||
$f->hidden(
|
||||
|
|
@ -704,7 +704,7 @@ sub www_editField {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_editFieldSave {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless($self->canEdit);
|
||||
$self->session->db->setRow("Matrix_field","fieldId",{
|
||||
fieldId=>$self->session->form->process("fieldId"),
|
||||
name=>$self->session->form->process("name"),
|
||||
|
|
@ -721,7 +721,7 @@ sub www_editFieldSave {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_listFields {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless($self->canEdit);
|
||||
my $output = sprintf WebGUI::International::get('list fields','Asset_Matrix'),
|
||||
$self->getUrl("func=editField&fieldId=new");
|
||||
my $sth = $self->session->db->read("select fieldId, label from Matrix_field where assetId=".$self->session->db->quote($self->getId)." order by label");
|
||||
|
|
|
|||
|
|
@ -450,7 +450,7 @@ sub www_goBackToPage {
|
|||
sub www_preview {
|
||||
my $self = shift;
|
||||
$self->session->var->get("adminOn") = 0;
|
||||
return WebGUI::Privilege::insufficient() unless (WebGUI::Grouping::isInGroup(3));
|
||||
return $self->session->privilege->insufficient() unless (WebGUI::Grouping::isInGroup(3));
|
||||
my $nav = WebGUI::Navigation->new( depth=>$self->session->form->process("depth"),
|
||||
method=>$self->session->form->process("method"),
|
||||
startAt=>$self->session->form->process("startAt"),
|
||||
|
|
|
|||
|
|
@ -321,7 +321,7 @@ sub view {
|
|||
#-------------------------------------------------------------------
|
||||
#sub www_edit {
|
||||
# my $self = shift;
|
||||
# return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
# return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
# $self->getAdminConsole->setHelp("poll add/edit","Asset_Poll");
|
||||
# return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("9","Asset_Poll"));
|
||||
#}
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ sub purgeRevision {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_addAccessory {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
my ($f, $accessory, @usedAccessories);
|
||||
$f = WebGUI::HTMLForm->new(-action=>$self->getUrl);
|
||||
$f->hidden(
|
||||
|
|
@ -338,7 +338,7 @@ sub www_addAccessory {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_addAccessorySave {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
return "" unless ($self->session->form->process("accessoryAccessId"));
|
||||
my ($seq) = $self->session->db->quickArray("select max(sequenceNumber) from Product_accessory where assetId=".$self->session->db->quote($self->getId()));
|
||||
$self->session->db->write("insert into Product_accessory (assetId,accessoryAssetId,sequenceNumber) values (".$self->session->db->quote($self->getId()).",".$self->session->db->quote($self->session->form->process("accessoryAccessId")).",".($seq+1).")");
|
||||
|
|
@ -349,7 +349,7 @@ sub www_addAccessorySave {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_addRelated {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
my ($f, $related, @usedRelated);
|
||||
$f = WebGUI::HTMLForm->new(-action=>$self->getUrl);
|
||||
$f->hidden(
|
||||
|
|
@ -377,7 +377,7 @@ sub www_addRelated {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_addRelatedSave {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
return "" unless ($self->session->form->process("relatedAssetId"));
|
||||
my ($seq) = $self->session->db->quickArray("select max(sequenceNumber) from Product_related where assetId=".$self->session->db->quote($self->getId));
|
||||
$self->session->db->write("insert into Product_related (assetId,relatedAssetId,sequenceNumber) values (".$self->session->db->quote($self->getId).",".$self->session->db->quote($self->session->form->process("relatedAssetId")).",".($seq+1).")");
|
||||
|
|
@ -388,7 +388,7 @@ sub www_addRelatedSave {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_deleteAccessoryConfirm {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$self->session->db->write("delete from Product_accessory where assetId=".$self->session->db->quote($self->getId())." and accessoryAssetId=".$self->session->db->quote($self->session->form->process("aid")));
|
||||
$self->reorderCollateral("Product_accessory","accessoryAssetId");
|
||||
return "";
|
||||
|
|
@ -397,7 +397,7 @@ sub www_deleteAccessoryConfirm {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_deleteBenefitConfirm {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$self->deleteCollateral("Product_benefit","Product_benefitId",$self->session->form->process("bid"));
|
||||
$self->reorderCollateral("Product_benefit","Product_benefitId");
|
||||
return "";
|
||||
|
|
@ -406,7 +406,7 @@ sub www_deleteBenefitConfirm {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_deleteFeatureConfirm {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$self->deleteCollateral("Product_feature","Product_featureId",$self->session->form->process("fid"));
|
||||
$self->reorderCollateral("Product_feature","Product_featureId");
|
||||
return "";
|
||||
|
|
@ -416,7 +416,7 @@ sub www_deleteFeatureConfirm {
|
|||
sub www_deleteFileConfirm {
|
||||
my $self = shift;
|
||||
my $column = $self->session->form->process("file");
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
my $store = $self->get($column);
|
||||
my $file = WebGUI::Storage->get($store);
|
||||
$file->delete;
|
||||
|
|
@ -427,7 +427,7 @@ sub www_deleteFileConfirm {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_deleteRelatedConfirm {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$self->session->db->write("delete from Product_related where assetId=".$self->session->db->quote($self->getId)." and relatedAssetId=".$self->session->db->quote($self->session->form->process("rid")));
|
||||
$self->reorderCollateral("Product_related","relatedAssetId");
|
||||
return "";
|
||||
|
|
@ -436,7 +436,7 @@ sub www_deleteRelatedConfirm {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_deleteSpecificationConfirm {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$self->deleteCollateral("Product_specification","Product_specificationId",$self->session->form->process("sid"));
|
||||
$self->reorderCollateral("Product_specification","Product_specificationId");
|
||||
return "";
|
||||
|
|
@ -445,7 +445,7 @@ sub www_deleteSpecificationConfirm {
|
|||
#-------------------------------------------------------------------
|
||||
#sub www_edit {
|
||||
# my $self = shift;
|
||||
# return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
# return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
# $self->getAdminConsole->setHelp("product add/edit","Asset_Product");
|
||||
# return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("6","Asset_Product"));
|
||||
#}
|
||||
|
|
@ -466,7 +466,7 @@ sub processPropertiesFromFormPost {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_editBenefit {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
my ($data, $f, $benefits);
|
||||
$data = $self->getCollateral("Product_benefit","Product_benefitId",$self->session->form->process("bid"));
|
||||
$f = WebGUI::HTMLForm->new(-action=>$self->getUrl);
|
||||
|
|
@ -498,7 +498,7 @@ sub www_editBenefit {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_editBenefitSave {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$self->session->form->process("benefit") = $self->session->form->process("benefit_new") if ($self->session->form->process("benefit_new") ne "");
|
||||
$self->setCollateral("Product_benefit", "Product_benefitId", {
|
||||
Product_benefitId => $self->session->form->process("bid"),
|
||||
|
|
@ -513,7 +513,7 @@ sub www_editBenefitSave {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_editFeature {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
my ($data, $f, $features);
|
||||
$data = $self->getCollateral("Product_feature","Product_featureId",$self->session->form->process("fid"));
|
||||
$f = WebGUI::HTMLForm->new(-action=>$self->getUrl);
|
||||
|
|
@ -545,7 +545,7 @@ sub www_editFeature {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_editFeatureSave {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$self->session->form->process("feature") = $self->session->form->process("feature_new") if ($self->session->form->process("feature_new") ne "");
|
||||
$self->setCollateral("Product_feature", "Product_featureId", {
|
||||
Product_featureId => $self->session->form->process("fid"),
|
||||
|
|
@ -559,7 +559,7 @@ sub www_editFeatureSave {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_editSpecification {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
my ($data, $f, $hashRef);
|
||||
$data = $self->getCollateral("Product_specification","Product_specificationId",$self->session->form->process("sid"));
|
||||
$f = WebGUI::HTMLForm->new(-action=>$self->getUrl);
|
||||
|
|
@ -605,7 +605,7 @@ sub www_editSpecification {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_editSpecificationSave {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$self->session->form->process("name") = $self->session->form->process("name_new") if ($self->session->form->process("name_new") ne "");
|
||||
$self->session->form->process("units") = $self->session->form->process("units_new") if ($self->session->form->process("units_new") ne "");
|
||||
$self->setCollateral("Product_specification", "Product_specificationId", {
|
||||
|
|
@ -623,7 +623,7 @@ sub www_editSpecificationSave {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_moveAccessoryDown {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$self->moveCollateralDown("Product_accessory","accessoryAssetId",$self->session->form->process("aid"));
|
||||
return "";
|
||||
}
|
||||
|
|
@ -631,7 +631,7 @@ sub www_moveAccessoryDown {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_moveAccessoryUp {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$self->moveCollateralUp("Product_accessory","accessoryAssetId",$self->session->form->process("aid"));
|
||||
return "";
|
||||
}
|
||||
|
|
@ -639,7 +639,7 @@ sub www_moveAccessoryUp {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_moveBenefitDown {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$self->moveCollateralDown("Product_benefit","Product_benefitId",$self->session->form->process("bid"));
|
||||
return "";
|
||||
}
|
||||
|
|
@ -647,7 +647,7 @@ sub www_moveBenefitDown {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_moveBenefitUp {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$self->moveCollateralUp("Product_benefit","Product_benefitId",$self->session->form->process("bid"));
|
||||
return "";
|
||||
}
|
||||
|
|
@ -655,7 +655,7 @@ sub www_moveBenefitUp {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_moveFeatureDown {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$self->moveCollateralDown("Product_feature","Product_featureId",$self->session->form->process("fid"));
|
||||
return "";
|
||||
}
|
||||
|
|
@ -663,7 +663,7 @@ sub www_moveFeatureDown {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_moveFeatureUp {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$self->moveCollateralUp("Product_feature","Product_featureId",$self->session->form->process("fid"));
|
||||
return "";
|
||||
}
|
||||
|
|
@ -671,7 +671,7 @@ sub www_moveFeatureUp {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_moveRelatedDown {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$self->moveCollateralDown("Product_related","relatedAssetId",$self->session->form->process("rid"));
|
||||
return "";
|
||||
}
|
||||
|
|
@ -679,7 +679,7 @@ sub www_moveRelatedDown {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_moveRelatedUp {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$self->moveCollateralUp("Product_related","relatedAssetId",$self->session->form->process("rid"));
|
||||
return "";
|
||||
}
|
||||
|
|
@ -687,7 +687,7 @@ sub www_moveRelatedUp {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_moveSpecificationDown {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$self->moveCollateralDown("Product_specification","Product_specificationId",$self->session->form->process("sid"));
|
||||
return "";
|
||||
}
|
||||
|
|
@ -695,7 +695,7 @@ sub www_moveSpecificationDown {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_moveSpecificationUp {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$self->moveCollateralUp("Product_specification","Product_specificationId",$self->session->form->process("sid"));
|
||||
return "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ sub view {
|
|||
#-------------------------------------------------------------------
|
||||
#sub www_edit {
|
||||
# my $self = shift;
|
||||
# return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
# return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
# $self->getAdminConsole->setHelp("sql report add/edit", "Asset_SQLReport");
|
||||
# return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("8","Asset_SQLReport"));
|
||||
#}
|
||||
|
|
|
|||
|
|
@ -430,7 +430,7 @@ Web facing method which allows users to view details about their stocks
|
|||
sub www_displayStock {
|
||||
my $self = shift;
|
||||
my $var = {};
|
||||
return WebGUI::Privilege::noAccess() unless $self->canView();
|
||||
return $self->session->privilege->noAccess() unless $self->canView();
|
||||
|
||||
$var->{'extrasFolder'} = $self->session->config->get("extrasURL")."/wobject/StockData";
|
||||
|
||||
|
|
@ -457,7 +457,7 @@ sub www_displayStock {
|
|||
|
||||
#sub www_edit {
|
||||
# my $self = shift;
|
||||
# return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
# return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
# $self->getAdminConsole->setHelp("stock list add/edit","Asset_StockData");
|
||||
# return $self->getAdminConsole->render($self->getEditForm->print,
|
||||
# WebGUI::International::get("edit_title","Asset_StockData"));
|
||||
|
|
|
|||
|
|
@ -695,7 +695,7 @@ sub view {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteAnswerConfirm {
|
||||
return WebGUI::Privilege::insufficient() unless ($_[0]->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($_[0]->canEdit);
|
||||
my ($answerCount) = $self->session->db->quickArray("select count(*) from Survey_answer where Survey_questionId=".$self->session->db->quote($self->session->form->process("qid")));
|
||||
return $_[0]->i18n("cannot delete the last answer") unless($answerCount);
|
||||
$self->session->db->write("delete from Survey_questionResponse where Survey_answerId=".$self->session->db->quote($self->session->form->process("aid")));
|
||||
|
|
@ -706,7 +706,7 @@ sub www_deleteAnswerConfirm {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteQuestionConfirm {
|
||||
return WebGUI::Privilege::insufficient() unless ($_[0]->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($_[0]->canEdit);
|
||||
$self->session->db->write("delete from Survey_answer where Survey_questionId=".$self->session->db->quote($self->session->form->process("qid")));
|
||||
$self->session->db->write("delete from Survey_questionResponse where Survey_questionId=".$self->session->db->quote($self->session->form->process("qid")));
|
||||
$_[0]->deleteCollateral("Survey_question","Survey_questionId",$self->session->form->process("qid"));
|
||||
|
|
@ -716,12 +716,12 @@ sub www_deleteQuestionConfirm {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteSectionConfirm {
|
||||
return WebGUI::Privilege::insufficient() unless ($_[0]->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($_[0]->canEdit);
|
||||
my $none = WebGUI::International::get(107, 'Asset_Survey');
|
||||
my ($sectionName) = $self->session->db->quickArray("select sectionName from Survey_section where Survey_sectionId="
|
||||
.$self->session->db->quote($self->session->form->process("sid")));
|
||||
if ($sectionName =~ /$none/) {
|
||||
return WebGUI::Privilege::vitalComponent();
|
||||
return $self->session->privilege->vitalComponent();
|
||||
}
|
||||
|
||||
$self->session->db->write("delete from Survey_section where Survey_sectionId=".$self->session->db->quote($self->session->form->process("sid")));
|
||||
|
|
@ -761,7 +761,7 @@ sub www_deleteAllResponsesConfirm {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_editSave {
|
||||
return WebGUI::Privilege::insufficient() unless ($_[0]->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($_[0]->canEdit);
|
||||
my $output = $_[0]->SUPER::www_editSave();
|
||||
if ($self->session->form->process("proceed") eq "addQuestion") {
|
||||
$self->session->form->process("qid") = "new";
|
||||
|
|
@ -775,7 +775,7 @@ sub www_editAnswer {
|
|||
my ($question, $f, $answer, $self);
|
||||
$self = shift;
|
||||
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
|
||||
$answer = $self->getCollateral("Survey_answer","Survey_answerId",$self->session->form->process("aid"));
|
||||
$f = WebGUI::HTMLForm->new(-action=>$self->getUrl);
|
||||
|
|
@ -850,7 +850,7 @@ sub www_editAnswer {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_editAnswerSave {
|
||||
return WebGUI::Privilege::insufficient() unless ($_[0]->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($_[0]->canEdit);
|
||||
$_[0]->setCollateral("Survey_answer", "Survey_answerId", {
|
||||
Survey_answerId => $self->session->form->process("aid"),
|
||||
Survey_questionId => $self->session->form->process("qid"),
|
||||
|
|
@ -875,7 +875,7 @@ sub www_editQuestion {
|
|||
my ($f, $question, $answerFieldType, $sth, %data, $self);
|
||||
$self = shift;
|
||||
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
|
||||
tie %data, 'Tie::CPHash';
|
||||
$question = $self->getCollateral("Survey_question","Survey_questionId",$self->session->form->process("qid"));
|
||||
|
|
@ -988,7 +988,7 @@ sub www_editQuestion {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_editQuestionSave {
|
||||
return WebGUI::Privilege::insufficient() unless ($_[0]->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($_[0]->canEdit);
|
||||
|
||||
$self->session->form->process("qid") = $_[0]->setCollateral("Survey_question", "Survey_questionId", {
|
||||
question=>$self->session->form->process("question"),
|
||||
|
|
@ -1041,11 +1041,11 @@ sub www_editSection {
|
|||
my ($f, $section, $sectionName, $self);
|
||||
$self = shift;
|
||||
my $none = WebGUI::International::get(107, 'Asset_Survey');
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$section = $self->getCollateral("Survey_section","Survey_sectionId",$self->session->form->process("sid"));
|
||||
|
||||
if ($section->{sectionName} =~ /$none/) {
|
||||
return WebGUI::Privilege::vitalComponent;
|
||||
return $self->session->privilege->vitalComponent;
|
||||
}
|
||||
|
||||
$f = WebGUI::HTMLForm->new(-action=>$self->getUrl);
|
||||
|
|
@ -1074,7 +1074,7 @@ sub www_editSection {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_editSectionSave {
|
||||
return WebGUI::Privilege::insufficient() unless ($_[0]->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($_[0]->canEdit);
|
||||
$self->session->form->process("sid") = $_[0]->setCollateral("Survey_section", "Survey_sectionId", {
|
||||
sectionName => $self->session->form->process("sectionName"),
|
||||
Survey_sectionId=>$self->session->form->process("sid"),
|
||||
|
|
@ -1116,42 +1116,42 @@ sub www_exportResponses {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_moveAnswerDown {
|
||||
return WebGUI::Privilege::insufficient() unless ($_[0]->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($_[0]->canEdit);
|
||||
$_[0]->moveCollateralDown("Survey_answer","Survey_answerId",$self->session->form->process("aid"),"Survey_id");
|
||||
return $_[0]->www_editQuestion;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_moveAnswerUp {
|
||||
return WebGUI::Privilege::insufficient() unless ($_[0]->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($_[0]->canEdit);
|
||||
$_[0]->moveCollateralUp("Survey_answer","Survey_answerId",$self->session->form->process("aid"),"Survey_id");
|
||||
return $_[0]->www_editQuestion;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_moveQuestionDown {
|
||||
return WebGUI::Privilege::insufficient() unless ($_[0]->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($_[0]->canEdit);
|
||||
$_[0]->moveCollateralDown("Survey_question","Survey_questionId",$self->session->form->process("qid"),"Survey_id");
|
||||
return "";
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_moveQuestionUp {
|
||||
return WebGUI::Privilege::insufficient() unless ($_[0]->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($_[0]->canEdit);
|
||||
$_[0]->moveCollateralUp("Survey_question","Survey_questionId",$self->session->form->process("qid"),"Survey_id");
|
||||
return "";
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_moveSectionDown {
|
||||
return WebGUI::Privilege::insufficient() unless ($_[0]->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($_[0]->canEdit);
|
||||
$_[0]->moveCollateralDown("Survey_section","Survey_sectionId",$self->session->form->process("sid"),"Survey_id");
|
||||
return "";
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_moveSectionUp {
|
||||
return WebGUI::Privilege::insufficient() unless ($_[0]->canEdit);
|
||||
return $self->session->privilege->insufficient() unless ($_[0]->canEdit);
|
||||
$_[0]->moveCollateralUp("Survey_section","Survey_sectionId",$self->session->form->process("sid"),"Survey_id");
|
||||
return "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -585,7 +585,7 @@ sub _createRSSURLs{
|
|||
|
||||
#sub www_edit {
|
||||
# my $self = shift;
|
||||
# return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
# return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
# $self->getAdminConsole->setHelp('syndicated content add/edit','Asset_SyndicatedContent');
|
||||
# return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get('4','Asset_SyndicatedContent'));
|
||||
#}
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ sub getEditForm {
|
|||
#-------------------------------------------------------------------
|
||||
#sub www_edit {
|
||||
# my $self = shift;
|
||||
# return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
# return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
# $self->getAdminConsole->setHelp("ws client add/edit","Asset_WSClient");
|
||||
# return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("20","Asset_WSClient"));
|
||||
#}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue