You are here

flickr.install in Flickr 6

Same filename and directory in other branches
  1. 5 flickr.install
  2. 7 flickr.install

File

flickr.install
View source
<?php

function flickr_install() {
  drupal_install_schema('flickr');
}
function flickr_uninstall() {
  drupal_uninstall_schema('flickr');
  variable_del('flickr_api_key');
  variable_del('flickr_api_secret');
  variable_del('flickr_default_userid');
  variable_del('flickr_cache_duration');
  variable_del('flickr_class');
  variable_del('flickr_rel');
  variable_del('flickr_title_suppress_on_small');
  variable_del('flickr_metadata_suppress_on_small');
  variable_del('flickr_caption_padding');
  variable_del('flickr_info_overlay');
}
function flickr_schema() {
  $schema['flickr_users'] = array(
    'description' => t('Connects Drupal users to their Flickr accounts.'),
    'fields' => array(
      'uid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'description' => t('Primary Key: Drupal user ID'),
      ),
      'nsid' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'description' => t('Flickr NSID'),
      ),
      'identifier' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'description' => t('Flickr identifier'),
      ),
    ),
    'primary key' => array(
      'uid',
    ),
  );
  return $schema;
}

/**
 * Adding a table to map Drupal users to Flickr users.
 */
function flickr_update_1() {
  flickr_install();
}

Functions

Namesort descending Description
flickr_install
flickr_schema
flickr_uninstall
flickr_update_1 Adding a table to map Drupal users to Flickr users.