Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/ocsms.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2015-02-16 16:18:48 +0300
committerLoic Blot <loic.blot@unix-experience.fr>2015-02-16 16:18:48 +0300
commit77a9e9cccf306d87d468b4edc3079b80e1a7021e (patch)
tree3366435e9c65b98a21f286399292cc32a2a946d9 /controller
parent3774653643d6e5dc44e5bb2251752146f1c6224a (diff)
Load the country settings at app load
Diffstat (limited to 'controller')
-rw-r--r--controller/smscontroller.php11
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));
+ }
}