View source
<?php
function css3pie_install() {
if (!file_exists(libraries_get_path('PIE') . '/PIE.htc')) {
drupal_set_message(t('PIE library missing. Download PIE library from http://css3pie.com/ and add it to sites/all/libraries/PIE.'), 'error');
}
}
function css3pie_uninstall() {
db_query("DELETE FROM {variable} WHERE name LIKE 'css3pie_css_%'");
if (file_exists(file_directory_path() . '/css3pie/css3pie.js')) {
$success = file_delete(file_directory_path() . '/css3pie/css3pie.js');
if ($success) {
db_query('DELETE FROM {files} WHERE filepath = "%s"', file_directory_path() . '/css3pie/css3pie.js');
}
}
if (file_exists(file_directory_path() . '/css3pie/css3pie.css')) {
$success = file_delete(file_directory_path() . '/css3pie/css3pie.css');
if ($success) {
db_query('DELETE FROM {files} WHERE filepath = "%s"', file_directory_path() . '/css3pie/css3pie.css');
}
}
if (is_dir(file_directory_path() . '/css3pie')) {
rmdir(file_directory_path() . '/css3pie');
}
}
function css3pie_update_6001() {
if (!variable_get('css3pie_css_use_js_mode', FALSE)) {
variable_set('css3pie_css_use_js_mode', FALSE);
}
return;
}