diff --git a/app/controllers/components/misc_function.php b/app/controllers/components/misc_function.php index e6270c350..be3ecab45 100644 --- a/app/controllers/components/misc_function.php +++ b/app/controllers/components/misc_function.php @@ -1812,32 +1812,6 @@ function GetDailyKanzashiCustomersLimit(&$controller, $dbname, $storecode, $ymd) return $result; } - /** - * Determine whether Facility is Enabled - * - * @param controller &$controller - * @param string $dbname - * @param int $storecode - * @return boolean - */ - function IsFacilityEnabled(&$controller, $dbname, $storecode) - { - $controller->Store->set_company_database($dbname, $controller->Store); - $query = " - SELECT * - FROM store_settings - WHERE - storecode = :storecode AND - optionname = 'FacilityEnabled' AND - optionvaluei = 1 - "; - - $param = compact('storecode'); - $result = $controller->Store->query($query, $param, false); - - return (bool)$result; - } - /** * Get the available Facilities * diff --git a/app/controllers/servers_controller.php b/app/controllers/servers_controller.php index 310dbd19b..faf54bdf1 100644 --- a/app/controllers/servers_controller.php +++ b/app/controllers/servers_controller.php @@ -1165,8 +1165,7 @@ class ServersController extends WebServicesController 'allstoretype' => 'tns:AllStoreTypes', 'KanzashiSalons' => 'tns:KanzashiSalons', 'KanzashiConfig' => 'tns:KanzashiConfig', - 'KanzashiInfo' => 'tns:KanzashiInfo', - 'FACILITY_ENABLED' => 'xsd:boolean' + 'KanzashiInfo' => 'tns:KanzashiInfo' )), '_AllStoreTypes' => array('struct' => array( @@ -3345,9 +3344,6 @@ function wsLogin($param) } } - $arrReturn['FACILITY_ENABLED'] = $this->MiscFunction - ->IsFacilityEnabled($this, $arrReturn['dbname'], $arrReturn['storecode']); - if ($arrReturn['YOYAKU_HYOU_OPEN_TIME'] == "") { $arrReturn['YOYAKU_HYOU_OPEN_TIME'] = $arrReturn['OPEN_TIME']; $arrReturn['YOYAKU_HYOU_CLOSE_TIME'] = $arrReturn['CLOSE_TIME']; @@ -9351,18 +9347,18 @@ function wsGetDataOfTheDay($sessionid, $param) $facilities['records'] = array(); #---------------------------------------------------------------------------------------------------------------- - if ($this->MiscFunction->IsFacilityEnabled($this, $storeinfo['dbname'], $param['STORECODE'])) { - $facilities = $this->MiscFunction - ->GetAvailableFacilities($this, $storeinfo['dbname']); + $facilities = $this->MiscFunction + ->GetAvailableFacilities($this, $storeinfo['dbname']); + if($facilities) { $programs = $this->MiscFunction-> GetFacilityPrograms($this, $storeinfo['dbname'], $storeinfo['companyid'], $param['STORECODE'], $param['date']); - + foreach($facilities['records'] as &$facility) { foreach($programs as &$program){ if($facility['Id'] != $program['FacilityId']) continue; - + $facility['Programs'][] = $program; unset($program); }