summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/apiaccountupdateprofile.php4
-rw-r--r--actions/apigroupshow.php29
-rw-r--r--actions/apioauthauthorize.php4
-rw-r--r--actions/apistatusnetconfig.php14
-rw-r--r--actions/confirmaddress.php2
-rw-r--r--actions/othersettings.php2
-rw-r--r--actions/version.php3
7 files changed, 36 insertions, 22 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/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/apistatusnetconfig.php b/actions/apistatusnetconfig.php
index 296376d19..bff8313b5 100644
--- a/actions/apistatusnetconfig.php
+++ b/actions/apistatusnetconfig.php
@@ -50,13 +50,17 @@ if (!defined('STATUSNET')) {
class ApiStatusnetConfigAction extends ApiAction
{
var $keys = array(
- 'site' => array('name', 'server', 'theme', 'path', 'fancy', 'language',
- 'email', 'broughtby', 'broughtbyurl', 'closed',
- 'inviteonly', 'private'),
- 'license' => array('url', 'title', 'image'),
+ 'site' => array('name', 'server', 'theme', 'path', 'logo', 'fancy', 'language',
+ 'email', 'broughtby', 'broughtbyurl', 'timezone', 'closed',
+ 'inviteonly', 'private', 'textlimit', 'ssl', 'sslserver', 'shorturllength'),
+ 'license' => array('type', 'owner', 'url', 'title', 'image'),
'nickname' => array('featured'),
+ 'profile' => array('biolimit'),
+ 'group' => array('desclimit'),
+ 'notice' => array('contentlimit'),
'throttle' => array('enabled', 'count', 'timespan'),
- 'xmpp' => array('enabled', 'server', 'user')
+ 'xmpp' => array('enabled', 'server', 'port', 'user'),
+ 'integration' => array('source')
);
/**
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');
}