X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Flicenseadminpanel.php;h=a89ffed346271b5b13d7e9d0255ea2c87df11620;hb=fb4b004435403dd0d4126a0c11c9fa5c557e9dba;hp=fda7cd43596cd282bebd024476e2f84462db61c4;hpb=55b4303ea4da2a74723f7df5dbd1d83ae3922d27;p=quix0rs-gnu-social.git diff --git a/actions/licenseadminpanel.php b/actions/licenseadminpanel.php index fda7cd4359..a89ffed346 100644 --- a/actions/licenseadminpanel.php +++ b/actions/licenseadminpanel.php @@ -155,18 +155,14 @@ class LicenseadminpanelAction extends AdminPanelAction ); } - // make sure the license URL and license image URL are valid URLs - - $options = array('allowed_schemes' => array('http', 'https')); - // URLs should be set for cc license if ($values['license']['type'] == 'cc') { - if (!Validate::uri($values['license']['url'], $options)) { + if (!common_valid_http_url($values['license']['url'])) { // TRANS: Client error displayed specifying an invalid license URL in the license admin panel. $this->clientError(_('Invalid license URL.')); } - if (!Validate::uri($values['license']['image'], $options)) { + if (!common_valid_http_url($values['license']['image'])) { // TRANS: Client error displayed specifying an invalid license image URL in the license admin panel. $this->clientError(_('Invalid license image URL.')); } @@ -175,7 +171,7 @@ class LicenseadminpanelAction extends AdminPanelAction // can be either blank or a valid URL for private & allrightsreserved if (!empty($values['license']['url'])) { - if (!Validate::uri($values['license']['url'], $options)) { + if (!common_valid_http_url($values['license']['url'])) { // TRANS: Client error displayed specifying an invalid license URL in the license admin panel. $this->clientError(_('License URL must be blank or a valid URL.')); } @@ -184,7 +180,7 @@ class LicenseadminpanelAction extends AdminPanelAction // can be either blank or a valid URL for private & allrightsreserved if (!empty($values['license']['image'])) { - if (!Validate::uri($values['license']['image'], $options)) { + if (!common_valid_http_url($values['license']['image'])) { // TRANS: Client error displayed specifying an invalid license image URL in the license admin panel. $this->clientError(_('License image must be blank or valid URL.')); }