Ignore:
Timestamp:
Apr 6, 2020, 11:17:40 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Improved code format.
File:
1 edited

Legend:

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

    r681 r873  
    4949  function NewRecord($Module, $Operation, $Value = '')
    5050  {
    51     if(array_key_exists('User', $this->System->ModuleManager->Modules) and
     51    if (array_key_exists('User', $this->System->ModuleManager->Modules) and
    5252      array_key_exists('Id', $this->System->User->User))
    5353      $UserId = $this->System->User->User['Id'];
    5454      else $UserId = NULL;
    55     if(array_key_exists('REMOTE_ADDR', $_SERVER)) $IPAddress = $_SERVER['REMOTE_ADDR'];
     55    if (array_key_exists('REMOTE_ADDR', $_SERVER)) $IPAddress = $_SERVER['REMOTE_ADDR'];
    5656      else $IPAddress = '';
    5757    $this->Database->insert('Log', array('Time' => 'NOW()',
     
    6969    $Output = '';
    7070    $Items = array();
    71     if(array_key_exists('type', $_GET)) $Where = ' WHERE `Type` = "'.($_GET['type'] * 1).'"';
     71    if (array_key_exists('type', $_GET)) $Where = ' WHERE `Type` = "'.($_GET['type'] * 1).'"';
    7272      else $Where = '';
    7373    $sql = 'SELECT *, UNIX_TIMESTAMP(`Time`) AS `TimeCreate`, (SELECT `User`.`Name` FROM `User` WHERE `User`.`Id` = `Log`.`User`) AS `UserName`, `Time` FROM `Log`'.
    7474      $Where.' ORDER BY `Time` DESC LIMIT '.$Count;
    7575    $DbResult = $this->System->Database->query($sql);
    76     while($Line = $DbResult->fetch_assoc())
     76    while ($Line = $DbResult->fetch_assoc())
    7777    {
    7878      $Line['Value'] = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $Line['Value']);
     
    9696    $RSS->WebmasterEmail = $this->System->Config['Web']['AdminEmail'];
    9797    $RSS->Items = $Items;
    98     return($RSS->Generate());
     98    return ($RSS->Generate());
    9999  }
    100100}
Note: See TracChangeset for help on using the changeset viewer.