Completed
Push — develop ( fbe358...01f50e )
by Dmytro
09:14 queued 03:31
created
manager/processors/save_content.processor.php 1 patch
Switch Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -280,19 +280,19 @@
 block discarded – undo
280 280
             // invoke OnBeforeDocFormSave event
281 281
             switch($modx->config['docid_incrmnt_method'])
282 282
             {
283
-            case '1':
284
-                $from = "{$tbl_site_content} AS T0 LEFT JOIN {$tbl_site_content} AS T1 ON T0.id + 1 = T1.id";
285
-                $where = "T1.id IS NULL";
286
-                $rs = $modx->db->select('MIN(T0.id)+1', $from, "T1.id IS NULL");
287
-                $id = $modx->db->getValue($rs);
283
+                case '1':
284
+                    $from = "{$tbl_site_content} AS T0 LEFT JOIN {$tbl_site_content} AS T1 ON T0.id + 1 = T1.id";
285
+                    $where = "T1.id IS NULL";
286
+                    $rs = $modx->db->select('MIN(T0.id)+1', $from, "T1.id IS NULL");
287
+                    $id = $modx->db->getValue($rs);
288
+                    break;
289
+                case '2':
290
+                    $rs = $modx->db->select('MAX(id)+1', $tbl_site_content);
291
+                    $id = $modx->db->getValue($rs);
288 292
                 break;
289
-            case '2':
290
-                $rs = $modx->db->select('MAX(id)+1', $tbl_site_content);
291
-                $id = $modx->db->getValue($rs);
292
-            break;
293 293
 
294
-            default:
295
-                $id = '';
294
+                default:
295
+                    $id = '';
296 296
             }
297 297
 
298 298
         $modx->invokeEvent("OnBeforeDocFormSave", array(
Please login to merge, or discard this patch.