WebGUI 3.6.1 release
This commit is contained in:
parent
0997fc100c
commit
6c593771e1
7 changed files with 102 additions and 22 deletions
|
|
@ -2999,5 +2999,6 @@ CREATE TABLE widget (
|
|||
|
||||
INSERT INTO widget VALUES (-1,4,'SiteMap',0,'Page Not Found',1,'The page you were looking for could not be found on this system. Perhaps it has been deleted or renamed. The following list is a site map of this site. If you don\'t find what you\'re looking for on the site map, you can always start from the <a href=\"^/;\">Home Page</a>.',1,1001744792,3,1016077239,3,'A');
|
||||
|
||||
insert into international values (438,'WebGUI','English','Your Name');
|
||||
|
||||
insert into webguiVersion values ('3.6.0','intitial install',unix_timestamp());
|
||||
insert into webguiVersion values ('3.6.1','intitial install',unix_timestamp());
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
3
docs/upgrades/upgrade_3.6.0-3.6.1.sql
Normal file
3
docs/upgrades/upgrade_3.6.0-3.6.1.sql
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
insert into webguiVersion values ('3.6.1','upgrade',unix_timestamp());
|
||||
insert into international values (438,'WebGUI','English','Your Name');
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
package WebGUI;
|
||||
our $VERSION = "3.6.0";
|
||||
our $VERSION = "3.6.1";
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2002 Plain Black Software.
|
||||
|
|
@ -163,7 +163,7 @@ sub page {
|
|||
($widgetType,$widgetPage) = WebGUI::SQL->quickArray("select namespace,pageId from widget where widgetId='$session{form}{wid}'");
|
||||
}
|
||||
if ($widgetType ne "") {
|
||||
if ($widgetPage != $session{page}{pageId}) {
|
||||
if ($widgetPage != $session{page}{pageId} && $widgetPage != 2) {
|
||||
$functionOutput = WebGUI::International::get(417);
|
||||
WebGUI::ErrorHandler::warn($session{user}{username}." [".$session{user}{userId}."] attempted to access widget [".$session{form}{wid}."] on page '".$session{page}{title}."' [".$session{page}{pageId}."].");
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -140,6 +140,9 @@ sub postNewMessage {
|
|||
$html .= WebGUI::Form::hidden("func","postNewMessageSave");
|
||||
$html .= WebGUI::Form::hidden("wid",$session{form}{wid});
|
||||
$html .= WebGUI::Form::hidden("sid",$session{form}{sid});
|
||||
if ($session{user}{userId} == 1) {
|
||||
$html .= tableFormRow(WebGUI::International::get(438),WebGUI::Form::text("visitorName",30,35));
|
||||
}
|
||||
$html .= '<tr><td class="formDescription">'.WebGUI::International::get(229).'</td><td>'.WebGUI::Form::text("subject",30,255).'</td></tr>';
|
||||
$html .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(230).'</td><td>'.WebGUI::Form::textArea("message",'',50,6,1).'</td></tr>';
|
||||
$html .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(62)).'</td></tr>';
|
||||
|
|
@ -149,15 +152,20 @@ sub postNewMessage {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub postNewMessageSave {
|
||||
my ($mid);
|
||||
my ($mid, $visitor);
|
||||
if ($session{form}{subject} eq "") {
|
||||
$session{form}{subject} = WebGUI::International::get(232);
|
||||
}
|
||||
if ($session{form}{message} eq "") {
|
||||
$session{form}{subject} .= ' '.WebGUI::International::get(233);
|
||||
}
|
||||
if ($session{form}{visitorName} eq "") {
|
||||
$visitor = $session{user}{username};
|
||||
} else {
|
||||
$visitor = $session{form}{visitorName};
|
||||
}
|
||||
$mid = getNextId("messageId");
|
||||
WebGUI::SQL->write("insert into discussion values ($mid, $mid, $session{form}{wid}, 0, $session{user}{userId}, ".quote($session{user}{username}).", ".quote($session{form}{subject}).", ".quote($session{form}{message}).", ".time().", '$session{form}{sid}')");
|
||||
WebGUI::SQL->write("insert into discussion values ($mid, $mid, $session{form}{wid}, 0, $session{user}{userId}, ".quote($visitor).", ".quote($session{form}{subject}).", ".quote($session{form}{message}).", ".time().", '$session{form}{sid}')");
|
||||
return "";
|
||||
}
|
||||
|
||||
|
|
@ -172,6 +180,9 @@ sub postReply {
|
|||
$html .= WebGUI::Form::hidden("wid",$session{form}{wid});
|
||||
$html .= WebGUI::Form::hidden("sid",$session{form}{sid});
|
||||
$html .= WebGUI::Form::hidden("mid",$session{form}{mid});
|
||||
if ($session{user}{userId} == 1) {
|
||||
$html .= tableFormRow(WebGUI::International::get(438),WebGUI::Form::text("visitorName",30,35));
|
||||
}
|
||||
$html .= '<tr><td class="formDescription">'.WebGUI::International::get(229).'</td><td>'.WebGUI::Form::text("subject",30,255,$subject).'</td></tr>';
|
||||
$html .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(230).'</td><td>'.WebGUI::Form::textArea("message",'',50,6,1).'</td></tr>';
|
||||
$html .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(62)).'</td></tr>';
|
||||
|
|
@ -182,16 +193,21 @@ sub postReply {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub postReplySave {
|
||||
my ($rid, $mid);
|
||||
my ($rid, $mid, $visitor);
|
||||
if ($session{form}{subject} eq "") {
|
||||
$session{form}{subject} = WebGUI::International::get(232);
|
||||
}
|
||||
if ($session{form}{message} eq "") {
|
||||
$session{form}{subject} .= ' '.WebGUI::International::get(233);
|
||||
}
|
||||
if ($session{form}{visitorName} eq "") {
|
||||
$visitor = $session{user}{username};
|
||||
} else {
|
||||
$visitor = $session{form}{visitorName};
|
||||
}
|
||||
$mid = getNextId("messageId");
|
||||
($rid) = WebGUI::SQL->quickArray("select rid from discussion where messageId=$session{form}{mid}");
|
||||
WebGUI::SQL->write("insert into discussion values ($mid, $rid, $session{form}{wid}, $session{form}{mid}, $session{user}{userId}, ".quote($session{user}{username}).", ".quote($session{form}{subject}).", ".quote($session{form}{message}).", ".time().", '$session{form}{sid}')");
|
||||
WebGUI::SQL->write("insert into discussion values ($mid, $rid, $session{form}{wid}, $session{form}{mid}, $session{user}{userId}, ".quote($visitor).", ".quote($session{form}{subject}).", ".quote($session{form}{message}).", ".time().", '$session{form}{sid}')");
|
||||
return "";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -49,8 +49,7 @@ sub www_viewActiveSessions {
|
|||
$row[$i] .= '<td>'.epochToHuman($data{expires},"%H:%n%p %M/%D/%y").'</td>';
|
||||
$row[$i] .= '<td>'.epochToHuman($data{lastPageView},"%H:%n%p %M/%D/%y").'</td>';
|
||||
$row[$i] .= '<td>'.$data{lastIP}.'</td>';
|
||||
$row[$i] .= '<td align="center"><a href="'.WebGUI::URL::page("op=killSession&sid=$data{sessionId}").'">'.
|
||||
'<img src="'.$session{setting}{lib}.'/delete.gif" border="0"</a></td></tr>';
|
||||
$row[$i] .= '<td align="center"><a href="'.WebGUI::URL::page("op=killSession&sid=$data{sessionId}").'">'.'<img src="'.$session{setting}{lib}.'/delete.gif" border="0"></a></td></tr>';
|
||||
$i++;
|
||||
}
|
||||
$sth->finish;
|
||||
|
|
|
|||
|
|
@ -88,7 +88,9 @@ sub close {
|
|||
#-------------------------------------------------------------------
|
||||
sub end {
|
||||
WebGUI::SQL->write("delete from userSession where sessionId='$_[0]'",$session{dbh});
|
||||
refreshSessionVars();
|
||||
if ($_[0] eq $session{var}{sessionId}) {
|
||||
refreshSessionVars();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue