forked from rDrama/rDrama
fdfd
parent
ce4b478269
commit
65cab20a7a
|
@ -606,7 +606,6 @@ def admin_title_change(user_id, v):
|
||||||
new_name=request.form.get("title").strip()
|
new_name=request.form.get("title").strip()
|
||||||
|
|
||||||
user.customtitleplain=new_name
|
user.customtitleplain=new_name
|
||||||
new_name=new_name.replace('_','\_')
|
|
||||||
new_name = sanitize(new_name, linkgen=True)
|
new_name = sanitize(new_name, linkgen=True)
|
||||||
|
|
||||||
user=g.db.query(User).with_for_update().options(lazyload('*')).filter_by(id=user.id).first()
|
user=g.db.query(User).with_for_update().options(lazyload('*')).filter_by(id=user.id).first()
|
||||||
|
@ -937,7 +936,7 @@ def admin_toggle_ban_domain(v):
|
||||||
|
|
||||||
reason=request.form.get("reason", "").strip()
|
reason=request.form.get("reason", "").strip()
|
||||||
|
|
||||||
d = g.db.query(BannedDomain).filter_by(domain=domain.replace("_","\_")).first()
|
d = g.db.query(BannedDomain).filter_by(domain=domain).first()
|
||||||
if d: g.db.delete(d)
|
if d: g.db.delete(d)
|
||||||
else:
|
else:
|
||||||
d = BannedDomain(domain=domain, reason=reason)
|
d = BannedDomain(domain=domain, reason=reason)
|
||||||
|
|
|
@ -275,7 +275,6 @@ def searchusers(v):
|
||||||
term=term.replace('\\','')
|
term=term.replace('\\','')
|
||||||
term=term.replace('_','\_')
|
term=term.replace('_','\_')
|
||||||
|
|
||||||
now=int(time.time())
|
|
||||||
users=g.db.query(User).filter(User.username.ilike(f'%{term}%'))
|
users=g.db.query(User).filter(User.username.ilike(f'%{term}%'))
|
||||||
|
|
||||||
users=users.order_by(User.username.ilike(term).desc(), User.stored_subscriber_count.desc())
|
users=users.order_by(User.username.ilike(term).desc(), User.stored_subscriber_count.desc())
|
||||||
|
|
|
@ -684,7 +684,6 @@ def settings_title_change(v):
|
||||||
error="You didn't change anything")
|
error="You didn't change anything")
|
||||||
|
|
||||||
v.customtitleplain = new_name
|
v.customtitleplain = new_name
|
||||||
new_name = new_name.replace('_','\_')
|
|
||||||
new_name = sanitize(new_name, flair=True)
|
new_name = sanitize(new_name, flair=True)
|
||||||
|
|
||||||
v = g.db.query(User).with_for_update().options(lazyload('*')).filter_by(id=v.id).first()
|
v = g.db.query(User).with_for_update().options(lazyload('*')).filter_by(id=v.id).first()
|
||||||
|
|
Loading…
Reference in New Issue