| @@ 471-478 (lines=8) @@ | ||
| 468 | $info1 = $infos[$dir_type][$plug]; |
|
| 469 | // si des plugins sont necessaires, |
|
| 470 | // on ne peut inserer qu'apres eux |
|
| 471 | foreach ($info1['necessite'] as $need) { |
|
| 472 | $nom = strtoupper($need['nom']); |
|
| 473 | $compat = isset($need['compatibilite']) ? $need['compatibilite'] : ''; |
|
| 474 | if (!isset($liste[$nom]) or !plugin_version_compatible($compat, $liste[$nom]['version'])) { |
|
| 475 | $info1 = false; |
|
| 476 | break; |
|
| 477 | } |
|
| 478 | } |
|
| 479 | if (!$info1) { |
|
| 480 | continue; |
|
| 481 | } |
|
| @@ 484-494 (lines=11) @@ | ||
| 481 | } |
|
| 482 | // idem si des plugins sont utiles, |
|
| 483 | // sauf si ils sont de toute facon absents de la liste |
|
| 484 | foreach ($info1['utilise'] as $need) { |
|
| 485 | $nom = strtoupper($need['nom']); |
|
| 486 | $compat = isset($need['compatibilite']) ? $need['compatibilite'] : ''; |
|
| 487 | if (isset($toute_la_liste[$nom])) { |
|
| 488 | if (!isset($liste[$nom]) or |
|
| 489 | !plugin_version_compatible($compat, $liste[$nom]['version']) |
|
| 490 | ) { |
|
| 491 | $info1 = false; |
|
| 492 | break; |
|
| 493 | } |
|
| 494 | } |
|
| 495 | } |
|
| 496 | if ($info1) { |
|
| 497 | $ordre[$p] = $info1; |
|