Skip to content
Extraits de code Groupes Projets
Valider cf23536f rédigé par JamesRezo's avatar JamesRezo :tada:
Parcourir les fichiers

fix: plus d'include_spip pour charger les classes d'archiviste

parent 986125bf
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
### Changed ### Changed
- Appel de l'archiviste via `use Spip\Archiver\SpipArchiver`
- Compatible SPIP 5.0.0-dev - Compatible SPIP 5.0.0-dev
### Security ### Security
......
<?php <?php
use Spip\Archiver\SpipArchiver;
/***************************************************************************\ /***************************************************************************\
* SPIP, Système de publication pour l'internet * * SPIP, Système de publication pour l'internet *
* * * *
...@@ -467,8 +469,7 @@ function fixer_fichier_upload($file, $mode = '') { ...@@ -467,8 +469,7 @@ function fixer_fichier_upload($file, $mode = '') {
$source = _DIR_TMP . basename($tmp_dir) . '.' . $ext; $source = _DIR_TMP . basename($tmp_dir) . '.' . $ext;
include_spip('inc/archives'); $archive = new SpipArchiver($source);
$archive = new Spip\Archives\SpipArchives($source);
$res = $archive->emballer([$tmp]); $res = $archive->emballer([$tmp]);
effacer_repertoire_temporaire($tmp_dir); effacer_repertoire_temporaire($tmp_dir);
......
<?php <?php
use Spip\Archiver\SpipArchiver;
/***************************************************************************\ /***************************************************************************\
* SPIP, Système de publication pour l'internet * * SPIP, Système de publication pour l'internet *
* * * *
...@@ -272,10 +274,9 @@ function joindre_verifier_zip($files) { ...@@ -272,10 +274,9 @@ function joindre_verifier_zip($files) {
); );
// Est-ce qu'on sait le lire ? // Est-ce qu'on sait le lire ?
include_spip('inc/archives');
if ( if (
$zip $zip
and $archive = new Spip\Archives\SpipArchives($zip) and $archive = new SpipArchiver($zip)
and $infos = $archive->informer() and $infos = $archive->informer()
and $contenu = joindre_decrire_contenu_zip($infos) and $contenu = joindre_decrire_contenu_zip($infos)
and $tmp = sous_repertoire(_DIR_TMP, 'zip') and $tmp = sous_repertoire(_DIR_TMP, 'zip')
...@@ -336,8 +337,7 @@ function joindre_decrire_contenu_zip($infos) { ...@@ -336,8 +337,7 @@ function joindre_decrire_contenu_zip($infos) {
function joindre_deballer_lister_zip($path, $tmp_dir) { function joindre_deballer_lister_zip($path, $tmp_dir) {
include_spip('inc/archives'); $archive = new SpipArchiver($path);
$archive = new Spip\Archives\SpipArchives($path);
if ( if (
$infos = $archive->informer() $infos = $archive->informer()
...@@ -399,7 +399,7 @@ if (!function_exists('fixer_extension_document')) { ...@@ -399,7 +399,7 @@ if (!function_exists('fixer_extension_document')) {
/** /**
* Gestion des fichiers ZIP * Gestion des fichiers ZIP
* *
* @param sring $f * @param string $f
* @return bool|int * @return bool|int
*/ */
function accepte_fichier_upload($f) { function accepte_fichier_upload($f) {
......
...@@ -97,7 +97,7 @@ parameters: ...@@ -97,7 +97,7 @@ parameters:
- -
message: "#^Function include_spip not found\\.$#" message: "#^Function include_spip not found\\.$#"
count: 10 count: 9
path: action/ajouter_documents.php path: action/ajouter_documents.php
- -
...@@ -151,7 +151,7 @@ parameters: ...@@ -151,7 +151,7 @@ parameters:
path: action/ajouter_documents.php path: action/ajouter_documents.php
- -
message: "#^Instantiated class Spip\\\\Archives\\\\SpipArchives not found\\.$#" message: "#^Instantiated class Spip\\\\Archiver\\\\SpipArchiver not found\\.$#"
count: 1 count: 1
path: action/ajouter_documents.php path: action/ajouter_documents.php
...@@ -1292,7 +1292,7 @@ parameters: ...@@ -1292,7 +1292,7 @@ parameters:
- -
message: "#^Function include_spip not found\\.$#" message: "#^Function include_spip not found\\.$#"
count: 11 count: 9
path: inc/joindre_document.php path: inc/joindre_document.php
- -
...@@ -1341,7 +1341,7 @@ parameters: ...@@ -1341,7 +1341,7 @@ parameters:
path: inc/joindre_document.php path: inc/joindre_document.php
- -
message: "#^Instantiated class Spip\\\\Archives\\\\SpipArchives not found\\.$#" message: "#^Instantiated class Spip\\\\Archiver\\\\SpipArchiver not found\\.$#"
count: 2 count: 2
path: inc/joindre_document.php path: inc/joindre_document.php
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter