mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Update view/SSViewer.php
This commit is contained in:
parent
a6cc7d8392
commit
3a9ea42488
@ -50,8 +50,8 @@ class SSViewer_Scope {
|
|||||||
array_splice($this->itemStack, $this->localIndex+1);
|
array_splice($this->itemStack, $this->localIndex+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function obj($name){
|
function obj($name, $arguments = array()) {
|
||||||
|
|
||||||
switch ($name) {
|
switch ($name) {
|
||||||
case 'Up':
|
case 'Up':
|
||||||
list($this->item, $this->itemIterator, $unused2, $this->upIndex, $this->currentIndex) = $this->itemStack[$this->upIndex];
|
list($this->item, $this->itemIterator, $unused2, $this->upIndex, $this->currentIndex) = $this->itemStack[$this->upIndex];
|
||||||
@ -63,10 +63,9 @@ class SSViewer_Scope {
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
$on = $this->itemIterator ? $this->itemIterator->current() : $this->item;
|
$on = $this->itemIterator ? $this->itemIterator->current() : $this->item;
|
||||||
|
|
||||||
$arguments = func_get_args();
|
$this->item = call_user_func_array(array($on, 'obj'), (array) $arguments);
|
||||||
$this->item = call_user_func_array(array($on, 'obj'), $arguments);
|
|
||||||
|
|
||||||
$this->itemIterator = null;
|
$this->itemIterator = null;
|
||||||
$this->upIndex = $this->currentIndex ? $this->currentIndex : count($this->itemStack)-1;
|
$this->upIndex = $this->currentIndex ? $this->currentIndex : count($this->itemStack)-1;
|
||||||
$this->currentIndex = count($this->itemStack);
|
$this->currentIndex = count($this->itemStack);
|
||||||
|
Loading…
Reference in New Issue
Block a user