Fixed a couple bugs with the new USS.
This commit is contained in:
parent
02f368ff96
commit
f348a86ee9
3 changed files with 13 additions and 5 deletions
|
|
@ -52,7 +52,7 @@ alter table UserSubmission add column editTimeout int not null default 1;
|
||||||
alter table UserSubmission add column groupToPost int not null default 2;
|
alter table UserSubmission add column groupToPost int not null default 2;
|
||||||
alter table UserSubmission add column groupToApprove int not null default 4;
|
alter table UserSubmission add column groupToApprove int not null default 4;
|
||||||
INSERT INTO international VALUES (39,'UserSubmission','English','Post a Reply');
|
INSERT INTO international VALUES (39,'UserSubmission','English','Post a Reply');
|
||||||
INSERT INTO international VALUES (40,'UserSubmission','English','Posted By');
|
INSERT INTO international VALUES (40,'UserSubmission','English','Posted by');
|
||||||
INSERT INTO international VALUES (41,'UserSubmission','English','Date');
|
INSERT INTO international VALUES (41,'UserSubmission','English','Date');
|
||||||
INSERT INTO international VALUES (42,'UserSubmission','English','Edit Response');
|
INSERT INTO international VALUES (42,'UserSubmission','English','Edit Response');
|
||||||
INSERT INTO international VALUES (43,'UserSubmission','English','Delete Response');
|
INSERT INTO international VALUES (43,'UserSubmission','English','Delete Response');
|
||||||
|
|
|
||||||
|
|
@ -85,11 +85,12 @@ sub cleanSegment {
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub filter {
|
sub filter {
|
||||||
my ($filter, $html);
|
my ($filter, $html, $type);
|
||||||
if ($_[1] eq "all") {
|
$type = $_[1] || $session{setting}{filterContributedHTML};
|
||||||
|
if ($type eq "all") {
|
||||||
$filter = HTML::TagFilter->new(allow=>{'none'},strip_comments=>1);
|
$filter = HTML::TagFilter->new(allow=>{'none'},strip_comments=>1);
|
||||||
$html = $filter->filter($_[0]);
|
$html = $filter->filter($_[0]);
|
||||||
} elsif ($_[1] eq "none") {
|
} elsif ($type eq "none") {
|
||||||
$html = $_[0];
|
$html = $_[0];
|
||||||
} else {
|
} else {
|
||||||
$filter = HTML::TagFilter->new; # defaultly strips almost everything
|
$filter = HTML::TagFilter->new; # defaultly strips almost everything
|
||||||
|
|
|
||||||
|
|
@ -153,6 +153,8 @@ sub _weblogView {
|
||||||
where wobjectId=".$_[0]->get("wobjectId")." and (status='Approved' or userId=$session{user}{userId}) order by dateSubmitted desc");
|
where wobjectId=".$_[0]->get("wobjectId")." and (status='Approved' or userId=$session{user}{userId}) order by dateSubmitted desc");
|
||||||
while (%submission = $sth->hash) {
|
while (%submission = $sth->hash) {
|
||||||
$submission{title} = WebGUI::HTML::filter($submission{title},'all');
|
$submission{title} = WebGUI::HTML::filter($submission{title},'all');
|
||||||
|
$submission{content} = WebGUI::HTML::filter($submission{content});
|
||||||
|
($submission{content}) = split(/\^\-\;/,$submission{content});
|
||||||
($responses) = WebGUI::SQL->quickArray("select count(*) from discussion
|
($responses) = WebGUI::SQL->quickArray("select count(*) from discussion
|
||||||
where wobjectId=".$_[0]->get("wobjectId")." and subId=$submission{submissionId}");
|
where wobjectId=".$_[0]->get("wobjectId")." and subId=$submission{submissionId}");
|
||||||
$row[$i] = '<tr><td class="tableHeader">'.$submission{title};
|
$row[$i] = '<tr><td class="tableHeader">'.$submission{title};
|
||||||
|
|
@ -172,7 +174,11 @@ sub _weblogView {
|
||||||
.' - '.epochToHuman($submission{dateSubmitted},"%z \@ %Z").'</b><br/>'
|
.' - '.epochToHuman($submission{dateSubmitted},"%z \@ %Z").'</b><br/>'
|
||||||
.$submission{content}.'<p/> (<a href="'.WebGUI::URL::page('func=viewSubmission&wid='
|
.$submission{content}.'<p/> (<a href="'.WebGUI::URL::page('func=viewSubmission&wid='
|
||||||
.$_[0]->get("wobjectId").'&sid='.$submission{submissionId}).'">'.WebGUI::International::get(46,$namespace)
|
.$_[0]->get("wobjectId").'&sid='.$submission{submissionId}).'">'.WebGUI::International::get(46,$namespace)
|
||||||
.'</a> | '.$responses.' '.WebGUI::International::get(57,$namespace).')<p/></td></tr>';
|
.'</a>';
|
||||||
|
if ($_[0]->get("allowDiscussion")) {
|
||||||
|
$row[$i] .= ' | '.$responses.' '.WebGUI::International::get(57,$namespace)
|
||||||
|
}
|
||||||
|
$row[$i] .= ')<p/></td></tr>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$sth->finish;
|
$sth->finish;
|
||||||
|
|
@ -613,6 +619,7 @@ sub www_viewSubmission {
|
||||||
%submission = WebGUI::SQL->quickHash("select * from UserSubmission_submission where submissionId=$session{form}{sid}");
|
%submission = WebGUI::SQL->quickHash("select * from UserSubmission_submission where submissionId=$session{form}{sid}");
|
||||||
$submission{title} = WebGUI::HTML::filter($submission{title},'all');
|
$submission{title} = WebGUI::HTML::filter($submission{title},'all');
|
||||||
$submission{content} = WebGUI::HTML::filter($submission{content},$session{setting}{filterContributedHTML});
|
$submission{content} = WebGUI::HTML::filter($submission{content},$session{setting}{filterContributedHTML});
|
||||||
|
$submission{content} =~ s/\^\-\;//g;
|
||||||
$output = "<h1>".$submission{title}."</h1>";
|
$output = "<h1>".$submission{title}."</h1>";
|
||||||
$output .= '<table width="100%" cellpadding=2 cellspacing=1 border=0>';
|
$output .= '<table width="100%" cellpadding=2 cellspacing=1 border=0>';
|
||||||
$output .= '<tr><td class="tableHeader">';
|
$output .= '<tr><td class="tableHeader">';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue