forked from Wavyzz/dolibarr
Fix: carriage return
This commit is contained in:
@@ -725,11 +725,11 @@ function activateModule($value,$withdeps=1)
|
||||
$num = count($objMod->depends);
|
||||
for ($i = 0; $i < $num; $i++)
|
||||
{
|
||||
foreach ($modulesdir as $dir)
|
||||
foreach ($modulesdir as $dir)
|
||||
{
|
||||
if (file_exists($dir.$objMod->depends[$i].".class.php"))
|
||||
{
|
||||
activateModule($objMod->depends[$i]);
|
||||
if (file_exists($dir.$objMod->depends[$i].".class.php"))
|
||||
{
|
||||
activateModule($objMod->depends[$i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -741,11 +741,11 @@ function activateModule($value,$withdeps=1)
|
||||
$num = count($objMod->conflictwith);
|
||||
for ($i = 0; $i < $num; $i++)
|
||||
{
|
||||
foreach ($modulesdir as $dir)
|
||||
foreach ($modulesdir as $dir)
|
||||
{
|
||||
if (file_exists($dir.$objMod->conflictwith[$i].".class.php"))
|
||||
{
|
||||
unActivateModule($objMod->conflictwith[$i],0);
|
||||
if (file_exists($dir.$objMod->conflictwith[$i].".class.php"))
|
||||
{
|
||||
unActivateModule($objMod->conflictwith[$i],0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1126,16 +1126,16 @@ function form_constantes($tableau)
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Add document model used by doc generator
|
||||
*
|
||||
/**
|
||||
* Add document model used by doc generator
|
||||
*
|
||||
* @param string $name Model name
|
||||
* @param string $type Model type
|
||||
* @param string $label Model label
|
||||
* @param string $description Model description
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function addDocumentModel($name, $type, $label='', $description='')
|
||||
* @param string $type Model type
|
||||
* @param string $label Model label
|
||||
* @param string $description Model description
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function addDocumentModel($name, $type, $label='', $description='')
|
||||
{
|
||||
global $db, $conf;
|
||||
|
||||
@@ -1148,51 +1148,51 @@ function addDocumentModel($name, $type, $label='', $description='')
|
||||
$sql.= ")";
|
||||
|
||||
dol_syslog("admin.lib::addDocumentModel sql=".$sql);
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$db->commit();
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
$db->rollback();
|
||||
return -1;
|
||||
}
|
||||
$db->rollback();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete document model used by doc generator
|
||||
*
|
||||
* @param string $name Model name
|
||||
* @param string $type Model type
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function delDocumentModel($name, $type)
|
||||
{
|
||||
/**
|
||||
* Delete document model used by doc generator
|
||||
*
|
||||
* @param string $name Model name
|
||||
* @param string $type Model type
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function delDocumentModel($name, $type)
|
||||
{
|
||||
global $db, $conf;
|
||||
|
||||
$db->begin();
|
||||
|
||||
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."document_model";
|
||||
$sql.= " WHERE nom = '".$db->escape($name)."'";
|
||||
$sql.= " AND type = '".$type."'";
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
|
||||
dol_syslog("admin.lib::delDocumentModel sql=".$sql);
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
|
||||
dol_syslog("admin.lib::delDocumentModel sql=".$sql);
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$db->commit();
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
$db->rollback();
|
||||
return -1;
|
||||
}
|
||||
$db->rollback();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user