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

    folder_id = params[:thetisBoxSelKeeper].split(':').last
    SqlHelper.validate_token([folder_id])

    unless Folder.check_user_auth(folder_id, @login_user, 'w', true)
      flash[:notice] = 'ERROR:' + t('folder.need_auth_to_write_in')
      get_items
      return
    end

    unless params[:check_item].blank?
      is_admin = @login_user.admin?(User::AUTH_ITEM)

      count = 0
      params[:check_item].each do |item_id, value|
        if value == '1'

          begin
            item = Item.find(item_id)
            next if !is_admin and item.user_id != @login_user.id

            item.update_attribute(:folder_id, folder_id)

          rescue => evar
            item = nil
            Log.add_error(request, evar)
          end

          count += 1
        end
      end
      flash[:notice] = t('item.moved', :count => count)
    end

    get_items
  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.