diff --git a/config.inc.php b/config.inc.php index 50198d3..ad6a62c 100755 --- a/config.inc.php +++ b/config.inc.php @@ -11,30 +11,4 @@ define( "INFO", 1); define( "ALERT", 2); define( "ERROR", 3); -// initialise le user si accès authentifié -/*if ( isset( $_SERVER['PHP_AUTH_USER']) ) -{ - $user = $_SERVER['PHP_AUTH_USER']; -}*/ -// création de l'objet base de donnée, mais pas ouverture de la base - -//variables diverses -//$admin = "Daniel"; -//$site = "Espace Tuina"; -//$dossier = "/espacetuina"; -//$basedir = dirname( $_SERVER['DOCUMENT_ROOT'] ) . $dossier; -//$lang_basedir = $basedir . "/languages/"; -//$base_url = "https://librepc.homelinux.org" . $dossier; -//$url_gestion = $base_url . "/gestion"; -//$url_admin = $base_url . "/outils"; -//$alias = "et"; -//$table_prefix = ""; //$alias . "_"; -//$lang_list[] = array(); -//$lang_dir = ''; - -//$_SESSION['basedir'] = $basedir; -//$_SESSION['base_url'] = $base_url; - -//set_include_path("./"); - ?> diff --git a/log.php b/log.php deleted file mode 100644 index 7ec504e..0000000 --- a/log.php +++ /dev/null @@ -1,31 +0,0 @@ - INFO, ALERT, ERROR -function log_write($log, $level=INFO) -{ - global $webmaster, $headers; - if ( $level == ALERT ) - { - mail( $webmaster, "Connecteur nextcloud pour dolibarr: Alerte", $log_mail, $headers ); - }elseif ( $level == ERROR ) - { - mail( $webmaster, "Connecteur nextcloud pour dolibarr: Erreur", $log_mail, $headers ); - } -} - -// $die = true -> execute die() -function log_error($log, $die=true) -{ - global $webmaster, $headers; - echo "$log
" . EOL; - log_write($log); - $log_err = 'erreur dans la requête' . "
" . "un rapport détaillé a été envoyé au webmaster"; - if ( $die ) - { - echo "\n"; - die( $log_err ); - } -} -?> diff --git a/nconnector.php b/nconnector.php index 4d3bd00..3fa7028 100755 --- a/nconnector.php +++ b/nconnector.php @@ -81,7 +81,7 @@ while ($user = $doldb->result->fetch_assoc()) $oc_preferences_query_email = "INSERT INTO oc_preferences(userid, appid, configkey, configvalue) VALUES ('" . $user["login"] . "', 'settings', 'email', '" . $user["email"] . "')"; echo $account_data . EOL . $oc_account_query . EOL . $oc_users_query .EOL . $oc_group_user_query . EOL . $oc_preferences_query_quota . EOL . $oc_preferences_query_email . EOL; - if (!$ncdb->query($oc_account_query)) + if ($ncdb->query($oc_account_query)) { echo "Echec lors de la requete : (" . $ncdb->connect->errno . ") " . $ncdb->connect->error; }