openscholar/openscholar — pull request #2635 by sagotsky (2013-05-01 17:50:26+00:00)
Title: Fixed gkplus's update hook to set term var.  #2612

#2612

Spaces thinks it's clever. Deleting the variable also seems to delete spaces overrides of the variable. But that only happens when the global var is set. If it's empty, spaces doesn't touch the override. This is why it took two runs to get the update hook working - the first run set the override var then deleted global and override. The next run set the override var but without a global left the override var only.

The solution was to delete the global before setting the override instead of the other way around.