fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [9761]


From: Torstein
Subject: [Fmsystem-commits] [9761]
Date: Wed, 11 Jul 2012 12:40:47 +0000

Revision: 9761
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9761
Author:   vator
Date:     2012-07-11 12:40:47 +0000 (Wed, 11 Jul 2012)
Log Message:
-----------


Modified Paths:
--------------
    trunk/controller/inc/class.socontrol_area.inc.php

Modified: trunk/controller/inc/class.socontrol_area.inc.php
===================================================================
--- trunk/controller/inc/class.socontrol_area.inc.php   2012-07-11 12:40:36 UTC 
(rev 9760)
+++ trunk/controller/inc/class.socontrol_area.inc.php   2012-07-11 12:40:47 UTC 
(rev 9761)
@@ -39,7 +39,7 @@
                /**
                 * Get a static reference to the storage object associated with 
this model object
                 *
-                * @return controller_soparty the storage object
+                * @return controller_socontrol_area storage object
                 */
                public static function get_instance()
                {
@@ -51,14 +51,13 @@
                }
 
                /**
-                * Function for adding a new activity to the database. Updates 
the activity object.
+                * Add new control area to the database.
                 *
-                * @param activitycalendar_activity $activity the party to be 
added
-                * @return bool true if successful, false otherwise
+                * @param control area object 
+                * @return true if successful, false otherwise
                 */
                function add(&$control_area)
                {
-
                        $control_area = $control_area->get_control_area();
 
                        $sql = "INSERT INTO controller_control_area (type_name) 
VALUES ('$title')";
@@ -74,16 +73,14 @@
                        {
                                return false;
                        }
-
                }
 
                /**
-                * Update the database values for an existing activity object.
+                * Update the database values for an existing control area 
object.
                 *
-                * @param $activity the activity to be updated
+                * @param $control_area the control area to be updated
                 * @return boolean true if successful, false otherwise
                 */
-
                function update($control_area)
                {
                        $id = intval($control_area->get_id());
@@ -92,17 +89,16 @@
                                '$type_name = ' . 
$this->marshal($control_area->get_type_name(), 'string')
                        );
 
-                       //var_dump('UPDATE activity_activity SET ' . join(',', 
$values) . " WHERE id=$id");
                        $result = $this->db->query('UPDATE 
controller_control_area SET ' . join(',', $values) . " WHERE id=$id", 
__LINE__,__FILE__);
 
                        return isset($result);
                }
 
                /**
-                * Get single procedure
+                * Get single control area
                 * 
-                * @param       $id     id of the procedure to return
-                * @return a controller_procedure
+                * @param       $id     id of the control area to be returned
+                * @return control area object
                 */
                function get_single($id)
                {
@@ -119,7 +115,7 @@
                }
 
                /**
-                * Get a list of procedure objects matching the specific filters
+                * Get a list of control area objects matching the specific 
filters
                 * 
                 * @param $start search result offset
                 * @param $results number of results to return
@@ -132,14 +128,13 @@
                {
                        $results = array();
 
-                       //$condition = $this->get_conditions($query, 
$filters,$search_option);
                        $order = $sort ? "ORDER BY $sort $dir ": '';
 
-                       //$sql = "SELECT * FROM controller_procedure WHERE 
$condition $order";
                        $sql = "SELECT * FROM controller_control_area $order";
                        $this->db->limit_query($sql, $start, __LINE__, 
__FILE__, $limit);
 
-                       while ($this->db->next_record()) {
+                       while ($this->db->next_record()) 
+                       {
                                $control_area = new 
controller_control_area($this->unmarshal($this->db->f('id', true), 'int'));
                                
$control_area->set_title($this->unmarshal($this->db->f('title', true), 
'string'));
 
@@ -149,18 +144,27 @@
                        return $results;
                }
 
+               /**
+                * Get a list of control area arrays matching the specific 
filters
+                * 
+                * @param $start search result offset
+                * @param $results number of results to return
+                * @param $sort field to sort by
+                * @param $query LIKE-based query string
+                * @param $filters array of custom filters
+                * @return list of rental_composite objects
+                */
                function get_control_areas_as_array($start = 0, $results = 
1000, $sort = null, $dir = '', $query = null, $search_option = null, $filters = 
array())
                {
                        $results = array();
 
-                       //$condition = $this->get_conditions($query, 
$filters,$search_option);
                        $order = $sort ? "ORDER BY $sort $dir ": '';
 
-                       //$sql = "SELECT * FROM controller_procedure WHERE 
$condition $order";
                        $sql = "SELECT * FROM controller_control_area $order";
                        $this->db->limit_query($sql, $start, __LINE__, 
__FILE__, $limit);
 
-                       while ($this->db->next_record()) {
+                       while ($this->db->next_record()) 
+                       {
                                $control_area = new 
controller_control_area($this->unmarshal($this->db->f('id', true), 'int'));
                                
$control_area->set_title($this->unmarshal($this->db->f('title', true), 
'string'));
 
@@ -183,58 +187,8 @@
                                return $results;
                }
 
-               function get_id_field_name($extended_info = false)
-               {
-                       /*
-                       if(!$extended_info)
-                       {
-                               $ret = 'id';
-                       }
-                       else
-                       {
-                               $ret = array
-                               (
-                                       'table'                 => 'activity', 
// alias
-                                       'field'                 => 'id',
-                                       'translated'    => 'id'
-                               );
-                       }
-                       */
-                       return $ret;
-               }
+               function get_id_field_name($extended_info = false){}
 
-               protected function get_query(string $sort_field, boolean 
$ascending, string $search_for, string $search_type, array $filters, boolean 
$return_count)
-               {
-
-
-               }
-
-               function populate(int $control_area_id, &$control_area)
-               {
-                       /*
-                       if($control_area == null) {
-                               $control_area = new 
activitycalendar_activity((int) $activity_id);
-
-                               
$control_area->set_title($this->unmarshal($this->db->f('title'), 'string'));
-                               
$control_area->set_organization_id($this->unmarshal($this->db->f('organization_id'),
 'int'));
-                               
$control_area->set_type_id($this->unmarshal($this->db->f('type_id'), 'int'));
-                               
$control_area->set_district($this->unmarshal($this->db->f('district'), 'int'));
-                               
$control_area->set_office($this->unmarshal($this->db->f('office'), 'int'));
-                               
$control_area->set_category($this->unmarshal($this->db->f('category'), 'int'));
-                               
$control_area->set_state($this->unmarshal($this->db->f('state'), 'int'));
-                               
$control_area->set_target($this->unmarshal($this->db->f('target'), 'string'));
-                               
$control_area->set_description($this->unmarshal($this->db->f('description'), 
'string'));
-                               
$control_area->set_arena($this->unmarshal($this->db->f('arena'), 'string'));
-                               
$control_area->set_internal_arena($this->unmarshal($this->db->f('internal_arena'),
 'string'));
-                               
$control_area->set_time($this->unmarshal($this->db->f('time'), 'string'));
-                               
$control_area->set_last_change_date($this->unmarshal($this->db->f('last_change_date'),
 'int'));
-                               
$control_area->set_special_adaptation($this->unmarshal($this->db->f('special_adaptation',
 'bool')));
-                               
$control_area->set_secret($this->unmarshal($this->db->f('secret'), 'string'));
-
-
-                       }
-                       */
-                       return $control_area;
-               }
-
+               protected function get_query(string $sort_field, boolean 
$ascending, string $search_for, string $search_type, array $filters, boolean 
$return_count){}
+               protected function populate(int $object_id, &$object){}
        }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]