Skip to content

Commit 92615bb

Browse files
committed
Code clean-up.
1 parent 3ecc205 commit 92615bb

3 files changed

Lines changed: 7 additions & 29 deletions

File tree

‎do_test_header.php‎

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function get_sql_test_data(&$title, &$p)
3636
$totalcount = get_first_value(
3737
"SELECT count(distinct WoID) AS value FROM $testsql"
3838
);
39-
$title = 'Selected ' . $totalcount . ' Term' . ($totalcount==1 ? '' : 's');
39+
$title = 'Selected ' . $totalcount . ' Term' . ($totalcount < 2 ? '' : 's');
4040
$cntlang = get_first_value(
4141
'SELECT count(distinct WoLgID) AS value FROM ' . $testsql
4242
);
@@ -127,16 +127,16 @@ function get_test_counts($testsql)
127127
/**
128128
* Make the header row for tests.
129129
*
130-
* @param string $p URL property to use
130+
* @param string $_p URL property to use
131131
*
132132
* @return void
133133
*/
134-
function do_test_header_row($p)
134+
function do_test_header_row($_p)
135135
{
136136
?>
137137
<a href="edit_texts.php">
138138
<?php echo_lwt_logo(); ?>
139-
<h1 style="display: inline;">LWT</h1>
139+
<span class="bigger">LWT</span>
140140
</a>&nbsp; | &nbsp;
141141
<?php
142142
quickMenu();
@@ -182,8 +182,6 @@ function resetFrames() {
182182
*/
183183
function startWordTest(type, property) {
184184
resetFrames();
185-
//parent.frames['l'].location.href =
186-
//'do_test_test.php?type=' + type + '&' + property;
187185
window.location.href = 'do_test.php?type=' + type + '&' + property;
188186
}
189187

@@ -192,8 +190,6 @@ function startWordTest(type, property) {
192190
*/
193191
function startTestTable(property) {
194192
resetFrames();
195-
//parent.frames['l'].location.href='do_test_table.php?' + property;
196-
//window.location.href='do_test_table.php?' + property;
197193
window.location.href = 'do_test.php?type=table&' + property;
198194
}
199195
</script>
@@ -214,10 +210,10 @@ function startTestTable(property) {
214210
function do_test_header_content($title, $p, $totalcountdue, $totalcount, $language)
215211
{
216212
?>
217-
<h2>TEST&nbsp;▶
213+
<h1>TEST&nbsp;▶
218214
<?php echo tohtml($title)
219215
. ' (Due: ' . $totalcountdue . ' of ' . $totalcount . ')'; ?>
220-
</h2>
216+
</h1>
221217
<div>
222218
<input type="button" value="..[<?php echo $language; ?>].."
223219
onclick="startWordTest(1, '<?php echo $p; ?>')" />
@@ -278,8 +274,6 @@ function get_test_data(&$title, &$p)
278274
*/
279275
function do_test_header_page($title, $p, $totalcountdue, $totalcount, $language)
280276
{
281-
282-
//pagestart_nobody($title, 'html, body {margin-bottom:0;}');
283277
do_test_header_js();
284278

285279
$_SESSION['teststart'] = time() + 2;
@@ -288,7 +282,7 @@ function do_test_header_page($title, $p, $totalcountdue, $totalcount, $language)
288282
$_SESSION['testtotal'] = $totalcountdue;
289283

290284

291-
do_test_header_row($p);
285+
do_test_header_row(null);
292286
do_test_header_content($title, $p, $totalcountdue, $totalcount, $language);
293287
}
294288

@@ -307,11 +301,4 @@ function start_test_header_page($language='L2')
307301
do_test_header_page($title, $p, $totalcountdue, $totalcount, $language);
308302
}
309303

310-
if ((isset($_REQUEST['selection']) && isset($_SESSION['testsql']))
311-
|| isset($_REQUEST['lang'])
312-
|| isset($_REQUEST['text'])
313-
) {
314-
//start_test_header_page();
315-
}
316-
317304
?>

‎do_test_table.php‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@ function get_test_table_sql()
3131
$testsql = $_SESSION['testsql'];
3232
$cntlang = get_first_value('SELECT count(distinct WoLgID) AS value FROM ' . $testsql);
3333
if ($cntlang > 1) {
34-
//pagestart('', false);
3534
echo '<p>Sorry - The selected terms are in ' . $cntlang .
3635
' languages, but tests are only possible in one language at a time.</p>';
37-
//pageend();
3836
exit();
3937
}
4038
} else if (isset($_REQUEST['lang'])) {

‎do_test_test.php‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -605,11 +605,4 @@ function do_test_test_content()
605605
do_test_test_javascript($count2);
606606
}
607607

608-
if (isset($_REQUEST['selection']) || isset($_REQUEST['lang'])
609-
|| isset($_REQUEST['text'])
610-
) {
611-
//do_test_test_content();
612-
}
613-
614-
615608
?>

0 commit comments

Comments
 (0)