[pLog-svn] r4935 - plog/branches/lifetype-1.2

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Fri Mar 2 15:11:38 EST 2007


Author: jondaley
Date: 2007-03-02 15:11:38 -0500 (Fri, 02 Mar 2007)
New Revision: 4935

Modified:
   plog/branches/lifetype-1.2/wizard.php
Log:
fixed typo in error message. drop tmp_users table when finished.  empty tmp_users table before starting, for backward compatibility.

Modified: plog/branches/lifetype-1.2/wizard.php
===================================================================
--- plog/branches/lifetype-1.2/wizard.php	2007-03-02 19:05:20 UTC (rev 4934)
+++ plog/branches/lifetype-1.2/wizard.php	2007-03-02 20:11:38 UTC (rev 4935)
@@ -1465,7 +1465,7 @@
 				$result = true;
 			}
 			else {
-				$this->message .= "Error modifying table $curTAble: ".$errorMessage;
+				$this->message .= "Error modifying table $curTable: ".$errorMessage;
 				$result = false;
 			}
 
@@ -1515,12 +1515,15 @@
 							$perm = new UserPermission( $row["user_id"], $row["blog_id"], $perm->getId());
 							$userPermissions->grantPermission( $perm );
 						}
-					}					
+					}
 				}
             }
-        
+      
             $this->message .= "{$this->updatedRecords} users updated (".$this->getPercentProcessed()."%)<br/>";
-            return true;        
+
+            $this->Execute("DROP TABLE ".Db::getPrefix()."tmp_users_permissions");
+
+            return true;
         }
     }
 
@@ -1564,6 +1567,10 @@
 			//
 			// prepare the users_permissions table for the next step
 			//
+
+            // make sure we are starting with an empty table
+            $this->Execute("DELETE FROM ".Db::getPrefix()."tmp_users_permissions");
+            
 			if( !$this->Execute( "INSERT INTO ".$this->dbPrefix."tmp_users_permissions SELECT * FROM ".$this->dbPrefix."users_permissions WHERE blog_id != 0 AND permission_id != 1" )) {
 				$this->message .= "Error preparing the users_permissions table for transformation";
 				$errors = true;



More information about the pLog-svn mailing list