Ignore:
Timestamp:
05/23/10 16:42:51 (10 years ago)
Author:
Eric
Message:

[Register_FluxBB]

Merge from trunk to branch 2.2

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

Legend:

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

    r5606 r6295  
    8282  $result = pwg_query($query); 
    8383   
    84   while($row = mysql_fetch_array($result)) 
     84  while($row = pwg_db_fetch_assoc($result)) 
    8585    $msg_error_PWG_Dup .= '<br>'.l10n('Error_PWG_Dup').$row['nbr_dup'].' x '.stripslashes($row['username']); 
    8686 
     
    100100  $result = pwg_query($query); 
    101101   
    102   while($row = mysql_fetch_array($result)) 
     102  while($row = pwg_db_fetch_assoc($result)) 
    103103  { 
    104104    $msg_error_FluxBB_Dup .= '<br>'.l10n('Error_FluxBB_Dup').$row['nbr_dup'].' x '.stripslashes($row['username']); 
     
    111111    $subresult = pwg_query($subquery); 
    112112   
    113     while($subrow = mysql_fetch_array($subresult)) 
     113    while($subrow = pwg_db_fetch_assoc($subresult)) 
    114114    { 
    115115      $msg_error_FluxBB_Dup .= '<br>id:'.$subrow['id'].'='.stripslashes($subrow['username']).' ('.$subrow['email'].')'; 
     
    157157  $result = pwg_query($query); 
    158158   
    159   while($row = mysql_fetch_array($result)) 
     159  while($row = pwg_db_fetch_assoc($result)) 
    160160  { 
    161161    $msg_error_Link_Break .= '<br>'.l10n('Error_Link_Break').stripslashes($row['pwg_user']).' ('.$row['pwg_mail'].')'; 
     
    196196  $result = pwg_query($query); 
    197197   
    198   while($row = mysql_fetch_array($result)) 
     198  while($row = pwg_db_fetch_assoc($result)) 
    199199  { 
    200200    $msg_error_Link_Bad .= '<br>'.l10n('Error_Link_Del').stripslashes($row['pwg_user']).' ('.$row['pwg_mail'].')'.' -- '.stripslashes($row['bb_user']).' ('.$row['bb_mail'].')'; 
     
    245245;"; 
    246246 
    247   $Compteur = mysql_fetch_array(pwg_query($query)); 
     247  $Compteur = pwg_db_fetch_assoc(pwg_query($query)); 
    248248 
    249249  if (!empty($Compteur) and $Compteur['nbr_dead'] > 0) 
     
    278278  $result = pwg_query($query); 
    279279   
    280   while($row = mysql_fetch_array($result)) 
     280  while($row = pwg_db_fetch_assoc($result)) 
    281281  { 
    282282    $msg_error_Link_Bad .= '<br>'.l10n('Error_Link_Dup').$row['nbr_dup'].' = '.stripslashes($row['pwg_user']).' -- '.stripslashes($row['bb_user']).')'; 
     
    318318  $result = pwg_query($query); 
    319319   
    320   while($row = mysql_fetch_array($result)) 
     320  while($row = pwg_db_fetch_assoc($result)) 
    321321  { 
    322322    if ( ($row['pwg_pwd'] != $row['bb_pwd']) or ($row['pwg_eml'] != $row['bb_eml']) ) 
     
    373373  $result = pwg_query($query); 
    374374 
    375   while($row = mysql_fetch_array($result)) 
     375  while($row = pwg_db_fetch_assoc($result)) 
    376376  { 
    377377    $msg_error_PWG2FluxBB .= '<br>'.l10n('Error_PWG2FluxBB').stripslashes($row['username']).' ('.$row['mail_address'].')'; 
     
    415415  $result = pwg_query($query); 
    416416 
    417   while($row = mysql_fetch_array($result)) 
     417  while($row = pwg_db_fetch_assoc($result)) 
    418418  { 
    419419    $msg_error_FluxBB2PWG .= '<br>'.l10n('Error_FluxBB2PWG').stripslashes($row['username']).' ('.$row['email'].')'; 
     
    513513SELECT id AS id_pwg, username, password, mail_address  
    514514FROM ".USERS_TABLE." 
    515 WHERE BINARY username = BINARY '".mysql_real_escape_string($_GET['username'])."' 
     515WHERE BINARY username = BINARY '".pwg_db_real_escape_string($_GET['username'])."' 
    516516LIMIT 1 
    517517;"; 
    518518 
    519   $data = mysql_fetch_array(pwg_query($query)); 
     519  $data = pwg_db_fetch_assoc(pwg_query($query)); 
    520520   
    521521  if (!empty($data)) 
     
    531531SELECT id, username, password, mail_address  
    532532FROM ".USERS_TABLE." 
    533 WHERE BINARY username = BINARY '".mysql_real_escape_string($_GET['username'])."' 
     533WHERE BINARY username = BINARY '".pwg_db_real_escape_string($_GET['username'])."' 
    534534LIMIT 1 
    535535;"; 
    536536 
    537   $data = mysql_fetch_array(pwg_query($query)); 
     537  $data = pwg_db_fetch_assoc(pwg_query($query)); 
    538538   
    539539  if (!empty($data)) 
     
    633633    $result = pwg_query($query); 
    634634   
    635     while ($row = mysql_fetch_array($result)) 
     635    while ($row = pwg_db_fetch_assoc($result)) 
    636636    { 
    637637      if((stripslashes($row['username']) != stripslashes($conf_Register_FluxBB[2])) and (stripslashes($row['username']) != stripslashes($conf_Register_FluxBB[1]))) 
     
    658658    $msg_Mig_Add_AllUsers = ''; 
    659659   
    660     while ($row = mysql_fetch_array($result)) 
     660    while ($row = pwg_db_fetch_assoc($result)) 
    661661    { 
    662662      if((stripslashes($row['username']) != 'guest') and (stripslashes($row['username']) != stripslashes($conf_Register_FluxBB[1]))) 
     
    677677;"; 
    678678 
    679     $row = mysql_fetch_array(pwg_query($query)); 
     679    $row = pwg_db_fetch_assoc(pwg_query($query)); 
    680680 
    681681    if (!empty($row)) 
     
    736736    $result = pwg_query($query); 
    737737   
    738     while($row = mysql_fetch_array($result)) 
     738    while($row = pwg_db_fetch_assoc($result)) 
    739739      $msg_error_PWG_Dup .= '<br>'.l10n('Error_PWG_Dup').$row['nbr_dup'].' x '.stripslashes($row['username']); 
    740740 
     
    752752    $result = pwg_query($query); 
    753753   
    754     while($row = mysql_fetch_array($result)) 
     754    while($row = pwg_db_fetch_assoc($result)) 
    755755    { 
    756756      $msg_error_FluxBB_Dup .= '<br>'.l10n('Error_FluxBB_Dup').$row['nbr_dup'].' x '.stripslashes($row['username']); 
     
    764764      $subresult = pwg_query($subquery); 
    765765   
    766       while($subrow = mysql_fetch_array($subresult)) 
     766      while($subrow = pwg_db_fetch_assoc($subresult)) 
    767767      { 
    768768        $msg_error_FluxBB_Dup .= '<br>id:'.$subrow['id'].'='.stripslashes($subrow['username']).' ('.$subrow['email'].')'; 
     
    809809      $result = pwg_query($query); 
    810810     
    811       while($row = mysql_fetch_array($result)) 
     811      while($row = pwg_db_fetch_assoc($result)) 
    812812      { 
    813813        $msg_error_Link_Break .= '<br>'.l10n('New_Link').stripslashes($row['pwg_user']).' ('.$row['pwg_mail'].')'; 
     
    832832      $result = pwg_query($query); 
    833833     
    834       while($row = mysql_fetch_array($result)) 
     834      while($row = pwg_db_fetch_assoc($result)) 
    835835      { 
    836836        $msg_error_Link_Bad .= '<br>'.l10n('Link_Del').stripslashes($row['pwg_user']).' ('.$row['pwg_mail'].')'.' -- '.stripslashes($row['bb_user']).' ('.$row['bb_mail'].')'; 
     
    859859;"; 
    860860 
    861       $Compteur = mysql_fetch_array(pwg_query($query)); 
     861      $Compteur = pwg_db_fetch_assoc(pwg_query($query)); 
    862862     
    863863      if ( !empty($Compteur) and $Compteur['nbr_dead'] > 0) 
     
    892892      $result = pwg_query($query); 
    893893     
    894       while($row = mysql_fetch_array($result)) 
     894      while($row = pwg_db_fetch_assoc($result)) 
    895895      { 
    896896        $msg_error_Link_Bad .= '<br>'.l10n('Link_Dup').$row['nbr_dup'].' = '.stripslashes($row['pwg_user']).' -- '.stripslashes($row['bb_user']).')'; 
     
    916916      $result = pwg_query($query); 
    917917     
    918       while($row = mysql_fetch_array($result)) 
     918      while($row = pwg_db_fetch_assoc($result)) 
    919919      { 
    920920        if ( ($row['pwg_pwd'] != $row['bb_pwd']) or ($row['pwg_eml'] != $row['bb_eml']) ) 
     
    928928;"; 
    929929 
    930           $data = mysql_fetch_array(pwg_query($query)); 
     930          $data = pwg_db_fetch_assoc(pwg_query($query)); 
    931931         
    932932          if (!empty($data)) 
     
    955955      $result = pwg_query($query); 
    956956   
    957       while($row = mysql_fetch_array($result)) 
     957      while($row = pwg_db_fetch_assoc($result)) 
    958958      { 
    959959        $msg_error_PWG2FluxBB .= '<br>'.l10n('Add_User').stripslashes($row['username']).' ('.$row['mail_address'].')'; 
     
    966966;"; 
    967967 
    968         $data = mysql_fetch_array(pwg_query($query)); 
     968        $data = pwg_db_fetch_assoc(pwg_query($query)); 
    969969       
    970970        if (!empty($data)) 
     
    992992      $result = pwg_query($query); 
    993993   
    994       while($row = mysql_fetch_array($result)) 
     994      while($row = pwg_db_fetch_assoc($result)) 
    995995      { 
    996996        $msg_error_FluxBB2PWG .= '<br>'.l10n('Error_FluxBB2PWG').stripslashes($row['username']).' ('.$row['email'].')'; 
  • extensions/Register_FluxBB/branches/2.2/admin/template/register_fluxbb.css

    r5606 r6295  
    3232  background-color:#c2f5c2; 
    3333} 
     34 
     35.mod{ 
     36  margin: 5px; 
     37  padding: 50px 50px 10px 10px; 
     38  font-weight:bold; 
     39  background-repeat: no-repeat; 
     40  background-position: 5px 5px; 
     41  padding: 5px 60px 0pt 60px; 
     42  min-height: 20px; 
     43} 
     44 
     45.mod { 
     46  color: #f22; 
     47  background-color: #ffd5dc; 
     48} 
  • extensions/Register_FluxBB/branches/2.2/include/functions.inc.php

    r5606 r6295  
    1414;"; 
    1515   
    16   $data = mysql_fetch_array(pwg_query($query)); 
     16  $data = pwg_db_fetch_row(pwg_query($query)); 
    1717   
    1818  if (!empty($data)) 
     
    6565;"; 
    6666 
    67   $o_default_user_group = mysql_fetch_array(pwg_query($query)); 
     67  $o_default_user_group = pwg_db_fetch_assoc(pwg_query($query)); 
    6868   
    6969  $query = " 
     
    7373;"; 
    7474 
    75   $o_server_timezone = mysql_fetch_array(pwg_query($query)); 
     75  $o_server_timezone = pwg_db_fetch_assoc(pwg_query($query)); 
    7676   
    7777  $query = " 
     
    8181;"; 
    8282 
    83   $o_default_lang = mysql_fetch_array(pwg_query($query)); 
     83  $o_default_lang = pwg_db_fetch_assoc(pwg_query($query)); 
    8484   
    8585  $query = " 
     
    8989;"; 
    9090 
    91   $o_default_style = mysql_fetch_array(pwg_query($query)); 
     91  $o_default_style = pwg_db_fetch_assoc(pwg_query($query)); 
    9292   
    9393  $query = ' 
     
    105105  ) 
    106106VALUES( 
    107   '".mysql_real_escape_string($login)."', 
     107  '".pwg_db_real_escape_string($login)."', 
    108108  ". ( isset($o_default_user_group['conf_value']) ? "'".$o_default_user_group['conf_value']."'" : '' ) .", 
    109109  '".$password."',  
     
    120120  $result = pwg_query($query); 
    121121 
    122   $bb_id = mysql_insert_id(); 
     122  $bb_id = pwg_db_insert_id(); 
    123123   
    124124  FluxBB_Linkuser($pwg_id, $bb_id); 
     
    135135;"; 
    136136 
    137   $data = mysql_fetch_array(pwg_query($query)); 
     137  $data = pwg_db_fetch_assoc(pwg_query($query)); 
    138138   
    139139  if (!empty($data)) 
     
    157157;"; 
    158158 
    159   $data0 = mysql_fetch_array(pwg_query($query0)); 
     159  $data0 = pwg_db_fetch_assoc(pwg_query($query0)); 
    160160 
    161161  // Si égale à VRAI, suppression de tous les posts et topics 
     
    173173    $subquery = " 
    174174DELETE FROM ".FluxBB_TOPICS_TABLE." 
    175 WHERE BINARY poster = BINARY '".mysql_real_escape_string($data0['username'])."' 
     175WHERE BINARY poster = BINARY '".pwg_db_real_escape_string($data0['username'])."' 
    176176;"; 
    177177 
     
    210210;"; 
    211211 
    212   $row = mysql_fetch_array(pwg_query($query)); 
     212  $row = pwg_db_fetch_assoc(pwg_query($query)); 
    213213 
    214214  if (!empty($row)) 
     
    216216    $query = " 
    217217UPDATE ".FluxBB_USERS_TABLE." 
    218 SET username = '".mysql_real_escape_string($username)."', email = '".$adresse_mail."', password = '".$password."'  
     218SET username = '".pwg_db_real_escape_string($username)."', email = '".$adresse_mail."', password = '".$password."'  
    219219WHERE id = ".$row['FluxBB_id']." 
    220220;"; 
     
    229229SELECT id as FluxBB_id 
    230230FROM ".FluxBB_USERS_TABLE." 
    231 WHERE BINARY username = BINARY '".mysql_real_escape_string($username)."' 
    232 ;"; 
    233  
    234     $row = mysql_fetch_array(pwg_query($query)); 
     231WHERE BINARY username = BINARY '".pwg_db_real_escape_string($username)."' 
     232;"; 
     233 
     234    $row = pwg_db_fetch_assoc(pwg_query($query)); 
    235235   
    236236    if (!empty($row)) 
     
    238238      $query = " 
    239239UPDATE ".FluxBB_USERS_TABLE." 
    240 SET username = '".mysql_real_escape_string($username)."', email = '".$adresse_mail."', password = '".$password."'  
     240SET username = '".pwg_db_real_escape_string($username)."', email = '".$adresse_mail."', password = '".$password."'  
    241241WHERE id = ".$row['FluxBB_id']." 
    242242;"; 
  • extensions/Register_FluxBB/branches/2.2/language/en_UK/plugin.lang.php

    r5606 r6295  
    3232$lang['Confirm_true'] = ' --&gt; Delete confirmation'; 
    3333$lang['Confirm_false'] = ' --&gt; Confirmation mandatory before actions in audit'; 
    34 $lang['No_Reg_advise'] = '<b>About the registration of users on the forum FluxBB</b><br><br> 
    35   For easiest way for your users, I advise you to change 2 things:<br> 
    36   <b>* In FluxBB\'s administration panel, change "Allow new registrations" to NO (in: Options - Registration)</b><br><br> 
    37   <b>* Modify the file</b> : [FluxBBRoot]/lang/English/register.php by replacing the following line : 
    38   <div class="info">\'No new regs\'                             =>      \'This forum is not accepting new users.\'</div> 
    39   <b>with :</b> 
    40   <div class="info">\'No new regs\'                             =>      \'&lt;a href=&quot;http://[YourPiwigoRoot]/register.php&quot; &gt; Go here to register &lt;/a&gt;&lt;br/&gt;&lt;br/&gt;\'</div> 
    41   <br> 
    42   Of course you should also make the same change for other languages of your FluxBB forum.<br>'; 
    4334 
    4435$lang['save_config'] ='Settings saved'; 
     
    122113$lang['Mig_End'] = '<b>Migration done !</b>'; 
    123114$lang['Title_Tab'] = 'Register_FluxBB - Version: '; 
     115 
     116// --------- Starting below: New or revised $lang ---- from version 2.2.2 
     117$lang['No_Reg_advise'] = '<b>About the registration of users on the forum FluxBB</b><br><br> 
     118  For better integration, it is advisable to make the following 3 changes to your FluxBB forum (<b>Warning: These changes will disappear when updating the forum</b>):<br> 
     119  <b>* In FluxBB\'s administration panel, change "Allow new registrations" to NO (in: Options - Registration)</b> 
     120<br> 
     121<br> 
     122  <b>* Modify the file</b> : [FluxBBRoot]/lang/English/register.php by replacing the following line: 
     123  <div class="mod">\'No new regs\'                              =>      \'This forum is not accepting new users.\'</div> 
     124  <b>with :</b> 
     125  <div class="info">\'No new regs\'                             =>      \'&lt;a href=&quot;http://[YourPiwigoRoot]/register.php&quot; &gt; Go here to register &lt;/a&gt;&lt;br/&gt;&lt;br/&gt;\'</div> 
     126  <br> 
     127  Of course you should also make the same change for other languages of your FluxBB forum. 
     128<br> 
     129<br> 
     130  <b>* Modify the file</b> : [FluxBBRoot]/login.php by replacing the line 69: 
     131  <div class="mod">message($lang_login[\'Wrong user/pass\'].\'&lt;a href=&quot;login.php?action=forget&quot;&gt;</div> 
     132  <b>with :</b> 
     133  <div class="info">message($lang_login[\'Wrong user/pass\'].\'&lt;a href=&quot;../[VotreRacineDePiwigo]/identification.php&quot;&gt;</div> 
     134<br> 
     135  and at line 216: 
     136  <div class="mod">&lt;a href=&quot;login.php?action=forget&quot; tabindex=&quot;5&quot;><?php echo $lang_login[\'Forgotten pass\']</a></p></div> 
     137  <b>with :</b> 
     138  <div class="info">&lt;a href=&quot;../[VotreRacineDePiwigo]/identification.php&quot; tabindex=&quot;5&quot;><?php echo $lang_login[\'Forgotten pass\']</a></p></div> 
     139  <br>'; 
     140// --------- End: New or revised $lang ---- from version 2.2.2 
    124141?> 
  • extensions/Register_FluxBB/branches/2.2/language/fr_FR/plugin.lang.php

    r5606 r6295  
    3232$lang['Confirm_true'] = ' --&gt; Supprime les confirmations'; 
    3333$lang['Confirm_false'] = ' --&gt; Confirmation obligatoire avant action dans l\'audit'; 
    34 $lang['No_Reg_advise'] = '<b>A propos de l\'enregistrement d\'utilisateur sur le forum FluxBB</b><br><br> 
    35   Pour plus de facilité pour vos utilisateurs, je vous conseille de modifier 2 choses:<br> 
    36   <b>* modifier dans l\'interface d\'administration de FluxBB "Autoriser les nouvelles inscriptions" à NON ( dans : Options - Inscriptions )</b><br><br> 
    37   <b>* modifier le fichier</b> : [RacineDeFluxBB]/lang/French/register.php en remplacant la ligne suivante: 
    38   <div class="info">\'No new regs\'                             =>      \'Ce forum n\\\'accepte pas de nouveaux utilisateurs.\'</div> 
    39   <b>par :</b> 
    40   <div class="info">\'No new regs\'                             =>      \'&lt;a href=&quot;http://[VotreRacineDePiwigo]/register.php&quot; &gt; Cliquez ici pour vous inscrire &lt;/a&gt;&lt;br/&gt;&lt;br/&gt;\'</div> 
    41   <br> 
    42   Bien sur vous devez aussi faire le même changement pour les autres langues de votre forum FluxBB.<br>'; 
    4334 
    4435$lang['save_config'] ='Configuration enregistrée.'; 
     
    122113$lang['Mig_End'] = '<b>Migration finie !</b>'; 
    123114$lang['Title_Tab'] = 'Register_FluxBB - Version: '; 
     115 
     116 
     117// --------- Starting below: New or revised $lang ---- from version 2.2.2 
     118$lang['No_Reg_advise'] = '<b>A propos de l\'enregistrement d\'utilisateur sur le forum FluxBB</b><br><br> 
     119  Pour une meilleur intégration, il est conseille d\'apporter les 3 modifications suivantes à votre forum FluxBB (<b>Attention! Ces modifications disparaitront en cas de mise à jour du forum</b>):<br> 
     120  <b>* Modifier dans l\'interface d\'administration de FluxBB "Autoriser les nouvelles inscriptions" à NON ( dans : Options - Inscriptions )</b> 
     121<br> 
     122<br> 
     123  <b>* Modifier le fichier</b> : [RacineDeFluxBB]/lang/French/register.php en remplacant la ligne suivante: 
     124  <div class="mod">\'No new regs\'                              =>      \'Ce forum n\\\'accepte pas de nouveaux utilisateurs.\'</div> 
     125  <b>par :</b> 
     126  <div class="info">\'No new regs\'                             =>      \'&lt;a href=&quot;http://[VotreRacineDePiwigo]/register.php&quot; &gt; Cliquez ici pour vous inscrire &lt;/a&gt;&lt;br/&gt;&lt;br/&gt;\'</div> 
     127  <br> 
     128  Et reporter cette modification pour toutes les langues gérées sur votre forum. 
     129<br> 
     130<br> 
     131  <b>* Modifier le fichier</b> : [RacineDeFluxBB]/login.php en remplacant à la ligne 69: 
     132  <div class="mod">message($lang_login[\'Wrong user/pass\'].\'&lt;a href=&quot;login.php?action=forget&quot;&gt;</div> 
     133  <b>par :</b> 
     134  <div class="info">message($lang_login[\'Wrong user/pass\'].\'&lt;a href=&quot;../[VotreRacineDePiwigo]/identification.php&quot;&gt;</div> 
     135<br> 
     136  à la ligne 216: 
     137  <div class="mod">&lt;a href=&quot;login.php?action=forget&quot; tabindex=&quot;5&quot;><?php echo $lang_login[\'Forgotten pass\']</a></p></div> 
     138  <b>par :</b> 
     139  <div class="info">&lt;a href=&quot;../[VotreRacineDePiwigo]/identification.php&quot; tabindex=&quot;5&quot;><?php echo $lang_login[\'Forgotten pass\']</a></p></div> 
     140  <br>'; 
     141// --------- End: New or revised $lang ---- from version 2.2.2 
    124142?> 
  • extensions/Register_FluxBB/branches/2.2/main.inc.php

    r5658 r6295  
    22/* 
    33Plugin Name: Register FluxBB 
    4 Version: 2.2.1 
     4Version: 2.2.2 
    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 
     
    4646 
    47472.2.1     - 04/04/10  - Bug 1577 fixed : Multiple database support 
     48 
     492.2.2     - 23/05/10  - Bug 1674 fixed : Adding of mods for Fluxbb when users loose their password 
     50                      - Adding of German language (Thx to duke) 
    4851 
    4952-------------------------------------------------------------------------------- 
     
    167170;'; 
    168171 
    169           list($current_password) = mysql_fetch_row(pwg_query($query)); 
     172          list($current_password) = pwg_db_fetch_row(pwg_query($query)); 
    170173       
    171174          if ($conf['pass_convert']($_POST['password']) != $current_password) 
     
    186189;'; 
    187190 
    188         list($username) = mysql_fetch_row(pwg_query($query)); 
     191        list($username) = pwg_db_fetch_row(pwg_query($query)); 
    189192 
    190193        FluxBB_Updateuser($user['id'], stripslashes($username), sha1($_POST['use_new_pwd']), $_POST['mail_address']); 
Note: See TracChangeset for help on using the changeset viewer.