Revize c1bdc1c4
Přidáno uživatelem Michal Kliment před více než 9 roky(ů)
application/controllers/logs.php | ||
---|---|---|
*/
|
||
public function show_all($limit_results = 50, $page_word = null, $page = 1)
|
||
{
|
||
if (!$this->acl_check_view('Settings_Controller', 'system'))
|
||
if (!$this->acl_check_view('Logs_Controller', 'logs'))
|
||
Controller::error(ACCESS);
|
||
|
||
if (Settings::get('action_logs_active') != 1)
|
||
url::redirect('settings/logging');
|
||
|
||
// gets new selector
|
||
if (is_numeric($this->input->get('record_per_page')))
|
||
$limit_results = (int) $this->input->get('record_per_page');
|
||
if (is_numeric($this->input->post('record_per_page')))
|
||
$limit_results = (int) $this->input->post('record_per_page');
|
||
|
||
$filter_form = new Filter_form('l');
|
||
|
||
... | ... | |
->values(array
|
||
(
|
||
Log_Model::ACTION_ADD => __('Added'),
|
||
Log_Model::ACTION_DELETE => __('Deleted'),
|
||
Log_Model::ACTION_UPDATE => __('Updated')
|
||
Log_Model::ACTION_DELETE => __('Deleted'),
|
||
Log_Model::ACTION_UPDATE => __('Updated')
|
||
));
|
||
|
||
$filter_form->add('object_id')
|
||
... | ... | |
public function show_by_user($user_id = null, $limit_results = 200,
|
||
$page_word = null, $page = 1)
|
||
{
|
||
if (!$this->acl_check_view('Settings_Controller', 'system'))
|
||
if (!$this->acl_check_view('Logs_Controller', 'logs'))
|
||
Controller::error(ACCESS);
|
||
|
||
if (!isset($user_id))
|
||
... | ... | |
Controller::error(RECORD);
|
||
|
||
// gets new selector
|
||
if (is_numeric($this->input->get('record_per_page')))
|
||
$limit_results = (int) $this->input->get('record_per_page');
|
||
if (is_numeric($this->input->post('record_per_page')))
|
||
$limit_results = (int) $this->input->post('record_per_page');
|
||
|
||
$log_model = new Log_Model();
|
||
|
||
... | ... | |
->callback('callback::log_action_field');
|
||
|
||
$grid->field('table_name')
|
||
->label(__('Table'));
|
||
->label('Table');
|
||
|
||
$grid->callback_field('object_id')
|
||
->label('Object')
|
||
... | ... | |
|
||
$breadcrumbs = breadcrumbs::add()
|
||
->link('logs/show_all', 'Action logs',
|
||
$this->acl_check_view('Settings_Controller', 'system'))
|
||
$this->acl_check_view('Logs_Controller', 'logs'))
|
||
->text($user->get_full_name() . ': ' . $user->login);
|
||
|
||
$view = new View('main');
|
||
... | ... | |
$table, $object_id = null, $limit_results = 200,
|
||
$page_word = null, $page = 1)
|
||
{
|
||
if (!$this->acl_check_view('Settings_Controller', 'system'))
|
||
if (!$this->acl_check_view('Logs_Controller', 'logs'))
|
||
Controller::error(ACCESS);
|
||
|
||
if (!is_numeric($object_id) || !is_string($table))
|
||
... | ... | |
url::redirect('settings/logging');
|
||
|
||
// gets new selector
|
||
if (is_numeric($this->input->get('record_per_page')))
|
||
$limit_results = (int) $this->input->get('record_per_page');
|
||
if (is_numeric($this->input->post('record_per_page')))
|
||
$limit_results = (int) $this->input->post('record_per_page');
|
||
|
||
$log_model = new Log_Model();
|
||
|
||
... | ... | |
);
|
||
|
||
// create grid
|
||
$grid = new Grid(url_lang::base() . 'logs/show_all', '', array
|
||
$grid = new Grid('logs/show_all', '', array
|
||
(
|
||
'use_paginator' => true,
|
||
'use_selector' => true,
|
||
... | ... | |
|
||
$breadcrumbs = breadcrumbs::add()
|
||
->link('logs/show_all', 'Action logs',
|
||
$this->acl_check_view('Settings_Controller', 'system'))
|
||
$this->acl_check_view('Logs_Controller', 'logs'))
|
||
->disable_translation()
|
||
->text(__('Object') . ' ' . $table . ':' . $object_id);
|
||
|
Také k dispozici: Unified diff
Release 1.1.0