Changeset 108 for trunk/addon/make.php
- Timestamp:
- Feb 18, 2009, 8:33:41 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/addon/make.php
r99 r108 90 90 $SelectedUsers = substr($SelectedUsers, 1); 91 91 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 } 94 101 95 102 foreach($TranslationTree as $Group) … … 110 117 111 118 $Buffer = 'CZWOW_'.$Column['AddonFileName']. 112 '_count='.$FileIndex.'; CZWOW_'.$Column['AddonFileName'].'_'.$FileIndex.'={'; 119 '_count='.$FileIndex.'; CZWOW_'.$Column['AddonFileName'].'_'.$FileIndex.'={'; 113 120 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)'; 115 122 $DbResult = $Database->SQLCommand($Query); 116 123 while($Line = mysql_fetch_array($DbResult)) … … 156 163 $SelectedUsers = substr($SelectedUsers, 1); 157 164 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 } 160 174 161 175 $Buffer = "local f=function(name, en, cz) CzWoW_interface[name]=cz; CzWoW_interface_entoname[en]=name; end; CzWoW_interface={ };CzWoW_interface_entoname={ };\n"; 162 176 $Group = $TranslationTree[9]; // client table 163 177 $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)'; 165 179 $DbResult = $Database->SQLCommand($Query); 166 180 while($Line = mysql_fetch_array($DbResult))
Note:
See TracChangeset
for help on using the changeset viewer.