better slugify support for api
This commit is contained in:
parent
48cd7438a1
commit
5a9af83ba6
@ -34,7 +34,6 @@ class Api {
|
|||||||
'locked' => 'locked',
|
'locked' => 'locked',
|
||||||
'bump' => 'last_modified',
|
'bump' => 'last_modified',
|
||||||
'embed' => 'embed',
|
'embed' => 'embed',
|
||||||
'slug' => 'semantic_url',
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->threadsPageFields = array(
|
$this->threadsPageFields = array(
|
||||||
@ -117,6 +116,10 @@ class Api {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($config['slugify'] && !$post->thread) {
|
||||||
|
$apiPost['semantic_url'] = $post->slug;
|
||||||
|
}
|
||||||
|
|
||||||
// Handle files
|
// Handle files
|
||||||
// Note: 4chan only supports one file, so only the first file is taken into account for 4chan-compatible API.
|
// Note: 4chan only supports one file, so only the first file is taken into account for 4chan-compatible API.
|
||||||
if (isset($post->files) && $post->files && !$threadsPage) {
|
if (isset($post->files) && $post->files && !$threadsPage) {
|
||||||
|
Loading…
Reference in New Issue
Block a user