Ignore:
Timestamp:
Aug 15, 2013, 11:17:26 PM (11 years ago)
Author:
chronos
Message:
  • Fixed: System variable as parameter to constructors of descendents of Module class.
  • Removed: End PHP mark "?>" from all files.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/Application/Model/Task.php

    r78 r93  
    77  var $TempScript = 'temp/wowhosting_script.sh';
    88 
    9   function __construct($Database)
     9  function __construct($System)
    1010  {
    11     $this->Database = $Database;
     11        parent::__construct($System);   
    1212  }
    1313 
    1414  function Add($Title, $Task)
    1515  {
    16     global $System;
    17    
    1816    $CommandList = implode("\n", $Task)."\n";
    19     $this->Database->insert('Task', array('User' => $System->Modules['User']->User['Id'], 'Title' => $Title, 'TimeCreate' => 'NOW()', 'CommandList' => $CommandList));
     17    $this->Database->insert('Task', array('User' => $this->System->Modules['User']->User['Id'], 'Title' => $Title, 'TimeCreate' => 'NOW()', 'CommandList' => $CommandList));
    2018  }
    2119
    2220  function ProcessAll()
    2321  {
    24     global $Config;
    25    
    26     chdir($Config['BaseDir']);
     22    chdir($this->Config['BaseDir']);
    2723    $DbResult = $this->Database->query('SELECT * FROM Task WHERE State = 0 ORDER BY Id,TimeCreate ASC');
    2824    while($Task = $DbResult->fetch_assoc())
     
    5955  }
    6056}
    61 
    62 ?>
Note: See TracChangeset for help on using the changeset viewer.