Ignore:
Timestamp:
Aug 11, 2013, 12:28:14 AM (11 years ago)
Author:
chronos
Message:
  • Opraveno: Chyba zjískání IP adresy klienta pro záznam chyb, pokud se obsluhuje chyba skriptu volaného z konzoly.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Log/Log.php

    r548 r564  
    5454      $UserId = $this->System->User->User['Id'];
    5555      else $UserId = NULL;
     56    if(array_key_exists('REMOTE_ADDR', $_SERVER)) $IPAddress = $_SERVER['REMOTE_ADDR'];
     57      else $IPAddress = '';
    5658    $this->Database->insert('Log', array('Time' => 'NOW()',
    5759      'User' => $UserId, 'Module' => $Module,
    58       'Operation' => $Operation, 'Value' => $Value, 'IPAddress' => $_SERVER['REMOTE_ADDR']));
     60      'Operation' => $Operation, 'Value' => $Value, 'IPAddress' => $IPAddress));
    5961  }
    6062}
Note: See TracChangeset for help on using the changeset viewer.