1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
//------------------------------------------------------------------------------ |
4
|
|
|
// |
5
|
|
|
// eTraxis - Records tracking web-based system |
6
|
|
|
// Copyright (C) 2005-2010 Artem Rodygin |
7
|
|
|
// |
8
|
|
|
// This program is free software: you can redistribute it and/or modify |
9
|
|
|
// it under the terms of the GNU General Public License as published by |
10
|
|
|
// the Free Software Foundation, either version 3 of the License, or |
11
|
|
|
// (at your option) any later version. |
12
|
|
|
// |
13
|
|
|
// This program is distributed in the hope that it will be useful, |
14
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
15
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16
|
|
|
// GNU General Public License for more details. |
17
|
|
|
// |
18
|
|
|
// You should have received a copy of the GNU General Public License |
19
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. |
20
|
|
|
// |
21
|
|
|
//------------------------------------------------------------------------------ |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @package eTraxis |
25
|
|
|
* @ignore |
26
|
|
|
*/ |
27
|
|
|
|
28
|
|
|
/**#@+ |
29
|
|
|
* Dependency. |
30
|
|
|
*/ |
31
|
|
|
require_once('../engine/engine.php'); |
32
|
|
|
require_once('../dbo/projects.php'); |
33
|
|
|
/**#@-*/ |
34
|
|
|
|
35
|
|
|
init_page(LOAD_CONTAINER, GUEST_IS_ALLOWED); |
|
|
|
|
36
|
|
|
|
37
|
|
|
// check that requested project exists |
38
|
|
|
|
39
|
|
|
$id = ustr2int(try_request('id')); |
40
|
|
|
$project = project_find($id); |
41
|
|
|
|
42
|
|
|
if (!$project) |
43
|
|
|
{ |
44
|
|
|
debug_write_log(DEBUG_NOTICE, 'Project cannot be found.'); |
45
|
|
|
header('Location: index.php'); |
46
|
|
|
exit; |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
// page's title |
50
|
|
|
|
51
|
|
|
$title = ustrprocess(get_html_resource(RES_PROJECT_X_ID), ustr2html($project['project_name'])); |
52
|
|
|
|
53
|
|
|
// generate breadcrumbs and tabs |
54
|
|
|
|
55
|
|
|
$xml = gen_context_menu('tview.php?id=', 'sview.php?id=', 'fview.php?id=', $id) |
56
|
|
|
. '<breadcrumbs>' |
57
|
|
|
. '<breadcrumb url="index.php">' . get_html_resource(RES_PROJECTS_ID) . '</breadcrumb>' |
58
|
|
|
. '<breadcrumb url="view.php?id=' . $id . '">' . $title . '</breadcrumb>' |
59
|
|
|
. '</breadcrumbs>' |
60
|
|
|
. '<tabs>' |
61
|
|
|
. '<tab url="project.php?id=' . $id . '" active="true">' . ustr2html($project['project_name']) . '</tab>'; |
62
|
|
|
|
63
|
|
|
if (get_user_level() == USER_LEVEL_ADMIN) |
64
|
|
|
{ |
65
|
|
|
$xml .= '<tab url="gindex.php?id=' . $id . '">' . get_html_resource(RES_GROUPS_ID) . '</tab>' |
66
|
|
|
. '<tab url="tindex.php?id=' . $id . '">' . get_html_resource(RES_TEMPLATES_ID) . '</tab>'; |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
$xml .= '<tab url="metrics.php?id=' . $id . '">' . get_html_resource(RES_METRICS_ID) . '</tab>' |
70
|
|
|
. '</tabs>'; |
71
|
|
|
|
72
|
|
|
echo(xml2html($xml, $title)); |
73
|
|
|
|
74
|
|
|
?> |
75
|
|
|
|
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: