[cpif] r400 - trunk/backend

svn at argo.es svn at argo.es
Wed Oct 17 16:45:39 CEST 2007


Author: jcea
Date: Wed Oct 17 16:45:35 2007
New Revision: 400

Log:
Estetica...

Modified:
   trunk/backend/database.py
   trunk/backend/upgrade.py

Modified: trunk/backend/database.py
==============================================================================
--- trunk/backend/database.py	(original)
+++ trunk/backend/database.py	Wed Oct 17 16:45:35 2007
@@ -1,7 +1,7 @@
 # $Id$
 
 
-VERSION_DB="2007101504"
+VERSION_DB="2007101701"
 
 import globales
 

Modified: trunk/backend/upgrade.py
==============================================================================
--- trunk/backend/upgrade.py	(original)
+++ trunk/backend/upgrade.py	Wed Oct 17 16:45:35 2007
@@ -458,3 +458,21 @@
 
     conn.commit()
 
+  if root["version del foro"]=="2007101701" :
+    print "Actualizando la base de datos: 2007101504 -> 2007101701"
+    root["version del foro"]="2007101701"
+
+    import database
+    for nick,usuario in root["usuarios"]["usuarios"].items() :
+      metatag_privado=usuario["metatag_privado"]
+      for dummy,hilo in root["metatags"]["metatags"][metatag_privado]["TS2hilo"].values() :
+        while hilo["titulo"][0]=="[" :
+          hilo["titulo"]=hilo["titulo"][hilo["titulo"].index("]")+2:]
+    for nick,usuario in root["usuarios"]["usuarios"].items() :
+      metatag_privado=usuario["metatag_privado"]
+      for dummy,hilo in root["metatags"]["metatags"][metatag_privado]["TS2hilo"].values() :
+        if nick!=database.normaliza_nick(hilo["creador"]) :
+          hilo["titulo"]="[%s] %s" %(usuario["nick"],hilo["titulo"])
+
+    conn.commit()
+



More information about the cpif mailing list