fixed problem with admin replacing text, thanks Niphlod

This commit is contained in:
mdipierro
2013-07-02 07:40:00 -05:00
parent 182bbbdcc2
commit 9ebab678c6
4 changed files with 4 additions and 30 deletions

View File

@@ -1 +1 @@
Version 2.6.0-development+timestamp.2013.07.02.07.20.31
Version 2.6.0-development+timestamp.2013.07.02.07.39.15

View File

@@ -458,32 +458,6 @@ def remove_compiled_app():
redirect(URL('site'))
def delete():
""" Object delete handler """
app = get_app()
filename = '/'.join(request.args)
sender = request.vars.sender
if isinstance(sender, list): # ## fix a problem with Vista
sender = sender[0]
if 'nodelete' in request.vars:
redirect(URL(sender, anchor=request.vars.id))
elif 'delete' in request.vars:
try:
full_path = apath(filename, r=request)
lineno = count_lines(open(full_path, 'r').read())
os.unlink(full_path)
log_progress(app, 'DELETE', filename, progress=-lineno)
session.flash = T('file "%(filename)s" deleted',
dict(filename=filename))
except Exception:
session.flash = T('unable to delete file "%(filename)s"',
dict(filename=filename))
redirect(URL(sender, anchor=request.vars.id2))
return dict(filename=filename, sender=sender)
def delete():
""" Object delete handler """
app = get_app()

View File

@@ -232,8 +232,8 @@ function load_file (url) {
if (typeof(json['plain_html']) !== undefined) {
if (jQuery('#' + json['id']).length === 0 || json['force'] === true) {
// Create a tab and put the code in it
var tab_header = '<li><a href="#idDefault" data-toggle="tab">filenameDefault<button type="button" class="close">&times;</button></a></li>'.replace(/idDefault/, json['id']).replace(/filenameDefault/, json['filename'] );
var tab_body = '<div id="idDefault" class="tab-pane fade in " >htmlDefault</div>'.replace(/htmlDefault/, json['plain_html']).replace(/idDefault/, json['id']);
var tab_header = '<li><a href="#'+json['id']+'" data-toggle="tab">'+json['filename']+'<button type="button" class="close">&times;</button></a></li>';
var tab_body = '<div id="' + json['id'] + '" class="tab-pane fade in " >' + json['plain_html'] + '</div>';
if (json['force'] === false) {
jQuery('#filesTab').append(jQuery(tab_header));
jQuery('#myTabContent').append(jQuery(tab_body));

View File

@@ -377,7 +377,7 @@ def check_new_version(myversion, version_URL):
version = urlopen(version_URL).read()
pversion = parse_version(version)
pmyversion = parse_version(myversion)
except Exception,e:
except IOError:
import traceback
print traceback.format_exc()
return -1, myversion