Author: david
Date: Fri May  4 13:37:14 2012
New Revision: 11637

Log:
Move getInitalVersion() code into main

Modified:
   trunk/lib/task/migrate/arUpgradeSqlTask.class.php

Modified: trunk/lib/task/migrate/arUpgradeSqlTask.class.php
==============================================================================
--- trunk/lib/task/migrate/arUpgradeSqlTask.class.php   Fri May  4 13:35:46 
2012        (r11636)
+++ trunk/lib/task/migrate/arUpgradeSqlTask.class.php   Fri May  4 13:37:14 
2012        (r11637)
@@ -64,9 +64,13 @@
   {
     $dbManager = new sfDatabaseManager($this->configuration);
     $database = $dbManager->getDatabase($options['connection']);
-   // $conn = $database->getConnection();
 
-    $this->getInitialVersion();
+    // Get initial version
+    $sql = 'SELECT value AS version
+      FROM setting JOIN setting_i18n ON setting.id = setting_i18n.id
+      WHERE name="version";';
+
+    $this->initialVersion = QubitPdo::fetchColumn($sql);
 
     // A bug in the migration script for Release 1.1 left the version="62"
     // instead of "75", so we need to check if the user is upgrading from 1.1
@@ -115,15 +119,6 @@
     $this->logSection('upgrade-sql', sprintf('Upgrading from version %s', 
$this->initialVersion));
   }
 
-  protected function getInitialVersion()
-  {
-    $sql = 'SELECT value AS version
-      FROM setting JOIN setting_i18n ON setting.id = setting_i18n.id
-      WHERE name="version";';
-
-    $this->initialVersion = QubitPdo::fetchColumn($sql);
-  }
-
   protected function parseDsn($dsn)
   {
     $params = array(

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to