changeset 1109:ac3bd4e94555

Merge.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 16 May 2019 21:59:44 +0300
parents c7093ad17858 (diff) acb65ff40ce1 (current diff)
children a5f52e54c9da
files msitegen.inc.php
diffstat 1 files changed, 15 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/msitegen.inc.php	Thu May 16 12:44:17 2019 +0300
+++ b/msitegen.inc.php	Thu May 16 21:59:44 2019 +0300
@@ -546,21 +546,6 @@
 }
 
 
-function stDBGetSQLParam($dbh, $type, $value)
-{
-  switch ($type)
-  {
-    case "d": return intval($value);
-    case "s": return $dbh->quote($value);
-    case "b": return intval($value) ? 1 : 0;
-    case "D": return intval(stGetRequestItem($value));
-    case "S": return $dbh->quote(stGetRequestItem($value));
-    case "Q": return $dbh->quote(stGetRequestItem($value));
-    case "B": return intval(stGetRequestItem($value)) ? 1 : 0;
-  }
-}
-
-
 function stConnectSQLDB()
 {
   global $db;
@@ -574,11 +559,25 @@
     stLogError("Could not connect to SQL database: ".$e->getMessage().".");
     return FALSE;
   }
-  $db = stConnectSQLDBSpec(stGetSetting("sqlDB"));
   return ($db !== FALSE);
 }
 
 
+function stDBGetSQLParam($dbh, $type, $value)
+{
+  switch ($type)
+  {
+    case "d": return intval($value);
+    case "s": return $dbh->quote($value);
+    case "b": return intval($value) ? 1 : 0;
+    case "D": return intval(stGetRequestItem($value));
+    case "S": return $dbh->quote(stGetRequestItem($value));
+    case "Q": return $dbh->quote(stGetRequestItem($value));
+    case "B": return intval(stGetRequestItem($value)) ? 1 : 0;
+  }
+}
+
+
 function stDBPrepareSQLUpdate($dbh, $table, $cond, $pairs, $values = NULL)
 {
   $sql = [];