added FastCGI support
This commit is contained in:
parent
a11a5d73b4
commit
13002676db
5 changed files with 44 additions and 4 deletions
|
|
@ -77,6 +77,7 @@
|
|||
original.page.url that will allow you to link to the original content from
|
||||
the shortcut.
|
||||
- bugfix [ 1016271 ]. all posts go to last forum in MB (Leendert Bottelberghs).
|
||||
- Added FastCGI support. (Kevin Wilson)
|
||||
|
||||
|
||||
6.1.1
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ alter table forum add postPreviewTemplateId varchar(22) NULL after postformTempl
|
|||
alter table forum add usePreview int(11) NOT NULL default 1;
|
||||
INSERT INTO template VALUES (1,'Default Post Preview','<h2><tmpl_var newpost.header></h2>\n\n<h1><tmpl_var post.subject></h1>\n\n<table width=\"100%\">\n<tr>\n<td class=\"content\" valign=\"top\">\n<tmpl_var post.message>\n</td>\n</tr>\n</table>\n\n<tmpl_var form.begin>\n<input type=\"button\" value=\"cancel\" onclick=\"window.history.go(-1)\"><tmpl_var form.submit>\n<tmpl_var form.end>\n','Forum/PostPreview',1,1);
|
||||
UPDATE userProfileField SET dataValues = '{\r\n6=>WebGUI::International::get(\'HTMLArea 3\'),\r\n1=>WebGUI::International::get(495), #htmlArea\r\n#2=>WebGUI::International::get(494), #editOnPro2\r\n3=>WebGUI::International::get(887), #midas\r\n4=>WebGUI::International::get(879), #classic\r\n5=>WebGUI::International::get(880),\r\nnone=>WebGUI::International::get(881)\r\n}' WHERE fieldName = 'richEditor';
|
||||
INSERT INTO template VALUES ('6','HTMLArea 3 (Mozilla / IE)','<script language=\"JavaScript\"> \r\nfunction fixChars(element) { \r\nelement.value = element.value.replace(/-/mg,\"-\"); \r\n} \r\n</script> \r\n\r\n<tmpl_if htmlArea3.supported> \r\n\r\n<script type=\"text/javascript\"> \r\n_editor_url = \"<tmpl_var session.config.extrasURL>/htmlArea3/\"; \r\n_editor_lang = \"en\"; \r\n</script> \r\n<script type=\"text/javascript\" src=\"<tmpl_var session.config.extrasURL>/htmlArea3/htmlarea.js\"></script> \r\n<script language=\"JavaScript\"> \r\nHTMLArea.loadPlugin(\"TableOperations\"); \r\nHTMLArea.loadPlugin(\"FullPage\"); \r\nfunction initEditor() { \r\n// create an editor for the textbox \r\neditor = new HTMLArea(\"<tmpl_var form.name>\"); \r\n\r\n// register the FullPage plugin \r\neditor.registerPlugin(FullPage); \r\n\r\n// register the SpellChecker plugin \r\neditor.registerPlugin(TableOperations); \r\n\r\nsetTimeout(function() { \r\neditor.generate(); \r\n}, 500); \r\nreturn false; \r\n} \r\nwindow.setTimeout(\"initEditor()\", 250); \r\n</script> \r\n</tmpl_if> \r\n\r\n<tmpl_var textarea> ','richEditor',1,1);
|
||||
INSERT INTO template VALUES ('6','HTMLArea 3 (Mozilla / IE)','<script language=\"JavaScript\"> \r\nfunction fixChars(element) { \r\nelement.value = element.value.replace(/-/mg,\"-\"); \r\n} \r\n</script> \r\n\r\n<tmpl_if htmlArea3.supported> \r\n\r\n<script type=\"text/javascript\"> \r\n_editor_url = \"<tmpl_var session.config.extrasURL>/htmlArea3/\"; \r\n_editor_lang = \"en\"; \r\n</script> \r\n<script type=\"text/javascript\" src=\"<tmpl_var session.config.extrasURL>/htmlArea3/htmlarea.js\"></script> \r\n<script language=\"JavaScript\"> \r\nHTMLArea.loadPlugin(\"TableOperations\"); \r\n//HTMLArea.loadPlugin(\"FullPage\"); \r\nfunction initEditor() { \r\n// create an editor for the textbox \r\neditor = new HTMLArea(\"<tmpl_var form.name>\"); \r\n\r\n// register the FullPage plugin \r\//neditor.registerPlugin(FullPage); \r\n\r\n// register the SpellChecker plugin \r\neditor.registerPlugin(TableOperations); \r\n\r\nsetTimeout(function() { \r\neditor.generate(); \r\n}, 500); \r\nreturn false; \r\n} \r\nwindow.setTimeout(\"initEditor()\", 250); \r\n</script> \r\n</tmpl_if> \r\n\r\n<tmpl_var textarea> ','richEditor',1,1);
|
||||
alter table page add encryptPage int(11) default 0;
|
||||
alter table USS_submission add startDate int(11) default 946710000;
|
||||
alter table USS_submission add endDate int(11) default 2114406000;
|
||||
|
|
|
|||
|
|
@ -112,7 +112,8 @@ sub page {
|
|||
my $configFile = shift;
|
||||
my $useExistingSession = shift; # used for static page generation functions where you may generate more than one page at a time.
|
||||
my $pageUrl = shift;
|
||||
WebGUI::Session::open($webguiRoot,$configFile) unless ($useExistingSession);
|
||||
my $fastcgi = shift;
|
||||
WebGUI::Session::open($webguiRoot,$configFile,$fastcgi) unless ($useExistingSession);
|
||||
|
||||
# JT: don't forget to do something with action 2
|
||||
my $page = _getPageInfo($pageUrl);
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ sub getScratch {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 open ( webguiRoot [ , configFile ] )
|
||||
=head2 open ( webguiRoot, configFile [ , fastcgi ] )
|
||||
|
||||
Opens a closed ( or new ) WebGUI session.
|
||||
|
||||
|
|
@ -299,6 +299,10 @@ The path to the WebGUI files.
|
|||
|
||||
The filename of the config file that WebGUI should operate from.
|
||||
|
||||
=item fastcgi
|
||||
|
||||
A pointer to a Fast CGI object.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
|
@ -306,6 +310,7 @@ The filename of the config file that WebGUI should operate from.
|
|||
sub open {
|
||||
my $webguiRoot = shift;
|
||||
my $configFile = shift;
|
||||
my $fastcgi = shift;
|
||||
my ($key);
|
||||
###----------------------------
|
||||
### operating system specific things
|
||||
|
|
@ -338,7 +343,7 @@ sub open {
|
|||
###----------------------------
|
||||
### CGI object
|
||||
$CGI::POST_MAX=1024 * $session{setting}{maxAttachmentSize};
|
||||
$session{cgi} = CGI->new();
|
||||
$session{cgi} = $fastcgi || CGI->new();
|
||||
if ($session{cgi}->cgi_error =~ /^413/) {
|
||||
$session{http}{status} = $session{cgi}->cgi_error;
|
||||
WebGUI::ErrorHandler::warn("File upload too big. May need to adjust Max File Size setting.");
|
||||
|
|
|
|||
33
www/index.fpl
Executable file
33
www/index.fpl
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2004 Plain Black LLC.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
# this software.
|
||||
#-------------------------------------------------------------------
|
||||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
||||
# NOTE: This gateway script is to be used with FastCGI.
|
||||
|
||||
our ($webguiRoot, $configFile);
|
||||
|
||||
BEGIN {
|
||||
$configFile = "WebGUI.conf";
|
||||
$webguiRoot = "/data/WebGUI";
|
||||
unshift (@INC, $webguiRoot."/lib");
|
||||
}
|
||||
|
||||
#-----------------DO NOT MODIFY BELOW THIS LINE--------------------
|
||||
|
||||
use CGI::Carp qw(fatalsToBrowser);
|
||||
use strict;
|
||||
use WebGUI;
|
||||
use CGI::Fast;
|
||||
while my $fcgi = new CGI::Fast) {
|
||||
print WebGUI::page($webguiRoot,$configFile,"","",$fcgi);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue