Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Lstu
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Fiat Tux
Hat softwares
Lstu
Commits
0d21e43d
Verified
Commit
0d21e43d
authored
Nov 19, 2018
by
Luc Didry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Pg sessions and urls delete fonctions
parent
ebb86a63
Pipeline
#95902
passed with stages
in 14 minutes and 55 seconds
Changes
3
Pipelines
5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
CHANGELOG
CHANGELOG
+3
-0
Pg.pm
lib/Lstu/DB/Session/Pg.pm
+1
-1
Pg.pm
lib/Lstu/DB/URL/Pg.pm
+4
-1
No files found.
CHANGELOG
View file @
0d21e43d
...
...
@@ -2,6 +2,9 @@ Revision history for Perl application Lstu
0.22-0 ????-??-??
0.21-3 2018-11-19
- Fix Pg sessions and urls delete fonctions
0.21-2 2018-11-19
- Fix URL removal in memcached from safebrowsingcheck and url commands
...
...
lib/Lstu/DB/Session/Pg.pm
View file @
0d21e43d
...
...
@@ -12,7 +12,7 @@ sub new {
return
$c
;
}
sub
delet
e
{
sub
remov
e
{
my
$c
=
shift
;
my
$h
=
$c
->
app
->
dbi
->
db
->
query
(
'DELETE FROM sessions WHERE token = ? RETURNING *'
,
$c
->
token
)
->
hashes
;
...
...
lib/Lstu/DB/URL/Pg.pm
View file @
0d21e43d
...
...
@@ -21,7 +21,7 @@ sub increment_counter {
return
$c
;
}
sub
delet
e
{
sub
remov
e
{
my
$c
=
shift
;
my
$h
=
$c
->
app
->
dbi
->
db
->
query
(
'DELETE FROM lstu WHERE short = ? RETURNING *'
,
$c
->
short
)
->
hashes
;
...
...
@@ -29,6 +29,9 @@ sub delete {
# 0 means failure
# 1 means success
if
(
$h
->
size
)
{
if
(
scalar
(
@
{
$c
->
app
->
config
(
'memcached_servers'
)}))
{
$c
->
app
->
chi
(
'lstu_urls_cache'
)
->
remove
(
$c
->
short
);
}
$c
=
Lstu::DB::
URL
->
new
(
app
=>
$c
->
app
);
}
...
...
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