You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2025-08-07 17:42:53 +03:00
model/DomainHandler.php:
- integrate $defaults in $struct to have everything in one place - integrate field labels, descriptions etc. in $struct - $struct now has named keys and is filled with the new pacal() helper function - replaced TODO comments with new ones ;-) functions.inc.php: - new function pacol() to fill $struct with an associative array git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1145 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
@@ -392,6 +392,37 @@ function safecookie ($param, $default="") {
|
||||
return $retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* pacol
|
||||
* @param int $allow_editing
|
||||
* @param int $display_in_form
|
||||
* @param int display_in_list
|
||||
* @param String $type
|
||||
* @param String PALANG_label
|
||||
* @param String PALANG_desc
|
||||
* @param any optional $default
|
||||
* @param array optional $options
|
||||
* @param int $not_in_db
|
||||
* @return array for $struct
|
||||
*/
|
||||
function pacol($allow_editing, $display_in_form, $display_in_list, $type, $PALANG_label, $PALANG_desc, $default = "", $options = array(), $not_in_db=0) {
|
||||
global $PALANG;
|
||||
|
||||
if ($PALANG_label != '') $PALANG_label = $PALANG[$PALANG_label];
|
||||
if ($PALANG_desc != '') $PALANG_desc = $PALANG[$PALANG_desc ];
|
||||
|
||||
return array(
|
||||
'editable' => $allow_editing,
|
||||
'display_in_form' => $display_in_form,
|
||||
'display_in_list' => $display_in_list,
|
||||
'type' => $type,
|
||||
'label' => $PALANG_label, # $PALANG field label
|
||||
'desc' => $PALANG_desc, # $PALANG field description
|
||||
'default' => $default,
|
||||
'options' => $options,
|
||||
'not_in_db' => $not_in_db,
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// get_domain_properties
|
||||
|
Reference in New Issue
Block a user