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/Packages/Common/Update.php

    r56 r63  
    33class UpdateManager
    44{
    5   var $Revision;
    6   var $Trace;
    7   var $VersionTable;
    8   /* @var Database */
    9   var $Database;
    10   var $InstallMethod;
     5  public int $Revision;
     6  public array $Trace;
     7  public string $VersionTable;
     8  public Database $Database;
     9  public string $InstallMethod;
    1110
    1211  function __construct()
     
    1918  }
    2019
    21   function GetDbVersion()
     20  function GetDbVersion(): ?int
    2221  {
    2322    $DbResult = $this->Database->select($this->VersionTable, '*', 'Id=1');
     
    2625  }
    2726
    28   function IsInstalled()
     27  function IsInstalled(): bool
    2928  {
    3029    $DbResult = $this->Database->query('SHOW TABLES LIKE "'.$this->VersionTable.'"');
     
    3231  }
    3332
    34   function IsUpToDate()
     33  function IsUpToDate(): bool
    3534  {
    3635    return $this->Revision <= $this->GetDbVersion();
    3736  }
    3837
    39   function Upgrade()
     38  function Upgrade(): string
    4039  {
    4140    $DbRevision = $this->GetDbVersion();
     
    5958  }
    6059
    61   function Install()
     60  function Install(): void
    6261  {
    6362    $InstallMethod = $this->InstallMethod;
    6463    $InstallMethod($this);
    65     $this->Update();
    6664  }
    6765
    68   function Uninstall()
     66  function Uninstall(): void
    6967  {
    70 
    7168  }
    7269
    73   function InsertSampleData()
     70  function InsertSampleData(): void
    7471  {
    7572    $InstallMethod = $this->InsertSampleDataMethod;
     
    7774  }
    7875
    79   function Execute($Query)
     76  function Execute(string $Query): DatabaseResult
    8077  {
    8178    echo($Query.';<br/>');
Note: See TracChangeset for help on using the changeset viewer.