Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 1605

Přidáno uživatelem Ondřej Fibich před asi 12 roky(ů)

Opravy:

- oprava: nelze pripojit vice nez 2 zarizeni k lince typu Roaming (#255)

Zobrazit rozdíly:

freenetis/branches/testing/application/models/link.php
);
/**
* Max allowed interfaces in link
* Max allowed interfaces in link by type
*
* @var
* @var array
*/
private static $ifaces_count = array
(
Iface_Model::TYPE_WIRELESS => PHP_INT_MAX,
Iface_Model::TYPE_ETHERNET => 2,
Iface_Model::TYPE_PORT => 2,
Iface_Model::TYPE_INTERNAL => 0,
Iface_Model::TYPE_VLAN => 0,
Iface_Model::TYPE_BRIDGE => 0,
Iface_Model::TYPE_VIRTUAL_AP => PHP_INT_MAX
);
freenetis/branches/testing/application/controllers/ifaces.php
$c_form->dropdown('connected_to')
->style('width: 600px')
->options($devices)
->callback(array($this, 'valid_connect_to_iface'))
->add_button('devices', 'add_simple', $device->user_id);
$c_form->dropdown('connected_to_interface')
->style('width: 600px')
->options($ifaces)
->callback(array($this, 'valid_connect_to_iface'))
->add_button('ifaces');
$c_form->dropdown('link_id')
......
}
$iface = new Iface_Model($this->iface_id);
$roaming_id = ORM::factory('link')->get_roaming();
if ($link->ifaces->count() >= Link_Model::get_max_ifaces_count($this->input->post('itype')) &&
$link->id != $iface->link_id)
if ($link->ifaces->count() >= Link_Model::get_max_ifaces_count($this->iface_type) &&
$link->id != $iface->link_id && $link->id != $roaming_id)
{
$input->add_error('required', __(
'Limit of connected interfaces to link has been reached - ' .

Také k dispozici: Unified diff