File tree Expand file tree Collapse file tree 1 file changed +36
-5
lines changed
Expand file tree Collapse file tree 1 file changed +36
-5
lines changed Original file line number Diff line number Diff line change @@ -215,11 +215,42 @@ public function saveLink(request $request)
215215
216216 if ($ OrigLink ) {
217217 //EDITING EXISTING
218- $ OrigLink ->update ([
219- 'link ' => $ LinkURL ,
220- 'title ' => $ LinkTitle ,
221- 'button_id ' => $ button ?->id,
222- ]);
218+
219+ $ isCustomWebsite = $ customParams ['GetSiteIcon ' ] ?? null ;
220+ $ SpacerHeight = $ customParams ['height ' ] ?? null ;
221+
222+ if ($ linkType ->typename == "link " and $ isCustomWebsite == "1 " ){
223+ $ OrigLink ->update ([
224+ 'link ' => $ LinkURL ,
225+ 'title ' => $ LinkTitle ,
226+ 'button_id ' => "2 " ,
227+ ]);
228+ }elseif ($ linkType ->typename == "link " ){
229+ $ OrigLink ->update ([
230+ 'link ' => $ LinkURL ,
231+ 'title ' => $ LinkTitle ,
232+ 'button_id ' => "1 " ,
233+ ]);
234+ }elseif ($ linkType ->typename == "spacer " ){
235+ $ OrigLink ->update ([
236+ 'link ' => $ LinkURL ,
237+ 'title ' => $ LinkTitle ,
238+ 'button_id ' => "43 " ,
239+ ]);
240+ }elseif ($ linkType ->typename == "heading " ){
241+ $ OrigLink ->update ([
242+ 'link ' => $ LinkURL ,
243+ 'title ' => $ LinkTitle ,
244+ 'button_id ' => "42 " ,
245+ ]);
246+ }else {
247+ $ OrigLink ->update ([
248+ 'link ' => $ LinkURL ,
249+ 'title ' => $ LinkTitle ,
250+ 'button_id ' => $ button ?->id,
251+ ]);
252+ }
253+
223254 $ message .="updated " ;
224255 } else {
225256 // ADDING NEW
You can’t perform that action at this time.
0 commit comments