Skip to content

Commit

Permalink
db_get_table: always append suffix
Browse files Browse the repository at this point in the history
Commit 2ce60e4 added a check to not
append the suffix for Oracle. This removes this because

- the test was incorrect, and caused non-Oracle installs to never have
  the suffix appended
- with recent changes to Oracle branch, where we specify a short suffix
  in the installer, this is no longer necessary.

The suffix is now systematically appended.
  • Loading branch information
dregad committed Oct 17, 2013
1 parent f95fe16 commit d0bf8a2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions core/database_api.php
Expand Up @@ -959,13 +959,12 @@ function db_get_table( $p_name ) {

$t_prefix = config_get_global( 'db_table_prefix' );
$t_suffix = config_get_global( 'db_table_suffix' );
if ( $t_prefix ) {

if( $t_prefix ) {
$t_table = $t_prefix . '_' . $t_table;
}
# Oci8 not support long object names(30 chars max), reducing table names
if ( $t_suffix && $GLOBALS['g_db_type'] == 'oci8' ) {
$t_table .= $t_suffix;
}
$t_table .= $t_suffix;

db_check_identifier_size( $t_table );

return $t_table;
Expand Down

0 comments on commit d0bf8a2

Please sign in to comment.