Ignore:
Timestamp:
Sep 22, 2023, 11:55:38 PM (15 months ago)
Author:
chronos
Message:
  • Added: Store request URL into Log table.
  • Fixed: Some warnings for invalid inputs.
File:
1 edited

Legend:

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

    r949 r957  
    3636  }
    3737
     38  function GetRequestURI(): string
     39  {
     40    if (array_key_exists('REQUEST_URI', $_SERVER)) return $_SERVER['REQUEST_URI'];
     41      else return $_SERVER['PHP_SELF'];
     42  }
     43
    3844  function NewRecord(string $Module, string $Operation, string $Value = ''): void
    3945  {
     
    4652    $this->Database->insert('Log', array('Time' => 'NOW()',
    4753      'User' => $UserId, 'Module' => $Module,
    48       'Operation' => $Operation, 'Value' => $Value, 'IPAddress' => $IPAddress));
     54      'Operation' => $Operation, 'Value' => $Value, 'IPAddress' => $IPAddress, 'URL' => $this->GetRequestURI()));
    4955  }
    5056
Note: See TracChangeset for help on using the changeset viewer.