use Friendica\Content\Feature;
use Friendica\Content\Nav;
use Friendica\Core\Addon;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Core\Worker;
}
if (!$can_post) {
- notice( t('Permission denied.') . EOL );
+ notice(L10n::t('Permission denied.') . EOL );
killme();
}
);
if (!DBM::is_result($r)) {
- notice( t('Contact information unavailable') . EOL);
+ notice(L10n::t('Contact information unavailable') . EOL);
logger('photos_post: unable to locate contact record for page owner. uid=' . $page_owner_uid);
killme();
}
intval($page_owner_uid)
);
if (!DBM::is_result($r)) {
- notice( t('Album not found.') . EOL);
+ notice(L10n::t('Album not found.') . EOL);
goaway($_SESSION['photo_return']);
return; // NOTREACHED
}
if ($error !== UPLOAD_ERR_OK) {
switch ($error) {
case UPLOAD_ERR_INI_SIZE:
- notice(t('Image exceeds size limit of %s', ini_get('upload_max_filesize')) . EOL);
+ notice(L10n::t('Image exceeds size limit of %s', ini_get('upload_max_filesize')) . EOL);
break;
case UPLOAD_ERR_FORM_SIZE:
- notice(t('Image exceeds size limit of %s', formatBytes(defaults($_REQUEST, 'MAX_FILE_SIZE', 0))) . EOL);
+ notice(L10n::t('Image exceeds size limit of %s', formatBytes(defaults($_REQUEST, 'MAX_FILE_SIZE', 0))) . EOL);
break;
case UPLOAD_ERR_PARTIAL:
- notice(t('Image upload didn\'t complete, please try again') . EOL);
+ notice(L10n::t('Image upload didn\'t complete, please try again') . EOL);
break;
case UPLOAD_ERR_NO_FILE:
- notice(t('Image file is missing') . EOL);
+ notice(L10n::t('Image file is missing') . EOL);
break;
case UPLOAD_ERR_NO_TMP_DIR:
case UPLOAD_ERR_CANT_WRITE:
case UPLOAD_ERR_EXTENSION:
- notice(t('Server can\'t accept new file upload at this time, please contact your administrator') . EOL);
+ notice(L10n::t('Server can\'t accept new file upload at this time, please contact your administrator') . EOL);
break;
}
@unlink($src);
$maximagesize = Config::get('system', 'maximagesize');
if ($maximagesize && ($filesize > $maximagesize)) {
- notice(t('Image exceeds size limit of %s', formatBytes($maximagesize)) . EOL);
+ notice(L10n::t('Image exceeds size limit of %s', formatBytes($maximagesize)) . EOL);
@unlink($src);
$foo = 0;
Addon::callHooks('photo_post_end', $foo);
}
if (!$filesize) {
- notice(t('Image file is empty.') . EOL);
+ notice(L10n::t('Image file is empty.') . EOL);
@unlink($src);
$foo = 0;
Addon::callHooks('photo_post_end', $foo);
if (!$Image->isValid()) {
logger('mod/photos.php: photos_post(): unable to process image' , LOGGER_DEBUG);
- notice(t('Unable to process image.') . EOL);
+ notice(L10n::t('Unable to process image.') . EOL);
@unlink($src);
$foo = 0;
Addon::callHooks('photo_post_end',$foo);
if (!$r) {
logger('mod/photos.php: photos_post(): image store failed' , LOGGER_DEBUG);
- notice(t('Image upload failed.') . EOL);
+ notice(L10n::t('Image upload failed.') . EOL);
killme();
}
// photos/name/image/xxxxx/edit
if (Config::get('system', 'block_public') && !local_user() && !remote_user()) {
- notice( t('Public access denied.') . EOL);
+ notice(L10n::t('Public access denied.') . EOL);
return;
}
require_once 'include/conversation.php';
if (!x($a->data,'user')) {
- notice( t('No photos selected') . EOL );
+ notice(L10n::t('No photos selected') . EOL );
return;
}
}
if ($a->data['user']['hidewall'] && (local_user() != $owner_uid) && !$remote_contact) {
- notice( t('Access to this item is restricted.') . EOL);
+ notice(L10n::t('Access to this item is restricted.') . EOL);
return;
}
// Display upload form
if ($datatype === 'upload') {
if (!$can_post) {
- notice(t('Permission denied.'));
+ notice(L10n::t('Permission denied.'));
return;
}
dbesc($datum)
);
if (DBM::is_result($ph)) {
- notice(t('Permission denied. Access to this item may be restricted.'));
+ notice(L10n::t('Permission denied. Access to this item may be restricted.'));
} else {
- notice(t('Photo not available') . EOL );
+ notice(L10n::t('Photo not available') . EOL );
}
return;
}