Added netzgebiet border polygon
This commit is contained in:
@@ -154,6 +154,15 @@ class ADBNetzgebietModel {
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("borderpoly", $filter)) {
|
||||
$borderpoly = $filter['borderpoly'];
|
||||
if($borderpoly === true) {
|
||||
$where .= " AND Netzgebiet.`borderpoly` IS NOT NULL";
|
||||
} elseif($borderpoly === false || $borderpoly === null) {
|
||||
$where .= " AND (Netzgebiet.`borderpoly` IS NULL OR Netzgebiet.`borderpoly` = '')";
|
||||
}
|
||||
}
|
||||
|
||||
//var_dump($filter, $where);exit;
|
||||
return $where;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ class Network extends mfBaseModel {
|
||||
private $roles;
|
||||
private $sections;
|
||||
private $buildings;
|
||||
private $adb_netzgebiet;
|
||||
|
||||
|
||||
public function getTypeAddresses($search_type) {
|
||||
@@ -139,6 +140,17 @@ class Network extends mfBaseModel {
|
||||
return $this->buildings;
|
||||
}
|
||||
|
||||
if($name == "adb_netzgebiet") {
|
||||
if(!$this->adb_netzgebiet_id) {
|
||||
return null;
|
||||
}
|
||||
$this->adb_netzgebiet = new ADBNetzgebiet($this->adb_netzgebiet_id);
|
||||
if(!$this->adb_netzgebiet->id) {
|
||||
return null;
|
||||
}
|
||||
return $this->adb_netzgebiet;
|
||||
}
|
||||
|
||||
$classname = ucfirst($name);
|
||||
$idfield = $name."_id";
|
||||
$this->$name = new $classname($this->$idfield);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
class Preordercampaign extends mfBaseModel {
|
||||
private $network;
|
||||
private $adb_netzgebiet;
|
||||
private $preorders;
|
||||
private $active_preorders;
|
||||
private $active_preorder_count = 0;
|
||||
@@ -200,6 +201,11 @@ class Preordercampaign extends mfBaseModel {
|
||||
return $this->corsorigins;
|
||||
}
|
||||
|
||||
if($name == "adb_netzgebiet") {
|
||||
if(!$this->network_id) return null;
|
||||
return $this->getProperty("network")->adb_netzgebiet;
|
||||
}
|
||||
|
||||
if($name == "creator") {
|
||||
$user = mfValuecache::singleton()->get("Worker-id-".$this->create_by);
|
||||
if($user) {
|
||||
|
||||
Reference in New Issue
Block a user