diff options
Diffstat (limited to 'admin/survey/modules/mod_MAZA')
-rw-r--r-- | admin/survey/modules/mod_MAZA/class.MAZA.php | 13 | ||||
-rw-r--r-- | admin/survey/modules/mod_MAZA/js/MAZA.js | 2 |
2 files changed, 6 insertions, 9 deletions
diff --git a/admin/survey/modules/mod_MAZA/class.MAZA.php b/admin/survey/modules/mod_MAZA/class.MAZA.php index c430546..5c67424 100644 --- a/admin/survey/modules/mod_MAZA/class.MAZA.php +++ b/admin/survey/modules/mod_MAZA/class.MAZA.php @@ -1115,12 +1115,11 @@ class MAZA { * @return type - json result of curl output
*/
private function send_FCM_mesage_curl($fields){
- #API access key from Google API's Console
- global $FCM_server_key;
+ #API access key from Google API's Console
$headers = array
(
- 'Authorization: key=' . $FCM_server_key,
+ 'Authorization: key=' . AppSettings::getInstance()->getSetting('maza-FCM_server_key'),
'Content-Type: application/json'
);
#Send Reponse To FireBase Server
@@ -1339,7 +1338,7 @@ class MAZA { * @param type $tactivity_id - id of triggered activity
* @param type $mode - mode of survey (repeater, geofence, activity, entry)
*/
- public function maza_save_srv_user($maza_uid, $srv_uid, $srv_version, $tgeofence_id=null, $tactivity_id=null, $mode) {
+ public function maza_save_srv_user($maza_uid, $srv_uid, $srv_version, $tgeofence_id=null, $tactivity_id=null, $mode=null) {
//check if pair already existst in DB
$sql = sisplet_query("SELECT * FROM maza_srv_users WHERE maza_user_id='$maza_uid' AND srv_user_id='$srv_uid'");
//it is already there
@@ -1790,16 +1789,14 @@ class MAZA { * @param type $password - passwor to set in nextpin for this user
*/
public function nextpin_create_user($identifier, $password){
- #credentials to use nextpin API
- global $NextPinMainToken;
-
+ #credentials to use nextpin API
$fields = array
(
'username' => $this->nextpin_token_prefix . $identifier,
'password' => $password
);
- $this -> nextpin_API_call($NextPinMainToken, $fields, 'auth/createUser');
+ $this -> nextpin_API_call(AppSettings::getInstance()->getSetting('maza-NextPinMainToken'), $fields, 'auth/createUser');
}
/**
diff --git a/admin/survey/modules/mod_MAZA/js/MAZA.js b/admin/survey/modules/mod_MAZA/js/MAZA.js index a229c26..7d96c15 100644 --- a/admin/survey/modules/mod_MAZA/js/MAZA.js +++ b/admin/survey/modules/mod_MAZA/js/MAZA.js @@ -476,7 +476,7 @@ function maza_klikNaMapo() { maza_saveGeofence(data.formatted_address, maza_create_basic_circle(pos, data.formatted_address, maza_default_radius, false));
} else {
//odpre se okno, ce je prislo do napake - null - (mozen je tudi prekratek delay med geocoding requesti)
- alert(lang['srv_resevanje_alert_location_not_found_map']);
+ genericAlertPopup('srv_resevanje_alert_location_not_found_map');
}
});
|