Skip to content

Commit 9c53587

Browse files
committed
Update LinkTypeViewController.php
1 parent 87a24b4 commit 9c53587

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/Http/Controllers/LinkTypeViewController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
namespace App\Http\Controllers;
4+
use Illuminate\Support\Facades\Route;
45

56
use Illuminate\Http\Request;
67

@@ -25,13 +26,14 @@ public function getParamForm($typeid, $linkId = 0)
2526
$data['params'] = '';
2627
$data['link_title'] = '';
2728
$data['link_url'] = '';
29+
$data['button_id'] = 0;
2830

2931
if ($linkId) {
3032
$link = Link::find($linkId);
3133
$data['params'] = json_decode($link['type_params']);
3234
$data['link_title'] = $link->title;
3335
$data['link_url'] = $link->link;
34-
$data['button_id'] = $link->button_id;
36+
if (Route::currentRouteName() != 'showButtons') {$data['button_id'] = $link->button_id;}
3537
}
3638

3739
if (!empty($linkType) && $linkType->typename === 'predefined') {

0 commit comments

Comments
 (0)