[Jifty-commit] r516 - in jifty/trunk: lib/Jifty lib/Jifty/Web
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Wed Jan 18 14:24:48 EST 2006
Author: alexmv
Date: Wed Jan 18 14:24:48 2006
New Revision: 516
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Web.pm
jifty/trunk/lib/Jifty/Web/PageRegion.pm
Log:
r8672 at zoq-fot-pik: chmrr | 2006-01-18 14:24:05 -0500
* Sketchy sketchy way of making fragments work under the Brave New
Order; they're not going though the dispatcher, though they should be.
Modified: jifty/trunk/lib/Jifty/Web.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web.pm (original)
+++ jifty/trunk/lib/Jifty/Web.pm Wed Jan 18 14:24:48 2006
@@ -1052,13 +1052,14 @@
# Spit out a correct content-type; we set this *here* instead of
# above because each of the subrequests attempts to set it to
# text/html -- so we have to override them after the fact.
- $self->mason->cgi_request->content_type('text/xml; charset=utf-8');
+ $self->response->add_header("Content-Type" => 'text/xml; charset=utf-8');
# Clear the buffer (in case something else snuck out) then output
# the data and bail
- $self->mason->clear_buffer;
- $self->mason->out($output);
- $self->mason->abort;
+ my $apache = HTML::Mason::FakeApache->new();
+ $apache->send_http_header();
+ print $output;
+ Jifty::Dispatcher::last_rule;
}
1;
Modified: jifty/trunk/lib/Jifty/Web/PageRegion.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/PageRegion.pm (original)
+++ jifty/trunk/lib/Jifty/Web/PageRegion.pm Wed Jan 18 14:24:48 2006
@@ -238,19 +238,14 @@
$result .= qq|<div id="region-| . $self->qualified_name . qq|">|;
}
- # Use a subrequest so we can't show components we wouldn't
- # normally be allowed to. We pass in an empty 'J:ACTIONS' so that
- # actions don't get run more than once.
-
- Jifty->web->mason->make_subrequest
- ( comp => $self->path,
- args => [ %{ Jifty->web->request->arguments },
- region => $self,
- 'J:ACTIONS' => '',
- %arguments ],
- out_method => \$result,
- )->exec;
+ # Merge in defaults
+ %arguments = (%{ Jifty->web->request->arguments }, region => $self, 'J:ACTIONS' => '', %arguments);
+
+ $Jifty::Dispatcher::Dispatcher->{handler}->interp->make_request(comp => $self->path,
+ args => [ %arguments ],
+ out_method => \$result,
+ )->exec;
if ($self->region_wrapper) {
$result .= qq|</div>|;
}
More information about the Jifty-commit
mailing list