| @@ 259-267 (lines=9) @@ | ||
| 256 | ||
| 257 | // register position |
|
| 258 | $key = array_search($this->params('action'), $viewSteps); |
|
| 259 | if (!$key) { |
|
| 260 | // register is not a substep of the game so it's a step |
|
| 261 | $key = array_search($this->params('action'), $steps); |
|
| 262 | $keyStep = true; |
|
| 263 | } else { |
|
| 264 | // register was a substep, i search the index of its parent |
|
| 265 | $key = array_search($key, $steps); |
|
| 266 | $keyStep = false; |
|
| 267 | } |
|
| 268 | ||
| 269 | // play position |
|
| 270 | $keyplay = array_search('play', $viewSteps); |
|
| @@ 485-493 (lines=9) @@ | ||
| 482 | ||
| 483 | // share position |
|
| 484 | $key = array_search($this->params('action'), $viewSteps); |
|
| 485 | if (!$key) { |
|
| 486 | // share is not a substep of the game so it's a step |
|
| 487 | $key = array_search($this->params('action'), $steps); |
|
| 488 | $keyStep = true; |
|
| 489 | } else { |
|
| 490 | // share was a substep, I search the index of its parent |
|
| 491 | $key = array_search($key, $steps); |
|
| 492 | $keyStep = false; |
|
| 493 | } |
|
| 494 | ||
| 495 | // play position |
|
| 496 | $keyplay = array_search('play', $viewSteps); |
|