[cpif] r399 - trunk/backend

svn at argo.es svn at argo.es
Wed Oct 17 16:30:42 CEST 2007


Author: jcea
Date: Wed Oct 17 16:30:36 2007
New Revision: 399

Log:


Modified:
   trunk/backend/upgrade.py

Modified: trunk/backend/upgrade.py
==============================================================================
--- trunk/backend/upgrade.py	(original)
+++ trunk/backend/upgrade.py	Wed Oct 17 16:30:36 2007
@@ -431,6 +431,21 @@
 
     conn.commit()
 
+  if root["version del foro"]=="2007101502" :
+    print "Actualizando la base de datos: 2007101502 -> 2007101503"
+    root["version del foro"]="2007101503"
+
+    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:]
+        if nick!=database.normaliza_nick(hilo["creador"]) :
+          hilo["titulo"]="[%s] %s" %(usuario["nick"],hilo["titulo"])
+
+    conn.commit()
+
   if root["version del foro"]=="2007101503" :
     print "Actualizando la base de datos: 2007101503 -> 2007101504"
     root["version del foro"]="2007101504"



More information about the cpif mailing list