]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Managed_DataObject now has getByUri()
authorMikael Nordfeldth <mmn@hethane.se>
Sat, 25 Jun 2016 09:58:36 +0000 (11:58 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Sat, 25 Jun 2016 09:59:06 +0000 (11:59 +0200)
classes/Notice.php
classes/User.php

index 96f4769af2cb5bfe91f51eae2dcd485ce5c02e75..35b1b233bbfffc72565dcf5bd580b2a75bfa7882 100644 (file)
@@ -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.
      */
index c9c61d3aed40606267eb5e6268b624b91e39a1c4..952b74134b0c35c2050ad53a608f127d9abfd3d0 100644 (file)
@@ -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();