Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 1312

Přidáno uživatelem Michal Kliment před asi 13 roky(ů)

Oprava netvoreni povolene podsite pri presunu zarizeni mezi uzivately, viz http://vyuka.slavicin.unart.cz/mod/forum/discuss.php?d=1804

Zobrazit rozdíly:

freenetis/branches/testing/application/controllers/devices.php
$gpsy = gps::degrees2real($form->gpsy->value);
}
}
$old_user_id = $device->user_id;
$device->user_id = $form_data["user_id"];
$device->name = $form_data["name"];
......
$ap->save();
}
if ($old_user_id != $device->user_id)
{
$old_user = new User_Model($old_user_id);
$ip_address_model = new Ip_address_Model();
$ip_addresses = $ip_address_model->get_ip_addresses_of_device($device_id);
foreach ($ip_addresses as $ip_address)
{
// ip address was the only one of this member
// from this subnet -> deletes subnet from allowed subnets of member
if (!$ip_address_model->count_all_ip_addresses_by_member_and_subnet(
$old_user->member_id, $ip_address->subnet_id))
{
Allowed_subnets_Controller::update_enabled(
$old_user->member_id, NULL, NULL, array($ip_address->subnet_id)
);
}
Allowed_subnets_Controller::update_enabled(
$device->user->member_id, array($ip_address->subnet_id)
);
}
}
unset($form_data);
if ($device_saved)

Také k dispozici: Unified diff