Alter module weight

Public

// Make sure site_module1 always runs after site_module2.

Get raw version
php
  1. <?php
  2.  
  3. /**
  4.  * Implement hook_install().
  5.  */
  6. function site_module1_install() {
  7.  
  8. // Make sure site_module1 always runs after site_module2.
  9. db_query("UPDATE {system} site_module1, {system} site_module2
  10. SET site_module1.weight = site_module2.weight + 1
  11. WHERE site_module1.name = 'site_module1' AND site_module2.name = 'site_module2'");
  12. }