about summary refs log tree commit diff stats
path: root/backend.php
diff options
context:
space:
mode:
authorAndrew Dolgov <noreply@fakecake.org>2017-02-25 01:33:35 +0300
committerAndrew Dolgov <noreply@fakecake.org>2017-02-25 01:33:35 +0300
commitabe6ca80782474e266961e49077ee566c22a0a91 (patch)
treede507d423b39e7f6879b98553b87388345a2fcca /backend.php
parent54e8aeed8830644ab2d25fb8fb37d2323b607eef (diff)
downloadthe-epube-abe6ca80782474e266961e49077ee566c22a0a91.tar.gz
the-epube-abe6ca80782474e266961e49077ee566c22a0a91.tar.xz
store font/size settings locally
Diffstat (limited to 'backend.php')
-rw-r--r--backend.php46
1 files changed, 0 insertions, 46 deletions
diff --git a/backend.php b/backend.php
index 1a4acdc..b6e840c 100644
--- a/backend.php
+++ b/backend.php
@@ -67,52 +67,6 @@
 
 		break;
 
-	case "setsetting":
-		$key_map = [
-			"fontSize" => "font_size",
-			"fontFamily" => "font_family",
-			"lineHeight" => "line_height"
-		];
-
-		print $key;
-
-		$key = $key_map[$_REQUEST["key"]];
-		$value = db_escape_string($_REQUEST["value"]);
-
-		if ($key && $value) {
-			db_query($link, "UPDATE epube_settings SET $key = '$value' WHERE owner = '$owner'");
-		}
-
-		break;
-
-	case "getsettings":
-
-		$settings = [
-			"fontSize" => "16",
-			"fontFamily" => "Georgia",
-			"lineHeight" => "100",
-		];
-
-		$result = db_query($link, "SELECT * FROM epube_settings WHERE owner = '$owner' LIMIT 1");
-
-		if (db_num_rows($result) != 0) {
-
-			$line = db_fetch_assoc($result);
-
-			$settings["fontSize"] = (int)$line["font_size"];
-			$settings["fontFamily"] = $line["font_family"];
-			$settings["lineHeight"] = (int)$line["line_height"];
-
-		} else {
-			db_query($link, "INSERT INTO epube_settings (owner, font_family, font_size, line_height) VALUES
-				('$owner', '".$settings["fontFamily"]."','".$settings["fontSize"]."','".$settings["lineHeight"]."')");
-
-		}
-
-		print json_encode($settings);
-
-		break;
-
 	case "getpagination":
 		$bookid = db_escape_string($_REQUEST["id"]);