Remplacement identificateurs et fonctions ; ajout session_start()
FossilOrigin-Name: 66cba3dd1a9082a7481da1d448e40d14964dfbfc95fff099be86f599ad6bf50b
This commit is contained in:
parent
8091c8b87d
commit
263770b9c7
2 changed files with 15 additions and 12 deletions
|
|
@ -1,20 +1,23 @@
|
|||
<?php
|
||||
namespace Paheko;
|
||||
session_start();
|
||||
|
||||
use Paheko\Entities\Files\File;
|
||||
use Paheko\Files\Files;
|
||||
|
||||
$parent = qg('p');
|
||||
|
||||
/*
|
||||
if (!File::checkCreateAccess($parent, $session)) {
|
||||
throw new UserException('Vous n\'avez pas le droit d\'ajouter de fichier.');
|
||||
}
|
||||
// checkCreateAccess n'existe plus...
|
||||
*/
|
||||
|
||||
$csrf_key = 'upload_file_' . md5($parent);
|
||||
|
||||
$form->runIf('upload', function () use ($parent) {
|
||||
$_SESSION['sig_file'] = File::uploadMultiple($parent, 'file');
|
||||
}, $csrf_key, PLUGIN_ROOT . '/www/admin/config.php');
|
||||
$_SESSION['sig_file'] = \Paheko\Files\Files::uploadMultiple($parent, 'file');
|
||||
}, $csrf_key, PLUGIN_ROOT . '/admin/config.php');
|
||||
|
||||
$tpl->assign(compact('parent', 'csrf_key'));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue