Ignore:
Timestamp:
Sep 13, 2010, 9:45:17 PM (14 years ago)
Author:
Eric
Message:

Merge from Trunk to Branch 2.3

Location:
extensions/Register_FluxBB/branches/2.3
Files:
6 edited

Legend:

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

    r6815 r6899  
    77if (!defined('REGFLUXBB_PATH')) define('REGFLUXBB_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/');
    88
    9 //ini_set('error_reporting', E_ALL);
    10 //ini_set('display_errors', true);
     9ini_set('error_reporting', E_ALL);
     10ini_set('display_errors', true);
    1111
    1212include_once (PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
     
    574574  if (isset($_POST['submit']) and !is_adviser() and isset($_POST['FluxBB_prefix']) and isset($_POST['FluxBB_admin']) and isset($_POST['FluxBB_guest']) and isset($_POST['FluxBB_del_pt']) and isset($_POST['FluxBB_confirm']) and isset($_POST['FluxBB_details']))
    575575  {
    576     $conf['Register_FluxBB'] = $_POST['FluxBB_prefix'].';'.addslashes($_POST['FluxBB_admin']).';'.addslashes($_POST['FluxBB_guest']).';'.$_POST['FluxBB_del_pt'].';'.$_POST['FluxBB_confirm'].';'.$_POST['FluxBB_details'].';'.$_POST['FluxBB_UAM'].';'.$_POST['FluxBB_group'];
    577 
    578     $query = '
     576
     577/* Configuration controls */
     578// Piwigo's admin username control
     579    $query1 = "
     580SELECT username, id
     581FROM ".USERS_TABLE."
     582WHERE id = ".$conf['webmaster_id']."
     583;";
     584
     585    $pwgadmin = pwg_db_fetch_assoc(pwg_query($query1));
     586
     587// FluxBB's admin username control
     588    $query2 = "
     589SELECT username, id
     590FROM ".FluxBB_USERS_TABLE."
     591WHERE id = 2
     592;";
     593
     594    $fbbadmin = pwg_db_fetch_assoc(pwg_query($query2));
     595
     596// FluxBB's Guest username control
     597    $query3 = "
     598SELECT username, id
     599FROM ".FluxBB_USERS_TABLE."
     600WHERE id = 1
     601;";
     602
     603    $fbbguest = pwg_db_fetch_assoc(pwg_query($query3));
     604
     605// Compute configuration errors
     606    if (stripslashes($pwgadmin['username']) != stripslashes($_POST['FluxBB_admin']))
     607    {
     608      array_push($page['errors'], l10n('error_config_admin1'));
     609    }
     610    if (stripslashes($pwgadmin['username']) != stripslashes($fbbadmin['username']))
     611    {
     612      array_push($page['errors'], l10n('error_config_admin2'));
     613    }
     614    if (stripslashes($fbbguest['username']) != stripslashes($_POST['FluxBB_guest']))
     615    {
     616      array_push($page['errors'], l10n('error_config_guest'));
     617    }
     618    elseif (count($page['errors']) == 0)
     619    {
     620      if (!function_exists('FindAvailableConfirmMailID'))
     621      {
     622      $conf['Register_FluxBB'] = $_POST['FluxBB_prefix'].';'.addslashes($_POST['FluxBB_admin']).';'.addslashes($_POST['FluxBB_guest']).';'.$_POST['FluxBB_del_pt'].';'.$_POST['FluxBB_confirm'].';'.$_POST['FluxBB_details'].';false;0';
     623      }
     624      elseif (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          $conf['Register_FluxBB'] = $_POST['FluxBB_prefix'].';'.addslashes($_POST['FluxBB_admin']).';'.addslashes($_POST['FluxBB_guest']).';'.$_POST['FluxBB_del_pt'].';'.$_POST['FluxBB_confirm'].';'.$_POST['FluxBB_details'].';'.$_POST['FluxBB_UAM'].';'.$_POST['FluxBB_group'];
     631        }
     632        else
     633        {
     634          $conf['Register_FluxBB'] = $_POST['FluxBB_prefix'].';'.addslashes($_POST['FluxBB_admin']).';'.addslashes($_POST['FluxBB_guest']).';'.$_POST['FluxBB_del_pt'].';'.$_POST['FluxBB_confirm'].';'.$_POST['FluxBB_details'].';false;0';
     635        }
     636      }
     637
     638      $query = '
    579639UPDATE '.CONFIG_TABLE.'
    580640SET value="'.$conf['Register_FluxBB'].'"
     
    583643;';
    584644
    585     pwg_query($query);
    586 
    587     array_push($page['infos'], l10n('save_config'));
     645      pwg_query($query);
     646     
     647      array_push($page['infos'], l10n('save_config'));
     648    }
    588649  }
    589650
     
    617678      $UAM_bridge = true;
    618679    }
    619   }
    620  
    621   $template->assign(
    622     array
    623     (
    624       'UAM_BRIDGE'            => $UAM_bridge,
    625       'FluxBB_UAM_LINK_TRUE'  => (isset($conf_Register_FluxBB[6]) and $conf_Register_FluxBB[6] == 'true') ? 'checked="checked"' : '',
    626       'FluxBB_UAM_LINK_FALSE' => (isset($conf_Register_FluxBB[6]) and $conf_Register_FluxBB[6] == 'false') ? 'checked="checked"' : '',
    627       'FluxBB_GROUP'          => $conf_Register_FluxBB[7],
    628     )
    629   );
    630 
     680 
     681    $template->assign(
     682      array
     683      (
     684        'UAM_BRIDGE'            => $UAM_bridge,
     685        'FluxBB_UAM_LINK_TRUE'  => (isset($conf_Register_FluxBB[6]) and $conf_Register_FluxBB[6] == 'true') ? 'checked="checked"' : '',
     686        'FluxBB_UAM_LINK_FALSE' => (isset($conf_Register_FluxBB[6]) and $conf_Register_FluxBB[6] == 'false') ? 'checked="checked"' : '',
     687        'FluxBB_GROUP'          => $conf_Register_FluxBB[7],
     688      )
     689    );
     690  }
     691   
    631692  $template->set_filename('plugin_admin_content', dirname(__FILE__) . '/template/manage.tpl');
    632693  $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
     
    635696
    636697        case 'Migration':
     698 
     699  $conf_Register_FluxBB = isset($conf['Register_FluxBB']) ? explode(";" , $conf['Register_FluxBB']) : array();
    637700       
    638701  if ( isset($_POST['Migration']) and !is_adviser() )
     
    654717
    655718    $result = pwg_query($query);
    656  
     719       
    657720    while ($row = pwg_db_fetch_assoc($result))
    658721    {
  • extensions/Register_FluxBB/branches/2.3/admin/template/manage.tpl

    r6815 r6899  
    4747        <li><label>{'Admin'|@translate}</label><br>
    4848                <input type="text" name="FluxBB_admin" value={$FluxBB_ADMIN} size="20" style="text-align: center;"><br>
    49                 {'User'|@translate}
    5049      <br>
    5150        </li>
  • extensions/Register_FluxBB/branches/2.3/language/de_DE/plugin.lang.php

    r6815 r6899  
    1919  Überprüfen Sie die Einstellungen ihrer FluxBB Installation und korrigieren Sie sie gegebenenfalls. <br>
    2020  Passen Sie das Verhalten des Plugins nach Ihren Wünschen an.';
    21 $lang['FluxBB_Prefix'] = 'FluxBB Tabellenpräfix :';
    22 $lang['FluxBB_Admin'] = 'Benutzername des Piwigo-administrators.';
     21$lang['Prefix'] = 'FluxBB Tabellenpräfix :';
    2322$lang['Guest'] = 'Benutzername des FluxBB Gast-benutzers.';
    24 $lang['User'] = '<div class="warning">Das Administratorkonto von FluxBB muss das selbe sein</div>';
    2523$lang['Details'] = 'Detailgrad der generierten Reports.';
    2624$lang['Details_true'] = ' --&gt; Alle Ergebnisdetails anzeigen.';
     
    157155Similarly, if you\'ve never used Register_FluxBB, the Piwigo\'s accounts migration phase from your gallery to your FluxBB forum will disregard the state validated or not for the accounts at the launch of the migration phase.';
    158156// --------- End: New or revised $lang ---- from version 2.3.0
     157
     158// --------- Starting below: New or revised $lang ---- from version 2.3.3
     159/*TODO*/$lang['Admin'] = 'Piwigo\'s administrator username. <b style="color: red">The username of FluxBB\'s administrator account has to be the same!</b>';
     160/*TODO*/$lang['error_config_admin1'] = 'ERROR : Piwigo\'s admin username is wrong!';
     161/*TODO*/$lang['error_config_admin2'] = 'ERROR : The name of the FluxBB\'s administrator account is different from that of Piwigo ! Check the configuration of your FluxBB forum and rename the administrator account in the same name as that of Piwigo.';
     162/*TODO*/$lang['error_config_guest'] = 'ERROR : The name of the FluxBB\'s guest account is wrong!';
     163// --------- End: New or revised $lang ---- from version 2.3.3
    159164?>
  • extensions/Register_FluxBB/branches/2.3/language/en_UK/plugin.lang.php

    r6815 r6899  
    1919  Check the settings of your FluxBB installation and correct them if necessary. <br>
    2020  Change, if any, the behavior of the plugin at your convenience.';
    21 $lang['FluxBB_Prefix'] = 'FluxBB Prefix tables :';
    22 $lang['FluxBB_Admin'] = 'Username of the Piwigo administrator.';
     21$lang['Prefix'] = 'FluxBB Prefix tables :';
    2322$lang['Guest'] = 'Username of the FluxBB Guest user.';
    24 $lang['User'] = '<div class="warning">FluxBB\'s administrator name must be the same</div>';
    2523$lang['Details'] = 'Level of detail in reports of operations.';
    2624$lang['Details_true'] = ' --&gt; View all details of the results of operations.';
     
    157155Similarly, if you\'ve never used Register_FluxBB, the Piwigo\'s accounts migration phase from your gallery to your FluxBB forum will disregard the state validated or not for the accounts at the launch of the migration phase.';
    158156// --------- End: New or revised $lang ---- from version 2.3.0
     157
     158// --------- Starting below: New or revised $lang ---- from version 2.3.3
     159$lang['Admin'] = 'Piwigo\'s administrator username. <b style="color: red">The username of FluxBB\'s administrator account has to be the same!</b>';
     160$lang['error_config_admin1'] = 'ERROR : Piwigo\'s admin username is wrong!';
     161$lang['error_config_admin2'] = 'ERROR : The name of the FluxBB\'s administrator account is different from that of Piwigo ! Check the configuration of your FluxBB forum and rename the administrator account in the same name as that of Piwigo.';
     162$lang['error_config_guest'] = 'ERROR : The name of the FluxBB\'s guest account is wrong!';
     163// --------- End: New or revised $lang ---- from version 2.3.3
    159164?>
  • extensions/Register_FluxBB/branches/2.3/language/fr_FR/plugin.lang.php

    r6815 r6899  
    2020  Modifiez, le cas échéant, le comportement du plugin à votre convenance.';
    2121$lang['Prefix'] = 'Préfixe des tables de FluxBB :';
    22 $lang['Admin'] = 'Nom d\'utilisateur de l\'administrateur de Piwigo.';
    2322$lang['Guest'] = 'Nom d\'utilisateur de l\'invité de FluxBB.';
    24 $lang['User'] = '<div class="warning">Le nom de l\'administrateur de FluxBB doit être identique</div>';
    2523$lang['Details'] = 'Niveau de détails dans les rapports d\'opérations.';
    2624$lang['Details_true'] = ' --&gt; Afficher tous les détails des résultats sur les opérations.';
     
    158156De même, si vous n\'avez jamais utilisé Register_FluxBB, la phase de migration des comptes de votre galerie Piwigo vers votre forum FluxBB ne tiendra pas compte de l\'état validé ou non de vos inscrits au moment du lancement de la phase de migration.';
    159157// --------- End: New or revised $lang ---- from version 2.3.0
     158
     159// --------- Starting below: New or revised $lang ---- from version 2.3.3
     160$lang['Admin'] = 'Nom d\'utilisateur de l\'administrateur de Piwigo. <b style="color: red">Le nom de l\'administrateur de FluxBB doit être identique !</b>';
     161$lang['error_config_admin1'] = 'ERREUR : Le nom du compte administrateur de Piwigo est incorrect !';
     162$lang['error_config_admin2'] = 'ERREUR : Le nom du compte administrateur de FluxBB est différent de celui de Piwigo ! Vérifiez la configuration de votre forum FluxBB et nommez le compte administrateur de la même manière que celui de Piwigo.';
     163$lang['error_config_guest'] = 'ERREUR : Le nom du compte visiteur (guest) de FluxBB est incorrect !';
     164// --------- End: New or revised $lang ---- from version 2.3.3
    160165?>
  • extensions/Register_FluxBB/branches/2.3/main.inc.php

    r6881 r6899  
    22/*
    33Plugin Name: Register FluxBB
    4 Version: 2.3.2
     4Version: 2.3.3
    55Description: Link user registration from Piwigo to FluxBB forum (registration, password changing, deletion) - Original Nicco's NBC_LinkUser2PunBB plugin upgraded to Piwigo / Liez l'inscription des utilisateurs de Piwigo avec votre forum FluxBB - Portage du plugin NBC_LinkUser2PunBB de Nicco vers Piwigo
    66Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=252
     
    59592.3.1     - 31/08/10  - Bug 1825 fixed : Password corruption after Piwigo's profile page visit
    6060
    61 2.3.2     - 11/09/10  - Bug 1847 fixed : Admins and webmasters was not excluded from registration validation
     612.3.2     - 11/09/10  - Bug 1847 fixed : Admins and webmasters was not excluded from registration validation
     62
     632.3.3     - 13/09/10  - Bug 1853 fixed : Add of controls on plugin configuration settings to avoid some mistakes
     64                      - Bug 1855 fixed : Improvement of use of UAM bridge (fixes php notices)
     65                      - Several language files fix
    6266--------------------------------------------------------------------------------
    6367*/
Note: See TracChangeset for help on using the changeset viewer.