Changeset 190


Ignore:
Timestamp:
Apr 27, 2009, 5:03:13 PM (15 years ago)
Author:
maron
Message:

Mazání dočasných souborů při importu do aowow

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/export/index.php

    r189 r190  
    147147        $AoWoWSQL = ExportToAoWoWSQL($ExportSetting);
    148148        echo ('<strong>Hotovo</strong><br />');
    149        
    150         echo('Importuji do AoWoW ');
     149
    151150                $Database->SelectDatabase($AoWoWconf['mangos']['db']);   
    152151                $Database->SQLCommand('SET NAMES '.$Config['Database']['Charset']);
     152       
     153                echo('Aktualizuji aktuality ');
     154            $Database->SQLCommand("UPDATE `aowow_news` SET `text_loc0` = 'Poslední aktualizace dat ".Date ("d. n. Y, H:i:s")." ',
     155                `text_loc8` = 'Poslední aktualizace dat ".Date ("d. n. Y, H:i:s")." ' WHERE `aowow_news`.`id` =3");
     156        echo ('<strong>Hotovo</strong><br />');
     157
     158                echo('Mažu dočasné soubory ');
     159                $files = scandir('../aowow/cache/mangos');
     160                foreach($files as $file) {
     161                        $end = substr($file,strlen($file)-3);
     162                        if ($end == 'aww') unlink('../aowow/cache/mangos/'.$file);
     163                }
     164                $files = scandir('../aowow/cache/templates/wowhead');
     165                foreach($files as $file) {
     166                        $end = substr($file,strlen($file)-3);
     167                        if ($end == 'php') unlink('../aowow/cache/templates/wowhead/'.$file);
     168                }
     169        echo ('<strong>Hotovo</strong><br />');
     170
     171        echo('Importuji do AoWoW ');
    153172          $BufferArray = explode(";\n", $AoWoWSQL);
    154173          foreach($BufferArray as $Line)
     
    160179               
    161180                //TODO   aowow_itemenchantmet, aowow_char_titles, aowow_factions, aowow_itemset, aowow_spelldispeltype, aowow_spellmechanic, aowow_spellrange, aowow_zones
    162                
    163                 echo('Aktualizuji aktuality ');
    164             $Database->SQLCommand("UPDATE `aowow_news` SET `text_loc0` = 'Poslední aktualizace dat ".Date ("d. n. Y, H:i:s")." ',
    165                 `text_loc8` = 'Poslední aktualizace dat ".Date ("d. n. Y, H:i:s")." ' WHERE `aowow_news`.`id` =3");
    166         echo ('<strong>Hotovo</strong><br />');
    167 
    168                
     181                               
    169182                $Database->SelectDatabase($Config['Database']['Database']);   
    170183                $Database->SQLCommand('SET NAMES '.$Config['Database']['Charset']);
Note: See TracChangeset for help on using the changeset viewer.