plugins/SpecialUserPrefs.php
changeset 835 146bc1daf498
parent 829 87fcc7175c61
child 836 f8199a8d6153
equal deleted inserted replaced
834:a46dc188d2ce 835:146bc1daf498
   714       </div>
   714       </div>
   715       <?php
   715       <?php
   716       echo '</form>';
   716       echo '</form>';
   717       break;
   717       break;
   718     case 'Avatar':
   718     case 'Avatar':
   719       if ( getConfig('avatar_enable') != '1' )
   719       if ( getConfig('avatar_enable', 0) !== 1 )
   720       {
   720       {
   721         echo '<div class="error-box"><b>' . $lang->get('usercp_avatar_err_disabled_title') . '</b><br />' . $lang->get('usercp_avatar_err_disabled_body') . '</div>';
   721         echo '<div class="error-box"><b>' . $lang->get('usercp_avatar_err_disabled_title') . '</b><br />' . $lang->get('usercp_avatar_err_disabled_body') . '</div>';
       
   722         break;
   722       }
   723       }
   723       
   724       
   724       // Determine current avatar
   725       // Determine current avatar
   725       $q = $db->sql_query('SELECT user_has_avatar, avatar_type FROM ' . table_prefix . 'users WHERE user_id = ' . $session->user_id . ';');
   726       $q = $db->sql_query('SELECT user_has_avatar, avatar_type FROM ' . table_prefix . 'users WHERE user_id = ' . $session->user_id . ';');
   726       if ( !$q )
   727       if ( !$q )
   756           case 'set_file':
   757           case 'set_file':
   757             // Hackish way to preserve the UNIX philosophy of reusing as much code as possible
   758             // Hackish way to preserve the UNIX philosophy of reusing as much code as possible
   758             if ( $action == 'set_http' )
   759             if ( $action == 'set_http' )
   759             {
   760             {
   760               // Check if this action is enabled
   761               // Check if this action is enabled
   761               if ( getConfig('avatar_upload_http') !== '1' )
   762               if ( getConfig('avatar_upload_http', '1') !== '1' )
   762               {
   763               {
   763                 // non-localized, only appears on hack attempt
   764                 // non-localized, only appears on hack attempt
   764                 echo '<div class="error-box">Uploads over HTTP are disabled.</div>';
   765                 echo '<div class="error-box">Uploads over HTTP are disabled.</div>';
   765                 break;
   766                 break;
   766               }
   767               }
   796               // Response written. Proceed to validation...
   797               // Response written. Proceed to validation...
   797             }
   798             }
   798             else
   799             else
   799             {
   800             {
   800               // Check if this action is enabled
   801               // Check if this action is enabled
   801               if ( getConfig('avatar_upload_file') !== '1' )
   802               if ( getConfig('avatar_upload_file', '1') !== '1' )
   802               {
   803               {
   803                 // non-localized, only appears on hack attempt
   804                 // non-localized, only appears on hack attempt
   804                 echo '<div class="error-box">Uploads from the browser are disabled.</div>';
   805                 echo '<div class="error-box">Uploads from the browser are disabled.</div>';
   805                 break;
   806                 break;
   806               }
   807               }