Changeset 95806 in spip-zone
- Timestamp:
- Mar 6, 2016, 5:18:02 PM (5 years ago)
- Location:
- _plugins_/massicot/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/massicot/trunk/massicot_pipelines.php
r95781 r95806 75 75 return $flux; 76 76 } 77 78 /** 79 * Supprimer les traitements lorsqu'on remplace l'image d'un document 80 * 81 * @pipeline post_edition 82 * @param array $flux Données du pipeline 83 * @return array Données du pipeline 84 */ 85 function massicot_post_edition($flux) { 86 87 if (($flux['args']['type'] === 'document') 88 and isset($flux['data']['fichier'])) { 89 90 include_spip('base/abstract_sql'); 91 include_spip('action/editer_liens'); 92 93 $id_document = $flux['args']['id_objet']; 94 95 $massicotages = objet_trouver_liens( 96 array('massicotage' => '*'), 97 array('document' => $id_document) 98 ); 99 100 $id_massicotages = array_map( 101 function ($el) { 102 return $el['id_massicotage']; 103 }, 104 $massicotages 105 ); 106 107 sql_delete( 108 'spip_massicotages', 109 sql_in('id_massicotage', $id_massicotages) 110 ); 111 sql_delete( 112 'spip_massicotages_liens', 113 sql_in('id_massicotage', $id_massicotages) 114 ); 115 } 116 117 return $flux; 118 } -
_plugins_/massicot/trunk/paquet.xml
r95782 r95806 27 27 <pipeline nom="header_prive" inclure="massicot_pipelines.php" /> 28 28 <pipeline nom="document_desc_actions" inclure="massicot_pipelines.php" /> 29 <pipeline nom="post_edition" inclure="massicot_pipelines.php" /> 29 30 30 31 <!-- <lib nom="jquery.imgareaselect.js" lien="https://github.com/odyniec/imgareaselect/archive/master.zip" /> -->
Note: See TracChangeset
for help on using the changeset viewer.