Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Anderson <tony@traveler.(none)>2011-01-19 07:47:49 (GMT)
committer Tony Anderson <tony@traveler.(none)>2011-01-19 07:47:49 (GMT)
commit4d08808156d3ece2c76811fa885b0b30f0433d92 (patch)
tree5b03704991d8601239b7815bcd29fe3fc1ed76ef
parent47ff762667a2601d423c7e6a75ddb96a7d3d5f9d (diff)
version 11.11
-rwxr-xr-xactivity/activity.info2
-rwxr-xr-xcgi-bin/fetchFile.py5
-rwxr-xr-xcgi-bin/getFile.py3
-rwxr-xr-xcgi-bin/return.py13
-rwxr-xr-xcgi-bin/saveFile.py4
5 files changed, 4 insertions, 23 deletions
diff --git a/activity/activity.info b/activity/activity.info
index 0343a0a..ec26b17 100755
--- a/activity/activity.info
+++ b/activity/activity.info
@@ -1,5 +1,5 @@
[Activity]
-#version = 11.10
+#version = 11.11
name = Learn
service_name = org.olerwanda.Learn
icon = activity-learn
diff --git a/cgi-bin/fetchFile.py b/cgi-bin/fetchFile.py
index ca6d874..295d427 100755
--- a/cgi-bin/fetchFile.py
+++ b/cgi-bin/fetchFile.py
@@ -7,9 +7,8 @@ from path import path
cgitb.enable(display=True)
print 'Content-Type:text/html\n\n'
log = open('/tmp/fetchlog','w')
-fin = open('/tmp/openfile','r')
-f = fin.read()
-fin.close()
+form = cgi.FieldStorage()
+f = form.getfirst('openfile', default='none given')
fpth = path(f)
print >> log, 'f=', fpth
srcpth = fpth.parent
diff --git a/cgi-bin/getFile.py b/cgi-bin/getFile.py
index 98b8aa3..64da1c1 100755
--- a/cgi-bin/getFile.py
+++ b/cgi-bin/getFile.py
@@ -10,9 +10,6 @@ print 'Content-Type:text/html\n\n'
form = cgi.FieldStorage()
f = form.getfirst('filename', default='none given')
print >> log, 'f', f
-fout = open('/tmp/openfile','w')
-fout.write(f)
-fout.close()
fin = open(f, 'r')
txt = fin.read()
fin.close()
diff --git a/cgi-bin/return.py b/cgi-bin/return.py
deleted file mode 100755
index d2cbae2..0000000
--- a/cgi-bin/return.py
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/python
-import sys, subprocess
-import cgi, cgitb
-from path import path
-
-cgitb.enable(display=True)
-print 'Content-Type:text/html\n\n'
-form = cgi.FieldStorage()
-fin = open('/tmp/openfile','r')
-f = fin.read()
-fin.close()
-fpth = path(f).parent
-print fpth
diff --git a/cgi-bin/saveFile.py b/cgi-bin/saveFile.py
index 8df1050..5238278 100755
--- a/cgi-bin/saveFile.py
+++ b/cgi-bin/saveFile.py
@@ -174,9 +174,7 @@ cgitb.enable(display=True)
print 'Content-Type:text/html\n\n'
log = open('/tmp/logs','w')
form = cgi.FieldStorage()
-fin = open('/tmp/openfile','r')
-f = fin.read()
-fin.close()
+f = form.getfirst('openfile', default="")
fpth = path(f).parent
savepth = fpth / 'source.txt'
txt = form.getfirst('content', default='no text found')