Adding $a->getBaseURL for Worker in profile_photo
Adding a TODO for Contact::magicLink
This commit is contained in:
@@ -126,7 +126,7 @@ function profile_photo_post(App $a)
|
||||
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
|
||||
if ($path && strlen(Config::get('system', 'directory'))) {
|
||||
Worker::add(PRIORITY_LOW, "Directory", $path);
|
||||
Worker::add(PRIORITY_LOW, "Directory", $a->getBaseURL() . '/' . $path);
|
||||
}
|
||||
|
||||
Worker::add(PRIORITY_LOW, 'ProfileUpdate', local_user());
|
||||
|
||||
+7
-1
@@ -13,7 +13,13 @@ function randprof_init(App $a)
|
||||
$x = GContact::getRandomUrl();
|
||||
|
||||
if ($x) {
|
||||
$a->internalRedirect(Contact::magicLink($x));
|
||||
$link = Contact::magicLink($x);
|
||||
// @TODO making the return of magicLink save to use either externalRedirect or internalRedirect
|
||||
if (filter_var($link, FILTER_VALIDATE_URL)) {
|
||||
System::externalRedirect($link);
|
||||
} else {
|
||||
$a->internalRedirect($link);
|
||||
}
|
||||
}
|
||||
|
||||
$a->internalRedirect('profile');
|
||||
|
||||
Reference in New Issue
Block a user