@@ -221,7 +221,9 @@ discard block |
||
| 221 | 221 | // Step 5: User and Button Information |
| 222 | 222 | $userId = Auth::user()->id; |
| 223 | 223 | $button = Button::where('name', $request->button)->first(); |
| 224 | - if ($button && empty($LinkTitle)) $LinkTitle = $button->alt; |
|
| 224 | + if ($button && empty($LinkTitle)) { |
|
| 225 | + $LinkTitle = $button->alt; |
|
| 226 | + } |
|
| 225 | 227 | |
| 226 | 228 | // Step 6: Prepare Link Data |
| 227 | 229 | // (Handled by the included file) |
@@ -484,14 +486,16 @@ discard block |
||
| 484 | 486 | 'button' => 'required', |
| 485 | 487 | ]); |
| 486 | 488 | |
| 487 | - if (stringStartsWith($request->link, 'http://') == 'true' or stringStartsWith($request->link, 'https://') == 'true' or stringStartsWith($request->link, 'mailto:') == 'true') |
|
| 488 | - $link1 = $request->link; |
|
| 489 | - else |
|
| 490 | - $link1 = 'https://' . $request->link; |
|
| 491 | - if (stringEndsWith($request->link, '/') == 'true') |
|
| 492 | - $link = rtrim($link1, "/ "); |
|
| 493 | - else |
|
| 494 | - $link = $link1; |
|
| 489 | + if (stringStartsWith($request->link, 'http://') == 'true' or stringStartsWith($request->link, 'https://') == 'true' or stringStartsWith($request->link, 'mailto:') == 'true') { |
|
| 490 | + $link1 = $request->link; |
|
| 491 | + } else { |
|
| 492 | + $link1 = 'https://' . $request->link; |
|
| 493 | + } |
|
| 494 | + if (stringEndsWith($request->link, '/') == 'true') { |
|
| 495 | + $link = rtrim($link1, "/ "); |
|
| 496 | + } else { |
|
| 497 | + $link = $link1; |
|
| 498 | + } |
|
| 495 | 499 | $title = $request->title; |
| 496 | 500 | $order = $request->order; |
| 497 | 501 | $button = $request->button; |