fix add hook + remove static in canView / canCreate

git-svn-id: https://forge.glpi-project.org/svn/example/trunk@121 349b9182-4a13-0410-896f-e5e9767dd1b3
This commit is contained in:
remicollet
2009-12-16 09:24:50 +00:00
parent 8176e19a78
commit 0ee472bd2a
2 changed files with 16 additions and 18 deletions

View File

@ -45,14 +45,14 @@ class PluginExampleExample extends CommonDBTM {
return 'Example Type';
}
static function canCreate() {
function canCreate() {
if (isset($_SESSION["glpi_plugin_example_profile"])) {
return ($_SESSION["glpi_plugin_example_profile"]['example'] == 'w');
}
return false;
}
static function canView() {
function canView() {
if (isset($_SESSION["glpi_plugin_example_profile"])) {
return ($_SESSION["glpi_plugin_example_profile"]['example'] == 'w'
|| $_SESSION["glpi_plugin_example_profile"]['example'] == 'r');