Changeset 304


Ignore:
Timestamp:
Jan 4, 2010, 11:05:37 AM (15 years ago)
Author:
george
Message:
  • Opraveno: Řazení dle sloupce Pořadí u tabulky výběru překladatelů pro Export.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/export/index.php

    r303 r304  
    175175  ); 
    176176  $Order = GetOrderTableHeader($TableColumns, 'TranslatedCount', 1);
     177  if($Order['Column'] != 'Sequence2') $InitialOrder = ', '.substr($Order['SQL'], 10);
     178    else $InitialOrder = '';
    177179
    178180  $Columns = '';
     
    186188  $Query = 'SELECT (@I := @I + 1) AS Sequence2, TT.* FROM (SELECT ExportUser.Sequence, T.ID, T.TranslatedCount, T.user, T.XP FROM (SELECT user.ID, user.user, user.XP, ('.substr($Columns, 0, -3).') as TranslatedCount FROM `user`'.$Joins.') AS T';
    187189  $Query .=' LEFT JOIN ExportUser ON ExportUser.Export = '.$_GET['ExportId'].' AND ExportUser.User=T.ID';
    188   $Query .=' WHERE T.TranslatedCount > 0 ORDER BY COALESCE(ExportUser.Sequence, 100000000), '.substr($Order['SQL'], 10).') AS TT';
     190  $Query .=' WHERE T.TranslatedCount > 0 ORDER BY COALESCE(ExportUser.Sequence, 100000000)'.$InitialOrder.') AS TT';
    189191
    190192  $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM ('.$Query.') AS X');
  • trunk/includes/global_function.php

    r299 r304  
    132132  return(array(
    133133    'SQL' => ' ORDER BY '.$_SESSION['OrderCol'].' '.$OrderDirSQL[$_SESSION['OrderDir']],
    134     'Output' => '<tr>'.$Result.'</tr>')
    135   );
     134    'Output' => '<tr>'.$Result.'</tr>',
     135    'Column' => $_SESSION['OrderCol'],
     136    'Direction' => $_SESSION['OrderDir'],
     137  ));
    136138}
    137139
Note: See TracChangeset for help on using the changeset viewer.