Merge branch 'develop' of ssh://git@github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
50f3e480c9
@ -325,12 +325,10 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/theme/amarok`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/lightbox`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/jstree`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/license.txt`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PCLZip`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/savant`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-2.33`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/freefont-20100919`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/utils`;
|
||||
|
||||
@ -30,6 +30,8 @@
|
||||
class HookManager
|
||||
{
|
||||
var $db;
|
||||
var $error;
|
||||
var $errors=array();
|
||||
|
||||
// Context hookmanager was created for ('thirdpartycard', 'thirdpartydao', ...)
|
||||
var $contextarray=array();
|
||||
@ -146,7 +148,7 @@ class HookManager
|
||||
$resaction+=$actionclassinstance->$method($parameters, $object, $action, $this); // $object and $action can be changed by method ($object->id during creation for example or $action to go back to other action for example)
|
||||
if ($resaction < 0 || ! empty($actionclassinstance->error) || (! empty($actionclassinstance->errors) && count($actionclassinstance->errors) > 0))
|
||||
{
|
||||
$this->error=$actionclassinstance->error; $this->errors=$actionclassinstance->errors;
|
||||
$this->error=$actionclassinstance->error; $this->errors=array_merge($this->errors, (array) $actionclassinstance->errors);
|
||||
if ($method == 'doActions')
|
||||
{
|
||||
if ($action=='add') $action='create'; // TODO this change must be inside the doActions
|
||||
|
||||
@ -519,11 +519,11 @@ if (! $error && $db->connected && $action == "set")
|
||||
{
|
||||
dolibarr_install_syslog("etape1: Create database : ".$dolibarr_main_db_name, LOG_DEBUG);
|
||||
$newdb=getDoliDBInstance($conf->db->type,$conf->db->host,$userroot,$passroot,'',$conf->db->port);
|
||||
//print 'eee'.$conf->db->type." ".$conf->db->host." ".$userroot." ".$passroot." ".$conf->db->port." ".$db->connected." ".$newdb->forcecharset;exit;
|
||||
//print 'eee'.$conf->db->type." ".$conf->db->host." ".$userroot." ".$passroot." ".$conf->db->port." ".$newdb->connected." ".$newdb->forcecharset;exit;
|
||||
|
||||
if ($db->connected)
|
||||
if ($newdb->connected)
|
||||
{
|
||||
$result=$db->DDLCreateDb($dolibarr_main_db_name, $dolibarr_main_db_character_set, $dolibarr_main_db_collation, $dolibarr_main_db_user);
|
||||
$result=$newdb->DDLCreateDb($dolibarr_main_db_name, $dolibarr_main_db_character_set, $dolibarr_main_db_collation, $dolibarr_main_db_user);
|
||||
|
||||
if ($result)
|
||||
{
|
||||
@ -533,8 +533,8 @@ if (! $error && $db->connected && $action == "set")
|
||||
print '</td>';
|
||||
print "<td>".$langs->trans("OK")."</td></tr>";
|
||||
|
||||
$check1=$db->getDefaultCharacterSetDatabase();
|
||||
$check2=$db->getDefaultCollationDatabase();
|
||||
$check1=$newdb->getDefaultCharacterSetDatabase();
|
||||
$check2=$newdb->getDefaultCollationDatabase();
|
||||
dolibarr_install_syslog('etape1: Note that default server was charset='.$check1.' collation='.$check2, LOG_DEBUG);
|
||||
|
||||
// If values differs, we save conf file again
|
||||
@ -546,15 +546,15 @@ if (! $error && $db->connected && $action == "set")
|
||||
// Affiche aide diagnostique
|
||||
print '<tr><td colspan="2"><br>';
|
||||
print $langs->trans("ErrorFailedToCreateDatabase",$dolibarr_main_db_name).'<br>';
|
||||
print $db->lasterror().'<br>';
|
||||
print $newdb->lasterror().'<br>';
|
||||
print $langs->trans("IfDatabaseExistsGoBackAndCheckCreate");
|
||||
print '<br>';
|
||||
print '</td></tr>';
|
||||
|
||||
dolibarr_install_syslog('etape1: Failed to create database '.$dolibarr_main_db_name.' '.$db->lasterrno().' '.$db->lasterror(), LOG_ERR);
|
||||
dolibarr_install_syslog('etape1: Failed to create database '.$dolibarr_main_db_name.' '.$newdb->lasterrno().' '.$newdb->lasterror(), LOG_ERR);
|
||||
$error++;
|
||||
}
|
||||
$db->close();
|
||||
$newdb->close();
|
||||
}
|
||||
else {
|
||||
print '<tr><td>';
|
||||
|
||||
@ -5,7 +5,7 @@ SeparatorDecimal=.
|
||||
SeparatorThousand=,
|
||||
FormatDateShort=%m/%d/%Y
|
||||
FormatDateShortJava=MM/dd/yyyy
|
||||
FormatDateShortJQuery=dd/mm/yy
|
||||
FormatDateShortJQuery=mm/dd/yy
|
||||
FormatHourShort=%I:%M %p
|
||||
FormatHourShortDuration=%H:%M
|
||||
FormatDateTextShort=%b %d, %Y
|
||||
|
||||
@ -80,7 +80,7 @@ $hookmanager->initHooks(array('thirdpartycard'));
|
||||
|
||||
$parameters=array('id'=>$socid, 'objcanvas'=>$objcanvas);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
$error=$hookmanager->error; $errors=$hookmanager->errors;
|
||||
$error=$hookmanager->error; $errors=array_merge($errors, (array) $hookmanager->errors);
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user