Subversion Repositories Applications.projet

Compare Revisions

Ignore whitespace Rev 430 → Rev 431

/trunk/classes/ezmlm-php-2.0/ezmlm-parser.php
19,7 → 19,7
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: ezmlm-parser.php,v 1.5 2008-11-19 09:28:46 aperonnet Exp $
// CVS : $Id: ezmlm-parser.php,v 1.3 2007/04/19 15:34:35 neiluj Exp $
/**
* Application projet
*
29,7 → 29,7
//Auteur original : ?? recupere dans ezmlm-php
*@author Alexandre Granier <alexandre@tela-botanica.org>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.5 $
*@version $Revision: 1.3 $
// +------------------------------------------------------------------------------------------------------+
*/
 
38,7 → 38,7
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
// $Id: ezmlm-parser.php,v 1.5 2008-11-19 09:28:46 aperonnet Exp $
// $Id: ezmlm-parser.php,v 1.3 2007/04/19 15:34:35 neiluj Exp $
//
 
require_once("ezmlm.php");
87,10 → 87,17
$repertoire_archive = opendir($this->listdir . "/archive/");
 
$repertoire_message = array() ;
$dernier_repertoire = 0 ;
while (false !== ($item = readdir($repertoire_archive))) {
// $item contient les noms des repertoires
// on ne garde que ceux qui sont des chiffres
 
$numArchive = $this->getNumArchive();
$dernier_repertoire = floor($numArchive / 100);
 
if (preg_match('/[0-9]+/', $item)) {
// on ouvre le fichier d index de chaque repertoire
if ((int) $item > $dernier_repertoire) $dernier_repertoire = (int) $item;
}
}
$tableau_message = array() ;
$compteur_message = 0 ;
$fichier_index = fopen ($this->listdir.'/archive/'.$dernier_repertoire.'/index', 'r') ;
169,7 → 176,7
return $this->parse($data,$simple);
}
 
// parse_file_headers - ouvre un fichier et analyse les entête
// parse_file_headers - ouvre un fichier et analyse les ent�tes
function parse_file_headers($file,$simple = FALSE) {
if (!is_file($file)) {
if (is_file($this->listdir . "/" . $file)) { $file = $this->listdir . "/" . $file; }
243,8 → 250,8
}
}
// ajout alex
// pour supprimer le problème des ISO...
// a déplacer ailleur, et appelé avant affichage
// pour supprimer le probl�me des ISO...
// a d�placer ailleur, et appel� avant affichage
if (preg_match ('/windows-[0-9][0-9][0-9][0-9]/', $this->headers['subject'], $nombre)) {
$reg_exp = $nombre[0] ;
353,8 → 360,8
function _get_parts($data,$boundary) {
$inpart = -1;
$lines = preg_split('/\n/', $data);
// La première partie contient l'avertissement pour les client mail ne supportant pas
// multipart, elle est stocké dans parts[-1]
// La premi�re partie contient l'avertissement pour les client mail ne supportant pas
// multipart, elle est stock� dans parts[-1]
while(list($key,$val) = each($lines)) {
if ($val == "--" . $boundary) { $inpart++; continue; } // start of a part
else if ($val == "--" . $boundary . "--") { break; } // the end of the last part
361,7 → 368,7
else { $parts[$inpart] .= $val . "\n"; }
}
for ($i = 0; $i < count($parts) - 1; $i++) { // On saute la première partie
for ($i = 0; $i < count($parts) - 1; $i++) { // On saute la premi�re partie
$part[$i] = new ezmlm_parser();
$part[$i]->parse($parts[$i]);
$this->parts[$i] = $part[$i];