aboutsummaryrefslogtreecommitdiffstats
path: root/include/dba
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-06-22 22:43:08 -0700
committerzotlabs <mike@macgirvin.com>2017-06-22 22:43:08 -0700
commit6c771f84cedc71e7ffeecebe3e2fd7f912de3e7b (patch)
treec5a83b14454014795cc078cbabf1d056a8c8d609 /include/dba
parent02b7bc08033b21ea5438aa667e8dbb1fd72022bb (diff)
downloadvolse-hubzilla-6c771f84cedc71e7ffeecebe3e2fd7f912de3e7b.tar.gz
volse-hubzilla-6c771f84cedc71e7ffeecebe3e2fd7f912de3e7b.tar.bz2
volse-hubzilla-6c771f84cedc71e7ffeecebe3e2fd7f912de3e7b.zip
remove unused page_widgets.php include and provide a general function for loading sql from file to use in the cdav migration
Diffstat (limited to 'include/dba')
-rwxr-xr-xinclude/dba/dba_driver.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/dba/dba_driver.php b/include/dba/dba_driver.php
index b0ad7936c..4079bcaba 100755
--- a/include/dba/dba_driver.php
+++ b/include/dba/dba_driver.php
@@ -442,6 +442,20 @@ function db_getfunc($f) {
return $f;
}
+function db_load_file($f) {
+ // db errors should get logged to the logfile
+ $str = @file_get_contents($f);
+ $arr = explode(';', $str);
+ if($arr) {
+ foreach($arr as $a) {
+ if(strlen(trim($a))) {
+ $r = dbq(trim($a));
+ }
+ }
+ }
+}
+
+
// The logger function may make DB calls internally to query the system logging parameters.
// This can cause a recursion if database debugging is enabled.
// So this function preserves the current database debugging state and then turns it off