chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.main.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
AJAX route validator for text strings
[ypp-sc-tools.main.git]
/
yarrg
/
CommodsWeb.pm
diff --git
a/yarrg/CommodsWeb.pm
b/yarrg/CommodsWeb.pm
index 96dde357c9bb40c31d3f7b399848ce9002d1167e..377d97b1c5c8e9794df7917e1bfb0cb3a6680a66 100644
(file)
--- a/
yarrg/CommodsWeb.pm
+++ b/
yarrg/CommodsWeb.pm
@@
-36,6
+36,7
@@
use Commods;
use CommodsDatabase;
our $self_url;
use CommodsDatabase;
our $self_url;
+our $base_url;
BEGIN {
use Exporter ();
BEGIN {
use Exporter ();
@@
-43,7
+44,7
@@
BEGIN {
$VERSION = 1.00;
@ISA = qw(Exporter);
@EXPORT = qw($dbh &db_setocean &db_connect &db_doall
$VERSION = 1.00;
@ISA = qw(Exporter);
@EXPORT = qw($dbh &db_setocean &db_connect &db_doall
- $self_url);
+ $self_url
$base_url
);
%EXPORT_TAGS = ( );
@EXPORT_OK = qw();
%EXPORT_TAGS = ( );
@EXPORT_OK = qw();
@@
-57,5
+58,6
@@
for my $dir (@INC) {
}
$self_url= 'http://'.$ENV{'SERVER_NAME'}.$ENV{'SCRIPT_NAME'}.$ENV{'PATH_INFO'};
}
$self_url= 'http://'.$ENV{'SERVER_NAME'}.$ENV{'SCRIPT_NAME'}.$ENV{'PATH_INFO'};
+$base_url= $self_url; $base_url =~ s,/[^/]+,,;
1;
1;