Changeset 880 for trunk/Modules/Translation/LoadNames.php
- Timestamp:
- Apr 7, 2020, 10:15:48 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Translation/LoadNames.php
r859 r880 18 18 } 19 19 // } 20 return ($Text);20 return $Text; 21 21 } 22 22 function ReplaceNotTranslated($orig,$tran,$Text,$ID,$Group) … … 26 26 $Text = str_replace(' '.$orig,' <span title="Kliknutím přeložíš" class="needtran"><a class="needtran" target="_NEW2" href="'. 27 27 $this->System->Link('/form.php?group='.$Group.'&ID='.$ID).'">'.$orig_replace.'</a></span>',$Text); 28 return ($Text);28 return $Text; 29 29 } 30 30 … … 44 44 $Text = str_replace('$r','<span Title="Znamená rasu hráče, překladu zachovej na stejné pozici." class="edit">$R</span>',$Text); 45 45 $Text = str_replace('$g','<span Title="Vybere oslovení podle pohlaví hráče, překladu zachovej na stejné pozici." class="edit">$G</span>',$Text); 46 foreach ($names as $Line) {46 foreach ($names as $Line) { 47 47 if (($_GET['ID'] <> $Line[0]) or ($Line[1] <> $_GET['GroupId'])) 48 48 if ($Line[3] <> '') { … … 61 61 62 62 $Output = ''; 63 if (array_key_exists('GroupId', $_GET)) $GroupId = $_GET['GroupId'];64 else return (ShowMessage(T('GroupId not specified'), MESSAGE_CRITICAL));65 if (!array_key_exists('ID', $_GET)) return(ShowMessage(T('ID not specified'), MESSAGE_CRITICAL));66 if (!array_key_exists('Column', $_GET)) return(ShowMessage(T('Column not specified'), MESSAGE_CRITICAL));63 if (array_key_exists('GroupId', $_GET)) $GroupId = $_GET['GroupId']; 64 else return ShowMessage(T('GroupId not specified'), MESSAGE_CRITICAL); 65 if (!array_key_exists('ID', $_GET)) return ShowMessage(T('ID not specified'), MESSAGE_CRITICAL); 66 if (!array_key_exists('Column', $_GET)) return ShowMessage(T('Column not specified'), MESSAGE_CRITICAL); 67 67 $Table = $TranslationTree[$GroupId]['TablePrefix']; 68 68 $DbResult = $this->System->Database->query('SELECT * FROM `'.$Table.'` WHERE `ID` = '.$_GET['ID'].' LIMIT 1'); … … 73 73 $names = array(); 74 74 if ($this->System->User->Licence(LICENCE_USER)) 75 if (($GroupId < 4) or ($GroupId == 10) or ($GroupId == 11))75 if (($GroupId < 4) or ($GroupId == 10) or ($GroupId == 11)) 76 76 { 77 77 //<span class="edit">barvou.</span> 78 78 $names = GetTranslatNames($Text, 0, GetTranslatNamesArray()); 79 79 } else { 80 if (($GroupId == 13)) {80 if (($GroupId == 13)) { 81 81 $names = GetTranslatNames($Text, 0, array('Dictionary' => 'Text', 82 82 'TextGlobalString' => 'Text', 'TextArea' => 'Name', … … 87 87 } 88 88 //$LineAJ[$Column] 89 return ($this->ColorNames(htmlspecialchars($Text),$names));89 return $this->ColorNames(htmlspecialchars($Text),$names); 90 90 } 91 91 … … 93 93 { 94 94 $this->RawPage = true; 95 return (str_replace("\n", '<br/>', $this->LoadNames()));95 return str_replace("\n", '<br/>', $this->LoadNames()); 96 96 } 97 97 }
Note:
See TracChangeset
for help on using the changeset viewer.