Changed to rimo impot
This commit is contained in:
@@ -665,9 +665,7 @@ class Preorder extends mfBaseModel {
|
||||
|
||||
foreach(ADBStatusflagModel::getAll() as $hflag) {
|
||||
$val = $hausnummer->statusflags[$hflag->id]->value->value;
|
||||
/*if($hflag->code == 141) {
|
||||
var_dump($hausnummer->statusflags[$hflag->id],$hausnummer->statusflags[$hflag->id]->value);exit;
|
||||
}*/
|
||||
if(!$val) continue; // only set flags from 0 to 1
|
||||
|
||||
$pflag = PreorderStatusflagModel::getFirst(["preorder_id" => $this->id, "code" => $hflag->code]);
|
||||
if(!$pflag) {
|
||||
@@ -676,9 +674,6 @@ class Preorder extends mfBaseModel {
|
||||
}
|
||||
$pflag->preorder_id = $this->id;
|
||||
|
||||
if($hflag->code == 141) {
|
||||
var_dump($pflag, $pflag->value, $val);
|
||||
}
|
||||
if($pflag->value->value != $val) {
|
||||
$pflag->value->value = $val;
|
||||
$pflag->value->save();
|
||||
|
||||
@@ -276,6 +276,7 @@ class PreorderModel
|
||||
// if not in cache, load regularly
|
||||
$item = new Preorder($data);
|
||||
if ($item->id) {
|
||||
mfValuecache::singleton()->set("mfObjectmodel-preorder-".$data->id, $item);
|
||||
return $item;
|
||||
} else {
|
||||
return null;
|
||||
@@ -570,7 +571,9 @@ class PreorderModel
|
||||
if($item) {
|
||||
$items[] = $item;
|
||||
} else {
|
||||
$items[] = new Preorder($data);
|
||||
$item = new Preorder($data);
|
||||
mfValuecache::singleton()->set("mfObjectmodel-preorder-".$data->id, $item);
|
||||
$items[] = $item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user