richter 2003/01/15 23:14:35
Modified:eg/web epwebapp.pl
eg/web/db add.epl addsel.epl content.epl epwebapp.pl
login.epl loginform.epl
Log:
website updates
Revision ChangesPath
1.5 +1 -1 embperl/eg/web/epwebapp.pl
Index: epwebapp.pl
===
RCS file: /home/cvs/embperl/eg/web/epwebapp.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- epwebapp.pl 8 Jan 2003 06:03:23 - 1.4
+++ epwebapp.pl 16 Jan 2003 07:14:34 - 1.5
@@ -186,7 +186,7 @@
$r -> {imageuri} = ('../' x $depth) . $config -> {imageuri} ;
$r -> {baseuri} = ('../' x $depth) ;
-# this is when creating static pages, to let actions point to the write URL
+# this is when creating static pages, to let actions point to the correct URL
of the dynamic site
$r -> {action_prefix} = $ENV{ACTION_PREFIX} || '' ;
my $langs = $config -> {supported_languages} ;
1.6 +1 -1 embperl/eg/web/db/add.epl
Index: add.epl
===
RCS file: /home/cvs/embperl/eg/web/db/add.epl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- add.epl 16 Jan 2003 05:29:15 - 1.5
+++ add.epl 16 Jan 2003 07:14:35 - 1.6
@@ -17,7 +17,7 @@
[$ if !$r->{error} $]
-
+
[= add2a =]
[= add2b =]
1.5 +1 -1 embperl/eg/web/db/addsel.epl
Index: addsel.epl
===
RCS file: /home/cvs/embperl/eg/web/db/addsel.epl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- addsel.epl16 Jan 2003 05:29:15 - 1.4
+++ addsel.epl16 Jan 2003 07:14:35 - 1.5
@@ -74,7 +74,7 @@
#]
[#
-
+
[= addsel2 =]
[= addsel3 =]
1.6 +1 -1 embperl/eg/web/db/content.epl
Index: content.epl
===
RCS file: /home/cvs/embperl/eg/web/db/content.epl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- content.epl 9 Jan 2003 05:59:02 - 1.5
+++ content.epl 16 Jan 2003 07:14:35 - 1.6
@@ -44,7 +44,7 @@
[= need_login =]
-[- Execute ('loginform.epl', $r -> {action_prefix} . $r -> param -> uri) ; -]
+[- Execute ('loginform.epl', $r -> app -> posturl) ; -]
[$ else $]
[$if $r -> param -> uri !~ /html?$|epl$/ $][$endif$]
1.10 +27 -0 embperl/eg/web/db/epwebapp.pl
Index: epwebapp.pl
===
RCS file: /home/cvs/embperl/eg/web/db/epwebapp.pl,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- epwebapp.pl 9 Jan 2003 05:59:02 - 1.9
+++ epwebapp.pl 16 Jan 2003 07:14:35 - 1.10
@@ -131,6 +131,33 @@
}
+
+#
+#
+# Get url for postings forms
+#
+# $dest = path relativ to current uri
+#
+
+sub posturl
+{
+my ($self, $dest) = @_ ;
+
+my $r = $self -> curr_req ;
+
+return $dest if (!$r -> {action_prefix}) ;
+
+
+my $buri = $r->{config}{baseuri} ;
+my $uri = $r-> param -> uri ;
+my $path = ($uri =~ /$buri(.*?)$/)?$1:$uri ;
+
+return $r -> {action_prefix} . $buri . $r -> param -> language . '/' . $path if
(!$dest) ;
+return $r -> {action_prefix} . $buri . $r -> param -> language .
dirname("/$path") .'/' . $dest ;
+}
+
+
+
#
#
# check if user is loged in, handle login/out and createing of new users
1.5 +1 -1 embperl/eg/web/db/login.epl
Index: login.epl
===
RCS file: /home/cvs/embperl/eg/web/db/login.epl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- login.epl 9 Jan 2003 06:19:32 - 1.4
+++ login.epl 16 Jan 2003 07:14:35 - 1.5
@@ -3,7 +3,7 @@
[= login_head =]
-[- Execute ('loginform.epl', ($r -> {action_prefix}?($r->{action_prefix} .
dirname($r-> param -> uri) .'/'):'') . 'addsel.epl') ; -]
+[- Execute ('loginform.epl', $r -> app -> posturl('addsel.epl')) ; -]
[#
1.7 +3 -3 embperl/eg/web/db/loginform.epl
Index: loginform.epl
===
RCS file: /home/cvs/embperl/eg/web/db/loginform.epl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- loginform.epl