Skip to content
Snippets Groups Projects
Commit 0d992b2b authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0

Conflicts:
	htdocs/cron/class/cronjob.class.php
	htdocs/install/pgsql/functions/functions.sql
parents 9c4d60fd bc8e2030
No related branches found
No related tags found
No related merge requests found
......@@ -167,7 +167,7 @@ if ($action == 'edit') // Edit
print '<td width="20">&nbsp;</td>';
print '</tr>';
// Multilangual GUI
// Multilingual GUI
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("EnableMultilangInterface").'</td><td>';
print $form->selectyesno('main_multilangs',$conf->global->MAIN_MULTILANGS,1);
......@@ -181,7 +181,7 @@ if ($action == 'edit') // Edit
show_theme(null,1);
print '<br>';
// Liste des zone de recherche permanantes supportees
// List of permanent supported search box
if (! empty($searchform))
{
print '<table summary="search" class="noborder" width="100%">';
......
......@@ -1577,6 +1577,7 @@ function getListOfModels($db,$type,$maxfilenamelength=0)
/**
* This function evaluates a string that should be a valid IPv4
* Note: For ip 169.254.0.0, it returns 0 with some PHP (5.6.24) and 2 with some minor patchs of PHP (5.6.25). See https://github.com/php/php-src/pull/1954.
*
* @param string $ip IP Address
* @return int 0 if not valid or reserved range, 1 if valid and public IP, 2 if valid and private range IP
......
......@@ -1078,9 +1078,6 @@ class Cronjob extends CommonObject
}
if (! empty($conf->global->MAIN_UMASK)) @chmod($outputfile, octdec($conf->global->MAIN_UMASK));
}
}
dol_syslog(get_class($this)."::run_jobs output_arr:".var_export($output_arr,true)." lastoutput=".$this->lastoutput." lastresult=".$this->lastresult, LOG_DEBUG);
// Update with result
if (is_array($output_arr) && count($output_arr)>0)
......@@ -1090,7 +1087,12 @@ class Cronjob extends CommonObject
$this->lastoutput.=$val."\n";
}
}
$this->lastresult=$retval;
dol_syslog(get_class($this)."::run_jobs output_arr:".var_export($output_arr,true)." lastoutput=".$this->lastoutput." lastresult=".$this->lastresult, LOG_DEBUG);
}
$this->datelastresult=dol_now();
$result = $this->update($user); // This include begin/commit
if ($result < 0)
......
......@@ -223,7 +223,7 @@ class Functions2LibTest extends PHPUnit_Framework_TestCase
$ip='169.254.0.0';
$result=is_ip($ip);
print __METHOD__." for ".$ip." result=".$result."\n";
$this->assertEquals(0,$result,$ip);
//$this->assertEquals(2,$result,$ip); // Assertion disabled because returned value differs between PHP patch version
$ip='1.2.3.4';
$result=is_ip($ip);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment