mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
The second argument of a LIMIT clause in an SQL query corresponds to the number of rows, not to the last index.
fixed #141
This commit is contained in:
@@ -70,7 +70,7 @@ SELECT msgs.from_addr, maddr.email, msgs.subject, msgs.content, quarantine.mail_
|
||||
msgs.time_num, msgs.content, msgrcpt.rs
|
||||
%s
|
||||
LIMIT %d,%d
|
||||
""" % (query, start - 1, stop - 1))
|
||||
""" % (query, start - 1, kwargs["nbelems"]))
|
||||
if not status:
|
||||
print cursor
|
||||
return []
|
||||
|
||||
@@ -109,7 +109,8 @@ class EmailListing:
|
||||
|
||||
def fetch(self, request, id_start, id_stop):
|
||||
table = self.tbltype(self.mbc.fetch(start=id_start, stop=id_stop,
|
||||
folder=self.folder))
|
||||
folder=self.folder,
|
||||
nbelems=self.elems_per_page))
|
||||
tpl = Template("""
|
||||
<form method="POST" id="listingform">
|
||||
{{ table }}
|
||||
|
||||
Reference in New Issue
Block a user