]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/scripts/public_html/common.php
go
[helm.git] / helm / software / matita / scripts / public_html / common.php
index 48121b5498ad748ff80ffff815bdd6fef0bfb483..0e7962abfae84b2aff4a64c1f9031dc2583e7258 100644 (file)
@@ -50,8 +50,9 @@ function printer($q){
 function query($q,$f) {
   $db = mysql_pconnect("localhost","helm");
   mysql_select_db("matita");
+  $q = preg_replace("/\n/"," ",$q);
   if (!preg_match("/^(select|describe)[^\n;]*;?$/i",$q)) {
-    echo "Query not allowed!";
+    die("Query not allowed!<pre>" . $q . "</pre>");
     return;
   }
   $rc = mysql_query($q,$db);