function hook_apply_draft_changes

Allows modules to execute code when the admin user has chose to "apply draft changes".

File

includes/hook.api.php, line 662
Lists all available hooks within FlightPath's core code.

Code

function hook_apply_draft_changes() {

  $table_name = "my_module_table";
  $draft_table_name = "draft_$table_name";

  // First, truncate existing...
  $query = "truncate table $table_name";
  $res = db_query($query);

  // Now, copy in draft changes...
  $query = "INSERT INTO $table_name
          SELECT * FROM $draft_table_name ";
  $res = db_query($query);


}