bugfixes and preparing for 6.2.3 release
This commit is contained in:
parent
1713df81c6
commit
eeecbe8afb
10 changed files with 47 additions and 18 deletions
|
|
@ -13,6 +13,14 @@
|
|||
dir (Yary Hluchan)
|
||||
- bugfix [ 1027684 ] cp silent failure in Attatchment.pm (Yary Hluchan)
|
||||
- bugfix [ 1027681 ] Some warnings hard to track down (Yary Hluchan)
|
||||
- bugfix [ 1027950 ] Collateral problem(s)
|
||||
- bugfix [ 1028110 ] 6.2.2 PageTree doesn't format AND move buttons don't
|
||||
work
|
||||
- bugfix [ 1027687 ] Events List does not show events
|
||||
- bugfix [ 1028054 ] 6.2.2 USS uploads do not show on list
|
||||
- Fixed a problem with the dTree navigation template.
|
||||
- bugfix [ 998249 ] Moving Survey Questions - Incorrect Redirection
|
||||
- bugfix [ 1029170 ] Forum: Sorting thread by date
|
||||
|
||||
|
||||
6.2.2
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,3 +1,7 @@
|
|||
insert into webguiVersion values ('6.2.3','upgrade',unix_timestamp());
|
||||
update collateralFolder set parentId='-1' where parentId='0';
|
||||
|
||||
delete from template where namespace='Navigation' and templateId='6';
|
||||
|
||||
INSERT INTO template VALUES ('6','dtree','^StyleSheet(\"<tmpl_var session.config.extrasURL>/Navigation/dtree/dtree.css\");\r\n^JavaScript(\"<tmpl_var session.config.extrasURL>/Navigation/dtree/dtree.js\");\r\n\r\n<tmpl_if session.var.adminOn>\r\n<tmpl_var config.button>\r\n</tmpl_if>\r\n\r\n<script>\r\n// Path to dtree directory\r\n_dtree_url = \"<tmpl_var session.config.extrasURL>/Navigation/dtree/\";\r\n</script>\r\n\r\n<div class=\"dtree\">\r\n<script type=\"text/javascript\">\r\n<!--\r\n d = new dTree(\'d\');\r\n <tmpl_loop page_loop>\r\n d.add(\r\n \'<tmpl_var page.pageId>\',\r\n <tmpl_if __first__>-99<tmpl_else>\'<tmpl_var page.parentId>\'</tmpl_if>,\r\n \'<tmpl_var page.menuTitle>\',\r\n \'<tmpl_var page.url>\',\r\n \'<tmpl_var page.synopsis>\'\r\n <tmpl_if page.newWindow>,\'_blank\'</tmpl_if>\r\n );\r\n </tmpl_loop>\r\n document.write(d);\r\n//-->\r\n</script>\r\n\r\n</div>','Navigation',1,1);
|
||||
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ sub addToDate {
|
|||
$years = shift || 0;
|
||||
$months = shift || 0;
|
||||
$days = shift || 0;
|
||||
$newDate = DateCalc($date,"$years:$months:0:$days:0:0:0");
|
||||
$newDate = DateCalc($date,"+$years:$months:0:$days:0:0:0");
|
||||
return &dateToEpoch($newDate);
|
||||
}
|
||||
|
||||
|
|
@ -141,7 +141,7 @@ sub addToTime {
|
|||
$hours = shift || 0;
|
||||
$mins = shift || 0;
|
||||
$secs = shift || 0;
|
||||
$newDate = DateCalc($date,"0:0:0:0:$hours:$mins:$secs");
|
||||
$newDate = DateCalc($date,"+0:0:0:0:$hours:$mins:$secs");
|
||||
return &dateToEpoch($newDate);
|
||||
}
|
||||
|
||||
|
|
@ -204,7 +204,14 @@ An epoch date.
|
|||
|
||||
sub epochToArray {
|
||||
my $epoch = shift;
|
||||
return &UnixDate(epochToDate($epoch),'%Y','%m','%d','%H','%M','%S');
|
||||
my @date = &UnixDate(epochToDate($epoch),'%Y','%m','%d','%H','%M','%S');
|
||||
$date[0] = $date[0]+0;
|
||||
$date[1] = $date[1]+0;
|
||||
$date[2] = $date[2]+0;
|
||||
$date[3] = $date[3]+0;
|
||||
$date[4] = $date[4]+0;
|
||||
$date[5] = $date[5]+0;
|
||||
return @date;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -618,8 +625,8 @@ sub monthCount {
|
|||
my $end = &epochToDate(shift);
|
||||
my $err;
|
||||
my $delta = &DateCalc($start,$end,\$err,1);
|
||||
return $delta;
|
||||
return &Delta_Format($delta,0,'%Mh');
|
||||
my $count = 1+&Delta_Format($delta,0,'%Mv')+&Delta_Format($delta,0,'%yv')*12;
|
||||
return $count;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -375,7 +375,7 @@ The message you wish to write to the log.
|
|||
|
||||
sub writeLog {
|
||||
if (my $log = FileHandle->new(">>".$WebGUI::Session::session{config}{logfile})) {
|
||||
print $log $_[0];
|
||||
print $log "\n".$_[0];
|
||||
printf $log '%s:%d (sub %s) ',(caller(2))[1,2,3];
|
||||
$log->close;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1011,7 +1011,7 @@ sub getForumTemplateVars {
|
|||
$var{'thread.sorted.'.$sortDir} = 1;
|
||||
if ($session{scratch}{forumSortBy} eq "date") {
|
||||
$var{'thread.sortedby.date'} = 1;
|
||||
$query .= "rootPostId $sortDir";
|
||||
$query .= "lastPostDate $sortDir";
|
||||
} elsif ($session{scratch}{forumSortBy} eq "views") {
|
||||
$var{'thread.sortedby.views'} = 1;
|
||||
$query .= "views $sortDir";
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ sub _traversePageTree {
|
|||
|
||||
tie %wobject, 'Tie::CPHash';
|
||||
$spacer = '<img src="'.$session{config}{extrasURL}.'/spacer.gif" width=12>';
|
||||
my $sth = WebGUI::SQL->read("select pageId,isSystem,urlizedTitle,title from page where parentId=".quote($parentId));
|
||||
my $sth = WebGUI::SQL->read("select pageId,isSystem,urlizedTitle,title from page where parentId=".quote($parentId)." order by nestedSetLeft");
|
||||
while (my ($pageId,$isSystem,$url,$title) = $sth->array) {
|
||||
unless ($isSystem) {
|
||||
$output .= $spacer x $initialDepth
|
||||
|
|
|
|||
|
|
@ -372,7 +372,7 @@ sub www_view {
|
|||
tie %previous, 'Tie::CPHash';
|
||||
if ($_[0]->get("startMonth") eq "first") {
|
||||
my $query = "select min(startDate) from EventsCalendar_event";
|
||||
$query .= " where wobjectId=".$_[0]->get("wobjectId") unless ($_[0]->get("isMaster"));
|
||||
$query .= " where wobjectId=".quote($_[0]->get("wobjectId")) unless ($_[0]->get("isMaster"));
|
||||
($minDate) = WebGUI::SQL->quickArray($query,WebGUI::SQL->getSlave);
|
||||
} elsif ($_[0]->get("startMonth") eq "january") {
|
||||
$minDate = WebGUI::DateTime::humanToEpoch(WebGUI::DateTime::epochToHuman("","%y")."-01-01 00:00:00");
|
||||
|
|
@ -384,7 +384,7 @@ sub www_view {
|
|||
}
|
||||
if ($_[0]->get("endMonth") eq "last") {
|
||||
my $query = "select max(endDate) from EventsCalendar_event";
|
||||
$query .= " where wobjectId=".$_[0]->get("wobjectId") unless ($_[0]->get("isMaster"));
|
||||
$query .= " where wobjectId=".quote($_[0]->get("wobjectId")) unless ($_[0]->get("isMaster"));
|
||||
($maxDate) = WebGUI::SQL->quickArray($query,WebGUI::SQL->getSlave);
|
||||
} elsif ($_[0]->get("endMonth") eq "after12") {
|
||||
$maxDate = WebGUI::DateTime::addToDate($minDate,1,0,0);
|
||||
|
|
@ -395,9 +395,15 @@ sub www_view {
|
|||
} elsif ($_[0]->get("endMonth") eq "after3") {
|
||||
$maxDate = WebGUI::DateTime::addToDate($minDate,0,3,0);
|
||||
}
|
||||
WebGUI::ErrorHandler::warn("Min:".$minDate);
|
||||
WebGUI::ErrorHandler::warn("Max:".$maxDate);
|
||||
|
||||
$maxDate = $maxDate || WebGUI::DateTime::time();
|
||||
WebGUI::ErrorHandler::warn("Max:".$maxDate);
|
||||
($junk,$maxDate) = WebGUI::DateTime::dayStartEnd($maxDate);
|
||||
WebGUI::ErrorHandler::warn("Max:".$maxDate);
|
||||
my $monthCount = WebGUI::DateTime::monthCount($minDate,$maxDate);
|
||||
WebGUI::ErrorHandler::warn("Count:".$monthCount);
|
||||
unless ($session{form}{calPn}) {
|
||||
$flag = 1;
|
||||
if ($_[0]->get("defaultMonth") eq "current") {
|
||||
|
|
@ -414,7 +420,7 @@ sub www_view {
|
|||
$var{"addevent.url"} = WebGUI::URL::page('func=editEvent&eid=new&wid='.$_[0]->get("wobjectId"));
|
||||
$var{"addevent.label"} = WebGUI::International::get(20,$_[0]->get("namespace"));
|
||||
my @monthloop;
|
||||
for (my $i=1;$i<=$monthCount;$i++) {
|
||||
for (my $i=1;$i<$monthCount;$i++) {
|
||||
# if ($session{form}{calPn} == ($i)) {
|
||||
my $thisMonth = WebGUI::DateTime::addToDate($minDate,0,($i-1),0);
|
||||
my ($monthStart, $monthEnd) = WebGUI::DateTime::monthStartEnd($thisMonth);
|
||||
|
|
|
|||
|
|
@ -829,14 +829,14 @@ sub www_moveAnswerUp {
|
|||
sub www_moveQuestionDown {
|
||||
return WebGUI::Privilege::insufficient() unless ($_[0]->canEdit);
|
||||
$_[0]->moveCollateralDown("Survey_question","Survey_questionId",$session{form}{qid},"Survey_id");
|
||||
return $_[0]->www_edit;
|
||||
return "";
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_moveQuestionUp {
|
||||
return WebGUI::Privilege::insufficient() unless ($_[0]->canEdit);
|
||||
$_[0]->moveCollateralUp("Survey_question","Survey_questionId",$session{form}{qid},"Survey_id");
|
||||
return $_[0]->www_edit;
|
||||
return "";
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -711,6 +711,7 @@ sub www_view {
|
|||
$var{"search.Form"} = WebGUI::Search::form({wid=>$_[0]->get("wobjectId"),func=>'view',search=>1});
|
||||
$var{"search.url"} = WebGUI::Search::toggleURL("wid=".$_[0]->get("wobjectId")."&func=view");
|
||||
$var{"rss.url"} = WebGUI::URL::page('func=viewRSS&wid='.$_[0]->get("wobjectId"));
|
||||
$var{canModerate} = WebGUI::Grouping::isInGroup($_[0]->get("groupToApprove"),$session{user}{userId});
|
||||
WebGUI::Style::setLink($var{"rss.url"},{ rel=>'alternate', type=>'application/rss+xml', title=>'RSS' });
|
||||
if ($session{scratch}{search}) {
|
||||
$numResults = $session{scratch}{numResults};
|
||||
|
|
@ -719,9 +720,12 @@ sub www_view {
|
|||
if ($constraints ne "") {
|
||||
$constraints = "USS_submission.status='Approved' and ".$constraints;
|
||||
} else {
|
||||
$constraints = "(USS_submission.status='Approved' or (USS_submission.userId=".quote($session{user}{userId})." and USS_submission.userId<>1))";
|
||||
$constraints = "(USS_submission.status='Approved' or (USS_submission.userId=".quote($session{user}{userId})." and USS_submission.userId<>1)";
|
||||
if ($var{canModerate}) {
|
||||
$constraints .= " or USS_submission.status='Pending'";
|
||||
}
|
||||
$constraints .= ")";
|
||||
}
|
||||
$var{canModerate} = WebGUI::Grouping::isInGroup($_[0]->get("groupToApprove"),$session{user}{userId});
|
||||
$var{"title.label"} = WebGUI::International::get(99);
|
||||
$var{"thumbnail.label"} = WebGUI::International::get(52,$_[0]->get("namespace"));
|
||||
$var{"date.label"} = WebGUI::International::get(13,$_[0]->get("namespace"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue