| @@ 284-292 (lines=9) @@ | ||
| 281 | ||
| 282 | // register position |
|
| 283 | $key = array_search($this->params('action'), $viewSteps); |
|
| 284 | if (!$key) { |
|
| 285 | // register is not a substep of the game so it's a step |
|
| 286 | $key = array_search($this->params('action'), $steps); |
|
| 287 | $keyStep = true; |
|
| 288 | } else { |
|
| 289 | // register was a substep, i search the index of its parent |
|
| 290 | $key = array_search($key, $steps); |
|
| 291 | $keyStep = false; |
|
| 292 | } |
|
| 293 | ||
| 294 | // play position |
|
| 295 | $keyplay = array_search('play', $viewSteps); |
|
| @@ 510-518 (lines=9) @@ | ||
| 507 | ||
| 508 | // share position |
|
| 509 | $key = array_search($this->params('action'), $viewSteps); |
|
| 510 | if (!$key) { |
|
| 511 | // share is not a substep of the game so it's a step |
|
| 512 | $key = array_search($this->params('action'), $steps); |
|
| 513 | $keyStep = true; |
|
| 514 | } else { |
|
| 515 | // share was a substep, I search the index of its parent |
|
| 516 | $key = array_search($key, $steps); |
|
| 517 | $keyStep = false; |
|
| 518 | } |
|
| 519 | ||
| 520 | // play position |
|
| 521 | $keyplay = array_search('play', $viewSteps); |
|