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