use Friendica\App;
use Friendica\Content\ContactSelector;
use Friendica\Content\Feature;
+use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\System;
use Friendica\Core\Config;
require_once 'mod/wall_upload.php';
require_once 'mod/proxy.php';
require_once 'include/like.php';
-require_once 'include/plaintext.php';
define('API_METHOD_ANY', '*');
define('API_METHOD_GET', 'GET');
if ($posts_day > $throttle_day) {
logger('Daily posting limit reached for user '.api_user(), LOGGER_DEBUG);
- // 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));
+ // die(api_error($type, L10n::t("Daily posting limit of %d posts reached. The post was rejected.", $throttle_day));
+ throw new TooManyRequestsException(L10n::tt("Daily posting limit of %d post reached. The post was rejected.", "Daily posting limit of %d posts reached. The post was rejected.", $throttle_day));
}
}
if ($posts_week > $throttle_week) {
logger('Weekly posting limit reached for user '.api_user(), LOGGER_DEBUG);
- // 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));
+ // die(api_error($type, L10n::t("Weekly posting limit of %d posts reached. The post was rejected.", $throttle_week)));
+ throw new TooManyRequestsException(L10n::tt("Weekly posting limit of %d post reached. The post was rejected.", "Weekly posting limit of %d posts reached. The post was rejected.", $throttle_week));
}
}
if ($posts_month > $throttle_month) {
logger('Monthly posting limit reached for user '.api_user(), LOGGER_DEBUG);
- // 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));
+ // die(api_error($type, L10n::t("Monthly posting limit of %d posts reached. The post was rejected.", $throttle_month));
+ throw new TooManyRequestsException(L10n::t("Monthly posting limit of %d post reached. The post was rejected.", "Monthly posting limit of %d posts reached. The post was rejected.", $throttle_month));
}
}
*/
function api_clean_attachments($body)
{
- $data = get_attachment_data($body);
+ $data = BBCode::getAttachmentData($body);
if (!$data) {
return $body;