Changeset 21913


Ignore:
Timestamp:
03/30/13 18:38:50 (6 years ago)
Author:
Eric
Message:

Next version is 2.5.3:
Bug fixed - MySql error after installation from scratch - Part 2 : Add controls on FluxBB table prefix

Location:
extensions/Register_FluxBB
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/Register_FluxBB/admin/admin.php

    r21912 r21913  
    126126  $pwgadmin = pwg_db_fetch_assoc(pwg_query($query)); 
    127127 
     128if (isset($_POST['FluxBB_prefix']) and $_POST['FluxBB_prefix'] <>'') 
     129{ 
    128130// FluxBB's admin username control 
    129131  $query = ' 
    130132SELECT username, id 
    131 FROM '.FluxBB_USERS_TABLE.' 
     133FROM '.$_POST['FluxBB_prefix'].'users'.' 
    132134WHERE id = 2 
    133135;'; 
     
    138140  $query = ' 
    139141SELECT username, id 
    140 FROM '.FluxBB_USERS_TABLE.' 
     142FROM '.$_POST['FluxBB_prefix'].'users'.' 
    141143WHERE id = 1 
    142144;'; 
     145} 
     146 
    143147 
    144148  $fbbguest = pwg_db_fetch_assoc(pwg_query($query)); 
  • extensions/Register_FluxBB/include/constants.php

    r21424 r21913  
    66 
    77define('Register_FluxBB_ID_TABLE', $prefixeTable.'Register_FluxBB_id'); 
    8 define('FluxBB_CONFIG_TABLE', $conf_Register_FluxBB['FLUXBB_PREFIX'].'config'); 
    9 define('FluxBB_USERS_TABLE', $conf_Register_FluxBB['FLUXBB_PREFIX'].'users'); 
    10 define('FluxBB_POSTS_TABLE', $conf_Register_FluxBB['FLUXBB_PREFIX'].'posts'); 
    11 define('FluxBB_TOPICS_TABLE', $conf_Register_FluxBB['FLUXBB_PREFIX'].'topics'); 
    12 define('FluxBB_SUBSCRIPTIONS_TABLE', $conf_Register_FluxBB['FLUXBB_PREFIX'].'topic_subscriptions'); 
    138 
     9if (isset($conf_Register_FluxBB['FLUXBB_PREFIX']) and $conf_Register_FluxBB['FLUXBB_PREFIX'] <> '') 
     10{ 
     11  define('FluxBB_CONFIG_TABLE', $conf_Register_FluxBB['FLUXBB_PREFIX'].'config'); 
     12  define('FluxBB_USERS_TABLE', $conf_Register_FluxBB['FLUXBB_PREFIX'].'users'); 
     13  define('FluxBB_POSTS_TABLE', $conf_Register_FluxBB['FLUXBB_PREFIX'].'posts'); 
     14  define('FluxBB_TOPICS_TABLE', $conf_Register_FluxBB['FLUXBB_PREFIX'].'topics'); 
     15  define('FluxBB_SUBSCRIPTIONS_TABLE', $conf_Register_FluxBB['FLUXBB_PREFIX'].'topic_subscriptions'); 
     16} 
    1417?> 
Note: See TracChangeset for help on using the changeset viewer.