You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl-cvs@perl.apache.org by ri...@apache.org on 2005/09/04 14:56:00 UTC
cvs commit: embperl/test/conf httpd.conf.src
richter 2005/09/04 05:55:59
Modified: eg/web base.epl config.pl
eg/web/db addsel.epl content.epl epwebapp.pl
test/conf httpd.conf.src
Added: eg/web/db wiki.epl
Log:
wiki
Revision Changes Path
1.6 +44 -0 embperl/eg/web/base.epl
Index: base.epl
===================================================================
RCS file: /home/cvs/embperl/eg/web/base.epl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- base.epl 13 Aug 2005 16:53:24 -0000 1.5
+++ base.epl 4 Sep 2005 12:55:59 -0000 1.6
@@ -49,6 +49,50 @@
table {[+ $base12 +]}
.cHeadline {[+ $base14 +] font-weight: bold;}
a:hover { color: red ;}
+
+
+ .diff-added, .diff-removed, .diff-unmodified, .diff-changed {
+ font-family: monospace;
+ }
+ .diff-added {
+ background: #cfc;
+ color: #000;
+ }
+ .diff-removed {
+ background: #fcc;
+ color: #000;
+ }
+ .diff-unmodified {
+ background: inherit;
+ color: #000;
+ }
+ .diff-changed {
+ background: #ffc;
+ color: #000;
+ }
+
+ table.diff {
+ border: 1px solid #666;
+ }
+
+ table th {
+ border-bottom: 1px solid #666;
+ }
+
+ th.lhs, td.lhs {
+ padding-right: 1em;
+ }
+ th.rhs, td.rhs {
+ padding-left: 1em;
+ border-left: 1px solid #666;
+ }
+
+ h1 small {
+ color: #f00;
+ }
+
+
+
</style>
</head>
<body bgcolor="#ffffff">
1.12 +2 -1 embperl/eg/web/config.pl
Index: config.pl
===================================================================
RCS file: /home/cvs/embperl/eg/web/config.pl,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- config.pl 7 Aug 2005 15:59:09 -0000 1.11
+++ config.pl 4 Sep 2005 12:55:59 -0000 1.12
@@ -202,7 +202,8 @@
{ menu => 'Support', uri => 'pod/doc/Embperl.-page-17-.htm' },
{ menu => 'Changes', uri => 'pod/Changes.htm', file => 'Changes.pod' },
#{ menu => 'Sites using Embperl', uri => 'pod/Sites.htm', file => 'Sites.pod' },
- { menu => 'More infos', uri => 'db/', sub =>
+ { menu => 'Wiki', uri => 'db/wiki/index.cgi', file => '/eg/web/db/wiki.epl' },
+ { menu => 'More infos', uri => 'db/', sub =>
[
{ menu => 'News', uri => 'news/news.htm', file => 'eg/web/db/news/data.epd', fdat => { 'category_id' => 1 },
desc => { en => 'Full list of all news.',
1.7 +4 -0 embperl/eg/web/db/addsel.epl
Index: addsel.epl
===================================================================
RCS file: /home/cvs/embperl/eg/web/db/addsel.epl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- addsel.epl 7 Aug 2005 15:59:09 -0000 1.6
+++ addsel.epl 4 Sep 2005 12:55:59 -0000 1.7
@@ -61,6 +61,10 @@
</li>
[$endif$]
</ul>
+
+
+<p class="cHeadline"><a href="wiki/index.cgi">Wiki</a></p>
+
[$else$]
1.8 +2 -2 embperl/eg/web/db/content.epl
Index: content.epl
===================================================================
RCS file: /home/cvs/embperl/eg/web/db/content.epl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- content.epl 7 Aug 2005 15:59:09 -0000 1.7
+++ content.epl 4 Sep 2005 12:55:59 -0000 1.8
@@ -50,7 +50,7 @@
[- Execute ('loginform.epl', $r -> app -> posturl) ; -]
</div>
[$ else $]
- [$if $r -> param -> uri !~ /html?$|epl$/ $]<pre>[$endif$]
+ [$if $r -> param -> uri !~ /html?$|epl$|cgi$/ $]<pre>[$endif$]
[- $x = Execute ({inputfile => '*'}) -]
- [$if $r -> param -> uri !~ /html?$|epl$/ $]</pre>[$endif$]
+ [$if $r -> param -> uri !~ /html?$|epl$|cgi$/ $]</pre>[$endif$]
[$ endif $]
1.17 +6 -2 embperl/eg/web/db/epwebapp.pl
Index: epwebapp.pl
===================================================================
RCS file: /home/cvs/embperl/eg/web/db/epwebapp.pl,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- epwebapp.pl 13 Aug 2005 19:58:18 -0000 1.16
+++ epwebapp.pl 4 Sep 2005 12:55:59 -0000 1.17
@@ -194,6 +194,7 @@
{
$r -> {user_id} = $udat{user_id} ;
$r -> {user_email} = $udat{user_email} ;
+ $r -> {user_name} = $udat{user_name} ;
$r -> {user_admin} = $udat{user_admin} ;
return $r -> {user_admin}?2:1 ;
}
@@ -209,7 +210,8 @@
if ($udat{user_id} && $udat{user_email} && !$fdat{-logout})
{
$r -> {user_id} = $udat{user_id} ;
- $r -> {user_email} = $udat{user_email} ;
+ $r -> {user_email} = $udat{user_email} ;
+ $r -> {user_name} = $udat{user_name} ;
$r -> {user_admin} = $udat{user_admin} ;
return $r -> {user_admin}?2:1 ;
}
@@ -236,6 +238,7 @@
{
$r -> {user_id} = $udat{user_id} = $user -> {id} ;
$r -> {user_email} = $udat{user_email} = $user -> {email} ;
+ $r -> {user_name} = $udat{user_name} = $user -> {user_name} ;
$r -> {user_admin} = $udat{user_admin} = $user -> {admin} ;
$r -> {success} = "suc_login";
return $r -> {user_admin}?2:1 ;
@@ -249,7 +252,8 @@
if ($fdat{-logout})
{
$r -> {user_id} = $udat{user_id} = undef ;
- $r -> {user_email} = $udat{user_email} = undef ;
+ $r -> {user_email} = $udat{user_email} = undef ;
+ $r -> {user_name} = $udat{user_name} = undef ;
$r -> {user_admin} = $udat{user_admin} = undef ;
$r -> {success} = 'suc_logout';
return ;
1.1 embperl/eg/web/db/wiki.epl
Index: wiki.epl
===================================================================
[-
package Kwiki::Embperl ;
use Kwiki -base;
use Data::Dumper ;
sub get_new_hub {
my $self = shift ;
my $path = shift;
chdir $path;
my $hub = $self->new->debug->load_hub(
"config.yaml", -plugins => "plugins",
);
return $hub;
}
sub run
{
my $epreq = shift ;
my $self = __PACKAGE__ ;
my $path = '/usr/msrc/embperl/eg/kwiki' ;
warn "r=$ENV{REQUEST_URI} s=$ENV{SCRIPT_NAME} p=$ENV{PATH_INFO}" ;
# set path for source of Kwiki's redirect url
$ENV{PATH_INFO} = '' ;
foreach my $k (sort keys %$epreq)
{
local $^W = 0 ;
print STDERR "$k = $epreq->{$k}\n" ;
}
if (my $user = $epreq -> {user_name} || $epreq -> {user_email})
{
$user =~ s/(?:^|\s+|\W)(.)/uc($1)/ge ;
$user =~ s/[^a-zA-Z0-9]//g ;
$ENV{REMOTE_USER} = $user ;
}
warn "ru=$ENV{REMOTE_USER}" ;
require CGI ;
foreach my $k (keys %Embperl::fdat)
{
CGI::param($k, $Embperl::fdat{$k}) ;
warn "CGI::param($k, $Embperl::fdat{$k})" ;
}
my $hub = $self->get_new_hub($path);
$hub->registry->load;
$hub->add_hooks;
eval { $hub->pre_process }
or return $self->print_error($@,$r,$hub,'Pre-Process Error');
my $html = eval { $hub->process };
return $self->print_error($@,$r,$hub,'Process Error') if $@;
if (defined $html) {
unless($Embperl::req_rec->header_only) {
$self->utf8_encode($html);
}
}
eval { $hub->post_process }
or return $self->print_error($@,$r,$hub,'Post-Process Error');
if (my $redir = $hub->headers->redirect)
{
$Embperl::http_headers_out{'Location'} = $redir ;
}
return $html ;
}
sub print_error {
my $self = shift ;
my $error = $self->html_escape(shift);
my ($r,$hub,$msg) = @_;
#$hub->headers->content_type('text/html');
#$hub->headers->charset('UTF-8');
#$hub->headers->expires('now');
#$hub->headers->pragma('no-cache');
#$hub->headers->cache_control('no-cache');
#$hub->headers->redirect('');
#$hub->headers->print;
print STDERR "<h1>Software Error:</h1><h2>$msg</h2><pre>\n$error</pre>" ;
return "<h1>Software Error:</h1><h2>$msg</h2><pre>\n$error</pre>";
}
-]
[+
do { local $escmode = 0 ;
my $html = Kwiki::Embperl::run ($epreq) ;
$html =~ m#<body>(.*)</body>#s ;
$1 ;
}
+]
[#
<link rel="stylesheet" type="text/css" href="theme/basic/css/kwiki.css" />
<link rel="stylesheet" type="text/css" href="css/toolbar.css" />
<link rel="stylesheet" type="text/css" href="css/user_name.css" />
<link rel="stylesheet" type="text/css" href="css/search.css" />
<link rel="stylesheet" type="text/css" href="css/formatter.css" />
<link rel="shortcut icon" href="" />
<link rel="start" href="index.cgi" title="Home" />
#]
1.59 +24 -3 embperl/test/conf/httpd.conf.src
Index: httpd.conf.src
===================================================================
RCS file: /home/cvs/embperl/test/conf/httpd.conf.src,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- httpd.conf.src 25 Jul 2005 07:01:36 -0000 1.58
+++ httpd.conf.src 4 Sep 2005 12:55:59 -0000 1.59
@@ -68,7 +68,11 @@
$EPSTRONGHOLDKEY
#-Tw
-PerlTaintCheck On
+EOD
+
+print OFH "PerlTaintCheck On\n" if (!$ENV{NOTAINT}) ;
+
+print OFH <<EOD ;
PerlWarn On
@@ -665,7 +669,8 @@
SetHandler server-info
</Location>
-
+########### web site #####################
+#
# redirect all languages of the web to the same directory
Alias /eg/web/de/ \"$EPPATH/eg/web/\"
Alias /eg/web/en/ \"$EPPATH/eg/web/\"
@@ -740,6 +745,20 @@
#
#</location>
+######## kwiki ##################
+
+<Location /kwiki>
+ SetHandler perl-script
+ PerlSetVar KwikiBaseDir $EPPATH/eg/kwiki
+ PerlHandler Kwiki::ModPerl
+</Location>
+Alias /ckwiki $EPPATH/eg/kwiki
+
+<Location /ckwiki>
+ SetHandler cgi-script
+</Location>
+
+
@@ -763,6 +782,8 @@
DAV on
</Location>
+
+
</IfModule>
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-cvs-help@perl.apache.org