Changeset 107616 in spip-zone
- Timestamp:
- Nov 18, 2017, 12:50:46 PM (3 years ago)
- Location:
- _plugins_/stocks/trunk
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/stocks/trunk/paquet.xml
r107613 r107616 2 2 prefix="stocks" 3 3 categorie="divers" 4 version="0.1. 0"4 version="0.1.1" 5 5 etat="dev" 6 6 compatibilite="[3.0.1;3.2.*]" … … 18 18 <pipeline nom="formulaire_charger" inclure="stocks_pipelines.php" /> 19 19 <pipeline nom="formulaire_traiter" inclure="stocks_pipelines.php" /> 20 <pipeline nom="afficher_fiche_objet" inclure="stocks_pipelines.php" /> 20 21 <pipeline nom="pre_boucle" inclure="stocks_pipelines.php" /> 21 22 -
_plugins_/stocks/trunk/stocks_pipelines.php
r107609 r107616 2 2 3 3 // Sécurité 4 if (!defined('_ECRIRE_INC_VERSION')) return; 4 if (!defined("_ECRIRE_INC_VERSION")) { 5 return; 6 } 5 7 6 8 function stocks_formulaire_charger($flux) { … … 44 46 $id_produit = $flux['data']['id_produit']; 45 47 $quantite = intval(_request('quantite_produit')); 46 48 //spip_log("$id_produit",'stocks'); 47 49 set_quantite("produit",$id_produit,$quantite); 48 50 } 49 51 50 52 return $flux; 53 } 51 54 55 /* 56 * function stocks_afficher_contenu_objet 57 * @param $flux 58 */ 59 60 function stocks_afficher_fiche_objet($flux) { 61 62 63 if($flux['args']['type'] == 'produit'){ 64 65 $objet = $flux['args']['type']; 66 $id_objet = intval($flux['args']['id']); 67 68 $texte = recuperer_fond( 69 'prive/squelettes/inclure/stock_fiche_objet', 70 array( 71 'objet'=>$objet, 72 'id_objet'=>$id_objet 73 ) 74 ); 75 76 77 if ($p = strpos($flux['data'], '<!--afficher_fiche_objet-->')) { 78 $flux['data'] = substr_replace($flux['data'], $texte, $p, 0); 79 } else { 80 $flux['data'] .= $texte; 81 } 82 83 } 84 return $flux; 52 85 } 86 53 87 54 88 function stocks_pre_boucle($boucle) { … … 73 107 } 74 108 75 ?>
Note: See TracChangeset
for help on using the changeset viewer.