- The export system now attempts to create the export path if it doesn't

already exist.
 - fix [ 1287741 ] 6.7.3 Cannot insert a WebGUI collateral image in IE.
 - fix [ 1293163 ] Error when using Syndication
 - fix [ 1295718 ] Moderating submissions/posts is broken
 - fix [ 1288770 ] Couldn't call method www_view on asset
 - fix [ 1278672 ] Timezones does not still not work properly in webgui
This commit is contained in:
JT Smith 2005-09-21 20:04:15 +00:00
parent 7a76e2efdc
commit 5efbd4a709
8 changed files with 32 additions and 11 deletions

View file

@ -8,7 +8,8 @@
- Workedaround a bug for broken xml docs in Syndicated Content. (mwilson)
- fix [ 1293947 ] 6.7.3 Cannot use a second AssetProxy with IE, Stack overflow (Wouter van Oijen / ProcoliX)
- Added a few more performance enhanceers which can cut the number of
database queries per page in half in some cases.
database queries per page in half in some cases. And can reduce the number
of queries on Collaboration System related pages even further.
- fix [ 1292597 ] Trash not emptied
- fix [ 1292209 ] purgeTree called in runHourly.pl (6.7.4)
- fix [ 1290600 ] 6.6.5-6.7.0 upgrade script (fix) (Nicklous Roberts)
@ -22,6 +23,14 @@
- fix [ 1295921 ] Problem with Survey content.
- fix [ 1290460 ] Survey error when adding multiple choice answers
- fix [ 1288887 ] new user information mail dos'nt contains the username
- The export system now attempts to create the export path if it doesn't
already exist.
- fix [ 1287741 ] 6.7.3 Cannot insert a WebGUI collateral image in IE.
- fix [ 1293163 ] Error when using Syndication
- fix [ 1295718 ] Moderating submissions/posts is broken
- fix [ 1288770 ] Couldn't call method www_view on asset
- fix [ 1278672 ] Timezones does not still not work properly in webgui
6.7.4
- fix [ 1279861 ] POD errors in 6.7.3

View file

@ -204,6 +204,11 @@ sub definition {
fieldType=>'dateTime',
defaultValue=>32472169200
},
status=>{
noFormPost=>1,
fieldType=>'hidden',
defaultValue=>'approved'
},
assetSize=>{
noFormPost=>1,
fieldType=>'hidden',

View file

@ -756,7 +756,7 @@ Sets the post to approved and sends any necessary notifications.
sub setStatusApproved {
my $self = shift;
$self->update({status=>'approved'});
$self->commit;
$self->getThread->incrementReplies($self->get("dateUpdated"),$self->getId) if $self->isReply;
unless ($self->isPoster) {
WebGUI::MessageLog::addInternationalizedEntry($self->get("ownerUserId"),'',$self->getUrl,579);
@ -810,7 +810,7 @@ sub setStatusPending {
} else {
$self->update({status=>'pending'});
WebGUI::MessageLog::addInternationalizedEntry('',$self->getThread->getParent->get("moderateGroupId"),
$self->getUrl("func=view"),578,'WebGUI','pending');
$self->getUrl,578,'WebGUI','pending');
}
}

View file

@ -650,7 +650,7 @@ sub view {
$var->{'unlock.url'} = $self->getUnlockUrl;
my $p = WebGUI::Paginator->new($self->getUrl,$self->getParent->get("postsPerPage"));
my $sql = "select asset.assetId, asset.className, max(assetData.revisionDate) from asset
my $sql = "select asset.assetId, asset.className, max(assetData.revisionDate) as revisionDate from asset
left join assetData on assetData.assetId=asset.assetId
left join Post on Post.assetId=assetData.assetId and assetData.revisionDate=Post.revisionDate
where asset.lineage like ".quote($self->get("lineage").'%')

View file

@ -41,7 +41,6 @@ sub appendPostListTemplateVars {
my $page = $p->getPageData;
my $i = 0;
foreach my $row (@$page) {
#my $post = WebGUI::Asset::Wobject::Collaboration->newByPropertyHashRef($row);
my $post = WebGUI::Asset::Wobject::Collaboration->new($row->{assetId}, $row->{className}, $row->{revisionDate});
$post->{_parent} = $self; # caching parent for efficiency
my $controls = deleteIcon('func=delete',$post->get("url"),"Delete").editIcon('func=edit',$post->get("url"));
@ -903,7 +902,7 @@ sub view {
$constraints .= " or assetData.status='pending'";
}
$constraints .= ")";
my $sql = "select asset.assetId,asset.className,max(assetData.revisionDate)
my $sql = "select asset.assetId,asset.className,max(assetData.revisionDate) as revisionDate
from Thread
left join asset on Thread.assetId=asset.assetId
left join Post on Post.assetId=Thread.assetId and Thread.revisionDate = Post.revisionDate
@ -1030,7 +1029,7 @@ sub www_search {
}
# please note that the SQL generated here-in is not for the feint of heart, mind, or stomach
# this is for trained professionals only and should not be attempted at home
my $sql = "select asset.assetId, asset.className, max(assetData.revisionDate)
my $sql = "select asset.assetId, asset.className, max(assetData.revisionDate) as revisionDate
from asset
left join assetData on assetData.assetId=asset.assetId
left join Post on Post.assetId=assetData.assetId and assetData.revisionDate = Post.revisionDate

View file

@ -54,7 +54,10 @@ sub checkExportPath {
Make sure that the webserver has permissions to write to that directory';
}
} else {
$error .= 'Error: The export path '.$session{config}{exportPath}.' does not exist.';
eval {mkpath($session{config}{exportPath},0)};
if ($@) {
$error .= 'Error: The export path '.$session{config}{exportPath}.' does not exist, and couldn\'t create it because '.$@;
}
}
} else {
$error.= 'Error: The export path is not configured. Please set the exportPath variable in the WebGUI config file';

View file

@ -70,8 +70,8 @@ sub addRevision {
my $newVersion = WebGUI::Asset->new($self->getId, $self->get("className"), $now);
$newVersion->updateHistory("created revision");
$newVersion->update($self->get);
$newVersion->update($properties) if ($properties);
$newVersion->setVersionLock unless ($session{setting}{autoCommit});
$newVersion->update($properties) if ($properties);
return $newVersion;
}
@ -127,7 +127,7 @@ Unlock's the asset and sets it to approved.
sub commit {
my $self = shift;
$self->unsetVersionLock;
WebGUI::SQL->write("update assetData set status='approved' where assetId=".quote($self->getId)." and revisionDate=".quote($self->get("revisionDate")));
$self->update({status=>'approved'});
$self->purgeCache;
}

View file

@ -744,8 +744,13 @@ A string in the format of YYYY-MM-DD or YYYY-MM-DD HH:MM:SS.
=cut
sub setToEpoch {
my $set = shift;
# in epochToSet we use epochToHuman, which includes the time
# offset of the user, so we need to remove that here.
my $offset = $session{user}{timeOffset} || 0;
$set -= $offset*3600;
my @now = epochToArray(WebGUI::DateTime::time());
my ($date,$time) = split(/ /,$_[0]);
my ($date,$time) = split(/ /,$set);
my ($year, $month, $day) = split(/\-/,$date);
my ($hour, $minute, $second) = split(/\:/,$time);
if (int($year) < 3000 && int($year) > 1000) {