From 808dd053c6b14822b544ac0e76292f7d74445ec2 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 23 Aug 2012 22:53:32 +0400 Subject: implement web-based self updater (closes #395) --- classes/pref/prefs.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'classes/pref/prefs.php') diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index 5b472d5a9..576dd2f03 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -524,23 +524,28 @@ class Pref_Prefs extends Handler_Protected { print "
".__("Do not close this dialog until updating is finished. Backup your tt-rss directory before continuing.")."
"; - print "
";
-		print __("Ready to update.")."\n";
-		print "
"; + print ""; print "
"; print ""; - print ""; print "
"; print ""; } function performUpdate() { + $step = (int) $_REQUEST["step"]; + $params = json_decode($_REQUEST["params"], true); + $force = (bool) $_REQUEST["force"]; + if (($_SESSION["access_level"] >= 10 || SINGLE_USER_MODE) && CHECK_FOR_NEW_VERSION) { include "update_self.php"; - update_self($this->link, true); + + print json_encode(update_self_step($this->link, $step, $params, $force)); } } -- cgit v1.2.3