diff options
| author | czaks <marcin@6irc.net> | 2015-03-31 05:50:52 +0200 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2015-03-31 05:50:52 +0200 |
| commit | 5a9af83ba64fcc5547f3c5206121cff3992a3663 (patch) | |
| tree | 10c999c6077bdfe53133544023ed8c4029a24981 /inc | |
| parent | 48cd7438a1ca7309386a44be78cb460f4e729e01 (diff) | |
better slugify support for api
Diffstat (limited to 'inc')
| -rw-r--r-- | inc/api.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/inc/api.php b/inc/api.php index f8f2a71c..a057f4ed 100644 --- a/inc/api.php +++ b/inc/api.php @@ -34,7 +34,6 @@ class Api { 'locked' => 'locked', 'bump' => 'last_modified', 'embed' => 'embed', - 'slug' => 'semantic_url', ); $this->threadsPageFields = array( @@ -117,6 +116,10 @@ class Api { } } + if ($config['slugify'] && !$post->thread) { + $apiPost['semantic_url'] = $post->slug; + } + // Handle files // 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) { |
