Skip to content

Commit 251a633

Browse files
committed
fix
1 parent d4e6c04 commit 251a633

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

inc/sccm.class.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,21 @@ public function showHome()
4949
echo __('Please, read the documentation before using that.', 'footprints');
5050
}
5151

52-
public function getSccmVersion()
52+
public function getSccmBuildNumber()
5353
{
5454
$PluginSccmSccmdb = new PluginSccmSccmdb();
5555
$res = $PluginSccmSccmdb->connect();
5656
if (!$res) {
5757
die;
5858
}
5959

60-
$query = "SELECT TOP 1 Version FROM dbo.Site;";
60+
$query = "SELECT TOP 1 BuildNumber FROM dbo.Site;";
6161

6262
$result = $PluginSccmSccmdb->exec_query($query);
6363

6464
$version = null;
6565
if ($row = sqlsrv_fetch_array($result, SQLSRV_FETCH_ASSOC)) {
66-
$version = Sanitizer::sanitize($row['Version']);
66+
$version = Sanitizer::sanitize($row['BuildNumber']);
6767
}
6868

6969
return (int) $version;

inc/sccmxml.class.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,9 @@ public function setStorages()
418418
$CONTENT = $this->sxml->CONTENT[0];
419419
$i = 0;
420420
foreach ($PluginSccmSccm->getStorages($this->device_id) as $value) {
421-
// since sccm 2409 is no more in KB but in MB
422-
$multiplier = ($PluginSccmSccm->getSccmVersion() > 2409) ? 1 : 1024;
421+
// since SCCM 2409 (Version: 5.0.9132.1000) (BuildNumber 9132)
422+
// is total and freespace are no more in KB but in MB
423+
$multiplier = ($PluginSccmSccm->getSccmBuildNumber() > 9132 ) ? 1 : 1024;
423424

424425
$value['gld-TotalSize'] = intval($value['gld-TotalSize']) * $multiplier;
425426
$value['gld-FreeSpace'] = intval($value['gld-FreeSpace']) * $multiplier;

0 commit comments

Comments
 (0)