fsdfsd
This commit is contained in:
parent
449c18dcf5
commit
1574901375
1 changed files with 14 additions and 12 deletions
|
@ -902,6 +902,7 @@ def submit_post(v):
|
||||||
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif|webp|PNG|JPG|JPEG|GIF|WEBP|9999))', body, re.MULTILINE):
|
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif|webp|PNG|JPG|JPEG|GIF|WEBP|9999))', body, re.MULTILINE):
|
||||||
if "wikipedia" not in i.group(1): body = body.replace(i.group(1), f'})')
|
if "wikipedia" not in i.group(1): body = body.replace(i.group(1), f'})')
|
||||||
|
|
||||||
|
if v and v.admin_level > 1:
|
||||||
bet_options = []
|
bet_options = []
|
||||||
for i in re.finditer('\s*\$\$\$([^\$\n]+)\$\$\$\s*', body):
|
for i in re.finditer('\s*\$\$\$([^\$\n]+)\$\$\$\s*', body):
|
||||||
bet_options.append(i.group(1))
|
bet_options.append(i.group(1))
|
||||||
|
@ -969,6 +970,7 @@ def submit_post(v):
|
||||||
g.db.add(new_post)
|
g.db.add(new_post)
|
||||||
g.db.flush()
|
g.db.flush()
|
||||||
|
|
||||||
|
if v and v.admin_level > 1:
|
||||||
for option in bet_options:
|
for option in bet_options:
|
||||||
bet_option = Comment(author_id=AUTOBETTER_ID,
|
bet_option = Comment(author_id=AUTOBETTER_ID,
|
||||||
parent_submission=new_post.id,
|
parent_submission=new_post.id,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue