*/
use Friendica\App;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
// phase 2 - we have finished cropping
if($a->argc != 2) {
- notice( t('Image uploaded but image cropping failed.') . EOL );
+ notice(L10n::t('Image uploaded but image cropping failed.') . EOL );
return;
}
intval(local_user())
);
- info( t('Shift-reload the page or clear browser cache if the new photo does not display immediately.') . EOL);
+ info(L10n::t('Shift-reload the page or clear browser cache if the new photo does not display immediately.') . EOL);
// Update global directory in background
$url = System::baseUrl() . '/profile/' . $a->user['nickname'];
if ($url && strlen(Config::get('system','directory'))) {
Worker::add(PRIORITY_LOW, 'ProfileUpdate', local_user());
} else {
- notice( t('Unable to process image') . EOL);
+ notice(L10n::t('Unable to process image') . EOL);
}
}
$ph = new Image($imagedata, $filetype);
if (! $ph->isValid()) {
- notice(t('Unable to process image.') . EOL);
+ notice(L10n::t('Unable to process image.') . EOL);
@unlink($src);
return;
}
function profile_photo_content(App $a) {
if (! local_user()) {
- notice( t('Permission denied.') . EOL );
+ notice(L10n::t('Permission denied.') . EOL );
return;
}
if( $a->argv[1]=='use'){
if ($a->argc<3){
- notice( t('Permission denied.') . EOL );
+ notice(L10n::t('Permission denied.') . EOL );
return;
};
dbesc($resource_id)
);
if (!DBM::is_result($r)){
- notice( t('Permission denied.') . EOL );
+ notice(L10n::t('Permission denied.') . EOL );
return;
}
$havescale = false;
$r = Photo::store($Image, local_user(), 0 , $hash, $filename, t('Profile Photos'), 0 );
if ($r) {
- info( t('Image uploaded successfully.') . EOL );
+ info(L10n::t('Image uploaded successfully.') . EOL );
} else {
- notice( t('Image upload failed.') . EOL );
+ notice(L10n::t('Image upload failed.') . EOL );
}
if ($width > 640 || $height > 640) {