PHP 8.1 fixes; fixed adding users
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
<?php
|
||||
if(!is_array($filter)) $filter = [];
|
||||
?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/header.php"); ?>
|
||||
|
||||
<!-- start page title -->
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
$pagination_baseurl = $this->getUrl($Mod,"Index");
|
||||
$pagination_baseurl_params = ["filter" => $filter];
|
||||
$pagination_entity_name = "CPEs";
|
||||
|
||||
?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/header.php"); ?>
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
$pagination_baseurl = $this->getUrl($Mod,"Index");
|
||||
$pagination_baseurl_params = ["filter" => $filter];
|
||||
$pagination_entity_name = "Leitungsbauaufträge";
|
||||
|
||||
if(!is_array($filter)) $filter = [];
|
||||
?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/header.php"); ?>
|
||||
<?php $wftype = "term"; ?>
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
$pagination_baseurl = $this->getUrl($Mod,"Index");
|
||||
$pagination_baseurl_params = ["filter" => $filter];
|
||||
$pagination_entity_name = "Patchungen";
|
||||
|
||||
if(!is_array($filter)) $filter = [];
|
||||
?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/header.php"); ?>
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
$pagination_baseurl = $this->getUrl($Mod,"Index");
|
||||
$pagination_baseurl_params = ["filter" => $filter];
|
||||
$pagination_entity_name = "Tiefbauaufträge";
|
||||
|
||||
if(!is_array($filter)) $filter = [];
|
||||
?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/header.php"); ?>
|
||||
<?php $wftype = "building"; ?>
|
||||
|
||||
@@ -221,7 +221,7 @@ class AddressModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
//var_dump($filter);exit;
|
||||
|
||||
@@ -104,7 +104,7 @@ class AddressFileModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ class AddressLinkModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
//var_dump($filter);exit;
|
||||
|
||||
@@ -102,7 +102,7 @@ class AddressattributeModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
if(array_key_exists("address_id", $filter)) {
|
||||
|
||||
@@ -108,7 +108,7 @@ class AddresstypeModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
/*
|
||||
|
||||
@@ -134,7 +134,7 @@ class BuildingModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ class BuildingFileModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ class BuildingstatusModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
if(array_key_exists("code", $filter)) {
|
||||
|
||||
@@ -75,7 +75,7 @@ class BuildingtypeModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
if(array_key_exists("name", $filter)) {
|
||||
|
||||
@@ -142,7 +142,7 @@ class ContractModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
$db = FronkDB::singleton();
|
||||
|
||||
@@ -82,7 +82,7 @@ class ContractconfigGroupModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
//var_dump($filter);exit;
|
||||
|
||||
@@ -82,7 +82,7 @@ class ContractconfigItemModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
//var_dump($filter);exit;
|
||||
|
||||
@@ -82,7 +82,7 @@ class ContractconfigValueModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
//var_dump($filter);exit;
|
||||
|
||||
@@ -81,6 +81,8 @@ class CpeprovisioningController extends mfBaseController {
|
||||
private function getPreparedFilter($filter) {
|
||||
$new_filter = [];
|
||||
|
||||
if(!is_array($filter)) $filter = [];
|
||||
|
||||
if(array_key_exists("hide_delayed_finish", $filter)) {
|
||||
if($filter["hide_delayed_finish"] == "1") {
|
||||
$new_filter["hide_delayed_finish"] = true;
|
||||
|
||||
@@ -139,7 +139,7 @@ class CpeprovisioningModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
if(array_key_exists("termination_id", $filter)) {
|
||||
|
||||
@@ -125,7 +125,7 @@ class CpeshippingFileModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
if(array_key_exists("file_id", $filter)) {
|
||||
|
||||
@@ -97,7 +97,7 @@ class FileModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
//var_dump($filter);exit;
|
||||
|
||||
@@ -62,7 +62,7 @@ class IvtCustomerModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
/*
|
||||
|
||||
@@ -123,7 +123,9 @@ class LineworkController extends mfBaseController {
|
||||
}
|
||||
}
|
||||
|
||||
if(is_array($networks) && count($networks)) {
|
||||
$term = reset(reset($networks));
|
||||
}
|
||||
$item_colspan = 0;
|
||||
$i = 0;
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ class NetworkModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
//var_dump($filter);exit;
|
||||
|
||||
@@ -93,7 +93,7 @@ class NetworkAddressModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
$db = FronkDB::singleton();
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ class NetworksectionModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
//var_dump($filter);exit;
|
||||
|
||||
@@ -93,7 +93,7 @@ class NewsModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
$db = FronkDB::singleton();
|
||||
|
||||
@@ -100,7 +100,7 @@ class OrderController extends mfBaseController {
|
||||
return true;
|
||||
}*/
|
||||
|
||||
if($filter['network_id']) {
|
||||
if(array_key_exists("network_id", $filter) && $filter['network_id']) {
|
||||
//$this->layout()->set("orders", OrderModel::search(['network_id' => $filter['network_id']]));
|
||||
$my_networks = [];
|
||||
$my_networks[] = new Network($filter['network_id']);
|
||||
@@ -231,10 +231,10 @@ class OrderController extends mfBaseController {
|
||||
$has_bras = false;
|
||||
$has_voice = false;
|
||||
foreach($order->products as $lop) {
|
||||
if(array_key_exists("bras_type", $lop->product->attributes) && $lop->product->attributes['bras_type']) {
|
||||
if(is_array($lop->product->attributes) && array_key_exists("bras_type", $lop->product->attributes) && $lop->product->attributes['bras_type']) {
|
||||
$has_bras = true;
|
||||
}
|
||||
if(array_key_exists("voip_chan", $lop->product->attributes) && $lop->product->attributes['voip_chan']) {
|
||||
if(is_array($lop->product->attributes) && array_key_exists("voip_chan", $lop->product->attributes) && $lop->product->attributes['voip_chan']) {
|
||||
$has_voice = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ class OrderModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
//var_dump($filter);exit;
|
||||
|
||||
@@ -102,7 +102,7 @@ class OrderFileModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ class OrderJournalModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
//var_dump($filter);exit;
|
||||
|
||||
@@ -113,7 +113,7 @@ class OrderProductModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
//var_dump($filter);exit;
|
||||
|
||||
@@ -112,6 +112,8 @@ class PatchingController extends mfBaseController {
|
||||
$new_filter = [];
|
||||
//var_dump($filter);
|
||||
|
||||
if(!is_array($filter)) $filter = [];
|
||||
|
||||
if(array_key_exists("hide_delayed_finish", $filter)) {
|
||||
if($filter["hide_delayed_finish"] == "1") {
|
||||
$new_filter["hide_delayed_finish"] = true;
|
||||
|
||||
@@ -291,7 +291,7 @@ class PatchingModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getTerminationSqlFilter($filter = []) {
|
||||
private static function getTerminationSqlFilter($filter = []) {
|
||||
$where = "1=1 ";
|
||||
if(!is_array($filter) || !count($filter)) {
|
||||
return $where;
|
||||
@@ -358,7 +358,7 @@ class PatchingModel {
|
||||
return $where;
|
||||
}
|
||||
|
||||
private function getPatchingSqlFilter($filter = []) {
|
||||
private static function getPatchingSqlFilter($filter = []) {
|
||||
$where = "1=1 ";
|
||||
if(!is_array($filter) || !count($filter)) {
|
||||
return $where;
|
||||
|
||||
@@ -119,8 +119,11 @@ class PipeworkController extends mfBaseController {
|
||||
$networks[$b->network->name][$b->id] = $b;
|
||||
}
|
||||
}
|
||||
|
||||
if(is_array($networks) && count($networks)) {
|
||||
$building = reset(reset($networks));
|
||||
} else {
|
||||
$building = [];
|
||||
}
|
||||
$item_colspan = 0;
|
||||
$i = 0;
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ class PopModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
//var_dump($filter);exit;
|
||||
|
||||
@@ -109,7 +109,7 @@ class PreorderModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
//var_dump($filter);exit;
|
||||
|
||||
@@ -88,7 +88,7 @@ class PreordercampaignModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
//var_dump($filter);exit;
|
||||
|
||||
@@ -81,7 +81,7 @@ class PreordercampaignTypeModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
//var_dump($filter);exit;
|
||||
|
||||
@@ -115,7 +115,7 @@ class ProductModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
$db = FronkDB::singleton();
|
||||
|
||||
@@ -94,7 +94,7 @@ class ProductAttributeModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
$db = FronkDB::singleton();
|
||||
|
||||
@@ -93,7 +93,7 @@ class ProductNetworkModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
$db = FronkDB::singleton();
|
||||
|
||||
@@ -95,7 +95,7 @@ class ProductgroupModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
$db = FronkDB::singleton();
|
||||
|
||||
@@ -96,7 +96,7 @@ class ProducttechModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
$db = FronkDB::singleton();
|
||||
|
||||
@@ -97,7 +97,7 @@ class ProducttechAttributeModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
$db = FronkDB::singleton();
|
||||
|
||||
@@ -94,7 +94,7 @@ class SlaModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
$db = FronkDB::singleton();
|
||||
|
||||
@@ -124,7 +124,7 @@ class TerminationModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
//var_dump($filter);exit;
|
||||
|
||||
@@ -106,7 +106,7 @@ class TerminationFileModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ class TerminationstatusModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
if(array_key_exists("code", $filter)) {
|
||||
|
||||
@@ -92,6 +92,9 @@ class UserController extends mfBaseController {
|
||||
}
|
||||
|
||||
$user = new User($id);
|
||||
if(!$user->permissions) {
|
||||
$user->permissions = new WorkerPermission();
|
||||
}
|
||||
if($r->username) {
|
||||
$user->username = $r->username;
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ class UserModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
//var_dump($filter);exit;
|
||||
|
||||
@@ -115,7 +115,7 @@ class VoicenumberModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$db = FronkDB::singleton();
|
||||
$where = "1=1 ";
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ class VoicenumberblockModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$db = FronkDB::singleton();
|
||||
$where = "1=1 ";
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ class WorkflowitemModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
//var_dump($filter);exit;
|
||||
|
||||
@@ -109,7 +109,7 @@ class WorkflowvalueModel {
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function getSqlFilter($filter) {
|
||||
private static function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
//var_dump($filter);exit;
|
||||
|
||||
@@ -254,6 +254,8 @@ class FronkDB {
|
||||
$fields=preg_split('/ ?, ?/',$fields);
|
||||
}
|
||||
|
||||
$fstr = "";
|
||||
|
||||
foreach($fields as $f)
|
||||
{
|
||||
$fstr.=",`$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];
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class mfRouter {
|
||||
$umod = $m[1];
|
||||
$this->mod = $m[1];
|
||||
$this->action = "Index";
|
||||
if($m[2]) {
|
||||
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