Qual: code simplification

This commit is contained in:
Laurent Destailleur 2008-04-17 11:30:04 +00:00
parent 4a439e1c69
commit d1edb63eec
11 changed files with 20 additions and 25 deletions

View File

@ -1,13 +1,16 @@
; -- Doliwamp.iss --
; ----- DoliWamp.iss ---------------------------------------------------------------------
; Script to build an auto installer for Dolibarr.
; Idea from WampServer 2 (http://www.wampserver.com)
;
;----------------------------------------------------------------------------------------
; You must edit some path in this file to build an exe.
; WARNING: Be sure that user files for Mysql data used to build
; package contains only user root with no password.
; For this, you can edit mysql.user table for a database to keep
; only root user with no password, stop server and catch
; files user.MY* to put them in data sources.
;
; Version: $Id$
;----------------------------------------------------------------------------------------
[Setup]
@ -138,7 +141,7 @@ var batFile: String;
function InitializeSetup(): Boolean;
begin
Result := MsgBox('You will install Doliwamp (Apache+Mysql+PHP+Dolibarr) on your computer.' #13#13 'This setup install Dolibarr and third party softwares (Apache, Mysql and PHP) configured for ' #13 'a Dolibarr usage and could not be used for other reasons.' #13#13 'If you want to share your Apache, Mysql and PHP with other projects, you should make a manual' #13 'installation of Dolibarr on your own Apache, Mysql and PHP installation.' #13#13 'Do you want to continue install?', mbConfirmation, MB_YESNO) = idYes;
Result := MsgBox('You will install DoliWamp (Apache+Mysql+PHP+Dolibarr) on your computer.' #13#13 'This setup install Dolibarr and third party softwares (Apache, Mysql and PHP) configured for ' #13 'a Dolibarr usage.' #13#13 'If you want to share your Apache, Mysql and PHP with other projects then Dolibarr, it is recommended to make a manual' #13 'installation of Dolibarr on your own Apache, Mysql and PHP installation.' #13#13 'Do you want to continue install?', mbConfirmation, MB_YESNO) = idYes;
end;

View File

@ -183,8 +183,8 @@ if ($_REQUEST["action"] == 'update' && ! $_POST["cancel"])
}
}
Header("Location: fiche.php?rowid=".$adh->id);
exit;
$_GET["rowid"]=$adh->id;
$_REQUEST["action"]='';
}
else
{

View File

@ -232,6 +232,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("Country").'</td><td>';
$form->select_pays($conf->global->MAIN_INFO_SOCIETE_PAYS,'pays_id',($conf->use_javascript_ajax?' onChange="company_save_refresh()"':''));
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
print '</td></tr>'."\n";
$var=!$var;

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Simon Tosser <simon@kornog-computing.com>
*
* This program is free software; you can redistribute it and/or modify
@ -204,7 +204,7 @@ else
$var=!$var;
if (1== 1)
if ($conf->agenda->enabled)
{
print '<tr '.$bc[$var].'>';
print '<td width="20px">'.img_object('','task').'</td>';

View File

@ -165,7 +165,7 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit')
// Activer onglet preview
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("UsePreviewTabs").'</td><td>';
print $html->selectyesno('main_use_preview_tabs',isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:1,1);
print $html->selectyesno('main_use_preview_tabs',isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0,1);
print '</td>';
print '<td width="20">&nbsp;</td>';
print '</tr>';
@ -297,7 +297,7 @@ else
// Activer onglet preview
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("UsePreviewTabs").'</td><td>';
print yn(isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:1)."</td>";
print yn(isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0)."</td>";
print '<td width="20">&nbsp;</td>';
print "</tr>";

View File

@ -72,8 +72,7 @@ if ($_GET["facid"] > 0)
}
$head = facture_prepare_head($fac);
$hselected = $conf->use_preview_tabs ? 2 : false;
dolibarr_fiche_head($head, $hselected, $langs->trans("InvoiceCustomer"));
dolibarr_fiche_head($head, 'preview', $langs->trans("InvoiceCustomer"));
/*

View File

@ -101,11 +101,7 @@ if ($_GET["facid"])
$soc->fetch($fac->socid);
$head = facture_prepare_head($fac);
$hselected = 2;
if ($conf->use_preview_tabs) $hselected++;
if ($fac->mode_reglement_code == 'PRE') $hselected++;
dolibarr_fiche_head($head, $hselected, $langs->trans("InvoiceCustomer"));
dolibarr_fiche_head($head, 'note', $langs->trans("InvoiceCustomer"));
print '<table class="border" width="100%">';

View File

@ -112,9 +112,7 @@ if ($_GET["facid"] > 0)
}
$head = facture_prepare_head($fac);
$hselected = 2;
if ($conf->use_preview_tabs) $hselected++;
dolibarr_fiche_head($head, $hselected, $langs->trans('InvoiceCustomer'));
dolibarr_fiche_head($head, 'standingorders', $langs->trans('InvoiceCustomer'));
/*
* Facture

View File

@ -365,7 +365,7 @@ class Conf
if (empty($this->global->USER_PASSWORD_GENERATED)) $this->global->USER_PASSWORD_GENERATED='standard';
// conf->use_preview_tabs
$this->use_preview_tabs=1;
$this->use_preview_tabs=0;
if (isset($this->global->MAIN_USE_PREVIEW_TABS)) $this->use_preview_tabs=$this->global->MAIN_USE_PREVIEW_TABS;
// conf->use_javascript_ajax

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -15,15 +15,12 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* or see http://www.gnu.org/
*
* $Id$
* $Source$
*/
/**
\file htdocs/lib/invoice.lib.php
\brief Ensemble de fonctions de base pour le module factures
\version $Revision$
\version $Id$
Ensemble de fonctions de base de dolibarr sous forme d'include
*/

View File

@ -60,6 +60,7 @@ insert into llx_const (name, value, type, note, visible) values ('MAIN_NOT_INSTA
insert into llx_const (name, value, type, note, visible) values ('MAIN_MONNAIE','EUR','chaine','Monnaie',0);
insert into llx_const (name, value, type, note, visible) values ('MAIN_POPUP_CALENDAR','eldy','chaine','Popup calendar module',0);
insert into llx_const(name,value,type,visible,note) values('SYSLOG_LEVEL','6','chaine',0,'Level of debug info to show');
insert into llx_const (name, value, type, note, visible) values ('MAIN_MAIL_SMTP_SERVER','','chaine','Host or ip address for SMTP server',0);
insert into llx_const (name, value, type, note, visible) values ('MAIN_MAIL_SMTP_PORT','','chaine','Port for SMTP server',0);