From 8ed706e4ac866bc5c528f6410f171c87547724bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Mon, 8 Oct 2012 02:45:58 +0200 Subject: [PATCH] Fixed bug #569 - Notices & Warnings when installing Dolibarr Also translated a string & variable and improved html use --- htdocs/install/inc.php | 43 +++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index 0d2db9670d6..fe14ca888af 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -3,6 +3,7 @@ * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Sebastien DiCintio * Copyright (C) 2007-2012 Laurent Destailleur + * Copyright (C) 2012 Marcos GarcĂ­a * * 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 @@ -301,23 +302,34 @@ function conf($dolibarr_main_document_root) /** * Show HTML header of install pages * - * @param string $soutitre Title + * @param string $subtitle Title * @param string $next Next * @param string $action Action code ('set' or 'upgrade') * @param string $param Param * @param string $forcejqueryurl Set jquery relative URL (must end with / if defined) * @return void */ -function pHeader($soutitre,$next,$action='set',$param='',$forcejqueryurl='') +function pHeader($subtitle,$next,$action='set',$param='',$forcejqueryurl='') { global $conf; global $langs; $langs->load("main"); $langs->load("admin"); + if ($forcejqueryurl) + { + $jQueryCustomPath = $forcejqueryurl; + $jQueryUiCustomPath = $forcejqueryurl; + } + else + { + $jQueryCustomPath = (defined('JS_JQUERY') && constant('JS_JQUERY')) ? JS_JQUERY : false; + $jQueryUiCustomPath = (defined('JS_JQUERY_UI') && constant('JS_JQUERY_UI')) ? JS_JQUERY_UI : false; + } + $jquerytheme='smoothness'; - // On force contenu dans format sortie + // We force the content charset header("Content-type: text/html; charset=".$conf->file->character_set_client); print ''."\n"; @@ -327,31 +339,28 @@ function pHeader($soutitre,$next,$action='set',$param='',$forcejqueryurl='') print ''."\n"; print ''."\n"; - if ($forcejqueryurl) print ''."\n"; // JQuery - else if (constant('JS_JQUERY_UI')) print ''."\n"; // JQuery + if ($jQueryUiCustomPath) print ''."\n"; // JQuery else print ''."\n"; // JQuery print ''."\n"; - if ($forcejqueryurl) print ''."\n"; - else if (constant('JS_JQUERY')) print ''."\n"; - else print ''."\n"; - if ($forcejqueryurl) print ''."\n"; - else if (constant('JS_JQUERY_UI')) print ''."\n"; - else print ''."\n"; + if ($jQueryCustomPath) print ''."\n"; + else print ''."\n"; + if ($jQueryUiCustomPath) print ''."\n"; + else print ''."\n"; print ''.$langs->trans("DolibarrSetup").''."\n"; print ''."\n"; print ''."\n"; - print '
'; - print 'Dolibarr logo
'; - print DOL_VERSION.'

'; - print '
'; + print '
'; + print 'Dolibarr logo
'; + print DOL_VERSION; + print '


'; print ''.$langs->trans("DolibarrSetup"); - if ($soutitre) { - print ' - '.$soutitre; + if ($subtitle) { + print ' - '.$subtitle; } print ''."\n";