We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit e465d1a2 authored by jurgbohn's avatar jurgbohn

Added reportError to web

parent 70963137
......@@ -19,6 +19,7 @@
*/
if(!file_exists(dirname(__FILE__) . "/config.php")) {
die("Please run the <a href='install.php'>Install</a> script to configure your installation");
}
......@@ -31,4 +32,16 @@ if (PEAR::isError($mdb2)) {
die($mdb2->getMessage());
}
function reportError($text, $data) {
// make a fresh connection
$mdbe = MDB2::connect($connect_string);
if (PEAR::isError($mdbe)) {
die($mdbe->getMessage());
}
$mdbe->exec("INSERT INTO Error (msg, data, time) VALUES ("
. $mdbe->quote($text, 'text') . ", "
. $mdbe->quote($data, 'text') . ", "
. time() . ")");
}
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment