Search the syndication targets array properly
This commit is contained in:
parent
7045989b51
commit
71123d5a31
1 changed files with 1 additions and 1 deletions
|
@ -98,7 +98,7 @@ class MicropubController extends Controller
|
||||||
$data['syndicate'] = [];
|
$data['syndicate'] = [];
|
||||||
$targets = array_pluck(config('syndication.targets'), 'uid', 'service.name');
|
$targets = array_pluck(config('syndication.targets'), 'uid', 'service.name');
|
||||||
if (is_string($request->input('mp-syndicate-to'))) {
|
if (is_string($request->input('mp-syndicate-to'))) {
|
||||||
$service = array_search($request->input('mp-syndicate-to'));
|
$service = array_search($request->input('mp-syndicate-to'), $targets);
|
||||||
if ($service == 'Twitter') {
|
if ($service == 'Twitter') {
|
||||||
$data['syndicate'][] = 'twitter';
|
$data['syndicate'][] = 'twitter';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue