]> git.mxchange.org Git - friendica.git/blobdiff - include/api.php
Update functions and calls
[friendica.git] / include / api.php
index 15ec2db12c99ecc71a81c29a958b22f3574fe625..aeab06cf158bb5529fa43550289c6125794a9342 100644 (file)
@@ -12,6 +12,7 @@ use Friendica\Core\Addon;
 use Friendica\Core\System;
 use Friendica\Core\Config;
 use Friendica\Core\NotificationsManager;
+use Friendica\Core\L10n;
 use Friendica\Core\PConfig;
 use Friendica\Core\Worker;
 use Friendica\Database\DBM;
@@ -1176,8 +1177,8 @@ function api_statuses_update($type)
 
                        if ($posts_day > $throttle_day) {
                                logger('Daily posting limit reached for user '.api_user(), LOGGER_DEBUG);
-                               // die(api_error($type, sprintf(t("Daily posting limit of %d posts reached. The post was rejected."), $throttle_day)));
-                               throw new TooManyRequestsException(sprintf(t("Daily posting limit of %d posts reached. The post was rejected."), $throttle_day));
+                               // die(api_error($type, sprintf(L10n::t("Daily posting limit of %d posts reached. The post was rejected."), $throttle_day)));
+                               throw new TooManyRequestsException(sprintf(L10n::t("Daily posting limit of %d posts reached. The post was rejected."), $throttle_day));
                        }
                }
 
@@ -1200,8 +1201,8 @@ function api_statuses_update($type)
 
                        if ($posts_week > $throttle_week) {
                                logger('Weekly posting limit reached for user '.api_user(), LOGGER_DEBUG);
-                               // die(api_error($type, sprintf(t("Weekly posting limit of %d posts reached. The post was rejected."), $throttle_week)));
-                               throw new TooManyRequestsException(sprintf(t("Weekly posting limit of %d posts reached. The post was rejected."), $throttle_week));
+                               // die(api_error($type, sprintf(L10n::t("Weekly posting limit of %d posts reached. The post was rejected."), $throttle_week)));
+                               throw new TooManyRequestsException(sprintf(L10n::t("Weekly posting limit of %d posts reached. The post was rejected."), $throttle_week));
                        }
                }
 
@@ -1224,8 +1225,8 @@ function api_statuses_update($type)
 
                        if ($posts_month > $throttle_month) {
                                logger('Monthly posting limit reached for user '.api_user(), LOGGER_DEBUG);
-                               // die(api_error($type, sprintf(t("Monthly posting limit of %d posts reached. The post was rejected."), $throttle_month)));
-                               throw new TooManyRequestsException(sprintf(t("Monthly posting limit of %d posts reached. The post was rejected."), $throttle_month));
+                               // die(api_error($type, sprintf(L10n::t("Monthly posting limit of %d posts reached. The post was rejected."), $throttle_month)));
+                               throw new TooManyRequestsException(sprintf(L10n::t("Monthly posting limit of %d posts reached. The post was rejected."), $throttle_month));
                        }
                }
 
@@ -4374,7 +4375,7 @@ function api_account_update_profile_image($type)
                $media = $_FILES['media'];
        }
        // save new profile image
-       $data = save_media_to_database("profileimage", $media, $type, t('Profile Photos'), "", "", "", "", "", $is_default_profile);
+       $data = save_media_to_database("profileimage", $media, $type, L10n::t('Profile Photos'), "", "", "", "", "", $is_default_profile);
 
        // get filetype
        if (is_array($media['type'])) {