Changeset 304 for trunk/export/index.php


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.
File:
1 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');
Note: See TracChangeset for help on using the changeset viewer.