public function get_maxwidth() {
        $param = optional_param('wikimedia_maxwidth', 0, PARAM_INT);
        $pref = get_user_preferences('repository_wikimedia_maxwidth', WIKIMEDIA_IMAGE_SIDE_LENGTH);
        if ($param > 0 && $param != $pref) {
            $pref = $param;
            set_user_preference('repository_wikimedia_maxwidth', $pref);
        }
        return $pref;
    }
public function get_maxwidth() {
        $param = optional_param('wikimedia_maxwidth', 0, PARAM_INT);
        $pref = get_user_preferences('repository_wikimedia_maxwidth', WIKIMEDIA_IMAGE_SIDE_LENGTH);
        if ($param > 0 && $param != $pref) {
            $pref = $param;
            set_user_preference('repository_wikimedia_maxwidth', $pref);
        }
        return $pref;
    }
public function get_maxwidth ( ) { $ param = optional_param ( 'wikimedia_maxwidth' , 0 , PARAM_INT ) ; $ pref = get_user_preferences ( 'repository_wikimedia_maxwidth' , WIKIMEDIA_IMAGE_SIDE_LENGTH ) ; if ( $ param > 0 && $ param != $ pref ) { $ pref = $ param ; set_user_preference ( 'repository_wikimedia_maxwidth' , $ pref ) ; } return $ pref ; }
Returns maximum width for images

Takes the maximum width for images eithre from search form or from
user preferences, updates user preferences if needed

@return int
Returns maximum width for images