Completed
Push — master ( 31b335...9a25ab )
by
unknown
04:15
created
src/Extensions/ElementalSubsiteExtension.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     public function updateCMSFields(FieldList $fields) {
27 27
 
28 28
         // add SubsiteID if Subsites is installed andf Elemental has a subsite
29
-        if(class_exists('Subsite')) {
29
+        if (class_exists('Subsite')) {
30 30
             $fields->push(new HiddenField('SubsiteID', null, Subsite::currentSubsiteID()));
31 31
         }
32 32
     }
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public function augmentSQL(SQLSelect $query, DataQuery $dataQuery = NULL) {
38 38
 
39
-        if(!class_exists('Subsite')) {
39
+        if (!class_exists('Subsite')) {
40 40
             return;
41 41
         }
42 42
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         // The foreach is an ugly way of getting the first key :-)
62 62
         foreach ($query->getFrom() as $tableName => $info) {
63 63
             // The tableName should be Element or Element_Live...
64
-            if(strpos($tableName, 'Element') !== false) {
64
+            if (strpos($tableName, 'Element') !== false) {
65 65
                 $query->addWhere("\"$tableName\".\"SubsiteID\" IN ($subsiteID)");
66 66
                 break;
67 67
             }
Please login to merge, or discard this patch.