Skip to content

Commit

Permalink
one more reference to development database...
Browse files Browse the repository at this point in the history
  • Loading branch information
Debug Bill committed Sep 25, 2017
1 parent 352fa0a commit 1df8216
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 2 additions & 3 deletions inc/computer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,15 @@ class PluginGlpi2mdtComputer extends PluginGlpi2mdtMdt {
function getTabNameForItem(CommonGLPI $item, $withtemplate=0) {
global $DB;
$id = $item->getID();
$result = $DB->query("SELECT value_char as mode FROM glpi_dev.glpi_plugin_glpi2mdt_parameters
$result = $DB->query("SELECT value_char as mode FROM glpi_plugin_glpi2mdt_parameters
WHERE scope='global' AND parameter='Mode';");
$mode = $DB->fetch_array($result)['mode'];
if ($mode == 'Master') {
PluginGlpi2mdtCrontask::cronSyncMasterMaster(null, $id);
}
$result = $DB->query("SELECT value FROM glpi_plugin_glpi2mdt_settings
WHERE type='C' AND category='C' AND `key`='OSInstall' AND id=$id");
$row = $DB->fetch_array($result);
if ($row['value'] == "YES") {
if (($DB->numrows($result) == 1) AND ($DB->fetch_array($result)['value'] == 'YES')) {
return self::createTabEntry(__('Auto Install', 'glpi2mdt'), __('YES'));
} else {
return self::createTabEntry(__('Auto Install', 'glpi2mdt'), __('NO'));
Expand Down
4 changes: 3 additions & 1 deletion inc/crontask.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ static function cronCheckGlpi2mdtUpdate($task, $cron=true, $messageafterredirect
$gets = $gets."&CO=$CO&&AP=$AP&AG=$AG&TS=$TS&TG=$TG&RO=$RO&MO=$MO&PK=$PK&ST=$ST";
}
Toolbox::getURLContent("https://glpi2mdt.thauvin.org/report.php".$gets);
$task->log("https://glpi2mdt.thauvin.org/report.php".$gets);
if ($cron) {
$task->log("https://glpi2mdt.thauvin.org/report.php".$gets);
}
$query = "INSERT INTO glpi_plugin_glpi2mdt_parameters
(`parameter`, `scope`, `value_char`, `is_deleted`)
VALUES ('LatestVersion', 'global', '$latest_version', false)
Expand Down

0 comments on commit 1df8216

Please sign in to comment.