forked from indymedia/epicyon
Citations pseudo-array
parent
0f37e78d17
commit
a8e3bb1764
14
daemon.py
14
daemon.py
|
@ -3115,10 +3115,11 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
extractTextFieldsInPOST(postBytes, boundary, debug)
|
||||
print('citationstest: ' + str(fields))
|
||||
citations = []
|
||||
for dateStr, item in newswire.items():
|
||||
if fields.get(dateStr):
|
||||
if fields[dateStr] == 'on':
|
||||
citations.append(dateStr)
|
||||
for ctr in range(0, 128):
|
||||
fieldName = 'newswire' + str(ctr)
|
||||
if not fields.get(fieldName):
|
||||
continue
|
||||
citations.append(fields[fieldName])
|
||||
|
||||
if citations:
|
||||
citationsFilename = \
|
||||
|
@ -10884,8 +10885,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
# was the citations button pressed on the newblog screen?
|
||||
citationsButtonPress = False
|
||||
if postType == 'newblog' and fields.get('submitCitations'):
|
||||
if fields['submitCitations'] == \
|
||||
self.server.translate['Citations']:
|
||||
if fields['submitCitations'] == 'Submit':
|
||||
citationsButtonPress = True
|
||||
|
||||
if not citationsButtonPress:
|
||||
|
@ -10894,7 +10894,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
not fields.get('imageDescription'):
|
||||
return -1
|
||||
if fields.get('submitPost'):
|
||||
if fields['submitPost'] != self.server.translate['Submit']:
|
||||
if fields['submitPost'] != 'Submit':
|
||||
return -1
|
||||
else:
|
||||
return 2
|
||||
|
|
|
@ -3002,8 +3002,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
|
|||
translate['Citations'] + '">\n'
|
||||
|
||||
newPostForm += \
|
||||
' <input type="submit" name="submitPost" value="' + \
|
||||
translate['Submit'] + '">\n'
|
||||
' <input type="submit" name="submitPost" value="Submit">\n'
|
||||
|
||||
newPostForm += ' </center></div>\n'
|
||||
|
||||
|
@ -5908,8 +5907,7 @@ def htmlCitations(baseDir: str, nickname: str, domain: str,
|
|||
' <input type="hidden" name="blogContent" value="' + \
|
||||
blogContent + '">\n'
|
||||
htmlStr += \
|
||||
' <input type="submit" name="submitCitations" value="' + \
|
||||
translate['Submit'] + '">\n'
|
||||
' <input type="submit" name="submitCitations" value="Submit">\n'
|
||||
htmlStr += ' </center>\n'
|
||||
|
||||
# list of newswire items
|
||||
|
@ -5924,7 +5922,7 @@ def htmlCitations(baseDir: str, nickname: str, domain: str,
|
|||
link = item[1]
|
||||
|
||||
htmlStr += \
|
||||
'<input type="checkbox" name="' + dateStr + \
|
||||
'<input type="checkbox" name="newswire' + str(ctr) + \
|
||||
'" value="' + dateStr + '"/>' + \
|
||||
'<a href="' + link + '">' + title + '</a> '
|
||||
htmlStr += '<span class="newswireDate">' + \
|
||||
|
|
Loading…
Reference in New Issue