From fee8dd655c8c242034fb8f8583adcb283148650d Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Mon, 3 Apr 2017 15:08:01 -0400 Subject: [PATCH] Forcing bitmap types in data abstract to output select data to fix problem caused when trimming that data in certain situations when list is called. --- index.php | 4 ++-- lib/GlmDataAbstract/DataAbstract.php | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index ff988cfe..2c85e7ba 100644 --- a/index.php +++ b/index.php @@ -3,7 +3,7 @@ * Plugin Name: GLM Members Database * Plugin URI: http://www.gaslightmedia.com/ * Description: Gaslight Media Members Database. - * Version: 2.9.12 + * Version: 2.9.13 * Author: Gaslight Media * Author URI: http://www.gaslightmedia.com/ * License: GPL2 @@ -19,7 +19,7 @@ * @package glmMembersDatabase * @author Chuck Scott * @license http://www.gaslightmedia.com Gaslightmedia - * @version 2.9.12 + * @version 2.9.13 */ /* diff --git a/lib/GlmDataAbstract/DataAbstract.php b/lib/GlmDataAbstract/DataAbstract.php index debc98e3..4845a3fc 100644 --- a/lib/GlmDataAbstract/DataAbstract.php +++ b/lib/GlmDataAbstract/DataAbstract.php @@ -1106,13 +1106,17 @@ abstract class GlmDataAbstract return false; } + // Check for option to force picklists + $alwaysList = (isset($f['force_list']) && $f['force_list']); +$forEdit = true; + // Build bitmap array $bitmap = array(); $bitmapNames = array(); while (list($k, $v) = each($f['bitmap'])) { // If appropriate or requested, build picklists - if ($this->optionIncludeSelectListData || $forEdit ) { + if ($this->optionIncludeSelectListData || $forEdit || $alwaysList) { $bitmap[$k] = array( 'name' => $v, 'nameEsc' => addslashes($v), @@ -1124,7 +1128,7 @@ abstract class GlmDataAbstract // Check if this option has been selected $powVal = pow(2, $k); if (($powVal & $d) > 0) { - if ($this->optionIncludeSelectListData || $forEdit ) { + if ($this->optionIncludeSelectListData || $forEdit || $alwaysList) { $bitmap[$k]['default'] = true; } $bitmapNames[$k] = $v; -- 2.17.1