diff options
| author | David Sommerseth <dazo@users.sourceforge.net> | 2008-12-08 16:43:18 +0100 |
|---|---|---|
| committer | David Sommerseth <dazo@users.sourceforge.net> | 2008-12-08 16:43:18 +0100 |
| commit | 2bd515a018247ecc03a0b22b015f3e3b3872a5e4 (patch) | |
| tree | 23e6cdc33a6765ac890e8d2aa5771c4b93c95ce6 /database | |
| parent | e57c1a87733917b15feed183cf8571faee6826b6 (diff) | |
| download | eurephia-2bd515a018247ecc03a0b22b015f3e3b3872a5e4.tar.gz eurephia-2bd515a018247ecc03a0b22b015f3e3b3872a5e4.tar.xz eurephia-2bd515a018247ecc03a0b22b015f3e3b3872a5e4.zip | |
Added setnull_flag in the eurephiaUSERINFO struct
This can make it possible to get a value getting set to NULL if
this flag contains the FIELD_* value of the field being set to NULL.
If more fields wants to be reset, these field values can be bitwise
ORed together into the setnull_flag.
Diffstat (limited to 'database')
| -rw-r--r-- | database/eurephiadb_mapping.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/database/eurephiadb_mapping.c b/database/eurephiadb_mapping.c index 22aa594..4454e1b 100644 --- a/database/eurephiadb_mapping.c +++ b/database/eurephiadb_mapping.c @@ -134,6 +134,11 @@ eDBfieldMap *eDBmkMapping_USERINFO(eurephiaCTX *ctx, eDBfieldMap *dbmap, eurephi case FIELD_DEACTIVATED: ptr->value = strdup_nullsafe(user->deactivated); break; case FIELD_LASTACCESS: ptr->value = strdup_nullsafe(user->last_accessed); break; } + + // Set ft_SETNULL if that flag is set for this field_id + if( (ptr->field_id & user->setnull_flags) == ptr->field_id ) { + ptr->field_type = ft_SETNULL; + } } return map; } |
