WebGUI 3.6.0 release
This commit is contained in:
parent
81da4fe3af
commit
0997fc100c
22 changed files with 3085 additions and 103 deletions
|
|
@ -17,6 +17,7 @@ use Tie::CPHash;
|
|||
use WebGUI::Attachment;
|
||||
use WebGUI::DateTime;
|
||||
use WebGUI::Discussion;
|
||||
use WebGUI::HTML;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::Privilege;
|
||||
|
|
@ -35,6 +36,7 @@ sub _showReplies {
|
|||
$html .= '<tr><td class="tableHeader">'.WebGUI::International::get(229).'</td><td class="tableHeader">'.WebGUI::International::get(22,$namespace).'</td><td class="tableHeader">'.WebGUI::International::get(23,$namespace).'</td></tr>';
|
||||
$sth = WebGUI::SQL->read("select messageId,subject,username,dateOfPost,userId from discussion where widgetId=$session{form}{wid} and pid=0 order by messageId desc");
|
||||
while (@data = $sth->array) {
|
||||
$data[1] = WebGUI::HTML::filter($data[1],'all');
|
||||
$html .= '<tr';
|
||||
if ($data[0] == $session{form}{mid}) {
|
||||
$html .= ' class="highlight"';
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ use strict;
|
|||
use Tie::CPHash;
|
||||
use WebGUI::DateTime;
|
||||
use WebGUI::Discussion;
|
||||
use WebGUI::HTML;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::Privilege;
|
||||
|
|
@ -319,6 +320,7 @@ sub www_showMessage {
|
|||
'</td><td class="tableHeader">'.WebGUI::International::get(15,$namespace).
|
||||
'</td><td class="tableHeader">'.WebGUI::International::get(16,$namespace).'</td></tr>';
|
||||
@data = WebGUI::SQL->quickArray("select messageId,subject,username,dateOfPost,userId from discussion where messageId=$message{rid}");
|
||||
$data[1] = WebGUI::HTML::filter($data[1],'all');
|
||||
$html .= '<tr';
|
||||
if ($session{form}{mid} eq $message{rid}) {
|
||||
$html .= ' class="highlight"';
|
||||
|
|
@ -365,8 +367,10 @@ sub www_view {
|
|||
#$sth = WebGUI::SQL->read("select messageId,subject,count(*)-1,username,dateOfPost,max(dateOfPost),max(messageId) from discussion where widgetId=$_[0] group by rid order by messageId desc");
|
||||
$sth = WebGUI::SQL->read("select messageId,subject,username,dateOfPost,userId from discussion where widgetId=$_[0] and pid=0 order by messageId desc");
|
||||
while (@data = $sth->array) {
|
||||
$data[1] = WebGUI::HTML::filter($data[1],'all');
|
||||
if ($i >= ($itemsPerPage*$pn) && $i < ($itemsPerPage*($pn+1))) {
|
||||
@last = WebGUI::SQL->quickArray("select messageId,dateOfPost,username,subject,userId from discussion where widgetId=$_[0] and rid=$data[0] order by dateOfPost desc");
|
||||
$last[3] = WebGUI::HTML::filter($last[3],'all');
|
||||
($replies) = WebGUI::SQL->quickArray("select count(*)-1 from discussion where rid=$data[0]");
|
||||
$html .= '<tr><td class="tableData"><a href="'.WebGUI::URL::page('func=showMessage&mid='.
|
||||
$data[0].'&wid='.$_[0]).'">'.substr($data[1],0,30).
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ sub www_edit {
|
|||
sub www_editSave {
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
update();
|
||||
WebGUI::SQL->write("update SiteMap set startAtThisLevel='$session{form}{startAtThisLevel}', depth='$session{form}{depth}', indent='$session{form}{indent}', bullet=".quote($session{form}{bullet}).", lineSpacing='$session{form}{lineSpacing}' where widgetId=$session{form}{wid}");
|
||||
WebGUI::SQL->write("update SiteMap set startAtThisLevel='$session{form}{startAtThisLevel}', depth='$session{form}{depth}', indent='$session{form}{indent}', bullet=".quote($session{form}{bullet}).", lineSpacing='$session{form}{lineSpacing}', displaySynopsis='$session{form}{displaySynopsis}' where widgetId=$session{form}{wid}");
|
||||
return "";
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ use strict;
|
|||
use Tie::CPHash;
|
||||
use WebGUI::Attachment;
|
||||
use WebGUI::DateTime;
|
||||
use WebGUI::HTML;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::MessageLog;
|
||||
|
|
@ -129,6 +130,7 @@ sub www_addSubmission {
|
|||
$output .= '<tr><td class="tableHeader">'.WebGUI::International::get(15,$namespace).'</td><td class="tableHeader">'.WebGUI::International::get(99).'</td><td class="tableHeader">'.WebGUI::International::get(13,$namespace).'</td><td class="tableHeader">'.WebGUI::International::get(14,$namespace).'</td></tr>';
|
||||
$sth = WebGUI::SQL->read("select title,submissionId,dateSubmitted,status from UserSubmission_submission where widgetId='$session{form}{wid}' and userId=$session{user}{userId} order by dateSubmitted desc");
|
||||
while (@submission = $sth->array) {
|
||||
$submission[0] = WebGUI::HTML::filter($submission[0],'all');
|
||||
$output .= '<tr><td class="tableData"><a href="'.WebGUI::URL::page('func=editSubmission&wid='.
|
||||
$session{form}{wid}.'&sid='.$submission[1]).'"><img src="'.$session{setting}{lib}.
|
||||
'/edit.gif" border=0></a><a href="'.WebGUI::URL::page('wid='.$session{form}{wid}.
|
||||
|
|
@ -341,7 +343,7 @@ sub www_editSubmission {
|
|||
$output .= WebGUI::Form::hidden("func","editSubmissionSave");
|
||||
$output .= '<table>';
|
||||
$output .= tableFormRow(WebGUI::International::get(35,$namespace),WebGUI::Form::text("title",20,128,$submission{title}));
|
||||
$output .= tableFormRow(WebGUI::International::get(31,$namespace),WebGUI::Form::textArea("content",$submission{content},50,10));
|
||||
$output .= tableFormRow(WebGUI::International::get(31,$namespace),WebGUI::Form::textArea("content",$submission{content},50,10,1));
|
||||
if ($submission{image} ne "") {
|
||||
$output .= tableFormRow(WebGUI::International::get(32,$namespace),'<a href="'.
|
||||
WebGUI::URL::page('func=deleteImage&wid='.$session{form}{wid}.'&sid='.
|
||||
|
|
@ -419,6 +421,7 @@ sub www_view {
|
|||
}
|
||||
$sth = WebGUI::SQL->read("select title,submissionId,dateSubmitted,username,userId from UserSubmission_submission where widgetId='$_[0]' and status='Approved' order by dateSubmitted desc");
|
||||
while (@submission = $sth->array) {
|
||||
$submission[0] = WebGUI::HTML::filter($submission[0],'all');
|
||||
$row[$i] = '<tr><td class="tableData"><a href="'.WebGUI::URL::page('wid='.$_[0].
|
||||
'&func=viewSubmission&sid='.$submission[1]).'">'.$submission[0].
|
||||
'</a></td><td class="tableData">'.epochToHuman($submission[2],"%M/%D/%y").
|
||||
|
|
@ -447,6 +450,8 @@ sub www_viewSubmission {
|
|||
my ($output, %submission, $file);
|
||||
tie %submission, 'Tie::CPHash';
|
||||
%submission = WebGUI::SQL->quickHash("select * from UserSubmission_submission where submissionId=$session{form}{sid}");
|
||||
$submission{title} = WebGUI::HTML::filter($submission{title},'all');
|
||||
$submission{content} = WebGUI::HTML::filter($submission{content},$session{setting}{filterContributedHTML});
|
||||
$output = "<h1>".$submission{title}."</h1>";
|
||||
$output .= '<table width="100%" cellpadding=2 cellspacing=1 border=0>';
|
||||
$output .= '<tr><td class="tableHeader">';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue