Changeset 108 for trunk/addon/make.php


Ignore:
Timestamp:
Feb 18, 2009, 8:33:41 PM (16 years ago)
Author:
george
Message:
  • Upraveno: Zobrazovat v ladících běhových informacích také povolené maximální hodnoty paměti a doby běhu.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/addon/make.php

    r99 r108  
    9090  $SelectedUsers = substr($SelectedUsers, 1);
    9191
    92   if($SelectedUsers == '') $WhereUsers = 1;
    93     else $WhereUsers = '(User IN ('.$SelectedUsers.'))';
     92  if($SelectedUsers == '')
     93  {
     94        $WhereUsers = 1;
     95        $OrderByUserList = '';
     96  } else
     97  {
     98        $WhereUsers = '(User IN ('.$SelectedUsers.'))';
     99        $OrderByUserList = ' ORDER BY FIELD(User, '.$SelectedUsers.')';
     100  }
    94101       
    95102  foreach($TranslationTree as $Group)
     
    110117
    111118      $Buffer = 'CZWOW_'.$Column['AddonFileName'].
    112             '_count='.$FileIndex.'; CZWOW_'.$Column['AddonFileName'].'_'.$FileIndex.'={';         
     119            '_count='.$FileIndex.'; CZWOW_'.$Column['AddonFileName'].'_'.$FileIndex.'={';
    113120   
    114       $Query = 'SELECT T2.'.$Column['Column'].' AS Translation, T3.'.$Column['Column'].' as Original FROM (SELECT T1.entry, T1.'.$Column['Column'].' FROM (SELECT entry,'.$Column['Column'].' FROM '.$Group['TablePrefix'].' WHERE (Complete = 1) AND '.$WhereLang.' AND '.$WhereUsers.' ORDER BY FIELD(User, '.$SelectedUsers.')) AS T1 GROUP BY T1.entry) as T2 JOIN '.$Group['TablePrefix'].' AS T3 ON (T2.entry = T3.entry) AND (T3.Language = 0)';
     121      $Query = 'SELECT T2.'.$Column['Column'].' AS Translation, T3.'.$Column['Column'].' as Original FROM (SELECT T1.entry, T1.'.$Column['Column'].' FROM (SELECT entry,'.$Column['Column'].' FROM '.$Group['TablePrefix'].' WHERE (Complete = 1) AND '.$WhereLang.' AND '.$WhereUsers.$OrderByUserList.') AS T1 GROUP BY T1.entry) as T2 JOIN '.$Group['TablePrefix'].' AS T3 ON (T2.entry = T3.entry) AND (T3.Language = 0)';
    115122      $DbResult = $Database->SQLCommand($Query);
    116123      while($Line = mysql_fetch_array($DbResult))
     
    156163  $SelectedUsers = substr($SelectedUsers, 1);
    157164
    158   if($SelectedUsers == '') $WhereUsers = 1;
    159     else $WhereUsers = '(User IN ('.$SelectedUsers.'))';
     165  if($SelectedUsers == '')
     166  {
     167        $WhereUsers = 1;
     168        $OrderByUserList = '';
     169  } else
     170  {
     171        $WhereUsers = '(User IN ('.$SelectedUsers.'))';
     172        $OrderByUserList = ' ORDER BY FIELD(User, '.$SelectedUsers.')';
     173  }
    160174       
    161175  $Buffer = "local f=function(name, en, cz) CzWoW_interface[name]=cz; CzWoW_interface_entoname[en]=name; end; CzWoW_interface={ };CzWoW_interface_entoname={ };\n";
    162176  $Group = $TranslationTree[9]; // client table
    163177  $Column['Column'] = 'Text';
    164   $Query = 'SELECT T2.'.$Column['Column'].' AS Translation, T3.'.$Column['Column'].' as Original, T3.id_text FROM (SELECT T1.entry, T1.'.$Column['Column'].' FROM (SELECT entry,'.$Column['Column'].' FROM '.$Group['TablePrefix'].' WHERE (Complete = 1) AND '.$WhereLang.' AND '.$WhereUsers.' ORDER BY FIELD(User, '.$SelectedUsers.')) AS T1 GROUP BY T1.entry) as T2 JOIN '.$Group['TablePrefix'].' AS T3 ON (T2.entry = T3.entry) AND (T3.Language = 0)';
     178  $Query = 'SELECT T2.'.$Column['Column'].' AS Translation, T3.'.$Column['Column'].' as Original, T3.id_text FROM (SELECT T1.entry, T1.'.$Column['Column'].' FROM (SELECT entry,'.$Column['Column'].' FROM '.$Group['TablePrefix'].' WHERE (Complete = 1) AND '.$WhereLang.' AND '.$WhereUsers.$OrderByUserList.') AS T1 GROUP BY T1.entry) as T2 JOIN '.$Group['TablePrefix'].' AS T3 ON (T2.entry = T3.entry) AND (T3.Language = 0)';
    165179  $DbResult = $Database->SQLCommand($Query);
    166180  while($Line = mysql_fetch_array($DbResult))
Note: See TracChangeset for help on using the changeset viewer.