summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/l10n_client.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-11-28 11:27:25 -0800
committerBharat Mediratta <bharat@menalto.com>2010-11-28 11:27:25 -0800
commiteb010554ff963a1f73661bf96d99697abb7dfde4 (patch)
treecabf85c2dc223cfbb2f649b1c45adfe04ba3e70a /modules/gallery/helpers/l10n_client.php
parent76b6daefaa4009fdd8de72b8f25259200a66d477 (diff)
Replace self::func() with <helper_name>::func() for all public APIs
and constants to make overloading easier. Fixes #1510.
Diffstat (limited to 'modules/gallery/helpers/l10n_client.php')
-rw-r--r--modules/gallery/helpers/l10n_client.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/gallery/helpers/l10n_client.php b/modules/gallery/helpers/l10n_client.php
index 43cc2036..8c2685a8 100644
--- a/modules/gallery/helpers/l10n_client.php
+++ b/modules/gallery/helpers/l10n_client.php
@@ -40,14 +40,14 @@ class l10n_client_Core {
}
static function server_uid($api_key=null) {
- $api_key = $api_key == null ? self::api_key() : $api_key;
+ $api_key = $api_key == null ? l10n_client::api_key() : $api_key;
$parts = explode(":", $api_key);
return empty($parts) ? 0 : $parts[0];
}
private static function _sign($payload, $api_key=null) {
- $api_key = $api_key == null ? self::api_key() : $api_key;
- return md5($api_key . $payload . self::client_token());
+ $api_key = $api_key == null ? l10n_client::api_key() : $api_key;
+ return md5($api_key . $payload . l10n_client::client_token());
}
static function validate_api_key($api_key) {
@@ -57,9 +57,9 @@ class l10n_client_Core {
list ($response_data, $response_status) = remote::post(
$url, array("version" => $version,
- "client_token" => self::client_token(),
+ "client_token" => l10n_client::client_token(),
"signature" => $signature,
- "uid" => self::server_uid($api_key)));
+ "uid" => l10n_client::server_uid($api_key)));
if (!remote::success($response_status)) {
return false;
}
@@ -215,9 +215,9 @@ class l10n_client_Core {
list ($response_data, $response_status) = remote::post(
$url, array("data" => $request_data,
- "client_token" => self::client_token(),
+ "client_token" => l10n_client::client_token(),
"signature" => $signature,
- "uid" => self::server_uid()));
+ "uid" => l10n_client::server_uid()));
if (!remote::success($response_status)) {
throw new Exception("@todo TRANSLATIONS_SUBMISSION_FAILED " . $response_status);