You are here

function _paging_xmlsitemap_paging_gsitemap_replace in Paging 5

Transfer data from Paging: Google Sitemap if it was installed.

1 call to _paging_xmlsitemap_paging_gsitemap_replace()
paging_xmlsitemap_install in contrib/paging_xmlsitemap/paging_xmlsitemap.install
Implementation of hook_install().

File

contrib/paging_xmlsitemap/paging_xmlsitemap.install, line 35
Install file for Paging: XML Sitemap

Code

function _paging_xmlsitemap_paging_gsitemap_replace() {
  if (db_result(db_query("\n    SELECT 1 FROM {system}\n    WHERE type = 'module' AND name = 'paging_gsitemap' AND (status = 1 OR schema_version >= 0)\n  "))) {
    db_query("INSERT INTO {paging_xmlsitemap} SELECT * FROM {paging}");
    db_query("UPDATE {system} SET status = 0, throttle = 0 WHERE type = 'module' AND name = 'paging_gsitemap'");
    db_query("DROP TABLE {paging}");
    drupal_set_installed_schema_version('paging_gsitemap', SCHEMA_UNINSTALLED);
  }
}