Browse Source

Enable API flags for user_flag and country_flags

pull/40/head
Pietro Carrara 3 years ago
parent
commit
59c2e35d70
  1. 2
      inc/api.php
  2. 1
      inc/instance-config.php

2
inc/api.php

@ -111,7 +111,7 @@ class Api {
if ($threadsPage) return $apiPost;
// Handle country field
if (isset($post->body_nomarkup) && $this->config['country_flags']) {
if (isset($post->body_nomarkup) && ($this->config['country_flags'] || $this->config['user_flag'])) {
$modifiers = extract_modifiers($post->body_nomarkup);
if (isset($modifiers['flag']) && isset($modifiers['flag alt']) && preg_match('/^[1-9a-z_-]{2,}$/', $modifiers['flag'])) {
$country = strtolower($modifiers['flag']);

1
inc/instance-config.php

@ -127,7 +127,6 @@ $config['allowed_ext_files'][] = 'epub';
*/
$config['country_flags_condensed'] = false;
$config['user_flag'] = true;
$config['country_flags'] = true;
$config['flag_style'] = 'width:auto;height:11px;';
$config['user_flags'] = array (
'4th_international' => '4th International',

Loading…
Cancel
Save