Changeset 673 for trunk/admin/index.php
- Timestamp:
- Dec 29, 2013, 4:59:51 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/index.php
r657 r673 28 28 '<a href="'.$System->Link('/admin/?action=uncomplete').'">Nastavit nekompletní texty</a><br/>'. 29 29 '<small>Nastaví questy, které jsou v popisu nebo objektu stejné jako nedokončené</small><br/><br/>'. 30 '<a href="'.$System->Link('/admin/?action=repairversion').'">Opravit špatně nastavené VersionEnd v kouzlech</a><br/>'.31 '<small>Nastaví špatné version end v kouzlech, které vzniklo v důsledku importu a špatně indexovaného indexu Take</small><br/><br/>'.30 '<a href="'.$System->Link('/admin/?action=repairversion').'">Opravit špatně nastavené VersionEnd</a><br/>'. 31 '<small>Nastaví špatné version end a Take na originální text, které vzniklo v důsledku importu a špatně indexovaného indexu Take</small><br/><br/>'. 32 32 '<a href="'.$System->Link('/admin/?action=dbcstructure').'">Připravit dbc strukturu</a><br/>'. 33 33 '<small>Otevře dbc soubory převedené do textové formy pro přípravu struktury pro import</small><br/><br/>'; … … 87 87 .' OR ( `gs_tran`.`Details` != `gs_orig`.`Details` AND "" = `gs_tran`.`Details` )' 88 88 .' OR (`gs_tran`.`Objectives` = `gs_orig`.`Objectives` AND "" != `gs_orig`.`Objectives` ))' 89 ); 89 ); 90 90 $Output = 'Questy: <br />'; 91 91 while($quest = $DbResult->fetch_assoc()) … … 100 100 function RepairVersionEnd() 101 101 { 102 global $System; 103 104 $sql = 'SELECT `T`.`ID`,`T`.`Take`,`sub1`.`ID` as `origID`,T.`VersionStart`,T.`VersionEnd`,`sub1`.`VersionStart` as OrigStart,sub1.`VersionEnd` as `OrigEnd` FROM `TextSpell` as `T` '. 105 ' JOIN `TextSpell` as `sub1` ON `sub1`.`Language` = 0 AND `T`.`Entry` = `sub1`.`Entry` AND `T`.`VersionStart` = `sub1`.`VersionStart`'. 106 ' WHERE `T`.`Language` != 0 AND `T`.`VersionEnd` != `sub1`.`VersionEnd` AND `T`.`Take` NOT IN'. 107 '(Select `ID` FROM `TextSpell` as `sub2` WHERE `sub2`.`Language` = 0 AND `T`.`Entry` = `sub2`.`Entry` AND `T`.`VersionStart` = `sub2`.`VersionStart`)'. 102 global $System,$TranslationTree; 103 104 foreach($TranslationTree as $Group) { 105 106 $sql = 'SELECT `T`.`ID`,`T`.`Take`,`sub1`.`ID` as `origID`,T.`VersionStart`,T.`VersionEnd`,`sub1`.`VersionStart` as OrigStart,sub1.`VersionEnd` as `OrigEnd` FROM `'.$Group['TablePrefix'] .'` as `T` '. 107 ' JOIN `'.$Group['TablePrefix'].'` as `sub1` ON `sub1`.`Language` = 0 AND `T`.`Entry` = `sub1`.`Entry` AND `T`.`VersionStart` = `sub1`.`VersionStart` '. 108 ' WHERE `T`.`Take` != `sub1`.`Take`'. 109 // ' WHERE `T`.`Language` != 0 AND `T`.`VersionEnd` != `sub1`.`VersionEnd` AND `T`.`Take` NOT IN'. 110 // '(Select `ID` FROM `'.$Group['TablePrefix'].'` as `sub2` WHERE `sub2`.`Language` = 0 AND `T`.`Entry` = `sub2`.`Entry` AND `T`.`VersionStart` = `sub2`.`VersionStart`)'. 108 111 ' '; //LIMIT 1000 109 112 //echo $sql; 110 113 $DbResult = $System->Database->query($sql); 111 $Output = 'Kouzla: <br />';114 echo ': <br />'.$Group['TablePrefix'].': <br />'; 112 115 while($line = $DbResult->fetch_assoc()) 113 116 { 114 117 echo ($line['ID'].', '); 115 $System->Database->query('UPDATE ` TextSpell` SET `VersionEnd` = '.$line['OrigEnd'].', `Take` = '.$line['origID'].' WHERE ID='.$line['ID']);118 $System->Database->query('UPDATE `'.$Group['TablePrefix'].'` SET `VersionEnd` = '.$line['OrigEnd'].', `Take` = '.$line['origID'].' WHERE ID='.$line['ID']); 116 119 } 117 $Output .= '<br / ><br / >Verze kouzel opraveny!'; 120 echo '<br / >Verze '.$Group['TablePrefix'].' opraveny!'; 121 } 118 122 return($Output); 119 123 }
Note:
See TracChangeset
for help on using the changeset viewer.