Ignore:
Timestamp:
Apr 7, 2020, 10:15:48 PM (5 years ago)
Author:
chronos
Message:
  • Modified: Improved code formatting.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Translation/LoadNames.php

    r859 r880  
    1818    }
    1919  //   }
    20     return ($Text);
     20    return $Text;
    2121  }
    2222  function ReplaceNotTranslated($orig,$tran,$Text,$ID,$Group)
     
    2626    $Text = str_replace(' '.$orig,' <span title="Kliknutím přeložíš" class="needtran"><a class="needtran" target="_NEW2" href="'.
    2727      $this->System->Link('/form.php?group='.$Group.'&amp;ID='.$ID).'">'.$orig_replace.'</a></span>',$Text);
    28     return ($Text);
     28    return $Text;
    2929  }
    3030
     
    4444    $Text = str_replace('$r','<span Title="Znamená rasu hráče, překladu zachovej na stejné pozici." class="edit">$R</span>',$Text);
    4545    $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) {
    4747     if (($_GET['ID'] <> $Line[0]) or ($Line[1] <> $_GET['GroupId']))
    4848      if ($Line[3] <> '')  {
     
    6161
    6262    $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);
    6767    $Table = $TranslationTree[$GroupId]['TablePrefix'];
    6868    $DbResult = $this->System->Database->query('SELECT * FROM `'.$Table.'` WHERE `ID` = '.$_GET['ID'].' LIMIT 1');
     
    7373          $names = array();
    7474          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))
    7676          {
    7777            //<span class="edit">barvou.</span>
    7878            $names = GetTranslatNames($Text, 0, GetTranslatNamesArray());
    7979          } else {
    80             if(($GroupId == 13)) {
     80            if (($GroupId == 13)) {
    8181              $names = GetTranslatNames($Text, 0, array('Dictionary' => 'Text',
    8282                'TextGlobalString' => 'Text', 'TextArea' => 'Name',
     
    8787          }
    8888                                   //$LineAJ[$Column]
    89           return ($this->ColorNames(htmlspecialchars($Text),$names));
     89          return $this->ColorNames(htmlspecialchars($Text),$names);
    9090    }
    9191
     
    9393  {
    9494    $this->RawPage = true;
    95     return(str_replace("\n", '<br/>', $this->LoadNames()));
     95    return str_replace("\n", '<br/>', $this->LoadNames());
    9696  }
    9797}
Note: See TracChangeset for help on using the changeset viewer.