Browse Source

Some more index / fatal erros fixed

pull/11845/head
Michael 2 months ago
parent
commit
3e2c684319
  1. 1
      database.sql
  2. 1
      doc/database/db_post-user.md
  3. 2
      src/Content/Pager.php
  4. 2
      src/Module/Update/Profile.php
  5. 1
      static/dbstructure.config.php

1
database.sql

@ -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`),

1
doc/database/db_post-user.md

@ -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 |

2
src/Content/Pager.php

@ -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);
}
/**

2
src/Module/Update/Profile.php

@ -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();

1
static/dbstructure.config.php

@ -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"],

Loading…
Cancel
Save