From: Brion Vibber Date: Thu, 27 May 2010 21:57:32 +0000 (-0700) Subject: Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.x X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=696aeea113b88fd0f6b7c4c88eebc2f4f369d245;p=quix0rs-gnu-social.git Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.x Conflicts: lib/language.php plugins/OpenID/finishaddopenid.php --- 696aeea113b88fd0f6b7c4c88eebc2f4f369d245 diff --cc lib/atomgroupnoticefeed.php index b4810d04a0,7934a4f9e5..c7c36af825 --- a/lib/atomgroupnoticefeed.php +++ b/lib/atomgroupnoticefeed.php @@@ -54,11 -55,10 +55,11 @@@ class AtomGroupNoticeFeed extends AtomN * * @return void */ - function __construct($group, $indent = true) { - parent::__construct($indent); + function __construct($group, $cur = null, $indent = true) { + parent::__construct($cur, $indent); $this->group = $group; + // TRANS: Title in atom group notice feed. %s is a group name. $title = sprintf(_("%s timeline"), $group->nickname); $this->setTitle($title); diff --cc lib/language.php index 8009adc9b7,3846b8f358..5a2818133d --- a/lib/language.php +++ b/lib/language.php @@@ -206,15 -205,21 +206,22 @@@ function _mdomain($backtrace if (DIRECTORY_SEPARATOR !== '/') { $path = strtr($path, DIRECTORY_SEPARATOR, '/'); } - $cut = strpos($path, '/plugins/'); - if ($cut) { - $cut += strlen('/plugins/'); + $plug = strpos($path, '/plugins/'); + if ($plug === false) { + // We're not in a plugin; return null for the default domain. + return null; + } else { + $cut = $plug + 9; $cut2 = strpos($path, '/', $cut); - if ($cut && $cut2) { - $final = substr($path, $cut, $cut2 - $cut); + if ($cut2) { + $cached[$path] = substr($path, $cut, $cut2 - $cut); + } else { + // We might be running directly from the plugins dir? + // If so, there's no place to store locale info. + return null; } } + $cached[$path] = $final; } return $cached[$path]; } diff --cc plugins/OpenID/finishaddopenid.php index e07ab764e1,064e976426..47b3f7fb16 --- a/plugins/OpenID/finishaddopenid.php +++ b/plugins/OpenID/finishaddopenid.php @@@ -138,13 -132,15 +138,16 @@@ class FinishaddopenidAction extends Act $this->message(_m('Error connecting user.')); return; } - if ($sreg) { - if (!oid_update_user($cur, $sreg)) { - // TRANS: message in case the user or the user profile cannot be saved in StatusNet. - $this->message(_m('Error updating profile')); - return; + if (Event::handle('StartOpenIDUpdateUser', array($cur, $canonical, &$sreg))) { + if ($sreg) { + if (!oid_update_user($cur, $sreg)) { ++ // TRANS: message in case the user or the user profile cannot be saved in StatusNet. + $this->message(_m('Error updating profile')); + return; + } } } + Event::handle('EndOpenIDUpdateUser', array($cur, $canonical, $sreg)); // success!