Try this version.. Removed the quotes from sortField, added them to

the table headers when the table is printed.
This commit is contained in:
james 2007-01-10 17:19:15 +00:00
parent e43bcb1a7d
commit 8ed5dd3dfc

View File

@ -903,7 +903,7 @@ class TableEditor
} }
} }
if($this->sortField()) if($this->sortField())
$query.=" ORDER BY `".$this->sortField()."`"; $query.=" ORDER BY ".$this->sortField()."";
if($this->rowsPerPage>0) if($this->rowsPerPage>0)
{ {
@ -1031,7 +1031,7 @@ class TableEditor
if($this->sortField()==$f) if($this->sortField()==$f)
echo "<th>".i18n($n)."</th>"; echo "<th>".i18n($n)."</th>";
else else
echo "<th><a href=\"{$_SERVER['PHP_SELF']}?TableEditorAction=sort&amp;sort=$f\">".i18n($n)."</a></th>"; echo "<th><a href=\"{$_SERVER['PHP_SELF']}?TableEditorAction=sort&amp;sort=`$f`\">".i18n($n)."</a></th>";
} }
echo "<th>".i18n("Actions")."</th>"; echo "<th>".i18n("Actions")."</th>";
echo "</tr>"; echo "</tr>";