fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [14890] bookingfrontend: active part of town only


From: Sigurd Nes
Subject: [Fmsystem-commits] [14890] bookingfrontend: active part of town only
Date: Sun, 03 Apr 2016 17:40:26 +0000

Revision: 14890
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14890
Author:   sigurdne
Date:     2016-04-03 17:40:26 +0000 (Sun, 03 Apr 2016)
Log Message:
-----------
bookingfrontend: active part of town only

Modified Paths:
--------------
    trunk/bookingfrontend/inc/class.uisearch.inc.php
    trunk/property/inc/class.solocation.inc.php

Modified: trunk/bookingfrontend/inc/class.uisearch.inc.php
===================================================================
--- trunk/bookingfrontend/inc/class.uisearch.inc.php    2016-04-02 17:54:09 UTC 
(rev 14889)
+++ trunk/bookingfrontend/inc/class.uisearch.inc.php    2016-04-03 17:40:26 UTC 
(rev 14890)
@@ -105,7 +105,8 @@
                        }
 //_debug_array($filter_tree);
 //die();
-                       $params['part_of_towns'] = 
execMethod('property.sogeneric.get_list', array('type' => 'part_of_town'));
+//                     $params['part_of_towns'] = 
execMethod('property.sogeneric.get_list', array('type' => 'part_of_town'));
+                       $params['part_of_towns'] = 
execMethod('property.solocation.get_booking_part_of_towns');
 
                        foreach ($params['part_of_towns'] as &$part_of_town)
                        {

Modified: trunk/property/inc/class.solocation.inc.php
===================================================================
--- trunk/property/inc/class.solocation.inc.php 2016-04-02 17:54:09 UTC (rev 
14889)
+++ trunk/property/inc/class.solocation.inc.php 2016-04-03 17:40:26 UTC (rev 
14890)
@@ -1981,7 +1981,7 @@
                                $values[] = array
                                        (
                                        'id' => $id,
-                                       'name' => $this->db->f('name')
+                                       'name' => $this->db->f('name',true)
                                );
                        }
                        return $values;
@@ -2014,4 +2014,23 @@
                        }
                        return $values;
                }
+
+               public function get_booking_part_of_towns( )
+               {
+                       $values = array();
+                       $sql = "SELECT DISTINCT fm_part_of_town.id, 
fm_part_of_town.name FROM"
+                       . " bb_building {$this->join} fm_locations ON 
bb_building.location_code = fm_locations.location_code"
+                       . " {$this->join} fm_location1 ON fm_locations.loc1 = 
fm_location1.loc1"
+                       . " {$this->join} fm_part_of_town ON 
fm_location1.part_of_town_id = fm_part_of_town.id ORDER BY name ASC";
+                       $this->db->query($sql, __LINE__, __FILE__);
+                       while ($this->db->next_record())
+                       {
+                               $values[] = array(
+                                       'id' => $this->db->f('id'),
+                                       'name' => $this->db->f('name',true)
+                               );
+                       }
+                       return $values;
+
+               }
        }
\ No newline at end of file




reply via email to

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