diff --git a/front/deleted_equiv.php b/front/deleted_equiv.php
index 190823c1..50f73da0 100644
--- a/front/deleted_equiv.php
+++ b/front/deleted_equiv.php
@@ -63,7 +63,7 @@
PluginOcsinventoryngOcsProcess::manageDeleted($_SESSION["plugin_ocsinventoryng_ocsservers_id"]);
}
- if ($_SESSION["ocs_deleted_equiv"]["total"] != $_SESSION["ocs_deleted_equiv"]["deleted"] && $_SESSION["ocs_deleted_equiv"]["last_req"]) {
+ if ($_SESSION["ocs_deleted_equiv"]["total"] != $_SESSION["ocs_deleted_equiv"]["deleted"] && isset($_SESSION["ocs_deleted_equiv"]["last_req"])) {
echo $_SESSION["ocs_deleted_equiv"]["deleted"] . "/" . $_SESSION["ocs_deleted_equiv"]["total"];
echo "
";
diff --git a/hook.php b/hook.php
index 1b11b3a3..2dc54509 100644
--- a/hook.php
+++ b/hook.php
@@ -2222,7 +2222,7 @@ function addNotifications() {
NOW(), '', NULL,
NOW());";
$DB->queryOrDie($query, $DB->error());
- $templates_id = $DB->insert_id();
+ $templates_id = $DB->insertId();
$query = "INSERT INTO `glpi_notificationtemplatetranslations`
VALUES (NULL, $templates_id, '',
'##lang.notimported.action## : ##notimported.entity##',
@@ -2267,7 +2267,7 @@ function addNotifications() {
(`name`, `itemtype`)
VALUES ('Check rule import entity', 'PluginOcsinventoryngRuleImportEntity');";
$DB->queryOrDie($query, $DB->error());
- $templates_id = $DB->insert_id();
+ $templates_id = $DB->insertId();
//Add translations
$query = "INSERT INTO `glpi_notificationtemplatetranslations`
(`notificationtemplates_id`, `subject`, `content_text`, `content_html`)
@@ -2745,7 +2745,7 @@ function plugin_ocsinventoryng_upgrademassocsimport14to15() {
"VALUES (NULL, 'Computers not imported', 'PluginMassocsimportNotimported',
NOW(), '', '', NOW());";
$DB->queryOrDie($query, $DB->error());
- $templates_id = $DB->insert_id();
+ $templates_id = $DB->insertId();
$query = "INSERT INTO `glpi_notificationtemplatetranslations` " .
"VALUES(NULL, $templates_id, '', '##lang.notimported.action## : ##notimported.entity##'," .
" '\r\n\n##lang.notimported.action## : ##notimported.entity##\n\n" .
@@ -2874,7 +2874,7 @@ function plugin_ocsinventoryng_add_notifications_alerts() {
(`name`, `itemtype`)
VALUES ('Alert machines ocs', 'PluginOcsinventoryngOcsAlert');";
$DB->queryOrDie($query, $DB->error());
- $templates_id = $DB->insert_id();
+ $templates_id = $DB->insertId();
$query = "INSERT INTO `glpi_notificationtemplatetranslations`
(`notificationtemplates_id`, `subject`, `content_text`, `content_html`)
diff --git a/inc/ocslink.class.php b/inc/ocslink.class.php
index db8baac6..d4adc572 100644
--- a/inc/ocslink.class.php
+++ b/inc/ocslink.class.php
@@ -964,7 +964,7 @@ static function ocsLink($link_params) {
$result = $DB->query($query);
if ($result) {
- return ($DB->insert_id());
+ return ($DB->insertId());
}
return false;
diff --git a/inc/snmpocslink.class.php b/inc/snmpocslink.class.php
index 47d01cd3..cac7bdef 100644
--- a/inc/snmpocslink.class.php
+++ b/inc/snmpocslink.class.php
@@ -2807,7 +2807,7 @@ static function ocsSnmpLink($ocsid, $plugin_ocsinventoryng_ocsservers_id, $items
$result = $DB->query($query);
if ($result) {
- return ($DB->insert_id());
+ return ($DB->insertId());
}
return false;