Changeset 838 for trunk/Modules/Export/Export.php
- Timestamp:
- Jan 9, 2016, 11:45:01 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Export/Export.php
r816 r838 16 16 function Init() 17 17 { 18 $this->TempDir = dirname(__FILE__).'/../../'.$this-> Config['Web']['TempFolder'].'Export/'.$this->Id.'/';18 $this->TempDir = dirname(__FILE__).'/../../'.$this->System->Config['Web']['TempFolder'].'Export/'.$this->Id.'/'; 19 19 if(!file_exists($this->TempDir)) mkdir($this->TempDir, 0777, true); 20 $this->TempDirRelative = $this-> Config['Web']['TempFolder'].'Export/'.$this->Id.'/';21 $this->SourceDir = dirname(__FILE__).'/../../'.$this-> Config['Web']['SourceFolder'];22 $this->SourceDirRelative = $this-> Config['Web']['SourceFolder'];20 $this->TempDirRelative = $this->System->Config['Web']['TempFolder'].'Export/'.$this->Id.'/'; 21 $this->SourceDir = dirname(__FILE__).'/../../'.$this->System->Config['Web']['SourceFolder']; 22 $this->SourceDirRelative = $this->System->Config['Web']['SourceFolder']; 23 23 if(!file_exists($this->SourceDir)) mkdir($this->SourceDir, 0777, true); 24 24 } … … 161 161 "-- ===========================================\n". 162 162 "--\n". 163 "-- Web projektu: ".$this-> Config['Web']['Host'].$this->System->Link('/')."\n".163 "-- Web projektu: ".$this->System->Config['Web']['Host'].$this->System->Link('/')."\n". 164 164 "-- Datum exportu: ".date("j.n.Y H:i:s")."\n". 165 "-- Znaková sada: ".$this-> Config['Database']['Charset']." / ".$this->Config['Web']['Charset']."\n".165 "-- Znaková sada: ".$this->System->Config['Database']['Charset']." / ".$this->System->Config['Web']['Charset']."\n". 166 166 "-- Diakritika: ".$this->AnoNe[$this->Export['WithDiacritic']]."\n". 167 167 "-- Vygeneroval uživatel: ".$this->System->User->Name."\n". … … 229 229 /* 230 230 // Data to aowow 231 $Database2 = new mysqli($this->Config['Database']['Host'], $this->Config['Database']['User'], $this->Config['Database']['Password'], $this->Config['Database']['Database']); 232 $Database2->query('SET NAMES '.$this->Config['Database']['Charset']); 231 $Database2 = new mysqli($this->System->Config['Database']['Host'], 232 $this->System->Config['Database']['User'], 233 $this->System->Config['Database']['Password'], 234 $this->System->Config['Database']['Database']); 235 $Database2->query('SET NAMES '.$this->System->Config['Database']['Charset']); 233 236 $Database2->select_db($AoWoWconf['mangos']['db']); 234 237 $AoWoWTables = array( … … 256 259 { 257 260 $DbResult2 = $Database2->query('SELECT `OptionText` AS `En`, 258 (SELECT `OptionText` FROM `'.$this-> Config['Database']['Database'].'`.`TextNPCOption` AS `TableTran`261 (SELECT `OptionText` FROM `'.$this->System->Config['Database']['Database'].'`.`TextNPCOption` AS `TableTran` 259 262 WHERE `TableEn`.`Entry` = `TableTran`.`Entry` AND (`Complete` = 1) AND '.$this->WhereLang.' 260 263 AND '.$this->WhereUsers.$this->OrderByUserList.' LIMIT 1) AS `Tran` 261 FROM `'.$this-> Config['Database']['Database'].'`.`TextNPCOption` AS `TableEn` WHERE264 FROM `'.$this->System->Config['Database']['Database'].'`.`TextNPCOption` AS `TableEn` WHERE 262 265 `OptionText` = "'.addslashes($Ori_text).'" LIMIT 1'); 263 266 $Tran = $DbResult2->fetch_assoc(); … … 646 649 "<document>\n". 647 650 " <meta>\n". 648 " <projecturl>".$this-> Config['Web']['Host'].$this->System->Link('/')."</projecturl>\n".651 " <projecturl>".$this->System->Config['Web']['Host'].$this->System->Link('/')."</projecturl>\n". 649 652 " <time>".date('r')."</time>\n". 650 653 " <diacritics mode=".'"'.$this->Export['WithDiacritic'].'"'." />\n". … … 696 699 class ModuleExport extends AppModule 697 700 { 698 function __construct( $System)701 function __construct(System $System) 699 702 { 700 703 parent::__construct($System); … … 707 710 } 708 711 709 function Start()712 function DoStart() 710 713 { 711 714 $this->System->RegisterPage('export', 'PageExport');
Note:
See TracChangeset
for help on using the changeset viewer.