Commit bd921161 authored by Jean-Paul Saman's avatar Jean-Paul Saman

setup.php: use w2p_Core_Setup() functions for remove and install

parent 8f4465c7
......@@ -203,10 +203,7 @@ class CSetupHelpDesk extends w2p_Core_Setup
return false;
}
global $AppUI;
$perms = $AppUI->acl();
return $perms->registerModule('Help Desk', 'helpdesk');
return parent::install();
}
public function remove()
......@@ -252,7 +249,8 @@ class CSetupHelpDesk extends w2p_Core_Setup
$q->addWhere("mod_directory = 'helpdesk'");
$q->exec();
return $success;
if (!$success) return $success;
return parent::remove();
}
public function upgrade($old_version)
......@@ -347,10 +345,8 @@ class CSetupHelpDesk extends w2p_Core_Setup
$success = 0;
}
global $AppUI;
$perms = $AppUI->acl();
return $perms->registerModule('Help Desk', 'helpdesk');
return true;
}
public function configure()
......@@ -366,7 +362,7 @@ class CSetupHelpDesk extends w2p_Core_Setup
$q = new w2p_Database_Query();
$sql = "( " .
" `helpdesk_config` varchar(25) NOT NULL, " .
" `helpdesk_value` varchar(25), " .
" `helpdesk_value` varchar(256), " .
" PRIMARY KEY (`helpdesk_config`) " .
") ENGINE = MYISAM DEFAULT CHARSET = utf8";
$q->createTable('helpdesk_config');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment