PHP 8.1 fixes; fixed adding users
This commit is contained in:
@@ -253,6 +253,8 @@ class FronkDB {
|
||||
if(!is_array($fields)) {
|
||||
$fields=preg_split('/ ?, ?/',$fields);
|
||||
}
|
||||
|
||||
$fstr = "";
|
||||
|
||||
foreach($fields as $f)
|
||||
{
|
||||
|
||||
@@ -58,6 +58,10 @@ class mfBaseModel {
|
||||
}
|
||||
|
||||
public function load($row) {
|
||||
if(!is_object($this->data)) {
|
||||
$this->data = new stdClass();
|
||||
}
|
||||
|
||||
foreach($row as $field => $value) {
|
||||
if($this->fieldprefix) {
|
||||
if(preg_match('/^'.$this->fieldprefix.'_(.+)$/',$field,$m)) {
|
||||
|
||||
@@ -31,7 +31,7 @@ class mfRouter {
|
||||
if(defined("DEFAULT_ROUTE") && strlen(DEFAULT_ROUTE)) {
|
||||
$defroute=explode("_",DEFAULT_ROUTE);
|
||||
$this->default['mod']=$defroute[0];
|
||||
if($defroute[1]) {
|
||||
if(count($defroute) == 2 && $defroute[1]) {
|
||||
$this->default['action']=$defroute[1];
|
||||
}
|
||||
|
||||
@@ -49,9 +49,9 @@ class mfRouter {
|
||||
// get mod and action
|
||||
if(preg_match('/^([^_]+)(?:_(.+)?)?$/',$request['action'],$m)) {
|
||||
$umod = $m[1];
|
||||
$this->mod=$m[1];
|
||||
$this->action="Index";
|
||||
if($m[2]) {
|
||||
$this->mod = $m[1];
|
||||
$this->action = "Index";
|
||||
if(count($m) == 3 && $m[2]) {
|
||||
$uaction = $m[2];
|
||||
$this->action=$m[2];
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ class mfUser extends mfBaseModel {
|
||||
public $data;
|
||||
|
||||
|
||||
public function __construct() {
|
||||
public function __construct($_ = null) {
|
||||
$this->db=FronkDB::singleton();
|
||||
$this->log=mfLoghandler::singleton();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user