'$h_users' => L10n::t('Users'),
'$h_newuser' => L10n::t('New User'),
- '$th_deleted' => [L10n::t('Name'), L10n::t('Email'), L10n::t('Register date'), L10n::t('Last login'), L10n::t('Last item'), L10n::t('Delete in')],
+ '$th_deleted' => [L10n::t('Name'), L10n::t('Email'), L10n::t('Register date'), L10n::t('Last login'), L10n::t('Last item'), L10n::t('Permanent deletion')],
'$th_users' => $th_users,
'$order_users' => $order,
'$order_direction_users' => $order_direction,
use Friendica\Protocol\ActivityPub;
use Friendica\Protocol\DFRN;
use Friendica\Util\Strings;
+use Friendica\Module\Objects;
function display_init(App $a)
{
}
if (ActivityPub::isRequest()) {
- $a->internalRedirect(str_replace('display/', 'objects/', $a->query_string));
+ Objects::rawContent();
}
if ($item["id"] != $item["parent"]) {
# by denying dot files and rewrite request to the front controller
location ^~ /.well-known/ {
allow all;
- try_files $uri /index.php?pagename=$uri&$args;
+ rewrite ^ /index.php?pagename=$uri;
}
include mime.types;
*/
public function internalRedirect($toUrl = '', $ssl = false)
{
- if (filter_var($toUrl, FILTER_VALIDATE_URL)) {
+ if (!empty(parse_url($toUrl, PHP_URL_SCHEME))) {
throw new InternalServerErrorException("'$toUrl is not a relative path, please use System::externalRedirectTo");
}
*/
public function redirect($toUrl)
{
- if (filter_var($toUrl, FILTER_VALIDATE_URL)) {
+ if (!empty(parse_url($toUrl, PHP_URL_SCHEME))) {
Core\System::externalRedirect($toUrl);
} else {
$this->internalRedirect($toUrl);
$link = '';
}
- if (DBA::exists('term', ['uid' => $message['uid'], 'otype' => TERM_OBJ_POST, 'oid' => $itemid, 'url' => $link])) {
+ if (DBA::exists('term', ['uid' => $message['uid'], 'otype' => TERM_OBJ_POST, 'oid' => $itemid, 'term' => $term])) {
continue;
}
}
if (!$cid) {
- Logger::log('No contact record found: ' . print_r($_REQUEST, true), Logger::DEBUG);
+ Logger::log('No contact record found: ' . json_encode($_REQUEST), Logger::DEBUG);
// @TODO Finding a more elegant possibility to redirect to either internal or external URL
$a->redirect($dest);
}
}
// delete user records for recently removed accounts
- $users = DBA::select('user', ['uid'], ["`account_removed` AND `account_expires_on` < UTC_TIMESTAMP() - INTERVAL 3 DAY"]);
+ $users = DBA::select('user', ['uid'], ["`account_removed` AND `account_expires_on` < UTC_TIMESTAMP() "]);
while ($user = DBA::fetch($users)) {
// Delete the contacts of this user
$self = DBA::selectFirst('contact', ['nurl'], ['self' => true, 'uid' => $user['uid']]);