Fixed: no default values in for avatar upload settings
authorDan
Wed, 25 Feb 2009 13:38:21 -0500
changeset 835 146bc1daf498
parent 834 a46dc188d2ce
child 836 f8199a8d6153
Fixed: no default values in for avatar upload settings
plugins/SpecialUserPrefs.php
--- a/plugins/SpecialUserPrefs.php	Mon Feb 16 17:12:02 2009 -0500
+++ b/plugins/SpecialUserPrefs.php	Wed Feb 25 13:38:21 2009 -0500
@@ -716,9 +716,10 @@
       echo '</form>';
       break;
     case 'Avatar':
-      if ( getConfig('avatar_enable') != '1' )
+      if ( getConfig('avatar_enable', 0) !== 1 )
       {
         echo '<div class="error-box"><b>' . $lang->get('usercp_avatar_err_disabled_title') . '</b><br />' . $lang->get('usercp_avatar_err_disabled_body') . '</div>';
+        break;
       }
       
       // Determine current avatar
@@ -758,7 +759,7 @@
             if ( $action == 'set_http' )
             {
               // Check if this action is enabled
-              if ( getConfig('avatar_upload_http') !== '1' )
+              if ( getConfig('avatar_upload_http', '1') !== '1' )
               {
                 // non-localized, only appears on hack attempt
                 echo '<div class="error-box">Uploads over HTTP are disabled.</div>';
@@ -798,7 +799,7 @@
             else
             {
               // Check if this action is enabled
-              if ( getConfig('avatar_upload_file') !== '1' )
+              if ( getConfig('avatar_upload_file', '1') !== '1' )
               {
                 // non-localized, only appears on hack attempt
                 echo '<div class="error-box">Uploads from the browser are disabled.</div>';