Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
captainwong
douban-api-proxy
Commits
ed0bdbf3
Commit
ed0bdbf3
authored
Feb 16, 2020
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for #1199 (missing referrer)
parent
b152d3e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
shelf.py
cps/shelf.py
+4
-1
web.py
cps/web.py
+4
-1
No files found.
cps/shelf.py
View file @
ed0bdbf3
...
...
@@ -179,7 +179,10 @@ def remove_from_shelf(shelf_id, book_id):
if
not
xhr
:
flash
(
_
(
u"Book has been removed from shelf:
%(sname)
s"
,
sname
=
shelf
.
name
),
category
=
"success"
)
return
redirect
(
request
.
environ
[
"HTTP_REFERER"
])
if
"HTTP_REFERER"
in
request
.
environ
:
return
redirect
(
request
.
environ
[
"HTTP_REFERER"
])
else
:
return
redirect
(
url_for
(
'web.index'
))
return
""
,
204
else
:
log
.
error
(
"User
%
s not allowed to remove a book from
%
s"
,
current_user
,
shelf
)
...
...
cps/web.py
View file @
ed0bdbf3
...
...
@@ -1067,7 +1067,10 @@ def send_to_kindle(book_id, book_format, convert):
flash
(
_
(
u"There was an error sending this book:
%(res)
s"
,
res
=
result
),
category
=
"error"
)
else
:
flash
(
_
(
u"Please configure your kindle e-mail address first..."
),
category
=
"error"
)
return
redirect
(
request
.
environ
[
"HTTP_REFERER"
])
if
"HTTP_REFERER"
in
request
.
environ
:
return
redirect
(
request
.
environ
[
"HTTP_REFERER"
])
else
:
return
redirect
(
url_for
(
'web.index'
))
# ################################### Login Logout ##################################################################
...
...
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