BUGFIX: Treat _method() as a cacheable method but not __method()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78240 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-06-02 04:02:28 +00:00
parent 4d02ee68d0
commit ebbcf036ee

View File

@ -78,7 +78,7 @@ class ViewableData extends Object implements IteratorAggregate {
// Set up cached methods
$methodNames = $this->allMethodNames();
foreach($methodNames as $methodName) {
if($methodName[0] == "_") {
if($methodName[0] == "_" && $methodName[1] != "_") {
$trimmedName = substr($methodName,1);
$this->createMethod($trimmedName, "return \$obj->cachedCall('$methodName', '$trimmedName', \$args);");
}