  def get_items_order
    Log.add_info(request, params.inspect)

    @folder_id = params[:id]
    SqlHelper.validate_token([@folder_id])

    if @folder_id != '0'
      begin
        @folder = Folder.find(@folder_id)
      rescue => evar
        @folder = nil
        Log.add_error(request, evar)
      end
    end

    if Folder.check_user_auth(@folder_id, @login_user, 'r', true)
      if !@login_user.nil? and @login_user.admin?(User::AUTH_ITEM)
        @items = Folder.get_items_admin(@folder_id, 'xorder ASC')
      else
        @items = Folder.get_items(@login_user, @folder_id, 'xorder ASC')
      end
    end

    session[:folder_id] = @folder_id

    render(:partial => 'ajax_items_order', :layout => false)
  end
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.