* Add MIME types for file attachments
* Restore translatability to mood phrases * Prevent casting of "false" in html2plain * Allow attachments with a comma in the filename * Fix/optimize ACL img data-src jQuery search * Fix bug when uploading files with a comma in the name using Chrome/Chromium * Babel nicer output formatting * Remove obsolete "plaintext" check in mod/parse_url * Restore TinyMCE live insertion of images * Smarty conversion script: add --no-header option to suppress warning headers in Smarty template files
This commit is contained in:
parent
d62483f526
commit
74caf1a4a7
29 changed files with 75 additions and 62 deletions
|
@ -10,6 +10,8 @@ import sys, getopt
|
|||
ldelim = '{{'
|
||||
rdelim = '}}'
|
||||
|
||||
addheader = True
|
||||
|
||||
def fToSmarty(matches):
|
||||
match = matches.group(0)
|
||||
if match == '$j':
|
||||
|
@ -94,8 +96,9 @@ def fix_element(element):
|
|||
|
||||
|
||||
def convert(filename, tofilename, php_tpl):
|
||||
header = ldelim + "*\n *\tAUTOMATICALLY GENERATED TEMPLATE\n *\tDO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN\n *\n *" + rdelim + "\n"
|
||||
tofilename.write(header)
|
||||
if addheader:
|
||||
header = ldelim + "*\n *\tAUTOMATICALLY GENERATED TEMPLATE\n *\tDO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN\n *\n *" + rdelim + "\n"
|
||||
tofilename.write(header)
|
||||
|
||||
for line in filename:
|
||||
newline = ''
|
||||
|
@ -190,13 +193,15 @@ def help(pname):
|
|||
path = ''
|
||||
|
||||
try:
|
||||
opts, args = getopt.getopt(sys.argv[1:], "hp:")
|
||||
opts, args = getopt.getopt(sys.argv[1:], "hp:", ['no-header'])
|
||||
for opt, arg in opts:
|
||||
if opt == '-h':
|
||||
help(sys.argv[0])
|
||||
sys.exit()
|
||||
elif opt == '-p':
|
||||
path = arg
|
||||
elif opt == '--no-header':
|
||||
addheader = False
|
||||
except getopt.GetoptError:
|
||||
help(sys.argv[0])
|
||||
sys.exit(2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue