forked from indymedia/epicyon
Check for citations button press
parent
7fc626a2ee
commit
00ca8fa5dd
14
daemon.py
14
daemon.py
|
@ -10871,12 +10871,21 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
else:
|
else:
|
||||||
print('WARN: no text fields could be extracted from POST')
|
print('WARN: no text fields could be extracted from POST')
|
||||||
|
|
||||||
|
# was the citations button pressed on the newblog screen?
|
||||||
|
citationsButtonPress = False
|
||||||
|
if postType == 'newblog' and fields.get('submitCitations'):
|
||||||
|
if fields['submitCitations'] == \
|
||||||
|
self.server.translate['SubmitCitations']:
|
||||||
|
citationsButtonPress = True
|
||||||
|
|
||||||
# process the received text fields from the POST
|
# process the received text fields from the POST
|
||||||
if not fields.get('message') and \
|
if not fields.get('message') and \
|
||||||
not fields.get('imageDescription'):
|
not fields.get('imageDescription'):
|
||||||
|
if not citationsButtonPress:
|
||||||
return -1
|
return -1
|
||||||
if fields.get('submitPost'):
|
if fields.get('submitPost'):
|
||||||
if fields['submitPost'] != self.server.translate['Submit']:
|
if fields['submitPost'] != self.server.translate['Submit']:
|
||||||
|
if not citationsButtonPress:
|
||||||
return -1
|
return -1
|
||||||
else:
|
else:
|
||||||
return 2
|
return 2
|
||||||
|
@ -10959,10 +10968,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
return -1
|
return -1
|
||||||
elif postType == 'newblog':
|
elif postType == 'newblog':
|
||||||
# citations button on newblog screen
|
# citations button on newblog screen
|
||||||
messageJson = None
|
if citationsButtonPress:
|
||||||
if fields.get('submitCitations'):
|
|
||||||
if fields['submitCitations'] == \
|
|
||||||
self.server.translate['Citations']:
|
|
||||||
messageJson = \
|
messageJson = \
|
||||||
htmlCitations(self.server.baseDir,
|
htmlCitations(self.server.baseDir,
|
||||||
nickname,
|
nickname,
|
||||||
|
|
Loading…
Reference in New Issue