Ignore:
Timestamp:
08/22/10 21:14:19 (10 years ago)
Author:
Eric
Message:
  • Bug 1812 fixed - Compliance with FluxBB 1.4
  • New version 2.2.4 hard coded
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Register_FluxBB/trunk/include/functions.inc.php

    r5635 r6791  
    6666 
    6767  $o_default_user_group = pwg_db_fetch_assoc(pwg_query($query)); 
    68    
    69   $query = " 
     68 
     69// Check for FluxBB version 1.4.x and get the correct value 
     70  $query1 = " 
     71SELECT conf_value 
     72FROM ".FluxBB_CONFIG_TABLE." 
     73WHERE conf_name = 'o_default_timezone' 
     74;"; 
     75 
     76  $count1 = pwg_db_num_rows(pwg_query($query1)); 
     77 
     78// Check for FluxBB version 1.2.x and get the correct value 
     79  $query2 = " 
    7080SELECT conf_value 
    7181FROM ".FluxBB_CONFIG_TABLE." 
     
    7383;"; 
    7484 
    75   $o_server_timezone = pwg_db_fetch_assoc(pwg_query($query)); 
     85  $count2 = pwg_db_num_rows(pwg_query($query2)); 
     86   
     87  if ($count1 == 1 and $count2 == 0) 
     88  { 
     89    $o_default_timezone = pwg_db_fetch_assoc(pwg_query($query1)); 
     90  } 
     91  else if ($count1 == 0 and $count2 == 1) 
     92  { 
     93    $o_default_timezone = pwg_db_fetch_assoc(pwg_query($query2)); 
     94  } 
     95   
    7696   
    7797  $query = " 
     
    97117  password,  
    98118  email,  
    99   ". ( isset($o_server_timezone['conf_value']) ? 'timezone' : '' ) .", 
     119  ". ( isset($o_default_timezone['conf_value']) ? 'timezone' : '' ) .", 
    100120  ". ( isset($o_default_lang['conf_value']) ? 'language' : '' ) .", 
    101121  ". ( isset($o_default_style['conf_value']) ? 'style' : '' ) .", 
     
    109129  '".$password."',  
    110130        '".$adresse_mail."', 
    111   ". ( isset($o_server_timezone['conf_value']) ? "'".$o_server_timezone['conf_value']."'" : '' ) .", 
     131  ". ( isset($o_default_timezone['conf_value']) ? "'".$o_default_timezone['conf_value']."'" : '' ) .", 
    112132  ". ( isset($o_default_lang['conf_value']) ? "'".$o_default_lang['conf_value']."'" : '' ) .", 
    113133  ". ( isset($o_default_style['conf_value']) ? "'".$o_default_style['conf_value']."'" : '' ) .", 
Note: See TracChangeset for help on using the changeset viewer.