mirror of
https://github.com/janeczku/calibre-web
synced 2024-12-25 09:30:31 +00:00
Merge remote-tracking branch 'adv/def-variables'
This commit is contained in:
commit
b30a73c505
@ -1204,13 +1204,12 @@ def language_overview():
|
||||
lang.name = _(isoLanguages.get(part3=lang.lang_code).name)
|
||||
else:
|
||||
try:
|
||||
langfound = 1
|
||||
cur_l = LC.parse(current_user.filter_language())
|
||||
except Exception:
|
||||
langfound = 0
|
||||
cur_l = None
|
||||
languages = db.session.query(db.Languages).filter(
|
||||
db.Languages.lang_code == current_user.filter_language()).all()
|
||||
if langfound:
|
||||
if cur_l:
|
||||
languages[0].name = cur_l.get_language_name(get_locale())
|
||||
else:
|
||||
languages[0].name = _(isoLanguages.get(part3=languages[0].lang_code).name)
|
||||
@ -2168,6 +2167,7 @@ def edit_shelf(shelf_id):
|
||||
@login_required
|
||||
def delete_shelf(shelf_id):
|
||||
cur_shelf = ub.session.query(ub.Shelf).filter(ub.Shelf.id == shelf_id).first()
|
||||
deleted = false
|
||||
if current_user.role_admin():
|
||||
deleted = ub.session.query(ub.Shelf).filter(ub.Shelf.id == shelf_id).delete()
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user