summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/apioauthauthorize.php2
-rw-r--r--actions/groupmembers.php2
-rw-r--r--actions/licenseadminpanel.php27
-rw-r--r--actions/showapplication.php6
4 files changed, 28 insertions, 9 deletions
diff --git a/actions/apioauthauthorize.php b/actions/apioauthauthorize.php
index e7c6f3761..c2fbbcdd8 100644
--- a/actions/apioauthauthorize.php
+++ b/actions/apioauthauthorize.php
@@ -270,7 +270,7 @@ class ApiOauthAuthorizeAction extends ApiOauthAction
$this->elementStart('form', array('method' => 'post',
'id' => 'form_apioauthauthorize',
'class' => 'form_settings',
- 'action' => common_local_url('apioauthauthorize')));
+ 'action' => common_local_url('ApiOauthAuthorize')));
$this->elementStart('fieldset');
$this->element('legend', array('id' => 'apioauthauthorize_allowdeny'),
_('Allow or deny access'));
diff --git a/actions/groupmembers.php b/actions/groupmembers.php
index 038d1db68..d03d0b5a3 100644
--- a/actions/groupmembers.php
+++ b/actions/groupmembers.php
@@ -400,7 +400,7 @@ class GroupBlockForm extends Form
'submit',
null,
// TRANS: Submit button title.
- _m('TOOLTIP',_('Block this user'));
+ _m('TOOLTIP', 'Block this user'));
}
}
diff --git a/actions/licenseadminpanel.php b/actions/licenseadminpanel.php
index c9aad5c4f..9165ca19d 100644
--- a/actions/licenseadminpanel.php
+++ b/actions/licenseadminpanel.php
@@ -161,12 +161,31 @@ class LicenseadminpanelAction extends AdminPanelAction
$options = array('allowed_schemes' => array('http', 'https'));
- if (!Validate::uri($values['license']['url'], $options)) {
- $this->clientError(_("Invalid license URL."));
+ // URLs should be set for cc license
+
+ if ($values['license']['type'] == 'cc') {
+ if (!Validate::uri($values['license']['url'], $options)) {
+ $this->clientError(_("Invalid license URL."));
+ }
+ if (!Validate::uri($values['license']['image'], $options)) {
+ $this->clientError(_("Invalid license image URL."));
+ }
}
- if (!Validate::uri($values['license']['image'], $options)) {
- $this->clientError(_("Invalid license image URL."));
+ // can be either blank or a valid URL for private & allrightsreserved
+
+ if (!empty($values['license']['url'])) {
+ if (!Validate::uri($values['license']['url'], $options)) {
+ $this->clientError(_("License URL must be blank or a valid URL."));
+ }
+ }
+
+ // can be either blank or a valid URL for private & allrightsreserved
+
+ if (!empty($values['license']['image'])) {
+ if (!Validate::uri($values['license']['image'], $options)) {
+ $this->clientError(_("License image must be blank or valid URL."));
+ }
}
}
}
diff --git a/actions/showapplication.php b/actions/showapplication.php
index fa4484481..10aaff538 100644
--- a/actions/showapplication.php
+++ b/actions/showapplication.php
@@ -271,17 +271,17 @@ class ShowApplicationAction extends OwnerDesignAction
$this->elementStart('dl', 'entity_request_token_url');
$this->element('dt', null, _('Request token URL'));
- $this->element('dd', null, common_local_url('apioauthrequesttoken'));
+ $this->element('dd', null, common_local_url('ApiOauthRequestToken'));
$this->elementEnd('dl');
$this->elementStart('dl', 'entity_access_token_url');
$this->element('dt', null, _('Access token URL'));
- $this->element('dd', null, common_local_url('apioauthaccesstoken'));
+ $this->element('dd', null, common_local_url('ApiOauthAccessToken'));
$this->elementEnd('dl');
$this->elementStart('dl', 'entity_authorize_url');
$this->element('dt', null, _('Authorize URL'));
- $this->element('dd', null, common_local_url('apioauthauthorize'));
+ $this->element('dd', null, common_local_url('ApiOauthAuthorize'));
$this->elementEnd('dl');
$this->element('p', 'note',