Ignore:
Timestamp:
Mar 8, 2010, 1:54:55 PM (15 years ago)
Author:
george
Message:
  • Opraveno: Import export lua souborů. Při importu převádět lomítkovou notaci do databáze na funkční znaky \n => odřádkování, \" => uvozovky. V databázi musí být uloženo správně bez lomítek.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/export/export.php

    r349 r363  
    297297          $Value['ShortCut'] = trim($LineParts2[0]);
    298298          $Value['Text'] = substr(trim($LineParts2[1]), 1, -1);
    299           $Value['Comment'] = addslashes(substr(trim($LineParts[1]), 3));
    300 
    301           $Query = 'SELECT * FROM (SELECT * FROM '.$Group['TablePrefix'].' WHERE (Complete = 1) AND '.$this->WhereLang.' AND '.$this->WhereUsers.' AND (ShortCut="'.$Value['ShortCut'].'") AND (VersionStart <= '.$this->ClientVersion['BuildNumber'].') AND (VersionEnd >= '.$this->ClientVersion['BuildNumber'].')'.$this->OrderByUserList.') AS T GROUP BY T.entry';
     299          $Value['Comment'] = substr(trim($LineParts[1]), 3);
     300
     301          $Query = 'SELECT * FROM (SELECT * FROM `'.$Group['TablePrefix'].'` WHERE (`Complete` = 1) AND '.$this->WhereLang.' AND '.$this->WhereUsers.' AND (`ShortCut`="'.$Value['ShortCut'].'") AND (`VersionStart` <= '.$this->ClientVersion['BuildNumber'].') AND (`VersionEnd` >= '.$this->ClientVersion['BuildNumber'].')'.$this->OrderByUserList.') AS `T` GROUP BY `T`.`entry`';
    302302          //echo($Query);
    303303          $DbResult2 = $this->Database->query($Query);
     
    305305          {
    306306            $DbRow = $DbResult2->fetch_assoc();
    307             $Value['Text'] = $DbRow['Text'];
    308             $Value['Comment'] = $DbRow['Comment'];
     307            $Value['Text'] = addslashes($DbRow['Text']);
     308            $Value['Comment'] = addslashes($DbRow['Comment']);
    309309            //echo('.');
    310310          }
     
    315315        } else $File2->WriteLine($Line."\n");
    316316      }
    317       echo('Hotovo <br />');
     317      echo('Hotovo <br/>');
    318318    }
    319319  }
Note: See TracChangeset for help on using the changeset viewer.