summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
diff options
context:
space:
mode:
authorJoe7 <jozsef.rnagy@site.hu>2011-01-12 00:05:11 +0100
committerJoe7 <jozsef.rnagy@site.hu>2011-01-12 00:05:11 +0100
commit049f2af1c982bb12fee6e5512e4830f63d06d343 (patch)
tree88a5fa6e141b92b0ca4f92172e41db3f610b2ec9 /modules/gallery/helpers
parentd74aad072d8ccca70efb1c8b673e8368566a1974 (diff)
Returning 2 flags from l10n_client::validate_api_key(), 1 to reflect if connection was built up properly (just a boolean, not distuingishing between reasons in case of a failure), the other to reflect API validating success status.
Using this presenting a slightly more meaningfull error msg to user in case the connection would fail. Fixes Ticket #1504
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r--modules/gallery/helpers/l10n_client.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/gallery/helpers/l10n_client.php b/modules/gallery/helpers/l10n_client.php
index 8c2685a8..2af5c8d0 100644
--- a/modules/gallery/helpers/l10n_client.php
+++ b/modules/gallery/helpers/l10n_client.php
@@ -60,10 +60,14 @@ class l10n_client_Core {
"client_token" => l10n_client::client_token(),
"signature" => $signature,
"uid" => l10n_client::server_uid($api_key)));
+ if (!isset($response_data) && !isset($response_status)) {
+ return array(false, false);
+ }
+
if (!remote::success($response_status)) {
- return false;
+ return array(true, false);
}
- return true;
+ return array(true, true);
}
/**