You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2025-08-06 06:42:37 +03:00
composer format time
This commit is contained in:
@@ -548,7 +548,7 @@ function create_page_browser($idxfield, $querypart, $sql_params = []) {
|
|||||||
|
|
||||||
if (db_sqlite()) {
|
if (db_sqlite()) {
|
||||||
$end = $idxfield;
|
$end = $idxfield;
|
||||||
if(strpos($idxfield, '.') !== false) {
|
if (strpos($idxfield, '.') !== false) {
|
||||||
$bits = explode('.', $idxfield);
|
$bits = explode('.', $idxfield);
|
||||||
$end = $bits[1];
|
$end = $bits[1];
|
||||||
}
|
}
|
||||||
@@ -1911,7 +1911,6 @@ function db_in_clause($field, array $values) {
|
|||||||
* This also means you'll need to set a (dummy) condition for NULL and NOTNULL.
|
* This also means you'll need to set a (dummy) condition for NULL and NOTNULL.
|
||||||
*/
|
*/
|
||||||
function db_where_clause(array $condition, array $struct, $additional_raw_where = '', array $searchmode = array()) {
|
function db_where_clause(array $condition, array $struct, $additional_raw_where = '', array $searchmode = array()) {
|
||||||
|
|
||||||
if (count($condition) == 0 && trim($additional_raw_where) == '') {
|
if (count($condition) == 0 && trim($additional_raw_where) == '') {
|
||||||
throw new Exception("db_where_cond: parameter is an empty array!");
|
throw new Exception("db_where_cond: parameter is an empty array!");
|
||||||
}
|
}
|
||||||
|
@@ -168,10 +168,10 @@ abstract class PFAHandler {
|
|||||||
*/
|
*/
|
||||||
public function __construct($new = 0, $username = "", $is_admin = 1) {
|
public function __construct($new = 0, $username = "", $is_admin = 1) {
|
||||||
# set label_field if not explicitely set
|
# set label_field if not explicitely set
|
||||||
if(!isset($this->id_field)) {
|
if (!isset($this->id_field)) {
|
||||||
throw new \InvalidArgumentException("id_field must be defined");
|
throw new \InvalidArgumentException("id_field must be defined");
|
||||||
}
|
}
|
||||||
if(!isset($this->db_table)) {
|
if (!isset($this->db_table)) {
|
||||||
throw new \InvalidArgumentException("db_table must be defined");
|
throw new \InvalidArgumentException("db_table must be defined");
|
||||||
}
|
}
|
||||||
if (empty($this->label_field)) {
|
if (empty($this->label_field)) {
|
||||||
@@ -237,7 +237,7 @@ abstract class PFAHandler {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(empty($this->db_table)) {
|
if (empty($this->db_table)) {
|
||||||
throw new Exception("db_table not defined");
|
throw new Exception("db_table not defined");
|
||||||
}
|
}
|
||||||
$struct_hook = Config::read_string($this->db_table . '_struct_hook');
|
$struct_hook = Config::read_string($this->db_table . '_struct_hook');
|
||||||
|
@@ -27,7 +27,7 @@ require_once('common.php');
|
|||||||
$username = authentication_get_username(); # enforce login
|
$username = authentication_get_username(); # enforce login
|
||||||
|
|
||||||
$table = safepost('table', safeget('table'));
|
$table = safepost('table', safeget('table'));
|
||||||
if(!is_string($table)) {
|
if (!is_string($table)) {
|
||||||
die("Invalid table name given!");
|
die("Invalid table name given!");
|
||||||
}
|
}
|
||||||
$handlerclass = ucfirst($table) . 'Handler';
|
$handlerclass = ucfirst($table) . 'Handler';
|
||||||
|
@@ -52,7 +52,7 @@ function sendCodebySMS($to, $username, $code) {
|
|||||||
$text = Config::lang_f('pPassword_recovery_sms_body', $code);
|
$text = Config::lang_f('pPassword_recovery_sms_body', $code);
|
||||||
|
|
||||||
$function = Config::read('sms_send_function');
|
$function = Config::read('sms_send_function');
|
||||||
if($function && is_callable($function)) {
|
if ($function && is_callable($function)) {
|
||||||
$result = $function($to, $text);
|
$result = $function($to, $text);
|
||||||
return $result !== false;
|
return $result !== false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user