diff --git a/htdocs/core/datepicker.php b/htdocs/core/datepicker.php index eeb20ee265c..6253ead8c82 100644 --- a/htdocs/core/datepicker.php +++ b/htdocs/core/datepicker.php @@ -39,7 +39,7 @@ if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1); require_once '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang')); // If language was forced on URL by the main.inc.php +if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL by the main.inc.php $langs->load("main"); $langs->load("agenda"); $right=($langs->trans("DIRECTION")=='rtl'?'left':'right'); diff --git a/htdocs/core/get_menudiv.php b/htdocs/core/get_menudiv.php index 655e10afd67..f8b3a652e08 100644 --- a/htdocs/core/get_menudiv.php +++ b/htdocs/core/get_menudiv.php @@ -35,7 +35,7 @@ if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1); require_once '../main.inc.php'; -if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang')); // If language was forced on URL by the main.inc.php +if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL by the main.inc.php $langs->load("main"); $right=($langs->trans("DIRECTION")=='rtl'?'left':'right'); $left=($langs->trans("DIRECTION")=='rtl'?'right':'left'); diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index f0819570c10..97ce3c4f698 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -289,6 +289,9 @@ function GETPOST($paramname,$check='',$method=0,$filter=NULL,$options=NULL) case 'intcomma': if (preg_match('/[^0-9,]+/i',$out)) $out=''; break; + case 'intcomma': + if (preg_match('/[^0-9,]+/i',$out)) $out=''; + break; case 'alpha': $out=trim($out); // '"' is dangerous because param in url can close the href= or src= and add javascript functions. diff --git a/htdocs/core/search_page.php b/htdocs/core/search_page.php index 09b37f4bb8a..c0d98a001b8 100644 --- a/htdocs/core/search_page.php +++ b/htdocs/core/search_page.php @@ -35,7 +35,7 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); require_once '../main.inc.php'; -if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang')); // If language was forced on URL by the main.inc.php +if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL by the main.inc.php $langs->load("main"); $right=($langs->trans("DIRECTION")=='rtl'?'left':'right'); $left=($langs->trans("DIRECTION")=='rtl'?'right':'left'); @@ -76,11 +76,11 @@ if ($conf->use_javascript_ajax && 1 == 2) // select2 is ko with jmobile else { $conf->global->MAIN_HTML5_PLACEHOLDER = 1; - - + + $usedbyinclude = 1; // Used into next include include DOL_DOCUMENT_ROOT.'/core/ajax/selectsearchbox.php'; - + $accesskeyalreadyassigned=array(); foreach($arrayresult as $key => $val) { diff --git a/htdocs/externalsite/frames.php b/htdocs/externalsite/frames.php index c0b5cf92e7e..adf9d547073 100644 --- a/htdocs/externalsite/frames.php +++ b/htdocs/externalsite/frames.php @@ -38,7 +38,7 @@ $mainmenu=GETPOST('mainmenu', 'alpha'); $leftmenu=GETPOST('leftmenu', 'alpha'); $idmenu=GETPOST('idmenu', 'int'); $theme=GETPOST('theme', 'alpha'); -$codelang=GETPOST('lang', 'alpha'); +$codelang=GETPOST('lang', 'aZ09'); print " diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 033e9d43382..324c352e72c 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -2591,19 +2591,29 @@ elseif (! empty($object->id)) // Create bill if (! empty($conf->facture->enabled)) { - if (! empty($conf->fournisseur->enabled) && ($object->statut >= 2 && $object->billed != 1)) // 2 means accepted + if (! empty($conf->fournisseur->enabled) && ($object->statut >= 2 && $object->billed != 1)) // statut 2 means approved { if ($user->rights->fournisseur->facture->creer) { print ''.$langs->trans("CreateBill").''; } - - if ($user->rights->fournisseur->commande->creer && $object->statut >= 2 && !empty($object->linkedObjectsIds['invoice_supplier'])) - { - print 'id.'&action=classifybilled">'.$langs->trans("ClassifyBilled").''; - } } + } + // Classify billed manually (need one invoice if module invoice is on, no condition on invoice if not) + if ($user->rights->fournisseur->commande->creer && $object->statut >= 2 && $object->billed != 1) // statut 2 means approved + { + if (empty($conf->facture->enabled)) + { + print 'id.'&action=classifybilled">'.$langs->trans("ClassifyBilled").''; + } + else if (!empty($object->linkedObjectsIds['invoice_supplier'])) + { + if ($user->rights->fournisseur->facture->creer) + { + print 'id.'&action=classifybilled">'.$langs->trans("ClassifyBilled").''; + } + } } // Create a remote order using WebService only if module is activated diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index 840fa709ddf..68ad2cb6b2c 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -265,7 +265,7 @@ if (function_exists('get_magic_quotes_gpc')) // magic_quotes_* removed in PHP 5. // Defini objet langs $langs = new Translate('..',$conf); -if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang')); +if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); else $langs->setDefaultLang('auto'); $bc[false]=' class="bg1"'; @@ -452,9 +452,9 @@ function pFooter($nonext=0,$setuplang='',$jscheckfunction='', $withpleasewait=0) print '
'; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 82f008c2378..7e52b454f97 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -576,7 +576,7 @@ if (! defined('NOLOGIN')) $paramsurl=array(); if (GETPOST('textbrowser')) $paramsurl[]='textbrowser='.GETPOST('textbrowser','int'); if (GETPOST('nojs')) $paramsurl[]='nojs='.GETPOST('nojs','int'); - if (GETPOST('lang')) $paramsurl[]='lang='.GETPOST('lang','alpha'); + if (GETPOST('lang')) $paramsurl[]='lang='.GETPOST('lang', 'aZ09'); header('Location: '.DOL_URL_ROOT.'/index.php'.(count($paramsurl)?'?'.implode('&',$paramsurl):'')); exit; } @@ -635,7 +635,7 @@ if (! defined('NOLOGIN')) $paramsurl=array(); if (GETPOST('textbrowser')) $paramsurl[]='textbrowser='.GETPOST('textbrowser','int'); if (GETPOST('nojs')) $paramsurl[]='nojs='.GETPOST('nojs','int'); - if (GETPOST('lang')) $paramsurl[]='lang='.GETPOST('lang','alpha'); + if (GETPOST('lang')) $paramsurl[]='lang='.GETPOST('lang', 'aZ09'); header('Location: '.DOL_URL_ROOT.'/index.php'.(count($paramsurl)?'?'.implode('&',$paramsurl):'')); exit; } diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index 80fc5d9a1d4..16c09207102 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -246,7 +246,7 @@ if (! defined('NOREQUIREDB') && ! defined('NOREQUIRESOC')) // Set default language (must be after the setValues setting global $conf->global->MAIN_LANG_DEFAULT. Page main.inc.php will overwrite langs->defaultlang with user value later) if (! defined('NOREQUIRETRAN')) { - $langcode=(GETPOST('lang')?GETPOST('lang','alpha',1):(empty($conf->global->MAIN_LANG_DEFAULT)?'auto':$conf->global->MAIN_LANG_DEFAULT)); + $langcode=(GETPOST('lang', 'aZ09')?GETPOST('lang', 'aZ09', 1):(empty($conf->global->MAIN_LANG_DEFAULT)?'auto':$conf->global->MAIN_LANG_DEFAULT)); $langs->setDefaultLang($langcode); } diff --git a/htdocs/support/inc.php b/htdocs/support/inc.php index 869dace222d..88b1ddc91a6 100644 --- a/htdocs/support/inc.php +++ b/htdocs/support/inc.php @@ -149,7 +149,7 @@ if (empty($conf->db->user)) $conf->db->user=''; // Defini objet langs $langs = new Translate('..',$conf); -if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang')); +if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); else $langs->setDefaultLang('auto'); $bc[false]=' class="bg1"'; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 8d803160325..90bcb8522de 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -53,7 +53,7 @@ else header('Cache-Control: no-cache'); // On the fly GZIP compression for all pages (if browser support it). Must set the bit 3 of constant to 1. if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) { ob_start("ob_gzhandler"); } -if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang', 'alpha')); // If language was forced on URL +if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL if (GETPOST('theme')) $conf->theme=GETPOST('theme', 'alpha'); // If theme was forced on URL $langs->load("main",0,1); $right=($langs->trans("DIRECTION")=='rtl'?'left':'right'); diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index a047eabef13..f4f29695dbc 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -54,7 +54,7 @@ else header('Cache-Control: no-cache'); // On the fly GZIP compression for all pages (if browser support it). Must set the bit 3 of constant to 1. if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) { ob_start("ob_gzhandler"); } -if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang')); // If language was forced on URL +if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL if (GETPOST('theme')) $conf->theme=GETPOST('theme'); // If theme was forced on URL $langs->load("main",0,1); $right=($langs->trans("DIRECTION")=='rtl'?'left':'right'); @@ -2378,6 +2378,15 @@ table.liste, table.noborder, table.formdoc, div.noborder { border-bottom-style: solid; margin: 0px 0px 8px 0px; +<<<<<<< HEAD +======= + /* + -moz-box-shadow: 2px 2px 4px #CCC; + -webkit-box-shadow: 2px 2px 4px #CCC; + box-shadow: 2px 2px 4px #CCC; + */ + /* box-shadow: 0 0 3px rgba(0,0,0,0.16); */ +>>>>>>> branch '4.0' of git@github.com:Dolibarr/dolibarr.git -moz-border-radius: 0.1em; -webkit-border-radius: 0.1em; @@ -4523,7 +4532,11 @@ img.demothumb { } @media only screen and (max-width: 767px) { +<<<<<<< HEAD .imgopensurveywizard, .imgautosize { width:95%; height: auto; } +======= + .imgopensurveywizard { width:95%; height: auto; } +>>>>>>> branch '4.0' of git@github.com:Dolibarr/dolibarr.git #tooltip { position: absolute; diff --git a/htdocs/user/index.php b/htdocs/user/index.php index 35a05ad4be1..3f364fb8180 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -251,8 +251,89 @@ if (! $result) exit; } +<<<<<<< HEAD $num = $db->num_rows($result); +======= + $param=''; + if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; + if ($sall != '') $param.='&sall='.urlencode($sall); + if ($search_user != '') $param.="&search_user=".$search_user; + if ($search_login != '') $param.="&search_login=".$search_login; + if ($search_lastname != '') $param.="&search_lastname=".$search_lastname; + if ($search_firstname != '') $param.="&search_firstname=".$search_firstname; + if ($search_gender != '') $param.="&search_gender=".$search_gender; + if ($search_employee != '') $param.="&search_employee=".$search_employee; + if ($search_accountancy_code != '') $param.="&search_accountancy_code=".$search_accountancy_code; + if ($search_email != '') $param.="&search_email=".$search_email; + if ($search_supervisor > 0) $param.="&search_supervisor=".$search_supervisor; + if ($search_statut != '') $param.="&search_statut=".$search_statut; + if ($optioncss != '') $param.='&optioncss='.$optioncss; + // Add $param from extra fields + foreach ($search_array_options as $key => $val) + { + $crit=$val; + $tmpkey=preg_replace('/search_options_/','',$key); + if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val); + } + + print '\n"; + $db->free($result); +>>>>>>> branch '4.0' of git@github.com:Dolibarr/dolibarr.git } $parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql);