summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/apiaccountupdateprofile.php4
-rw-r--r--actions/apigroupjoin.php2
-rw-r--r--actions/apigroupleave.php2
-rw-r--r--actions/apigroupshow.php29
-rw-r--r--actions/apioauthauthorize.php4
-rw-r--r--actions/confirmaddress.php2
-rw-r--r--actions/othersettings.php2
-rw-r--r--actions/version.php3
8 files changed, 29 insertions, 19 deletions
diff --git a/actions/apiaccountupdateprofile.php b/actions/apiaccountupdateprofile.php
index fd4384a25..9b371ea95 100644
--- a/actions/apiaccountupdateprofile.php
+++ b/actions/apiaccountupdateprofile.php
@@ -115,11 +115,11 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction
$original = clone($profile);
- if (empty($this->name)) {
+ if (!empty($this->name)) {
$profile->fullname = $this->name;
}
- if (empty($this->url)) {
+ if (!empty($this->url)) {
$profile->homepage = $this->url;
}
diff --git a/actions/apigroupjoin.php b/actions/apigroupjoin.php
index 3309d63e7..374cf83df 100644
--- a/actions/apigroupjoin.php
+++ b/actions/apigroupjoin.php
@@ -145,7 +145,7 @@ class ApiGroupJoinAction extends ApiAuthAction
switch($this->format) {
case 'xml':
- $this->show_single_xml_group($this->group);
+ $this->showSingleXmlGroup($this->group);
break;
case 'json':
$this->showSingleJsonGroup($this->group);
diff --git a/actions/apigroupleave.php b/actions/apigroupleave.php
index 6f8d40527..9848ece05 100644
--- a/actions/apigroupleave.php
+++ b/actions/apigroupleave.php
@@ -131,7 +131,7 @@ class ApiGroupLeaveAction extends ApiAuthAction
switch($this->format) {
case 'xml':
- $this->show_single_xml_group($this->group);
+ $this->showSingleXmlGroup($this->group);
break;
case 'json':
$this->showSingleJsonGroup($this->group);
diff --git a/actions/apigroupshow.php b/actions/apigroupshow.php
index 95d6f95af..5745a81f4 100644
--- a/actions/apigroupshow.php
+++ b/actions/apigroupshow.php
@@ -45,6 +45,7 @@ require_once INSTALLDIR . '/lib/apiprivateauth.php';
* @author Evan Prodromou <evan@status.net>
* @author Jeffery To <jeffery.to@gmail.com>
* @author Zach Copley <zach@status.net>
+ * @author Michele <macno@macno.org>
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
@@ -68,6 +69,24 @@ class ApiGroupShowAction extends ApiPrivateAuthAction
$this->group = $this->getTargetGroup($this->arg('id'));
+ if (empty($this->group)) {
+ $alias = Group_alias::staticGet(
+ 'alias',
+ common_canonical_nickname($this->arg('id'))
+ );
+ if (!empty($alias)) {
+ $args = array('id' => $alias->group_id, 'format' => $this->format);
+ common_redirect(common_local_url('ApiGroupShow', $args), 301);
+ } else {
+ $this->clientError(
+ _('Group not found!'),
+ 404,
+ $this->format
+ );
+ }
+ return;
+ }
+
return true;
}
@@ -85,15 +104,6 @@ class ApiGroupShowAction extends ApiPrivateAuthAction
{
parent::handle($args);
- if (empty($this->group)) {
- $this->clientError(
- _('Group not found!'),
- 404,
- $this->format
- );
- return;
- }
-
switch($this->format) {
case 'xml':
$this->showSingleXmlGroup($this->group);
@@ -105,7 +115,6 @@ class ApiGroupShowAction extends ApiPrivateAuthAction
$this->clientError(_('API method not found.'), 404, $this->format);
break;
}
-
}
/**
diff --git a/actions/apioauthauthorize.php b/actions/apioauthauthorize.php
index 2caa8d20b..e7c6f3761 100644
--- a/actions/apioauthauthorize.php
+++ b/actions/apioauthauthorize.php
@@ -156,7 +156,7 @@ class ApiOauthAuthorizeAction extends ApiOauthAction
if (!$result) {
common_log_db_error($appUser, 'DELETE', __FILE__);
- throw new ServerException(_('DB error deleting OAuth app user.'));
+ throw new ServerException(_('Database error deleting OAuth application user.'));
return;
}
}
@@ -182,7 +182,7 @@ class ApiOauthAuthorizeAction extends ApiOauthAction
if (!$result) {
common_log_db_error($appUser, 'INSERT', __FILE__);
- throw new ServerException(_('DB error inserting OAuth app user.'));
+ throw new ServerException(_('Database error inserting OAuth application user.'));
return;
}
diff --git a/actions/confirmaddress.php b/actions/confirmaddress.php
index 6fd74f3ff..cc8351d8d 100644
--- a/actions/confirmaddress.php
+++ b/actions/confirmaddress.php
@@ -141,7 +141,7 @@ class ConfirmaddressAction extends Action
function title()
{
- return _('Confirm Address');
+ return _('Confirm address');
}
/**
diff --git a/actions/othersettings.php b/actions/othersettings.php
index 0de7cd908..10e9873b3 100644
--- a/actions/othersettings.php
+++ b/actions/othersettings.php
@@ -57,7 +57,7 @@ class OthersettingsAction extends AccountSettingsAction
function title()
{
- return _('Other Settings');
+ return _('Other settings');
}
/**
diff --git a/actions/version.php b/actions/version.php
index c1f673c45..b6593e5ed 100644
--- a/actions/version.php
+++ b/actions/version.php
@@ -266,5 +266,6 @@ class VersionAction extends Action
'Craig Andrews',
'mEDI',
'Brett Taylor',
- 'Brigitte Schuster');
+ 'Brigitte Schuster',
+ 'Brion Vibber');
}