/[drupal]/contributions/modules/cre/recommendation_modules/node_recommendation.install
ViewVC logotype

Diff of /contributions/modules/cre/recommendation_modules/node_recommendation.install

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

revision 1.1, Mon Nov 3 13:18:29 2008 UTC revision 1.1.2.1, Mon Nov 3 13:18:29 2008 UTC
# Line 0  Line 1 
1    <?php
2    // $Id: $
3    
4    function node_recommendation_install() {
5       switch ($GLOBALS['db_type']) {
6        case 'mysql':
7        case 'mysqli':
8        db_query("CREATE TABLE {node_recommendations}(
9            nid int(10) NOT NULL,
10            uid int(10) NOT NULL,
11            score decimal(10, 6) NOT NULL,
12            PRIMARY KEY (nid, uid)
13            ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
14          break;
15    
16        case 'pgsql':
17           drupal_set_message(t('PGSQL is not supported'));
18           return;
19           break;
20        }
21    }
22    
23    function node_recommendation_update_1() {
24      $ret[] = update_sql("CREATE TABLE {node_recommendations}(
25            nid int(10) NOT NULL,
26            uid int(10) NOT NULL,
27            score decimal(10, 6) NOT NULL,
28            PRIMARY KEY (nid, uid)
29            ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
30    
31      $ret[] = update_sql("DELETE FROM {variable} WHERE name LIKE '%%s%%'", 'node_recommendation_days');
32      $ret[] = update_sql("DELETE FROM {variable} WHERE name = 'node_recommendation_global_type'");
33      $ret[] = update_sql("DELETE FROM {variable} WHERE name = 'node_recommendation_page_n'");
34    
35      return $ret;
36    }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.1

  ViewVC Help
Powered by ViewVC 1.1.2