mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
merge from trunk
This commit is contained in:
commit
0c7fb2afda
@ -61,7 +61,6 @@ class ContentServer(object):
|
|||||||
8:'Aug', 9:'Sep', 10:'Oct', 11:'Nov', 12:'Dec'}
|
8:'Aug', 9:'Sep', 10:'Oct', 11:'Nov', 12:'Dec'}
|
||||||
return lm.replace('month', month[updated.month])
|
return lm.replace('month', month[updated.month])
|
||||||
|
|
||||||
|
|
||||||
def sort(self, items, field, order):
|
def sort(self, items, field, order):
|
||||||
field = self.db.data.sanitize_sort_field_name(field)
|
field = self.db.data.sanitize_sort_field_name(field)
|
||||||
if field not in self.db.field_metadata.sortable_field_keys():
|
if field not in self.db.field_metadata.sortable_field_keys():
|
||||||
@ -77,7 +76,7 @@ class ContentServer(object):
|
|||||||
try:
|
try:
|
||||||
id = int(id)
|
id = int(id)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
id = id.rpartition('_')[-1].partition('.')[0]
|
id = id.rpartition('.')[0].rpartition('_')[-1]
|
||||||
match = re.search(r'\d+', id)
|
match = re.search(r'\d+', id)
|
||||||
if not match:
|
if not match:
|
||||||
raise cherrypy.HTTPError(404, 'id:%s not an integer'%id)
|
raise cherrypy.HTTPError(404, 'id:%s not an integer'%id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user