Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Implements hook_install.
- */
- function test_install() {
- //Deleting the appropriate info out of the 'filter' table.
- //TABLE_NAME is the name of the table in the db you are working with.
- //COLUMN_NAME is the name of the column or field inside of the table you are
- //looking in.
- //VALUE is what is in the field you are looking for.
- /**
- * db_delete('TABLE_NAME')
- * ->condition('COLUMN_NAME', 'VALUE')
- * ->execute().
- */
- db_delete('filter')
- ->condition('format', 'filtered_html')
- ->condition('module', 'filter')
- ->execute();
- /**
- * db_insert('TABLE_NAME')
- * ->fields(array(
- * 'column1' => 'desired_input1'
- * 'column2' => 'desired_input2'
- * ));
- */
- db_insert('filter')
- ->fields(array(
- 'format' => 'filtered_html',
- 'module' => 'image_resize_filter',
- 'name' => 'image_resize_filter',
- 'weight' => '-10',
- 'status' => '1',
- ))
- ->execute();
- db_insert('filter')
- ->fields(array(
- 'format' => 'filtered_html',
- 'module' => 'htmlpurifier',
- 'name' => 'htmlpurifier_advanced',
- 'weight' => '-9',
- 'status' => '1',
- ))
- ->execute();
- }
Add Comment
Please, Sign In to add comment