Forcing bitmap types in data abstract to output select data to fix problem caused...
authorChuck Scott <cscott@gaslightmedia.com>
Mon, 3 Apr 2017 19:08:01 +0000 (15:08 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Mon, 3 Apr 2017 19:08:01 +0000 (15:08 -0400)
index.php
lib/GlmDataAbstract/DataAbstract.php

index 0e81b13..cb8e951 100644 (file)
--- 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 <cscott@gaslightmedia.com>
  * @license http://www.gaslightmedia.com Gaslightmedia
- * @version 2.9.12
+ * @version 2.9.13
  */
 
 /*
index debc98e..4845a3f 100644 (file)
@@ -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;