projects
/
WP-Plugins
/
glm-member-db.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42582fe
)
Now checking for default value when inserting if no input supplied (only for integer...
author
Chuck Scott
<cscott@gaslightmedia.com>
Mon, 1 Jan 2018 18:46:45 +0000
(13:46 -0500)
committer
Chuck Scott
<cscott@gaslightmedia.com>
Mon, 1 Jan 2018 18:46:45 +0000
(13:46 -0500)
lib/GlmDataAbstract/DataAbstract.php
patch
|
blob
|
history
diff --git
a/lib/GlmDataAbstract/DataAbstract.php
b/lib/GlmDataAbstract/DataAbstract.php
index
f281b8e
..
5c1ee61
100644
(file)
--- a/
lib/GlmDataAbstract/DataAbstract.php
+++ b/
lib/GlmDataAbstract/DataAbstract.php
@@
-177,6
+177,13
@@
abstract class GlmDataAbstract
$in = $_REQUEST[$as];
}
+ // If this is an insert and we don't have the value, is there a default
+ if ($in == '' && $op == 'i') {
+ if (isset($f['default'])) {
+ $in = ($f['default']);
+ }
+ }
+
// Check for required field
if (isset($f['required']) && $f['required'] && trim($in) == '') {
$this->inputFieldStatus = false;