From 74a63e98b51d41392f25fd871b2f13e2f9bb7ea5 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Wed, 26 Sep 2012 12:45:56 -0500 Subject: [PATCH] possibly fixed issue 1031, thanks villas --- Makefile | 11 +++++++---- VERSION | 2 +- gluon/dal.py | 2 +- gluon/tools.py | 12 +++++++----- setup.py | 5 ----- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index d764297d..d0c03e2e 100644 --- a/Makefile +++ b/Makefile @@ -107,10 +107,6 @@ win: cp applications/__init__.py ../web2py_win/web2py/applications cd ../web2py_win; zip -r web2py_win.zip web2py mv ../web2py_win/web2py_win.zip . -pip: - # create Web2py distribution for upload to Pypi - # after upload clean Web2py sources with rm -R ./dist - python setup.py sdist run: python2.5 web2py.py -a hello commit: @@ -129,3 +125,10 @@ tag: hg tag -l '$(S)' make commit S='$(S)' make push +pip: + # create Web2py distribution for upload to Pypi + # after upload clean Web2py sources with rm -R ./dist + # http://guide.python-distribute.org/creation.html + python setup.py sdist + python setup.py register + python setup.py sdist upload diff --git a/VERSION b/VERSION index 5a46f2cf..b96c4ccd 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.0.9 (2012-09-25 16:18:48) stable +Version 2.0.9 (2012-09-26 12:45:50) stable diff --git a/gluon/dal.py b/gluon/dal.py index 7b038f50..b3648155 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -3274,7 +3274,7 @@ class FireBirdAdapter(BaseAdapter): def select_limitby(self, sql_s, sql_f, sql_t, sql_w, sql_o, limitby): if limitby: (lmin, lmax) = limitby - sql_s += ' FIRST %i SKIP %i' % (lmax - lmin, lmin) + sql_s = ' FIRST %i SKIP %i %s' % (lmax - lmin, lmin, sql_s) return 'SELECT %s %s FROM %s%s%s;' % (sql_s, sql_f, sql_t, sql_w, sql_o) def _truncate(self,table,mode = ''): diff --git a/gluon/tools.py b/gluon/tools.py index 333fbd3d..38942a81 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -4918,8 +4918,9 @@ class Wiki(object): query = query|db.wiki_page.title.startswith(request.vars.q) if self.restrict_search and not self.manage(): query = query&(db.wiki_page.created_by==self.auth.user_id) - pages = db(query).select( + pages = db(query).select(count, *fields,**dict(orderby=orderby or ~count, + groupby=db.wiki_page.id, distinct=True, limitby=limitby)) if request.extension in ('html','load'): @@ -4928,18 +4929,19 @@ class Wiki(object): _class='w2p_wiki_form')) def link(t): return A(t,_href=URL(args='_search',vars=dict(q=t))) - items = [DIV(H3(A(p.title,_href=URL(args=p.slug))), - MARKMIN(self.first_paragraph(p)) \ + items = [DIV(H3(A(p.wiki_page.title,_href=URL( + args=p.wiki_page.slug))), + MARKMIN(self.first_paragraph(p.wiki_page)) \ if preview else '', DIV(_class='w2p_wiki_tags', *[link(t.strip()) for t in \ - p.tags or [] if t.strip()]), + p.wiki_page.tags or [] if t.strip()]), _class='w2p_wiki_search_item') for p in pages] content.append(DIV(_class='w2p_wiki_pages',*items)) else: cloud=False - content = [p.as_dict() for p in pages] + content = [p.wiki_page.as_dict() for p in pages] elif cloud: content.append(self.cloud()['content']) if request.extension=='load': diff --git a/setup.py b/setup.py index 3dbc628e..f87f315c 100644 --- a/setup.py +++ b/setup.py @@ -77,8 +77,3 @@ if __name__ == '__main__': #s = raw_input('>') #if s.lower()[:1]=='y': start() - - - - -