Ignore:
Timestamp:
Mar 16, 2014, 11:15:43 AM (11 years ago)
Author:
chronos
Message:
  • Added: Module Redirection responsible for redirection of old pages to new valid address.
  • Fixed: Error on client version item display if id was not specified.
  • Fixed: Error on silent application module reregistration.
  • Removed: White space on end of lines in some files.
File:
1 edited

Legend:

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

    r790 r800  
    1313    $this->Dependencies = array('');
    1414  }
    15  
     15
    1616  function Start()
    1717  {
     
    3838                return($Output);
    3939        }
    40        
     40
    4141        function ShowItem()
    4242        {
    43      $YesNo = array('Ne', 'Ano');
    44      $DbResult = $this->System->Database->query('SELECT * FROM ClientVersion WHERE Id='.($_GET['id']*1));
    45      if($DbResult->num_rows > 0)
    46      {
    47          $Version = $DbResult->fetch_assoc();
    48    
    49      $Output = '<h3>'.T('Client version').'</h3>';
    50      $Output .= '<table class="BaseTable">'.
     43    if(array_key_exists('id', $_GET))
     44    {
     45      $YesNo = array('Ne', 'Ano');
     46      $DbResult = $this->System->Database->query('SELECT * FROM ClientVersion WHERE Id='.($_GET['id']*1));
     47      if($DbResult->num_rows > 0)
     48      {
     49        $Version = $DbResult->fetch_assoc();
     50
     51      $Output = '<h3>'.T('Client version').'</h3>';
     52      $Output .= '<table class="BaseTable">'.
    5153        '<tr><td>'.T('Version').'</td><td>'.$Version['Version'].'</td></tr>'.
    5254        '<tr><td>'.T('More information').'</td><td><a href="http://www.wowwiki.com/Patch_'.$Version['Version'].'">wowwiki.com'.
     
    5860        '</table>';
    5961        $Output .= '<div><a href="?">'.T('All versions list').'</a></div>';
    60         if($Version['Imported']) 
     62        if($Version['Imported'])
    6163          $Output .= '<div><a href="'.$this->System->Link('/progress/?Version='.$Version['Version']).'">'.T('Progress').'</a></div>';
    62      } else $Output = ShowMessage(T('Item not found'), MESSAGE_CRITICAL);
     64      } else $Output = ShowMessage(T('Item not found'), MESSAGE_CRITICAL);
     65    } else $Output = ShowMessage(T('Item not found'), MESSAGE_CRITICAL);
    6366                return($Output);
    6467        }
    65        
     68
    6669        function ShowList()
    67         {               
     70        {
    6871                $this->Title = T('Game version');
    6972    $DbResult = $this->System->Database->query('SELECT COUNT(*) FROM `ClientVersion`');
    7073    $DbRow = $DbResult->fetch_row();
    71     $PageList = GetPageList($DbRow[0]);   
     74    $PageList = GetPageList($DbRow[0]);
    7275
    7376    $Output = '<h3>'.T('Game version').'</h3>'.
     
    7578
    7679    $TableColumns = array(
    77       array('Name' => 'Version', 'Title' => T('Version')), 
    78       array('Name' => 'BuildNumber', 'Title' => T('Build')), 
    79       array('Name' => 'ReleaseDate', 'Title' => T('Release date')), 
    80       array('Name' => 'Title', 'Title' => T('Title')), 
     80      array('Name' => 'Version', 'Title' => T('Version')),
     81      array('Name' => 'BuildNumber', 'Title' => T('Build')),
     82      array('Name' => 'ReleaseDate', 'Title' => T('Release date')),
     83      array('Name' => 'Title', 'Title' => T('Title')),
    8184      array('Name' => 'Imported', 'Title' => T('Imported')),
    8285    );
     
    8487    $Output .= '<table class="BaseTable">'.
    8588      $Order['Output'];
    86      
     89
    8790    $YesNo = array('Ne', 'Ano');
    8891
     
    97100    $Output .= '</table>'.
    98101      $PageList['Output'];
    99     return($Output);       
     102    return($Output);
    100103  }
    101104}
Note: See TracChangeset for help on using the changeset viewer.