From 5d3bce49b896c1b13453e1b5673d4a5abf2bcdd1 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 21 Mar 2010 15:18:37 -0700 Subject: OStatus profile setup cleanup * drop OStatusPlugin::localProfileFromUrl(), we can just look up on user.uri * clean up a few edge cases that returned null through Ostatus_profile::ensure* code paths, now throws clear exception when we can't find a feed from the given profile url * add some doc comments on the ensure* methods --- plugins/OStatus/OStatusPlugin.php | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'plugins/OStatus/OStatusPlugin.php') diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php index 58f373e45..c985fb4bc 100644 --- a/plugins/OStatus/OStatusPlugin.php +++ b/plugins/OStatus/OStatusPlugin.php @@ -947,23 +947,4 @@ class OStatusPlugin extends Plugin } return false; } - - /** - * Utility function to check if the given URL is a canonical user profile - * page, and if so return the ID number. - * - * @param string $url - * @return mixed int or false - */ - public static function localProfileFromUrl($url) - { - $template = common_local_url('userbyid', array('id' => '31337')); - $template = preg_quote($template, '/'); - $template = str_replace('31337', '(\d+)', $template); - if (preg_match("/$template/", $url, $matches)) { - return intval($matches[1]); - } - return false; - } - } -- cgit v1.2.3-54-g00ecf