diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index dc4e8c9e081..8574c8f8364 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1648,8 +1648,8 @@ function isValidEmail($address, $acceptsupervisorkey=0) /** * Return true if phone number syntax is ok - * - * TODO: Decide what to do with this + * TODO Decide what to do with this + * * @param string $phone phone (Ex: "0601010101") * @return boolean true if phone syntax is OK, false if KO or empty string */ @@ -4957,10 +4957,10 @@ function dol_getmypid() * If param $numeric is 0, can contains several keywords separated with a space, like "keyword1 keyword2" = We want record field like keyword1 and field like keyword2 * If param $numeric is 1, can contains an operator <>= like "<10" or ">=100.5 < 1000" * @param integer $numeric 0=value is list of keywords, 1=value is a numeric test - * @param integer $nofinaland Do now output the final 'AND' + * @param integer $nofinaland 1=Do now output the final 'AND' * @return string $res The statement to append to the SQL query */ -function natural_search($fields, $value, $numeric=0, $nofinaland) +function natural_search($fields, $value, $numeric=0, $nofinaland=0) { global $db,$langs; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 5d15d77d174..9a990fae782 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1,16 +1,16 @@ - * Copyright (C) 2003 Xavier Dutoit - * Copyright (C) 2004-2015 Laurent Destailleur - * Copyright (C) 2004 Sebastien Di Cintio - * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2011-2014 Philippe Grand - * Copyright (C) 2008 Matteli - * Copyright (C) 2011-2013 Juanjo Menent - * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2014 Marcos García - * Copyright (C) 2014-2015 Marcos García +/* Copyright (C) 2002-2007 Rodolphe Quiedeville + * Copyright (C) 2003 Xavier Dutoit + * Copyright (C) 2004-2015 Laurent Destailleur + * Copyright (C) 2004 Sebastien Di Cintio + * Copyright (C) 2004 Benoit Mortier + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2011-2014 Philippe Grand + * Copyright (C) 2008 Matteli + * Copyright (C) 2011-2013 Juanjo Menent + * Copyright (C) 2012 Christophe Battarel + * Copyright (C) 2014-2015 Marcos García + * Copyright (C) 2015 Raphaël Doursenaud * * 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 @@ -1662,21 +1662,28 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me } } - // Link to bugtrack - if (! empty($conf->global->MAIN_BUGTRACK_ENABLELINK)) - { - require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + // Link to bugtrack + if (! empty($conf->global->MAIN_BUGTRACK_ENABLELINK)) + { + require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $bugbaseurl='https://doliforge.org/tracker/?'; - $bugbaseurl.='func=add&group_id=144&atid=246'; - $bugbaseurl.="&details="; - $bugbaseurl.=urlencode("\n\n\n\n\n-------------\n"); - $bugbaseurl.=urlencode($langs->trans("Version").": ".DOL_VERSION."\n"); - $bugbaseurl.=urlencode($langs->trans("Server").": ".$_SERVER["SERVER_SOFTWARE"]."\n"); - $bugbaseurl.=urlencode($langs->trans("PHP").": ".version_php()."\n"); - $bugbaseurl.=urlencode($langs->trans("Url").": ".$_SERVER["REQUEST_URI"]."\n"); - print ''; - } + $bugbaseurl = 'https://github.com/Dolibarr/dolibarr/issues/new'; + $bugbaseurl.= '?title='; + $bugbaseurl.= urlencode("Bug: "); + $bugbaseurl.= '&body='; + $bugbaseurl.= urlencode("# Environment\n"); + $bugbaseurl.= urlencode("- **Version**: " . DOL_VERSION . "\n"); + $bugbaseurl.= urlencode("- **OS**: " . php_uname('s') . "\n"); + $bugbaseurl.= urlencode("- **Web server**: " . $_SERVER["SERVER_SOFTWARE"] . "\n"); + $bugbaseurl.= urlencode("- **PHP**: " . php_sapi_name() . ' ' . phpversion() . "\n"); + $bugbaseurl.= urlencode("- **Database**: " . $db::LABEL . ' ' . $db->getVersion() . "\n"); + $bugbaseurl.= urlencode("- **URL**: " . $_SERVER["REQUEST_URI"] . "\n"); + $bugbaseurl.= urlencode("\n"); + $bugbaseurl.= urlencode("# Report\n"); + print '

'; + print ''.$langs->trans("FindBug").''; + print '

'; + } print "\n"; print "\n";