| @@ 383-386 (lines=4) @@ | ||
| 380 | * @return bool ou requete |
|
| 381 | */ |
|
| 382 | function spip_pg_create_index($nom, $table, $champs, $serveur='', $requeter=true) { |
|
| 383 | if (!($nom OR $table OR $champs)) { |
|
| 384 | spip_log("Champ manquant pour creer un index pg ($nom, $table, (".@join(',',$champs)."))",'pg.'._LOG_ERREUR); |
|
| 385 | return false; |
|
| 386 | } |
|
| 387 | ||
| 388 | $nom = str_replace("`","",$nom); |
|
| 389 | $champs = str_replace("`","",$champs); |
|
| @@ 498-501 (lines=4) @@ | ||
| 495 | * @return bool ou requete |
|
| 496 | */ |
|
| 497 | function spip_sqlite_create_index($nom, $table, $champs, $unique='', $serveur = '', $requeter = true){ |
|
| 498 | if (!($nom OR $table OR $champs)){ |
|
| 499 | spip_log("Champ manquant pour creer un index sqlite ($nom, $table, (".join(',', $champs)."))", 'sqlite.'._LOG_ERREUR); |
|
| 500 | return false; |
|
| 501 | } |
|
| 502 | ||
| 503 | // SQLite ne differentie pas noms des index en fonction des tables |
|
| 504 | // il faut donc creer des noms uniques d'index pour une base sqlite |
|