/[drupal]/contributions/modules/tw/tw.views.inc
ViewVC logotype

Diff of /contributions/modules/tw/tw.views.inc

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

revision 1.1.2.10, Thu Apr 30 21:20:22 2009 UTC revision 1.1.2.11, Fri May 1 01:44:13 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2    // $Id$
3    
4  /**  /**
5   * @file   * @file
# Line 24  function tw_views_data() { Line 25  function tw_views_data() {
25      if ($connection == 'default') {      if ($connection == 'default') {
26        $rawtablename = schema_unprefix_table($tablename);        $rawtablename = schema_unprefix_table($tablename);
27        $disptablename = $tablename;        $disptablename = $tablename;
28      } else {      }
29        else {
30        $rawtablename = $tablename;        $rawtablename = $tablename;
31        $disptablename = $connection . '.' . $tablename;        $disptablename = $connection . '.' . $tablename;
32      }      }
# Line 104  function tw_views_data() { Line 106  function tw_views_data() {
106          'base field' => $col2,          'base field' => $col2,
107          'label' => t("Join $tbl1 to $tbl2"),          'label' => t("Join $tbl1 to $tbl2"),
108        );        );
109      } else {      }
110        else {
111        $i++;        $i++;
112        $mungedcol = $col1.'_'.$i;        $mungedcol = $col1 . '_' . $i;
113        $tables[$rawtbl1][$mungedcol] = $tables[$rawtbl1][$col1];        $tables[$rawtbl1][$mungedcol] = $tables[$rawtbl1][$col1];
114        $tables[$rawtbl1][$mungedcol]['title'] = t("$col1 (joins to $tbl2)");        $tables[$rawtbl1][$mungedcol]['title'] = t("$col1 (joins to $tbl2)");
115        $tables[$rawtbl1][$mungedcol]['real field'] = $col1;        $tables[$rawtbl1][$mungedcol]['real field'] = $col1;
# Line 122  function tw_views_data() { Line 125  function tw_views_data() {
125  }  }
126    
127  /**  /**
128   * Enter description here...   * Return a views handler based on the column type.
  *  
  * @param unknown_type $sqltype  
  * @return unknown  
129   */   */
130  function _tw_views_handler_type($sqltype) {  function _tw_views_handler_type($sqltype) {
131    preg_match('/^[a-zA-Z]+/', $sqltype, $matches);    preg_match('/^[a-zA-Z]+/', $sqltype, $matches);

Legend:
Removed from v.1.1.2.10  
changed lines
  Added in v.1.1.2.11

  ViewVC Help
Powered by ViewVC 1.1.2