aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/admin/site/unlock_upgrade.php10
-rw-r--r--actions/login.php4
2 files changed, 12 insertions, 2 deletions
diff --git a/actions/admin/site/unlock_upgrade.php b/actions/admin/site/unlock_upgrade.php
new file mode 100644
index 000000000..b625b1d26
--- /dev/null
+++ b/actions/admin/site/unlock_upgrade.php
@@ -0,0 +1,10 @@
+<?php
+/**
+ * Unlocks the upgrade script
+ */
+
+if (_elgg_upgrade_is_locked()) {
+ _elgg_upgrade_unlock();
+}
+system_message(elgg_echo('upgrade:unlock:success'));
+forward(REFERER);
diff --git a/actions/login.php b/actions/login.php
index ea7fb3508..1e5e92ede 100644
--- a/actions/login.php
+++ b/actions/login.php
@@ -7,7 +7,7 @@
*/
// set forward url
-if (isset($_SESSION['last_forward_from']) && $_SESSION['last_forward_from']) {
+if (!empty($_SESSION['last_forward_from'])) {
$forward_url = $_SESSION['last_forward_from'];
unset($_SESSION['last_forward_from']);
} elseif (get_input('returntoreferer')) {
@@ -19,7 +19,7 @@ if (isset($_SESSION['last_forward_from']) && $_SESSION['last_forward_from']) {
$username = get_input('username');
$password = get_input('password', null, false);
-$persistent = get_input("persistent", false);
+$persistent = (bool) get_input("persistent");
$result = false;
if (empty($username) || empty($password)) {