about summary refs log tree commit diff stats
path: root/include/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <noreply@fakecake.org>2017-02-25 15:37:22 +0300
committerAndrew Dolgov <noreply@fakecake.org>2017-02-25 15:37:32 +0300
commitbc6e20d282e0cc6152fb3b7a99ef79aef08388d3 (patch)
treefec469e63bb6b6e03475e8faf1c019b9e8467626 /include/functions.php
parentf37c9975eeec34562c93f9a0b25ace14294d089f (diff)
downloadthe-epube-bc6e20d282e0cc6152fb3b7a99ef79aef08388d3.tar.gz
the-epube-bc6e20d282e0cc6152fb3b7a99ef79aef08388d3.tar.xz
use sqlite as a scratch db
store lastread pointer as a CFI
Diffstat (limited to 'include/functions.php')
-rw-r--r--include/functions.php26
1 files changed, 0 insertions, 26 deletions
diff --git a/include/functions.php b/include/functions.php
deleted file mode 100644
index 9563190..0000000
--- a/include/functions.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-	require_once "db.php";
-
-	function init_connection($link) {
-
-		if (!$link) {
-			if (DB_TYPE == "mysql") {
-			print mysql_error();
-		}
-		// PG seems to display its own errors just fine by default.
-			die("Connection failed.");
-		}
-
-		if (DB_TYPE == "pgsql") {
-			pg_query($link, "set client_encoding = 'UTF-8'");
-			pg_set_client_encoding("UNICODE");
-			pg_query($link, "set datestyle = 'ISO, european'");
-			pg_query($link, "set time zone '".DB_TIMEZONE."'");
-		} else {
-			if (defined('MYSQL_CHARSET') && MYSQL_CHARSET) {
-				db_query($link, "SET NAMES " . MYSQL_CHARSET);
-	//			db_query($link, "SET CHARACTER SET " . MYSQL_CHARSET);
-			}
-		}
-	}
-