Changeset 95803 in spip-zone


Ignore:
Timestamp:
Mar 6, 2016, 12:17:43 PM (5 years ago)
Author:
p@…
Message:

Utiliser une fonction pour charger les documents en session

Location:
_plugins_/suploadhtml5/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/suploadhtml5/trunk/action/send_upload.php

    r95786 r95803  
    2525
    2626    // On stock l'upload en session
    27     include_spip('inc/session');
    28     $uploads = session_get('upload') ?: array();
    29     $uploads[] = $id_document;
    30     session_set('upload', $uploads);
     27    include_spip('inc/saisie_upload');
     28    saisie_upload_charger($id_document);
    3129}
  • _plugins_/suploadhtml5/trunk/inc/saisie_upload.php

    r95802 r95803  
    160160    }
    161161}
     162
     163/**
     164 * fonction pour charger des documents dans la session
     165 *
     166 * @param mixed $id_document
     167 * @access public
     168 */
     169function saisie_upload_charger($id_document) {
     170    $uploads = session_get('upload') ?: array();
     171    $uploads[] = $id_document;
     172    session_set('upload', $uploads);
     173}
Note: See TracChangeset for help on using the changeset viewer.