Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
acaab1fd45
@ -358,7 +358,6 @@ if (strlen($search_fax)) $sql .= natural_search('p.fax', $search_fax)
|
|||||||
if (!empty($conf->socialnetworks->enabled)) {
|
if (!empty($conf->socialnetworks->enabled)) {
|
||||||
foreach ($socialnetworks as $key => $value) {
|
foreach ($socialnetworks as $key => $value) {
|
||||||
if ($value['active'] && strlen($search_{$key})) {
|
if ($value['active'] && strlen($search_{$key})) {
|
||||||
//$sql.= natural_search("p.socialnetworks->'$.".$key."'", $search_{$key});
|
|
||||||
$sql .= ' AND p.socialnetworks LIKE \'%"'.$key.'":"'.$search_{$key}.'%\'';
|
$sql .= ' AND p.socialnetworks LIKE \'%"'.$key.'":"'.$search_{$key}.'%\'';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,7 +43,7 @@ $number = strlen($letters);
|
|||||||
$string = '';
|
$string = '';
|
||||||
for ($i = 0; $i < $length; $i++)
|
for ($i = 0; $i < $length; $i++)
|
||||||
{
|
{
|
||||||
$string .= $letters{mt_rand(0, $number - 1)};
|
$string .= $letters[mt_rand(0, $number - 1)];
|
||||||
}
|
}
|
||||||
//print $string;
|
//print $string;
|
||||||
|
|
||||||
|
|||||||
@ -1966,7 +1966,7 @@ class Lessc {
|
|||||||
$this->pushEnv();
|
$this->pushEnv();
|
||||||
$parser = new lessc_parser($this, __METHOD__);
|
$parser = new lessc_parser($this, __METHOD__);
|
||||||
foreach ($args as $name => $strValue) {
|
foreach ($args as $name => $strValue) {
|
||||||
if ($name{0} !== '@') {
|
if ($name[0] !== '@') {
|
||||||
$name = '@'.$name;
|
$name = '@'.$name;
|
||||||
}
|
}
|
||||||
$parser->count = 0;
|
$parser->count = 0;
|
||||||
@ -2638,7 +2638,7 @@ class lessc_parser {
|
|||||||
$hidden = true;
|
$hidden = true;
|
||||||
if (!isset($block->args)) {
|
if (!isset($block->args)) {
|
||||||
foreach ($block->tags as $tag) {
|
foreach ($block->tags as $tag) {
|
||||||
if (!is_string($tag) || $tag{0} != $this->lessc->mPrefix) {
|
if (!is_string($tag) || $tag[0] != $this->lessc->mPrefix) {
|
||||||
$hidden = false;
|
$hidden = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2692,7 +2692,7 @@ class lessc_parser {
|
|||||||
protected function fixTags($tags) {
|
protected function fixTags($tags) {
|
||||||
// move @ tags out of variable namespace
|
// move @ tags out of variable namespace
|
||||||
foreach ($tags as &$tag) {
|
foreach ($tags as &$tag) {
|
||||||
if ($tag{0} == $this->lessc->vPrefix)
|
if ($tag[0] == $this->lessc->vPrefix)
|
||||||
$tag[0] = $this->lessc->mPrefix;
|
$tag[0] = $this->lessc->mPrefix;
|
||||||
}
|
}
|
||||||
return $tags;
|
return $tags;
|
||||||
|
|||||||
@ -463,15 +463,15 @@ function getRandomPassword($generic = false, $replaceambiguouschars = null, $len
|
|||||||
{
|
{
|
||||||
$max = strlen($lowercase) - 1;
|
$max = strlen($lowercase) - 1;
|
||||||
for ($x = 0; $x < $nbofchar; $x++) {
|
for ($x = 0; $x < $nbofchar; $x++) {
|
||||||
$randomCode .= $lowercase{random_int(0, $max)};
|
$randomCode .= $lowercase[random_int(0, $max)];
|
||||||
}
|
}
|
||||||
$max = strlen($uppercase) - 1;
|
$max = strlen($uppercase) - 1;
|
||||||
for ($x = 0; $x < $nbofchar; $x++) {
|
for ($x = 0; $x < $nbofchar; $x++) {
|
||||||
$randomCode .= $uppercase{random_int(0, $max)};
|
$randomCode .= $uppercase[random_int(0, $max)];
|
||||||
}
|
}
|
||||||
$max = strlen($numbers) - 1;
|
$max = strlen($numbers) - 1;
|
||||||
for ($x = 0; $x < $nbofcharlast; $x++) {
|
for ($x = 0; $x < $nbofcharlast; $x++) {
|
||||||
$randomCode .= $numbers{random_int(0, $max)};
|
$randomCode .= $numbers[random_int(0, $max)];
|
||||||
}
|
}
|
||||||
|
|
||||||
$generated_password = str_shuffle($randomCode);
|
$generated_password = str_shuffle($randomCode);
|
||||||
@ -480,15 +480,15 @@ function getRandomPassword($generic = false, $replaceambiguouschars = null, $len
|
|||||||
{
|
{
|
||||||
$max = strlen($lowercase) - 1;
|
$max = strlen($lowercase) - 1;
|
||||||
for ($x = 0; $x < $nbofchar; $x++) {
|
for ($x = 0; $x < $nbofchar; $x++) {
|
||||||
$randomCode .= $lowercase{mt_rand(0, $max)};
|
$randomCode .= $lowercase[mt_rand(0, $max)];
|
||||||
}
|
}
|
||||||
$max = strlen($uppercase) - 1;
|
$max = strlen($uppercase) - 1;
|
||||||
for ($x = 0; $x < $nbofchar; $x++) {
|
for ($x = 0; $x < $nbofchar; $x++) {
|
||||||
$randomCode .= $uppercase{mt_rand(0, $max)};
|
$randomCode .= $uppercase[mt_rand(0, $max)];
|
||||||
}
|
}
|
||||||
$max = strlen($numbers) - 1;
|
$max = strlen($numbers) - 1;
|
||||||
for ($x = 0; $x < $nbofcharlast; $x++) {
|
for ($x = 0; $x < $nbofcharlast; $x++) {
|
||||||
$randomCode .= $numbers{mt_rand(0, $max)};
|
$randomCode .= $numbers[mt_rand(0, $max)];
|
||||||
}
|
}
|
||||||
|
|
||||||
$generated_password = str_shuffle($randomCode);
|
$generated_password = str_shuffle($randomCode);
|
||||||
@ -512,11 +512,11 @@ function getRandomPassword($generic = false, $replaceambiguouschars = null, $len
|
|||||||
$max = strlen($numbers) - 1;
|
$max = strlen($numbers) - 1;
|
||||||
if (function_exists('random_int')) // Cryptographic random
|
if (function_exists('random_int')) // Cryptographic random
|
||||||
{
|
{
|
||||||
$generated_password = str_replace($replaceambiguouschars, $numbers{random_int(0, $max)}, $generated_password);
|
$generated_password = str_replace($replaceambiguouschars, $numbers[random_int(0, $max)], $generated_password);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$generated_password = str_replace($replaceambiguouschars, $numbers{mt_rand(0, $max)}, $generated_password);
|
$generated_password = str_replace($replaceambiguouschars, $numbers[mt_rand(0, $max)], $generated_password);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -327,7 +327,10 @@ class ProductCombination
|
|||||||
$child = new Product($this->db);
|
$child = new Product($this->db);
|
||||||
$child->fetch($this->fk_product_child);
|
$child->fetch($this->fk_product_child);
|
||||||
$child->price_autogen = $parent->price_autogen;
|
$child->price_autogen = $parent->price_autogen;
|
||||||
$child->weight = $parent->weight + $this->variation_weight;
|
$child->weight = $parent->weight;
|
||||||
|
if ($this->variation_weight) { // If we must add a delta on weight
|
||||||
|
$child->weight = ($child->weight ? $child->weight : 0) + $this->variation_weight;
|
||||||
|
}
|
||||||
$child->weight_units = $parent->weight_units;
|
$child->weight_units = $parent->weight_units;
|
||||||
$varlabel = $this->getCombinationLabel($this->fk_product_child);
|
$varlabel = $this->getCombinationLabel($this->fk_product_child);
|
||||||
$child->label = $parent->label.$varlabel;
|
$child->label = $parent->label.$varlabel;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user