@@ -80,9 +80,9 @@ discard block |
||
| 80 | 80 | // de connexion, et tout risque d'ambiguite |
| 81 | 81 | if (!isset($nom_cache_desc_sql[$serveur][$objets_sql])) { |
| 82 | 82 | $nom_cache_desc_sql[$serveur][$objets_sql] = |
| 83 | - _DIR_CACHE . 'sql_desc_' |
|
| 83 | + _DIR_CACHE.'sql_desc_' |
|
| 84 | 84 | . ($serveur ? "{$serveur}_" : "") |
| 85 | - . substr(md5($connexion['db'] . ":" . $connexion['prefixe'] . ":$objets_sql"), 0, 8) |
|
| 85 | + . substr(md5($connexion['db'].":".$connexion['prefixe'].":$objets_sql"), 0, 8) |
|
| 86 | 86 | . '.txt'; |
| 87 | 87 | // nouveau nom de cache = nouvelle version en memoire |
| 88 | 88 | unset($connexion['tables']); |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | if ($connexion['spip_connect_version']) { |
| 111 | 111 | if ($table_spip and isset($GLOBALS['table_des_tables'][$nom])) { |
| 112 | 112 | $nom = $GLOBALS['table_des_tables'][$nom]; |
| 113 | - $nom_sql = 'spip_' . $nom; |
|
| 113 | + $nom_sql = 'spip_'.$nom; |
|
| 114 | 114 | } |
| 115 | 115 | } |
| 116 | 116 | |
@@ -136,11 +136,11 @@ discard block |
||
| 136 | 136 | // meme si pas d'abreviation declaree, trouver la table spip_$nom |
| 137 | 137 | // si c'est une table principale, |
| 138 | 138 | // puisqu'on le fait aussi pour les tables auxiliaires |
| 139 | - elseif ($nom_sql == $nom and isset($GLOBALS['tables_principales']['spip_' . $nom])) { |
|
| 140 | - $nom_sql = 'spip_' . $nom; |
|
| 139 | + elseif ($nom_sql == $nom and isset($GLOBALS['tables_principales']['spip_'.$nom])) { |
|
| 140 | + $nom_sql = 'spip_'.$nom; |
|
| 141 | 141 | $fdesc = &$GLOBALS['tables_principales'][$nom_sql]; |
| 142 | 142 | } elseif (isset($GLOBALS['tables_auxiliaires'][$n = $nom]) |
| 143 | - or isset($GLOBALS['tables_auxiliaires'][$n = 'spip_' . $nom]) |
|
| 143 | + or isset($GLOBALS['tables_auxiliaires'][$n = 'spip_'.$nom]) |
|
| 144 | 144 | ) { |
| 145 | 145 | $nom_sql = $n; |
| 146 | 146 | $fdesc = &$GLOBALS['tables_auxiliaires'][$n]; |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | $desc = sql_showtable($nom_sql, $table_spip, $serveur); |
| 153 | 153 | if (!$desc or !$desc['field']) { |
| 154 | 154 | if (!$fdesc) { |
| 155 | - spip_log("trouver_table: table inconnue '$serveur' '$nom'", 'base' . _LOG_INFO_IMPORTANTE); |
|
| 155 | + spip_log("trouver_table: table inconnue '$serveur' '$nom'", 'base'._LOG_INFO_IMPORTANTE); |
|
| 156 | 156 | |
| 157 | 157 | return null; |
| 158 | 158 | } |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | $desc['exist'] = true; |
| 165 | 165 | // gerer le cas des cles vides (echec de l'analyse sur une vue par exemple) |
| 166 | 166 | // pour recuperer la declaration de lister_tables_objets_sql() si il y en a une |
| 167 | - if (! $desc['key']) { |
|
| 167 | + if (!$desc['key']) { |
|
| 168 | 168 | spip_log("trouver_table: table sans cle '$serveur' '$nom'", 'base'); |
| 169 | 169 | unset($desc['key']); |
| 170 | 170 | } |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | // $desc est prioritaire pour la description de la table |
| 179 | 179 | $desc = array_merge(lister_tables_objets_sql($nom_sql, $desc), $desc); |
| 180 | 180 | // s'assurer qu'on a toujours un 'key' |
| 181 | - if (! isset($desc['key'])) { |
|
| 181 | + if (!isset($desc['key'])) { |
|
| 182 | 182 | $desc['key'] = array(); |
| 183 | 183 | } |
| 184 | 184 | |