Ignore:
Timestamp:
Jan 27, 2014, 10:01:33 PM (10 years ago)
Author:
chronos
Message:
  • Added: Config parameter Description which is used for general web description included in meta section of HTML page and usable by modules.
  • Fixed: Error in RSS channels if no items loaded.
  • Modified: Log real last URI instead on script name in online users list in database.
  • Fixed: Serialization error in Database class if exception was raised.
  • Modified: Items in RSS channel of forum links to exact forum topics.
File:
1 edited

Legend:

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

    r725 r765  
    2929        $this->System->RegisterPage('progress', 'PageProgress');
    3030    $this->System->RegisterPage('TranslationList.php', 'PageTranslationList');
    31     $this->System->ModuleManager->Modules['News']->RegisterRSS(array('Title' => 'Poslední překlady',
     31    $this->System->ModuleManager->Modules['News']->RegisterRSS(array('Title' => T('Last translations'),
    3232      'Channel' => 'translation', 'Callback' => array($this, 'ShowRSS'), 'Permission' => LICENCE_ANONYMOUS));
    3333    $this->System->RegisterMenuItem(array(
     
    5959  function ShowRSS()
    6060  {
     61        $Items = array();
    6162    $DbResult = $this->Database->query('SELECT UNIX_TIMESTAMP(`Date`) AS `Date`, `User`.`Name` AS `UserName`, `Text` FROM `Log` '.
    6263    'JOIN `User` ON `User`.`ID` = `Log`.`User` WHERE `Type` = 1 ORDER BY `Date` DESC LIMIT 100');
     
    6566      $Items[] = array
    6667      (
    67           'Title' => strip_tags($DbRow['Text'].' ('.$DbRow['UserName'].')'),
    68           'Link' => 'http://'.$this->System->Config['Web']['Host'].$this->System->Link('/'),
    69           'Description' => $DbRow['Text'],
    70           'Time' => $DbRow['Date'],
     68        'Title' => strip_tags($DbRow['Text'].' ('.$DbRow['UserName'].')'),
     69        'Link' => 'http://'.$this->System->Config['Web']['Host'].$this->System->Link('/'),
     70        'Description' => $DbRow['Text'],
     71        'Time' => $DbRow['Date'],
    7172      );
    7273    }
    7374    $Output = GenerateRSS(array
    74         (
    75             'Title' => 'WoW překlad - Poslední překlady',
    76             'Link' => 'http://'.$this->System->Config['Web']['Host'].$this->System->Link('/'),
    77             'Description' => 'Překlad textů WoW',
    78             'WebmasterEmail' => $this->System->Config['Web']['AdminEmail'],
    79             'Items' => $Items,
    80                 ));
     75    (
     76      'Title' => $this->System->Config['Web']['Title'].' - '.T('Last translations'),
     77      'Link' => 'http://'.$this->System->Config['Web']['Host'].$this->System->Link('/'),
     78      'Description' => $this->System->Config['Web']['Description'],
     79      'WebmasterEmail' => $this->System->Config['Web']['AdminEmail'],
     80      'Items' => $Items,
     81                ));
    8182    return($Output);
    8283  }
Note: See TracChangeset for help on using the changeset viewer.