Browse Source

updater: redirect back if no update is necessary

Andrew Dolgov 7 years ago
parent
commit
f924b94ae3
1 changed files with 8 additions and 0 deletions
  1. 8 0
      update.php

+ 8 - 0
update.php

@@ -11,6 +11,14 @@
 	$link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
 
 	init_connection($link);
+
+	$version = get_schema_version($link);
+
+	if ($version == SCHEMA_VERSION) {
+		header("Location: index.php");
+		exit;
+	}
+
 	login_sequence($link);
 
 	$owner_uid = $_SESSION["uid"];