Revize 1499
Přidáno uživatelem David Raška před asi 12 roky(ů)
freenetis/branches/network/application/i18n/cs_CZ/texts.php | ||
---|---|---|
'cannot load services - data missing' => 'Nemohu načíst služby - data chybí',
|
||
'cannot open uploaded bank listing file!' => 'Nelze otevřít nahraný soubor s bankovním výpisem!',
|
||
'cannot parse fio listing header!' => 'Nelze parsovat hlavičku Fio výpisu!',
|
||
'cannot remove default vlan' => 'Nelze odstranit výchozí VLAN',
|
||
'cannot save form' => 'Nemohu uložit formulář',
|
||
'cannot save gps, this address point has already gps coordinates' => 'Nemohu uložit GPS, adresní bod má již přiřazeny GPS souřadnice',
|
||
'cannot sent message to reciever' => 'Nelze odeslat zprávu příjemci',
|
freenetis/branches/network/application/models/ifaces_vlan.php | ||
---|---|---|
AND `iface_id` = ?
|
||
", $vlan_id, $port_iface_id);
|
||
}
|
||
|
||
/**
|
||
* Function returns true if vlan is default
|
||
*
|
||
* @param integer $vlan_id
|
||
* @param integer $port_iface_id
|
||
* @return bool
|
||
*/
|
||
public function is_default_vlan_port($vlan_id = null, $port_iface_id = null)
|
||
{
|
||
$result = $this->db->query("
|
||
SELECT port_vlan
|
||
FROM ifaces_vlans
|
||
WHERE iface_id = ?
|
||
AND vlan_id = ?
|
||
", $port_iface_id, $vlan_id)->current();
|
||
|
||
return ($result->port_vlan == 1);
|
||
}
|
||
|
||
}
|
freenetis/branches/network/application/controllers/vlans.php | ||
---|---|---|
Controller::error(RECORD);
|
||
}
|
||
|
||
//remove iface from bridge
|
||
$iv = new Ifaces_vlan_Model();
|
||
|
||
$delete_state = $iv->remove_vlan_from_port($port_iface_id,$vlan_id);
|
||
|
||
if ($delete_state)
|
||
if ($iv->is_default_vlan_port($vlan_id, $port_iface_id) == 1)
|
||
{
|
||
status::success('VLAN has been successfully removed.');
|
||
status::warning('Cannot remove default VLAN');
|
||
}
|
||
else
|
||
{
|
||
status::error('Error - cant remove VLAN.');
|
||
//remove iface from bridge
|
||
|
||
$delete_state = $iv->remove_vlan_from_port($port_iface_id, $vlan_id);
|
||
|
||
if ($delete_state)
|
||
{
|
||
status::success('VLAN has been successfully removed.');
|
||
}
|
||
else
|
||
{
|
||
status::error('Error - cant remove VLAN.');
|
||
}
|
||
}
|
||
|
||
|
||
$this->redirect(Path::instance()->previous());
|
||
}
|
||
|
Také k dispozici: Unified diff
Upravy:
- Pridana ochrana proti smazani defaultniho VLANu