Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/core/class/doleditor.class.php
This commit is contained in:
Laurent Destailleur 2017-07-23 19:27:40 +02:00
commit 6421ec3139
5 changed files with 19 additions and 6 deletions

View File

@ -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

View File

@ -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'=>'<span class="fa fa-sign-in"></span> '.$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';

View File

@ -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')

View File

@ -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 <b>%s</b>.
DocFileGeneratedInto=Doc file generated into <b>%s</b>.
JumpToLogin=Disconnected. Go to login page...
YearOfInvoice=Year of invoice date
PreviousYearOfInvoice=Previous year of invoice date

View File

@ -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;
}