Changed to rimo impot
This commit is contained in:
@@ -88,6 +88,15 @@ class ADBHausnummerModel {
|
||||
$res = $db->query($sql);
|
||||
if($db->num_rows($res)) {
|
||||
$data = $db->fetch_object($res);
|
||||
|
||||
// search in cache
|
||||
$item = mfValuecache::singleton()->get("mfObjectmodel-adb_hausnummer-".$data->id);
|
||||
if($item && $item->id) {
|
||||
mfValuecache::singleton()->set("mfObjectmodel-adb_hausnummer-".$data->id, $item);
|
||||
return $item;
|
||||
}
|
||||
// if not in cache, load regularly
|
||||
|
||||
$item = new ADBHausnummer($data);
|
||||
if($item->id) {
|
||||
return $item;
|
||||
@@ -220,7 +229,15 @@ class ADBHausnummerModel {
|
||||
}
|
||||
|
||||
while($data = $db->fetch_object($res)) {
|
||||
$items[] = new ADBHausnummer($data);
|
||||
$item = mfValuecache::singleton()->get("mfObjectmodel-adb_hausnummer-".$data->id);
|
||||
if($item && $item->id) {
|
||||
$items[] = $item;
|
||||
} else {
|
||||
$item = new ADBHausnummer($data);
|
||||
mfValuecache::singleton()->set("mfObjectmodel-adb_hausnummer-".$data->id, $item);
|
||||
$items[] = $item;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return $items;
|
||||
|
||||
Reference in New Issue
Block a user