]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Starred.php
Merge pull request #9893 from MrPetovan/bug/9879-empty-plurals
[friendica.git] / src / Module / Starred.php
index 0f111b21e0198f51185aef8b650044d37837bd0d..8bc0fa3e4eeeb1a26d715571b805eb684c40fa12 100644 (file)
@@ -1,10 +1,30 @@
 <?php
+/**
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
 
 namespace Friendica\Module;
 
 use Friendica\BaseModule;
 use Friendica\DI;
 use Friendica\Model\Item;
+use Friendica\Model\Post;
 
 /**
  * Toggle starred items
@@ -23,7 +43,7 @@ class Starred extends BaseModule
 
                $itemId = intval($parameters['item']);
 
-               $item = Item::selectFirstForUser(local_user(), ['starred'], ['uid' => local_user(), 'id' => $itemId]);
+               $item = Post::selectFirstForUser(local_user(), ['starred'], ['uid' => local_user(), 'id' => $itemId]);
                if (empty($item)) {
                        throw new \Friendica\Network\HTTPException\NotFoundException();
                }