diff --git a/lib/WebGUI/Asset/MapPoint.pm b/lib/WebGUI/Asset/MapPoint.pm index 023d4f35f..25237aaf7 100644 --- a/lib/WebGUI/Asset/MapPoint.pm +++ b/lib/WebGUI/Asset/MapPoint.pm @@ -278,7 +278,7 @@ sub getTemplateVarsEditForm { for my $key ( keys %{$definition} ) { next if $definition->{$key}->{noFormPost}; $definition->{$key}->{name} = $key; - $definition->{$key}->{value} = $self->getValue($key); + $definition->{$key}->{value} = $self->$key; $var->{ "form_$key" } = WebGUI::Form::dynamicField( $session, %{$definition->{$key}} ); } diff --git a/lib/WebGUI/Asset/MatrixListing.pm b/lib/WebGUI/Asset/MatrixListing.pm index eb2d06856..2b5989793 100644 --- a/lib/WebGUI/Asset/MatrixListing.pm +++ b/lib/WebGUI/Asset/MatrixListing.pm @@ -294,7 +294,7 @@ sub getEditForm { -defaultValue =>'Untitled', -label =>$i18n->get("product name label"), -hoverHelp =>$i18n->get('product name description'), - -value =>$self->getValue('title'), + -value =>$self->title, ); $form->image( -name =>'screenshots', @@ -302,19 +302,19 @@ sub getEditForm { -maxAttachments =>20, -label =>$i18n->get("screenshots label"), -hoverHelp =>$i18n->get("screenshots description"),, - -value =>$self->getValue('screenshots'), + -value =>$self->screenshots, ); $form->HTMLArea( -name =>'description', -defaultValue =>undef, -label =>$i18n->get("description label"), -hoverHelp =>$i18n->get("description description"), - -value =>$self->getValue('description'), + -value =>$self->description, ); if ($self->getParent->canEdit) { $form->user( name =>"ownerUserId", - value =>$self->getValue('ownerUserId'), + value =>$self->ownerUserId, label =>$i18n->get('maintainer label'), hoverHelp =>$i18n->get('maintainer description'), ); @@ -337,28 +337,28 @@ sub getEditForm { -defaultValue =>undef, -label =>$i18n->get("version label"), -hoverHelp =>$i18n->get("version description"), - -value =>$self->getValue('version'), + -value =>$self->version, ); $form->text( -name =>'manufacturerName', -defaultValue =>undef, -label =>$i18n->get("manufacturerName label"), -hoverHelp =>$i18n->get("manufacturerName description"), - -value =>$self->getValue('manufacturerName'), + -value =>$self->manufacturerName, ); $form->url( -name =>'manufacturerURL', -defaultValue =>undef, -label =>$i18n->get("manufacturerURL label"), -hoverHelp =>$i18n->get("manufacturerURL description"), - -value =>$self->getValue('manufacturerURL'), + -value =>$self->manufacturerURL, ); $form->url( -name =>'productURL', -defaultValue =>undef, -label =>$i18n->get("productURL label"), -hoverHelp =>$i18n->get("productURL description"), - -value =>$self->getValue('productURL'), + -value =>$self->productURL, ); foreach my $category (keys %{$self->getParent->getCategories}) { diff --git a/lib/WebGUI/Asset/Post.pm b/lib/WebGUI/Asset/Post.pm index 4c12cd72b..007f91188 100644 --- a/lib/WebGUI/Asset/Post.pm +++ b/lib/WebGUI/Asset/Post.pm @@ -465,7 +465,7 @@ Returns a URL to the owner's avatar. sub getAvatarUrl { my $self = shift; my $parent = $self->getThread->getParent; - return '' unless $parent and $parent->getValue("avatarsEnabled"); + return '' unless $parent and $parent->avatarsEnabled; my $user = WebGUI::User->new($self->session, $self->ownerUserId); #Get avatar field, storage Id. my $storageId = $user->profileField("avatar"); @@ -1459,7 +1459,7 @@ sub www_edit { value=>$form->process("class","className") }); - if($self->getThread->getParent->getValue("useCaptcha")) { + if($self->getThread->getParent->useCaptcha) { $var{'useCaptcha' } = "true"; use WebGUI::Form::Captcha; @@ -1534,16 +1534,16 @@ sub www_edit { }); $var{'form.header'} .= WebGUI::Form::hidden($session, { name=>"ownerUserId", - value=>$self->getValue("ownerUserId") + value=>$self->ownerUserId }); $var{'form.header'} .= WebGUI::Form::hidden($session, { name=>"username", - value=>$self->getValue("username") + value=>$self->username }); $var{isEdit} = 1; - $content = $form->process('content') || $self->getValue("content"); - $title = $form->process('title') || $self->getValue("title"); - $synopsis = $form->process('synopsis') || $self->getValue("synopsis"); + $content = $form->process('content') || $self->content; + $title = $form->process('title') || $self->title; + $synopsis = $form->process('synopsis') || $self->synopsis; } $var{'archive.form'} = WebGUI::Form::yesNo($session, { @@ -1568,13 +1568,13 @@ sub www_edit { $var{'user.isVisitor' } = ($user->isVisitor); $var{'visitorName.form'} = WebGUI::Form::text($session, { name => "visitorName", - value => $form->process('visitorName') || $self->getValue("visitorName") + value => $form->process('visitorName') || $self->visitorName }); for my $x (1..5) { my $userDefinedValue = $form->process("userDefined".$x) - || $self->getValue("userDefined".$x) + || $self->get("userDefined".$x) ; $var{'userDefined'.$x} = $userDefinedValue; $var{'userDefined'.$x.'.form'} @@ -1644,13 +1644,13 @@ sub www_edit { $var{'karmaScale.form'} = WebGUI::Form::integer($session, { name=>"karmaScale", defaultValue=>$self->getThread->getParent->defaultKarmaScale, - value=>$self->getValue("karmaScale"), + value=>$self->karmaScale, }); $var{karmaIsEnabled} = $session->setting->useKarma; $var{'form.preview'} = WebGUI::Form::submit($session, { value=>$i18n->get("preview","Asset_Collaboration") }); - my $numberOfAttachments = $self->getThread->getParent->getValue("attachmentsPerPost"); + my $numberOfAttachments = $self->getThread->getParent->attachmentsPerPost; $var{'attachment.form'} = WebGUI::Form::image($session, { name=>"storageId", value=>$self->storageId, @@ -1660,7 +1660,7 @@ sub www_edit { $var{'contentType.form'} = WebGUI::Form::contentType($session, { name=>'contentType', - value=>$self->getValue("contentType") || "mixed", + value=>$self->contentType || "mixed", }); if ($session->setting->get("metaDataEnabled") && $self->getThread->getParent->enablePostMetaData) { @@ -1716,7 +1716,7 @@ We're extending www_editSave() here to deal with editing a post that has been de sub www_editSave { my $self = shift; my $assetId = $self->session->form->param("assetId"); - if($assetId eq "new" && $self->getThread->getParent->getValue("useCaptcha")) { + if($assetId eq "new" && $self->getThread->getParent->useCaptcha) { my $captcha = $self->session->form->process("captcha","Captcha"); unless ($captcha) { return $self->www_edit; diff --git a/lib/WebGUI/Asset/Post/Thread.pm b/lib/WebGUI/Asset/Post/Thread.pm index 151f80fd8..2065115fa 100644 --- a/lib/WebGUI/Asset/Post/Thread.pm +++ b/lib/WebGUI/Asset/Post/Thread.pm @@ -678,7 +678,7 @@ Extend the base method to do captcha processing. sub processPropertiesFromFormPost { my $self = shift; - if ($self->isNew && $self->getParent->getValue('useCaptcha')) { + if ($self->isNew && $self->getParent->useCaptcha) { my $captchaOk = $self->session->form->process("captcha","Captcha"); return [ 'invalid captcha' ] unless $captchaOk; diff --git a/lib/WebGUI/Asset/Shortcut.pm b/lib/WebGUI/Asset/Shortcut.pm index 5078f6f62..a90194347 100644 --- a/lib/WebGUI/Asset/Shortcut.pm +++ b/lib/WebGUI/Asset/Shortcut.pm @@ -107,7 +107,7 @@ sub _drawQueryBuilder { # Static form fields my $shortcutCriteriaField = WebGUI::Form::textarea($session, { name=>"shortcutCriteria", - value=>$self->getValue("shortcutCriteria"), + value=>$self->shortcutCriteria, extras=>'style="width: 100%" '.$self->{_disabled} }); my $conjunctionField = WebGUI::Form::selectBox($session, { @@ -307,7 +307,7 @@ sub getEditForm { ); } $tabform->getTab("display")->template( - -value=>$self->getValue("templateId"), + -value=>$self->templateId, -label=>$i18n->get('shortcut template title'), -hoverHelp=>$i18n->get('shortcut template title description'), -namespace=>"Shortcut" @@ -599,7 +599,7 @@ sub getShortcutByCriteria { my $scratchId; if ($assetId) { $scratchId = "Shortcut_" . $assetId; - if($self->session->scratch->get($scratchId) && !$self->getValue("disableContentLock")) { + if($self->session->scratch->get($scratchId) && !$self->disableContentLock) { unless ($self->session->var->isAdminOn) { return WebGUI::Asset->newById($self->session, $self->session->scratch->get($scratchId)); } @@ -729,7 +729,7 @@ Returns an array of profile fields to show to the user as preferences. sub getPrefFieldsToShow { my $self = shift; - return split("\n",$self->getValue("prefFieldsToShow")); + return split("\n",$self->prefFieldsToShow); } #------------------------------------------------------------------- @@ -743,7 +743,7 @@ for overrides. sub getPrefFieldsToImport { my $self = shift; - return split("\n",$self->getValue("prefFieldsToImport")); + return split("\n",$self->prefFieldsToImport); } #---------------------------------------------------------------------------- @@ -1136,7 +1136,7 @@ sub www_editOverride { # Cannot fetch the original value from the overrides hash b/c it will be empty if # the override has not been set before. Also getOverrides uses a cached version of # the origValue, which can be out of date. - my $origValue = $self->getShortcutOriginal->getValue($fieldName); + my $origValue = $self->getShortcutOriginal->$fieldName; my $output = ''; $output .= ''; diff --git a/lib/WebGUI/Asset/Sku.pm b/lib/WebGUI/Asset/Sku.pm index fdf32120e..7bd35f27e 100644 --- a/lib/WebGUI/Asset/Sku.pm +++ b/lib/WebGUI/Asset/Sku.pm @@ -325,7 +325,7 @@ sub getTaxConfiguration { my $self = shift; my $namespace = shift; - my $configs = eval { from_json( $self->getValue('taxConfiguration') ) }; + my $configs = eval { from_json( $self->taxConfiguration ) }; if ($@) { $self->session->log->error( 'Tax configuration of asset ' . $self->getId . ' appears to be corrupt. :' . $@ ); return undef; @@ -617,7 +617,7 @@ sub setTaxConfiguration { my $configuration = shift; # Fetch current tax configurations - my $configs = eval { from_json( $self->getValue('taxConfiguration') ) }; + my $configs = eval { from_json( $self->taxConfiguration ) }; if ($@) { $self->session->log->error( 'Tax configuration of asset ' . $self->getId . ' is corrupt.' ); return undef; diff --git a/lib/WebGUI/Asset/Template.pm b/lib/WebGUI/Asset/Template.pm index 891db2167..a418ace2d 100644 --- a/lib/WebGUI/Asset/Template.pm +++ b/lib/WebGUI/Asset/Template.pm @@ -624,7 +624,7 @@ sub processPropertiesFromFormPost { # TODO: Perhaps add a way to check template syntax before it blows stuff up? my %data; my $needsUpdate = 0; - if ($self->getValue("parser") ne $self->session->form->process("parser","className") && ($self->session->form->process("parser","className") ne "")) { + if ($self->parser ne $self->session->form->process("parser","className") && ($self->session->form->process("parser","className") ne "")) { $needsUpdate = 1; if (isIn($self->session->form->process("parser","className"),@{$self->session->config->get("templateParsers")})) { %data = ( parser => $self->session->form->process("parser","className") ); diff --git a/lib/WebGUI/Asset/Wobject/Layout.pm b/lib/WebGUI/Asset/Wobject/Layout.pm index 6ec0f5cdb..35889eefd 100644 --- a/lib/WebGUI/Asset/Wobject/Layout.pm +++ b/lib/WebGUI/Asset/Wobject/Layout.pm @@ -107,7 +107,7 @@ sub getEditForm { if ( $self->session->setting->get('useMobileStyle') ) { $tabform->getTab("display")->template( name => 'mobileTemplateId', - value => $self->getValue('mobileTemplateId'), + value => $self->mobileTemplateId, label => $i18n->get('mobileTemplateId label'), hoverHelp => $i18n->get('mobileTemplateId description'), namespace => 'Layout', diff --git a/lib/WebGUI/Asset/Wobject/Navigation.pm b/lib/WebGUI/Asset/Wobject/Navigation.pm index 83dd98d7c..b478930d1 100644 --- a/lib/WebGUI/Asset/Wobject/Navigation.pm +++ b/lib/WebGUI/Asset/Wobject/Navigation.pm @@ -98,13 +98,13 @@ sub getEditForm { my $tabform = $self->SUPER::getEditForm; my $i18n = WebGUI::International->new($self->session, "Asset_Navigation"); $tabform->getTab("display")->template( - -value=>$self->getValue('templateId'), + -value=>$self->templateId, -namespace=>"Navigation", -label=>$i18n->get(1096), -hoverHelp=>$i18n->get('1096 description'), ); $tabform->getTab("display")->mimeType( - -value=>$self->getValue('mimeType'), + -value=>$self->mimeType, -name=>"mimeType", -label=>$i18n->get('mimeType'), -hoverHelp=>$i18n->get('mimeType description'), @@ -114,7 +114,7 @@ sub getEditForm { value=>$self->session->form->process("returnUrl") }); my ($descendantsChecked, $ancestorsChecked, $selfChecked, $pedigreeChecked, $siblingsChecked); - my @assetsToInclude = split("\n",$self->getValue("assetsToInclude")); + my @assetsToInclude = split("\n",$self->assetsToInclude); my $afterScript; foreach my $item (@assetsToInclude) { if ($item eq "self") { @@ -137,7 +137,7 @@ sub getEditForm { relativeToCurrentUrl=>$i18n->get('Relative To Current URL'), relativeToRoot=>$i18n->get('Relative To Root') }, - -value=>[$self->getValue("startType")], + -value=>[$self->startType], -label=>$i18n->get("Start Point Type"), -hoverHelp=>$i18n->get("Start Point Type description"), -id=>"navStartType", @@ -162,7 +162,7 @@ sub getEditForm { '