|
|
|
@ -55,6 +55,14 @@ switch (isset($_GET['target']) ? urldecode($_GET['target']) : false)
@@ -55,6 +55,14 @@ switch (isset($_GET['target']) ? urldecode($_GET['target']) : false)
|
|
|
|
|
$response->message = _('Could not init user info'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// On first visit, redirect user to the welcome page with access level question |
|
|
|
|
else if (is_null($user->public)) |
|
|
|
|
{ |
|
|
|
|
header( |
|
|
|
|
sprintf('Location: %s/welcome.php', WEBSITE_URL) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Render icon |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
@ -105,6 +113,14 @@ switch (isset($_GET['target']) ? urldecode($_GET['target']) : false)
@@ -105,6 +113,14 @@ switch (isset($_GET['target']) ? urldecode($_GET['target']) : false)
|
|
|
|
|
$response->message = _('Could not init user info'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// On first visit, redirect user to the welcome page with access level question |
|
|
|
|
else if (is_null($user->public)) |
|
|
|
|
{ |
|
|
|
|
header( |
|
|
|
|
sprintf('Location: %s/welcome.php', WEBSITE_URL) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Magnet comment exists |
|
|
|
|
else if (!$magnetComment = $db->getMagnetComment(isset($_GET['magnetCommentId']) && $_GET['magnetCommentId'] > 0 ? (int) $_GET['magnetCommentId'] : 0)) |
|
|
|
|
{ |
|
|
|
@ -186,6 +202,14 @@ switch (isset($_GET['target']) ? urldecode($_GET['target']) : false)
@@ -186,6 +202,14 @@ switch (isset($_GET['target']) ? urldecode($_GET['target']) : false)
|
|
|
|
|
$response->message = _('Could not init user info'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// On first visit, redirect user to the welcome page with access level question |
|
|
|
|
else if (is_null($user->public)) |
|
|
|
|
{ |
|
|
|
|
header( |
|
|
|
|
sprintf('Location: %s/welcome.php', WEBSITE_URL) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Magnet comment exists |
|
|
|
|
else if (!$magnetComment = $db->getMagnetComment(isset($_GET['magnetCommentId']) && $_GET['magnetCommentId'] > 0 ? (int) $_GET['magnetCommentId'] : 0)) |
|
|
|
|
{ |
|
|
|
@ -256,6 +280,14 @@ switch (isset($_GET['target']) ? urldecode($_GET['target']) : false)
@@ -256,6 +280,14 @@ switch (isset($_GET['target']) ? urldecode($_GET['target']) : false)
|
|
|
|
|
$response->message = _('Could not init user info'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// On first visit, redirect user to the welcome page with access level question |
|
|
|
|
else if (is_null($user->public)) |
|
|
|
|
{ |
|
|
|
|
header( |
|
|
|
|
sprintf('Location: %s/welcome.php', WEBSITE_URL) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Magnet exists |
|
|
|
|
else if (!$magnet = $db->getMagnet(isset($_GET['magnetId']) && $_GET['magnetId'] > 0 ? (int) $_GET['magnetId'] : 0)) |
|
|
|
|
{ |
|
|
|
@ -342,6 +374,21 @@ switch (isset($_GET['target']) ? urldecode($_GET['target']) : false)
@@ -342,6 +374,21 @@ switch (isset($_GET['target']) ? urldecode($_GET['target']) : false)
|
|
|
|
|
$response->message = _('Could not init user session'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Get user |
|
|
|
|
else if (!$user = $db->getUser($userId)) |
|
|
|
|
{ |
|
|
|
|
$response->success = false; |
|
|
|
|
$response->message = _('Could not init user info'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// On first visit, redirect user to the welcome page with access level question |
|
|
|
|
else if (is_null($user->public)) |
|
|
|
|
{ |
|
|
|
|
header( |
|
|
|
|
sprintf('Location: %s/welcome.php', WEBSITE_URL) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Magnet exists |
|
|
|
|
else if (!$magnet = $db->getMagnet(isset($_GET['magnetId']) && $_GET['magnetId'] > 0 ? (int) $_GET['magnetId'] : 0)) |
|
|
|
|
{ |
|
|
|
@ -415,6 +462,14 @@ switch (isset($_GET['target']) ? urldecode($_GET['target']) : false)
@@ -415,6 +462,14 @@ switch (isset($_GET['target']) ? urldecode($_GET['target']) : false)
|
|
|
|
|
$response->message = _('Could not init user info'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// On first visit, redirect user to the welcome page with access level question |
|
|
|
|
else if (is_null($user->public)) |
|
|
|
|
{ |
|
|
|
|
header( |
|
|
|
|
sprintf('Location: %s/welcome.php', WEBSITE_URL) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Validate link |
|
|
|
|
if (empty($_GET['magnet'])) |
|
|
|
|
{ |
|
|
|
|