[cpif] r157 - trunk/frontend-web

svn at argo.es svn at argo.es
Fri Jun 15 23:17:46 CEST 2007


Author: alvaro
Date: Fri Jun 15 23:17:45 2007
New Revision: 157

Log:
Bigfux


Modified:
   trunk/frontend-web/skins.py

Modified: trunk/frontend-web/skins.py
==============================================================================
--- trunk/frontend-web/skins.py	(original)
+++ trunk/frontend-web/skins.py	Fri Jun 15 23:17:45 2007
@@ -130,12 +130,14 @@
         aux.append(available_skins[self._skin]['thread_first'] % {'link': '/hilo/%d' % thread_num})
       aux.append(available_skins[self._skin]['thread_prev'] % {'link': '/hilo/%d/%d' % (thread_num,first_post-thread_len)})
     
-    curr = (first_post / thread_len) + 1
-    for i in range(curr-2,curr+3):
-      if i==curr:
-        aux.append(available_skins[self._skin]['thread_num_inactive'] % {'num': curr})
-      elif i>0 and i <= num_msgs/thread_len+1:
-        aux.append(available_skins[self._skin]['thread_num'] % {'link': '/hilo/%d/%d' % (thread_num,(i-1)*thread_len+1), 'num':i})
+    curr = first_post
+
+    for i in range(-2,2):
+      curr = first_post + i*thread_len
+      if first_post==curr:
+        aux.append(available_skins[self._skin]['thread_num_inactive'] % {'num': first_post/thread_len +1})
+      elif curr > 0 and curr <= num_msgs:
+        aux.append(available_skins[self._skin]['thread_num'] % {'link': '/hilo/%d/%d' % (thread_num,curr), 'num': curr / thread_len +1})
 
     if first_post + thread_len <= num_msgs:
       aux.append(available_skins[self._skin]['thread_next'] % {'link': '/hilo/%d/%d' % (thread_num,first_post+thread_len)})



More information about the cpif mailing list