]> git.mxchange.org Git - friendica.git/commitdiff
Some more index / fatal erros fixed
authorMichael <heluecht@pirati.ca>
Tue, 16 Aug 2022 11:23:47 +0000 (11:23 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 16 Aug 2022 11:23:47 +0000 (11:23 +0000)
database.sql
doc/database/db_post-user.md
src/Content/Pager.php
src/Module/Update/Profile.php
static/dbstructure.config.php

index 40abb7f05624e819fa80bc44d89b5d699d0438af..e363dd57dda033318ca30c9137033f58f5d438bf 100644 (file)
@@ -1416,6 +1416,7 @@ CREATE TABLE IF NOT EXISTS `post-user` (
         INDEX `author-id_uid` (`author-id`,`uid`),
         INDEX `author-id_received` (`author-id`,`received`),
         INDEX `parent-uri-id_uid` (`parent-uri-id`,`uid`),
+        INDEX `uid_wall_received` (`uid`,`wall`,`received`),
         INDEX `uid_contactid` (`uid`,`contact-id`),
         INDEX `uid_unseen_contactid` (`uid`,`unseen`,`contact-id`),
         INDEX `uid_unseen` (`uid`,`unseen`),
index 5fbc3e985af726881d5af8b6346642ad090ebd69..ce213941dac071e890e6c6b09a3d0eeae81fe6e6 100644 (file)
@@ -60,6 +60,7 @@ Indexes
 | author-id_uid        | author-id, uid          |
 | author-id_received   | author-id, received     |
 | parent-uri-id_uid    | parent-uri-id, uid      |
+| uid_wall_received    | uid, wall, received     |
 | uid_contactid        | uid, contact-id         |
 | uid_unseen_contactid | uid, unseen, contact-id |
 | uid_unseen           | uid, unseen             |
index 98b885d42572d930ef0a61a6bfa1bd63f790ebd8..f776249b1b5d7b1d1a72dcc280fe744aad02307e 100644 (file)
@@ -58,7 +58,7 @@ class Pager
 
                $this->setQueryString($queryString);
                $this->setItemsPerPage($itemsPerPage);
-               $this->setPage(($_GET['page'] ?? 0) ?: 1);
+               $this->setPage((int)($_GET['page'] ?? 0) ?: 1);
        }
 
        /**
index b97b9f89e5d955a9c8286e8d20a0e3843343a477..50d0eddd14bd9397c3031c6bc5793a3d3d9431e5 100644 (file)
@@ -40,7 +40,7 @@ class Profile extends BaseModule
                $a = DI::app();
 
                // Ensure we've got a profile owner if updating.
-               $a->setProfileOwner($_GET['p'] ?? 0);
+               $a->setProfileOwner((int)($_GET['p'] ?? 0));
 
                if (DI::config()->get('system', 'block_public') && !local_user() && !Session::getRemoteContactID($a->getProfileOwner())) {
                        throw new ForbiddenException();
index 81f03fbf31a0a8fdb365dd2ecd7147ab8ce5a3d0..aedb4446674b99ffb9671a2796f49c151667d6f7 100644 (file)
@@ -1443,6 +1443,7 @@ return [
                        "author-id_uid" => ["author-id", "uid"],
                        "author-id_received" => ["author-id", "received"],
                        "parent-uri-id_uid" => ["parent-uri-id", "uid"],
+                       "uid_wall_received" => ["uid", "wall", "received"],
                        "uid_contactid" => ["uid", "contact-id"],
                        "uid_unseen_contactid" => ["uid", "unseen", "contact-id"],
                        "uid_unseen" => ["uid", "unseen"],