Ignore:
Timestamp:
Apr 14, 2015, 10:20:16 PM (10 years ago)
Author:
chronos
Message:
  • Removed: Spaces on end of line.
  • Modified: Tabs converted to spaces.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/System.php

    r737 r738  
    8383  function ShowPage()
    8484  {
    85         /* @var $Page Page */
     85    /* @var $Page Page */
    8686    $ClassName = $this->SearchPage($this->PathItems, $this->Pages);
    8787    if($ClassName != '')
     
    118118  function ShowAction($Id)
    119119  {
    120         $Output = '';
     120    $Output = '';
    121121    $DbResult = $this->Database->query('SELECT *, `ActionIcon`.`Name` AS `Icon` FROM `Action` '.
    122122      'LEFT JOIN `ActionIcon` ON `ActionIcon`.`Id` = `Action`.`Icon` '.
     
    136136  function RunCommon()
    137137  {
    138         global $Database, $ScriptTimeStart, $ConfigFileName, $Mail, $Type,
     138    global $Database, $ScriptTimeStart, $ConfigFileName, $Mail, $Type,
    139139      $DatabaseRevision, $Config;
    140140
     
    195195  function RunCommandLine()
    196196  {
    197         global $argv;
    198 
    199         $this->RunCommon();
    200         if(count($argv) > 1)
    201         {
     197    global $argv;
     198
     199    $this->RunCommon();
     200    if(count($argv) > 1)
     201    {
    202202      if(array_key_exists($argv[1], $this->CommandLine))
    203203      {
    204         $Command = $this->CommandLine[$argv[1]];
    205         if(is_string($Command['Callback'][0]))
    206               {
    207                 $Class = new $Command['Callback'][0]($this);
    208                 $Output = $Class->$Command['Callback'][1]();
    209               } else $Output = call_user_func($Command['Callback']);
    210               echo($Output);
     204        $Command = $this->CommandLine[$argv[1]];
     205        if(is_string($Command['Callback'][0]))
     206        {
     207          $Class = new $Command['Callback'][0]($this);
     208          $Output = $Class->$Command['Callback'][1]();
     209        } else $Output = call_user_func($Command['Callback']);
     210        echo($Output);
    211211      } else echo('Command "'.$argv[1].'" not supported.'."\n");
    212         } else echo('No command was given as parameter'."\n");
     212    } else echo('No command was given as parameter'."\n");
    213213  }
    214214
    215215  function RegisterCommandLine($Name, $Callback)
    216216  {
    217         $this->CommandLine[$Name] = array('Name' => $Name, 'Callback' => $Callback);
     217    $this->CommandLine[$Name] = array('Name' => $Name, 'Callback' => $Callback);
    218218  }
    219219
    220220  function RegisterPageBar($Name)
    221221  {
    222         $this->Bars[$Name] = array();
     222    $this->Bars[$Name] = array();
    223223  }
    224224
    225225  function UnregisterPageBar($Name)
    226226  {
    227         unset($this->Bars[$Name]);
     227    unset($this->Bars[$Name]);
    228228  }
    229229
    230230  function RegisterPageBarItem($BarName, $ItemName, $Callback)
    231231  {
    232         $this->Bars[$BarName][$ItemName] = $Callback;
     232    $this->Bars[$BarName][$ItemName] = $Callback;
    233233  }
    234234}
Note: See TracChangeset for help on using the changeset viewer.