Author: Jonathan.Wage
Date: 2010-01-31 17:06:49 +0100 (Sun, 31 Jan 2010)
New Revision: 27354

Modified:
   
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalUpgradePlugin/lib/task/sfSympalUpgradeTask.class.php
   
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalUpgradePlugin/lib/versions/0.7.0__1.php
   
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalUpgradePlugin/lib/versions/0.7.0__2.php
Log:
[1.4][sfSympalPlugin][1.0] Fixing indention of upgrade code


Modified: 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalUpgradePlugin/lib/task/sfSympalUpgradeTask.class.php
===================================================================
--- 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalUpgradePlugin/lib/task/sfSympalUpgradeTask.class.php
       2010-01-31 16:05:45 UTC (rev 27353)
+++ 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalUpgradePlugin/lib/task/sfSympalUpgradeTask.class.php
       2010-01-31 16:06:49 UTC (rev 27354)
@@ -28,6 +28,8 @@
    */
   protected function execute($arguments = array(), $options = array())
   {
+    $databaseManager = new sfDatabaseManager($this->configuration);
+
     if (isset($options['download-new']) && $options['download-new'])
     {
       $upgrade = new sfSympalUpgradeFromWeb($this->configuration, 
$this->dispatcher, $this->formatter);

Modified: 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalUpgradePlugin/lib/versions/0.7.0__1.php
===================================================================
--- 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalUpgradePlugin/lib/versions/0.7.0__1.php
    2010-01-31 16:05:45 UTC (rev 27353)
+++ 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalUpgradePlugin/lib/versions/0.7.0__1.php
    2010-01-31 16:06:49 UTC (rev 27354)
@@ -4,12 +4,12 @@
 {
   public function _doUpgrade()
   {
-      $this->logSection('sympal', 'Removing BaseFormDoctrineSympal 
inheritance');
+    $this->logSection('sympal', 'Removing BaseFormDoctrineSympal inheritance');
 
-      $find = 'abstract class BaseFormDoctrine extends BaseFormDoctrineSympal';
-      $replace = 'abstract class BaseFormDoctrine extends sfFormDoctrine';
+    $find = 'abstract class BaseFormDoctrine extends BaseFormDoctrineSympal';
+    $replace = 'abstract class BaseFormDoctrine extends sfFormDoctrine';
 
-      $path = 
sfConfig::get('sf_lib_dir').'/form/doctrine/BaseFormDoctrine.class.php';
-      file_put_contents($path, str_replace($find, $replace, 
file_get_contents($path)));
+    $path = 
sfConfig::get('sf_lib_dir').'/form/doctrine/BaseFormDoctrine.class.php';
+    file_put_contents($path, str_replace($find, $replace, 
file_get_contents($path)));
   }
 }
\ No newline at end of file

Modified: 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalUpgradePlugin/lib/versions/0.7.0__2.php
===================================================================
--- 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalUpgradePlugin/lib/versions/0.7.0__2.php
    2010-01-31 16:05:45 UTC (rev 27353)
+++ 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalUpgradePlugin/lib/versions/0.7.0__2.php
    2010-01-31 16:06:49 UTC (rev 27354)
@@ -4,26 +4,26 @@
 {
   public function _doUpgrade()
   {
-      $this->logSection('sympal', 'Migrating sfSympalUserPlugin to 
sfDoctrineGuardPlugin');
+    $this->logSection('sympal', 'Migrating sfSympalUserPlugin to 
sfDoctrineGuardPlugin');
 
-      $files = 
$this->_getFinder('file')->in($this->_getProjectClassDirectories());
+    $files = 
$this->_getFinder('file')->in($this->_getProjectClassDirectories());
 
-      foreach ($files as $file)
-      {
-        $contents = file_get_contents($file);
-        $changed = false;
+    foreach ($files as $file)
+    {
+      $contents = file_get_contents($file);
+      $changed = false;
 
-        $contents = str_replace("::getTable('sfSympalUser')", 
"::getTable('sfGuardUser')", $contents, $count);
-        $changed = $count || $changed;
+      $contents = str_replace("::getTable('sfSympalUser')", 
"::getTable('sfGuardUser')", $contents, $count);
+      $changed = $count || $changed;
 
-        $contents = str_replace('::getTable("User")', 
"::getTable('sfGuardUser')", $contents, $count);
-        $changed = $count || $changed;
+      $contents = str_replace('::getTable("User")', 
"::getTable('sfGuardUser')", $contents, $count);
+      $changed = $count || $changed;
 
-        if ($changed)
-        {
-          $this->logSection('sympal', 'Migrating '.$file);
-          file_put_contents($file, $contents);
-        }
+      if ($changed)
+      {
+        $this->logSection('sympal', 'Migrating '.$file);
+        file_put_contents($file, $contents);
       }
+    }
   }
 }
\ No newline at end of file

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" 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/symfony-svn?hl=en.

Reply via email to