function kaltura_variable_get_real in Kaltura 6.2
Same name and namespace in other branches
- 5 includes/kaltura.admin.inc \kaltura_variable_get_real()
- 6 includes/kaltura.admin.inc \kaltura_variable_get_real()
- 7.3 includes/kaltura.admin.inc \kaltura_variable_get_real()
- 7.2 includes/kaltura.admin.inc \kaltura_variable_get_real()
Replace default Drupal's variable_get() function with a "real-time" one.
This function checks a variable status in the DB (not from $_GLOBALS['conf']).
TODO: This smells funny. Presumably it's here because $conf is already set when kaltura_test_notification_config() is called, and we need to allow the Kaltura server to ping us back and variable_set('kaltura_notification_status',1), then read the stored value. Check if it's used elsewhere, and why. Consider a straight SQL check against the variables table to replace this.
1 call to kaltura_variable_get_real()
- kaltura_settings_form in includes/
kaltura.admin.inc - determine how the general settings form will look like.
File
- includes/
kaltura.admin.inc, line 781
Code
function kaltura_variable_get_real($var, $default) {
$sql = "SELECT * FROM {variable} WHERE name = '%s'";
$result = db_fetch_object(db_query($sql, $var));
if (!$result) {
return $default;
}
return unserialize($result->value);
}