Changeset 745 for trunk/Modules
- Timestamp:
- Jan 10, 2014, 6:02:59 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Translation/Form.php
r743 r745 49 49 foreach($TranslationTree[$GroupId]['Items'] as $Index => $TextItem) 50 50 $Columns .= ' `Orig`.`'.$TextItem['Column'].'` as `Orig_'.$TextItem['Column'].'`, `Tran`.`'.$TextItem['Column'].'` as `'.$TextItem['Column'].'`,'; 51 52 53 //search for same text with other entry 54 foreach($TranslationTree[$GroupId]['Items'] as $Index => $TextItem) 55 if($TextItem['Visible'] == 1) 56 if (($LineAJ[$TextItem['Column']] <> '') and 57 ($LineAJ[$TextItem['Column']] == $Line[$TextItem['Column']]) and 58 (strlen($LineAJ[$TextItem['Column']]) < 20) 59 ) 60 { 61 $sql = 'SELECT '.$Columns.' Tran.`Entry` FROM `'.$Table.'` as Tran'; 62 $join = ' JOIN `'.$Table.'` as `Orig` ON `Orig`.`Language` = 0 AND `Tran`.`Entry` = `Orig`.`Entry` AND `Tran`.`VersionEnd` = `Orig`.`VersionEnd` '; 63 $where = ' WHERE '.'( `Tran`.'.$Language.' ) AND '.' `Orig`.`'.$TextItem['Column'].'` = "'.$LineAJ[$TextItem['Column']].'" ORDER BY `Tran`.`ModifyTime` DESC LIMIT 1'; 64 $DbResult = $this->Database->query($sql.$join.$where); 65 while ($LineSearch = $DbResult->fetch_assoc()) { 66 $Line[$TextItem['Column']] = $LineSearch[$TextItem['Column']]; 67 } 68 } 51 69 52 70 53 $sql = 'SELECT '.$Columns.' Tran.`Entry` FROM `'.$Table.'` as Tran'; … … 85 68 } 86 69 } 87 88 70 89 71 } else { … … 248 230 } 249 231 $Output .= '</table></div>'; 250 if($this->System->User->Licence(LICENCE_USER)) $Output .= '</form>'; 232 if($this->System->User->Licence(LICENCE_USER)) { 233 $Output .= '</form>'; 234 235 $Output .= '<table class="BaseTable">'. 236 '<tr><th>Translátor:</th><th>Nepřeložené</th><th>Přeložené</th>'; 237 foreach($TranslationTree[$GroupId]['Items'] as $Index => $TextItem) 238 if($TextItem['Visible'] == 1) 239 if ($LineAJ[$TextItem['Column']] <> '') 240 $Output .= '<tr><td>'.$TextItem['Column'].'</td><td>'.$LineAJ[$TextItem['Column']].'</td><td>'.GetTranslateGoogle($LineAJ[$TextItem['Column']]).'</td></tr>'; 241 242 243 $Output .= '</table>'; 244 } 251 245 } 252 246 }
Note:
See TracChangeset
for help on using the changeset viewer.