]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/siteadminpanel.php
Don't accept non-objects before testing with "instanceof".
[quix0rs-gnu-social.git] / actions / siteadminpanel.php
index 11636b0b5c8a6cc685487c3529bc2d17a25075c3..b45e12518981d8b80e20476a65f5404ccabac3b5 100644 (file)
@@ -156,14 +156,14 @@ class SiteadminpanelAction extends AdminPanelAction
 
         // Validate logos
         if (!empty($values['site']['logo']) &&
-            !Validate::uri($values['site']['logo'], array('allowed_schemes' => array('http', 'https')))) {
-            // TRANS: Client error displayed when a logo URL does is not valid.
+                !common_valid_http_url($values['site']['logo'])) {
+            // TRANS: Client error displayed when a logo URL is not valid.
             $this->clientError(_('Invalid logo URL.'));
         }
 
         if (!empty($values['site']['ssllogo']) &&
-            !Validate::uri($values['site']['ssllogo'], array('allowed_schemes' => array('https')))) {
-            // TRANS: Client error displayed when an SSL logo URL is invalid.
+                !common_valid_http_url($values['site']['ssllogo'], true)) {
+            // TRANS: Client error displayed when a SSL logo URL is invalid.
             $this->clientError(_('Invalid SSL logo URL.'));
         }
 
@@ -173,7 +173,6 @@ class SiteadminpanelAction extends AdminPanelAction
             !in_array($values['site']['timezone'], DateTimeZone::listIdentifiers())) {
             // TRANS: Client error displayed trying to save site settings without a timezone.
             $this->clientError(_('Timezone not selected.'));
-            return;
         }
 
         // Validate language
@@ -196,7 +195,7 @@ class SiteadminpanelAction extends AdminPanelAction
 
         if (!Validate::number($values['site']['dupelimit'], array('min' => 1))) {
             // TRANS: Client error displayed trying to save site settings with a text limit below 1.
-            $this->clientError(_("Dupe limit must be one or more seconds."));
+            $this->clientError(_('Dupe limit must be one or more seconds.'));
         }
     }
 }
@@ -302,7 +301,7 @@ class SiteAdminPanelForm extends AdminForm
                              _('Default language'),
                              get_nice_language_list(),
                              // TRANS: Dropdown title on site settings panel.
-                             _('Site language when autodetection from browser settings is not available'),
+                             _('The site language when autodetection from browser settings is not available.'),
                              false, $this->value('language'));
         $this->unli();
 
@@ -374,6 +373,6 @@ class SiteAdminPanelForm extends AdminForm
                            'submit',
                            null,
                            // TRANS: Button title for saving site settings.
-                           _('Save site settings'));
+                           _('Save the site settings.'));
     }
 }