Changeset 353 for trunk/export/index.php


Ignore:
Timestamp:
Mar 3, 2010, 1:42:04 PM (15 years ago)
Author:
george
Message:
  • Opraveno: U exportů v tabulce výpisu překladatelů také používat přímo sloupec počtu překladů TranslatedCount.
  • Opraveno: Nemazat překladatele, kteří mají vytvořen nějaký export.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/export/index.php

    r329 r353  
    178178    else $InitialOrder = '';
    179179
    180   $Columns = '';
    181   $Joins = '';
    182   foreach($TranslationTree as $Group)
    183     if($Group['TablePrefix'] != '')
    184     {
    185       $Columns .= 'COALESCE(T'.$Group['Id'].'.Count, 0) + ';
    186       $Joins .= ' LEFT JOIN (SELECT User, COUNT(User) as Count FROM `'.$Group['TablePrefix'].'` WHERE (Complete = 1) AND (Language <> 0) GROUP BY User) as T'.$Group['Id'].' ON user.ID=T'.$Group['Id'].'.User';
    187     }
    188   $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';
     180  $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, TranslatedCount FROM `user`) AS T';
    189181  $Query .=' LEFT JOIN ExportUser ON ExportUser.Export = '.$_GET['ExportId'].' AND ExportUser.User=T.ID';
    190182  $Query .=' WHERE T.TranslatedCount > 0 ORDER BY COALESCE(ExportUser.Sequence, 100000000)'.$InitialOrder.') AS TT';
Note: See TracChangeset for help on using the changeset viewer.