diff -urN saku-1.3.1/shingetsu/thread_cgi.py saku-1.3.1-withnum/shingetsu/thread_cgi.py
--- saku-1.3.1/shingetsu/thread_cgi.py 2006-03-08 01:57:30.000000000 +0900
+++ saku-1.3.1-withnum/shingetsu/thread_cgi.py 2006-03-08 02:01:18.000000000 +0900
@@ -118,6 +118,7 @@
def print_thread(self, path):
cache = Cache(self.file_encode("thread", path))
+ filesize = str(cache.size*10/1024/1024/10.0)
if cache.has_record():
pass
elif self.check_get_cache():
@@ -153,8 +154,8 @@
' %s%s\n' % (self.res_anchor(record[-1].id[:8]),
self.message["last_article"]))
self.stdout.write('
\n\n')
- for rec in record:
- self.print_record(cache, rec, access=access)
+ for num, rec in enumerate(record):
+ self.print_record(cache, num, rec, access=access)
self.stdout.write("
\n")
if record:
self.stdout.write(
@@ -162,13 +163,14 @@
'onclick="window.scroll(0,0); return false;" ' +
'onkeypress="window.scroll(0,0); return false;">' +
self.message["top_of_page"] + '' +
- ' (%s)\n' % path)
+ ' [%s (%s/%s%s)]\n' % (path, len(cache), filesize, self.message["mb"]))
self.print_form(cache)
self.menubar()
self.remove_file_form(cache)
self.footer()
- def print_record(self, cache, rec, access=0):
+ def print_record(self, cache, num, rec, access=0):
+ num = num + 1
stamp = self.localtime(rec["stamp"])
if ("name" in rec) and (rec["name"] != ""):
name = rec["name"]
@@ -226,8 +228,11 @@
else:
newid = ""
sid = rec["id"][:8]
+ if self.isadmin:
+ self.stdout.write('[%s] ' % num)
+ self.stdout.write(
+ '%s\n' % (sid, newid, sid))
self.stdout.write(
- '%s\n' % (sid, newid, sid) +
' ' + name + "" +
mail + sign + "\n" +
' ' + stamp + "\n" +