Ignore:
Timestamp:
May 12, 2012, 2:54:33 PM (12 years ago)
Author:
Eric
Message:

Code refactory
Compatilibity with Piwigo 2.4 and FluxBB 1.5 verifyed
language/fr_FR/plugin.lang.php sentence fixed

File:
1 edited

Legend:

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

    r10977 r14918  
    621621  $conf_Register_FluxBB = isset($conf['Register_FluxBB']) ? explode(";" , $conf['Register_FluxBB']) : array();
    622622
     623// If UAM exists and if UAM ConfirmMail is set, we can set this feature
     624  if (function_exists('FindAvailableConfirmMailID'))
     625  {
     626    $conf_UAM = unserialize($conf['UserAdvManager']);
     627
     628    if (isset($conf_UAM[1]) and ($conf_UAM[1] == 'true' or $conf_UAM[1] == 'local') and (isset($conf_UAM[2]) and $conf_UAM[2] <> '-1'))
     629    {
     630      $UAM_bridge = true;
     631    }
     632    else $UAM_bridge = false;
     633  }
     634
    623635  $template->assign(
    624636    array
     
    635647      'FluxBB_DETAILS_TRUE'  => (isset($conf_Register_FluxBB[5]) and $conf_Register_FluxBB[5] == 'true') ? 'checked="checked"' : '',
    636648      'FluxBB_DETAILS_FALSE' => (isset($conf_Register_FluxBB[5]) and $conf_Register_FluxBB[5] == 'false') ? 'checked="checked"' : '',
     649      'UAM_BRIDGE'           => $UAM_bridge,
     650      'FluxBB_UAM_LINK_TRUE' => (isset($conf_Register_FluxBB[6]) and $conf_Register_FluxBB[6] == 'true') ? 'checked="checked"' : '',
     651      'FluxBB_UAM_LINK_FALSE'=> (isset($conf_Register_FluxBB[6]) and $conf_Register_FluxBB[6] == 'false') ? 'checked="checked"' : '',
     652      'FluxBB_GROUP'         => $conf_Register_FluxBB[7],
    637653    )
    638654  );
    639655
    640 // If UAM exists and if UAM ConfirmMail is set, we can set this feature
    641   if (function_exists('FindAvailableConfirmMailID'))
    642   { 
    643     $conf_UAM = unserialize($conf['UserAdvManager']);
    644     $UAM_bridge = false;
    645    
    646     if (isset($conf_UAM[1]) and ($conf_UAM[1] == 'true' or $conf_UAM[1] == 'local') and isset($conf_UAM[2]) and $conf_UAM[2] != '-1')
    647     {
    648       $UAM_bridge = true;
    649     }
    650  
    651     $template->assign(
    652       array
    653       (
    654         'UAM_BRIDGE'            => $UAM_bridge,
    655         'FluxBB_UAM_LINK_TRUE'  => (isset($conf_Register_FluxBB[6]) and $conf_Register_FluxBB[6] == 'true') ? 'checked="checked"' : '',
    656         'FluxBB_UAM_LINK_FALSE' => (isset($conf_Register_FluxBB[6]) and $conf_Register_FluxBB[6] == 'false') ? 'checked="checked"' : '',
    657         'FluxBB_GROUP'          => $conf_Register_FluxBB[7],
    658       )
    659     );
    660   }
    661    
    662656  $template->set_filename('plugin_admin_content', dirname(__FILE__) . '/template/manage.tpl');
    663657  $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
Note: See TracChangeset for help on using the changeset viewer.