| @@ 293-301 (lines=9) @@ | ||
| 290 | ||
| 291 | // register position |
|
| 292 | $key = array_search($this->params('action'), $viewSteps); |
|
| 293 | if (!$key) { |
|
| 294 | // register is not a substep of the game so it's a step |
|
| 295 | $key = array_search($this->params('action'), $steps); |
|
| 296 | $keyStep = true; |
|
| 297 | } else { |
|
| 298 | // register was a substep, i search the index of its parent |
|
| 299 | $key = array_search($key, $steps); |
|
| 300 | $keyStep = false; |
|
| 301 | } |
|
| 302 | ||
| 303 | // play position |
|
| 304 | $keyplay = array_search('play', $viewSteps); |
|
| @@ 519-527 (lines=9) @@ | ||
| 516 | ||
| 517 | // share position |
|
| 518 | $key = array_search($this->params('action'), $viewSteps); |
|
| 519 | if (!$key) { |
|
| 520 | // share is not a substep of the game so it's a step |
|
| 521 | $key = array_search($this->params('action'), $steps); |
|
| 522 | $keyStep = true; |
|
| 523 | } else { |
|
| 524 | // share was a substep, I search the index of its parent |
|
| 525 | $key = array_search($key, $steps); |
|
| 526 | $keyStep = false; |
|
| 527 | } |
|
| 528 | ||
| 529 | // play position |
|
| 530 | $keyplay = array_search('play', $viewSteps); |
|