Enable API flags for user_flag and country_flags
This commit is contained in:
parent
4a1f42bde8
commit
59c2e35d70
|
@ -111,7 +111,7 @@ class Api {
|
||||||
if ($threadsPage) return $apiPost;
|
if ($threadsPage) return $apiPost;
|
||||||
|
|
||||||
// Handle country field
|
// 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);
|
$modifiers = extract_modifiers($post->body_nomarkup);
|
||||||
if (isset($modifiers['flag']) && isset($modifiers['flag alt']) && preg_match('/^[1-9a-z_-]{2,}$/', $modifiers['flag'])) {
|
if (isset($modifiers['flag']) && isset($modifiers['flag alt']) && preg_match('/^[1-9a-z_-]{2,}$/', $modifiers['flag'])) {
|
||||||
$country = strtolower($modifiers['flag']);
|
$country = strtolower($modifiers['flag']);
|
||||||
|
|
|
@ -127,7 +127,6 @@ $config['allowed_ext_files'][] = 'epub';
|
||||||
*/
|
*/
|
||||||
$config['country_flags_condensed'] = false;
|
$config['country_flags_condensed'] = false;
|
||||||
$config['user_flag'] = true;
|
$config['user_flag'] = true;
|
||||||
$config['country_flags'] = true;
|
|
||||||
$config['flag_style'] = 'width:auto;height:11px;';
|
$config['flag_style'] = 'width:auto;height:11px;';
|
||||||
$config['user_flags'] = array (
|
$config['user_flags'] = array (
|
||||||
'4th_international' => '4th International',
|
'4th_international' => '4th International',
|
||||||
|
|
Loading…
Reference in New Issue