forked from MarseyWorld/MarseyWorld
fddf
parent
0ce8a0645c
commit
aec9890a2e
|
@ -54,7 +54,7 @@ def flagged_posts(v):
|
|||
|
||||
listing = [p.id for p in posts]
|
||||
next_exists = (len(listing) == 26)
|
||||
listing = listing[0:25]
|
||||
listing = listing[:25]
|
||||
|
||||
listing = get_posts(listing, v=v)
|
||||
|
||||
|
@ -75,7 +75,7 @@ def image_posts_listing(v):
|
|||
|
||||
posts = [x.id for x in posts]
|
||||
next_exists = (len(posts) == 26)
|
||||
posts = posts[0:25]
|
||||
posts = posts[:25]
|
||||
|
||||
posts = get_posts(posts, v=v)
|
||||
|
||||
|
@ -105,7 +105,7 @@ def flagged_comments(v):
|
|||
|
||||
listing = [p.id for p in posts]
|
||||
next_exists = (len(listing) == 26)
|
||||
listing = listing[0:25]
|
||||
listing = listing[:25]
|
||||
|
||||
listing = get_comments(listing, v=v)
|
||||
|
||||
|
@ -221,7 +221,7 @@ def users_list(v):
|
|||
users = [x for x in users]
|
||||
|
||||
next_exists = (len(users) == 26)
|
||||
users = users[0:25]
|
||||
users = users[:25]
|
||||
|
||||
return render_template("admin/new_users.html",
|
||||
v=v,
|
||||
|
@ -408,7 +408,7 @@ def admin_removed(v):
|
|||
|
||||
next_exists = len(ids) == 26
|
||||
|
||||
ids = ids[0:25]
|
||||
ids = ids[:25]
|
||||
|
||||
posts = get_posts(ids, v=v)
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ def front_all(v):
|
|||
|
||||
# check existence of next page
|
||||
next_exists = (len(posts) == 26)
|
||||
posts = posts[0:25]
|
||||
posts = posts[:25]
|
||||
|
||||
if request.path == "/": return render_template("home.html", v=v, listing=posts, next_exists=next_exists, sort=sort, t=t, page=page)
|
||||
else: return jsonify({"data": [x.json for x in posts], "next_exists": next_exists})
|
||||
|
@ -303,7 +303,7 @@ def changelog(v):
|
|||
|
||||
# check existence of next page
|
||||
next_exists = (len(ids) == 26)
|
||||
ids = ids[0:25]
|
||||
ids = ids[:25]
|
||||
|
||||
# check if ids exist
|
||||
posts = get_posts(ids, v=v)
|
||||
|
@ -418,7 +418,7 @@ def all_comments(v):
|
|||
|
||||
next_exists = len(idlist) == 26
|
||||
|
||||
idlist = idlist[0:25]
|
||||
idlist = idlist[:25]
|
||||
|
||||
return {"html": lambda: render_template("home_comments.html",
|
||||
v=v,
|
||||
|
|
|
@ -229,7 +229,7 @@ def request_api_keys(v):
|
|||
app_name=request.form.get('name'),
|
||||
redirect_uri=request.form.get('redirect_uri'),
|
||||
author_id=v.id,
|
||||
description=request.form.get("description")[0:256]
|
||||
description=request.form.get("description")[:256]
|
||||
)
|
||||
|
||||
g.db.add(new_app)
|
||||
|
@ -267,7 +267,7 @@ def edit_oauth_app(v, aid):
|
|||
|
||||
app.redirect_uri = request.form.get('redirect_uri')
|
||||
app.app_name = request.form.get('name')
|
||||
app.description = request.form.get("description")[0:256]
|
||||
app.description = request.form.get("description")[:256]
|
||||
|
||||
g.db.add(app)
|
||||
|
||||
|
|
|
@ -215,7 +215,7 @@ def searchposts(v, search_type="posts"):
|
|||
total, ids = searchlisting(criteria, v=v, page=page, t=t, sort=sort)
|
||||
|
||||
next_exists = (len(ids) == 26)
|
||||
ids = ids[0:25]
|
||||
ids = ids[:25]
|
||||
|
||||
posts = get_posts(ids, v=v)
|
||||
|
||||
|
@ -262,7 +262,7 @@ def searchcomments(v):
|
|||
total, ids = searchcommentlisting(criteria, v=v, page=page, t=t, sort=sort)
|
||||
|
||||
next_exists = (len(ids) == 26)
|
||||
ids = ids[0:25]
|
||||
ids = ids[:25]
|
||||
|
||||
comments = get_comments(ids, v=v)
|
||||
|
||||
|
@ -305,7 +305,7 @@ def searchusers(v, search_type="posts"):
|
|||
|
||||
users=[x for x in users.offset(25 * (page-1)).limit(26)]
|
||||
next_exists=(len(users)==26)
|
||||
users=users[0:25]
|
||||
users=users[:25]
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -291,7 +291,7 @@ def u_username(username, v=None):
|
|||
|
||||
# we got 26 items just to see if a next page exists
|
||||
next_exists = (len(ids) == 26)
|
||||
ids = ids[0:25]
|
||||
ids = ids[:25]
|
||||
|
||||
# If page 1, check for sticky
|
||||
if page == 1:
|
||||
|
@ -391,7 +391,7 @@ def u_username_comments(username, v=None):
|
|||
|
||||
# we got 26 items just to see if a next page exists
|
||||
next_exists = (len(ids) == 26)
|
||||
ids = ids[0:25]
|
||||
ids = ids[:25]
|
||||
|
||||
listing = get_comments(ids, v=v)
|
||||
|
||||
|
@ -497,7 +497,7 @@ def saved_posts(v, username):
|
|||
|
||||
next_exists=len(ids)==26
|
||||
|
||||
ids=ids[0:25]
|
||||
ids=ids[:25]
|
||||
|
||||
listing = get_posts(ids, v=v)
|
||||
|
||||
|
@ -524,7 +524,7 @@ def saved_comments(v, username):
|
|||
|
||||
next_exists=len(ids)==26
|
||||
|
||||
ids=ids[0:25]
|
||||
ids=ids[:25]
|
||||
|
||||
listing = get_comments(ids, v=v, sort="new")
|
||||
|
||||
|
|
Loading…
Reference in New Issue