@ -128,17 +128,21 @@ abstract class PFAHandler {
*
*
* available values for the "type" column:
* available values for the "type" column:
* text one line of text
* text one line of text
* *vtxt "virtual" line of text, coming from JOINs etc.
* pass password (will be encrypted with pacrypt())
* pass password (will be encrypted with pacrypt())
* num number
* num number
* txtl text "list" - array of one line texts
* txtl text "list" - array of one line texts
* vnum "virtual" number, coming from JOINs etc.
* * vnum "virtual" number, coming from JOINs etc.
* bool boolean (converted to 0/1, additional column _$field with yes/no)
* bool boolean (converted to 0/1, additional column _$field with yes/no)
* ts timestamp (created/modified)
* ts timestamp (created/modified)
* enum list of options, must be given in column "options" as array
* enum list of options, must be given in column "options" as array
* enma list of options, must be given in column "options" as associative array
* enma list of options, must be given in column "options" as associative array
* list like enum, but allow multiple selections
* list like enum, but allow multiple selections
* *quot used / total quota ("5 / 10") - for field "quotausage", there must also be a "_quotausage_percent" (type vnum)
* You can use custom types, but you'll have to add handling for them in *Handler and the smarty templates
* You can use custom types, but you'll have to add handling for them in *Handler and the smarty templates
*
*
* Field types marked with * will automatically be skipped in store().
*
* All database tables should have a 'created' and a 'modified' column.
* All database tables should have a 'created' and a 'modified' column.
*
*
* Do not use one of the following field names:
* Do not use one of the following field names:
@ -373,6 +377,11 @@ abstract class PFAHandler {
case 'pass':
case 'pass':
$db_values[$key] = pacrypt($db_values[$key]);
$db_values[$key] = pacrypt($db_values[$key]);
break;
break;
case 'quot':
case 'vnum':
case 'vtxt':
unset ($db_values[$key]); # virtual field, never write it
break;
}
}
if ($this->struct[$key]['not_in_db'] == 1) unset ($db_values[$key]); # remove 'not in db' columns
if ($this->struct[$key]['not_in_db'] == 1) unset ($db_values[$key]); # remove 'not in db' columns
if ($this->struct[$key]['dont_write_to_db'] == 1) unset ($db_values[$key]); # remove 'dont_write_to_db' columns
if ($this->struct[$key]['dont_write_to_db'] == 1) unset ($db_values[$key]); # remove 'dont_write_to_db' columns