From f93f02f424b5c13d4caf3d319c54784401f80221 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sat, 25 Jun 2016 11:58:36 +0200 Subject: [PATCH] Managed_DataObject now has getByUri() --- classes/Notice.php | 10 ---------- classes/User.php | 10 ---------- 2 files changed, 20 deletions(-) diff --git a/classes/Notice.php b/classes/Notice.php index 96f4769af2..35b1b233bb 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -336,16 +336,6 @@ class Notice extends Managed_DataObject } } - public static function getByUri($uri) - { - $notice = new Notice(); - $notice->uri = $uri; - if (!$notice->find(true)) { - throw new NoResultException($notice); - } - return $notice; - } - /** * Extract #hashtags from this notice's content and save them to the database. */ diff --git a/classes/User.php b/classes/User.php index c9c61d3aed..952b74134b 100644 --- a/classes/User.php +++ b/classes/User.php @@ -140,16 +140,6 @@ class User extends Managed_DataObject return $this->uri; } - static function getByUri($uri) - { - $user = new User(); - $user->uri = $uri; - if (!$user->find(true)) { - throw new NoResultException($user); - } - return $user; - } - public function getNickname() { return $this->getProfile()->getNickname(); -- 2.39.5