Skip to content

Commit

Permalink
Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Browse files Browse the repository at this point in the history
Conflicts:
	htdocs/core/class/doleditor.class.php
  • Loading branch information
eldy committed Jul 23, 2017
2 parents f3de6cf + 0aed9ec commit 6421ec3
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions htdocs/core/ajax/selectsearchbox.php
Expand Up @@ -31,8 +31,17 @@
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';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/class/doleditor.class.php
Expand Up @@ -82,7 +82,7 @@ function __construct($htmlname,$content,$width='',$height=200,$toolbarname='Basi
// 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')
Expand Down
1 change: 1 addition & 0 deletions htdocs/langs/en_US/other.lang
Expand Up @@ -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
Expand Down
12 changes: 7 additions & 5 deletions htdocs/main.inc.php
Expand Up @@ -457,9 +457,7 @@ function analyseVarsForSqlAndScriptsInjection(&$var, $type)
$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;
Expand All @@ -473,6 +471,9 @@ function analyseVarsForSqlAndScriptsInjection(&$var, $type)
$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);
Expand Down Expand Up @@ -531,9 +532,10 @@ function analyseVarsForSqlAndScriptsInjection(&$var, $type)
// 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;
}

Expand Down

0 comments on commit 6421ec3

Please sign in to comment.