Make WordPress Core


Ignore:
Timestamp:
11/19/2006 07:56:05 AM (19 years ago)
Author:
ryan
Message:

Remove trailing spaces and convert spaces to tabs. Props Nazgul. fixes #986

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/capabilities.php

    r4158 r4495  
    222222
    223223    function level_reduction($max, $item) {
    224         if(preg_match('/^level_(10|[0-9])$/i', $item, $matches)) {
    225             $level = intval($matches[1]);
    226             return max($max, $level);
    227         } else {
    228             return $max;
    229         }
     224        if(preg_match('/^level_(10|[0-9])$/i', $item, $matches)) {
     225            $level = intval($matches[1]);
     226            return max($max, $level);
     227        } else {
     228            return $max;
     229        }
    230230    }
    231231
    232232    function update_user_level_from_caps() {
    233         global $wpdb;
    234         $this->user_level = array_reduce(array_keys($this->allcaps),    array(&$this, 'level_reduction'), 0);
    235         update_usermeta($this->id, $wpdb->prefix.'user_level', $this->user_level);
     233        global $wpdb;
     234        $this->user_level = array_reduce(array_keys($this->allcaps),    array(&$this, 'level_reduction'), 0);
     235        update_usermeta($this->id, $wpdb->prefix.'user_level', $this->user_level);
    236236    }
    237237
     
    299299        if ( 'page' == $post->post_type ) {
    300300            $args = array_merge(array('delete_page', $user_id), $args);
    301             return call_user_func_array('map_meta_cap', $args); 
     301            return call_user_func_array('map_meta_cap', $args);
    302302        }
    303303        $post_author_data = get_userdata($post->post_author);
     
    353353        if ( 'page' == $post->post_type ) {
    354354            $args = array_merge(array('edit_page', $user_id), $args);
    355             return call_user_func_array('map_meta_cap', $args); 
     355            return call_user_func_array('map_meta_cap', $args);
    356356        }
    357357        $post_author_data = get_userdata($post->post_author);
     
    403403        if ( 'page' == $post->post_type ) {
    404404            $args = array_merge(array('read_page', $user_id), $args);
    405             return call_user_func_array('map_meta_cap', $args); 
     405            return call_user_func_array('map_meta_cap', $args);
    406406        }
    407407
Note: See TracChangeset for help on using the changeset viewer.