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

This commit is contained in:
Florian HENRY 2015-11-21 10:10:42 +01:00
commit c0d29d2a15
3 changed files with 12 additions and 4 deletions

View File

@ -147,7 +147,7 @@ if ($action == 'add')
}
if (! $error && ! $_POST['url'])
{
setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("Url")), 'errors');
setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("URL")), 'errors');
$action = 'create';
$error++;
}

View File

@ -485,13 +485,14 @@ if ($object->fetch($id) >= 0)
{
include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
$m=new Adherent($db);
$m->id=$obj->source_id;
$m->fetch($obj->source_id);
print $m->getNomUrl(2);
}
else if ($obj->source_type == 'user')
{
include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
$m=new User($db);
$m->fetch($obj->source_id);
$m->id=$obj->source_id;
print $m->getNomUrl(2);
}
@ -499,7 +500,7 @@ if ($object->fetch($id) >= 0)
{
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
$m=new Societe($db);
$m->id=$obj->source_id;
$m->fetch($obj->source_id);
print $m->getNomUrl(2);
}
else

View File

@ -814,7 +814,14 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
//print "masktri=".$masktri." maskcounter=".$maskcounter." maskraz=".$maskraz." maskoffset=".$maskoffset."<br>\n";
// Define $sqlstring
$posnumstart=strrpos($maskwithnocode,$maskcounter); // Pos of counter in final string (from 0 to ...)
if (function_exists('mb_strrpos'))
{
$posnumstart=mb_strrpos($maskwithnocode,$maskcounter, 'UTF-8');
}
else
{
$posnumstart=strrpos($maskwithnocode,$maskcounter);
} // Pos of counter in final string (from 0 to ...)
if ($posnumstart < 0) return 'ErrorBadMaskFailedToLocatePosOfSequence';
$sqlstring='SUBSTRING('.$field.', '.($posnumstart+1).', '.dol_strlen($maskcounter).')';