function xmlsitemap_install in XML sitemap 5
Same name and namespace in other branches
- 8 xmlsitemap.install \xmlsitemap_install()
- 5.2 xmlsitemap/xmlsitemap.install \xmlsitemap_install()
- 6.2 xmlsitemap.install \xmlsitemap_install()
- 6 xmlsitemap.install \xmlsitemap_install()
- 7.2 xmlsitemap.install \xmlsitemap_install()
- 2.x xmlsitemap.install \xmlsitemap_install()
Implementation of hook_install().
File
- ./
xmlsitemap.install, line 6
Code
function xmlsitemap_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE {xmlsitemap_additional} (\n path varchar(128) NOT NULL default '',\n pid int,\n last_changed int(11),\n previously_changed int(11),\n priority float,\n PRIMARY KEY (path)\n ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
break;
case 'pgsql':
db_query("CREATE TABLE {xmlsitemap_additional} (\n path varchar(128) NOT NULL default '',\n pid integer,\n last_changed integer,\n previously_changed integer,\n priority real,\n PRIMARY KEY (path)\n );");
break;
}
db_query("DELETE FROM {url_alias} WHERE dst LIKE 'sitemap%.xml'");
}