Commit 909c58ba authored by Earnie Boyd's avatar Earnie Boyd

#550578 Update #6106: Update in {variable} table failed.

parent b5f7a074
$Id$
XML sitemap 6.x-1, 2009-08-21
-----------------------------------
#550578 Update #6106: Update in {variable} table failed.
XML sitemap 6.x-1, 2009-08-19
-----------------------------------
#550702 by hass: Moreover: Submission URL is not updated with placeholder.
......
......@@ -53,8 +53,17 @@ function xmlsitemap_engines_update_6106() {
'cron_submit_delay',
);
foreach ($variables as $variable) {
$ret[] = @update_sql("UPDATE {variable} SET name = 'xmlsitemap_engines_{$variable}' WHERE name = 'xmlsitemap_{$variable}'");
$ret[] = update_sql("DELETE FROM {variable} WHERE name = 'xmlsitemap_{$variable}'");
$oldname = "xmlsitemap_${variable}";
$newname = "xmlsitemap_engines_{$variable}";
$value = variable_get($oldname, FALSE);
if ($value !== FALSE) {
variable_set($newname, $value);
variable_del($oldname);
$ret[] = array(
'success' => TRUE,
'query' => "Variable name changed from ${oldname} to ${newname}.",
);
}
}
$ret[] = update_sql("UPDATE {system} SET weight = 15 WHERE name = 'xmlsitemap_engines'");
return $ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment