Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio-main
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Hardik Juneja
jio-main
Commits
bba28750
Commit
bba28750
authored
Jul 29, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5storage.js uses '=' operator when its possible
parent
89ba2620
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
15 deletions
+4
-15
src/jio.storage/erp5storage.js
src/jio.storage/erp5storage.js
+4
-15
No files found.
src/jio.storage/erp5storage.js
View file @
bba28750
...
...
@@ -256,9 +256,8 @@ jIO.addStorageType("erp5", function (spec, my) {
*/
priv
.
convertToErp5Query
=
function
(
option
)
{
option
.
query
=
complex_queries
.
QueryFactory
.
create
(
option
.
query
||
""
);
if
(
option
.
wildcard_character
===
undefined
||
(
option
.
wildcard_character
!==
null
&&
typeof
option
.
wildcard_character
!==
'
string
'
))
{
if
(
option
.
wildcard_character
!==
null
&&
typeof
option
.
wildcard_character
!==
'
string
'
)
{
option
.
wildcard_character
=
'
%
'
;
}
else
{
option
.
wildcard_character
=
option
.
wildcard_character
||
''
;
...
...
@@ -266,24 +265,14 @@ jIO.addStorageType("erp5", function (spec, my) {
option
.
query
.
onParseSimpleQuery
=
function
(
object
)
{
if
(
option
.
wildcard_character
.
length
===
1
&&
object
.
parsed
.
operator
===
'
=
'
)
{
object
.
parsed
.
operator
=
'
like
'
;
if
(
option
.
wildcard_character
===
'
%
'
)
{
object
.
parsed
.
operator
=
'
like
'
;
object
.
parsed
.
value
=
object
.
parsed
.
value
.
replace
(
/_/g
,
'
\\
_
'
);
}
else
if
(
option
.
wildcard_character
===
'
_
'
)
{
object
.
parsed
.
operator
=
'
like
'
;
object
.
parsed
.
value
=
object
.
parsed
.
value
.
replace
(
/%/g
,
'
\\
%
'
).
replace
(
/_/g
,
'
%
'
);
}
else
{
object
.
parsed
.
value
=
object
.
parsed
.
value
.
replace
(
/
([
%_
])
/g
,
'
\\
$1
'
).
replace
(
new
RegExp
(
complex_queries
.
stringEscapeRegexpCharacters
(
option
.
wildcard_character
),
'
g
'
),
'
%
'
);
}
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment