domain_prefix_get_tables

Versions
domain
domain_prefix_get_tables($prefix = NULL)

Get the tables with the active prefix

Parameters

$prefix The table prefix used with this domain. Optional.

▾ 2 functions call domain_prefix_get_tables()

domain_prefix_configure_form in domain_prefix/domain_prefix.admin.inc
FormsAPI for generating the configuration form
domain_prefix_form in domain_prefix/domain_prefix.admin.inc
The table prefixing page for a domain.

Code

domain_prefix/domain_prefix.admin.inc, line 16

<?php
function domain_prefix_get_tables($prefix = NULL) {
  // Check for default prefix settings.
  if (empty($prefix)) {
    $prefix = domain_prefix_get_prefix();
  }

  // Get the database schema information.
  $schema = drupal_get_schema();
  ksort($schema);

  $tables = array();
  $disallow = domain_prefix_disallow();
  foreach ($schema as $table => $data) {
    if (!in_array($table, $disallow)) {
      $tables[$table]['tablename'] = $table;
      $tables[$table]['module'] = $data['module'];
    }
  }
  // Sort them by module
  uasort($tables, '_domain_prefix_sort');
  return $tables;
}
?>

Contact

  • agentrickard [at] gmail [dot] com

Donations

My Amazon.com Wish List