Changeset 92


Ignore:
Timestamp:
Aug 15, 2013, 12:11:32 AM (11 years ago)
Author:
chronos
Message:
  • Fixed: Table view missing System parameter.
Location:
trunk/www
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/www

    • Property svn:ignore
      •  

        old new  
        11config.php
         2.buildpath
         3.project
         4.settings
  • trunk/www/Application/View/Backup.php

    r78 r92  
    3131      {
    3232        $Output = '<h4>Dostupné zálohy</h4>';
    33         $Table = new Table($this->ItemListFormClass);
     33        $Table = new Table($this->ItemListFormClass, $this->System);
    3434        $Table->OnRow = array($this, 'ShowListOnRow');
    3535        $Table->Definition['Table'] = '(SELECT * FROM `Backup` WHERE `Server` = '.$Server->Id.')';
  • trunk/www/Application/View/Client.php

    r78 r92  
    2929   
    3030    $Output = '<h4>Verze herního klienta</h4>';
    31     $Table = new Table($this->ItemListFormClass);
     31    $Table = new Table($this->ItemListFormClass, $this->System);
    3232    $Table->OnRow = array($this, 'ShowListOnRow');
    3333    $Table->LoadValuesFromDatabase($this->Database);
  • trunk/www/Application/View/Debug.php

    r78 r92  
    4545      {
    4646        $Output = '<h4>Ladící záznamy restartů</h4>';
    47         $Table = new Table($this->ItemListFormClass);
     47        $Table = new Table($this->ItemListFormClass, $this->System);
    4848        $Table->OnRow = array($this, 'ShowListOnRow');
    4949        $Table->Definition['Table'] = '(SELECT * FROM Debug WHERE Realm='.$_GET['Id'].')';
  • trunk/www/Application/View/Emulator.php

    r78 r92  
    3939   
    4040    $Output = '<h4>Seznam verzí emulátoru</h4>';
    41     $Table = new Table($this->ItemListFormClass);
     41    $Table = new Table($this->ItemListFormClass, $this->System);
    4242    $Table->Definition['Items']['Id'] = array('Type' => 'Hidden', 'Caption' => '', 'Default' => '');
    4343    $Table->LoadValuesFromDatabase($this->Database);
  • trunk/www/Application/View/Realm.php

    r78 r92  
    112112    //$Realm->UpdateServerList();
    113113    $Output = '<h4>Seznam světů</h4>';
    114     $Table = new Table($this->ItemListFormClass);
     114    $Table = new Table($this->ItemListFormClass, $this->System);
    115115    //$Table->OnRow = array($this, 'ShowRealmListOnRow');
    116116    $Table->Definition['Table'] = substr($Table->Definition['Table'], 0, -1).' WHERE `Realm`.`Server`='.$ServerId.')';
  • trunk/www/Application/View/Task.php

    r78 r92  
    2929   
    3030    $Output = '<h4>Fronta úloh</h4>';
    31     $Table = new Table($this->ItemListFormClass);
     31    $Table = new Table($this->ItemListFormClass, $this->System);
    3232    $Table->OnRow = array($this, 'ShowListOnRow');
    3333    $Table->Definition['Table'] = '(SELECT Id, (COALESCE(UNIX_TIMESTAMP(TimeEnd), UNIX_TIMESTAMP(NOW())) - UNIX_TIMESTAMP(TimeStart)) AS Duration, TimeCreate, Title, State FROM Task WHERE User='.$this->System->Modules['User']->User['Id'].' ORDER BY Id DESC)';
  • trunk/www/Application/View/Update.php

    r78 r92  
    1818        $Output = '<h4>Seznam dostupných aktulizací</h4>';
    1919        $Output .= 'Před provedením aktualizace bude server zastaven a provedena záloha databáze.';
    20         $Table = new Table('EmulatorList');
     20        $Table = new Table('EmulatorList', $this->System);
    2121        $Table->Definition['Table'] = substr($Table->Definition['Table'], 0, -1).' AND `Emulator`.`Revision` > '.$Server->Server['Database']['Emulator']['Revision'].' ORDER BY `Revision`)';
    2222        $Table->Definition['Items']['Id'] = array('Type' => 'Hidden', 'Caption' => '', 'Default' => '');
  • trunk/www/Base/Database.php

    r69 r92  
    1313  {
    1414    global $Config;
    15  
     15
    1616    if($Config['Web']['ShowSQLQuery'] == true)
    1717    {
  • trunk/www/Base/System.php

    r78 r92  
    8989  function __construct()
    9090  {
     91        global $Config;
     92       
    9193    // Change current directory to script location
    9294    $BaseDir = substr($_SERVER['SCRIPT_FILENAME'], 0, strrpos($_SERVER['SCRIPT_FILENAME'], '/'));
  • trunk/www/Base/Table.php

    r81 r92  
    6767 
    6868  function LoadValuesFromDatabase($Database)
    69   {   
     69  {            
    7070    $this->CheckOrder();
    7171    $OrderType = array('ASC', 'DESC');
     
    8383    $this->TotalRowCount = $DbRow[0];
    8484    if(array_key_exists('Page', $_GET)) $this->Page = $_GET['Page']; else $this->Page = 0;
    85     if($this->Page > ($this->TotalRowCount / $Config['Web']['TableRowPerPage'])) $this->Page = 0;
     85    if($this->Page > ($this->TotalRowCount / $this->System->Config['Web']['TableRowPerPage'])) $this->Page = 0;
    8686    $DbResult = $Database->query('SELECT * FROM '.$Table.' AS T ORDER BY T.'.$_GET['Column'].' '.$OrderType[$_GET['Order']].' LIMIT '.($this->Page * $this->Config['Web']['TableRowPerPage']).', '.$this->Config['Web']['TableRowPerPage']);
     87    //print_r(debug_backtrace());
    8788    while($DbRow = $DbResult->fetch_assoc())
    8889    {
  • trunk/www/SQL/Updates/75.sql

    r76 r92  
    1212  `SubGroup` int(11) default NULL,
    1313  KEY `Group` (`Group`),
    14   KEY `Operation` (`Action`),
     14  KEY `Operation` (`Operation`),
    1515  KEY `SubGroup` (`SubGroup`),
    1616  KEY `User` (`User`)
Note: See TracChangeset for help on using the changeset viewer.