Changeset 595


Ignore:
Timestamp:
Nov 3, 2013, 11:39:59 PM (11 years ago)
Author:
chronos
Message:
  • Upraveno: Zahrnutí konfiguračního souboru přesunuto do aplikačního souboru z globálního obecného.
  • Upraveno: V modulu Setup použití již existující instance UpdateManager.
  • Opraveno: Chybné vracení pole aktualizací.
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/System.php

    r593 r595  
    11<?php
     2
     3$ConfigFileName = dirname(__FILE__).'/../Config/Config.php';
     4if(file_exists($ConfigFileName)) include_once($ConfigFileName);
    25
    36include_once(dirname(__FILE__).'/../Common/Application.php');
  • trunk/Application/Version.php

    r594 r595  
    11<?php
    22
    3 $Revision = 594; // Subversion revision
     3$Revision = 595; // Subversion revision
    44$DatabaseRevision = 591; // SQL structure revision
    5 $ReleaseTime = '2013-11-02';
     5$ReleaseTime = '2013-11-03';
  • trunk/Common/Global.php

    r593 r595  
    66$Database = NULL;
    77     
    8 $ConfigFileName = dirname(__FILE__).'/../config.php';
    9 if(file_exists($ConfigFileName)) include_once($ConfigFileName);
    108include_once(dirname(__FILE__).'/VarDumper.php');
    119include_once(dirname(__FILE__).'/Base.php');
  • trunk/Common/Setup/Setup.php

    r594 r595  
    6969          global $ConfigDefinition, $DatabaseRevision, $Config, $Updates;
    7070         
     71          $this->UpdateManager = $this->System->Setup->UpdateManager;
    7172          $DefaultConfig = new DefaultConfig();
    7273          $this->ConfigDefinition = $DefaultConfig->Get();
    7374          $this->DatabaseRevision = $DatabaseRevision;
    74           $this->Config = &$Config;
    75           $Updates = new Updates();
    76           $this->Updates = $Updates->Get();
     75          $this->Config = &$Config;
    7776
    7877          $Output = '';
     
    8584        $Output .= $this->LoginPanel();
    8685      } else
    87       {
    88         $this->UpdateManager = new UpdateManager();
    89         $this->UpdateManager->Database = $this->Database;
    90         $this->UpdateManager->Revision = $this->DatabaseRevision;
    91         $this->UpdateManager->Trace = $this->Updates;
    92         $this->UpdateManager->InstallMethod = 'FullInstall';
    93  
     86      { 
    9487        if(array_key_exists('action', $_GET)) $Action = $_GET['action'];
    9588          else $Action = '';
     
    322315  function CreateConfig($Config)
    323316  {
    324  
    325317    $Output = "<?php\n\n".
    326318        "\$IsDeveloper = in_array(\$_SERVER['REMOTE_ADDR'], array('127.0.0.1'));\n\n";
     
    378370    // Check database persistence structure
    379371    $this->UpdateManager = new UpdateManager();
    380     $this->UpdateManager->Database = &$this->Database;
     372    $this->UpdateManager->Database = $this->Database;
    381373    $this->UpdateManager->Revision = $DatabaseRevision;
     374    $Updates = new Updates();
     375    $this->UpdateManager->Trace = $Updates->Get();
     376    $this->UpdateManager->InstallMethod = 'FullInstall';
    382377  } 
    383378 
  • trunk/Common/Setup/Updates.php

    r592 r595  
    453453  function Get()
    454454  {
    455     return($Updates = array(
     455    return(array(
    456456  491 => array('Revision' => 493, 'Function' => 'UpdateTo493'),
    457457  493 => array('Revision' => 494, 'Function' => 'UpdateTo494'),
     
    478478  584 => array('Revision' => 591, 'Function' => 'UpdateTo591'),
    479479));
    480     }
    481 }
     480  }
     481}
Note: See TracChangeset for help on using the changeset viewer.