yep, fixed deletions.
authorpaulr <me@pjr.cc>
Tue, 9 Aug 2011 14:52:14 +0000 (00:52 +1000)
committerpaulr <me@pjr.cc>
Tue, 9 Aug 2011 14:52:14 +0000 (00:52 +1000)
plugins/hosts.php

index d2222b6..fecbed4 100644 (file)
@@ -114,6 +114,8 @@ class GLCASHosts {
                                        $this->config->addData("hosts", "$hname", "$hip", "$groupop");
                                }
                                if($operation == "delete") {
+                                       $this->config->delData("ping", "$hip");
+                                       $this->config->delData("lastseen", "$hip");
                                        $this->config->delData("hosts", "$hname", "$hip", "$hg");
                                }
                                if($operation == "ping") {
@@ -308,7 +310,7 @@ class GLCASHosts {
                                        }
                                }
                                $lastseen = glcas_getLastSeen($hip, $this->config->getData("lastseen", "$hip"));
-                               echo "<tr><td><input type=\"checkbox\" name=\"$hname-selecthost\"></td><td>$hname</td><td>$hip</td><td>$lastseen</td><td>$lastping</td><td><a href=\"?action=deletehost&hostname=$hname\">Delete</a></tr>";
+                               echo "<tr><td><input type=\"checkbox\" name=\"$hname-selecthost\"></td><td>$hname</td><td>$hip</td><td>$lastseen</td><td>$lastping</td></tr>";
                        }
                }
                echo "</table>";
@@ -342,7 +344,7 @@ class GLCASHosts {
                                                }
                                                                                                
                                                $lastseen = glcas_getLastSeen($hip, $this->config->getData("lastseen", "$hip"));
-                                               echo "<tr><td><input type=\"checkbox\" name=\"$hname-selecthost\"></td><td>$hname</td><td>$hip</td><td>$lastseen</td><td>$lastping</td><td><a href=\"?action=deletehost&hostname=$hname\">Delete</a></tr>";
+                                               echo "<tr><td><input type=\"checkbox\" name=\"$hname-selecthost\"></td><td>$hname</td><td>$hip</td><td>$lastseen</td><td>$lastping</td></tr>";
                                        }
                                }
                                echo "</table>";