Ignore:
Timestamp:
Aug 3, 2021, 11:20:41 AM (3 years ago)
Author:
chronos
Message:
  • Modified: Used explicit types where possible for better error reporting.
  • Modified: Updated Common packaged to newer version.
  • Modified: Simplified pages title.
  • Added: Simple keyword based spam filter for meet items.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1 nbproject
        2 Config.php
        31.settings
        42.project
        53.buildpath
         4.htaccess
  • trunk/Modules/Event/Event.php

    r61 r63  
    33include_once(dirname(__FILE__).'/Import/JoeClub.php');
    44
    5 function GetDefaultEventFilter($Table = '')
     5function GetDefaultEventFilter(string $Table = ''): string
    66{
    77  global $Config;
     
    99  if ($Table != '') $Table = $Table.'.';
    1010
    11   return '('.$Table.'Hidden=0) AND ('.$Table.'TimeFrom > "'.TimeToMysqlDateTime(time() - $Config['EventInterval']).'")';
     11  return '('.$Table.'Hidden=0) AND ('.$Table.'TimeFrom > "'.TimeToMysqlDateTime(time() - (int)$Config['EventInterval']).'")';
    1212}
    1313
    14 function ReduceSpaces($Content)
     14function ReduceSpaces(string $Content): string
    1515{
    1616  while (strpos($Content, '  ') !== false) $Content = str_replace('  ', ' ', $Content);
     
    1818}
    1919
    20 function RemoveLines($Content)
     20function RemoveLines(string $Content): string
    2121{
    2222  while (strpos($Content, "\n") !== false) $Content = str_replace("\n", ' ', $Content);
     
    2424}
    2525
    26 function RemoveTabs($Content)
     26function RemoveTabs(string $Content): string
    2727{
    2828  while (strpos($Content, "\t") !== false) $Content = str_replace("\t", '', $Content);
     
    3434  public $Database;
    3535
    36   function Parse($Id = null)
     36  function Parse(int $Id = null): string
    3737  {
    3838    $Output = '';
     
    7373  }
    7474
    75   function Import()
     75  function Import(): string
    7676  {
    7777    $this->AddedCount = 0;
     
    9999  var $Price = 0;
    100100
    101   function AddIfNotExist($TimeInterval = 0, $CompareTime = true, $CompareRemoteId = false)
     101  function AddIfNotExist(int $TimeInterval = 0, bool $CompareTime = true, bool $CompareRemoteId = false): int
    102102  {
    103103    $Where = '(`Description` = "'.$this->Database->real_escape_string($this->Description).'") AND '.
Note: See TracChangeset for help on using the changeset viewer.