fix merge problems
This commit is contained in:
parent
babfa74209
commit
29b1f794cd
14 changed files with 174 additions and 357 deletions
|
|
@ -1386,7 +1386,7 @@ override trash => sub {
|
|||
$self->getThread->sumReplies if ($self->isReply);
|
||||
$self->getThread->updateThreadRating;
|
||||
$self->disqualifyAsLastPost;
|
||||
}
|
||||
};
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
@ -1396,14 +1396,14 @@ Extend the base method to also prepare the Thread containing this Post.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->next::method;
|
||||
super();
|
||||
unless ($self->getThread->getId eq $self->getId) {
|
||||
# Need the unless to avoid infinite recursion.
|
||||
$self->getThread->prepareView;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -103,6 +103,11 @@ property storageIdExample => (
|
|||
hoverHelp => ['field storageIdExample description', 'Asset_Template'],
|
||||
);
|
||||
|
||||
property attachmentsJson => (
|
||||
fieldType => 'image',
|
||||
label => [ "attachments display label", "Asset_Template" ],
|
||||
);
|
||||
|
||||
use WebGUI::International;
|
||||
use WebGUI::Asset::Template::HTMLTemplate;
|
||||
use WebGUI::Utility;
|
||||
|
|
@ -134,81 +139,6 @@ These methods are available from this class:
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 definition ( session, definition )
|
||||
|
||||
Defines the properties of this asset.
|
||||
|
||||
=head3 session
|
||||
|
||||
A reference to an existing session.
|
||||
|
||||
=head3 definition
|
||||
|
||||
A hash reference passed in from a subclass definition.
|
||||
|
||||
=cut
|
||||
|
||||
sub definition {
|
||||
my $class = shift;
|
||||
my $session = shift;
|
||||
my $definition = shift;
|
||||
my $i18n = WebGUI::International->new($session,"Asset_Template");
|
||||
push @{$definition}, {
|
||||
assetName => $i18n->get('assetName'),
|
||||
icon => 'template.gif',
|
||||
tableName => 'template',
|
||||
className => 'WebGUI::Asset::Template',
|
||||
properties => {
|
||||
template => {
|
||||
fieldType => 'codearea',
|
||||
syntax => "html",
|
||||
defaultValue => undef,
|
||||
filter => 'packTemplate',
|
||||
},
|
||||
isEditable => {
|
||||
noFormPost => 1,
|
||||
fieldType => 'hidden',
|
||||
defaultValue => 1,
|
||||
},
|
||||
isDefault => {
|
||||
fieldType => 'hidden',
|
||||
defaultValue => 0,
|
||||
},
|
||||
showInForms => {
|
||||
fieldType => 'yesNo',
|
||||
defaultValue => 1,
|
||||
},
|
||||
parser => {
|
||||
noFormPost => 1,
|
||||
fieldType => 'selectBox',
|
||||
defaultValue => [$session->config->get("defaultTemplateParser")],
|
||||
},
|
||||
namespace => {
|
||||
fieldType => 'combo',
|
||||
defaultValue => undef,
|
||||
},
|
||||
templatePacked => {
|
||||
fieldType => 'hidden',
|
||||
defaultValue => undef,
|
||||
noFormPost => 1,
|
||||
},
|
||||
usePacked => {
|
||||
fieldType => 'yesNo',
|
||||
defaultValue => 0,
|
||||
},
|
||||
storageIdExample => {
|
||||
fieldType => 'image',
|
||||
},
|
||||
attachmentsJson => {
|
||||
fieldType => 'JsonTable',
|
||||
},
|
||||
},
|
||||
};
|
||||
return $class->SUPER::definition($session,$definition);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 addRevision ( )
|
||||
|
||||
Override the master addRevision to copy attachments
|
||||
|
|
@ -727,29 +657,6 @@ sub processRaw {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 update
|
||||
|
||||
Override update from Asset.pm to handle backwards compatibility with the old
|
||||
packages that contain headBlocks. This will be removed in the future. Don't plan
|
||||
on this being here.
|
||||
|
||||
=cut
|
||||
|
||||
sub update {
|
||||
my $self = shift;
|
||||
my $requestedProperties = shift;
|
||||
my $properties = clone($requestedProperties);
|
||||
|
||||
if (exists $properties->{headBlock}) {
|
||||
$properties->{extraHeadTags} .= $properties->{headBlock};
|
||||
delete $properties->{headBlock};
|
||||
}
|
||||
|
||||
$self->SUPER::update($properties);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_edit
|
||||
|
||||
Hand draw this form so that a warning can be displayed to the user when editing a
|
||||
|
|
|
|||
|
|
@ -249,6 +249,7 @@ property icalFeeds => (
|
|||
defaultValue => [],
|
||||
serialize => 1,
|
||||
tab => "feeds",
|
||||
label => ['feeds','Asset_Calendar'],
|
||||
fields => [
|
||||
{
|
||||
name => 'feedId',
|
||||
|
|
@ -258,17 +259,17 @@ property icalFeeds => (
|
|||
name => 'url',
|
||||
type => 'text',
|
||||
size => '40',
|
||||
label => $i18n->get('Feed URL'),
|
||||
label => ['Feed URL','Asset_Calendar'],
|
||||
},
|
||||
{
|
||||
name => 'status',
|
||||
type => 'readonly',
|
||||
label => $i18n->get('434','WebGUI'),
|
||||
label => ['434','WebGUI'],
|
||||
},
|
||||
{
|
||||
name => 'lastUpdated',
|
||||
type => 'readonly',
|
||||
label => $i18n->get('454', 'WebGUI'),
|
||||
label => ['454', 'WebGUI'],
|
||||
},
|
||||
],
|
||||
);
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ sub commitAsUser {
|
|||
return 0 unless (defined $userId);
|
||||
|
||||
#Open a new session
|
||||
my $new_session = WebGUI::Session->open( $config->getWebguiRoot, $config->getFilename );
|
||||
my $new_session = WebGUI::Session->open( $config->getFilename );
|
||||
#Set the userId in the new session
|
||||
$new_session->user( { userId => $userId } );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue