]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/scripts/public_html/common.php
update in groud_2 and models
[helm.git] / helm / software / matita / scripts / public_html / common.php
index 48121b5498ad748ff80ffff815bdd6fef0bfb483..d56c9d40bf5b5d4b1eab1df4afb59737547c4048 100644 (file)
@@ -50,8 +50,9 @@ function printer($q){
 function query($q,$f) {
   $db = mysql_pconnect("localhost","helm");
   mysql_select_db("matita");
+  $q = ltrim(rtrim(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);