diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2015-02-16 16:18:48 +0300 |
---|---|---|
committer | Loic Blot <loic.blot@unix-experience.fr> | 2015-02-16 16:18:48 +0300 |
commit | 77a9e9cccf306d87d468b4edc3079b80e1a7021e (patch) | |
tree | 3366435e9c65b98a21f286399292cc32a2a946d9 /controller | |
parent | 3774653643d6e5dc44e5bb2251752146f1c6224a (diff) |
Load the country settings at app load
Diffstat (limited to 'controller')
-rw-r--r-- | controller/smscontroller.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/controller/smscontroller.php b/controller/smscontroller.php index 29fe031..654110d 100644 --- a/controller/smscontroller.php +++ b/controller/smscontroller.php @@ -314,4 +314,15 @@ class SmsController extends Controller { $this->configMapper->set("country", $country); return new JSONResponse(array("status" => true, "msg" => "OK")); } + + /** + * @NoAdminRequired + */ + function getCountry() { + $country = $this->configMapper->getKey("country"); + if ($country === false) { + return new JSONResponse(array("status" => false)); + } + return new JSONResponse(array("status" => true, "country" => $country)); + } } |