OK, I had a go at bending Auth to my will.
http://bin.cakephp.org/saved/29102
The tweaks (two of them) are in the startup method. lines 301-305 and
316-320.
To make it work you will also need an altered version of
requestAction. Put this in app_controller.php or be brave and hack it
into object.php. Works the same either way.
And while I am in a grumpy mood... ;) Why the bleeding ___ can I not
set bare to 0 in requestAction as it is? What harm can it do to let us
feed this "extra" to the function if we find it useful? Not that it is
a big problem pasting my own version into AppController but I just
really don't see why it is hardcoded. Ok, grumpy mood gone :)
Don't get me wrong. Cake is great. It is a bit like Apple I guess...
99% is perfect which is why you nag at the little things. It is just
sooo close to total perfection. (Please compare with the iPhone...
mostly brilliant, but what were they thinking with that headphone
socket?)
<?php
function requestAction($url, $extra = array()) {
if (!empty($url)) {
if (!class_exists('dispatcher')) {
require CAKE . 'dispatcher.php';
}
$dispatcher =& new Dispatcher();
if (in_array('return', $extra, true)) {
$extra['return'] = 0;
$extra['bare'] = isset($extra['bare']) ? $extra['bare']
: 1; // <--
this is new
$extra['requested'] = 1;
ob_start();
$out = $dispatcher->dispatch($url, $extra);
$out = ob_get_clean();
return $out;
} else {
$extra['return'] = 1;
$extra['bare'] = isset($extra['bare']) ? $extra['bare']
: 1; // <--
same here
$extra['requested'] = 1;
return $dispatcher->dispatch($url, $extra);
}
} else {
return false;
}
}
?>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---