Changeset 92734 in spip-zone


Ignore:
Timestamp:
Nov 7, 2015, 9:13:30 PM (4 years ago)
Author:
p@…
Message:

Une fonction pour supprimer un document de la session

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/uploadhtml5/trunk/inc/saisie_upload.php

    r92713 r92734  
    44
    55include_spip('inc/session');
    6 
    76
    87/**
     
    2726function saisie_upload_terminer() {
    2827    session_set('upload', null);
     28}
     29
     30/**
     31 * Supprimer un document de la session
     32 *
     33 * @param mixed $id_document
     34 * @access public
     35 */
     36function saisie_supprimer_document_session($id_document) {
     37    include_spip('inc/session');
     38    $upload = session_get('upload');
     39    unset($upload[array_search($id_document, $upload)]);
     40    session_set('upload', $upload);
    2941}
    3042
Note: See TracChangeset for help on using the changeset viewer.