Author: Jonathan.Wage
Date: 2010-02-12 19:36:56 +0100 (Fri, 12 Feb 2010)
New Revision: 27962
Modified:
plugins/sfSympalPlugin/trunk/lib/model/doctrine/PluginsfSympalContent.class.php
plugins/sfSympalPlugin/trunk/lib/model/doctrine/PluginsfSympalContentSlot.class.php
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalInstallPlugin/lib/task/sfSympalInstallTask.class.php
plugins/sfSympalPlugin/trunk/lib/sfSympalConfiguration.class.php
Log:
[1.4][sfSympalPlugin][1.0] Trying out fix for issue where context needs to
exist for install
Modified:
plugins/sfSympalPlugin/trunk/lib/model/doctrine/PluginsfSympalContent.class.php
===================================================================
---
plugins/sfSympalPlugin/trunk/lib/model/doctrine/PluginsfSympalContent.class.php
2010-02-12 17:52:55 UTC (rev 27961)
+++
plugins/sfSympalPlugin/trunk/lib/model/doctrine/PluginsfSympalContent.class.php
2010-02-12 18:36:56 UTC (rev 27962)
@@ -766,20 +766,27 @@
public function getSearchData()
{
$searchData = array();
- $data = $this->toArray(false);
- foreach ($data as $key => $value)
+ $clone = clone $this;
+ $data = $clone->toArray(false);
+ if ($data)
{
- if (is_scalar($value))
+ foreach ($data as $key => $value)
{
- $searchData[$key] = $value;
+ if (is_scalar($value))
+ {
+ $searchData[$key] = $value;
+ }
}
}
- $data = $this->getRecord()->toArray(false);
- foreach ($data as $key => $value)
+ $data = $clone->getRecord()->toArray(false);
+ if ($data)
{
- if (is_scalar($value))
+ foreach ($data as $key => $value)
{
- $searchData[$key] = $value;
+ if (is_scalar($value))
+ {
+ $searchData[$key] = $value;
+ }
}
}
foreach ($this->getSlots() as $slot)
Modified:
plugins/sfSympalPlugin/trunk/lib/model/doctrine/PluginsfSympalContentSlot.class.php
===================================================================
---
plugins/sfSympalPlugin/trunk/lib/model/doctrine/PluginsfSympalContentSlot.class.php
2010-02-12 17:52:55 UTC (rev 27961)
+++
plugins/sfSympalPlugin/trunk/lib/model/doctrine/PluginsfSympalContentSlot.class.php
2010-02-12 18:36:56 UTC (rev 27962)
@@ -156,7 +156,7 @@
$value = $this->getValue();
}
- if (sfSympalContext::getInstance()->shouldLoadFrontendEditor() && !$value)
+ if (sfSympalContext::hasInstance() &&
sfSympalContext::getInstance()->shouldLoadFrontendEditor() && !$value)
{
$rawValue = __($this->getDefaultValue());
}
Modified:
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalInstallPlugin/lib/task/sfSympalInstallTask.class.php
===================================================================
---
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalInstallPlugin/lib/task/sfSympalInstallTask.class.php
2010-02-12 17:52:55 UTC (rev 27961)
+++
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalInstallPlugin/lib/task/sfSympalInstallTask.class.php
2010-02-12 18:36:56 UTC (rev 27962)
@@ -1,6 +1,6 @@
<?php
-class sfSympalInstallTask extends sfTaskExtraBaseTask
+class sfSympalInstallTask extends sfSympalBaseTask
{
protected function configure()
{
@@ -48,7 +48,7 @@
*/
protected function execute($arguments = array(), $options = array())
{
- $databaseManager = new sfDatabaseManager($this->configuration);
+ $this->createContext($this->configuration);
$install = new sfSympalInstall($this->configuration, $this->dispatcher,
$this->formatter);
$install->setApplication($arguments['application']);
Modified: plugins/sfSympalPlugin/trunk/lib/sfSympalConfiguration.class.php
===================================================================
--- plugins/sfSympalPlugin/trunk/lib/sfSympalConfiguration.class.php
2010-02-12 17:52:55 UTC (rev 27961)
+++ plugins/sfSympalPlugin/trunk/lib/sfSympalConfiguration.class.php
2010-02-12 18:36:56 UTC (rev 27962)
@@ -553,6 +553,11 @@
*/
private function _checkInstalled()
{
+ // Don't run this if we are under the cli
+ if (PHP_SAPI == 'cli')
+ {
+ return;
+ }
$sfContext = sfContext::getInstance();
$request = $sfContext->getRequest();
--
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.