[CORE] Rename NoteScope to VisibilityScope, as it will be used for attachment visbility too
This commit is contained in:
parent
9659762726
commit
dc5bdfa1fb
@ -37,7 +37,7 @@ use App\Core\Controller;
|
|||||||
use App\Core\DB\DB;
|
use App\Core\DB\DB;
|
||||||
use App\Core\Event;
|
use App\Core\Event;
|
||||||
use function App\Core\I18n\_m;
|
use function App\Core\I18n\_m;
|
||||||
use App\Core\NoteScope;
|
use App\Core\VisibilityScope;
|
||||||
use App\Entity\Note;
|
use App\Entity\Note;
|
||||||
use App\Util\Common;
|
use App\Util\Common;
|
||||||
use App\Util\Exception\ClientException;
|
use App\Util\Exception\ClientException;
|
||||||
@ -46,10 +46,10 @@ use Symfony\Component\HttpFoundation\Request;
|
|||||||
class Network extends Controller
|
class Network extends Controller
|
||||||
{
|
{
|
||||||
// Can't have constanst inside herestring
|
// Can't have constanst inside herestring
|
||||||
private $public_scope = NoteScope::PUBLIC;
|
private $public_scope = VisibilityScope::PUBLIC;
|
||||||
private $instance_scope = NoteScope::PUBLIC | NoteScope::SITE;
|
private $instance_scope = VisibilityScope::PUBLIC | VisibilityScope::SITE;
|
||||||
private $message_scope = NoteScope::MESSAGE;
|
private $message_scope = VisibilityScope::MESSAGE;
|
||||||
private $follower_scope = NoteScope::PUBLIC | NoteScope::FOLLOWER;
|
private $follower_scope = VisibilityScope::PUBLIC | VisibilityScope::FOLLOWER;
|
||||||
|
|
||||||
public function public(Request $request)
|
public function public(Request $request)
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@ use App\Core\Controller;
|
|||||||
use App\Core\DB\DB;
|
use App\Core\DB\DB;
|
||||||
use App\Core\Form;
|
use App\Core\Form;
|
||||||
use function App\Core\I18n\_m;
|
use function App\Core\I18n\_m;
|
||||||
use App\Core\NoteScope;
|
use App\Core\VisibilityScope;
|
||||||
use App\Entity\Follow;
|
use App\Entity\Follow;
|
||||||
use App\Entity\GSActor;
|
use App\Entity\GSActor;
|
||||||
use App\Entity\LocalUser;
|
use App\Entity\LocalUser;
|
||||||
@ -43,7 +43,7 @@ class Security extends Controller
|
|||||||
// last username entered by the user
|
// last username entered by the user
|
||||||
$last_username = $authenticationUtils->getLastUsername();
|
$last_username = $authenticationUtils->getLastUsername();
|
||||||
|
|
||||||
return ['_template' => 'security/login.html.twig', 'last_username' => $last_username, 'error' => $error, 'notes' => Note::getAllNotes(NoteScope::$instance_scope)];
|
return ['_template' => 'security/login.html.twig', 'last_username' => $last_username, 'error' => $error, 'notes' => Note::getAllNotes(VisibilityScope::$instance_scope)];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function logout()
|
public function logout()
|
||||||
@ -139,7 +139,7 @@ class Security extends Controller
|
|||||||
return [
|
return [
|
||||||
'_template' => 'security/register.html.twig',
|
'_template' => 'security/register.html.twig',
|
||||||
'registration_form' => $form->createView(),
|
'registration_form' => $form->createView(),
|
||||||
'notes' => Note::getAllNotes(NoteScope::$instance_scope),
|
'notes' => Note::getAllNotes(VisibilityScope::$instance_scope),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ namespace App\Core;
|
|||||||
|
|
||||||
use App\Util\Bitmap;
|
use App\Util\Bitmap;
|
||||||
|
|
||||||
class NoteScope extends Bitmap
|
class VisibilityScope extends Bitmap
|
||||||
{
|
{
|
||||||
public const PUBLIC = 1;
|
public const PUBLIC = 1;
|
||||||
public const SITE = 2;
|
public const SITE = 2;
|
Loading…
Reference in New Issue
Block a user