Ver código fonte

Change device_provision_enable to device_enabled to make it consistent with the rest of the fields that are used for to enable and disable something.

markjcrane 9 anos atrás
pai
commit
6bddb453be
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3 3
      core/user_settings/user_dashboard.php

+ 3 - 3
core/user_settings/user_dashboard.php

@@ -120,16 +120,16 @@
 				$stats['system']['devices']['disabled'] = 0;
 				$stats['system']['devices']['disabled'] = 0;
 				$stats['domain']['devices']['total'] = 0;
 				$stats['domain']['devices']['total'] = 0;
 				$stats['domain']['devices']['disabled'] = 0;
 				$stats['domain']['devices']['disabled'] = 0;
-				$sql = "select domain_uuid, device_provision_enabled from v_devices";
+				$sql = "select domain_uuid, device_enabled from v_devices";
 				$prep_statement = $db->prepare(check_sql($sql));
 				$prep_statement = $db->prepare(check_sql($sql));
 				$prep_statement->execute();
 				$prep_statement->execute();
 				$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
 				$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
 				$stats['system']['devices']['total'] = count($result);
 				$stats['system']['devices']['total'] = count($result);
 				foreach ($result as $row) {
 				foreach ($result as $row) {
-					$stats['system']['devices']['disabled'] += ($row['device_provision_enabled'] != 'true') ? 1 : 0;
+					$stats['system']['devices']['disabled'] += ($row['device_enabled'] != 'true') ? 1 : 0;
 					if ($row['domain_uuid'] == $_SESSION['domain_uuid']) {
 					if ($row['domain_uuid'] == $_SESSION['domain_uuid']) {
 						$stats['domain']['devices']['total']++;
 						$stats['domain']['devices']['total']++;
-						$stats['domain']['devices']['disabled'] += ($row['device_provision_enabled'] != 'true') ? 1 : 0;
+						$stats['domain']['devices']['disabled'] += ($row['device_enabled'] != 'true') ? 1 : 0;
 					}
 					}
 				}
 				}
 				unset ($sql, $prep_statement, $result);
 				unset ($sql, $prep_statement, $result);