Better syndication parsing
This commit is contained in:
parent
9a0e2e7ed9
commit
d584a10d1e
3 changed files with 8 additions and 2 deletions
|
@ -322,7 +322,10 @@ class MicropubClientController extends Controller
|
||||||
$data = json_decode($syndicationTargets, true);
|
$data = json_decode($syndicationTargets, true);
|
||||||
if (array_key_exists('syndicate-to', $data)) {
|
if (array_key_exists('syndicate-to', $data)) {
|
||||||
foreach ($data['syndicate-to'] as $syn) {
|
foreach ($data['syndicate-to'] as $syn) {
|
||||||
$syndicateTo[] = $syn['uid'];
|
$syndicateTo[] = [
|
||||||
|
'target' => $syn['uid'],
|
||||||
|
'name' => $syn['name'],
|
||||||
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (count($syndicateTo) > 0) {
|
if (count($syndicateTo) > 0) {
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## Version {next}
|
||||||
|
- Improve syndication parsing to allow better name display on new note form
|
||||||
|
|
||||||
## Version 0.0.8.1 (2016-07-13)
|
## Version 0.0.8.1 (2016-07-13)
|
||||||
- Fix anh issue in the syndication target parsing method
|
- Fix anh issue in the syndication target parsing method
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<label for="in-reply-to" accesskey="r">Reply-to: </label><input type="text" name="in-reply-to" id="in-reply-to" placeholder="in-reply-to-1 in-reply-to-2 …" value="{{ old('in-reply-to') }}">
|
<label for="in-reply-to" accesskey="r">Reply-to: </label><input type="text" name="in-reply-to" id="in-reply-to" placeholder="in-reply-to-1 in-reply-to-2 …" value="{{ old('in-reply-to') }}">
|
||||||
<label for="content" accesskey="n">Note: </label><textarea name="content" id="content" placeholder="Note" autofocus>{{ old('content') }}</textarea>
|
<label for="content" accesskey="n">Note: </label><textarea name="content" id="content" placeholder="Note" autofocus>{{ old('content') }}</textarea>
|
||||||
@if ($micropub === true)
|
@if ($micropub === true)
|
||||||
<label for="syndication" accesskey="s">Syndication: </label>@if($syndication)<ul class="syndication-targets-list" name="syndication">@foreach($syndication as $target)<li><input type="checkbox" name="syndicate-to[]" id="{{ $target }}" value="{{ $target }}" checked="checked"> <label for="{{ $target }}">{{ $target }}</label></li>@endforeach</ul>@endif
|
<label for="syndication" accesskey="s">Syndication: </label>@if($syndication)<ul class="syndication-targets-list" name="syndication">@foreach($syndication as $syn)<li><input type="checkbox" name="syndicate-to[]" id="{{ $syn['target'] }}" value="{{ $syn['target'] }}" checked="checked"> <label for="{{ $syn['target'] }}">{{ $syn['name'] }}</label></li>@endforeach</ul>@endif
|
||||||
<a href="/refresh-syndication-targets">Refresh Syndication Targets</a><br>
|
<a href="/refresh-syndication-targets">Refresh Syndication Targets</a><br>
|
||||||
@endif
|
@endif
|
||||||
<label for="photo" accesskey="p">Photo: </label><input type="file" accept="image/*" value="Upload" name="photo[]" id="photo" multiple>
|
<label for="photo" accesskey="p">Photo: </label><input type="file" accept="image/*" value="Upload" name="photo[]" id="photo" multiple>
|
||||||
|
|
Loading…
Add table
Reference in a new issue