heavy code cleanup in the webui

This commit is contained in:
SJ
2013-02-11 20:24:19 +01:00
parent 5286bc7d1c
commit 5535a64de4
76 changed files with 1914 additions and 3744 deletions

View File

@ -7,7 +7,7 @@ class ControllerAuditAudit extends Controller {
$this->id = "content";
$this->template = "audit/audit.tpl";
$this->layout = "common/layout";
$this->layout = "common/layout-audit";
$request = Registry::get('request');
$db = Registry::get('db');
@ -15,56 +15,9 @@ class ControllerAuditAudit extends Controller {
$this->load->model('audit/audit');
/*if(isset($this->request->post['searchterm'])) {
$this->fixup_post_request();
$a = preg_replace("/\&loaded=1$/", "", $this->request->post['searchterm']);
}*/
$this->render();
}
private function fixup_post_request() {
$i = 0;
$a = array();
$this->data['blocks'] = array();
$this->data['searchterm'] = $this->request->post['searchterm'];
parse_str($this->request->post['searchterm'], $a);
foreach($a['f'] as $f) {
$val = array_shift($a['v']);
if($val == '') { continue; }
if($i == 0) {
$this->data['key0'] = 0;
if($f == 'user') { $this->data['key0'] = 0; }
else if($f == 'ipaddr') { $this->data['key0'] = 1; }
else if($f == 'ref') { $this->data['key0'] = 2; }
$this->data['val0'] = $val;
}
$i++;
}
if(isset($a['date1'])) { $this->data['date1'] = $a['date1']; }
if(isset($a['date2'])) { $this->data['date2'] = $a['date2']; }
if(isset($a['action'])) { $this->data['action'] = $a['action']; }
}
}
?>