summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2f884d9)
raw | patch | inline | side by side (parent: 2f884d9)
author | Bruno Prémont <bonbons@linux-vserver.org> | |
Mon, 2 Mar 2009 08:24:39 +0000 (09:24 +0100) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Mon, 2 Mar 2009 08:24:39 +0000 (09:24 +0100) |
This removes some obsolete code which prevents flush from working and adds
missing wrapper error500().
missing wrapper error500().
contrib/php-collection/functions.php | patch | blob | history | |
contrib/php-collection/graph.php | patch | blob | history |
index 9fb6116f1487ed1d3e99a56154beb6f7d9ca8550..cb916abe8656d34cbb021e9f2b8c0cb51c42fd2a 100644 (file)
if (is_null($identifier) || (is_array($identifier) && count($identifier) == 0) || !(is_string($identifier) || is_array($identifier)))
return false;
- if (is_null($host) || !is_string($host) || strlen($host) == 0)
- return false;
- if (is_null($plugin) || !is_string($plugin) || strlen($plugin) == 0)
- return false;
- if (is_null($pinst) || !is_string($pinst))
- return false;
- if (is_null($type) || !is_string($type) || strlen($type) == 0)
- return false;
- if (is_null($tinst) || (is_array($tinst) && count($tinst) == 0) || !(is_string($tinst) || is_array($tinst)))
- return false;
-
$u_errno = 0;
$u_errmsg = '';
if ($socket = @fsockopen($config['collectd_sock'], 0, $u_errno, $u_errmsg)) {
index e53657681a09c59f1bb516fe75582db05cc7b71b..17749e06926fd269da3c3b88c7a1f51582e08784 100644 (file)
return error(400, "Bad request", $title, $msg);
}
+/**
+ * Incomplete / invalid request
+ */
+function error500($title, $msg) {
+ return error(500, "Internal error", $title, $msg);
+}
+
// Process input arguments
$host = read_var('host', $_GET, null);
if (is_null($host))