summaryrefslogtreecommitdiff
path: root/plugins/WikiHowProfile/WikiHowProfilePlugin.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-10-04 12:54:36 -0700
committerBrion Vibber <brion@pobox.com>2010-10-04 12:54:36 -0700
commit59119482ca34540bd7f0a2a1aa994de1d5328ea2 (patch)
tree864fdc9dda3da54a78d868339c32479b5296b6d0 /plugins/WikiHowProfile/WikiHowProfilePlugin.php
parent2db8aa3ec3f6804f8f16efe754aafb149f4035c9 (diff)
parent1652ded48c9c62c40157a5142e5231adbc574ddb (diff)
Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 1.0.x
Conflicts: actions/hostmeta.php actions/imsettings.php classes/User.php lib/adminpanelaction.php lib/channel.php lib/default.php lib/router.php lib/util.php
Diffstat (limited to 'plugins/WikiHowProfile/WikiHowProfilePlugin.php')
-rw-r--r--plugins/WikiHowProfile/WikiHowProfilePlugin.php17
1 files changed, 7 insertions, 10 deletions
diff --git a/plugins/WikiHowProfile/WikiHowProfilePlugin.php b/plugins/WikiHowProfile/WikiHowProfilePlugin.php
index b72bd55d6..fa683c483 100644
--- a/plugins/WikiHowProfile/WikiHowProfilePlugin.php
+++ b/plugins/WikiHowProfile/WikiHowProfilePlugin.php
@@ -47,7 +47,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
-
class WikiHowProfilePlugin extends Plugin
{
function onPluginVersion(&$versions)
@@ -57,7 +56,7 @@ class WikiHowProfilePlugin extends Plugin
'author' => 'Brion Vibber',
'homepage' => 'http://status.net/wiki/Plugin:Sample',
'rawdescription' =>
- _m('Fetches avatar and other profile info for WikiHow users when setting up an account via OpenID.'));
+ _m('Fetches avatar and other profile information for WikiHow users when setting up an account via OpenID.'));
return true;
}
@@ -107,14 +106,14 @@ class WikiHowProfilePlugin extends Plugin
/**
* Given a user's WikiHow profile URL, find their avatar.
- *
+ *
* @param string $profileUrl user page on the wiki
- *
+ *
* @return array of data; possible members:
* 'avatar' => full URL to avatar image
- *
+ *
* @throws Exception on various low-level failures
- *
+ *
* @todo pull location, web site, and about sections -- they aren't currently marked up cleanly.
*/
private function fetchProfile($profileUrl)
@@ -169,14 +168,14 @@ class WikiHowProfilePlugin extends Plugin
private function saveAvatar($user, $url)
{
if (!common_valid_http_url($url)) {
- throw new ServerException(sprintf(_m("Invalid avatar URL %s"), $url));
+ throw new ServerException(sprintf(_m("Invalid avatar URL %s."), $url));
}
// @fixme this should be better encapsulated
// ripped from OStatus via oauthstore.php (for old OMB client)
$temp_filename = tempnam(sys_get_temp_dir(), 'listener_avatar');
if (!copy($url, $temp_filename)) {
- throw new ServerException(sprintf(_m("Unable to fetch avatar from %s"), $url));
+ throw new ServerException(sprintf(_m("Unable to fetch avatar from %s."), $url));
}
$profile = $user->getProfile();
@@ -191,6 +190,4 @@ class WikiHowProfilePlugin extends Plugin
rename($temp_filename, Avatar::path($filename));
$profile->setOriginal($filename);
}
-
}
-