Added a new parameter called "sitename" to the config.
This commit is contained in:
parent
f0f79a39d6
commit
f7ca23aa03
4 changed files with 31 additions and 6 deletions
|
|
@ -8,6 +8,18 @@ versions. Be sure to heed the warnings contained herein as they will
|
|||
save you many hours of grief.
|
||||
|
||||
|
||||
5.3.0
|
||||
--------------------------------------------------------------------
|
||||
* If you are not using sbin/upgrade.pl then you'll need to do all
|
||||
of the processing handled by docs/upgrades/upgrade_5.2.5-5.3.0.pl
|
||||
manually.
|
||||
|
||||
* You must add a new variable to your WebGUI config called "sitename"
|
||||
and make it equal to your site hostname like this:
|
||||
|
||||
sitename = www.mycompany.com
|
||||
|
||||
|
||||
5.2.5
|
||||
--------------------------------------------------------------------
|
||||
* You'll need to upgrade HTML::Parser to at least version 3.27.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
sitename = www.mycompany.com
|
||||
|
||||
dsn = DBI:mysql:WebGUI
|
||||
dbuser = webgui
|
||||
dbpass = password
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ sub addEntry {
|
|||
subject, status) values ($messageLogId,".$u->userId.",
|
||||
".quote($message).",".quote($url).",".time().",".quote($subject).", ".quote($status).")");
|
||||
if ($url ne "") {
|
||||
$message .= "\n".WebGUI::URL::append('http://'.$session{env}{HTTP_HOST}.$url,'mlog='.$messageLogId);
|
||||
$message .= "\n".WebGUI::URL::append($url,'mlog='.$messageLogId);
|
||||
}
|
||||
_notify($u,$subject,$message);
|
||||
}
|
||||
|
|
@ -203,7 +203,7 @@ sub addInternationalizedEntry {
|
|||
WebGUI::SQL->write("insert into messageLog values ($messageLogId,".$u->userId.",
|
||||
".quote($message).",".quote($url).",".time().",".quote($message).",".quote($status).")");
|
||||
if ($url ne "") {
|
||||
$message .= "\n".WebGUI::URL::append('http://'.$session{env}{HTTP_HOST}.$url,'mlog='.$messageLogId);
|
||||
$message .= "\n".WebGUI::URL::append($url,'mlog='.$messageLogId);
|
||||
}
|
||||
_notify($u,$subject,$message);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,6 +48,19 @@ These subroutines are available from this package:
|
|||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub _getSiteURL {
|
||||
my $site = $session{env}{HTTP_HOST} || $session{config}{sitename};
|
||||
my $proto = "http://";
|
||||
my $port;
|
||||
if ($session{env}{SERVER_PORT} == 443) {
|
||||
$proto = "https://";
|
||||
} elsif ($session{env}{SERVER_PORT} != 80) {
|
||||
$port = ":".$session{env}{SERVER_PORT};
|
||||
}
|
||||
return $proto.$site.$port;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 append ( url, pairs )
|
||||
|
|
@ -127,8 +140,7 @@ Name value pairs to add to the URL in the form of:
|
|||
=cut
|
||||
|
||||
sub gateway {
|
||||
my ($url);
|
||||
$url = $session{config}{scripturl}.'/'.$_[0];
|
||||
my $url = _getSiteURL().$session{config}{scripturl}.'/'.$_[0];
|
||||
if ($_[1]) {
|
||||
$url = append($url,$_[1]);
|
||||
}
|
||||
|
|
@ -186,8 +198,7 @@ Name value pairs to add to the URL in the form of:
|
|||
=cut
|
||||
|
||||
sub page {
|
||||
my ($url);
|
||||
$url = $session{page}{url};
|
||||
my $url = _getSiteURL().$session{page}{url};
|
||||
if ($_[0]) {
|
||||
$url = append($url,$_[0]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue