fixed bug when duplicating an entry
This commit is contained in:
@@ -124,7 +124,7 @@ def update_entry(request, blog_id, new_values):
|
||||
if blog_id == '0':
|
||||
query = """INSERT INTO entries (title, body, created, edited, topic_id, tag, author, status, creator, editor)
|
||||
VALUES ('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{8}')""".format(
|
||||
new_values['title'], new_values['body'], new_values['created'], new_values['created'],
|
||||
new_values['title'].replace("'","''"), new_values['body'].replace("'","''"), new_values['created'], new_values['created'],
|
||||
new_values['topic_id'], new_values['tag'], new_values['author'], new_values['status'],
|
||||
new_values['editor'], new_values['editor'],)
|
||||
else:
|
||||
@@ -160,7 +160,7 @@ def update_topic(request, topic, new_values):
|
||||
|
||||
if topic == '0':
|
||||
query = "INSERT INTO topics (topic, topic_name, topic_quote) VALUES ('{0}', '{1}', '{2}')".format(
|
||||
topic, new_values['topic_name'], new_values['topic_quote'])
|
||||
topic, new_values['topic_name'], new_values['topic_quote'].replace("'","''"))
|
||||
else:
|
||||
new_values['topic'] = topic
|
||||
query = "UPDATE topics SET %s WHERE topic = :topic;" % s
|
||||
|
||||
2
cao_sunyata/static/css/styles.min.css
vendored
2
cao_sunyata/static/css/styles.min.css
vendored
@@ -16566,7 +16566,7 @@ textarea.form-control-lg {
|
||||
|
||||
#sidebarnav li {
|
||||
list-style: none;
|
||||
padding-left: 0;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.sidebar-nav ul .sidebar-item .sidebar-link {
|
||||
|
||||
@@ -117,7 +117,7 @@ def blog_edit(request):
|
||||
if 'form.deleted' in request.params:
|
||||
delete_entry(request, blog_id)
|
||||
request.session.flash("La page a été supprimée avec succès.", 'success')
|
||||
return HTTPFound(location=url_retour)
|
||||
return HTTPFound(location=request.route_url('topic', topic=topic))
|
||||
|
||||
return {
|
||||
'page_title': page_title,
|
||||
|
||||
Reference in New Issue
Block a user