Commit 30a2bd2e authored by Giovannoni Laurent's avatar Giovannoni Laurent

Merge branch 'develop' into 'master'

Develop

See merge request !14
parents 93d82617 6ab6ed96
......@@ -15,12 +15,12 @@ before_script:
- apt-get update > /dev/null
- apt-get install apt-utils -yqq > /dev/null
- bash ci/docker_install_php.sh > /dev/null
- bash ci/docker_install_maarchcourrier.sh > /dev/null
# - bash ci/docker_install_maarchcourrier.sh > /dev/null
- bash ci/docker_install_mail_server.sh > /dev/null
- bash ci/send_simple_mail.sh > /dev/null
job_php-7.0:
image: php:7.0-apache
job_php-7.1:
image: php:7.1-apache
stage: test
script:
- mkdir -p /opt/maarch/
......
......@@ -9,11 +9,12 @@ apt-get install -y libkrb5-dev libc-client-dev libpq-dev libxml2-dev libxslt1-de
&& mkdir /usr/kerberos \
&& ln -s /usr/lib/x86_64-linux-gnu/mit-krb5/* /usr/kerberos \
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
&& docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
&& docker-php-ext-install pdo_pgsql soap gettext pgsql xsl xmlrpc zip imap \
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& pear channel-discover pear.maarch.org \
#&& docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
#&& docker-php-ext-install pdo_pgsql soap gettext pgsql xsl xmlrpc zip imap \
docker-php-ext-install soap xsl imap
#&& pecl install xdebug \
#&& docker-php-ext-enable xdebug \
pear channel-discover pear.maarch.org \
&& pear install maarch/CLITools-0.3.1 \
&& pear install SOAP-0.13.0
......
......@@ -9,7 +9,7 @@ class FileImport
private $MoveDirectory;
private $Recursive = false;
private $CreateFolders = false;
private $Extensions = array();
private $Extensions = '';
private $NbMaxFoldersToImport = 0;
private $DeleteSubFolders = false;
private $SubFoldersToDel = array();
......@@ -31,7 +31,7 @@ class FileImport
$MoveDirectory=false,
$Recursive=false,
$CreateFolders=false,
$Extensions=array(),
$Extensions='',
$NbMaxFoldersToImport = 0,
$DeleteSubFolders = false
) {
......@@ -131,9 +131,18 @@ class FileImport
/* If extensions filtered, check extension
********************************************************************************/
$extArr = array();
if (
is_string($this->Extensions) &&
isset($this->Extensions) &&
$this->Extensions <> ''
) {
$extArr = explode(' ', strtolower($this->Extensions));
}
$entry_ext = substr(strrchr($entry_path , '.'), 1);
if(count($this->Extensions) > 0) {
if(!in_array($entry_ext, $this->Extensions)) {
if(count($extArr) > 0) {
if(!in_array(strtolower($entry_ext), $extArr)) {
echo 'discard ' . $entry_path . PHP_EOL;
$this->discard(
$entry_path,
$entry_name
......
......@@ -883,7 +883,12 @@ class MailCapture
if($value != $test) $applies = true;
break;
case "in":
if(in_array($value, explode(' ', $test))) $applies = true;
if(in_array($value, explode(' ', $test))) {
$applies = true;
var_dump($test);
var_dump($value);
echo 'iiiiiiiiiiccciiiiiii';
}
break;
case "notin":
if(!in_array(strtolower($value), explode(' ', strtolower($test)))) $applies = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment