mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-30 07:35:59 +00:00
Merge
--HG-- branch : develop
This commit is contained in:
commit
5346da559e
4 changed files with 29 additions and 3 deletions
|
@ -20,9 +20,19 @@ class Ticket_User{
|
||||||
* @param $permission the permission that will be given to the user. 1=user, 2=mod, 3=admin
|
* @param $permission the permission that will be given to the user. 1=user, 2=mod, 3=admin
|
||||||
*/
|
*/
|
||||||
public static function createTicketUser( $extern_id, $permission) {
|
public static function createTicketUser( $extern_id, $permission) {
|
||||||
|
try {
|
||||||
|
//make connection with and put into db
|
||||||
$dbl = new DBLayer("lib");
|
$dbl = new DBLayer("lib");
|
||||||
$dbl->insert("ticket_user",array('TUserId' => $extern_id, 'Permission' => $permission, 'ExternId' => $extern_id));
|
$dbl->insert("ticket_user",array('TUserId' => $extern_id, 'Permission' => $permission, 'ExternId' => $extern_id));
|
||||||
}
|
}
|
||||||
|
catch (PDOException $e) {
|
||||||
|
//oh noooz...
|
||||||
|
//error_log(print_r($e, true));
|
||||||
|
//print_r($e);
|
||||||
|
echo "Problem creating user in database!";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
2
code/web/private_php/setup/sql/nel_ams_lib_00007.sql
Normal file
2
code/web/private_php/setup/sql/nel_ams_lib_00007.sql
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
INSERT INTO `settings` (`idSettings`, `Setting`, `Value`) VALUES
|
||||||
|
(2, 'Domain_Auto_Add', '1');
|
|
@ -6,7 +6,7 @@ $db_nel_tool = 2;
|
||||||
|
|
||||||
// Support
|
// Support
|
||||||
$db_nel_ams = 2;
|
$db_nel_ams = 2;
|
||||||
$db_nel_ams_lib = 6;
|
$db_nel_ams_lib = 7;
|
||||||
|
|
||||||
// Domain
|
// Domain
|
||||||
$db_ring_domain = 1;
|
$db_ring_domain = 1;
|
||||||
|
|
|
@ -43,6 +43,20 @@ require_once('setup/version.php');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($continue) {
|
||||||
|
try {
|
||||||
|
if (!in_array("mysql",PDO::getAvailableDrivers(),TRUE))
|
||||||
|
{
|
||||||
|
throw new PDOException ("Cannot work without a proper database setting up");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (PDOException $pdoEx)
|
||||||
|
{
|
||||||
|
printalert("danger", "PHP PDO seems to be missing the mysql driver");
|
||||||
|
$continue = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Validate basics
|
// Validate basics
|
||||||
if ($continue) {
|
if ($continue) {
|
||||||
if (file_exists($_POST["privatePhpDirectory"])) {
|
if (file_exists($_POST["privatePhpDirectory"])) {
|
||||||
|
|
Loading…
Reference in a new issue