Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 2338

Přidáno uživatelem Ondřej Fibich před více než 10 roky(ů)

Merge oprav z 1.2 vetve:
- fixes #895: Nefunkcni upozorneni vybranych clenu pri pouziti ulozeneho dotazu (modifikace knihovny Filter_form)
- fixes #918: Aktivace monitoringu u vyfiltrovanych zarizeni
- drobne vylepseni filtru u monitoringu
- fixes #917: V seznamu IP adres je poslenich nekolik stran praznych

Zobrazit rozdíly:

freenetis/trunk/application/controllers/monitoring.php
$filter_form->add('device_name');
$filter_form->add('member_id')
->type('select')
->label('Member')
->values(ORM::factory('member')->select_list('id', 'name'));
$filter_form->add('member_name')
->callback('json/member_name');
$filter_form->add('state')
->type('select')
......
));
$filter_form->add('town')
->type('select')
->values(
array_unique(
ORM::factory('town')->select_list('town', 'town')
)
);
->type('combo')
->callback('json/town_name');
$filter_form->add('street')
->type('select')
->values(
array_unique(
ORM::factory('street')->select_list('street', 'street')
)
);
->type('combo')
->callback('json/street_name');
$filter_form->add('type')
->type('select')
......
if (!$action)
{
$action_options = array();
$do_id = isset($device) ? $device->user->member_id : NULL;
// access control
if ($this->acl_check_new('Monitoring_Controller', 'monitoring',
$device->user->member_id))
if ($this->acl_check_new('Monitoring_Controller', 'monitoring', $do_id))
{
$action_options['add'] = __('Add');
}
if ($this->acl_check_edit('Monitoring_Controller', 'monitoring',
$device->user->member_id))
if ($this->acl_check_edit('Monitoring_Controller', 'monitoring', $do_id))
{
$action_options['edit'] = __('Edit');
}
if ($this->acl_check_delete('Monitoring_Controller', 'monitoring',
$device->user->member_id))
if ($this->acl_check_delete('Monitoring_Controller', 'monitoring', $do_id))
{
$action_options['delete'] = __('Delete');
}
freenetis/trunk/application/libraries/Filter_form.php
$query = Input::instance()->get('query');
// load query from database
if ($query && is_numeric($query) && isset($this->queries[$query]))
// load query from database (because of #895 can be from different URL)
if ($query && is_numeric($query))
{
$data = json_decode($this->queries[$query]->values, TRUE);
$loaded_query = new Filter_query_Model($query);
if ($loaded_query && $loaded_query->id) {
$on = @$data["on"];
$types = @$data["types"];
$operations = @$data["opers"];
$values = @$data["values"];
$tables = @$data["tables"];
$data = json_decode($loaded_query->values, TRUE);
$on = @$data["on"];
$types = @$data["types"];
$operations = @$data["opers"];
$values = @$data["values"];
$tables = @$data["tables"];
$this->loaded_from_saved_query = TRUE;
}
else
{
$on = $types = $operations = $values = $tables = NULL;
status::warning('Invalid saved query');
}
$this->loaded_from_saved_query = TRUE;
$this->first_load = FALSE;
}
// load query from URL
else
{
{
$on = Input::instance()->get('on');
$types = Input::instance()->get('types');
$operations = Input::instance()->get('opers');
......
{
$data = json_decode($this->queries[$this->default_query_id]->values, TRUE);
$on = $data["on"];
$types = $data["types"];
$operations = $data["opers"];
$values = $data["values"];
$tables = $data["tables"];
$on = @$data["on"];
$types = @$data["types"];
$operations = @$data["opers"];
$values = @$data["values"];
$tables = @$data["tables"];
$this->can_add = FALSE;
$this->loaded_from_saved_query = TRUE;
freenetis/trunk/application/models/ip_address.php
LEFT JOIN members_whitelists mw ON mw.member_id = m.id AND
mw.since <= CURDATE() AND mw.until >= CURDATE()
WHERE ip.member_id IS NULL
GROUP BY ip.id
) ip
$where
")->current()->total;

Také k dispozici: Unified diff