Fix following collection error message
This commit is contained in:
parent
295d4a254d
commit
542c269885
@ -53,7 +53,7 @@ class apActorFollowersAction extends ManagedAction
|
||||
$profile = $user->getProfile ();
|
||||
$url = $profile->profileurl;
|
||||
} catch (Exception $e) {
|
||||
ActivityPubReturn::error ('Invalid username');
|
||||
ActivityPubReturn::error ('Invalid username.');
|
||||
}
|
||||
|
||||
if (!isset ($_GET["page"])) {
|
||||
@ -63,7 +63,7 @@ class apActorFollowersAction extends ManagedAction
|
||||
}
|
||||
|
||||
if ($page <= 0) {
|
||||
ActivityPubReturn::error ('Invalid page number');
|
||||
ActivityPubReturn::error ('Invalid page number.');
|
||||
}
|
||||
|
||||
/* Fetch Followers */
|
||||
@ -73,7 +73,7 @@ class apActorFollowersAction extends ManagedAction
|
||||
$sub = $profile->getSubscribers ($since, $limit);
|
||||
}
|
||||
catch(NoResultException $e) {
|
||||
ActivityPubReturn::error ('This user has no followers');
|
||||
ActivityPubReturn::error ('This user has no followers.');
|
||||
}
|
||||
|
||||
/* Calculate total items */
|
||||
@ -81,11 +81,11 @@ class apActorFollowersAction extends ManagedAction
|
||||
$total_pages = ceil ($total_subs / PROFILES_PER_MINILIST);
|
||||
|
||||
if ($total_pages == 0) {
|
||||
ActivityPubReturn::error ('This user has no followers');
|
||||
ActivityPubReturn::error ('This user has no followers.');
|
||||
}
|
||||
|
||||
if ($page > $total_pages) {
|
||||
ActivityPubReturn::error ("There are only {$total_pages} pages");
|
||||
ActivityPubReturn::error ("There are only {$total_pages} pages.");
|
||||
}
|
||||
|
||||
/* Get followers' URLs */
|
||||
|
@ -53,7 +53,7 @@ class apActorFollowingAction extends ManagedAction
|
||||
$profile = $user->getProfile ();
|
||||
$url = $profile->profileurl;
|
||||
} catch (Exception $e) {
|
||||
ActivityPubReturn::error ('Invalid username');
|
||||
ActivityPubReturn::error ('Invalid username.');
|
||||
}
|
||||
|
||||
if (!isset ($_GET["page"])) {
|
||||
@ -63,7 +63,7 @@ class apActorFollowingAction extends ManagedAction
|
||||
}
|
||||
|
||||
if ($page <= 0) {
|
||||
ActivityPubReturn::error ('Invalid page number');
|
||||
ActivityPubReturn::error ('Invalid page number.');
|
||||
}
|
||||
|
||||
/* Fetch Following */
|
||||
@ -72,7 +72,7 @@ class apActorFollowingAction extends ManagedAction
|
||||
$limit = (($page - 1) == 0 ? 1 : $page) * PROFILES_PER_MINILIST;
|
||||
$sub = $profile->getSubscribed($since, $limit);
|
||||
} catch (NoResultException $e) {
|
||||
ActivityPubReturn::error ('This user is not following anyone');
|
||||
ActivityPubReturn::error ('This user is not following anyone.');
|
||||
}
|
||||
|
||||
/* Calculate total items */
|
||||
@ -80,11 +80,11 @@ class apActorFollowingAction extends ManagedAction
|
||||
$total_pages = ceil ($total_subs / PROFILES_PER_MINILIST);
|
||||
|
||||
if ($total_pages == 0) {
|
||||
ActivityPubReturn::error ('This user has no followers');
|
||||
ActivityPubReturn::error ('This user is not following anyone.');
|
||||
}
|
||||
|
||||
if ($page > $total_pages) {
|
||||
ActivityPubReturn::error ("There are only {$total_pages} pages");
|
||||
ActivityPubReturn::error ("There are only {$total_pages} pages.");
|
||||
}
|
||||
|
||||
/* Get followed' URLs */
|
||||
|
@ -53,7 +53,7 @@ class apActorLikedCollectionAction extends ManagedAction
|
||||
$profile = $user->getProfile ();
|
||||
$url = $profile->profileurl;
|
||||
} catch (Exception $e) {
|
||||
ActivityPubReturn::error ('Invalid username');
|
||||
ActivityPubReturn::error ('Invalid username.');
|
||||
}
|
||||
|
||||
$limit = intval ($this->trimmed ('limit'));
|
||||
|
@ -54,7 +54,7 @@ class apActorProfileAction extends ManagedAction
|
||||
$profile = $user->getProfile ();
|
||||
}
|
||||
catch (Exception $e) {
|
||||
ActivityPubReturn::error ('Invalid username', 404);
|
||||
ActivityPubReturn::error ('Invalid username.', 404);
|
||||
}
|
||||
|
||||
$res = Activitypub_profile::profileToObject ($profile);
|
||||
|
Reference in New Issue
Block a user