diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 4e548249092..b8001f874d1 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -143,6 +143,7 @@ CurrentInformationOnImage=This tool was designed to help you to resize or crop a ImageEditor=Image editor YouReceiveMailBecauseOfNotification=You receive this message because your email has been added to list of targets to be informed of particular events into %s software of %s. YouReceiveMailBecauseOfNotification2=This event is the following: +ThisIsListOfModules=This is list of standard modules preselected by this demo profile. Edit this to have a more personalized demo and click on "Start". ##### Bookmark ##### Bookmark=Bookmark diff --git a/htdocs/langs/fr_FR/other.lang b/htdocs/langs/fr_FR/other.lang index 91d60f20249..d06bb307593 100644 --- a/htdocs/langs/fr_FR/other.lang +++ b/htdocs/langs/fr_FR/other.lang @@ -143,6 +143,7 @@ CurrentInformationOnImage=Cette page permet de redimensionner ou recadrer un ima ImageEditor=Editeur d'image YouReceiveMailBecauseOfNotification=Vous recevez ce message car votre email a été abonnée à certaines notifications automatiques pour vous informer d'évenements particuliers issus du logiciel %s de %s. YouReceiveMailBecauseOfNotification2=L'événement en question est le suivant: +ThisIsListOfModules=Voici la liste des modules standards présélectionnés par ce profil de démo. Affinez encore vos préférences et cliquez sur "Démarrer". ##### Bookmark ##### Bookmark=Marque-page diff --git a/htdocs/lib/security.lib.php b/htdocs/lib/security.lib.php index 2a941c3a3ed..968c9c78eaf 100644 --- a/htdocs/lib/security.lib.php +++ b/htdocs/lib/security.lib.php @@ -51,7 +51,7 @@ function dol_loginfunction($langs,$conf,$mysoc) $php_self = $_SERVER['PHP_SELF']; $php_self.= $_SERVER["QUERY_STRING"]?'?'.$_SERVER["QUERY_STRING"]:''; - + // Title $title='Dolibarr '.DOL_VERSION; if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $title=$conf->global->MAIN_APPLICATION_TITLE; @@ -78,7 +78,7 @@ function dol_loginfunction($langs,$conf,$mysoc) $conf->css = "/theme/".$conf->theme."/style.css.php?lang=".$langs->defaultlang; $conf_css = DOL_URL_ROOT.$conf->css; - + // Add real path in session name $realpath=''; if ( preg_match('/^([^.]+)\/htdocs\//i', realpath($_SERVER["SCRIPT_FILENAME"]), $regs)) $realpath = isset($regs[1])?$regs[1]:''; @@ -87,10 +87,10 @@ function dol_loginfunction($langs,$conf,$mysoc) $sessiontimeout='DOLSESSTIMEOUT_'.md5($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].$realpath); if (! empty($conf->global->MAIN_SESSION_TIMEOUT)) setcookie($sessiontimeout, $conf->global->MAIN_SESSION_TIMEOUT, 0, "/", '', 0); - if (! empty($_REQUEST["urlfrom"])) $_SESSION["urlfrom"]=$_REQUEST["urlfrom"]; + if (GETPOST("urlfrom")) $_SESSION["urlfrom"]=GETPOST("urlfrom"); else unset($_SESSION["urlfrom"]); - if (! $_REQUEST["username"]) $focus_element='username'; + if (GETPOST("username")) $focus_element='username'; else $focus_element='password'; $login_background=DOL_URL_ROOT.'/theme/login_background.png'; @@ -131,7 +131,7 @@ function dol_loginfunction($langs,$conf,$mysoc) } // Login - $login = (!empty($lastuser)?$lastuser:(isset($_REQUEST["username"])?$_REQUEST["username"]:$demologin)); + $login = (!empty($lastuser)?$lastuser:(GETPOST("username")?GETPOST("username"):$demologin)); $password = $demopassword; // Show logo (search in order: small company logo, large company logo, theme logo, common logo) @@ -158,7 +158,7 @@ function dol_loginfunction($langs,$conf,$mysoc) if (! empty($conf->global->MAIN_MODULE_MULTICOMPANY)) { $rowspan++; - + $res=@include_once(DOL_DOCUMENT_ROOT.'/multicompany/class/actions_multicompany.class.php'); if ($res) { diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index fbb87ba83f3..deb0be59704 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -41,25 +41,28 @@ if (empty($dolibarr_main_demo)) accessforbidden('Parameter dolibarr_main_demo mu $demoprofiles=array( array('default'=>'-1', 'key'=>'profdemofun','label'=>'DemoFundation', - 'disablemodules'=>'banque,barcode,boutique,cashdesk,commande,commercial,compta,comptabilite,contrat,expedition,facture,ficheinter,fournisseur,prelevement,produit,projet,propal,propale,service,societe,stock,tax', + 'disablemodules'=>'banque,barcode,boutique,cashdesk,commande,commercial,compta,comptabilite,contrat,expedition,externalsite,facture,ficheinter,fournisseur,prelevement,produit,projet,propal,propale,service,societe,stock,tax', 'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot6.png'), array('default'=>'0', 'key'=>'profdemofun2','label'=>'DemoFundation2', - 'disablemodules'=>'barcode,boutique,cashdesk,commande,commercial,compta,comptabilite,contrat,expedition,facture,ficheinter,fournisseur,prelevement,produit,projet,propal,propale,service,societe,stock', + 'disablemodules'=>'barcode,boutique,cashdesk,commande,commercial,compta,comptabilite,contrat,expedition,externalsite,facture,ficheinter,fournisseur,prelevement,produit,projet,propal,propale,service,societe,stock', 'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot6.png'), array('default'=>'1', 'key'=>'profdemoservonly','label'=>'DemoCompanyServiceOnly', - 'disablemodules'=>'adherent,barcode,boutique,cashdesk,don,expedition,prelevement,projet,stock', + 'disablemodules'=>'adherent,barcode,boutique,cashdesk,don,expedition,externalsite,prelevement,stock', 'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot8.png'), array('default'=>'-1','key'=>'profdemoshopwithdesk','label'=>'DemoCompanyShopWithCashDesk', - 'disablemodules'=>'adherent,boutique,don,ficheinter,prelevement,produit,stock', + 'disablemodules'=>'adherent,boutique,don,externalsite,ficheinter,prelevement,produit,stock', 'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot2.png'), array('default'=>'0', 'key'=>'profdemoprodstock','label'=>'DemoCompanyProductAndStocks', - 'disablemodules'=>'adherent,boutique,cashdesk,don,ficheinter,prelevement,service', + 'disablemodules'=>'adherent,boutique,don,externalsite,ficheinter,prelevement,service', 'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot2.png'), array('default'=>'0', 'key'=>'profdemoall','label'=>'DemoCompanyAll', - 'disablemodules'=>'adherent,boutique,cashdesk,don', + 'disablemodules'=>'adherent,boutique,don,externalsite', 'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot9.png'), ); +$alwaysdisabledmodules=array('memcached'); +//$alwaysdisabledmodules=array('boutique','clicktodial','externalsite','ftp','gravatar','ldap','memcached','webcalendar'); + function llxHeaderVierge($title, $head = "") { @@ -77,6 +80,10 @@ function llxHeaderVierge($title, $head = "") print ''."\n"; print "