Issue #2249723 by andrei.dincu: Replace direct sql query with methods from database api in XmlSitemapCustomEditForm and XmlSitemapCustomAddForm