Completed
Branch master (4f76a2)
by Andreas
22:32
created
lib/midcom/admin/rcs/style/midcom-admin-rcs-preview.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 <?php
10 10
 foreach ($data['preview'] as $attribute => $value) {
11 11
     // Three fold fallback in localization
12
-    echo "<dt>". $data['handler']->translate($attribute) ."</dt>\n";
12
+    echo "<dt>" . $data['handler']->translate($attribute) . "</dt>\n";
13 13
     echo "    <dd>" . nl2br($value) . "</dd>\n";
14 14
 }
15 15
 ?>
Please login to merge, or discard this patch.
lib/midcom/admin/rcs/style/midcom-admin-rcs-diff.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,14 +9,14 @@
 block discarded – undo
9 9
 <dl class="midcom_services_rcs_diff">
10 10
 <?php
11 11
 foreach ($data['diff'] as $attribute => $values) {
12
-    echo "<dt>". $data['handler']->translate($attribute) ."</dt>\n";
12
+    echo "<dt>" . $data['handler']->translate($attribute) . "</dt>\n";
13 13
     echo "    <dd>\n";
14 14
     echo $values['diff'];
15 15
     echo "    </dd>\n";
16 16
 }
17 17
 
18 18
 if (!$data['diff']) {
19
-    echo "<dt>". $data['l10n']->get('no changes in content') ."</dt>\n";
19
+    echo "<dt>" . $data['l10n']->get('no changes in content') . "</dt>\n";
20 20
 }
21 21
 ?>
22 22
 </dl>
23 23
\ No newline at end of file
Please login to merge, or discard this patch.
lib/midcom/services/rcs/handler.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     {
49 49
         $this->object = midcom::get()->dbfactory->get_object_by_guid($guid);
50 50
 
51
-        if (   !midcom::get()->config->get('midcom_services_rcs_enable')
51
+        if (!midcom::get()->config->get('midcom_services_rcs_enable')
52 52
             || !$this->object->_use_rcs) {
53 53
             throw new midcom_error_notfound("Revision control not supported for " . get_class($this->object) . ".");
54 54
         }
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
         $this->load_object($args[0]);
241 241
         $history = $this->backend->get_history();
242 242
 
243
-        if (   !$history->version_exists($args[1])
243
+        if (!$history->version_exists($args[1])
244 244
             || !$history->version_exists($args[2])) {
245 245
             throw new midcom_error_notfound("One of the revisions {$args[1]} or {$args[2]} does not exist.");
246 246
         }
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
         $data['guid'] = $args[0];
284 284
 
285 285
         $this->load_object($args[0]);
286
-        $data['preview'] = array_filter($this->backend->get_revision($revision), function ($value, $key) {
286
+        $data['preview'] = array_filter($this->backend->get_revision($revision), function($value, $key) {
287 287
             return !is_array($value)
288 288
                 && !in_array($value, ['', '0000-00-00'])
289 289
                 && midcom_services_rcs::is_field_showable($key);
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
         $this->object->require_do('midgard:update');
314 314
         // TODO: set another privilege for restoring?
315 315
 
316
-        if (   $this->backend->get_history()->version_exists($args[1])
316
+        if ($this->backend->get_history()->version_exists($args[1])
317 317
             && $this->backend->restore_to_revision($args[1])) {
318 318
             midcom::get()->uimessages->add($this->_l10n->get('midcom.admin.rcs'), sprintf($this->_l10n->get('restore to version %s successful'), $args[1]));
319 319
             return new midcom_response_relocate($this->get_object_url());
Please login to merge, or discard this patch.
lib/midgard/admin/asgard/style/midgard_admin_asgard_rcs_diff.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 }
18 18
 
19 19
 if (!$data['diff']) {
20
-    echo "<dt>". $data['l10n']->get('no changes in content') ."</dt>\n";
20
+    echo "<dt>" . $data['l10n']->get('no changes in content') . "</dt>\n";
21 21
 }
22 22
 ?>
23 23
 </dl>
24 24
\ No newline at end of file
Please login to merge, or discard this patch.