Author: Jonathan.Wage
Date: 2010-02-23 17:20:52 +0100 (Tue, 23 Feb 2010)
New Revision: 28216

Modified:
   
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalMenuPlugin/lib/menu/sfSympalMenuSiteManager.class.php
   
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalPluginManagerPlugin/lib/task/sfSympalPluginInstallTask.class.php
   
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalPluginManagerPlugin/lib/task/sfSympalPluginUninstallTask.class.php
   
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalSearchPlugin/lib/sfSympalSearch.class.php
   plugins/sfSympalPlugin/trunk/test/bootstrap/cleanup.php
   
plugins/sfSympalPlugin/trunk/test/fixtures/project/config/ProjectConfiguration.class.php
   
plugins/sfSympalPlugin/trunk/test/fixtures/project/lib/form/BaseForm.class.php
   plugins/sfSympalPlugin/trunk/test/unit/PluginManager1Test.php
   plugins/sfSympalPlugin/trunk/test/unit/PluginManager2Test.php
Log:
[1.4][sfSympalPlugin][1.0] Manually merging commits from git


Modified: 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalMenuPlugin/lib/menu/sfSympalMenuSiteManager.class.php
===================================================================
--- 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalMenuPlugin/lib/menu/sfSympalMenuSiteManager.class.php
      2010-02-23 15:54:10 UTC (rev 28215)
+++ 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalMenuPlugin/lib/menu/sfSympalMenuSiteManager.class.php
      2010-02-23 16:20:52 UTC (rev 28216)
@@ -89,7 +89,7 @@
     $this->initialize();
   }
 
-  public static function getMenu($name, $showChildren = true, $class = null)
+  public static function getMenu($name, $showChildren = null, $class = null)
   {
     return self::getInstance()->_getMenu($name, $showChildren, $class);
   }
@@ -99,8 +99,12 @@
     return sfSympalConfig::get('menu_cache', 'enabled', true) ? 
sfSympalConfiguration::getActive()->getCache() : false;
   }
 
-  protected function _getMenu($name, $showChildren = true, $class = null)
+  protected function _getMenu($name, $showChildren = null, $class = null)
   {
+    if ($showChildren === null)
+    {
+      $showChildren = true;
+    }
     if (is_scalar($name) && isset($this->_rootSlugs[$name]))
     {
       $name = $this->_rootSlugs[$name];

Modified: 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalPluginManagerPlugin/lib/task/sfSympalPluginInstallTask.class.php
===================================================================
--- 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalPluginManagerPlugin/lib/task/sfSympalPluginInstallTask.class.php
   2010-02-23 15:54:10 UTC (rev 28215)
+++ 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalPluginManagerPlugin/lib/task/sfSympalPluginInstallTask.class.php
   2010-02-23 16:20:52 UTC (rev 28216)
@@ -34,7 +34,7 @@
       return 1;
     }
 
-    $this->createContext($this->configuration);
+    $databaseManager = new sfDatabaseManager($this->configuration);
     $pluginManager = 
sfSympalPluginManager::getActionInstance($arguments['name'], 'install', 
$this->configuration, $this->formatter);
     $pluginManager->install();
   }

Modified: 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalPluginManagerPlugin/lib/task/sfSympalPluginUninstallTask.class.php
===================================================================
--- 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalPluginManagerPlugin/lib/task/sfSympalPluginUninstallTask.class.php
 2010-02-23 15:54:10 UTC (rev 28215)
+++ 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalPluginManagerPlugin/lib/task/sfSympalPluginUninstallTask.class.php
 2010-02-23 16:20:52 UTC (rev 28216)
@@ -34,6 +34,7 @@
       return 1;
     }
 
+    $databaseManager = new sfDatabaseManager($this->configuration);
     $pluginManager = 
sfSympalPluginManager::getActionInstance($arguments['name'], 'uninstall', 
$this->configuration, $this->formatter);
     $pluginManager->uninstall($options['delete']);
   }

Modified: 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalSearchPlugin/lib/sfSympalSearch.class.php
===================================================================
--- 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalSearchPlugin/lib/sfSympalSearch.class.php
  2010-02-23 15:54:10 UTC (rev 28215)
+++ 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalSearchPlugin/lib/sfSympalSearch.class.php
  2010-02-23 16:20:52 UTC (rev 28216)
@@ -15,7 +15,7 @@
     return self::$_instance;
   }
 
-  private function _getIndex()
+  public function getIndex()
   {
     if (!$this->_index)
     {
@@ -39,7 +39,7 @@
 
   public function updateSearchIndex(Doctrine_Record $record)
   {
-    $index = $this->_getIndex();
+    $index = $this->getIndex();
 
     // remove existing entries
     foreach ($index->find('pk:'.$this->_getRecordSearchPrimaryKey($record)) as 
$hit)
@@ -70,7 +70,7 @@
 
   public function getDoctrineSearchQuery($model, $query)
   {
-    $hits = $this->_getIndex()->find((string) $query);
+    $hits = $this->getIndex()->find((string) $query);
 
     $pks = array();
     foreach ($hits as $hit)

Modified: plugins/sfSympalPlugin/trunk/test/bootstrap/cleanup.php
===================================================================
--- plugins/sfSympalPlugin/trunk/test/bootstrap/cleanup.php     2010-02-23 
15:54:10 UTC (rev 28215)
+++ plugins/sfSympalPlugin/trunk/test/bootstrap/cleanup.php     2010-02-23 
16:20:52 UTC (rev 28216)
@@ -6,7 +6,6 @@
   sfToolkit::clearDirectory(dirname(__FILE__).'/../fixtures/project/log');
 
   @unlink(dirname(__FILE__) . '/../fixtures/project/data/test.sqlite');
-  @unlink(dirname(__FILE__) . '/../fixtures/project/config/app.yml');
 }
 
 copy(dirname(__FILE__).'/../fixtures/project/data/fresh_test_db.sqlite', 
dirname(__FILE__).'/../fixtures/project/data/test.sqlite');

Modified: 
plugins/sfSympalPlugin/trunk/test/fixtures/project/config/ProjectConfiguration.class.php
===================================================================
--- 
plugins/sfSympalPlugin/trunk/test/fixtures/project/config/ProjectConfiguration.class.php
    2010-02-23 15:54:10 UTC (rev 28215)
+++ 
plugins/sfSympalPlugin/trunk/test/fixtures/project/config/ProjectConfiguration.class.php
    2010-02-23 16:20:52 UTC (rev 28216)
@@ -2,11 +2,6 @@
 
 if (!isset($_SERVER['SYMFONY']))
 {
-  $_SERVER['SYMFONY'] = '/Users/jwage/Sites/symfonysvn/1.4/lib';
-}
-
-if (!isset($_SERVER['SYMFONY']))
-{
   throw new RuntimeException('Could not find symfony core libraries.');
 }
 

Modified: 
plugins/sfSympalPlugin/trunk/test/fixtures/project/lib/form/BaseForm.class.php
===================================================================
--- 
plugins/sfSympalPlugin/trunk/test/fixtures/project/lib/form/BaseForm.class.php  
    2010-02-23 15:54:10 UTC (rev 28215)
+++ 
plugins/sfSympalPlugin/trunk/test/fixtures/project/lib/form/BaseForm.class.php  
    2010-02-23 16:20:52 UTC (rev 28216)
@@ -1,5 +1,13 @@
 <?php
 
+/**
+ * Base project form.
+ * 
+ * @package    elf-ekb.ru
+ * @subpackage form
+ * @author     Your name here 
+ * @version    SVN: $Id: BaseForm.class.php 20147 2009-07-13 11:46:57Z 
FabianLange $
+ */
 class BaseForm extends sfFormSymfony
 {
 }

Modified: plugins/sfSympalPlugin/trunk/test/unit/PluginManager1Test.php
===================================================================
--- plugins/sfSympalPlugin/trunk/test/unit/PluginManager1Test.php       
2010-02-23 15:54:10 UTC (rev 28215)
+++ plugins/sfSympalPlugin/trunk/test/unit/PluginManager1Test.php       
2010-02-23 16:20:52 UTC (rev 28216)
@@ -28,5 +28,5 @@
   $t->is(file_exists(sfConfig::get('sf_plugins_dir').'/'.$name), true, 'Test 
that the plugin exists and was downloaded');
 }
 
-downloadPlugin('sfSympalBlogPlugin', $t);
+downloadPlugin('sfSympalObjectReplacerPlugin', $t);
 generatePlugin('Event', 'Event', $t);
\ No newline at end of file

Modified: plugins/sfSympalPlugin/trunk/test/unit/PluginManager2Test.php
===================================================================
--- plugins/sfSympalPlugin/trunk/test/unit/PluginManager2Test.php       
2010-02-23 15:54:10 UTC (rev 28215)
+++ plugins/sfSympalPlugin/trunk/test/unit/PluginManager2Test.php       
2010-02-23 16:20:52 UTC (rev 28216)
@@ -3,7 +3,7 @@
 $app = 'sympal';
 require_once(dirname(__FILE__).'/../bootstrap/unit.php');
 
-$t = new lime_test(15, new lime_output_color());
+$t = new lime_test(25, new lime_output_color());
 
 $configuration->loadHelpers(array('I18N'));
 
@@ -27,19 +27,21 @@
   $t->is($menuItem instanceof sfSympalMenuItem, true, 'Test menu item to 
sample content list was created.');
 }
 
-function uninstallPlugin($name, $t)
+function uninstallPlugin($name, $t, $delete = true)
 {
   $manager = sfSympalPluginManager::getActionInstance($name, 'uninstall');
-  $manager->uninstall(true);
+  $manager->uninstall($delete);
 
-  $t->is(file_exists(sfConfig::get('sf_plugins_dir').'/'.$name), false, 'Test 
plugin was was deleted');
-  $t->is(file_exists(sfConfig::get('sf_lib_dir').'/model/doctrine/'.$name), 
false, 'Test plugin models were deleted');
-  $t->is(file_exists(sfConfig::get('sf_lib_dir').'/form/doctrine/'.$name), 
false, 'Test plugin forms were deleted');
-  $t->is(file_exists(sfConfig::get('sf_lib_dir').'/filter/doctrine/'.$name), 
false, 'Test plugin form filters were deleted');
-  $t->is(file_exists(sfConfig::get('sf_web_dir').'/'.$name), false, 'Test 
plugin assets symlink was removed');
+  $t->is(file_exists(sfConfig::get('sf_plugins_dir').'/'.$name), !$delete, 
'Test plugin was was deleted');
+  $t->is(file_exists(sfConfig::get('sf_lib_dir').'/model/doctrine/'.$name), 
!$delete, 'Test plugin models were deleted');
+  $t->is(file_exists(sfConfig::get('sf_lib_dir').'/form/doctrine/'.$name), 
!$delete, 'Test plugin forms were deleted');
+  $t->is(file_exists(sfConfig::get('sf_lib_dir').'/filter/doctrine/'.$name), 
!$delete, 'Test plugin form filters were deleted');
+  $t->is(file_exists(sfConfig::get('sf_web_dir').'/'.$name), !$delete, 'Test 
plugin assets symlink was removed');
 }
 
+uninstallPlugin('sfSympalBlogPlugin', $t, false);
 installPlugin('sfSympalBlogPlugin', $t);
 
 installPlugin('sfSympalEventPlugin', $t);
-uninstallPlugin('sfSympalEventPlugin', $t);
\ No newline at end of file
+uninstallPlugin('sfSympalEventPlugin', $t);
+uninstallPlugin('sfSympalObjectReplacerPlugin', $t);
\ 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