| 1 |
<?php |
<?php |
| 2 |
// $id$ |
// $Id$ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 9 |
|
|
| 10 |
/** |
/** |
| 11 |
* Implementation of hook_default_view_views(). |
* Implementation of hook_default_view_views(). |
|
* |
|
|
* @return unknown |
|
| 12 |
*/ |
*/ |
| 13 |
function tw_views_default_views() { |
function tw_views_default_views() { |
| 14 |
$views = array(); |
$views = array(); |
| 31 |
if ($connection == 'default') { |
if ($connection == 'default') { |
| 32 |
$rawtablename = schema_unprefix_table($tablename); |
$rawtablename = schema_unprefix_table($tablename); |
| 33 |
$cleantablename = $rawtablename; |
$cleantablename = $rawtablename; |
| 34 |
} else { |
} |
| 35 |
|
else { |
| 36 |
global $db_url; |
global $db_url; |
| 37 |
$url = parse_url($db_url[$connection ]); |
$url = parse_url($db_url[$connection ]); |
| 38 |
$truedbname = substr($url['path'], 1); |
$truedbname = substr($url['path'], 1); |
| 83 |
'perm' => TW_ACCESS, |
'perm' => TW_ACCESS, |
| 84 |
)); |
)); |
| 85 |
$handler->override_option('title', t('Contents of !tablename', array('!tablename' => $rawtablename))); |
$handler->override_option('title', t('Contents of !tablename', array('!tablename' => $rawtablename))); |
| 86 |
$handler->override_option('header', t('This is a view of a raw data table in the Drupal database. It may be '. |
$handler->override_option('header', t('This is a view of a raw data table in the Drupal database. It may be ' . |
| 87 |
'sorted in various ways by clicking the column headers. |
'sorted in various ways by clicking the column headers. |
| 88 |
|
|
| 89 |
If you identify a particular field (column) that does not need to be used in views of this table, '. |
If you identify a particular field (column) that does not need to be used in views of this table, ' . |
| 90 |
'go to the <a href="!analyze_url">analysis page</a> '. |
'go to the <a href="!analyze_url">analysis page</a> ' . |
| 91 |
'and check the <em>Ignore</em> box for that field. It will then no longer appear here.', |
'and check the <em>Ignore</em> box for that field. It will then no longer appear here.', |
| 92 |
array('!analyze_url' => url("admin/content/tw/analyze/$rawtablename")))); |
array('!analyze_url' => url("admin/content/tw/analyze/$rawtablename")))); |
| 93 |
$handler->override_option('header_format', '1'); |
$handler->override_option('header_format', '1'); |