function get_global_database_handler

7.x db.inc get_global_database_handler()
6.x db.inc get_global_database_handler()
4.x misc.inc get_global_database_handler()
5.x misc.inc get_global_database_handler()

This method will return a globally-set DatabaseHandler object, creating it if it does not already exist. This is for efficiency reasons, so every module or method does not need to keep creating databasehandler objects (and re-connecting to the database).

38 calls to get_global_database_handler()
admin_apply_draft_changes_form_submit in modules/admin/admin.module
Handles the actual moving of draft courses into production.
admin_copy_degree_form_submit in modules/admin/admin.degrees.inc
admin_display_edit_degree in modules/admin/admin.degrees.inc
This screen displays the form which allows the user to actually edit a degree.
admin_duplicate_year_form_submit in modules/admin/admin.module
This function should perform the actual copy of data!
admin_edit_course_form_submit in modules/admin/admin.courses.inc

... See full list

File

includes/misc.inc, line 1127
This file contains misc functions for FlightPath

Code

function get_global_database_handler() {

  if (!isset($GLOBALS ["fp_global_database_handler"]) || !is_object($GLOBALS ["fp_global_database_handler"])) {
    $GLOBALS ["fp_global_database_handler"] = new DatabaseHandler();
  }

  return $GLOBALS ["fp_global_database_handler"];

}