Ignore:
Timestamp:
Feb 16, 2011, 7:28:44 PM (13 years ago)
Author:
Eric
Message:

Bug 2192 fixed
Bug 2045 improvement

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/NBC_UserAdvManager/trunk/admin/UAM_admin.php

    r9177 r9253  
    105105  case 'global':
    106106
    107         if (isset($_POST['submit']) and isset($_POST['UAM_Mail_Info']) and isset($_POST['UAM_Username_Char']) and isset($_POST['UAM_Confirm_Mail']) and isset($_POST['UAM_No_Comment_Anonymous']) and isset($_POST['UAM_Password_Enforced']) and isset($_POST['UAM_AdminPassword_Enforced']) and isset($_POST['UAM_GhostUser_Tracker']) and isset($_POST['UAM_Admin_ConfMail']) and isset($_POST['UAM_RedirToProfile']) and isset($_POST['UAM_GTAuto']) and isset($_POST['UAM_CustomPasswRetr']))
     107        if (isset($_POST['submit']) and isset($_POST['UAM_Mail_Info']) and isset($_POST['UAM_Username_Char']) and isset($_POST['UAM_Confirm_Mail']) and isset($_POST['UAM_No_Comment_Anonymous']) and isset($_POST['UAM_Password_Enforced']) and isset($_POST['UAM_AdminPassword_Enforced']) and isset($_POST['UAM_GhostUser_Tracker']) and isset($_POST['UAM_Admin_ConfMail']) and isset($_POST['UAM_RedirToProfile']) and isset($_POST['UAM_GTAuto']) and isset($_POST['UAM_GTAutoMail']) and isset($_POST['UAM_CustomPasswRetr']) and isset($_POST['UAM_USRAuto']) and isset($_POST['UAM_USRAutoMail']))
    108108  {
    109109
     
    551551                }
    552552
    553     // Avoid jquery accordeon menu bug when there is no users to display
    554     if (empty($visible_user_list))
     553    // Avoid jquery accordion menu bug when there is no users to display
     554    // Pending because it causes php warnings when no users are listed (when $visible_user_list[] is empty)
     555    /*if (empty($visible_user_list))
    555556    {
    556557      $visible_user_list[] = null;
    557     }
     558    }*/
    558559
    559560                foreach ($visible_user_list as $local_user)
     
    10291030
    10301031    // Avoid jquery accordeon menu bug when there is no users to display
    1031     if (empty($visible_user_list))
     1032    // Pending because it causes php warnings when no users are listed (when $visible_user_list[] is empty)
     1033    /*if (empty($visible_user_list))
    10321034    {
    10331035      $visible_user_list[] = null;
    1034     }
     1036    }*/
    10351037
    10361038                foreach ($visible_user_list as $local_user)
     
    13531355                }
    13541356   
    1355     if (isset($_POST['GhostTracker_Init']))
    1356     {
    1357       //Reset is only allowed for admins !
    1358       if (is_admin())
    1359       {
    1360         $query1 = '
     1357    if (isset($_POST['GhostTracker_Init']) and is_admin()) //Reset is only allowed for admins !
     1358    {
     1359      $query1 = '
    13611360SELECT *
    13621361  FROM '.USER_LASTVISIT_TABLE.';';
    13631362
    1364         $count = pwg_db_num_rows(pwg_query($query1));
    1365 
    1366         if ($count <> 0)
    1367         {
    1368           $query = '
     1363      $count = pwg_db_num_rows(pwg_query($query1));
     1364
     1365      if ($count <> 0)
     1366      {
     1367        $query = '
    13691368SELECT DISTINCT u.id,
    13701369                ui.status AS status
     
    13791378;';
    13801379
    1381           $result = pwg_query($query);
     1380        $result = pwg_query($query);
    13821381         
    1383           while ($row = pwg_db_fetch_assoc($result))
    1384           {
    1385             list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
     1382        while ($row = pwg_db_fetch_assoc($result))
     1383        {
     1384          list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
    13861385           
    1387             $query = "
     1386          $query = "
    13881387INSERT INTO ".USER_LASTVISIT_TABLE." (user_id, lastvisit, reminder)
    13891388VALUES ('".$row['id']."','".$dbnow."','false')
    13901389;";
    1391             pwg_query($query);
    1392           }
     1390          pwg_query($query);
    13931391        }
    1394         else if ($count == 0)
    1395         {
    1396           $query = '
     1392      }
     1393      else if ($count == 0)
     1394      {
     1395        $query = '
    13971396SELECT DISTINCT u.id,
    13981397                ui.status AS status
     
    14061405;';
    14071406
    1408           $result = pwg_query($query);
     1407        $result = pwg_query($query);
    14091408         
    1410           while($row = pwg_db_fetch_assoc($result))
    1411           {
    1412             list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
     1409        while($row = pwg_db_fetch_assoc($result))
     1410        {
     1411          list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
    14131412           
    1414             $query = "
     1413          $query = "
    14151414INSERT INTO ".USER_LASTVISIT_TABLE." (user_id, lastvisit, reminder)
    14161415VALUES ('".$row['id']."','".$dbnow."','false')
    14171416;";
    1418             pwg_query($query);
    1419           }
     1417          pwg_query($query);
    14201418        }
     1419      }
    14211420       
    1422         array_push($page['infos'], l10n('UAM_GhostTracker_Init_OK'));
    1423       }
     1421      array_push($page['infos'], l10n('UAM_GhostTracker_Init_OK'));
    14241422    }
    14251423
Note: See TracChangeset for help on using the changeset viewer.