mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2026-11-20 23:43:26 +03:00
PFAHandler:
- mark _inp_* functions as protected git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1384 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
1 parent
e36c3e2a23
commit
4bb441d45d
1 file changed
+4
-4
@@ -454,7 +454,7 @@ class PFAHandler {
|
||||
/**
|
||||
* check if value is numeric and >= -1 (= minimum value for quota)
|
||||
*/
|
||||
function _inp_num($field, $val) {
|
||||
protected function _inp_num($field, $val) {
|
||||
$valid = is_numeric($val);
|
||||
if ($val < -1) $valid = false;
|
||||
if (!$valid) $this->errormsg[$field] = "$field must be numeric"; # TODO: make translateable
|
||||
@@ -465,7 +465,7 @@ class PFAHandler {
|
||||
/**
|
||||
* check if value is (numeric) boolean - in other words: 0 or 1
|
||||
*/
|
||||
function _inp_bool($field, $val) {
|
||||
protected function _inp_bool($field, $val) {
|
||||
if ($val == "0" || $val == "1") return true;
|
||||
$this->errormsg[$field] = "$field must be boolean"; # TODO: make translateable
|
||||
return false;
|
||||
@@ -475,7 +475,7 @@ class PFAHandler {
|
||||
/**
|
||||
* check if value of an enum field is in the list of allowed values
|
||||
*/
|
||||
function _inp_enum($field, $val) {
|
||||
protected function _inp_enum($field, $val) {
|
||||
if(in_array($val, $this->struct[$field]['options'])) return true;
|
||||
$this->errormsg[$field] = "Invalid parameter given for $field"; # TODO: make translateable
|
||||
return false;
|
||||
@@ -484,7 +484,7 @@ class PFAHandler {
|
||||
/**
|
||||
* check if a password is secure enough
|
||||
*/
|
||||
function _inp_pass($field, $val){
|
||||
protected function _inp_pass($field, $val){
|
||||
$validpass = validate_password($val); # returns array of error messages, or empty array on success
|
||||
|
||||
if(count($validpass) == 0) return true;
|
||||
|
||||
Reference in new issue
Block a user