You are here

juicerio.install in Juicer - Social Media Feed Aggregator 7

Same filename and directory in other branches
  1. 8 juicerio.install

Install, Ununstall, and update functions for JuicerIO module.

File

juicerio.install
View source
<?php

/**
 * @file
 * Install, Ununstall, and update functions for JuicerIO module.
 */

/**
 * Implements hook_uninstall().
 */
function juicerio_uninstall() {

  // remove these variables if not using the module anymore.
  variable_del('juicerio_feed_id');
  variable_del('juicerio_blocks');
  variable_del('juicerio_post_num');
  variable_del('juicerio_infinite_pages');
  variable_del('juicerio_gutter_amt');
  variable_del('juicerio_column_num');
  variable_del('juicerio_filters');
}

/**
 * Update old variable names to new.
 */
function juicerio_update_7001() {
  $feed_id = variable_get('juicer_io_feed_id', NULL);
  variable_set('juicerio_feed_id', $feed_id);
  variable_del('juicer_io_feed_id');
  $posts = variable_get('juicer_io_post_number', NULL);
  variable_set('juicerio_1_post_num', $posts);
  variable_del('juicer_io_post_number');
  $pages = variable_get('juicerio_infinite_pages');
  variable_set('juicerio_1_infinite_pages', $pages);
  variable_del('juicer_io_infinite_pages');
  $gutter = variable_get('juicer_io_gutter_amt');
  variable_set('juicerio_1_gutter_amt', $gutter);
  variable_del('juicer_io_gutter_amt');
  $cols = variable_get('juicer_io_column_number');
  variable_set('juicerio_1_column_num', $cols);
  variable_del('juicer_io_column_number');
  $filters = variable_get('juicer_io_filter');
  variable_set('juicerio_1_filters', $filters);
  variable_del('juicer_io_filter');
}

Functions

Namesort descending Description
juicerio_uninstall Implements hook_uninstall().
juicerio_update_7001 Update old variable names to new.