summaryrefslogtreecommitdiff
path: root/db_table.class
diff options
context:
space:
mode:
authorChristian Schneider2007-06-21 13:11:54 +0000
committerChristian Schneider2007-06-21 13:11:54 +0000
commitadb956699853707c7a400f8a3ba5ac848d5f96b3 (patch)
tree031d4d6784f46de637067930bd592da8befb3dcc /db_table.class
parentd382ff414092c1988e61df2464570eac2667fbf8 (diff)
downloaditools-adb956699853707c7a400f8a3ba5ac848d5f96b3.tar.gz
itools-adb956699853707c7a400f8a3ba5ac848d5f96b3.tar.bz2
itools-adb956699853707c7a400f8a3ba5ac848d5f96b3.zip
Fix sorting with additional url parameters (used in AdServer)
Diffstat (limited to 'db_table.class')
-rw-r--r--db_table.class9
1 files changed, 3 insertions, 6 deletions
diff --git a/db_table.class b/db_table.class
index e38ecec..f45155f 100644
--- a/db_table.class
+++ b/db_table.class
@@ -302,9 +302,6 @@ function dump_html($tableargs="", $sqlwhere="", $c_fields="", $c_descriptions=""
echo "<table $tableargs>\n";
- if (empty($thispage)) $thispage = $_SERVER['PHP_SELF'];
- if (strstr($thispage, "?")) $thispage .= "&"; else $thispage .= "?";
-
/* Wenn man keine Titelzeile will, für c_descriptions einfach "," angeben */
if ($descriptions[0])
{
@@ -313,7 +310,7 @@ function dump_html($tableargs="", $sqlwhere="", $c_fields="", $c_descriptions=""
{
if ($_REQUEST[$table_sort] == $fields[$i])
{
- $newsort = "$_REQUEST[$table_sort]+DESC";
+ $newsort = "$_REQUEST[$table_sort] DESC";
$sortimg = '<img src="/icons/down.gif" border="0" width="10" height="11" alt="">';
}
else if ($_REQUEST[$table_sort] == "$fields[$i] DESC")
@@ -329,8 +326,8 @@ function dump_html($tableargs="", $sqlwhere="", $c_fields="", $c_descriptions=""
echo "<th align=\"left\">\n";
echo "<table border=\"0\">\n<tr valign=\"middle\">\n";
- echo '<td><a href="'. $thispage . $table_sort .'='. $newsort .'">'. $descriptions[$i] .'</a></td>';
- echo '<td><a href="'. $thispage . $table_sort .'='. $newsort .'">'. $sortimg .'</a></td>';
+ echo '<td><a href="'. it_html::U($thispage, array($table_sort => $newsort) + $_GET) .'">'. $descriptions[$i] .'</a></td>';
+ echo '<td><a href="'. it_html::U($thispage, array($table_sort => $newsort) + $_GET) .'">'. $sortimg .'</a></td>';
echo "</tr>\n</table>\n";
echo "</th>\n";
}