Skip to content

Commit 3135c8e

Browse files
author
LWT Project
committed
Version 1.5.8 (26-Jun-2013 12:47)
1 parent d48fe54 commit 3135c8e

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎info.htm‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2381,7 +2381,7 @@ <h4>
23812381
<ul>
23822382

23832383
<li>1.5.8 (June ?? 2013):<br />
2384-
Optimization of text display query.
2384+
Optimization of text and print display SQL queries (reducing query time by up to thirty percent).
23852385
</li>
23862386

23872387
<li>1.5.7 (June 25 2013):<br />

‎install_demo_db.sql.gz‎

8 Bytes
Binary file not shown.

‎print_text.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ function output_text($saveterm,$saverom,$savetrans,$savetags,
158158
echo "<div id=\"print\"" . ($rtlScript ? ' dir="rtl"' : '') . ">";
159159
echo '<p style="' . ($removeSpaces ? 'word-break:break-all;' : '') . 'font-size:' . $textsize . '%;line-height: 1.35; margin-bottom: 10px; ">' . tohtml($title) . '<br /><br />';
160160

161-
$sql = 'select TiWordCount as Code, TiText, TiOrder, TiIsNotWord, WoID, WoTranslation, WoRomanization from (' . $tbpref . 'textitems left join ' . $tbpref . 'words on (TiTextLC = WoTextLC) and (TiLgID = WoLgID) ' . $whstatus . ') where TiTxID = ' . $textid . ' and (not (TiWordCount > 1 and WoID is null)) order by TiOrder asc, TiWordCount desc';
161+
$sql = 'select TiWordCount as Code, TiText, TiOrder, TiIsNotWord, WoID, WoTranslation, WoRomanization, IFNULL( CONCAT( \'[\', GROUP_CONCAT( DISTINCT TgText ORDER BY TgText SEPARATOR \', \' ), \']\' ) , \'\') AS taglist from ( ' . $tbpref . 'textitems LEFT JOIN ( ( ' . $tbpref . 'words LEFT JOIN ' . $tbpref . 'wordtags ON WoID = WtWoID ) LEFT JOIN ' . $tbpref . 'tags ON TgID = WtTgID ) ON ( TiTextLC = WoTextLC ) AND ( TiLgID = WoLgID ) ' . $whstatus . ') where TiTxID = ' . $textid . ' and (not (TiWordCount > 1 and WoID is null)) GROUP BY TiOrder, TiWordCount order by TiOrder asc, TiWordCount desc';
162162

163163
$saveterm = '';
164164
$savetrans = '';
@@ -199,7 +199,7 @@ function output_text($saveterm,$saverom,$savetrans,$savetags,
199199
$savetags = '';
200200
if(isset($record['WoID'])) {
201201
$savetrans = $record['WoTranslation'];
202-
$savetags = getWordTagList($record['WoID'],'',1,0);
202+
$savetags = $record['taglist'];
203203
if ($savetrans == '*') $savetrans = '';
204204
}
205205
$saverom = trim(isset($record['WoRomanization']) ?

0 commit comments

Comments
 (0)