function kaltura_uninstall in Kaltura 5
Same name and namespace in other branches
- 6.2 kaltura.install \kaltura_uninstall()
- 6 kaltura.install \kaltura_uninstall()
- 7.3 kaltura.install \kaltura_uninstall()
- 7.2 kaltura.install \kaltura_uninstall()
Implementation of hook_uninstall().
File
- ./
kaltura.install, line 244
Code
function kaltura_uninstall() {
// Remove tables.
global $_kaltura_client_folder;
require_once $_kaltura_client_folder . 'kaltura_settings.php';
$tables = kaltura_tables();
foreach ($tables as $table_name => $create_sql) {
db_query('DROP TABLE {' . $table_name . '}');
}
drupal_set_message('Kaltura module was uninstalled.');
// get all kaltura_ variables, and delete theme
$get_vars = 'SELECT name FROM {variable} WHERE name LIKE \'%s\'';
$result = db_query($get_vars, 'kaltura\\_%');
$vars_deleted = '';
while ($var = db_fetch_object($result)) {
variable_del($var->name);
$vars_deleted .= $var->name . ',';
}
watchdog('kaltura', 'the following vars were deleted during uninstall: ' . rtrim($vars_deleted, ','));
}