| 
									
										
										
										
											2009-09-07 11:07:59 +00:00
										 |  |  | <?php | 
					
						
							| 
									
										
										
										
											2007-04-03 14:10:23 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-25 12:24:34 +00:00
										 |  |  | // Include all discovery modules
 | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  | $include_dir = 'includes/discovery/storage'; | 
					
						
							|  |  |  | require 'includes/include-dir.inc.php'; | 
					
						
							| 
									
										
										
										
											2008-03-22 23:09:35 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-25 12:24:34 +00:00
										 |  |  | // Remove storage which weren't redetected here
 | 
					
						
							| 
									
										
										
										
											2010-02-24 13:46:12 +00:00
										 |  |  | $sql = "SELECT * FROM `storage` WHERE `device_id`  = '".$device['device_id']."'"; | 
					
						
							| 
									
										
										
										
											2007-05-20 19:21:35 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-08-20 15:59:43 +02:00
										 |  |  | d_echo($valid_storage); | 
					
						
							| 
									
										
										
										
											2010-02-24 13:46:12 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  | foreach (dbFetchRows($sql) as $test_storage) { | 
					
						
							|  |  |  |     $storage_index = $test_storage['storage_index']; | 
					
						
							|  |  |  |     $storage_mib   = $test_storage['storage_mib']; | 
					
						
							| 
									
										
										
										
											2015-08-20 15:59:43 +02:00
										 |  |  |     d_echo($storage_index.' -> '.$storage_mib."\n"); | 
					
						
							| 
									
										
										
										
											2011-03-15 11:39:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  |     if (!$valid_storage[$storage_mib][$storage_index]) { | 
					
						
							|  |  |  |         echo '-'; | 
					
						
							|  |  |  |         dbDelete('storage', '`storage_id` = ?', array($test_storage['storage_id'])); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2011-03-16 17:53:20 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  |     unset($storage_index); | 
					
						
							|  |  |  |     unset($storage_mib); | 
					
						
							| 
									
										
										
										
											2007-05-20 19:21:35 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-24 13:46:12 +00:00
										 |  |  | unset($valid_storage); | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  | echo "\n"; |