Subversion Repositories Applications.projet

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php
/**
 * @author        Raphaƫl Droz <raphael@tela-botanica.org>
 * @copyright     2013, Tela-Botanica
 * @license GPL v3
 * @license CECILL v2
 */

// eg: php clical.php amorphophallus_et_araceae|html2text 
if (PHP_SAPI !== 'cli') die;

// for standalone use
// WARNING: this uses cache !
// php-cli user could have != permission than a webserver
// then cache file created could become inaccessible to webserver
error_reporting(E_ALL ^ E_STRICT ^ E_NOTICE ^ E_DEPRECATED);
date_default_timezone_set('Europe/Paris');

$path = '/home/vpopmail/domains';
$domaine = 'tela-botanica.org';

$liste = $argv[1];
if(isset($argv[2])) $domaine = $argv[2];
if(isset($argv[3])) $path = $argv[3];

if(!$liste || !$domaine || !$path) die;

include_once 'ezmlm-php-2.0/ezmlm.php' ;

// Parametrage de la liste
$info = new ezmlm_threads();
if (!$info) die('Les fichiers de la liste ne sont pas visible sur le serveur');

$info->forcehref = $url;
$info->listdir = $path . '/' . $domaine . '/' . $liste ;
$info->listname = $liste;
$info->listdomain = $domaine ;

echo $info->listmessages();