Completed
Push — master ( e1b058...7862a4 )
by Andreas
08:15
created
lib/midcom/helper/datamanager2/controller/create.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -113,11 +113,11 @@  discard block
 block discarded – undo
113 113
         {
114 114
             throw new midcom_error('You must set a schema database before initializing midcom_helper_datamanager2_controller_create.');
115 115
         }
116
-        if (! is_object($this->callback_object))
116
+        if (!is_object($this->callback_object))
117 117
         {
118 118
             throw new midcom_error('You must set a valid callback_object prior initialization: Object is undefined.');
119 119
         }
120
-        if (! method_exists($this->callback_object, $this->callback_method))
120
+        if (!method_exists($this->callback_object, $this->callback_method))
121 121
         {
122 122
             throw new midcom_error("You must set a valid callback_object prior initialization: Method {$this->callback_method} is undefined.");
123 123
         }
@@ -280,11 +280,11 @@  discard block
 block discarded – undo
280 280
         // Do the actual I/O
281 281
         $result = $this->formmanager->process_form();
282 282
 
283
-        if (   $result == 'save'
283
+        if ($result == 'save'
284 284
             || $result == 'next')
285 285
         {
286 286
             // Ok, we can save now. At this point we already have a content object.
287
-            if (! $this->datamanager->validate())
287
+            if (!$this->datamanager->validate())
288 288
             {
289 289
                 // In case that the type validation fails, we return to edit mode
290 290
                 foreach ($this->datamanager->validation_errors as $field => $error)
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
                     $this->formmanager->form->setElementError($field, $error);
293 293
                 }
294 294
 
295
-                if (   $this->datamanager->storage->object
295
+                if ($this->datamanager->storage->object
296 296
                     && $this->datamanager->storage->object->guid)
297 297
                 {
298 298
                     $this->datamanager->storage->object->delete();
@@ -300,8 +300,8 @@  discard block
 block discarded – undo
300 300
                 return 'edit';
301 301
             }
302 302
 
303
-            if (   $result == 'save'
304
-                && ! $this->datamanager->save())
303
+            if ($result == 'save'
304
+                && !$this->datamanager->save())
305 305
             {
306 306
                 // Get the error message
307 307
                 $midgard_error = midcom_connection::get_error_string();
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
         }
316 316
 
317 317
         // While editing, we keep any temporary storage object known.
318
-        if (   $result != 'save'
318
+        if ($result != 'save'
319 319
             && $result != 'cancel'
320 320
             && $this->datamanager->storage->object)
321 321
         {
Please login to merge, or discard this patch.