diff --git a/ChangeLog b/ChangeLog
index 7b8e29d04e0..3cfc257bbb2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,7 @@ NEW: Add a payment module for Stripe.
NEW: Add module "Product variant" (like red, blue for the product shoes)
NEW: Accountancy - Activate multi-journal & Add journal_label to database (FEC)
NEW: Add a tracking id into mass emailing.
+NEW: Tax system more compatible with the new tax roollout in India (IGST / CGST / SGST).
NEW: Add calculation function for Loan schedule
NEW: Add "depends on" and "required by" into module informations
NEW: Add hidden option THIRDPARTY_INCLUDE_PARENT_IN_LINKTO
diff --git a/htdocs/core/ajax/selectsearchbox.php b/htdocs/core/ajax/selectsearchbox.php
index 2e837fcbaae..2d92bc8f938 100644
--- a/htdocs/core/ajax/selectsearchbox.php
+++ b/htdocs/core/ajax/selectsearchbox.php
@@ -31,8 +31,17 @@ if (! isset($usedbyinclude) || empty($usedbyinclude))
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
+ if (! defined('NOREDIRECTBYMAINTOLOGIN')) define('NOREDIRECTBYMAINTOLOGIN','1');
$res=@include '../../main.inc.php';
+ if ($res == 'ERROR_NOT_LOGGED')
+ {
+ $langs->load("other");
+ $arrayresult['jumptologin']=array('img'=>'object_generic', 'label'=>$langs->trans("JumpToLogin"), 'text'=>' '.$langs->trans("JumpToLogin"), 'url'=>DOL_URL_ROOT.'/index.php');
+ print json_encode($arrayresult);
+ if (is_object($db)) $db->close();
+ exit;
+ }
}
include_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php';
diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php
index db768b4c630..eaf72ffff71 100644
--- a/htdocs/core/class/doleditor.class.php
+++ b/htdocs/core/class/doleditor.class.php
@@ -82,7 +82,7 @@ class DolEditor
// Check if extended editor is ok. If not we force textarea
if ((empty($conf->fckeditor->enabled) && $okforextendededitor != 'ace') || empty($okforextendededitor)) $this->tool = 'textarea';
if ($okforextendededitor === 'ace') $this->tool='ace';
- if ($conf->dol_use_jmobile) $this->tool = 'textarea'; // TODO ckeditor ko with mobile ? ace ko with mobile ?
+ //if ($conf->dol_use_jmobile) $this->tool = 'textarea'; // ckeditor and ace seems ok with mobile
// Define content and some properties
if ($this->tool == 'ckeditor')
diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang
index e519f7af405..bd52f5dcaa2 100644
--- a/htdocs/langs/en_US/other.lang
+++ b/htdocs/langs/en_US/other.lang
@@ -18,6 +18,7 @@ NextMonthOfInvoice=Following month (number 1-12) of invoice date
TextNextMonthOfInvoice=Following month (text) of invoice date
ZipFileGeneratedInto=Zip file generated into %s.
DocFileGeneratedInto=Doc file generated into %s.
+JumpToLogin=Disconnected. Go to login page...
YearOfInvoice=Year of invoice date
PreviousYearOfInvoice=Previous year of invoice date
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 1edc67d582f..090a35d6c83 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -457,9 +457,7 @@ if (! defined('NOLOGIN'))
$passwordtotest = GETPOST('password','none',2);
$entitytotest = (GETPOST('entity','int') ? GETPOST('entity','int') : (!empty($conf->entity) ? $conf->entity : 1));
- // Validation of login/pass/entity
- // If ok, the variable login will be returned
- // If error, we will put error message in session under the name dol_loginmesg
+ // Define if we received data to test the login.
$goontestloop=false;
if (isset($_SERVER["REMOTE_USER"]) && in_array('http',$authmode)) $goontestloop=true;
if ($dolibarr_main_authentication == 'forceuser' && ! empty($dolibarr_auto_user)) $goontestloop=true;
@@ -473,6 +471,9 @@ if (! defined('NOLOGIN'))
$langs->setDefaultLang($langcode);
}
+ // Validation of login/pass/entity
+ // If ok, the variable login will be returned
+ // If error, we will put error message in session under the name dol_loginmesg
if ($test && $goontestloop)
{
$login = checkLoginPassEntity($usertotest,$passwordtotest,$entitytotest,$authmode);
@@ -531,9 +532,10 @@ if (! defined('NOLOGIN'))
// End test login / passwords
if (! $login || (in_array('ldap',$authmode) && empty($passwordtotest))) // With LDAP we refused empty password because some LDAP are "opened" for anonymous access so connexion is a success.
{
- // We show login page
+ // No data to test login, so we show the login page
dol_syslog("--- Access to ".$_SERVER["PHP_SELF"]." showing the login form and exit");
- dol_loginfunction($langs,$conf,(! empty($mysoc)?$mysoc:''));
+ if (defined('NOREDIRECTBYMAINTOLOGIN')) return 'ERROR_NOT_LOGGED';
+ else dol_loginfunction($langs,$conf,(! empty($mysoc)?$mysoc:''));
exit;
}