Changeset 882 for trunk/Modules/Export
- Timestamp:
- Apr 8, 2020, 12:35:38 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Export/Export.php
r881 r882 283 283 } 284 284 285 // Export only if translate have same vari ble %286 function HaveVari ble($String1, $String2, $StartChar = '$')285 // Export only if translate have same variable % 286 function HaveVariable($String1, $String2, $StartChar = '$') 287 287 { 288 288 if (strpos($String1, $StartChar) !== false) … … 292 292 $pos = strpos($String1, $StartChar); 293 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))294 $Variable = $String1; 295 if (strpos($Variable, ' ')) $Variable = substr($Variable, 0, strpos($Variable, ' ')); 296 if (strpos($Variable, '.')) $Variable = substr($Variable, 0, strpos($Variable, '.')); 297 if (strpos($Variable, ',')) $Variable = substr($Variable, 0, strpos($Variable, ',')); 298 if (strpos($Variable, '%')) $Variable = substr($Variable, 0, strpos($Variable, '%')); 299 if (strpos($Variable, chr(10))) $Variable = substr($Variable, 0, strpos($Variable, chr(10))); 300 301 if (($Variable != '') and (strpos($String2, $Variable) === false)) 302 302 { 303 303 return false; … … 348 348 while ($DbRow = $DbResult2->fetch_assoc()) 349 349 { 350 // Export only if translate have same varible %350 // Export only if translate have same variable % 351 351 $CanExport = true; 352 352 foreach ($TranslationTree[$Group['Id']]['Items'] as $Column) 353 353 { 354 $DbRow[$Column['Column']] = str_replace ( '$ ','$',$DbRow[$Column['Column']]);355 if (!$this->HaveVari ble($DbRow['En'.$Column['Column']],$DbRow[$Column['Column']]))354 $DbRow[$Column['Column']] = str_replace ('$ ', '$', $DbRow[$Column['Column']]); 355 if (!$this->HaveVariable($DbRow['En'.$Column['Column']], $DbRow[$Column['Column']])) 356 356 { 357 357 $CanExport = false; 358 358 $Output .= ', NE='.$DbRow['ID']; 359 359 } 360 if (!$this->HaveVari ble($DbRow[$Column['Column']],$DbRow['En'.$Column['Column']]))360 if (!$this->HaveVariable($DbRow[$Column['Column']], $DbRow['En'.$Column['Column']])) 361 361 { 362 362 $CanExport = false; … … 455 455 while ($DbRow = $DbResult2->fetch_assoc()) 456 456 { 457 458 459 457 $CanExport = true; 458 foreach ($TranslationTree[$Group['Id']]['Items'] as $Column) 459 { 460 460 // if (strpos($DbRow[$Column['Column']],'\\')) 461 461 // $CanExport = false; … … 463 463 // $DbRow[$Column['Column']] = $DbRow['En'.$Column['Column']]; 464 464 465 if (!$this->HaveVarible($DbRow['En'.$Column['Column']],$DbRow[$Column['Column']]))466 467 468 469 470 if (!$this->HaveVarible($DbRow[$Column['Column']],$DbRow['En'.$Column['Column']]))471 472 473 474 475 if (!$this->HaveVarible($DbRow['En'.$Column['Column']],$DbRow[$Column['Column']],'%'))476 477 478 479 480 if (!$this->HaveVarible($DbRow[$Column['Column']],$DbRow['En'.$Column['Column']],'%'))481 482 483 484 485 if (!$this->HaveVarible($DbRow[$Column['Column']],$DbRow['En'.$Column['Column']],'\\'))486 487 488 489 490 if (!$this->HaveVarible($DbRow['En'.$Column['Column']],$DbRow[$Column['Column']],'\\'))491 492 493 494 495 if (!$this->HaveVarible($DbRow[$Column['Column']],$DbRow['En'.$Column['Column']],'|'))496 497 498 499 500 if (!$this->HaveVarible($DbRow['En'.$Column['Column']],$DbRow[$Column['Column']],'|'))501 502 503 504 505 if (!$this->HaveVarible($DbRow[$Column['Column']],$DbRow['En'.$Column['Column']],chr(10)))506 507 508 509 510 if (!$this->HaveVarible($DbRow['En'.$Column['Column']],$DbRow[$Column['Column']],chr(10)))511 512 513 514 515 465 if (!$this->HaveVariable($DbRow['En'.$Column['Column']], $DbRow[$Column['Column']])) 466 { 467 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 468 $CanExport = false; 469 } 470 if (!$this->HaveVariable($DbRow[$Column['Column']], $DbRow['En'.$Column['Column']])) 471 { 472 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 473 $CanExport = false; 474 } 475 if (!$this->HaveVariable($DbRow['En'.$Column['Column']], $DbRow[$Column['Column']], '%')) 476 { 477 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 478 $CanExport = false; 479 } 480 if (!$this->HaveVariable($DbRow[$Column['Column']], $DbRow['En'.$Column['Column']], '%')) 481 { 482 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 483 $CanExport = false; 484 } 485 if (!$this->HaveVariable($DbRow[$Column['Column']], $DbRow['En'.$Column['Column']], '\\')) 486 { 487 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 488 $CanExport = false; 489 } 490 if (!$this->HaveVariable($DbRow['En'.$Column['Column']], $DbRow[$Column['Column']], '\\')) 491 { 492 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 493 $CanExport = false; 494 } 495 if (!$this->HaveVariable($DbRow[$Column['Column']], $DbRow['En'.$Column['Column']], '|')) 496 { 497 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 498 $CanExport = false; 499 } 500 if (!$this->HaveVariable($DbRow['En'.$Column['Column']], $DbRow[$Column['Column']], '|')) 501 { 502 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 503 $CanExport = false; 504 } 505 if (!$this->HaveVariable($DbRow[$Column['Column']], $DbRow['En'.$Column['Column']], chr(10))) 506 { 507 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 508 $CanExport = false; 509 } 510 if (!$this->HaveVariable($DbRow['En'.$Column['Column']], $DbRow[$Column['Column']], chr(10))) 511 { 512 if ($CanExport) $Output .= ', NE='.$DbRow['ID']; 513 $CanExport = false; 514 } 515 } 516 516 517 517 if ($CanExport)
Note:
See TracChangeset
for help on using the changeset viewer.