Changeset 662 for trunk/Modules/Export/Export.php
- Timestamp:
- Dec 21, 2013, 2:42:22 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Export/Export.php
r659 r662 280 280 } 281 281 282 function HaveVarible($String1, $String2 )282 function HaveVarible($String1, $String2, $StartChar = '$') 283 283 { 284 284 //Export only if translate have same varible % 285 if (strpos($String1, '$')) {286 while (strpos($String1, '$')) {287 $String1 = substr($String1,strpos($String1, '$'));285 if (strpos($String1,$StartChar)) { 286 while (strpos($String1,$StartChar)) { 287 $String1 = substr($String1,strpos($String1,$StartChar)); 288 288 $varible = $String1; 289 289 if (strpos($varible,' ')) $varible = substr($varible,0,strpos($varible,' ')); 290 290 if (strpos($varible,'.')) $varible = substr($varible,0,strpos($varible,'.')); 291 if (strpos($varible,',')) $varible = substr($varible,0,strpos($varible,',')); 291 292 if (strpos($varible,'%')) $varible = substr($varible,0,strpos($varible,'%')); 292 293 if (strpos($varible,chr(10))) $varible = substr($varible,0,strpos($varible,chr(10))); 293 294 if (false == strpos($String2,$varible)) { 294 echo $varible;295 // echo $varible; 295 296 296 297 return(false); … … 337 338 if (!$this->HaveVarible($DbRow['En'.$Column['Column']],$DbRow[$Column['Column']])) { 338 339 $CanExport = false; 339 echo ' 340 NE='.$DbRow['ID']. 341 //$DbRow['En'.$Column['Column']].'-'.$DbRow[$Column['Column']].''. 342 ','; 340 $Output .= ', NE='.$DbRow['ID']; 343 341 } 344 342 if (!$this->HaveVarible($DbRow[$Column['Column']],$DbRow['En'.$Column['Column']])) { 345 343 $CanExport = false; 346 echo ' 347 NE='.$DbRow['ID']. 348 //$DbRow['En'.$Column['Column']].'-'.$DbRow[$Column['Column']].''. 349 ','; 344 $Output .= ', NE='.$DbRow['ID']; 350 345 } 351 346 } … … 435 430 $LookupTable = array(); 436 431 $DbResult2 = $this->Database->query($this->BuildQuery($Group)); 437 while($DbRow = $DbResult2->fetch_assoc()) 438 $LookupTable[$DbRow['ShortCut']] = $DbRow; 432 while($DbRow = $DbResult2->fetch_assoc()) { 433 $CanExport = true; 434 foreach($TranslationTree[$Group['Id']]['Items'] as $Column) { 435 $DbRow[$Column['Column']] = str_replace ( '$ ','$',$DbRow[$Column['Column']]); 436 if (!$this->HaveVarible($DbRow['En'.$Column['Column']],$DbRow[$Column['Column']])) { 437 $CanExport = false; 438 $Output .= ', NE='.$DbRow['ID']; 439 } 440 if (!$this->HaveVarible($DbRow[$Column['Column']],$DbRow['En'.$Column['Column']])) { 441 $CanExport = false; 442 $Output .= ', NE='.$DbRow['ID']; 443 } 444 if (!$this->HaveVarible($DbRow['En'.$Column['Column']],$DbRow[$Column['Column']],'%')) { 445 $CanExport = false; 446 $Output .= ', NE='.$DbRow['ID']; 447 } 448 if (!$this->HaveVarible($DbRow[$Column['Column']],$DbRow['En'.$Column['Column']],'%')) { 449 $CanExport = false; 450 $Output .= ', NE='.$DbRow['ID']; 451 } 452 } 453 454 if ($CanExport) 455 $LookupTable[$DbRow['ShortCut']] = $DbRow; 456 } 439 457 440 458 while(!$File->EOF())
Note:
See TracChangeset
for help on using the changeset viewer.