mirror of
https://github.com/friendica/friendica
synced 2025-04-23 10:30:11 +00:00
Several more warnings ... (#5340)
* Some more warnings removed * Even more warnings ... * Will it ever end? ;-) * Avoid warning in dbstructure * Origin and OStatus ... * There are more warnings solved ... yeah! * And again ... * We are not done yet * And more ... * And some new places ... * And more in the feeds * Avoid some more * And some backend stuff * Notifications cleared * Some more stuff * and again ... * It's getting fewer ... * Some warnings had been hidden in the notifications * Fix the fix * And another missing one ... * We need the owner here, not the user * Forgotten user * And more ... * And some more warnings disappeared ... * Some more frontend warnings * Some backend warnings removed * Fixed sidebar for "vier" * And more ... * Some more ... * And something for "remote self" * Am I stuck in an endless loop? * Fix: Clear tag and file field on update * Preset page content
This commit is contained in:
parent
32ef5623ab
commit
0360f7197a
48 changed files with 415 additions and 267 deletions
|
@ -248,7 +248,7 @@ class Login extends BaseModule
|
|||
// Make sure to refresh the last login time for the user if the user
|
||||
// stays logged in for a long time, e.g. with "Remember Me"
|
||||
$login_refresh = false;
|
||||
if (!x($_SESSION['last_login_date'])) {
|
||||
if (empty($_SESSION['last_login_date'])) {
|
||||
$_SESSION['last_login_date'] = DateTimeFormat::utcNow();
|
||||
}
|
||||
if (strcmp(DateTimeFormat::utc('now - 12 hours'), $_SESSION['last_login_date']) > 0) {
|
||||
|
|
|
@ -13,7 +13,7 @@ use dba;
|
|||
|
||||
/**
|
||||
* Magic Auth (remote authentication) module.
|
||||
*
|
||||
*
|
||||
* Ported from Hubzilla: https://framagit.org/hubzilla/core/blob/master/Zotlabs/Module/Magic.php
|
||||
*/
|
||||
class Magic extends BaseModule
|
||||
|
@ -31,7 +31,7 @@ class Magic extends BaseModule
|
|||
$test = ((x($_REQUEST, 'test')) ? intval($_REQUEST['test']) : 0);
|
||||
$owa = ((x($_REQUEST, 'owa')) ? intval($_REQUEST['owa']) : 0);
|
||||
|
||||
// NOTE: I guess $dest isn't just the profile url (could be also
|
||||
// NOTE: I guess $dest isn't just the profile url (could be also
|
||||
// other profile pages e.g. photo). We need to find a solution
|
||||
// to be able to redirct to other pages than the contact profile.
|
||||
$cid = Contact::getIdForURL($dest);
|
||||
|
@ -48,8 +48,8 @@ class Magic extends BaseModule
|
|||
$contact = dba::selectFirst('contact', ['id', 'nurl', 'url'], ['id' => $cid]);
|
||||
|
||||
// Redirect if the contact is already authenticated on this site.
|
||||
if (array_key_exists('id', $a->contact) && strpos($contact['nurl'], normalise_link(self::getApp()->get_baseurl())) !== false) {
|
||||
if($test) {
|
||||
if (!empty($a->contact) && array_key_exists('id', $a->contact) && strpos($contact['nurl'], normalise_link(self::getApp()->get_baseurl())) !== false) {
|
||||
if ($test) {
|
||||
$ret['success'] = true;
|
||||
$ret['message'] .= 'Local site - you are already authenticated.' . EOL;
|
||||
return $ret;
|
||||
|
@ -111,7 +111,7 @@ class Magic extends BaseModule
|
|||
}
|
||||
}
|
||||
|
||||
if($test) {
|
||||
if ($test) {
|
||||
$ret['message'] = 'Not authenticated or invalid arguments' . EOL;
|
||||
return $ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue