Ignore:
Timestamp:
Apr 7, 2020, 10:15:48 PM (5 years ago)
Author:
chronos
Message:
  • Modified: Improved code formatting.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Redirection/Redirection.php

    r861 r880  
    2424    Header($_SERVER['SERVER_PROTOCOL'].' 301 Moved Permanently');
    2525    Header('Location: '.$Location);
    26     return('<h3 align="center">'.T('').'</h3>');
     26    return '<h3 align="center">'.T('').'</h3>';
    2727  }
    2828
     
    3030  {
    3131    $Output = '';
    32     if(count($this->System->PathItems) > 0)
     32    if (count($this->System->PathItems) > 0)
    3333    {
    34       if($this->System->PathItems[0] == 'user.php') $Output = $this->Redirect($this->System->Link('/user/'));
    35       if($this->System->PathItems[0] == 'team.php') $Output = $this->Redirect($this->System->Link('/team/'));
    36       if($this->System->PathItems[0] == 'version.php') $Output = $this->Redirect($this->System->Link('/client-version/'));
    37       if($this->System->PathItems[0] == 'phpBB3') $Output = $this->Redirect($this->System->Link('/forum/'));
    38       if($this->System->PathItems[0] == 'phpbb3') $Output = $this->Redirect($this->System->Link('/forum/'));
    39       if($this->System->PathItems[0] == 'statistic.php') $Output = $this->Redirect($this->System->Link('/progress/'));
    40       if($this->System->PathItems[0] == 'register.php') $Output = $this->Redirect($this->System->Link('/registration/'));
    41       if($this->System->PathItems[0] == 'registrace.php') $Output = $this->Redirect($this->System->Link('/registration/'));
    42       if($this->System->PathItems[0] == 'dictionary.php') $Output = $this->Redirect($this->System->Link('/dictionary/'));
    43       if($this->System->PathItems[0] == 'download-addon.php') $Output = $this->Redirect($this->System->Link('/download/'));
    44       if($this->System->PathItems[0] == 'banners.php') $Output = $this->Redirect($this->System->Link('/referrer/'));
    45       if($this->System->PathItems[0] == 'download.php') $Output = $this->Redirect($this->System->Link('/download/'));
    46       if($this->System->PathItems[0] == 'serverlist.php') $Output = $this->Redirect($this->System->Link('/server/'));
    47       if($this->System->PathItems[0] == 'info.php') $Output = $this->Redirect($this->System->Link('/info/'));
    48       if($this->System->PathItems[0] == 'userlist.php') $Output = $this->Redirect($this->System->Link('/users/'));
    49       if($this->System->PathItems[0] == 'promotion.php') $Output = $this->Redirect($this->System->Link('/promotion/'));
    50       if($this->System->PathItems[0] == 'log.php') $Output = $this->Redirect($this->System->Link('/log/'));
    51       if(count($this->System->PathItems) > 1)
     34      if ($this->System->PathItems[0] == 'user.php') $Output = $this->Redirect($this->System->Link('/user/'));
     35      if ($this->System->PathItems[0] == 'team.php') $Output = $this->Redirect($this->System->Link('/team/'));
     36      if ($this->System->PathItems[0] == 'version.php') $Output = $this->Redirect($this->System->Link('/client-version/'));
     37      if ($this->System->PathItems[0] == 'phpBB3') $Output = $this->Redirect($this->System->Link('/forum/'));
     38      if ($this->System->PathItems[0] == 'phpbb3') $Output = $this->Redirect($this->System->Link('/forum/'));
     39      if ($this->System->PathItems[0] == 'statistic.php') $Output = $this->Redirect($this->System->Link('/progress/'));
     40      if ($this->System->PathItems[0] == 'register.php') $Output = $this->Redirect($this->System->Link('/registration/'));
     41      if ($this->System->PathItems[0] == 'registrace.php') $Output = $this->Redirect($this->System->Link('/registration/'));
     42      if ($this->System->PathItems[0] == 'dictionary.php') $Output = $this->Redirect($this->System->Link('/dictionary/'));
     43      if ($this->System->PathItems[0] == 'download-addon.php') $Output = $this->Redirect($this->System->Link('/download/'));
     44      if ($this->System->PathItems[0] == 'banners.php') $Output = $this->Redirect($this->System->Link('/referrer/'));
     45      if ($this->System->PathItems[0] == 'download.php') $Output = $this->Redirect($this->System->Link('/download/'));
     46      if ($this->System->PathItems[0] == 'serverlist.php') $Output = $this->Redirect($this->System->Link('/server/'));
     47      if ($this->System->PathItems[0] == 'info.php') $Output = $this->Redirect($this->System->Link('/info/'));
     48      if ($this->System->PathItems[0] == 'userlist.php') $Output = $this->Redirect($this->System->Link('/users/'));
     49      if ($this->System->PathItems[0] == 'promotion.php') $Output = $this->Redirect($this->System->Link('/promotion/'));
     50      if ($this->System->PathItems[0] == 'log.php') $Output = $this->Redirect($this->System->Link('/log/'));
     51      if (count($this->System->PathItems) > 1)
    5252      {
    53         if(($this->System->PathItems[0] == 'team') and ($this->System->PathItems[1] == 'userlist.php'))
     53        if (($this->System->PathItems[0] == 'team') and ($this->System->PathItems[1] == 'userlist.php'))
    5454          $Output = $this->Redirect($this->System->Link('/userlist/'));
    55         if(($this->System->PathItems[0] == 'dictionary') and ($this->System->PathItems[1] == 'user.php'))
     55        if (($this->System->PathItems[0] == 'dictionary') and ($this->System->PathItems[1] == 'user.php'))
    5656          $Output = $this->Redirect($this->System->Link('/user/'));
    57         if(($this->System->PathItems[0] == 'forum') and ($this->System->PathItems[1] == 'index.php'))
     57        if (($this->System->PathItems[0] == 'forum') and ($this->System->PathItems[1] == 'index.php'))
    5858          $Output = $this->Redirect($this->System->Link('/forum/'));
    59         if(($this->System->PathItems[0] == 'phpbb3') and ($this->System->PathItems[1] == 'index.php'))
     59        if (($this->System->PathItems[0] == 'phpbb3') and ($this->System->PathItems[1] == 'index.php'))
    6060          $Output = $this->Redirect($this->System->Link('/forum/'));
    61         if(($this->System->PathItems[0] == 'phpBB3') and ($this->System->PathItems[1] == 'index.php'))
     61        if (($this->System->PathItems[0] == 'phpBB3') and ($this->System->PathItems[1] == 'index.php'))
    6262          $Output = $this->Redirect($this->System->Link('/forum/'));
    63         if(($this->System->PathItems[0] == 'download') and ($this->System->PathItems[1] == 'ceske_fonty_do_wow.zip'))
     63        if (($this->System->PathItems[0] == 'download') and ($this->System->PathItems[1] == 'ceske_fonty_do_wow.zip'))
    6464          $Output = $this->Redirect($this->System->Link('/files/ceske_fonty_do_wow.zip'));
    6565      }
    6666    }
    67     return($Output);
     67    return $Output;
    6868  }
    6969}
Note: See TracChangeset for help on using the changeset viewer.