Commit 63168033 authored by Steven Wittens's avatar Steven Wittens

- Fixing static -> sticky update so it works for node types with underscores in the name.

parent 7780c0e8
......@@ -1116,8 +1116,8 @@ function update_89() {
$result = db_query("SELECT * FROM {variable} WHERE name LIKE 'node_static_%'");
while ($variable = db_fetch_object($result)) {
//get the node type name, place it into $name_arr. The name can be found with $name_arr[2]
$name_arr = explode("_",$variable->name);
$ret[] = update_sql("INSERT INTO {variable} (name,value) VALUES ('node_sticky_".$name_arr[2]."','".$variable->value."')");
$name_arr = explode("_", $variable->name, 3);
$ret[] = update_sql("INSERT INTO {variable} (name,value) VALUES ('node_sticky_". $name_arr[2] ."','". $variable->value. "')");
}
$ret[] = db_query("DELETE FROM {variable} WHERE name LIKE 'node_static_%'");
......
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