diff --git a/CRM/CiviMobileAPI/ApiWrapper/EntityTag/Get.php b/CRM/CiviMobileAPI/ApiWrapper/EntityTag/Get.php
index ecbb5156b601805a696b35ef8998e28f3842e93d..1525393dccb8cb7bb911c8023c43b5df34d1ee39 100644
--- a/CRM/CiviMobileAPI/ApiWrapper/EntityTag/Get.php
+++ b/CRM/CiviMobileAPI/ApiWrapper/EntityTag/Get.php
@@ -27,9 +27,12 @@ class CRM_CiviMobileAPI_ApiWrapper_EntityTag_Get implements API_Wrapper {
*/
public function toApiOutput($apiRequest, $result) {
foreach ($result['values'] as &$value) {
+ if (empty($value['tag_id'])) {
+ continue;
+ }
+
try {
$tagInfo = civicrm_api3('Tag', 'getsingle', [
- 'sequential' => 1,
'id' => $value['tag_id'],
]);
} catch (CiviCRM_API3_Exception $e) {
diff --git a/CRM/CiviMobileAPI/Form/Settings.php b/CRM/CiviMobileAPI/Form/Settings.php
index 0e17a0d7995881d939c1dcb23754e9f2f407fa96..5211b4a30efb7336713bd3fe8f1a721b7e256b9b 100644
--- a/CRM/CiviMobileAPI/Form/Settings.php
+++ b/CRM/CiviMobileAPI/Form/Settings.php
@@ -1,27 +1,4 @@
exportValues();
if (!empty($params['_qf_Settings_submit'])) {
- if (!empty($params['civimobile_auto_update'])) {
- Civi::settings()->set('civimobile_auto_update', 1);
- }
- else {
- Civi::settings()->set('civimobile_auto_update', 0);
- }
-
if (empty($params['_qf_Settings_next'])) {
Civi::settings()->set('civimobile_server_key', $params['civimobile_server_key']);
- CRM_Core_Session::setStatus(ts('Server key updated'));
+ CRM_Core_Session::singleton()->setStatus(ts('Server key updated'), ts('CiviMobile Settings'), 'success');
}
}
elseif (!empty($params['_qf_Settings_next'])) {
@@ -186,7 +156,7 @@ class CRM_CiviMobileAPI_Form_Settings extends CRM_Core_Form {
$this->controller->setDestination(CRM_Utils_System::url('civicrm/civimobile/settings', http_build_query([])));
CRM_CiviMobileAPI_Utils_Extension::update();
- CRM_Core_Session::setStatus(ts('CiviMobile updated'));
+ CRM_Core_Session::singleton()->setStatus(ts('CiviMobile updated'), ts('CiviMobile Settings'), 'success');
}
}
catch (Exception $e) {
@@ -195,6 +165,12 @@ class CRM_CiviMobileAPI_Form_Settings extends CRM_Core_Form {
}
elseif (!empty($params['_qf_Settings_upload'])) {
$this->controller->setDestination(CRM_Utils_System::url('civicrm/civimobile/settings', http_build_query([])));
+ if (!empty($params['civimobile_auto_update'])) {
+ Civi::settings()->set('civimobile_auto_update', 1);
+ }
+ else {
+ Civi::settings()->set('civimobile_auto_update', 0);
+ }
if (!isset($params['civimobile_is_allow_public_info_api'])) {
$params['civimobile_is_allow_public_info_api'] = 0;
}
@@ -208,7 +184,7 @@ class CRM_CiviMobileAPI_Form_Settings extends CRM_Core_Form {
Civi::settings()->set('civimobile_is_allow_public_website_url_qrcode', $params['civimobile_is_allow_public_website_url_qrcode']);
Civi::settings()->set('civimobile_site_name_to_use', $params['civimobile_site_name_to_use']);
Civi::settings()->set('civimobile_custom_site_name', $params['civimobile_custom_site_name']);
- CRM_Core_Session::setStatus(ts('CiviMobile settings updated'));
+ CRM_Core_Session::singleton()->setStatus(ts('CiviMobile settings updated'), ts('CiviMobile Settings'), 'success');
}
}
diff --git a/civimobileapi.php b/civimobileapi.php
index b8f6a2ad9a09d45945bfd6de1b0b02fdf5152004..d79b9f3e3123081994654250579a333db7a59cd7 100644
--- a/civimobileapi.php
+++ b/civimobileapi.php
@@ -168,8 +168,10 @@ function civimobileapi_civicrm_apiWrappers(&$wrappers, $apiRequest) {
$wrappers[] = new CRM_CiviMobileAPI_ApiWrapper_Membership_Create();
}
- if ($apiRequest['action'] == 'getsingle' || $apiRequest['action'] == 'get') {
- $wrappers[] = new CRM_CiviMobileAPI_ApiWrapper_Membership_Get();
+ if (is_mobile_request()) {
+ if ($apiRequest['action'] == 'getsingle' || $apiRequest['action'] == 'get') {
+ $wrappers[] = new CRM_CiviMobileAPI_ApiWrapper_Membership_Get();
+ }
}
}
elseif ($apiRequest['entity'] == 'Relationship' && $apiRequest['action'] == 'get') {
diff --git a/info.xml b/info.xml
index de0414a6fdea797c446b9a2ab07852d42ad9aa37..60d0764fb3653fd97b32393bacf3b00304690c91 100644
--- a/info.xml
+++ b/info.xml
@@ -14,8 +14,8 @@
https://agiliway.com
http://www.gnu.org/licenses/agpl-3.0.html
- 2020-02-19
- 5.0.0
+ 2020-02-26
+ 5.0.1
stable
4.7