@@ -54,11 +54,11 @@ discard block |
||
54 | 54 | $newbody = str_replace('[LOOP='.$repeater_slug.']'.$repeater_body.'[/LOOP]',$this->getRepeaterContents($repeater_slug, $repeater_body),$body); |
55 | 55 | |
56 | 56 | // THERE IS NO LOOP, CONTINUE |
57 | - }elseif(strpos($findThis[0], 'FORM') !== false) {// PAGEBLOCK CONTAINS A FORM, LET'S RETRIEVE IT |
|
57 | + } elseif(strpos($findThis[0], 'FORM') !== false) {// PAGEBLOCK CONTAINS A FORM, LET'S RETRIEVE IT |
|
58 | 58 | $form_slug = implode(" ",$this->getResources($body, '[FORM=', ']')); |
59 | 59 | |
60 | 60 | $newbody = $this->getFormHtml($form_slug,$body); |
61 | - }else{// THERE IS NO FORM, SO JUST RETRIEVE THE DYNAMIC CONTENT |
|
61 | + } else{// THERE IS NO FORM, SO JUST RETRIEVE THE DYNAMIC CONTENT |
|
62 | 62 | $newbody = $this->getResourceContent($findThis, $pageblock->id, $body);//Maybe write a function in the model? |
63 | 63 | } |
64 | 64 | } else { |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $newbody = str_replace('[LOOP='.$repeater_slug.']'.$repeater_body.'[/LOOP]',$this->getRepeaterContents($repeater_slug, $repeater_body),$body); |
104 | 104 | |
105 | 105 | // THERE IS NO LOOP, CONTINUE |
106 | - }elseif(strpos($findThis[0], 'FORM') !== false) {// PAGEBLOCK CONTAINS A FORM, LET'S RETRIEVE IT |
|
106 | + } elseif(strpos($findThis[0], 'FORM') !== false) {// PAGEBLOCK CONTAINS A FORM, LET'S RETRIEVE IT |
|
107 | 107 | $form_slug = implode(" ",$this->getResources($body, '[FORM=', ']')); |
108 | 108 | |
109 | 109 | $newbody = $this->getFormHtml($form_slug,$body); |
@@ -154,8 +154,7 @@ |
||
154 | 154 | if (!in_array($value,array(".",".."))) { |
155 | 155 | if (is_dir($dir . DIRECTORY_SEPARATOR . $value)) { |
156 | 156 | $result[$value] = $this->dirToArray($dir . DIRECTORY_SEPARATOR . $value); |
157 | - } |
|
158 | - else { |
|
157 | + } else { |
|
159 | 158 | if ($value !== '.DS_Store' && (strpos($value, '.html') !== false) ) { |
160 | 159 | $blockKey = str_replace('.html', '', $value); |
161 | 160 | $blockName = str_replace('-', ' ', $blockKey); |
@@ -163,7 +163,7 @@ |
||
163 | 163 | $store = $content->storeEntry($request); |
164 | 164 | if($store == 'success'){ |
165 | 165 | return redirect()->route('dashboard.content.repeaters.entries', ['slug' => $slug]); |
166 | - }else { |
|
166 | + } else { |
|
167 | 167 | // error catching ... ? |
168 | 168 | } |
169 | 169 | } |
@@ -65,7 +65,9 @@ discard block |
||
65 | 65 | if($page == null){ |
66 | 66 | foreach(\LaravelLocalization::getSupportedLocales() as $localeCode => $properties){ |
67 | 67 | $page = $this->page->where('slug->'.$localeCode, $slug)->first(); |
68 | - if($page !== null && $localeCode == app()->getLocale()) break; |
|
68 | + if($page !== null && $localeCode == app()->getLocale()) { |
|
69 | + break; |
|
70 | + } |
|
69 | 71 | |
70 | 72 | if($page !== null && $localeCode !== app()->getLocale()){ |
71 | 73 | //dd(app()->getLocale()); |
@@ -77,7 +79,9 @@ discard block |
||
77 | 79 | } |
78 | 80 | } |
79 | 81 | |
80 | - if($page == null) abort(404); |
|
82 | + if($page == null) { |
|
83 | + abort(404); |
|
84 | + } |
|
81 | 85 | } |
82 | 86 | |
83 | 87 | $ogpageblocks = $this->pageblock->getAllByPageId($page->id); |
@@ -117,7 +117,7 @@ |
||
117 | 117 | Mail::send(new FormActionMail($mailData)); |
118 | 118 | } |
119 | 119 | return redirect()->to($form->form['actions']['redirect']); |
120 | - }else { |
|
120 | + } else { |
|
121 | 121 | // error catching ... ? |
122 | 122 | } |
123 | 123 |
@@ -72,7 +72,7 @@ |
||
72 | 72 | } else { |
73 | 73 | return 'error'; |
74 | 74 | } |
75 | - }else { |
|
75 | + } else { |
|
76 | 76 | return 'pass'; |
77 | 77 | } |
78 | 78 | } |