Changeset 8fd7454 for src/webapp/webservice/inc/GnuBoat/Service.php
- Timestamp:
- Dec 10, 2017, 4:32:57 PM (9 years ago)
- Branches:
- debian/bullseye, debian/jessie
- Children:
- ce5244e
- Parents:
- c810990 (diff), 8ef59a1 (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. - File:
-
- 1 edited
-
src/webapp/webservice/inc/GnuBoat/Service.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/webapp/webservice/inc/GnuBoat/Service.php
rc810990 r8fd7454 44 44 $this->process(); 45 45 } 46 47 public static function errorStatic($message, $additionalContent = array(), $debug) 48 { 49 error_log($message); 50 if($debug > 0) 51 print $message ."\n"; 52 $result = ["error" => 1, "errormessage" => $message]; 53 Service::outputStatic(array_merge($result, $additionalContent), $debug); 54 } 55 56 public static function outputStatic($content, $debug) 57 { 58 header('Content-Type: application/json'); 59 if($debug > 0){ 60 echo json_encode($content, JSON_PRETTY_PRINT) ."\n"; 61 } 62 else{ 63 echo json_encode($content) ."\n"; 64 } 65 } 66 67 protected function error($message, $additionalContent = array()) 68 { 69 Service::errorStatic($message, $additionalContent, $this->debug()); 70 } 71 72 protected function output($content) 73 { 74 Service::outputStatic($content, $this->debug()); 75 } 46 76 47 77 /**
Note:
See TracChangeset
for help on using the changeset viewer.
