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

Contents of /contributions/modules/cck_taxonomy_ssu/cck_taxonomy_ssu.install

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


Revision 1.6 - (show annotations) (download) (as text)
Wed Feb 27 09:05:26 2008 UTC (20 months, 4 weeks ago) by rconstantine
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
File MIME type: text/x-php
#183478 alphabetizing now correct
#184161 setting field as 'required' now works properly
#215079 not sure if it was broken in the first place, but 'ratings' can be properly changed and checkboxes can be unchecked as expected
#212624 hopefully fixed a views exposed filter thing
#216821 again, not sure it was broken, but terms are properly shown/added the first time the node is saved
#200786 new feature: restrict creation of top level branches
#205093 new feature: restrict creation of branches
#221028 i think the last two items cover this one as well
#215170 changed how terms were saved to use native taxonomy functions which makes sure pathauto gets a hold of them properly
#177988 new feature: can now add multiple terms at once

still broken: single select of terms (radio button); see http://drupal.org/node/227306
1 <?php
2 /**
3 * $Id:$
4 * @package CCK_Taxonomy_SSU
5 * @category NeighborForge
6 */
7
8 /**
9 * Don't know if I need this or not
10 */
11 function cck_taxonomy_ssu_install() {
12
13 }
14
15 /**
16 * This is for modifying existing installs' cck-managed tables since cck can't seem to
17 * update tables from changes within the hook_field_settings()::database_columns.
18 */
19 function cck_taxonomy_ssu_update_1() {
20 $ret = array();
21 include_once('./'. drupal_get_path('module', 'content') .'/content.module');
22 include_once('./'. drupal_get_path('module', 'content') .'/content_admin.inc');
23
24 content_clear_type_cache();
25 $fields = content_fields();
26
27 foreach ($fields as $field) {
28 switch ($field['type']) {
29 case 'cck_taxonomy_ssu':
30 $db_info = content_database_info($field);
31 $column = $db_info['table']. '_choice';
32 $pos = strpos($column, '_');
33 $column = substr($column, $pos+1);
34 $length = 40;
35 $type = 'varchar(' .$length. ')';
36 $not_null = FALSE;
37 $sortable = TRUE;
38 content_db_add_column($db_info['table'], $column, $type, array($not_null, $sortable));
39 $ret[] = array(
40 'query' => strtr('The field %field_name has been updated in several respects.', array('%field_name' => $field['field_name'])),
41 'success' => TRUE
42 );
43 break;
44 }
45 }
46 return $ret;
47 }

  ViewVC Help
Powered by ViewVC 1.1.2