Author
|
zPlus <zplus@peers.community>
2019-03-19 07:10:45
|
Committer
|
zPlus <zplus@peers.community>
2019-03-19 07:10:45
|
Commit
|
c0a38b3
(patch)
|
Tree
|
af90034
|
Parent(s)
|
|
Fix database REGEXP function. Use re.search() instead of re.match().
commits diff:
8b6922c..c0a38b3
1 file changed,
1 insertion,
1 deletion
—
download
Diffstat
Diff options
+1/-1
M freepost/database.py
19
|
19
|
|
# function named "regexp" is added at run-time, then the "X REGEXP Y" operator
|
20
|
20
|
|
# will be implemented as a call to "regexp(Y,X)".
|
21
|
21
|
|
db.create_function('REGEXP', 2, lambda pattern, string:
|
22
|
|
- |
re.match(pattern, string, flags=re.IGNORECASE) is not None)
|
|
22
|
+ |
re.search(pattern, string, flags=re.IGNORECASE) is not None)
|
23
|
23
|
|
|
24
|
24
|
|
# Store a new session_id for a user that has logged in
|
25
|
25
|
|
# The session token is stored in the user cookies during login, here
|