Attached Files | 0001-BUG-Don-t-display-errors-when-project-gets-unselecte.patch [^] (1,459 bytes) 2013-10-11 10:58 [Show Content] [Hide Content]From 56872f9bea27fdc645d980491864af4a82648a18 Mon Sep 17 00:00:00 2001
From: Igor Murzov <e-mail@date.by>
Date: Wed, 9 Oct 2013 19:09:25 +0400
Subject: [PATCH] BUG: Don't display errors when project gets unselected on
Edit project page
Also rearrange some lines for better readability.
---
createProject.php | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/createProject.php b/createProject.php
index 9c0f529..da7df0e 100644
--- a/createProject.php
+++ b/createProject.php
@@ -37,14 +37,14 @@ if ($session_OK)
return;
}
+ @$edit = $_GET["edit"];
+
@$projectid = $_GET["projectid"];
if ($projectid != NULL)
{
$projectid = pdo_real_escape_numeric($projectid);
}
- @$edit = $_GET["edit"];
-
$Project = new Project;
// If the projectid is not set and there is only one project we go directly to the page
@@ -57,17 +57,16 @@ if ($session_OK)
}
}
- $User = new User;
- $User->Id = $userid;
- $Project->Id = $projectid;
-
// If the projectid is set, make sure that it's valid
- if(isset($projectid) && !$Project->Exists())
+ $Project->Id = $projectid;
+ if(isset($projectid) && $projectid>0 && !$Project->Exists())
{
echo "This project doesn't exists.";
return;
}
+ $User = new User;
+ $User->Id = $userid;
$role = $Project->GetUserRole($userid);
// If we are editing a project make sure we have the right to do so
--
1.7.9.5
|