Browse Source
convert all values to arrays for html editor
pull/96/head
Aaron Parecki
7 years ago
No known key found for this signature in database
GPG Key ID: 276C2817346D6056
1 changed files with
5 additions and
0 deletions
-
controllers/editor.php
|
@ -55,6 +55,11 @@ $app->post('/editor/publish', function() use($app) { |
|
|
'type' => ['h-entry'], |
|
|
'type' => ['h-entry'], |
|
|
'properties' => $micropub_request |
|
|
'properties' => $micropub_request |
|
|
]; |
|
|
]; |
|
|
|
|
|
// Convert all values to arrays
|
|
|
|
|
|
foreach($micropub_request['properties'] as $k=>$v) { |
|
|
|
|
|
if(!is_array($v)) |
|
|
|
|
|
$micropub_request['properties'][$k] = [$v]; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$r = micropub_post_for_user($user, $micropub_request, null, $json); |
|
|
$r = micropub_post_for_user($user, $micropub_request, null, $json); |
|
|