Changeset 658
- Timestamp:
- Dec 19, 2013, 11:23:12 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Export/Export.php
r646 r658 278 278 "</document>"; 279 279 return($Buffer); 280 } 280 } 281 282 function HaveVarible($String1, $String2) 283 { 284 //Export only if translate have same varible % 285 if (strpos($String1,'$')) { 286 while (strpos($String1,'$')) { 287 $String1 = substr($String1,strpos($String1,'$')); 288 $varible = $String1; 289 if (strpos($varible,' ')) $varible = substr($varible,0,strpos($varible,' ')); 290 if (strpos($varible,'.')) $varible = substr($varible,0,strpos($varible,'.')); 291 if (strpos($varible,'%')) $varible = substr($varible,0,strpos($varible,'%')); 292 if (strpos($varible,chr(10))) $varible = substr($varible,0,strpos($varible,chr(10))); 293 if (false == strpos($String2,$varible)) { 294 295 return(false); 296 } 297 } 298 } 299 return (true); 300 } 281 301 282 302 function ExportToDBC() … … 309 329 $LookupTable = array(); 310 330 $DbResult2 = $this->Database->query($this->BuildQuery($Group)); 311 while($DbRow = $DbResult2->fetch_assoc()) 312 $LookupTable[$DbRow[$Group['PrimaryKeyItem']]] = $DbRow; 331 while($DbRow = $DbResult2->fetch_assoc()) { 332 //Export only if translate have same varible % 333 $CanExport = true; 334 foreach($TranslationTree[$Group['Id']]['Items'] as $Column) { 335 $DbRow[$Column['Column']] = str_replace ( '$ ','$',$DbRow[$Column['Column']]); 336 if (!$this->HaveVarible($DbRow['En'.$Column['Column']],$DbRow[$Column['Column']])) { 337 $CanExport = false; 338 } 339 if (!$this->HaveVarible($DbRow[$Column['Column']],$DbRow['En'.$Column['Column']])) { 340 $CanExport = false; 341 } 342 } 343 344 if ($CanExport) 345 $LookupTable[$DbRow[$Group['PrimaryKeyItem']]] = $DbRow; 346 else echo 'NE='.$DbRow[$Column['ID']].','; 347 } 313 348 314 349 // Open original DBC file … … 348 383 $LookupTableItem = $LookupTable[$PrimaryKeyItem]; 349 384 foreach($TranslationTree[$Group['Id']]['Items'] as $GroupItem) 350 { 385 { 351 386 if(array_key_exists($GroupItem['Id'], $ColumnIndexes)) 352 387 $Line[$ColumnIndexes[$GroupItem['Id']]] = $LookupTableItem[$GroupItem['Column']]; -
trunk/Modules/Export/cmdmpqexport.php
r657 r658 36 36 } 37 37 } 38 38 if(!array_key_exists('ExportId', $_GET) and !array_key_exists('dbc', $_GET) and !array_key_exists('lua', $_GET) and !array_key_exists('addon', $_GET)) { 39 $Output .= 'Usage type_export=id_export -for export<br />'; 40 $Output .= 'Usage ExportId=id_export - for write export info<br />'; 41 42 $Output .= 'type_export={lua,dbc,addon} <br />'; 43 $Output = str_replace('<br />',' 44 ',$Output); 45 } 39 46 //37 40 47 if(array_key_exists('lua', $_GET)) { -
trunk/Modules/Translation/TranslationList.php
r656 r658 41 41 else $Selected = ''; 42 42 $Output .= '<option value="5"'.$Selected.'>Rozpracované-Nepřeložené</option>'; 43 if($Filter['State'] == 6) $Selected = ' selected="selected"'; 44 else $Selected = ''; 45 $Output .= '<option value="6"'.$Selected.'>S chybějícím $N,$S..</option>'; 43 46 $Output .= '</select></td>'; 44 47 … … 171 174 ' AND (`Sub`.`Entry` = `T`.`Entry`) AND (`Sub`.`Complete` = 1) AND '. 172 175 '(`Sub`.`VersionStart` = `T`.`VersionStart`) AND (`Sub`.`VersionEnd` = `T`.`VersionEnd`))'; 176 else if($Filter['State'] == 6) { 177 178 if($Filter['Group'] != 0) 179 foreach($TranslationTree[$Filter['Group']]['Items'] as $GroupItem) 180 if($GroupItem['Visible'] == 1) { 181 $Items[] = ''. 182 '`T`.`'.$GroupItem['Column'].'` NOT LIKE "%$%" '. 183 ' AND EXISTS ('. 184 'SELECT 1 FROM `'.$Table.'` AS `Sub` WHERE `Sub`.`'.$GroupItem['Column'].'` LIKE "%$%"'. 185 ' AND `Sub`.`Entry` = `T`.`Entry` AND `Sub`.`Language` = '.$this->System->Config['OriginalLanguage'].' AND '. 186 '`Sub`.`VersionStart` = `T`.`VersionStart` AND `Sub`.`VersionEnd` = `T`.`VersionEnd`'. 187 ')'. 188 ''; 189 } 190 $Filter['SQL'] .= $UserFilter.$VersionFilter.' AND (`T`.`Complete` = 1) AND `T`.`Language` != '.$this->System->Config['OriginalLanguage']; 191 192 $Filter['SQL'] .= ' AND ('.implode(' OR ', $Items).') '; 193 194 195 196 } 173 197 } 174 198 -
trunk/includes/Version.php
r657 r658 6 6 // and system will need database update. 7 7 8 $Revision = 65 7; // Subversion revision8 $Revision = 658; // Subversion revision 9 9 $DatabaseRevision = 646; // Database structure revision 10 $ReleaseTime = '2013-12-1 6';10 $ReleaseTime = '2013-12-19';
Note:
See TracChangeset
for help on using the changeset viewer.