about summary refs log tree commit diff
path: root/wqflask/wqflask/docs.py
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/wqflask/docs.py')
-rw-r--r--wqflask/wqflask/docs.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/wqflask/wqflask/docs.py b/wqflask/wqflask/docs.py
index a8363a1f..9777f170 100644
--- a/wqflask/wqflask/docs.py
+++ b/wqflask/wqflask/docs.py
@@ -2,6 +2,9 @@ from __future__ import absolute_import, print_function, division
 
 from flask import g
 
+from utility.logger import getLogger
+logger = getLogger(__name__)
+
 class Docs(object):
 
     def __init__(self, entry):
@@ -14,3 +17,11 @@ class Docs(object):
         self.entry = entry
         self.title = result[0]
         self.content = result[1]
+
+def update_text(start_vars):
+    content = start_vars['ckcontent']
+    content = content.replace('%', '%%').replace('"', '\\"').replace("'", "\\'")
+
+    sql = "UPDATE Docs SET content='{0}' WHERE entry='{1}';".format(content, start_vars['entry_type'])
+
+    g.db.execute(sql)
\ No newline at end of file