mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d13633d9d6 | ||
|
|
654e5c6824 | ||
|
|
256cad1c29 | ||
|
|
5d942c9d1a | ||
|
|
3ea9c297ea | ||
|
|
474260e526 | ||
|
|
eead9a93d3 | ||
|
|
7f759c6ff5 | ||
|
|
20aa51f26b | ||
|
|
35f32391a0 | ||
|
|
e0c8ccb9fb | ||
|
|
ef00cb0736 | ||
|
|
d7f7f5bf3d | ||
|
|
7c0a6946a7 | ||
|
|
1ecc1afa9e | ||
|
|
ceb1e699b7 | ||
|
|
c028819cab | ||
|
|
53149bb7cd | ||
|
|
394104291a | ||
|
|
a872b7d42f | ||
|
|
cd7d3f1a36 | ||
|
|
d59b1bb0c6 | ||
|
|
9d582a53ca |
@@ -290,7 +290,7 @@ if ($search_firstname) $sql.= natural_search('p.firstname', $search
|
||||
if ($search_societe) $sql.= natural_search('s.nom', $search_societe);
|
||||
if (strlen($search_poste)) $sql.= natural_search('p.poste', $search_poste);
|
||||
if (strlen($search_phone_perso)) $sql.= natural_search('p.phone_perso', $search_phone_perso);
|
||||
if (strlen($search_phone_pro)) $sql.= natural_search('p.phone', $search_phone);
|
||||
if (strlen($search_phone_pro)) $sql.= natural_search('p.phone', $search_phone_pro);
|
||||
if (strlen($search_phone_mobile)) $sql.= natural_search('p.phone_mobile', $search_phone_mobile);
|
||||
if (strlen($search_fax)) $sql.= natural_search('p.fax', $search_fax);
|
||||
if (strlen($search_skype)) $sql.= natural_search('p.skype', $search_skype);
|
||||
|
||||
@@ -292,17 +292,19 @@ class Utils
|
||||
dol_syslog("Run command ".$fullcommandcrypted);
|
||||
$handlein = popen($fullcommandclear, 'r');
|
||||
$i=0;
|
||||
while (!feof($handlein))
|
||||
{
|
||||
$i++; // output line number
|
||||
$read = fgets($handlein);
|
||||
// Exclude warning line we don't want
|
||||
if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue;
|
||||
fwrite($handle,$read);
|
||||
if (preg_match('/'.preg_quote('-- Dump completed').'/i',$read)) $ok=1;
|
||||
elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i',$read)) $ok=1;
|
||||
if ($handlein) {
|
||||
while (!feof($handlein))
|
||||
{
|
||||
$i++; // output line number
|
||||
$read = fgets($handlein);
|
||||
// Exclude warning line we don't want
|
||||
if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue;
|
||||
fwrite($handle,$read);
|
||||
if (preg_match('/'.preg_quote('-- Dump completed').'/i',$read)) $ok=1;
|
||||
elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i',$read)) $ok=1;
|
||||
}
|
||||
pclose($handlein);
|
||||
}
|
||||
pclose($handlein);
|
||||
|
||||
if ($compression == 'none') fclose($handle);
|
||||
if ($compression == 'gz') gzclose($handle);
|
||||
|
||||
@@ -1251,6 +1251,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
||||
{
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_THUMBS)) // If you experience trouble with pdf thumb generation and imagick, you can disable here.
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
$ret = dol_convert_file($file, 'png', $fileimage);
|
||||
if ($ret < 0) $error++;
|
||||
}
|
||||
@@ -4964,7 +4965,7 @@ function dol_string_is_good_iso($s)
|
||||
$ok=1;
|
||||
for($scursor=0;$scursor<$len;$scursor++)
|
||||
{
|
||||
$ordchar=ord($s{$scursor});
|
||||
$ordchar=ord($s[$scursor]);
|
||||
//print $scursor.'-'.$ordchar.'<br>';
|
||||
if ($ordchar < 32 && $ordchar != 13 && $ordchar != 10) { $ok=0; break; }
|
||||
if ($ordchar > 126 && $ordchar < 160) { $ok=0; break; }
|
||||
|
||||
@@ -118,7 +118,7 @@ function _val($val)
|
||||
*/
|
||||
for ($c = 0; $c < $strlen_var; ++$c) {
|
||||
|
||||
$ord_var_c = ord($val{$c});
|
||||
$ord_var_c = ord($val[$c]);
|
||||
|
||||
switch (true) {
|
||||
case $ord_var_c == 0x08:
|
||||
@@ -141,7 +141,7 @@ function _val($val)
|
||||
case $ord_var_c == 0x2F:
|
||||
case $ord_var_c == 0x5C:
|
||||
// double quote, slash, slosh
|
||||
$ascii .= '\\'.$val{$c};
|
||||
$ascii .= '\\'.$val[$c];
|
||||
break;
|
||||
|
||||
case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):
|
||||
|
||||
@@ -1178,7 +1178,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
false,
|
||||
$this->lines[$i]->date_start,
|
||||
$this->lines[$i]->date_end,
|
||||
0,
|
||||
$this->lines[$i]->array_options,
|
||||
$this->lines[$i]->fk_unit
|
||||
);
|
||||
if ($result < 0)
|
||||
@@ -1288,6 +1288,10 @@ class CommandeFournisseur extends CommonOrder
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// get extrafields so they will be clone
|
||||
foreach($this->lines as $line)
|
||||
$line->fetch_optionals($line->rowid);
|
||||
|
||||
// Load source object
|
||||
$objFrom = clone $this;
|
||||
|
||||
|
||||
@@ -884,7 +884,7 @@ class Product extends CommonObject
|
||||
$sql.= ", duration = '" . $this->db->escape($this->duration_value . $this->duration_unit) ."'";
|
||||
$sql.= ", accountancy_code_buy = '" . $this->db->escape($this->accountancy_code_buy)."'";
|
||||
$sql.= ", accountancy_code_sell= '" . $this->db->escape($this->accountancy_code_sell)."'";
|
||||
$sql.= ", desiredstock = " . ((isset($this->desiredstock) && $this->desiredstock != '') ? $this->desiredstock : "null");
|
||||
$sql.= ", desiredstock = " . ((isset($this->desiredstock) && is_numeric($this->desiredstock)) ? $this->desiredstock : "null");
|
||||
$sql.= ", cost_price = " . ($this->cost_price != '' ? $this->db->escape($this->cost_price) : 'null');
|
||||
$sql.= ", fk_unit= " . (!$this->fk_unit ? 'NULL' : $this->fk_unit);
|
||||
$sql.= ", price_autogen = " . (!$this->price_autogen ? 0 : 1);
|
||||
|
||||
Reference in New Issue
Block a user