Changeset 04de4a4 for src/webapp/webservice
- Timestamp:
- Aug 23, 2016, 12:05:09 AM (10 years ago)
- Branches:
- 0.5, app-cordova, debian/bullseye, debian/jessie, master
- Children:
- 3f77ad0
- Parents:
- 2925c4a (diff), 9be4f3f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- src/webapp/webservice
- Files:
-
- 2 edited
-
inc/Config.php (modified) (1 diff)
-
index.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/webapp/webservice/inc/Config.php
r2925c4a r04de4a4 38 38 } 39 39 40 public function shutdownRequestFile(){ 41 if(array_key_exists("shutdownfile", $this->_config)) 42 return $this->_config["shutdownfile"]; 43 return "/var/spool/gnuboat/shutdown.request"; 44 } 45 40 46 public function dataDirectory(){ 41 47 if(array_key_exists("datadirectory", $this->_config)) -
src/webapp/webservice/index.php
r2925c4a r04de4a4 92 92 if(!is_numeric($tmp[$key]) || is_nan($tmp[$key])){ 93 93 $allValid = false; 94 if($debug > 1){ 95 echo "Invalid value ". $key ." (". $tmp[$key] .") at time ". $time ."<br/>"; 96 } 94 97 } 95 98 elseif(array_key_exists($key, $configRound) && is_integer($configRound[$key])) … … 98 101 } 99 102 // only add the timeframe to the track, if the values are valid and we had a gps fix at that time 100 if($allValid && $tmp["gpsfix"] != "-"){ 101 echo "want to add ". $time ."<br/>\n"; 102 if(!array_key_exists($time, $result["track"])){ 103 if($allValid){ 104 if(!array_key_exists($time, $result["track"])){ 103 105 $result["track"][$time] = $tmp; 104 }106 } 105 107 $lastTime = $time; 106 108 } … … 131 133 $result = array(); 132 134 if($request == REQUEST_SHUTDOWN){ 133 $handle = @fopen( "/var/spool/gnuboat/shutdown.request", "w");135 $handle = @fopen($config->shutdownRequestFile(), "w"); 134 136 if($handle === false){ 135 $message = "Could not create file to indicate shutdown to the daemon (Timezone: ". date_default_timezone_get() .")";137 $message = "Could not create file (". $config->shutdownRequestFile() .") to indicate shutdown to the daemon (Timezone: ". date_default_timezone_get() .")"; 136 138 if($debug > 0) 137 139 echo $message;
Note:
See TracChangeset
for help on using the changeset viewer.
