Ignore:
Timestamp:
Jun 2, 2013, 9:14:50 PM (11 years ago)
Author:
chronos
Message:
  • Opraveno: Import aktualit z jiných webů se odkazoval na dřívější globální proměnnou $Database.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/News/ImportKinoVatra.php

    r533 r542  
    2727  $Date = TimeToMysqlDateTime(strtotime($Date));
    2828 
    29   $Query = 'SELECT Id FROM News WHERE (`Title`="'.$Database->real_escape_string($Title).'") AND (`Category`='.$Category.') AND (`Content` = "'.$Database->real_escape_string($Description).'") AND (`Link` = "'.$Database->real_escape_string($Link).'")';
    30   $DbResult = $Database->query($Query);
     29  $Query = 'SELECT Id FROM News WHERE (`Title`="'.$System->Database->real_escape_string($Title).'") AND (`Category`='.$Category.') AND (`Content` = "'.$System->Database->real_escape_string($Description).'") AND (`Link` = "'.$System->Database->real_escape_string($Link).'")';
     30  $DbResult = $System->Database->query($Query);
    3131  if($DbResult->num_rows == 0)
    3232  {
    33     $Database->insert('News', array('Title' => $Title, 'Date' => $Date, 'Author' => $Author, 'Category' => $Category, 'Content' => $Description, 'Link' => $Link));
    34     echo($Database->insert_id.',');
     33    $System->Database->insert('News', array('Title' => $Title, 'Date' => $Date, 'Author' => $Author, 'Category' => $Category, 'Content' => $Description, 'Link' => $Link));
     34    echo($System->Database->insert_id.',');
    3535  }
    3636}
Note: See TracChangeset for help on using the changeset viewer.