some bug fixes
This commit is contained in:
parent
c61247768d
commit
12b4c40c92
7 changed files with 42 additions and 13 deletions
|
|
@ -7,6 +7,9 @@
|
|||
- fix [ 1157196 ] manage system clipboard wrong title
|
||||
- fix [ 1154150 ] No time in forum overview
|
||||
- fix [ 1152434 ] Last Reply column is blank in a forum [mwilson]
|
||||
- fix [ 1158944 ] Validate email addresses?
|
||||
- fix [ 1157311 ] Edit User Profile fails on Windows/Firefox
|
||||
|
||||
|
||||
6.5.0
|
||||
- Added content prototypes.
|
||||
|
|
|
|||
|
|
@ -1 +1,6 @@
|
|||
insert into webguiVersion values ('6.5.1','upgrade',unix_timestamp());
|
||||
alter table Collaboration add column displayLastReply int not null default 0;
|
||||
update Collaboration set displayLastReply=1 where CollaborationTemplateId='PBtmpl0000000000000026';
|
||||
update template set template='<a name=\"<tmpl_var assetId>\"></a> \r\n<tmpl_if session.var.adminOn> \r\n <p><tmpl_var controls></p> \r\n</tmpl_if>\r\n\r\n<p>\r\n<tmpl_if user.canPost>\r\n <a href=\"<tmpl_var add.url>\"><tmpl_var add.label></a>\r\n <tmpl_unless user.isVisitor>\r\n • \r\n <tmpl_if user.isSubscribed>\r\n <a href=\"<tmpl_var unsubscribe.url>\"><tmpl_var unsubscribe.label></a>\r\n <tmpl_else>\r\n <a href=\"<tmpl_var subscribe.url>\"><tmpl_var subscribe.label></a>\r\n </tmpl_if>\r\n </tmpl_unless>\r\n •\r\n</tmpl_if>\r\n<a href=\"<tmpl_var search.url>\"><tmpl_var search.label></a>\r\n</p>\r\n\r\n<table width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" border=\"0\">\r\n<tr>\r\n <td class=\"tableHeader\"><tmpl_var subject.label></td>\r\n <td class=\"tableHeader\"><tmpl_var user.label></td>\r\n <td class=\"tableHeader\"><a href=\"<tmpl_var sortby.views.url>\"><tmpl_var views.label></a></td>\r\n <td class=\"tableHeader\"><a href=\"<tmpl_var sortby.replies.url>\"><tmpl_var replies.label></a></td>\r\n <td class=\"tableHeader\"><a href=\"<tmpl_var sortby.rating.url>\"><tmpl_var rating.label></a></td>\r\n <td class=\"tableHeader\"><a href=\"<tmpl_var sortby.date.url>\"><tmpl_var date.label></a></td>\r\n <tmpl_if displayLastReply>\r\n <td class=\"tableHeader\"><a href=\"<tmpl_var sortby.lastreply.url>\"><tmpl_var lastReply.label></a></td>\r\n </tmpl_if>\r\n</tr>\r\n<tmpl_loop post_loop>\r\n<tr>\r\n <td class=\"tableData\"><a href=\"<tmpl_var url>\"><tmpl_var title></a></td>\r\n <tmpl_if user.isVisitor>\r\n <td class=\"tableData\"><tmpl_var username></td>\r\n <tmpl_else>\r\n <td class=\"tableData\"><a href=\"<tmpl_var userProfile.url>\"><tmpl_var username></a></td>\r\n </tmpl_if>\r\n <td class=\"tableData\" align=\"center\"><tmpl_var views></td>\r\n <td class=\"tableData\" align=\"center\"><tmpl_var replies></td>\r\n <td class=\"tableData\" align=\"center\"><tmpl_var rating></td>\r\n <td class=\"tableData\"><tmpl_var dateSubmitted.human> @ <tmpl_var timeSubmitted.human></td>\r\n <tmpl_if displayLastReply>\r\n <td class=\"tableData\" style=\"font-size: 11px;\">\r\n <a href=\"<tmpl_var lastReply.url>\"><tmpl_var lastReply.title></a>\r\n by \r\n <tmpl_if lastReply.user.isVisitor>\r\n <tmpl_var lastReply.username>\r\n <tmpl_else>\r\n <a href=\"<tmpl_var lastReply.userProfile.url>\"><tmpl_var lastReply.username></a>\r\n </tmpl_if>\r\n on <tmpl_var lastReply.dateSubmitted.human> @ <tmpl_var lastReply.timeSubmitted.human>\r\n </td>\r\n </tmpl_if>\r\n</tr>\r\n</tmpl_loop>\r\n</table>\r\n\r\n<tmpl_if pagination.pageCount.isMultiple>\r\n <div class=\"pagination\">\r\n <tmpl_var pagination.previousPage> · <tmpl_var pagination.pageList.upTo10> · <tmpl_var pagination.nextPage>\r\n </div>\r\n</tmpl_if>\r\n\r\n\r\n' where assetId='PBtmpl0000000000000026';
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -131,11 +131,11 @@ sub getIcon {
|
|||
sub getLastPost {
|
||||
my $self = shift;
|
||||
my $lastPostId = $self->get("lastPostId");
|
||||
my $lastPost = 0;
|
||||
my $lastPost;
|
||||
if ($lastPostId) {
|
||||
$lastPost = WebGUI::Asset->new($lastPostId);
|
||||
$lastPost = WebGUI::Asset::Post::Thread->new($lastPostId);
|
||||
}
|
||||
return $lastPost if ($lastPost);
|
||||
return $lastPost if (defined $lastPost);
|
||||
return $self;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,19 @@ sub appendPostListTemplateVars {
|
|||
for (my $i=0;$i<=$post->get("rating");$i++) {
|
||||
push(@rating_loop,{'rating_loop.count'=>$i});
|
||||
}
|
||||
my $lastPost = $post->WebGUI::Asset::Post::Thread::getLastPost();
|
||||
my $lastPost = $post->getLastPost();
|
||||
my %lastReply;
|
||||
if ($self->get("displayLastReply")) {
|
||||
%lastReply = (
|
||||
"lastReply.url"=>$lastPost->getUrl(),
|
||||
"lastReply.title"=>$lastPost->get("title"),
|
||||
"lastReply.user.isVisitor"=>$lastPost->get("ownerUserId") eq "1",
|
||||
"lastReply.username"=>$lastPost->get("username"),
|
||||
"lastReply.userProfile.url"=>$lastPost->WebGUI::Asset::Post::getPosterProfileUrl(),
|
||||
"lastReply.dateSubmitted.human"=>epochToHuman($lastPost->get("dateSubmitted"),"%z"),
|
||||
"lastReply.timeSubmitted.human"=>epochToHuman($lastPost->get("dateSubmitted"),"%Z")
|
||||
);
|
||||
}
|
||||
push(@{$var->{post_loop}}, {
|
||||
%{$post->get},
|
||||
"id"=>$post->getId,
|
||||
|
|
@ -78,13 +90,6 @@ sub appendPostListTemplateVars {
|
|||
"timeUpdated.human"=>epochToHuman($post->get("dateUpdated"),"%Z"),
|
||||
"userProfile.url"=>$post->getPosterProfileUrl,
|
||||
"user.isVisitor"=>$post->get("ownerUserId") eq "1",
|
||||
"lastReply.url"=>$lastPost->getUrl(),
|
||||
"lastReply.title"=>$lastPost->get("title"),
|
||||
"lastReply.user.isVisitor"=>$lastPost->get("ownerUserId") eq "1",
|
||||
"lastReply.username"=>$lastPost->get("username"),
|
||||
"lastReply.userProfile.url"=>$lastPost->WebGUI::Asset::Post::getPosterProfileUrl(),
|
||||
"lastReply.dateSubmitted.human"=>epochToHuman($lastPost->get("dateSubmitted"),"%z"),
|
||||
"lastReply.timeSubmitted.human"=>epochToHuman($lastPost->get("dateSubmitted"),"%Z"),
|
||||
"edit.url"=>$post->getEditUrl,
|
||||
'controls'=>$controls,
|
||||
'inDateRange'=>$inDateRange,
|
||||
|
|
@ -92,7 +97,8 @@ sub appendPostListTemplateVars {
|
|||
"isThird"=>(($i+1)%3==0),
|
||||
"isFourth"=>(($i+1)%4==0),
|
||||
"isFifth"=>(($i+1)%5==0),
|
||||
"user.isPoster"=>$post->isPoster
|
||||
"user.isPoster"=>$post->isPoster,
|
||||
%lastReply
|
||||
});
|
||||
$i++;
|
||||
}
|
||||
|
|
@ -247,6 +253,10 @@ sub definition {
|
|||
tableName=>'Collaboration',
|
||||
className=>'WebGUI::Asset::Wobject::Collaboration',
|
||||
properties=>{
|
||||
displayLastReply =>{
|
||||
fieldType=>"yesNo",
|
||||
defaultValue=>0
|
||||
},
|
||||
allowReplies =>{
|
||||
fieldType=>"yesNo",
|
||||
defaultValue=>1
|
||||
|
|
@ -389,6 +399,11 @@ sub duplicate {
|
|||
sub getEditForm {
|
||||
my $self = shift;
|
||||
my $tabform = $self->SUPER::getEditForm;
|
||||
$tabform->getTab("display")->yesNo(
|
||||
-value=>$self->getValue('displayLastReply'),
|
||||
-label=>WebGUI::International::get('display last reply', 'Collaboration'),
|
||||
-name=>"displayLastReply"
|
||||
);
|
||||
$tabform->getTab("display")->template(
|
||||
-value=>$self->getValue('collaborationTemplateId'),
|
||||
-namespace=>"Collaboration",
|
||||
|
|
|
|||
|
|
@ -230,6 +230,7 @@ sub createAccountSave {
|
|||
WebGUI::International::get('email address validation email subject','AuthWebGUI'),
|
||||
WebGUI::International::get('email address validation email body','AuthWebGUI')."\n\n".WebGUI::URL::getSiteURL().WebGUI::URL::page("op=auth&method=validateEmail&key=".$key),
|
||||
);
|
||||
$self->SUPER::deactivateAccount("deactivateAccountConfirm");
|
||||
$self->logout;
|
||||
return $self->displayLogin(WebGUI::International::get('check email for validation','AuthWebGUI'));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1562,7 +1562,7 @@ sub submit {
|
|||
$value = _fixQuotes($value);
|
||||
my $wait = WebGUI::International::get(452);
|
||||
my $extras = $params->{extras} || 'onclick="this.value=\''.$wait.'\'"';
|
||||
return '<input type="submit" value="'.$value.'" '.$params->{extras}.' />';
|
||||
return '<input type="submit" value="'.$value.'" '.$extras.' />';
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
package WebGUI::i18n::English::Collaboration;
|
||||
|
||||
our $I18N = {
|
||||
'display last reply' => {
|
||||
message => q|Display last reply?|,
|
||||
lastUpdated => 1109618544,
|
||||
},
|
||||
|
||||
'preview' => {
|
||||
message => q|Preview|,
|
||||
lastUpdated => 1109618544,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue