]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #6219 from MrPetovan/task/remove-x
authorMichael Vogel <icarus@dabo.de>
Sat, 1 Dec 2018 22:40:51 +0000 (23:40 +0100)
committerGitHub <noreply@github.com>
Sat, 1 Dec 2018 22:40:51 +0000 (23:40 +0100)
Remove x()

mod/admin.php
mod/display.php
mods/sample-nginx.config
src/App.php
src/Model/Term.php
src/Module/Magic.php
src/Worker/CronJobs.php

index 0a7f27a08f826a453cabbd7098864d1de857bf75..89514397f0da0fea80fe51703b13cf7a41599b8b 100644 (file)
@@ -1980,7 +1980,7 @@ function admin_page_users(App $a)
 
                '$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,
index 3edeade72b9ff84f328c57af1ee8313b33e318d3..74ad479a78368f60e7bb1027393e5f01bea07531 100644 (file)
@@ -22,6 +22,7 @@ use Friendica\Model\Profile;
 use Friendica\Protocol\ActivityPub;
 use Friendica\Protocol\DFRN;
 use Friendica\Util\Strings;
+use Friendica\Module\Objects;
 
 function display_init(App $a)
 {
@@ -82,7 +83,7 @@ function display_init(App $a)
        }
 
        if (ActivityPub::isRequest()) {
-               $a->internalRedirect(str_replace('display/', 'objects/', $a->query_string));
+               Objects::rawContent();
        }
 
        if ($item["id"] != $item["parent"]) {
index d6afe7174662f00d24c27439d13d0a85bfae820b..71d37855169c39a41f1685b5da4dc160c21c8572 100644 (file)
@@ -91,7 +91,7 @@ server {
   # 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;
index 6f95b8edb7d1994637012409b7f7a078eb965dc3..45d743b0d61d55e5899f3a88b8f26b66f7bb776a 100644 (file)
@@ -1880,7 +1880,7 @@ class App
         */
        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");
                }
 
@@ -1897,7 +1897,7 @@ class App
         */
        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);
index 3718887122436ad35784b0f7b1f3b7cc8fc91620..0d44acd2c988958237e35beb3b7343e4bc5964c0 100644 (file)
@@ -156,7 +156,7 @@ class Term
                                $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;
                        }
 
index 51f501b853dbf4ceaf2fa45f153b17b5b32abe0a..f0be114e3dbb056aa1c46897360d3e4ef1158d3d 100644 (file)
@@ -43,7 +43,7 @@ class Magic extends BaseModule
                }
 
                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);
                }
index 0c565daa73ec5ceb9e54611686d50b90b714a866..164b1cf4d203747739b2e603073b134a906ba8e1 100644 (file)
@@ -119,7 +119,7 @@ class CronJobs
                }
 
                // 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']]);