- Fixed a problem where you couldn't upgrade directly to 7.3.9 from versions
earlier than 7.3.8.
This commit is contained in:
parent
126978314f
commit
e594cb3d6c
5 changed files with 35 additions and 14 deletions
|
|
@ -337,11 +337,6 @@ sub definition {
|
|||
fieldType=>'hidden',
|
||||
defaultValue=>0
|
||||
},
|
||||
skipNotification=>{
|
||||
noFormPost=>1,
|
||||
fieldType=>'hidden',
|
||||
defaultValue=>0
|
||||
},
|
||||
);
|
||||
push(@{$definition}, {
|
||||
assetName=>$i18n->get("asset"),
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ sub commit {
|
|||
my $self = shift;
|
||||
$self->SUPER::commit;
|
||||
|
||||
$self->notifySubscribers unless ($self->get("skipNotification"));
|
||||
$self->notifySubscribers unless ($self->shouldSkipNotification);
|
||||
|
||||
if ($self->isNew) {
|
||||
if ($self->session->setting->get("useKarma") && $self->getThread->getParent->get("karmaPerPost")) {
|
||||
|
|
|
|||
|
|
@ -958,7 +958,7 @@ sub definition {
|
|||
push(@{$definition}, {
|
||||
tableName=>'SQLForm',
|
||||
className=>'WebGUI::Asset::Wobject::SQLForm',
|
||||
name=>$i18n->get('assetName'),
|
||||
assetName=>$i18n->get('assetName'),
|
||||
icon=>'sqlform.gif',
|
||||
properties=>{
|
||||
formId => {
|
||||
|
|
|
|||
|
|
@ -84,10 +84,6 @@ sub addRevision {
|
|||
|
||||
my $autoCommitId = $self->getAutoCommitWorkflowId() unless ($options->{skipAutoCommitWorkflows});
|
||||
|
||||
#Handle skip notifications
|
||||
my $skipNotification = $options->{skipNotification} || 0;
|
||||
$properties->{skipNotification} = $skipNotification;
|
||||
|
||||
my $workingTag
|
||||
= ($autoCommitId)
|
||||
? WebGUI::VersionTag->create($self->session, {groupToUse=>'12', workflowId=>$autoCommitId})
|
||||
|
|
@ -98,8 +94,8 @@ sub addRevision {
|
|||
$self->session->db->beginTransaction;
|
||||
|
||||
my $sql = "insert into assetData"
|
||||
. " (assetId, revisionDate, revisedBy, tagId, status, url, ownerUserId, groupIdEdit, groupIdView, skipNotification)"
|
||||
. " values (?, ?, ?, ?, 'pending', ?, '3','3','7',?)"
|
||||
. " (assetId, revisionDate, revisedBy, tagId, status, url, ownerUserId, groupIdEdit, groupIdView)"
|
||||
. " values (?, ?, ?, ?, 'pending', ?, '3','3','7')"
|
||||
;
|
||||
|
||||
$self->session->db->write($sql,[
|
||||
|
|
@ -108,7 +104,6 @@ sub addRevision {
|
|||
$self->session->user->userId,
|
||||
$workingTag->getId,
|
||||
$self->getId,
|
||||
$skipNotification,
|
||||
]
|
||||
);
|
||||
|
||||
|
|
@ -124,6 +119,7 @@ sub addRevision {
|
|||
|
||||
#Instantiate new revision and fill with real data
|
||||
my $newVersion = WebGUI::Asset->new($self->session,$self->getId, $self->get("className"), $now);
|
||||
$newVersion->setSkipNotification if ($options->{skipNotification});
|
||||
$newVersion->updateHistory("created revision");
|
||||
$newVersion->update($self->get);
|
||||
$newVersion->setVersionLock;
|
||||
|
|
@ -338,6 +334,19 @@ sub setAutoCommitTag {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 setSkipNotification ( )
|
||||
|
||||
Sets a flag so that developers know whether to send notifications out on certain types of edits.
|
||||
|
||||
=cut
|
||||
|
||||
sub setSkipNotification {
|
||||
my $self = shift;
|
||||
$self->session->db->write("update assetData set skipNotification=1 where assetId=? and revisionDate=?", [$self->getId, $self->get("revisionDate")]);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 setVersionLock ( )
|
||||
|
||||
Sets the versioning lock to "on" so that this piece of content may not be edited by anyone else now that it has been edited.
|
||||
|
|
@ -352,6 +361,21 @@ sub setVersionLock {
|
|||
}
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 shouldSkipNotification ( )
|
||||
|
||||
Returns true if the asset should disable whatever notifications it does for this edit.
|
||||
|
||||
=cut
|
||||
|
||||
sub shouldSkipNotification {
|
||||
my $self = shift;
|
||||
return $self->get("skipNotification");
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 unsetVersionLock ( )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue