Line 363... |
Line 363... |
363 |
return false;
|
363 |
return false;
|
364 |
} // checkAndUpdateAttribute
|
364 |
} // checkAndUpdateAttribute
|
365 |
|
365 |
|
366 |
# simply verifies some attributes of the computer
|
366 |
# simply verifies some attributes of the computer
|
367 |
private function updateComputerMakeup() {
|
367 |
private function updateComputerMakeup() {
|
- |
|
368 |
if ( isset( $this->report['system']['memory'] ) ) {
|
368 |
$this->checkAndUpdateAttribute('Memory', $this->report['system']['memory'], 0.30); // memory can be plus/minus 30%
|
369 |
$this->checkAndUpdateAttribute('Memory', $this->report['system']['memory'], 0.30); // memory can be plus/minus 30%
|
- |
|
370 |
}
|
- |
|
371 |
if ( isset( $this->report['system']['num_cpu'] ) ) {
|
369 |
$this->checkAndUpdateAttribute('Number of CPUs',$this->report['system']['num_cpu']);
|
372 |
$this->checkAndUpdateAttribute('Number of CPUs',$this->report['system']['num_cpu']);
|
- |
|
373 |
}
|
- |
|
374 |
if ( isset( $this->report['system']['cpu_type'] ) ) {
|
370 |
$this->checkAndUpdateAttribute('CPU Type', $this->report['system']['cpu_type']);
|
375 |
$this->checkAndUpdateAttribute('CPU Type', $this->report['system']['cpu_type']);
|
- |
|
376 |
}
|
- |
|
377 |
if ( isset( $this->report['system']['cpu_sub'] ) ) {
|
371 |
$this->checkAndUpdateAttribute('CPU SubType', $this->report['system']['cpu_sub']);
|
378 |
$this->checkAndUpdateAttribute('CPU SubType', $this->report['system']['cpu_sub']);
|
- |
|
379 |
}
|
- |
|
380 |
if ( isset( $this->report['system']['cpu_speed'] ) ) {
|
372 |
$this->checkAndUpdateAttribute('CPU Speed', $this->report['system']['cpu_speed'], 0.30 ); // cpu speed can be plus/minus 30%
|
381 |
$this->checkAndUpdateAttribute('CPU Speed', $this->report['system']['cpu_speed'], 0.30 ); // cpu speed can be plus/minus 30%
|
- |
|
382 |
}
|
373 |
// validate serial number and update if necessary
|
383 |
// validate serial number and update if necessary
|
374 |
if ( $this->serialNumber ) {
|
384 |
if ( $this->serialNumber ) {
|
375 |
$dbSerial = getOneDBValue( "select serial from device where device_id = $this->machineID" );
|
385 |
$dbSerial = getOneDBValue( "select serial from device where device_id = $this->machineID" );
|
376 |
if ( ! isset ( $dbSerial ) or $dbSerial != $this->serialNumber ) {
|
386 |
if ( ! isset ( $dbSerial ) or $dbSerial != $this->serialNumber ) {
|
377 |
$this->messages[] = "Updating serial number to $this->serialNumber";
|
387 |
$this->messages[] = "Updating serial number to $this->serialNumber";
|