fixed tagcloud, search, removed manual cookies

git-svn-id: http://yolanda.mister-muffin.de/svn@269 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
josch 2008-04-03 20:40:17 +00:00
parent fb3064b6c3
commit 2151fe409d
5 changed files with 18 additions and 15 deletions

View file

@ -141,8 +141,6 @@ sub output_page
my $parser = XML::LibXML->new();
my $xslt = XML::LibXSLT->new();
@cookies = [$session->cookie(-name=>$session_name, -value=>$session->id)];
#let the XSLT param choose other stylesheets or default to xhtml.xsl
my $param_xslt = $query->param('xslt');
$param_xslt =~ s/[^\w]//gi;
@ -152,7 +150,6 @@ sub output_page
return $session->header(
-type=>'application/xml',
-charset=>'UTF-8',
-cookie=>@cookies
),
XMLout(
$page,
@ -189,7 +186,6 @@ sub output_page
-type=>$stylesheet->media_type,
-charset=>$stylesheet->output_encoding,
-attachment=>$query->param('query').".xspf",
-cookie=>@cookies
),
$output->toString;
#$stylesheet->output_as_bytes($output); <= for future use with XML::LibXSLT (>= 1.62)
@ -206,7 +202,6 @@ sub output_page
return $session->header(
-type=>$stylesheet->media_type,
-charset=>$stylesheet->output_encoding,
-cookie=>@cookies
),
$output->toString;
#$stylesheet->output_as_bytes($output); <= for future use with XML::LibXSLT (>= 1.62)

View file

@ -46,12 +46,21 @@ elsif($query->param('pass') eq '' and $query->param('user')=~m/^http:\/\//)
print $session->header();
print "claim failed: ", $con->err;
}
$check_url = $claimed->check_url(
return_to => "$domain/login.pl?action=openid", #on success return to this address
trust_root => $domain); #this is the string the user will be asked to trust
#redirect to openid server to check claim
print $query->redirect($check_url);
#try to set the check_url
eval
{
$check_url = $claimed->check_url(
return_to => "$domain/login.pl?action=openid", #on success return to this address
trust_root => $domain); #this is the string the user will be asked to trust
#redirect to openid server to check claim
print $query->redirect($check_url);
};
#if this fails
if ($@) {
print $query->redirect("/index.pl?error=error_202c");
}
}
else
{

View file

@ -17,6 +17,7 @@
<string id="path_source-code">http://yolanda.mister-muffin.de/trac/browser/trunk</string>
<string id="path_register">/register.pl</string>
<string id="path_report_bug">http://yolanda.mister-muffin.de/trac/newticket</string>
<string id="path_search">/search.pl</string>
<string id="path_results">/search.pl?query=</string>
<string id="path_root">http://localhost/</string>
<string id="path_upload">/upload.pl</string>

View file

@ -13,7 +13,7 @@
<form method="get" enctype="text/plain">
<xsl:attribute name="action">
<xsl:value-of select="$site_strings[@id='path_results']" />
<xsl:value-of select="$site_strings[@id='path_search']" />
</xsl:attribute>
<fieldset>
<label for="query">

View file

@ -22,9 +22,7 @@
font-size:<xsl:value-of select="round((32-12)*(number(count)-number($min))div (number($max)-number($min)))+12" />px
</xsl:attribute>
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_results']" />
tag:
<xsl:value-of select="text" />
<xsl:value-of select="concat($site_strings[@id='path_results'],'tag:',text)" />
</xsl:attribute>
<xsl:value-of select="text" />