Skip to content

Commit

Permalink
Clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Nov 18, 2024
1 parent 3a30016 commit 25cf365
Show file tree
Hide file tree
Showing 32 changed files with 52 additions and 47 deletions.
2 changes: 1 addition & 1 deletion htdocs/awstats/admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
$head[$h][2] = 'tababout';
$h++;

dol_fiche_head($head, 'tababout', '');
dol_fiche_head($head, 'tababout', '', -1);

dol_include_once('/awstats/core/modules/modAWStats.class.php');
$tmpmodule = new modAWStats($db);
Expand Down
4 changes: 2 additions & 2 deletions htdocs/awstats/admin/awstats.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@

print '<form name="awstatsform" action="'.$_SERVER["PHP_SELF"].'" method="post">';

dol_fiche_head($head, 'tabsetup', '');
dol_fiche_head($head, 'tabsetup', '', -1);


print "<table class=\"noborder\" width=\"100%\">";
print "<table class=\"noborder centpercent\">";
$var=true;

print "<tr class=\"liste_titre\">";
Expand Down
2 changes: 1 addition & 1 deletion htdocs/billedonorders/admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
$head[$h][2] = 'tababout';
$h++;

dol_fiche_head($head, 'tababout', '');
dol_fiche_head($head, 'tababout', '', -1);

dol_include_once('/billedonorders/core/modules/modBilledOnOrders.class.php');
$tmpmodule = new modBilledOnOrders($db);
Expand Down
3 changes: 2 additions & 1 deletion htdocs/billedonorders/admin/billedonorders.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@

clearstatcache();

$head = array();

$h=0;
$head[$h][0] = $_SERVER["PHP_SELF"];
Expand All @@ -108,7 +109,7 @@
print '<form name="cabinetmed" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="action" value="update">';

dol_fiche_head($head, 'tabsetup', '');
dol_fiche_head($head, 'tabsetup', '', -1);

//print $langs->trans("BilledOnOrdersNothingToSetup");
$var=true;
Expand Down
4 changes: 2 additions & 2 deletions htdocs/captureserver/captureserver_card.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function init_myfunc()
print '<input type="hidden" name="action" value="add">';
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';

dol_fiche_head(array(), '');
dol_fiche_head(array(), '', '', -1);

print '<table class="border centpercent">'."\n";

Expand Down Expand Up @@ -220,7 +220,7 @@ function init_myfunc()
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
print '<input type="hidden" name="id" value="'.$object->id.'">';

dol_fiche_head();
dol_fiche_head(array(), '', '', -1);

print '<table class="border centpercent tableforfield">'."\n";

Expand Down
4 changes: 3 additions & 1 deletion htdocs/concatpdf/admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
print_fiche_titre($langs->trans("ConcatPdfSetup"), $linkback, 'setup');

$head = array();

$h=0;
$head[$h][0] = 'concatpdf.php';
$head[$h][1] = $langs->trans("Setup");
Expand All @@ -68,7 +70,7 @@
$head[$h][2] = 'tababout';
$h++;

dol_fiche_head($head, 'tababout', '');
dol_fiche_head($head, 'tababout', '', -1);

dol_include_once('/concatpdf/core/modules/modConcatPdf.class.php');
$tmpmodule = new modConcatPdf($db);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/ecotaxdeee/admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
print '<input type="hidden" name="token" value="'.newToken().'">';


dol_fiche_head($head, 'tabsetup', '', (((float) DOL_VERSION < 6) ? 0 : -1));
dol_fiche_head($head, 'tabsetup', '', -1);

$elements='';

Expand Down
2 changes: 1 addition & 1 deletion htdocs/externalbackup/admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
$head[$h][2] = 'tababout';
$h++;

dol_fiche_head($head, 'tababout', '');
dol_fiche_head($head, 'tababout', '', -1);

dol_include_once('/externalbackup/core/modules/modExternalBackup.class.php');
$tmpmodule = new modExternalBackup($db);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/externalbackup/admin/externalbackup.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
print '<input type="hidden" name="action" value="set">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';

dol_fiche_head($head, 'tabsetup');
dol_fiche_head($head, 'tabsetup', '', -1);


print '<br>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/facturxutil/admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@


$head = facturxUtilAdminPrepareHead();
dol_fiche_head($head, 'tababout', '');
dol_fiche_head($head, 'tababout', '', -1);

dol_include_once('/facturxutil/core/modules/modFacturXUtil.class.php');
$tmpmodule = new modFacturXUtil($db);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/filemanager/admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
$head[$h][2] = 'tababout';
$h++;

dol_fiche_head($head, 'tababout', '');
dol_fiche_head($head, 'tababout', '', -1);

dol_include_once('/filemanager/core/modules/modFileManager.class.php');
$tmpmodule = new modFileManager($db);
Expand Down
4 changes: 2 additions & 2 deletions htdocs/google/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@

$finaltext='';

$found=0;
$MAXAGENDA=empty($conf->global->GOOGLE_AGENDA_NB)?5:$conf->global->GOOGLE_AGENDA_NB;
$found = 0;
$MAXAGENDA = getDolGlobalInt('GOOGLE_AGENDA_NB', 5);

$i=1;
while ($i <= $MAXAGENDA) {
Expand Down
2 changes: 1 addition & 1 deletion htdocs/memcached/admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

$head=memcached_prepare_head();

dol_fiche_head($head, 'tababout', '');
dol_fiche_head($head, 'tababout', '', -1);

dol_include_once('/memcached/core/modules/modMemcached.class.php');
$tmpmodule = new modMemcached($db);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/monitoring/admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
$head[$h][2] = 'tababout';
$h++;

dol_fiche_head($head, 'tababout', '');
dol_fiche_head($head, 'tababout', '', -1);

dol_include_once('/monitoring/core/modules/modMonitoring.class.php');
$tmpmodule = new modMonitoring($db);
Expand Down
10 changes: 5 additions & 5 deletions htdocs/monitoring/admin/monitoring.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,21 +206,21 @@
$head[$h][2] = 'tababout';
$h++;

dol_fiche_head($head, 'tabsetup', '');
dol_fiche_head($head, 'tabsetup', '', -1);


print '<form name="rrdform" action="'.$_SERVER["PHP_SELF"].'" method="post">';
print "<table class=\"noborder\" width=\"100%\">";
$var=true;
print '<input type="hidden" name="token" value="'.newToken().'">';

print "<table class=\"noborder centpercent\">";

print "<tr class=\"liste_titre\">";
print "<td>".$langs->trans("Parameter")."</td>";
print "<td>".$langs->trans("Value")."</td>";
print "<td>".$langs->trans("Examples")."</td>";
print "</tr>";

$var=!$var;
print "<tr ".$bc[$var].">";
print "<tr>";
print "<td>".$langs->trans("MONITORING_COMMANDLINE_TOOL")."</td>";
print "<td><input type=\"text\" class=\"flat\" name=\"MONITORING_COMMANDLINE_TOOL\" value=\"". ($_POST["MONITORING_COMMANDLINE_TOOL"]?$_POST["MONITORING_COMMANDLINE_TOOL"]:$conf->global->MONITORING_COMMANDLINE_TOOL) . "\" size=\"50\"></td>";
print '<td>/usr/bin/rrdtool<br>
Expand Down
4 changes: 2 additions & 2 deletions htdocs/mywidgets/admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
print '<br>';

$h=0;
$head[$h][0] = 'billedonorders.php';
$head[$h][0] = 'mywidgets.php';
$head[$h][1] = $langs->trans("Setup");
$head[$h][2] = 'tabsetup';
$h++;
Expand All @@ -71,7 +71,7 @@
$head[$h][2] = 'tababout';
$h++;

dol_fiche_head($head, 'tababout', '');
dol_fiche_head($head, 'tababout', '', -1);

dol_include_once('/billedonorders/core/modules/modBilledOnOrders.class.php');
$tmpmodule = new modBilledOnOrders($db);
Expand Down
8 changes: 5 additions & 3 deletions htdocs/mywidgets/admin/mywidgets.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,12 @@
$form=new Form($db);
$formfile=new FormFile($db);

llxHeader('', 'billedonorders', $linktohelp);
$linktohelp = '';

llxHeader('', 'mywidgets', $linktohelp);

$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
print_fiche_titre($langs->trans("BilledOnOrdersSetup"), $linkback, 'setup');
print_fiche_titre($langs->trans("Setup"), $linkback, 'setup');
print '<br>';

clearstatcache();
Expand All @@ -108,7 +110,7 @@
print '<form name="cabinetmed" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="action" value="update">';

dol_fiche_head($head, 'tabsetup', '');
dol_fiche_head($head, 'tabsetup', '', -1);

//print $langs->trans("BilledOnOrdersNothingToSetup");
$var=true;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/numberwords/admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
$head[$h][2] = 'tababout';
$h++;

dol_fiche_head($head, 'tababout', '');
dol_fiche_head($head, 'tababout', '', -1);

dol_include_once('/numberwords/core/modules/modNumberWords.class.php');
$tmpmodule = new modNumberWords($db);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/ovh/admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

$head=ovhadmin_prepare_head();

dol_fiche_head($head, 'tababout', $langs->trans("Ovh"));
dol_fiche_head($head, 'tababout', $langs->trans("Ovh"), -1);

dol_include_once('/ovh/core/modules/modOvh.class.php');
$tmpmodule = new modOvh($db);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/phpsysinfo/admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
$head[$h][2] = 'tababout';
$h++;

dol_fiche_head($head, 'tababout', '');
dol_fiche_head($head, 'tababout', '', -1);

dol_include_once('/phpsysinfo/core/modules/modPHPSysInfo.class.php');
$tmpmodule = new modPHPSysInfo($db);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/phpsysinfo/admin/phpsysinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
$head[$h][2] = 'tababout';
$h++;

dol_fiche_head($head, 'tabsetup', '');
dol_fiche_head($head, 'tabsetup', '', -1);

print $langs->trans("phpsysinfoNothingToSetup");

Expand Down
10 changes: 5 additions & 5 deletions htdocs/saftpt/admin/saftpt.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@

//set constant in table llx_const
$taxexemption = GETPOST('taxexemption_code','alpha');

$res=dolibarr_set_const($db, "TAX_EXEMPTION_REASON",$taxexemption,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;

if (! $error)
{
$db->commit();
Expand All @@ -66,7 +66,7 @@
*/

$formtaxexemption = new FormSaftPt($db);

llxHeader('',$langs->trans("SaftSetup"));

$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
Expand All @@ -80,7 +80,7 @@
$hselected=$h;
$h++;

dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup"));
dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup"), -1);

print '<br>';
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
Expand All @@ -104,7 +104,7 @@

if (empty($conf->global->TAX_EXEMPTION_REASON)) print ' '.img_warning($langs->trans("TaxExemptionEmpty"));
print '</td></tr>';

print '</table>';

print '<br>';
Expand Down
4 changes: 2 additions & 2 deletions htdocs/saftpt/exportsaft.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
$head[$h][1] = $langs->trans("Step")." 1";
$hselected=$h;
$h++;
dol_fiche_head($head, $hselected, $langs->trans("MenuSaft"));
dol_fiche_head($head, $hselected, $langs->trans("MenuSaft"), -1);
// Security check
if(!$user->hasRight('saftpt', 'exesaftpt', 'write'))
{
Expand Down Expand Up @@ -248,7 +248,7 @@
$hselected=$h;
$h++;

dol_fiche_head($head, $hselected, $langs->trans("MenuSaft"));
dol_fiche_head($head, $hselected, $langs->trans("MenuSaft"), -1);

print $langs->trans("PeriodOf").' <b>'.dol_print_date($date_ini, '%Y-%m-%d'). '</b> '. $langs->trans("PeriodTo"). ' <b>'.dol_print_date($date_fim, '%Y-%m-%d').'</b><br>';
print $langs->trans("TaxExemptionDef").': <b>'.$saft->taxexemption.'</b><br>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/selectbank/admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
$head[$h][2] = 'tababout';
$h++;

dol_fiche_head($head, 'tababout', '');
dol_fiche_head($head, 'tababout', '', -1);

dol_include_once('/selectbank/core/modules/modSelectBank.class.php');
$tmpmodule = new modSelectBank($db);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/selectbank/admin/selectbank.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
$head[$h][2] = 'tababout';
$h++;

dol_fiche_head($head, 'tabsetup', '');
dol_fiche_head($head, 'tabsetup', '', -1);

print $langs->trans("SelectBankNothingToSetup");

Expand Down
2 changes: 1 addition & 1 deletion htdocs/sendgrid/admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

$head=sendgridadmin_prepare_head();

dol_fiche_head($head, 'tababout', $langs->trans("SendGrid"));
dol_fiche_head($head, 'tababout', $langs->trans("SendGrid"), -1);

dol_include_once('/sendgrid/core/modules/modSendGrid.class.php');
$tmpmodule = new modSendGrid($db);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/skincoloreditor/admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
$head[$h][2] = 'tababout';
$h++;

dol_fiche_head($head, 'tababout', '');
dol_fiche_head($head, 'tababout', '', -1);

dol_include_once('/skincoloreditor/core/modules/modSkinColorEditor.class.php');
$tmpmodule = new modSkinColorEditor($db);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/skincoloreditor/admin/advancededitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
$head[$h][2] = 'advancededitor';
$h++;

dol_fiche_head($head, 'advancededitor');
dol_fiche_head($head, 'advancededitor', '', -1);

print $langs->trans("FeatureNotYetAvailable");

Expand Down
2 changes: 1 addition & 1 deletion htdocs/skincoloreditor/admin/quickeditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
$head[$h][2] = 'tababout';
$h++;

dol_fiche_head($head, 'fasteditor');
dol_fiche_head($head, 'fasteditor', '', -1);


print '<br>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/tawkto/admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
$head[$h][2] = 'tababout';
$h++;

dol_fiche_head($head, 'tababout', '');
dol_fiche_head($head, 'tababout', '', -1);

dol_include_once('/tawkto/core/modules/modTawkTo.class.php');
$tmpmodule = new modTawkTo($db);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/zipautofillfr/admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
$head[$h][2] = 'tababout';
$h++;

dol_fiche_head($head, 'tababout', '', (((float) DOL_VERSION < 7.0) ? 0 : -1));
dol_fiche_head($head, 'tababout', '', -1);

dol_include_once('/zipautofillfr/core/modules/modZipAutoFillFr.class.php');
$tmpmodule = new modZipAutoFillFr($db);
Expand Down
Loading

0 comments on commit 25cf365

Please sign in to comment.