- Timestamp:
- Apr 7, 2020, 11:58:08 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/Version.php
r879 r881 7 7 8 8 $Version = '1.0'; 9 $Revision = 8 73; // Subversion revision9 $Revision = 881; // Subversion revision 10 10 $DatabaseRevision = 873; // Database structure revision 11 11 $ReleaseDate = strtotime('2020-04-07'); -
trunk/Application/View.php
r880 r881 77 77 '<meta name="description" content="'.$this->System->Config['Web']['Description'].'" />'. 78 78 '<meta name="robots" content="all" />'. 79 '<meta name="viewport" content="width=device-width, initial-scale=1">'. 79 80 '<link rel="stylesheet" href="'.$this->System->Link('/style/style.css').'" type="text/css" media="all" />'. 80 81 '<script type="text/javascript" src="'.$this->System->Link('/style/global.js').'"></script>'. … … 119 120 foreach ($this->System->Bars['Right'] as $BarItem) 120 121 $Bar .= call_user_func($BarItem); 121 122 if (trim($Bar) != '') $Output .= $Bar; 122 123 else $Output .= ' '; 123 124 $Output .= '</td>'; 124 125 $Output .= '</tr><tr>'. 125 126 '<td colspan="4" class="page-bottom">'.T('Version').': '.$Version.' '.T('Revision').': '.$Revision.' ('.$this->System->HumanDate($ReleaseDate).')'. 126 ' <a href="http ://svn.zdechov.net/trac/wowpreklad/browser/trunk">'.T('Source code').'</a> '.127 '<a href="http ://svn.zdechov.net/trac/wowpreklad/log/trunk?verbose=on">'.T('Changelog').'</a> '.127 ' <a href="https://app.zdechov.net/wowpreklad/browser/trunk">'.T('Source code').'</a> '. 128 '<a href="https://app.zdechov.net/wowpreklad/log/trunk?verbose=on">'.T('Changelog').'</a> '. 128 129 $this->System->Config['Web']['WebCounter']; 129 130 -
trunk/Install/deb/debian/control
r877 r881 10 10 Depends: ${shlibs:Depends}, ${misc:Depends}, apache2, php, dbconfig-mysql 11 11 Description: World of Warcraft web translation platform. 12 HomePage: http ://svn.zdechov.net/trac/wowpreklad12 HomePage: https://app.zdechov.net/wowpreklad -
trunk/Modules/Export/Export.php
r880 r881 24 24 } 25 25 26 function SaveAllUsers() { 26 function SaveAllUsers() 27 { 27 28 $DbResult = $this->System->Database->query('SELECT * FROM `Export` WHERE `Id`='.$this->Id); 28 29 $Export = $DbResult->fetch_assoc(); 29 if ($Export['AllUsers']) { 30 if ($Export['AllUsers']) 31 { 30 32 $DbResult2 = $this->System->Database->query('SELECT ID FROM `User` WHERE `ID` NOT IN(SELECT `User` FROM `ExportUser` WHERE `Export`='.$this->Id.')'); 31 33 while ($UserLine = $DbResult2->fetch_assoc()) 32 34 { 33 34 35 36 37 38 39 40 41 35 $Condition = ' WHERE `Export`='.$this->Id.' AND `User`='.$UserLine['ID']; 36 $DbResult = $this->System->Database->query('SELECT * FROM `ExportUser` '.$Condition); //,MAX(`Sequence`) as MaxSequence 37 if ($DbResult->num_rows > 0) 38 { 39 // $this->System->Database->query('UPDATE `ExportUser` SET `Sequence`='.$Value.$Condition); 40 } else 41 { 42 $this->System->Database->query('INSERT INTO `ExportUser` (`Export`, `User`, `Sequence`) VALUES ('.$this->Id.', '.$UserLine['ID'].', 0)'); 43 } 42 44 } 43 45 … … 88 90 // Build selected columns 89 91 $Columns = ''; 90 foreach ($TranslationTree[$Group['Id']]['Items'] as $Column) { 92 foreach ($TranslationTree[$Group['Id']]['Items'] as $Column) 93 { 91 94 if (!isset($GroupItems[$Column['Id']])) $Columns .= ' `T`.`'.$Column['Column'].'` AS `'.$Column['Column'].'`, '; 92 95 } 93 96 // $Columns = substr($Columns, 0, -2); 94 95 97 96 98 $Query = 'SELECT * FROM (SELECT ANY_VALUE(`TT`.`ID`) AS `TTID` FROM (SELECT '.$Columns.' T.`ID`,T.`Language`,T.`User`,T.`Entry`,T.`VersionEnd`,T.`VersionStart`, `User`.`Name` AS `UserName` FROM `'.$Group['TablePrefix'].'` AS `T`'. … … 104 106 // Build columns for english texts 105 107 $OriginalColumns = ''; 106 foreach ($TranslationTree[$Group['Id']]['Items'] as $Column) { 108 foreach ($TranslationTree[$Group['Id']]['Items'] as $Column) 109 { 107 110 $OriginalColumns .= ' `T3`.`'.$Column['Column'].'` AS `En'.$Column['Column'].'`, '; 108 111 if (isset($GroupItems[$Column['Id']])) … … 130 133 $date = date('Y-m-d H:i',(filemtime($file))); 131 134 else return true; 132 // echo $file;133 135 134 136 $DbResult = $this->Database->query('SELECT `Group`.* FROM `ExportGroup` '. … … 144 146 ' '; 145 147 146 $DbResult2 = $this->Database->query($Query); 147 if ($DbResult2->num_rows > 0) { 148 $result = true; 149 } 148 $DbResult2 = $this->Database->query($Query); 149 if ($DbResult2->num_rows > 0) 150 { 151 $result = true; 152 } 150 153 } 151 154 return $result; … … 283 286 function HaveVarible($String1, $String2, $StartChar = '$') 284 287 { 285 if (strpos($String1,$StartChar) !== false) { 286 287 while ( strpos($String1,$StartChar) !== false) { 288 $pos = strpos($String1,$StartChar); 289 $String1 = substr($String1,$pos+1); 290 $varible = $String1; 291 if (strpos($varible,' ')) $varible = substr($varible,0,strpos($varible,' ')); 292 if (strpos($varible,'.')) $varible = substr($varible,0,strpos($varible,'.')); 293 if (strpos($varible,',')) $varible = substr($varible,0,strpos($varible,',')); 294 if (strpos($varible,'%')) $varible = substr($varible,0,strpos($varible,'%')); 295 if (strpos($varible,chr(10))) $varible = substr($varible,0,strpos($varible,chr(10))); 296 // echo $pos.'-'.$varible.'-'.$String1.'-' .$String2.' 297 // '; 298 299 if (false === strpos($String2,$varible)) { 300 // echo $varible; 301 return false; 302 } 288 if (strpos($String1, $StartChar) !== false) 289 { 290 while (strpos($String1, $StartChar) !== false) 291 { 292 $pos = strpos($String1, $StartChar); 293 $String1 = substr($String1, $pos + 1); 294 $varible = $String1; 295 if (strpos($varible, ' ')) $varible = substr($varible, 0, strpos($varible, ' ')); 296 if (strpos($varible, '.')) $varible = substr($varible, 0, strpos($varible, '.')); 297 if (strpos($varible, ',')) $varible = substr($varible, 0, strpos($varible, ',')); 298 if (strpos($varible, '%')) $varible = substr($varible, 0, strpos($varible, '%')); 299 if (strpos($varible, chr(10))) $varible = substr($varible, 0, strpos($varible, chr(10))); 300 301 if (false === strpos($String2, $varible)) 302 { 303 return false; 304 } 303 305 } 304 306 } … … 306 308 } 307 309 308 function AddProgress($add = 1) {309 310 function AddProgress($add = 1) 311 { 310 312 $DbResult = $this->System->Database->query('SELECT Progress FROM `ExportTask` WHERE `Export`='.$this->Id); 311 313 $Task = $DbResult->fetch_assoc(); … … 344 346 $LookupTable = array(); 345 347 $DbResult2 = $this->Database->query($this->BuildQuery($Group)); 346 while ($DbRow = $DbResult2->fetch_assoc()) { 348 while ($DbRow = $DbResult2->fetch_assoc()) 349 { 347 350 //Export only if translate have same varible % 348 351 $CanExport = true; 349 foreach ($TranslationTree[$Group['Id']]['Items'] as $Column) { 352 foreach ($TranslationTree[$Group['Id']]['Items'] as $Column) 353 { 350 354 $DbRow[$Column['Column']] = str_replace ( '$ ','$',$DbRow[$Column['Column']]); 351 if (!$this->HaveVarible($DbRow['En'.$Column['Column']],$DbRow[$Column['Column']])) { 355 if (!$this->HaveVarible($DbRow['En'.$Column['Column']],$DbRow[$Column['Column']])) 356 { 352 357 $CanExport = false; 353 358 $Output .= ', NE='.$DbRow['ID']; 354 359 } 355 if (!$this->HaveVarible($DbRow[$Column['Column']],$DbRow['En'.$Column['Column']])) { 360 if (!$this->HaveVarible($DbRow[$Column['Column']],$DbRow['En'.$Column['Column']])) 361 { 356 362 $CanExport = false; 357 363 $Output .= ', NE='.$DbRow['ID']; … … 361 367 if ($CanExport) 362 368 $LookupTable[$DbRow[$Group['PrimaryKeyItem']]] = $DbRow; 363 364 369 } 365 370 … … 369 374 370 375 // Create new DBC file 371 if (!file_exists($this->TempDir.'dbc/')) mkdir 376 if (!file_exists($this->TempDir.'dbc/')) mkdir($this->TempDir.'dbc/', 0777, true); 372 377 $NewDBCFile = new DBCFile(); 373 378 $NewDBCFile->CreateFile($this->TempDir.'dbc/'.$Group['DBCFileName'].'.dbc', $ColumnFormat); … … 448 453 $LookupTable = array(); 449 454 $DbResult2 = $this->Database->query($this->BuildQuery($Group)); 450 while ($DbRow = $DbResult2->fetch_assoc()) { 455 while ($DbRow = $DbResult2->fetch_assoc()) 456 { 451 457 $CanExport = true; 452 foreach ($TranslationTree[$Group['Id']]['Items'] as $Column) { 458 foreach ($TranslationTree[$Group['Id']]['Items'] as $Column) 459 { 453 460 // if (strpos($DbRow[$Column['Column']],'\\')) 454 461 // $CanExport = false; … … 456 463 // $DbRow[$Column['Column']] = $DbRow['En'.$Column['Column']]; 457 464 458 if (!$this->HaveVarible($DbRow['En'.$Column['Column']],$DbRow[$Column['Column']])) { 459 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 460 $CanExport = false; 461 } 462 if (!$this->HaveVarible($DbRow[$Column['Column']],$DbRow['En'.$Column['Column']])) { 463 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 464 $CanExport = false; 465 } 466 if (!$this->HaveVarible($DbRow['En'.$Column['Column']],$DbRow[$Column['Column']],'%')) { 467 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 468 $CanExport = false; 469 } 470 if (!$this->HaveVarible($DbRow[$Column['Column']],$DbRow['En'.$Column['Column']],'%')) { 471 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 472 $CanExport = false; 473 } 474 if (!$this->HaveVarible($DbRow[$Column['Column']],$DbRow['En'.$Column['Column']],'\\')) { 475 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 476 $CanExport = false; 477 } 478 if (!$this->HaveVarible($DbRow['En'.$Column['Column']],$DbRow[$Column['Column']],'\\')) { 479 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 480 $CanExport = false; 481 } 482 if (!$this->HaveVarible($DbRow[$Column['Column']],$DbRow['En'.$Column['Column']],'|')) { 483 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 484 $CanExport = false; 485 } 486 if (!$this->HaveVarible($DbRow['En'.$Column['Column']],$DbRow[$Column['Column']],'|')) { 487 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 488 $CanExport = false; 489 } 490 if (!$this->HaveVarible($DbRow[$Column['Column']],$DbRow['En'.$Column['Column']],chr(10))) { 491 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 492 $CanExport = false; 493 } 494 if (!$this->HaveVarible($DbRow['En'.$Column['Column']],$DbRow[$Column['Column']],chr(10))) { 465 if (!$this->HaveVarible($DbRow['En'.$Column['Column']],$DbRow[$Column['Column']])) 466 { 467 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 468 $CanExport = false; 469 } 470 if (!$this->HaveVarible($DbRow[$Column['Column']],$DbRow['En'.$Column['Column']])) 471 { 472 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 473 $CanExport = false; 474 } 475 if (!$this->HaveVarible($DbRow['En'.$Column['Column']],$DbRow[$Column['Column']],'%')) 476 { 477 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 478 $CanExport = false; 479 } 480 if (!$this->HaveVarible($DbRow[$Column['Column']],$DbRow['En'.$Column['Column']],'%')) 481 { 482 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 483 $CanExport = false; 484 } 485 if (!$this->HaveVarible($DbRow[$Column['Column']],$DbRow['En'.$Column['Column']],'\\')) 486 { 487 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 488 $CanExport = false; 489 } 490 if (!$this->HaveVarible($DbRow['En'.$Column['Column']],$DbRow[$Column['Column']],'\\')) 491 { 492 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 493 $CanExport = false; 494 } 495 if (!$this->HaveVarible($DbRow[$Column['Column']],$DbRow['En'.$Column['Column']],'|')) 496 { 497 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 498 $CanExport = false; 499 } 500 if (!$this->HaveVarible($DbRow['En'.$Column['Column']],$DbRow[$Column['Column']],'|')) 501 { 502 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 503 $CanExport = false; 504 } 505 if (!$this->HaveVarible($DbRow[$Column['Column']],$DbRow['En'.$Column['Column']],chr(10))) 506 { 507 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 508 $CanExport = false; 509 } 510 if (!$this->HaveVarible($DbRow['En'.$Column['Column']],$DbRow[$Column['Column']],chr(10))) 511 { 495 512 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 496 513 $CanExport = false; … … 499 516 500 517 if ($CanExport) 501 518 $LookupTable[$DbRow['ShortCut']] = $DbRow; 502 519 } 503 520 … … 516 533 $Line = substr($Line, 1); // Skip start qoute 517 534 $TempLine = str_replace('\"', ' ', $Line); // Temporary remove slashed quotes 518 if (strpos($TempLine, '"')) { 535 if (strpos($TempLine, '"')) 536 { 519 537 $Value['Text'] = substr($Line, 0, strpos($TempLine, '"')); 520 538 } else { … … 558 576 } 559 577 560 function GetReadme() { 578 function GetReadme() 579 { 561 580 $_GET['ExportId'] = $this->Id; 562 581 $PageExport = new PageExport($this->System); … … 631 650 Ne úplně, protože se vystavujete riziku zablokování vašeho účtu z důvodu použití upravené hry. Na oficiálním serveru lze využít pouze Addon s češtinou CzWoW. Instalační soubor určený pro oficiální servery je už takto přizpůsoben.</p>'. 632 651 633 '</td><td>'; 634 635 $Output .= $PageExport->ExportViewStat(' WHERE `DBCFileName` !=\'\' OR `LuaFileName` !=\'\' OR `Group`.`Id` = 1 OR `Group`.`Id` = 2 OR `Group`.`Id` = 3 OR `Group`.`Id` = 16'); 636 637 $Output .= '</td></tr></table>'. 638 639 640 '</body></html>'; 641 return $Output; 642 } 652 '</td><td>'; 653 654 $Output .= $PageExport->ExportViewStat(' WHERE `DBCFileName` !=\'\' OR `LuaFileName` !=\'\' OR `Group`.`Id` = 1 OR `Group`.`Id` = 2 OR `Group`.`Id` = 3 OR `Group`.`Id` = 16'); 655 656 $Output .= '</td></tr></table>'. 657 '</body></html>'; 658 return $Output; 659 } 643 660 644 661 function ExportToXML() -
trunk/Modules/Log/Log.php
r880 r881 125 125 $this->Title = T('System log'); 126 126 $Output = ''; 127 if (array_key_exists('type', $_GET) ) $_SESSION['type'] = $_GET['type'] * 1;127 if (array_key_exists('type', $_GET) and (is_numeric($_GET['type']))) $_SESSION['type'] = $_GET['type'] * 1; 128 128 else if (!array_key_exists('type', $_SESSION)) $_SESSION['type'] = ''; 129 129 -
trunk/Packages/Common/Common.php
r880 r881 34 34 $this->Creator = 'Chronos'; 35 35 $this->License = 'GNU/GPL'; 36 $this->Homepage = 'http ://svn.zdechov.net/svn/PHPlib/Common/';36 $this->Homepage = 'https://svn.zdechov.net/PHPlib/Common/'; 37 37 } 38 38 } -
trunk/ReadMe.txt
r836 r881 5 5 6 6 7 Source code repository: http ://svn.zdechov.net/svn/wowpreklad8 Change history: http ://svn.zdechov.net/trac/wowpreklad/log/7 Source code repository: https://app.zdechov.net/wowpreklad 8 Change history: https://app.zdechov.net/wowpreklad/log/ 9 9 License: GNU/GPLv3 10 10 Authors: Chronos (robie@centrum.cz), Maron (maron2@centrum.cz) … … 13 13 2) Base configuration 14 14 15 For initial web setup there is a necessary to copy config.sample.php file to 16 config.php inside directory includes and modify contained settings accrording 15 For initial web setup there is a necessary to copy config.sample.php file to 16 config.php inside directory includes and modify contained settings accrording 17 17 own needs. 18 18 19 19 3) Banners display 20 20 21 In subdirectory "banners" is used file .htaccess for setting php script execution 21 In subdirectory "banners" is used file .htaccess for setting php script execution 22 22 for image generation and referred address recording. 23 In apache server configuration in file httpd.conf is necessary to set for the 23 In apache server configuration in file httpd.conf is necessary to set for the 24 24 directory: 25 25 … … 33 33 4) Write permissions 34 34 35 Write permission for directory "tmp" needs to be set. In this directory 35 Write permission for directory "tmp" needs to be set. In this directory 36 36 temporary files like generated exports are stored. 37 37 … … 39 39 5) Database initialization 40 40 41 Create database in your MySQL server and set login data to file includes/config.php. 41 Create database in your MySQL server and set login data to file includes/config.php. 42 42 Continue with database installation on page "admin/install.php". 43 43 … … 45 45 6) Text import 46 46 47 Source files for import are located at directory "source". Here are then placed 48 subdirectories named by single individual game versions. In these subdirectories 47 Source files for import are located at directory "source". Here are then placed 48 subdirectories named by single individual game versions. In these subdirectories 49 49 are also subdirectories dbc, sql a lua from import is taken. 50 50 … … 52 52 7) Background script for export 53 53 54 At system start there is a need to start script Modules/Export/ProcessTask.php 54 At system start there is a need to start script Modules/Export/ProcessTask.php 55 55 for processing long lasting export tasks. 56 Process have to be executed under same user as web server (apache), 57 because of correct permission setting during file creation in directory 56 Process have to be executed under same user as web server (apache), 57 because of correct permission setting during file creation in directory 58 58 tmp and because of security. 59 59 … … 61 61 8) AoWoW download 62 62 63 Download AoWoW from repository http://wowpreklad.zdechov.net/svn/wowpreklad/aowow 64 as subdirectory to directory of wowpreklad. Process according instructions in 63 Download AoWoW from repository http://wowpreklad.zdechov.net/svn/wowpreklad/aowow 64 as subdirectory to directory of wowpreklad. Process according instructions in 65 65 file ReadMe.txt at the same directory. 66 66 … … 68 68 9) AoWoW background script 69 69 70 Set periodic run of script for translation synchronization to AoWoW system. 70 Set periodic run of script for translation synchronization to AoWoW system. 71 71 Every night let run script Modules/Export/ProcessAoWoWExport.php. 72 72
Note:
See TracChangeset
for help on using the changeset viewer.