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 2003/01/08 07:03:24 UTC
cvs commit: embperl/eg/web/db/news pod.xsl
richter 2003/01/07 22:03:23
Modified: . epchar.c eputil.c
eg/web epwebapp.pl
eg/web/db epwebapp.pl pod.xsl
eg/web/db/news pod.xsl
Log:
search debug + website updates
Revision Changes Path
1.19 +2 -1 embperl/epchar.c
Index: epchar.c
===================================================================
RCS file: /home/cvs/embperl/epchar.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- epchar.c 7 Jan 2003 20:42:59 -0000 1.18
+++ epchar.c 8 Jan 2003 06:03:23 -0000 1.19
@@ -352,7 +352,8 @@
{ '8' , "" }, /* 8 Digit 8 */
{ '9' , "" }, /* 9 Digit 9 */
/* We should escape this according to the rfc, but this would make troubles inside
- of urls, so will don' escape it { ':' , "%3A" }, /* : Colon */
+ of urls, so will don' escape it
+ { ':' , "%3A" }, */ /* : Colon */
{ ':' , "" }, /* : Colon */
{ ';' , "%3B" }, /* ; Semicolon */
{ '<' , "%3C" }, /* Less than */
1.29 +24 -4 embperl/eputil.c
Index: eputil.c
===================================================================
RCS file: /home/cvs/embperl/eputil.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- eputil.c 26 Nov 2002 10:03:42 -0000 1.28
+++ eputil.c 8 Jan 2003 06:03:23 -0000 1.29
@@ -1560,8 +1560,16 @@
char * fn ;
STRLEN l ;
+ if (r -> Config.bDebug & dbgObjectSearch)
+ lprintf (r -> pApp, "[%d]Search for %s\n", r -> pThread -> nPid, sFilename) ;
+
if (isAbsPath(sFilename) || !pPathAV || AvFILL (pPathAV) < r -> Component.nPathNdx)
- return embperl_File2Abs (r, pPool, sFilename) ;
+ {
+ absfn = embperl_File2Abs (r, pPool, sFilename) ;
+ if (r -> Config.bDebug & dbgObjectSearch)
+ lprintf (r -> pApp, "[%d]Search: nothing to search return %s\n", r -> pThread -> nPid, absfn) ;
+ return absfn ;
+ }
while (sFilename[0] == '.' && sFilename[1] == '.' && (sFilename[2] == '/' || sFilename[2] == '\\'))
{
@@ -1576,8 +1584,12 @@
absfn = embperl_File2Abs (r, pPool, sFilename) ;
if (stat (absfn, &st) == 0)
{
+ if (r -> Config.bDebug & dbgObjectSearch)
+ lprintf (r -> pApp, "[%d]Search: starts with ./ return %s\n", r -> pThread -> nPid, absfn) ;
return absfn ;
}
+ if (r -> Config.bDebug & dbgObjectSearch)
+ lprintf (r -> pApp, "[%d]Search: starts with ./, but not found\n", r -> pThread -> nPid) ;
return NULL ;
}
@@ -1585,13 +1597,21 @@
for (i = skip ; i <= AvFILL (pPathAV); i++)
{
fn = ep_pstrcat(r -> pPool, SvPV(*av_fetch (pPathAV, i, 0), l), PATH_SEPARATOR_STR, sFilename, NULL) ;
- /* lprintf (r -> pApp, "i=%d skip=%d, dir=%s, fn=%s\n", i, skip, SvPV(*av_fetch (pPathAV, i, 0), l), fn) ; */
+ if (r -> Config.bDebug & dbgObjectSearch)
+ lprintf (r -> pApp, "[%d]Search: #%d test dir=%s, fn=%s (skip=%d)\n", r -> pThread -> nPid,
+ i, SvPV(*av_fetch (pPathAV, i, 0), l), fn, skip) ;
if (stat (fn, &st) == 0)
{
r -> Component.nPathNdx = i ;
- return embperl_File2Abs (r, pPool, fn) ;
+ absfn = embperl_File2Abs (r, pPool, fn) ;
+ if (r -> Config.bDebug & dbgObjectSearch)
+ lprintf (r -> pApp, "[%d]Search: found %s\n", r -> pThread -> nPid, absfn) ;
+ return absfn ;
}
}
+
+ if (r -> Config.bDebug & dbgObjectSearch)
+ lprintf (r -> pApp, "[%d]Search: not found %s\n", r -> pThread -> nPid) ;
return NULL ;
}
1.4 +17 -18 embperl/eg/web/epwebapp.pl
Index: epwebapp.pl
===================================================================
RCS file: /home/cvs/embperl/eg/web/epwebapp.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- epwebapp.pl 20 Nov 2002 06:56:27 -0000 1.3
+++ epwebapp.pl 8 Jan 2003 06:03:23 -0000 1.4
@@ -232,6 +232,21 @@
}
+sub set_xslt_param
+ {
+ my ($class, $r, $config, $param) = @_ ;
+
+ $config -> xsltstylesheet('pod.xsl') ;
+ $r -> param -> uri =~ /^.*\/(.*)\.(.*?)$/ ;
+ $param -> xsltparam({
+ page => $fdat{page} || 0,
+ basename => "'$1'",
+ extension => "'$2'",
+ imageuri => "'$r->{imageuri}'",
+ baseuri => "'$r->{baseuri}'",
+ language => "'" . $r -> param -> language . "'" ,
+ }) ;
+ }
@@ -269,15 +284,7 @@
return Embperl::Recipe::Embperl -> get_recipe ($r, $recipe) ;
}
- $config -> xsltstylesheet('pod.xsl') ;
- $r -> param -> uri =~ /^.*\/(.*)\.(.*?)$/ ;
- $param -> xsltparam({
- page => $fdat{page} || 0,
- basename => "'$1'",
- extension => "'$2'",
- imageuri => "'$r->{imageuri}'",
- baseuri => "'$r->{baseuri}'",
- }) ;
+ $class -> set_xslt_param ($r, $config, $param) ;
return Embperl::Recipe::EmbperlXSLT -> get_recipe ($r, $recipe) ;
}
@@ -293,15 +300,7 @@
}
- $config -> xsltstylesheet('pod.xsl') ;
- $r -> param -> uri =~ /^.*\/(.*)\.(.*?)$/ ;
- $param -> xsltparam({
- page => $fdat{page} || 0,
- basename => "'$1'",
- extension => "'$2'",
- imageuri => "'$r->{imageuri}'",
- baseuri => "'$r->{baseuri}'",
- }) ;
+ $class -> set_xslt_param ($r, $config, $param) ;
return Embperl::Recipe::EmbperlPODXSLT -> get_recipe ($r, $recipe) ;
}
1.8 +13 -0 embperl/eg/web/db/epwebapp.pl
Index: epwebapp.pl
===================================================================
RCS file: /home/cvs/embperl/eg/web/db/epwebapp.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- epwebapp.pl 7 Jan 2003 20:43:01 -0000 1.7
+++ epwebapp.pl 8 Jan 2003 06:03:23 -0000 1.8
@@ -1014,4 +1014,17 @@
return \@set;
}
+# ----------------------------------------------------------------------------
+
+sub set_xslt_param
+ {
+ my ($class, $r, $config, $param) = @_ ;
+
+ $class -> SUPER::set_xslt_param ($r, $config, $param) ;
+
+ my $p = $param -> xsltparam ;
+ $p -> {category_id} = $fdat{category_id} || 0 ;
+ }
+
+
1.3 +10 -3 embperl/eg/web/db/pod.xsl
Index: pod.xsl
===================================================================
RCS file: /home/cvs/embperl/eg/web/db/pod.xsl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- pod.xsl 22 Oct 2002 05:39:50 -0000 1.2
+++ pod.xsl 8 Jan 2003 06:03:23 -0000 1.3
@@ -9,9 +9,10 @@
<xsl:output method="html" indent="yes" encoding="iso-8859-1"/>
- <xsl:include href="podbase.xsl"/>
+ <xsl:include href="../podbase.xsl"/>
- <xsl:variable name="category_id" select="2"/>
+ <xsl:param name="category_id" select="2"/>
+ <xsl:param name="language" select="en"/>
<!-- - - - - Header 1 - - - - -->
@@ -20,7 +21,13 @@
<table width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
<td class="cPodH1"><xsl:value-of select="$txt"/></td>
- <td class="cPodH1Link"><a href="../add.-category_id-{$category_id}-.epl">[Eintrag hinzuf�gen]</a></td>
+ <td class="cPodH1Link"><a href="../add.-category_id-{$category_id}-.epl">
+ <xsl:choose>
+ <xsl:when test="$language='de'">[Eintrag hinzuf�gen]</xsl:when>
+ <xsl:otherwise>[Add new entry]</xsl:otherwise>
+ </xsl:choose>
+
+ </a></td>
</tr>
<tr>
<td colspan="2" height="5"> </td>
1.3 +0 -1 embperl/eg/web/db/news/pod.xsl
Index: pod.xsl
===================================================================
RCS file: /home/cvs/embperl/eg/web/db/news/pod.xsl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- pod.xsl 22 Oct 2002 05:39:50 -0000 1.2
+++ pod.xsl 8 Jan 2003 06:03:23 -0000 1.3
@@ -5,7 +5,6 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/TR/xhtml1/strict">
- <xsl:variable name="category_id" select="1"/>
<xsl:include href="../pod.xsl"/>
<!-- - - - - Root - - - - -->
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-cvs-help@perl.apache.org