[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [9519]
From: |
Torstein |
Subject: |
[Fmsystem-commits] [9519] |
Date: |
Wed, 06 Jun 2012 10:27:21 +0000 |
Revision: 9519
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9519
Author: vator
Date: 2012-06-06 10:27:21 +0000 (Wed, 06 Jun 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/controller/inc/class.socontrol.inc.php
trunk/controller/inc/class.uicontrol.inc.php
Modified: trunk/controller/inc/class.socontrol.inc.php
===================================================================
--- trunk/controller/inc/class.socontrol.inc.php 2012-06-06 10:27:11 UTC
(rev 9518)
+++ trunk/controller/inc/class.socontrol.inc.php 2012-06-06 10:27:21 UTC
(rev 9519)
@@ -145,7 +145,6 @@
$control->set_control_area_id($this->unmarshal($this->db->f('control_area_id',
true), 'int'));
$control->set_component_type_id($this->unmarshal($this->db->f('component_type_id',
true), 'int'));
$control->set_component_id($this->unmarshal($this->db->f('component_id', true),
'int'));
- //
$control->set_location_code($this->unmarshal($this->db->f('location_code',
true), 'string'));
$control->set_repeat_type($this->unmarshal($this->db->f('repeat_type', true),
'int'));
$control->set_repeat_type_label($this->unmarshal($this->db->f('repeat_type',
true), 'int'));
$control->set_repeat_interval($this->unmarshal($this->db->f('repeat_interval',
true), 'int'));
@@ -188,7 +187,6 @@
$control->set_control_area_name($this->unmarshal($this->db->f('control_area_name',
true), 'string'));
$control->set_component_type_id($this->unmarshal($this->db->f('component_type_id',
true), 'int'));
$control->set_component_id($this->unmarshal($this->db->f('component_id', true),
'int'));
- //
$control->set_location_code($this->unmarshal($this->db->f('location_code',
true), 'string'));
$control->set_repeat_type($this->unmarshal($this->db->f('repeat_type', true),
'int'));
$control->set_repeat_interval($this->unmarshal($this->db->f('repeat_interval',
true), 'int'));
@@ -371,8 +369,6 @@
$condition = join(' AND ', $clauses);
$tables = "controller_control";
- //$joins = " {$this->left_join} rental_document_types
ON (rental_document.type_id = rental_document_types.id)";
- //$joins = " {$this->left_join} controller_control_area
ON (controller_control.control_area_id = controller_control_area.id)";
$joins .= " {$this->left_join} controller_procedure ON
(controller_control.procedure_id = controller_procedure.id)";
$joins .= " {$this->left_join} fm_responsibility_role
ON (controller_control.responsibility_id = fm_responsibility_role.id)";
@@ -382,7 +378,7 @@
}
else
{
- $cols = 'controller_control.id,
controller_control.title, controller_control.description,
controller_control.start_date, controller_control.end_date,
controller_control.procedure_id, controller_control.control_area_id,
controller_control.requirement_id, controller_control.costresponsibility_id,
controller_control.responsibility_id, controller_control.component_type_id,
controller_control.component_id, controller_control.location_code,
controller_control.repeat_type, controller_control.repeat_interval,
controller_control.enabled, controller_procedure.title AS procedure_name,
fm_responsibility_role.name AS responsibility_name ';
+ $cols = 'controller_control.id,
controller_control.title, controller_control.description,
controller_control.start_date, controller_control.end_date,
controller_control.procedure_id, controller_control.control_area_id,
controller_control.requirement_id, controller_control.costresponsibility_id,
controller_control.responsibility_id, controller_control.component_type_id,
controller_control.component_id, controller_control.repeat_type,
controller_control.repeat_interval, controller_control.enabled,
controller_procedure.title AS procedure_name, fm_responsibility_role.name AS
responsibility_name ';
}
$dir = $ascending ? 'ASC' : 'DESC';
@@ -422,7 +418,6 @@
//
$control->set_control_group_id($this->unmarshal($this->db->f('control_group_id',
true), 'int'));
$control->set_component_type_id($this->unmarshal($this->db->f('component_type_id',
true), 'int'));
$control->set_component_id($this->unmarshal($this->db->f('component_id', true),
'int'));
-
//$control->set_location_code($this->unmarshal($this->db->f('location_code',
true), 'string'));
$control->set_repeat_type($this->unmarshal($this->db->f('repeat_type', true),
'int'));
$control->set_repeat_interval($this->unmarshal($this->db->f('repeat_interval',
true), 'int'));
}
@@ -466,7 +461,6 @@
$control->set_control_area_name($category[0]['name']);
$control->set_component_type_id($this->unmarshal($this->db->f('component_type_id',
true), 'int'));
$control->set_component_id($this->unmarshal($this->db->f('component_id', true),
'int'));
- //
$control->set_location_code($this->unmarshal($this->db->f('location_code',
true), 'string'));
$control->set_repeat_type($this->unmarshal($this->db->f('repeat_type', true),
'int'));
$control->set_repeat_type_label($control->get_repeat_type());
$control->set_repeat_interval($this->unmarshal($this->db->f('repeat_interval',
true), 'int'));
Modified: trunk/controller/inc/class.uicontrol.inc.php
===================================================================
--- trunk/controller/inc/class.uicontrol.inc.php 2012-06-06 10:27:11 UTC
(rev 9518)
+++ trunk/controller/inc/class.uicontrol.inc.php 2012-06-06 10:27:21 UTC
(rev 9519)
@@ -764,22 +764,18 @@
$value['ajax'] = array();
$value['actions'] = array();
$value['labels'] = array();
- //$value['parameters'] = array();
$value['ajax'][] = false;
$value['actions'][] =
html_entity_decode(self::link(array('menuaction' =>
'controller.uicontrol.view_control_details', 'id' => $value['control_id'])));
$value['labels'][] = lang('View control');
- //$value['parameters'][] = "control_id";
$value['ajax'][] = false;
$value['actions'][] =
html_entity_decode(self::link(array('menuaction' =>
'controller.uicontrol.view_locations_for_control', 'id' =>
$value['control_id'])));
$value['labels'][] = lang('View locations for control');
- //$value['parameters'][] = "control_id";
$value['ajax'][] = false;
$value['actions'][] =
html_entity_decode(self::link(array('menuaction' =>
'controller.uicheck_list.add_check_list', 'location_code' =>
$value['location_code'])));
$value['labels'][] = lang('add_check_list_to_location');
- //$value['parameters'][] = "control_id";
}
public function register_control_to_location()
@@ -826,11 +822,14 @@
$start_index = phpgw::get_var('startIndex', 'int');
$num_of_objects = phpgw::get_var('results', 'int',
'GET', $user_rows_per_page);
$sort_field = phpgw::get_var('sort');
+
if($sort_field == null)
{
$sort_field = 'control_group_id';
}
+
$sort_ascending = phpgw::get_var('dir') == 'desc' ?
false : true;
+
//Create an empty result set
$records = array();
@@ -843,18 +842,11 @@
$result_objects = $this->so->get($start_index,
$num_of_objects, $sort_field, $sort_ascending, $search_for, $search_type,
$filters);
$object_count = $this->so->get_count($search_for,
$search_type, $filters);
- //var_dump($result_objects);
$results = array();
foreach($result_objects as $control_obj)
{
-/* $obj_serialized = $control_obj->serialize();
- $obj_serialized['show_locations'] = array(
- 'href' =>
html_entity_decode(self::link(array('menuaction' =>
'controller.uicontrol.view_locations_for_control', 'id' =>
$result['location_id']))),
- 'label' =>
lang('show_controls_for_location')
- );
- $results['results'][] = $obj_serialized;*/
$results['results'][] =
$control_obj->serialize();
}
@@ -863,7 +855,6 @@
$results['sort'] = $params['sort'];
$results['dir'] = $params['dir'];
- //array_walk($results["results"], array($this,
"add_actions"), array($type));
array_walk($results["results"], array($this,
"_add_links"), "controller.uicontrol.view_control_details");
foreach($results["results"] as &$res) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [9519],
Torstein <=