Ignore:
Timestamp:
Apr 10, 2024, 11:49:39 PM (9 months ago)
Author:
chronos
Message:
  • Fixed: More form input fields validation.
  • Modified: Code cleanup.
File:
1 edited

Legend:

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

    r893 r900  
    2828    $Table = $TranslationTree[$GroupId]['TablePrefix'];
    2929    if (array_key_exists('action', $_GET)) $Action = $_GET['action'];
    30     else $Action = '';
     30      else $Action = '';
    3131
    3232    if (array_key_exists('ID', $_GET))
     
    5050          foreach ($TranslationTree[$GroupId]['Items'] as $Index => $TextItem)
    5151            $Columns .= ' `Orig`.`'.$TextItem['Column'].'` as `Orig_'.$TextItem['Column'].'`, `Tran`.`'.$TextItem['Column'].'` as `'.$TextItem['Column'].'`,';
    52 
    5352
    5453          $sql = 'SELECT '.$Columns.' Tran.`Entry` FROM `'.$Table.'` as Tran';
     
    175174
    176175          if ($TranslationTree[$GroupId]['WowheadName'] != '')
    177             $WowheadLink = '<a href="http://www.wowhead.com/?'.$TranslationTree[$GroupId]['WowheadName'].
     176            $WowheadLink = '<a href="https://www.wowhead.com/?'.$TranslationTree[$GroupId]['WowheadName'].
    178177              '='.$LineAJ['Entry'].'">'.$LineAJ['Entry'].'</a>';
    179178          else $WowheadLink = $LineAJ['Entry'];
    180179
    181           $Output .= '<input type="hidden" name="entry" value="'.$LineAJ['Entry'].'" />
    182           <input type="hidden" name="user" value="'.$User->Id.'" />
    183           <input type="hidden" name="ID" value="'.$TextID.'" />
    184           <table class="BaseTable">
    185           <tr>
    186           <th>'.T('Text number').': '.$WowheadLink.'</th>
    187           <th>'.T('Not translated').'</th>
    188           <th>'.T('Translated').'</th>
    189           </tr>
    190           <tr>
    191           <th>'.T('Language').'</th>
    192           <td>'.T('Original').'</td>
    193           <td>';
     180          $Output .= '<input type="hidden" name="entry" value="'.$LineAJ['Entry'].'" />'.
     181            '<input type="hidden" name="user" value="'.$User->Id.'" />'.
     182            '<input type="hidden" name="ID" value="'.$TextID.'" />'.
     183            '<table class="BaseTable">'.
     184            '<tr>'.
     185            '<th>'.T('Text number').': '.$WowheadLink.'</th>'.
     186            '<th>'.T('Not translated').'</th>'.
     187            '<th>'.T('Translated').'</th>'.
     188            '</tr>'.
     189            '<tr>'.
     190            '<th>'.T('Language').'</th>'.
     191            '<td>'.T('Original').'</td>'.
     192            '<td>';
    194193          if ($Line['Language'] <> 0) $Language = $Line['Language'];
    195194          else if ($User->Id != 0)
     
    239238                if ($User->Licence(LICENCE_USER))
    240239                  $Output .= '<textarea rows="8" cols="40" onkeydown="ResizeTextArea(this)" class="textedit" id="'.$TextItem['Column'].'" name="'.$TextItem['Column'].'">';
    241                 $Output .=  htmlspecialchars($Line[$TextItem['Column']]);
     240                $Output .= htmlspecialchars($Line[$TextItem['Column']]);
    242241                if ($User->Licence(LICENCE_USER)) $Output .= '</textarea></td></tr>';
    243242              }
Note: See TracChangeset for help on using the changeset viewer.