Changeset 107637 in spip-zone
- Timestamp:
- Nov 19, 2017, 6:34:00 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/stocks/trunk/stocks_pipelines.php
r107631 r107637 46 46 include_spip('inc/stocks'); 47 47 $id_produit = $flux['data']['id_produit']; 48 $quantite = intval(_request('quantite_produit')); 48 $quantite = intval(_request('quantite_produit')); 49 49 50 //spip_log("$id_produit",'stocks'); 50 51 set_quantite("produit",$id_produit,$quantite); … … 87 88 function stocks_pre_boucle($boucle) { 88 89 //Connaitre la table en cours 89 $id_table = $boucle->id_table;90 91 //Savoir si on consulté la table organisations_liens92 if ($jointure = array_keys($boucle->from, 'spip_stocks')) {93 //Vérifier qu'on est bien dans le cas d'une jointure automatique94 if (isset($boucle->join[$jointure[0]])95 and isset($boucle->join[$jointure[0]][3])96 and $boucle->join[$jointure[0]]97 and $boucle->join[$jointure[0]][3]98 ) {99 //Le critere ON de la jointure (index 3 dans le tableau de jointure) est incompléte100 //on fait en sorte de retomber sur ses pattes, en indiquant l'objet à joindre101 $boucle->join[$jointure[0]][3] = "'L1.objet='.sql_quote('".objet_type($id_table)."')";102 }103 }90 // $id_table = $boucle->id_table; 91 // 92 // //Savoir si on consulté la table organisations_liens 93 // if ($jointure = array_keys($boucle->from, 'spip_stocks')) { 94 // //Vérifier qu'on est bien dans le cas d'une jointure automatique 95 // if (isset($boucle->join[$jointure[0]]) 96 // and isset($boucle->join[$jointure[0]][3]) 97 // and $boucle->join[$jointure[0]] 98 // and $boucle->join[$jointure[0]][3] 99 // ) { 100 // //Le critere ON de la jointure (index 3 dans le tableau de jointure) est incompléte 101 // //on fait en sorte de retomber sur ses pattes, en indiquant l'objet à joindre 102 // $boucle->join[$jointure[0]][3] = "'L1.objet='.sql_quote('".objet_type($id_table)."')"; 103 // } 104 // } 104 105 105 106 return $boucle;
Note: See TracChangeset
for help on using the changeset viewer.