mirror of
https://github.com/espocrm/espocrm.git
synced 2026-03-03 21:37:01 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
94881de082 | ||
|
|
cbec1cbbe5 | ||
|
|
71dd872618 | ||
|
|
bfed154feb | ||
|
|
5a19b90b13 | ||
|
|
33b0ca8824 | ||
|
|
540c58a564 |
@@ -861,7 +861,7 @@ class Parser
|
||||
$offset = -1;
|
||||
|
||||
while (true) {
|
||||
$index = strrpos($expression, $operator, $offset);
|
||||
$index = strrpos($modifiedExpression, $operator, $offset);
|
||||
|
||||
if ($index === false) {
|
||||
break;
|
||||
@@ -882,7 +882,7 @@ class Parser
|
||||
|
||||
if (strlen($operator) === 1) {
|
||||
if ($index < strlen($expression) - 1) {
|
||||
$possibleRightOperator = trim($operator . $expression[$index + 1]);
|
||||
$possibleRightOperator = trim($operator . $modifiedExpression[$index + 1]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -898,7 +898,7 @@ class Parser
|
||||
|
||||
if (strlen($operator) === 1) {
|
||||
if ($index > 0) {
|
||||
$possibleLeftOperator = trim($expression[$index - 1] . $operator);
|
||||
$possibleLeftOperator = trim($modifiedExpression[$index - 1] . $operator);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1197,7 +1197,8 @@ class CalendarView extends View {
|
||||
|
||||
const event = this.convertToFcEvent(attributes);
|
||||
|
||||
this.calendar.addEvent(event);
|
||||
// true passed to prevent duplicates after re-fetch.
|
||||
this.calendar.addEvent(event, true);
|
||||
}
|
||||
|
||||
updateModel(model) {
|
||||
|
||||
@@ -204,6 +204,8 @@ class Language {
|
||||
* @returns {Promise}
|
||||
*/
|
||||
load(callback, disableCache, loadDefault) {
|
||||
this.off('sync');
|
||||
|
||||
if (callback) {
|
||||
this.once('sync', callback);
|
||||
}
|
||||
|
||||
@@ -97,6 +97,10 @@ class AddDashletModalView extends ModalView {
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
this.dashletList.forEach(item => {
|
||||
this.translations[item] = this.translate(item, 'dashlets');
|
||||
});
|
||||
}
|
||||
|
||||
afterRender() {
|
||||
@@ -125,6 +129,10 @@ class AddDashletModalView extends ModalView {
|
||||
const lowerCaseText = text.toLowerCase();
|
||||
|
||||
this.dashletList.forEach(item => {
|
||||
if (!(item in this.translations)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const label = this.translations[item].toLowerCase();
|
||||
|
||||
for (const word of label.split(' ')) {
|
||||
|
||||
@@ -193,12 +193,18 @@ class RoleRecordTableView extends View {
|
||||
|
||||
let level = null;
|
||||
|
||||
const levelList = this.getLevelList(scope, action);
|
||||
|
||||
if (scope in aclData) {
|
||||
if (access === 'enabled') {
|
||||
if (aclData[scope] !== true) {
|
||||
if (action in aclData[scope]) {
|
||||
level = aclData[scope][action];
|
||||
}
|
||||
|
||||
if (level === null) {
|
||||
level = levelList[levelList.length - 1];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
level = 'no';
|
||||
@@ -209,7 +215,7 @@ class RoleRecordTableView extends View {
|
||||
level: level,
|
||||
name: scope + '-' + action,
|
||||
action: action,
|
||||
levelList: this.getLevelList(scope, action),
|
||||
levelList: levelList,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "espocrm",
|
||||
"version": "8.2.3",
|
||||
"version": "8.2.4",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "espocrm",
|
||||
"version": "8.2.3",
|
||||
"version": "8.2.4",
|
||||
"hasInstallScript": true,
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "espocrm",
|
||||
"version": "8.2.3",
|
||||
"version": "8.2.4",
|
||||
"description": "Open-source CRM.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@@ -1380,4 +1380,16 @@ class EvaluatorTest extends \PHPUnit\Framework\TestCase
|
||||
|
||||
$this->assertEquals(2, $vars->j);;
|
||||
}
|
||||
|
||||
public function testStringsWithOperator(): void
|
||||
{
|
||||
$expression = "\$a = '='";
|
||||
|
||||
$vars = (object) [];
|
||||
|
||||
/** @noinspection PhpUnhandledExceptionInspection */
|
||||
$this->evaluator->process($expression, null, $vars);
|
||||
|
||||
$this->assertEquals("=", $vars->a);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user