exclude_node_title.install in Exclude Node Title 6
File
exclude_node_title.install
View source
<?php
function exclude_node_title_install() {
db_query("UPDATE {permission} p SET p.perm = TRIM(LEADING ', ' FROM CONCAT(p.perm, ', use exclude node title'))");
}
function exclude_node_title_uninstall() {
variable_del('exclude_node_title_nid_list');
variable_del('exclude_node_title_remove_title');
variable_del('exclude_node_title_content_type_values');
variable_del('exclude_node_title_search');
}
function exclude_node_title_update_6002() {
$items = array();
$items[] = update_sql("UPDATE {permission} p\n SET p.perm = CONCAT(p.perm, ', use exclude node title')\n WHERE p.perm NOT LIKE '%ignore node title exclusions%'");
$items[] = update_sql("UPDATE {permission} p\n SET p.perm = REPLACE(p.perm, ', ignore node title exclusions', '')\n WHERE p.perm NOT LIKE '%ignore node title exclusions%'");
return $items;
}