diff -up a/form_alter_ui.admin.inc b/form_alter_ui.admin.inc
--- a/form_alter_ui.admin.inc	2013-04-19 08:24:42.000000000 -0700
+++ b/form_alter_ui.admin.inc	2013-06-22 01:03:10.000000000 -0700
@@ -45,13 +45,17 @@ function form_alter_ui_settings($form, &
     t('Operations'),
   );
 
-  $sql = 'SELECT form_id, timestamp, location FROM {form_alter_ui_log}';
-  $tablesort = tablesort_sql($header);
-
-  $result = pager_query($sql . $tablesort, 10);
+  $result = db_select('form_alter_ui_log', 'f')
+     ->fields('f', array('form_id', 'timestamp', 'location'))
+	 ->extend('TableSort')
+	 ->orderByHeader($header)
+	 ->extend('PagerDefault')
+	 ->limit(10)
+	 ->execute()
+	 ->fetchAll();
 
   $rows = array();
-  while ($row = db_query($result)) {
+  foreach ($result as $row) {
 
     $alterations = form_alter_ui_load_alteration($row->form_id);
     if ($alterations->alterations) {
@@ -60,12 +64,12 @@ function form_alter_ui_settings($form, &
       // $links .= ', '. l('export', 'admin/structure/form_alter/'. $row->form_id .'/export');
     }
     else {
-      $links = t('create', 'admin/config/form_alter/alter/' . $row->form_id);
+      $links = l('create', 'admin/config/form_alter/alter/' . $row->form_id);
     }
 
     $rows[] = array(
       $row->form_id,
-      format_date($row->timestamp) . ' ' . t('view', $row->location),
+      format_date($row->timestamp) . ' ' . l('view', $row->location),
       $links,
     );
   }
