diff --git a/acp/portal_module.php b/acp/portal_module.php index 6212c5ea..f101761f 100644 --- a/acp/portal_module.php +++ b/acp/portal_module.php @@ -108,8 +108,8 @@ class portal_module 'board3_show_all_pages' => array('lang' => 'ACP_PORTAL_SHOW_ALL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'board3_show_all_side' => array('lang' => 'PORTAL_SHOW_ALL_SIDE', 'validate' => 'bool', 'type' => 'custom', 'method' => array('board3.portal.modules_helper', 'display_left_right'), 'submit' => array('board3.portal.modules_helper', 'store_left_right'), 'explain' => true), - 'legend4' => 'ACP_FA', - 'board3_fa_styles' => array('lang' => 'ACP_FA', 'validate' => 'string', 'type' => 'custom', 'method' => array('board3.portal.modules_helper', 'display_fa_styles'), 'submit' => array('board3.portal.modules_helper', 'store_fa_styles'), 'explain' => true), + 'legend4' => 'ACP_FA', + 'board3_fa_styles' => array('lang' => 'ACP_FA', 'validate' => 'string', 'type' => 'custom', 'method' => array('board3.portal.modules_helper', 'display_fa_styles'), 'submit' => array('board3.portal.modules_helper', 'store_fa_styles'), 'explain' => true), ) ); diff --git a/controller/helper.php b/controller/helper.php index 6eefd4ec..283f97d4 100644 --- a/controller/helper.php +++ b/controller/helper.php @@ -230,16 +230,16 @@ class helper */ public function assign_module_vars($row, $template_module) { - $use_fa = 0; - $fa_styles = explode(';', $this->config['board3_portal_fa_styles']); - foreach ($fa_styles as $fa_style) - { - if ($this->user->style['style_name'] == $fa_style) - { - $use_fa = 1; - break; - } - } + $use_fa = 0; + $fa_styles = explode(';', $this->config['board3_portal_fa_styles']); + foreach ($fa_styles as $fa_style) + { + if ($this->user->style['style_name'] == $fa_style) + { + $use_fa = 1; + break; + } + } if (is_array($template_module)) { $this->template->assign_block_vars('modules_' . $this->portal_columns->number_to_string($row['module_column']), array( @@ -250,9 +250,9 @@ class helper 'MODULE_ID' => $row['module_id'], 'IMAGE_WIDTH' => $row['module_image_width'], 'IMAGE_HEIGHT' => $row['module_image_height'], - 'FA_ICON' => utf8_htmlspecialchars($row['module_fa_icon']), - 'FA_SIZE' => $row['module_fa_size'], - 'FA_ENABLED' => $use_fa, + 'FA_ICON' => utf8_htmlspecialchars($row['module_fa_icon']), + 'FA_SIZE' => $row['module_fa_size'], + 'FA_ENABLED' => $use_fa, )); } else @@ -264,9 +264,9 @@ class helper 'IMAGE_HEIGHT' => $row['module_image_height'], 'MODULE_ID' => $row['module_id'], 'TITLE' => (isset($this->user->lang[$row['module_name']])) ? $this->user->lang[$row['module_name']] : utf8_normalize_nfc($row['module_name']), - 'FA_ICON' => utf8_htmlspecialchars($row['module_fa_icon']), - 'FA_SIZE' => $row['module_fa_size'], - 'FA_ENABLED' => $use_fa, + 'FA_ICON' => utf8_htmlspecialchars($row['module_fa_icon']), + 'FA_SIZE' => $row['module_fa_size'], + 'FA_ENABLED' => $use_fa, )); } } diff --git a/includes/modules_helper.php b/includes/modules_helper.php index 976c23a2..5b778dc1 100644 --- a/includes/modules_helper.php +++ b/includes/modules_helper.php @@ -189,52 +189,52 @@ class modules_helper $this->config->set($key, $value); } - /** - * Show available styles - * - * @return string Select with available styles - */ - public function display_fa_styles() - { - global $phpbb_container; - $table_prefix = $phpbb_container->getParameter('core.table_prefix'); - $db = $phpbb_container->get('dbal.conn'); - $selected = explode(';', $this->config['board3_portal_fa_styles']); - $options = ''; - $query = 'SELECT style_name - FROM ' . $table_prefix . 'styles'; - $result = $db->sql_query($query); - while ($row = $db->sql_fetchrow($result)) - { - $options .= '