/[drupal]/contributions/modules/icon/icon.install
ViewVC logotype

Contents of /contributions/modules/icon/icon.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Wed Jun 18 17:38:22 2008 UTC (17 months, 1 week ago) by ximo
Branch: MAIN
CVS Tags: DRUPAL-6--1-0-ALPHA1, HEAD
Branch point for: DRUPAL-6--1
File MIME type: text/x-php
Yet another big commit...
* admin/build/icons is now organized on a per-theme basis
* Removed the module from the "Core - optional" category
* Added icon.install with hook_install(), hook_uninstall() and hook_schema() functions
* Renamed icon_sets_form to icon_iconsets_form
* Added icon_sort_iconsets_by_info_name() function instead of system_sort_modules_by_info_name()
* Removed drupal_clear_css_cache();
* Lots of minor changes
1 <?php
2 // $Id$
3
4 /**
5 * Implementation of hook_install().
6 */
7 function icon_install() {
8 // Create tables.
9 drupal_install_schema('icon');
10 }
11
12 /**
13 * Implementation of hook_uninstall().
14 */
15 function icon_uninstall() {
16 // Remove installed iconsets.
17 db_query("DELETE FROM {system} WHERE type = 'iconset'");
18 // Remove tables.
19 drupal_uninstall_schema('icon');
20 }
21
22 /**
23 * Implementation of hook_schema().
24 */
25 function icon_schema() {
26 $schema['iconsets'] = array(
27 'description' => t('Stores the states of icon sets for enabled themes.'),
28 'fields' => array(
29 'iconset' => array(
30 'description' => t("The icon set's {system}.name."),
31 'type' => 'varchar',
32 'length' => 255,
33 'not null' => TRUE,
34 'default' => ''),
35 'theme' => array(
36 'description' => t("The theme's {system}.name."),
37 'type' => 'varchar',
38 'length' => 255,
39 'not null' => TRUE,
40 'default' => ''),
41 'status' => array(
42 'description' => t('Boolean indicating whether or not this icon set is enabled for this theme.'),
43 'type' => 'int',
44 'not null' => TRUE,
45 'default' => 0),
46 'weight' => array(
47 'description' => t("The importance given to this icon set when determining which icon set to load an icon from. Equal-weighted icon sets are ordered by name."),
48 'type' => 'int',
49 'not null' => TRUE,
50 'default' => 0),
51 ),
52 );
53
54 return $schema;
55 }

  ViewVC Help
Powered by ViewVC 1.1.2