Fix: Removed warnings

This commit is contained in:
Laurent Destailleur 2011-09-21 13:24:27 +00:00
parent 8398c093c7
commit e82923b525
7 changed files with 243 additions and 246 deletions

View File

@ -40,7 +40,7 @@ accessforbidden();
$typeconst=array('yesno','texte','chaine'); $typeconst=array('yesno','texte','chaine');
$action = getpost("action"); $action = GETPOST("action");
// Action mise a jour ou ajout d'une constante // Action mise a jour ou ajout d'une constante

View File

@ -28,24 +28,24 @@ require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
$langs->load("admin"); $langs->load("admin");
if (!$user->admin) if (!$user->admin) accessforbidden();
accessforbidden();
$action = GETPOST("action");
$action = getpost("action");
/* /*
* Actions * Actions
*/ */
if ($action == 'setvalue' && $user->admin) if ($action == 'setvalue' && $user->admin)
{ {
$result=dolibarr_set_const($db, "CLICKTODIAL_URL",GETPOST("url"),'chaine',0,'',$conf->entity); $result=dolibarr_set_const($db, "CLICKTODIAL_URL",GETPOST("url"),'chaine',0,'',$conf->entity);
if ($result >= 0) if ($result >= 0)
{ {
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>"; $mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
} }
else else
{ {
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>"; $mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
} }
} }
@ -87,11 +87,11 @@ print '<tr><td colspan="3" align="center"><br><input type="submit" class="button
print '</table></form>'; print '</table></form>';
/*if (! empty($conf->global->CLICKTODIAL_URL)) /*if (! empty($conf->global->CLICKTODIAL_URL))
{ {
print $langs->trans("Test"); print $langs->trans("Test");
// Add a phone number to test // Add a phone number to test
} }
*/ */
dol_htmloutput_mesg($mesg); dol_htmloutput_mesg($mesg);

View File

@ -28,8 +28,7 @@ require_once(DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php');
$langs->load("admin"); $langs->load("admin");
$langs->load("errors"); $langs->load("errors");
if (!$user->admin) if (!$user->admin) accessforbidden();
accessforbidden();
$action = GETPOST("action"); $action = GETPOST("action");
$value = GETPOST("value"); $value = GETPOST("value");
@ -46,13 +45,13 @@ if (empty($conf->global->CONTRACT_ADDON))
if ($action == 'updateMask') if ($action == 'updateMask')
{ {
$maskconst=$_POST['maskconstcontract']; $maskconst=$_POST['maskconstcontract'];
$maskvalue=$_POST['maskcontract']; $maskvalue=$_POST['maskcontract'];
if ($maskconst) $res = dolibarr_set_const($db,$maskconst,$maskvalue,'chaine',0,'',$conf->entity); if ($maskconst) $res = dolibarr_set_const($db,$maskconst,$maskvalue,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++; if (! $res > 0) $error++;
if (! $error) if (! $error)
{ {
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>"; $mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
} }
@ -64,16 +63,16 @@ if ($action == 'updateMask')
if ($action == 'setmod') if ($action == 'setmod')
{ {
dolibarr_set_const($db, "CONTRACT_ADDON",$value,'chaine',0,'',$conf->entity); dolibarr_set_const($db, "CONTRACT_ADDON",$value,'chaine',0,'',$conf->entity);
} }
/* /*
// constants of magre model // constants of magre model
if ($action == 'updateMatrice') dolibarr_set_const($db, "CONTRACT_NUM_MATRICE",$_POST["matrice"],'chaine',0,'',$conf->entity); if ($action == 'updateMatrice') dolibarr_set_const($db, "CONTRACT_NUM_MATRICE",$_POST["matrice"],'chaine',0,'',$conf->entity);
if ($action == 'updatePrefix') dolibarr_set_const($db, "CONTRACT_NUM_PREFIX",$_POST["prefix"],'chaine',0,'',$conf->entity); if ($action == 'updatePrefix') dolibarr_set_const($db, "CONTRACT_NUM_PREFIX",$_POST["prefix"],'chaine',0,'',$conf->entity);
if ($action == 'setOffset') dolibarr_set_const($db, "CONTRACT_NUM_DELTA",$_POST["offset"],'chaine',0,'',$conf->entity); if ($action == 'setOffset') dolibarr_set_const($db, "CONTRACT_NUM_DELTA",$_POST["offset"],'chaine',0,'',$conf->entity);
if ($action == 'setNumRestart') dolibarr_set_const($db, "CONTRACT_NUM_RESTART_BEGIN_YEAR",$_POST["numrestart"],'chaine',0,'',$conf->entity); if ($action == 'setNumRestart') dolibarr_set_const($db, "CONTRACT_NUM_RESTART_BEGIN_YEAR",$_POST["numrestart"],'chaine',0,'',$conf->entity);
*/ */
/* /*
* View * View
@ -106,29 +105,29 @@ $dir = "../includes/modules/contract/";
$handle = opendir($dir); $handle = opendir($dir);
if (is_resource($handle)) if (is_resource($handle))
{ {
$var=true; $var=true;
while (($file = readdir($handle))!==false) while (($file = readdir($handle))!==false)
{ {
if (substr($file, 0, 13) == 'mod_contract_' && substr($file, dol_strlen($file)-3, 3) == 'php') if (substr($file, 0, 13) == 'mod_contract_' && substr($file, dol_strlen($file)-3, 3) == 'php')
{ {
$file = substr($file, 0, dol_strlen($file)-4); $file = substr($file, 0, dol_strlen($file)-4);
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/contract/".$file.".php"); require_once(DOL_DOCUMENT_ROOT ."/includes/modules/contract/".$file.".php");
$module = new $file; $module = new $file;
// Show modules according to features level // Show modules according to features level
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
if ($module->isEnabled()) if ($module->isEnabled())
{ {
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'><td>'.$module->nom."</td>\n"; print '<tr '.$bc[$var].'><td>'.$module->nom."</td>\n";
print '<td>'; print '<td>';
print $module->info(); print $module->info();
print '</td>'; print '</td>';
// Show example of numbering module // Show example of numbering module
print '<td nowrap="nowrap">'; print '<td nowrap="nowrap">';
@ -137,49 +136,49 @@ if (is_resource($handle))
else print $tmp; else print $tmp;
print '</td>'."\n"; print '</td>'."\n";
print '<td align="center">'; print '<td align="center">';
if ($conf->global->CONTRACT_ADDON == "$file") if ($conf->global->CONTRACT_ADDON == "$file")
{ {
print img_picto($langs->trans("Activated"),'switch_on'); print img_picto($langs->trans("Activated"),'switch_on');
} }
else else
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&amp;value='.$file.'&amp;scandir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&amp;value='.$file.'&amp;scandir='.$module->scandir.'&amp;label='.urlencode($module->name).'">';
print img_picto($langs->trans("Disabled"),'switch_off'); print img_picto($langs->trans("Disabled"),'switch_off');
print '</a>'; print '</a>';
} }
print '</td>'; print '</td>';
$contract=new Contrat($db); $contract=new Contrat($db);
$contract->initAsSpecimen(); $contract->initAsSpecimen();
// Info // Info
$htmltooltip=''; $htmltooltip='';
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>'; $htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
$facture->type=0; $facture->type=0;
$nextval=$module->getNextValue($mysoc,$contract); $nextval=$module->getNextValue($mysoc,$contract);
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
{ {
$htmltooltip.=''.$langs->trans("NextValue").': '; $htmltooltip.=''.$langs->trans("NextValue").': ';
if ($nextval) if ($nextval)
{ {
$htmltooltip.=$nextval.'<br>'; $htmltooltip.=$nextval.'<br>';
} }
else else
{ {
$htmltooltip.=$langs->trans($module->error).'<br>'; $htmltooltip.=$langs->trans($module->error).'<br>';
} }
} }
print '<td align="center">'; print '<td align="center">';
print $html->textwithpicto('',$htmltooltip,1,0); print $html->textwithpicto('',$htmltooltip,1,0);
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
} }
} }
} }
closedir($handle); closedir($handle);
} }
print '</table><br>'; print '</table><br>';

View File

@ -27,53 +27,53 @@ require_once(DOL_DOCUMENT_ROOT."/compta/dons/class/don.class.php");
$langs->load("admin"); $langs->load("admin");
$langs->load("donations"); $langs->load("donations");
if (!$user->admin) if (!$user->admin) accessforbidden();
accessforbidden();
$typeconst=array('yesno','texte','chaine'); $typeconst=array('yesno','texte','chaine');
/* /*
* Action * Action
*/ */
if ($_GET["action"] == 'specimen') if ($_GET["action"] == 'specimen')
{ {
$modele=$_GET["module"]; $modele=$_GET["module"];
$don = new Don($db); $don = new Don($db);
$don->initAsSpecimen(); $don->initAsSpecimen();
// Charge le modele // Charge le modele
$dir = DOL_DOCUMENT_ROOT . "/includes/modules/dons/"; $dir = DOL_DOCUMENT_ROOT . "/includes/modules/dons/";
$file = $modele.".modules.php"; $file = $modele.".modules.php";
if (file_exists($dir.$file)) if (file_exists($dir.$file))
{ {
$classname = $modele; $classname = $modele;
require_once($dir.$file); require_once($dir.$file);
$obj = new $classname($db); $obj = new $classname($db);
if ($obj->write_file($don,$langs) > 0) if ($obj->write_file($don,$langs) > 0)
{ {
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=donation&file=SPECIMEN.html"); header("Location: ".DOL_URL_ROOT."/document.php?modulepart=donation&file=SPECIMEN.html");
return; return;
} }
else else
{ {
$mesg='<div class="error">'.$obj->error.'</div>'; $mesg='<div class="error">'.$obj->error.'</div>';
dol_syslog($obj->error, LOG_ERR); dol_syslog($obj->error, LOG_ERR);
} }
} }
else else
{ {
$mesg='<div class="error">'.$langs->trans("ErrorModuleNotFound").'</div>'; $mesg='<div class="error">'.$langs->trans("ErrorModuleNotFound").'</div>';
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
} }
} }
if ($_GET["action"] == 'setdoc') if ($_GET["action"] == 'setdoc')
{ {
$db->begin(); $db->begin();
if (dolibarr_set_const($db, "DON_ADDON_MODEL",$_GET["value"],'chaine',0,'',$conf->entity)) if (dolibarr_set_const($db, "DON_ADDON_MODEL",$_GET["value"],'chaine',0,'',$conf->entity))
{ {
@ -94,17 +94,17 @@ if ($_GET["action"] == 'setdoc')
$result2=$db->query($sql); $result2=$db->query($sql);
if ($result1 && $result2) if ($result1 && $result2)
{ {
$db->commit(); $db->commit();
} }
else else
{ {
$db->rollback(); $db->rollback();
} }
} }
if ($_GET["action"] == 'set') if ($_GET["action"] == 'set')
{ {
$type='donation'; $type='donation';
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)"; $sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)";
$sql.= " VALUES ('".$db->escape($_GET["value"])."','".$type."',".$conf->entity.", "; $sql.= " VALUES ('".$db->escape($_GET["value"])."','".$type."',".$conf->entity.", ";
$sql.= ($_GET["label"]?"'".$db->escape($_GET["label"])."'":'null').", "; $sql.= ($_GET["label"]?"'".$db->escape($_GET["label"])."'":'null').", ";
@ -148,18 +148,18 @@ $sql.= " WHERE type = '".$type."'";
$resql=$db->query($sql); $resql=$db->query($sql);
if ($resql) if ($resql)
{ {
$i = 0; $i = 0;
$num_rows=$db->num_rows($resql); $num_rows=$db->num_rows($resql);
while ($i < $num_rows) while ($i < $num_rows)
{ {
$array = $db->fetch_array($resql); $array = $db->fetch_array($resql);
array_push($def, $array[0]); array_push($def, $array[0]);
$i++; $i++;
} }
} }
else else
{ {
dol_print_error($db); dol_print_error($db);
} }
print '<table class="noborder" width=\"100%\">'; print '<table class="noborder" width=\"100%\">';
@ -186,74 +186,74 @@ if (is_resource($handle))
$name = substr($file, 0, dol_strlen($file) -12); $name = substr($file, 0, dol_strlen($file) -12);
$classname = substr($file, 0, dol_strlen($file) -12); $classname = substr($file, 0, dol_strlen($file) -12);
require_once($dir.'/'.$file); require_once($dir.'/'.$file);
$module=new $classname($db); $module=new $classname($db);
// Show modules according to features level // Show modules according to features level
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
if ($module->isEnabled()) if ($module->isEnabled())
{ {
print '<tr '.$bc[$var].'><td width=\"100\">'; print '<tr '.$bc[$var].'><td width=\"100\">';
echo $module->name; echo $module->name;
print '</td>'; print '</td>';
print '<td>'; print '<td>';
print $module->description; print $module->description;
print '</td>'; print '</td>';
// Active // Active
if (in_array($name, $def)) if (in_array($name, $def))
{ {
print "<td align=\"center\">\n"; print "<td align=\"center\">\n";
if ($conf->global->DON_ADDON_MODEL == $name) if ($conf->global->DON_ADDON_MODEL == $name)
{ {
print img_picto($langs->trans("Enabled"),'on'); print img_picto($langs->trans("Enabled"),'on');
} }
else else
{ {
print '&nbsp;'; print '&nbsp;';
print '</td><td align="center">'; print '</td><td align="center">';
print '<a href="dons.php?action=setdoc&value='.$name.'&amp;scandir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'.img_picto($langs->trans("Enabled"),'on').'</a>'; print '<a href="dons.php?action=setdoc&value='.$name.'&amp;scandir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'.img_picto($langs->trans("Enabled"),'on').'</a>';
} }
print '</td>'; print '</td>';
} }
else else
{ {
print "<td align=\"center\">\n"; print "<td align=\"center\">\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&amp;value='.$name.'&amp;scandir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'off').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&amp;value='.$name.'&amp;scandir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
print "</td>"; print "</td>";
} }
// Defaut // Defaut
print "<td align=\"center\">"; print "<td align=\"center\">";
if ($conf->global->DON_ADDON_MODEL == "$name") if ($conf->global->DON_ADDON_MODEL == "$name")
{ {
print img_picto($langs->trans("Default"),'on'); print img_picto($langs->trans("Default"),'on');
} }
else else
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&amp;value='.$name.'&amp;scandir='.$module->scandir.'&amp;label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&amp;value='.$name.'&amp;scandir='.$module->scandir.'&amp;label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
} }
print '</td>'; print '</td>';
// Info // Info
$htmltooltip = ''.$langs->trans("Name").': '.$module->name; $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
$htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); $htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
if ($module->type == 'pdf') if ($module->type == 'pdf')
{ {
$htmltooltip.='<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; $htmltooltip.='<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
} }
$htmltooltip.='<br><br><u>'.$langs->trans("FeaturesSupported").':</u>'; $htmltooltip.='<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
$htmltooltip.='<br>'.$langs->trans("Logo").': '.yn($module->option_logo,1,1); $htmltooltip.='<br>'.$langs->trans("Logo").': '.yn($module->option_logo,1,1);
$htmltooltip.='<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1); $htmltooltip.='<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1);
$text='<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'" target="specimen">'.img_object($langs->trans("Preview"),'generic').'</a>'; $text='<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'" target="specimen">'.img_object($langs->trans("Preview"),'generic').'</a>';
print '<td align="center">'; print '<td align="center">';
print $html->textwithpicto(' &nbsp; '.$text,$htmltooltip,-1,0); print $html->textwithpicto(' &nbsp; '.$text,$htmltooltip,-1,0);
print '</td>'; print '</td>';
print "</tr>\n"; print "</tr>\n";
} }
} }
} }
closedir($handle); closedir($handle);

View File

@ -30,8 +30,7 @@ require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
$langs->load("admin"); $langs->load("admin");
$langs->load("fckeditor"); $langs->load("fckeditor");
if (!$user->admin) if (!$user->admin) accessforbidden();
accessforbidden();
// Constante et traduction de la description du module // Constante et traduction de la description du module
$modules = array( $modules = array(
@ -67,26 +66,25 @@ $picto = array(
* Actions * Actions
*/ */
foreach($modules as $const => $desc) foreach($modules as $const => $desc)
{ {
if ($_GET["action"] == 'activate_'.strtolower($const)) if ($_GET["action"] == 'activate_'.strtolower($const))
{ {
dolibarr_set_const($db, "FCKEDITOR_ENABLE_".$const, "1",'chaine',0,'',$conf->entity); dolibarr_set_const($db, "FCKEDITOR_ENABLE_".$const, "1",'chaine',0,'',$conf->entity);
// Si fckeditor est active dans la description produit/service, on l'active dans les formulaires // Si fckeditor est active dans la description produit/service, on l'active dans les formulaires
if ($const == 'PRODUCTDESC' && $conf->global->PRODUIT_DESC_IN_FORM) if ($const == 'PRODUCTDESC' && $conf->global->PRODUIT_DESC_IN_FORM)
{ {
dolibarr_set_const($db, "FCKEDITOR_ENABLE_DETAILS", "1",'chaine',0,'',$conf->entity); dolibarr_set_const($db, "FCKEDITOR_ENABLE_DETAILS", "1",'chaine',0,'',$conf->entity);
} }
Header("Location: ".$_SERVER["PHP_SELF"]); Header("Location: ".$_SERVER["PHP_SELF"]);
exit; exit;
} }
if ($_GET["action"] == 'disable_'.strtolower($const)) if ($_GET["action"] == 'disable_'.strtolower($const))
{ {
dolibarr_del_const($db, "FCKEDITOR_ENABLE_".$const,$conf->entity); dolibarr_del_const($db, "FCKEDITOR_ENABLE_".$const,$conf->entity);
Header("Location: ".$_SERVER["PHP_SELF"]); Header("Location: ".$_SERVER["PHP_SELF"]);
exit; exit;
} }
} }
if ($_POST["save"]) if ($_POST["save"])
@ -118,34 +116,34 @@ print "</tr>\n";
// Modules // Modules
foreach($modules as $const => $desc) foreach($modules as $const => $desc)
{ {
// Si condition non remplie, on ne propose pas l'option // Si condition non remplie, on ne propose pas l'option
if (! $conditions[$const]) continue; if (! $conditions[$const]) continue;
$var=!$var; $var=!$var;
print "<tr ".$bc[$var].">"; print "<tr ".$bc[$var].">";
print '<td width="16">'.img_object("",$picto[$const]).'</td>'; print '<td width="16">'.img_object("",$picto[$const]).'</td>';
print '<td>'.$langs->trans($desc).'</td>'; print '<td>'.$langs->trans($desc).'</td>';
print '<td align="center" width="20">'; print '<td align="center" width="20">';
$constante = 'FCKEDITOR_ENABLE_'.$const; $constante = 'FCKEDITOR_ENABLE_'.$const;
$value = $conf->global->$constante; $value = $conf->global->$constante;
print $value == 1 ? img_picto($langs->trans("Active"),'tick') : '&nbsp;'; print $value == 1 ? img_picto($langs->trans("Active"),'tick') : '&nbsp;';
print '</td>'; print '</td>';
print '<td align="center" width="100">'; print '<td align="center" width="100">';
if($value == 0) if($value == 0)
{ {
print '<a href="fckeditor.php?action=activate_'.strtolower($const).'">'.$langs->trans("Activate").'</a>'; print '<a href="fckeditor.php?action=activate_'.strtolower($const).'">'.$langs->trans("Activate").'</a>';
} }
else if($value == 1) else if($value == 1)
{ {
print '<a href="fckeditor.php?action=disable_'.strtolower($const).'">'.$langs->trans("Disable").'</a>'; print '<a href="fckeditor.php?action=disable_'.strtolower($const).'">'.$langs->trans("Disable").'</a>';
} }
print "</td>"; print "</td>";
print '</tr>'; print '</tr>';
} }
print '</table>'."\n"; print '</table>'."\n";
@ -162,11 +160,11 @@ print '<center><br><input class="button" type="submit" name="save" value="'.$lan
print '</form>'."\n"; print '</form>'."\n";
/* /*
print '<!-- Result -->'; print '<!-- Result -->';
print $_POST["formtestfield"]; print $_POST["formtestfield"];
print '<!-- Result -->'; print '<!-- Result -->';
print $conf->global->FCKEDITOR_TEST; print $conf->global->FCKEDITOR_TEST;
*/ */
$db->close(); $db->close();

View File

@ -48,7 +48,7 @@ $value = GETPOST("value");
if ($action == 'updateMask') if ($action == 'updateMask')
{ {
$maskconst=GETPOST("maskconst"); $maskconst=GETPOST("maskconst");
$maskvalue=getpost("maskvalue"); $maskvalue=GETPOST("maskvalue");
if ($maskconst) $res = dolibarr_set_const($db,$maskconst,$maskvalue,'chaine',0,'',$conf->entity); if ($maskconst) $res = dolibarr_set_const($db,$maskconst,$maskvalue,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++; if (! $res > 0) $error++;

View File

@ -42,7 +42,7 @@ if ($action == 'set')
{ {
$error=0; $error=0;
$gimcdf= getpost("GEOIPMAXMIND_COUNTRY_DATAFILE"); $gimcdf= GETPOST("GEOIPMAXMIND_COUNTRY_DATAFILE");
if (! $gimcdf && ! file_exists($gimcdf)) if (! $gimcdf && ! file_exists($gimcdf))
{ {