Add noFormPost to packed content in the asset tables to prevent them

from overwriting the data that has been packed from the filter function.
Rerun the upgrade script to repack all areas that use packing.
This commit is contained in:
Colin Kuskie 2009-06-02 20:30:48 +00:00
parent 80dfb9ffd0
commit 6ac30bb2ea
5 changed files with 50 additions and 0 deletions

View file

@ -452,6 +452,7 @@ sub definition {
extraHeadTagsPacked => {
fieldType => 'hidden',
defaultValue => undef,
noFormPost => 1,
},
usePackedHeadTags => {
tab => "meta",
@ -1101,6 +1102,7 @@ Returns the extraHeadTags stored in the asset. Called in $self->session->style-
sub getExtraHeadTags {
my $self = shift;
$self->session->log->warn("usePackedHeadTags: ". $self->get('usePackedHeadTags'));
return $self->get('usePackedHeadTags')
? $self->get('extraHeadTagsPacked')
: $self->get("extraHeadTags")
@ -2027,6 +2029,7 @@ filter guidelines).
sub packExtraHeadTags {
my ( $self, $unpacked ) = @_;
$self->session->log->warn('packExtraHeadTags called with '. $unpacked);
return $unpacked if !$unpacked;
my $packed = $unpacked;
HTML::Packer::minify( \$packed, {
@ -2035,7 +2038,9 @@ sub packExtraHeadTags {
do_javascript => "shrink",
do_stylesheet => "minify",
} );
$self->session->log->warn('updated extraHeadTagsPacked to '. $packed);
$self->update({ extraHeadTagsPacked => $packed });
$self->session->log->warn('extraHeadTagsPacked is '. $self->get('extraHeadTagsPacked'));
return $unpacked;
}

View file

@ -77,6 +77,7 @@ sub definition {
snippetPacked => {
fieldType => "hidden",
defaultValue => undef,
noFormPost => 1,
},
usePacked => {
tab => 'properties',

View file

@ -101,6 +101,7 @@ sub definition {
templatePacked => {
fieldType => 'hidden',
defaultValue => undef,
noFormPost => 1,
},
usePacked => {
fieldType => 'yesNo',