Changeset 12


Ignore:
Timestamp:
Apr 7, 2020, 9:14:24 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Small updates.
Location:
Common
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Common/Common.php

    r11 r12  
    4949  var $Page;
    5050
    51   function __construct()
     51  function __construct($System)
    5252  {
    53     global $System;
    54 
    5553    $this->ItemPerPage = $System->Config['Web']['ItemsPerPage'];
    5654    $this->Around = $System->Config['Web']['VisiblePagingItems'];
  • Common/Database.php

    r10 r12  
    22
    33// Extended database class
    4 // Date: 2016-01-11
     4// Date: 2020-04-07
    55
    66function microtime_float()
     
    9393    if (!$this->Connected()) throw new Exception(T('Not connected to database'));
    9494    if (($this->ShowSQLQuery == true) or ($this->LogSQLQuery == true)) $QueryStartTime = microtime_float();
    95     $this->LastQuery = $Query;
    96     //echo('a'.$this->ShowSQLQuery.'<'.$QueryStartTime.', '.microtime_float());
     95    $this->LastQuery = $Query;   
    9796    if (($this->ShowSQLQuery == true) or ($this->LogSQLQuery == true))
    9897      $Duration = ' ; '.round(microtime_float() - $QueryStartTime, 4). ' s';
  • Common/RSS.php

    r10 r12  
    1212  function __construct()
    1313  {
    14     $this->Charset = 'utf8';
     14    $this->Charset = 'utf-8';
    1515    $this->Items = array();
    1616  }
     
    1818  function Generate()
    1919  {
     20    Header('Content-Type: text/xml; charset=utf-8');
    2021    $Result = '<?xml version="1.0" encoding="'.$this->Charset.'" ?>'."\n". //<?
    21   '<rss version="2.0">'."\n".
    22   "  <channel>\n".
    23   "    <title>".$this->Title."</title>\n".
    24   "    <link>".$this->Link."</link>\n".
    25   "    <description>".$this->Description."</description>\n".
    26   "    <language>cs</language>\n".
    27   "    <webMaster>".$this->WebmasterEmail."</webMaster>\n".
    28   "    <pubDate>".date('r')."</pubDate>\n".
    29   "    <ttl>20</ttl>\n";
     22      '<rss version="2.0">'."\n".
     23      "  <channel>\n".
     24      "    <title>".$this->Title."</title>\n".
     25      "    <link>".$this->Link."</link>\n".
     26      "    <description>".$this->Description."</description>\n".
     27      "    <language>cs</language>\n".
     28      "    <webMaster>".$this->WebmasterEmail."</webMaster>\n".
     29      "    <pubDate>".date('r')."</pubDate>\n".
     30      "    <ttl>20</ttl>\n";
    3031    foreach ($this->Items as $Item)
    3132    {
     
    3334        '      <title>'.htmlspecialchars($Item['Title'])."</title>\n".
    3435        '      <description>'.htmlspecialchars($Item['Description'])."</description>\n".
    35   '      <pubDate>'.date('r',$Item['Time'])."</pubDate>\n".
    36   '      <link>'.$Item['Link']."</link>\n".
     36        '      <pubDate>'.date('r',$Item['Time'])."</pubDate>\n".
     37        '      <link>'.$Item['Link']."</link>\n".
    3738        "    </item>\n";
    3839    }
  • Common/Table.php

    r10 r12  
    9898  var $Style;
    9999
    100   function __construct()
     100  function __construct($System)
    101101  {
    102     global $System;
    103 
    104102    $this->Columns = array();
    105103    $this->Table = new TableMemory();
Note: See TracChangeset for help on using the changeset viewer.