Author: tonio
Date: 2010-03-11 18:30:46 +0100 (Thu, 11 Mar 2010)
New Revision: 28487

Modified:
   plugins/sfMapFishPlugin/branches/1.4/README
   
plugins/sfMapFishPlugin/branches/1.4/config/sfMapFishPluginConfiguration.class.php
   
plugins/sfMapFishPlugin/branches/1.4/data/generator/sfMapFishModule/default/parts/createAction.php
   
plugins/sfMapFishPlugin/branches/1.4/data/generator/sfMapFishModule/default/parts/updateAction.php
   
plugins/sfMapFishPlugin/branches/1.4/modules/mfPrint/actions/actions.class.php
Log:
[sfMapFishPlugin] small fixes for 1.4 better compatibility

Modified: plugins/sfMapFishPlugin/branches/1.4/README
===================================================================
--- plugins/sfMapFishPlugin/branches/1.4/README 2010-03-11 16:25:19 UTC (rev 
28486)
+++ plugins/sfMapFishPlugin/branches/1.4/README 2010-03-11 17:30:46 UTC (rev 
28487)
@@ -10,15 +10,16 @@
 
   * Install the plugin
 
-        $ symfony plugin:install sfMapFishPlugin
+        $ ./symfony plugin:install sfMapFishPlugin
 
   * Clear the cache
 
-        $ symfony cache:clear
+        $ ./symfony cache:clear
 
-  * Build (or rebuild the model) 
+  * Build (or rebuild) the model and the forms 
 
-        $ symfony doctrine:build-model
+        $ ./symfony doctrine:build-model
+        $ ./symfony doctrine:build-forms
         
     At this step, your geometry column should be set as a blob in your schema.
     
@@ -44,10 +45,11 @@
         [php]
         YourModelTable extends sfMapFishTable
         
-  * Unset the geometric column from the configure method of the form in 
lib/form/doctrine/YourModelForm.class.php:
+  * Unset the geometric column from the configure method of the form in 
lib/form/doctrine/YourModelForm.class.php, and don't forget to disable the CSRF 
protection on it:
 
         [php]
         unset($this['the_geom']);
+        $this->disableCSRFProtection();
         
   * You're now ready to generate a MapFish module tied to this Model, by the 
way of the mapfish:generate-module built-in task:
   

Modified: 
plugins/sfMapFishPlugin/branches/1.4/config/sfMapFishPluginConfiguration.class.php
===================================================================
--- 
plugins/sfMapFishPlugin/branches/1.4/config/sfMapFishPluginConfiguration.class.php
  2010-03-11 16:25:19 UTC (rev 28486)
+++ 
plugins/sfMapFishPlugin/branches/1.4/config/sfMapFishPluginConfiguration.class.php
  2010-03-11 17:30:46 UTC (rev 28487)
@@ -57,14 +57,6 @@
 
   static public function listenToMethodNotFound(sfEvent $event)
   {
-    /**
-     * retrieve raw post data
-     */
-    if ($event['method']==='getRawBody')
-    {
-      $event->setProcessed(true);
-      $event->setReturnValue(file_get_contents('php://input'));
-    }
 
     /**
      * remove parameter from request parameterHolder

Modified: 
plugins/sfMapFishPlugin/branches/1.4/data/generator/sfMapFishModule/default/parts/createAction.php
===================================================================
--- 
plugins/sfMapFishPlugin/branches/1.4/data/generator/sfMapFishModule/default/parts/createAction.php
  2010-03-11 16:25:19 UTC (rev 28486)
+++ 
plugins/sfMapFishPlugin/branches/1.4/data/generator/sfMapFishModule/default/parts/createAction.php
  2010-03-11 17:30:46 UTC (rev 28487)
@@ -7,7 +7,7 @@
 ';?>
   public function executeCreate(sfWebRequest $request)
   {
-    $features = GeoJSON::load($request->getRawBody());
+    $features = GeoJSON::load($request->getContent());
 
     $c = Doctrine_Manager::getInstance()->getCurrentConnection();
     $c->beginTransaction();

Modified: 
plugins/sfMapFishPlugin/branches/1.4/data/generator/sfMapFishModule/default/parts/updateAction.php
===================================================================
--- 
plugins/sfMapFishPlugin/branches/1.4/data/generator/sfMapFishModule/default/parts/updateAction.php
  2010-03-11 16:25:19 UTC (rev 28486)
+++ 
plugins/sfMapFishPlugin/branches/1.4/data/generator/sfMapFishModule/default/parts/updateAction.php
  2010-03-11 17:30:46 UTC (rev 28487)
@@ -9,7 +9,7 @@
   {
     $form = new <?php echo $this->getModelClass().'Form' 
?>($this->getRoute()->getObject());
 
-    if ($feature = $this->processForm(GeoJSON::load($request->getRawBody()), 
$form))
+    if ($feature = $this->processForm(GeoJSON::load($request->getContent()), 
$form))
     {
       return $this->renderJSON(GeoJSON::dump($feature), 201);
     }

Modified: 
plugins/sfMapFishPlugin/branches/1.4/modules/mfPrint/actions/actions.class.php
===================================================================
--- 
plugins/sfMapFishPlugin/branches/1.4/modules/mfPrint/actions/actions.class.php  
    2010-03-11 16:25:19 UTC (rev 28486)
+++ 
plugins/sfMapFishPlugin/branches/1.4/modules/mfPrint/actions/actions.class.php  
    2010-03-11 17:30:46 UTC (rev 28487)
@@ -124,7 +124,7 @@
       ' --config="%s" --clientConfig --verbose=0';
     $cmd = sprintf($pattern, $this->_java_bin, $this->jarPath, 
$this->configPath);
     $stdout = $stderr = array();
-    $return = $this->mycmd_exec($cmd, $request->getRawBody(), $stdout, 
$stderr);
+    $return = $this->mycmd_exec($cmd, $request->getContent(), $stdout, 
$stderr);
 
     $this->forward404unless($return == 0);
 
@@ -148,7 +148,7 @@
 
     $stdout = $stderr =array();
     
-    $return = $this->mycmd_exec($cmd, $request->getRawBody(), $stdout, 
$stderr);
+    $return = $this->mycmd_exec($cmd, $request->getContent(), $stdout, 
$stderr);
 
     $this->forward404unless($return == 0);
     

-- 
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