Disallow visiting unexisting project pages
This commit is contained in:
parent
5ef3bc68a0
commit
307eba4218
|
@ -36,6 +36,9 @@ class ProjectManager{
|
||||||
$statement->execute();
|
$statement->execute();
|
||||||
|
|
||||||
$dbProj = $statement->fetch();
|
$dbProj = $statement->fetch();
|
||||||
|
if (!$dbProj) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$project = new Project(
|
$project = new Project(
|
||||||
$dbProj['id'],
|
$dbProj['id'],
|
||||||
$dbProj['name'],
|
$dbProj['name'],
|
||||||
|
|
|
@ -15,6 +15,10 @@ $attrs = $as->getAttributes();
|
||||||
|
|
||||||
$projectManager = new \pvv\side\ProjectManager($pdo);
|
$projectManager = new \pvv\side\ProjectManager($pdo);
|
||||||
$project = $projectManager->getByID($projectID);
|
$project = $projectManager->getByID($projectID);
|
||||||
|
if (!$project) {
|
||||||
|
echo ":^)";
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
$members = $projectManager->getProjectMembers($projectID);
|
$members = $projectManager->getProjectMembers($projectID);
|
||||||
$is_owner = False;
|
$is_owner = False;
|
||||||
|
|
Loading…
Reference in New Issue