X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Furlsettings.php;h=69ad4c869066fb2434b117577560c4507b03ea37;hb=4694d068f965ec733edcfe5c9afe8244ae01f00a;hp=02a895955dc5e7d62914733dc45821e9ba834a06;hpb=9948523c33ea0d02681ff1e0cd4fcb839dc9df96;p=quix0rs-gnu-social.git diff --git a/actions/urlsettings.php b/actions/urlsettings.php index 02a895955d..69ad4c8690 100644 --- a/actions/urlsettings.php +++ b/actions/urlsettings.php @@ -136,7 +136,7 @@ class UrlsettingsAction extends SettingsAction (!is_null($this->arg('maxurllength'))) ? $this->arg('maxurllength') : User_urlshortener_prefs::maxUrlLength($user), // TRANS: Field title in URL settings in profile. - _('URLs longer than this will be shortened, 0 means always shorten.')); + _('URLs longer than this will be shortened, -1 means never shorten because a URL is long.')); $this->elementEnd('li'); $this->elementStart('li'); $this->input('maxnoticelength', @@ -145,7 +145,7 @@ class UrlsettingsAction extends SettingsAction (!is_null($this->arg('maxnoticelength'))) ? $this->arg('maxnoticelength') : User_urlshortener_prefs::maxNoticeLength($user), // TRANS: Field title in URL settings in profile. - _('URLs in notices longer than this will be shortened, 0 means always shorten.')); + _('URLs in notices longer than this will always be shortened, -1 means only shorten if the full post exceeds maximum length.')); $this->elementEnd('li'); $this->elementEnd('ul'); // TRANS: Button text for saving "Other settings" in profile. @@ -183,14 +183,14 @@ class UrlsettingsAction extends SettingsAction $maxurllength = $this->trimmed('maxurllength'); - if (!Validate::number($maxurllength, array('min' => 0))) { + if (!Validate::number($maxurllength, array('min' => -1))) { // TRANS: Client exception thrown when the maximum URL settings value is invalid in profile URL settings. throw new ClientException(_('Invalid number for maximum URL length.')); } $maxnoticelength = $this->trimmed('maxnoticelength'); - if (!Validate::number($maxnoticelength, array('min' => 0))) { + if (!Validate::number($maxnoticelength, array('min' => -1))) { // TRANS: Client exception thrown when the maximum notice length settings value is invalid in profile URL settings. throw new ClientException(_('Invalid number for maximum notice length.')); } @@ -211,7 +211,6 @@ class UrlsettingsAction extends SettingsAction common_log_db_error($user, 'UPDATE', __FILE__); // TRANS: Server error displayed when "Other" settings in user profile could not be updated on the server. $this->serverError(_('Could not update user.')); - return; } $prefs = User_urlshortener_prefs::getPrefs($user);