Merged changes from stable branch up to 2.3.23.
[fa-stable.git] / includes / ui / db_pager_view.inc
index 4bc49948dc312bae82ff99a40624a22f793bd908..bb6574bef14ffbe24d0074bb5356435aa3893890 100644 (file)
@@ -40,7 +40,7 @@ function navi_button_cell($name, $value, $enabled=true, $align='left') {
 //    Sql paged table view. Call this function inside form.
 //
 function display_db_pager(&$pager) {
-    global     $table_style, $use_popup_windows, $use_date_picker, $path_to_root;
+    global     $path_to_root;
 
        $pager->select_records();
 
@@ -61,7 +61,7 @@ function display_db_pager(&$pager) {
                }
        }
     /* show a table of records returned by the sql */
-    start_table("$table_style width=$pager->width");
+    start_table(TABLESTYLE, "width='$pager->width'");
     table_header($headers);
 
        if($pager->header_fun) {        // if set header handler
@@ -103,7 +103,7 @@ function display_db_pager(&$pager) {
                   }
                   switch($coltype) { // format column
                    case 'time':
-                         label_cell($cell, "width=40"); break;
+                         label_cell($cell, "width='40'"); break;
                    case 'date':
                          label_cell(sql2date($cell), "align='center' nowrap"); break;
                    case 'dstamp':      // time stamp displayed as date
@@ -162,7 +162,7 @@ function display_db_pager(&$pager) {
 
        start_row("class='navibar'");
        $colspan = count($pager->columns);
-               $inact = $pager->inactive_ctrl==true 
+               $inact = @$pager->inactive_ctrl==true 
                        ? ' '.checkbox(null, 'show_inactive', null, true). _("Show also Inactive") : '';
         if($pager->rec_count) {
                echo "<td colspan=$colspan class='navibar' style='border:none;padding:3px;'>";
@@ -170,7 +170,7 @@ function display_db_pager(&$pager) {
                $but_pref = $pager->name.'_page_';
            start_table();
                start_row();
-               if ($pager->inactive_ctrl) 
+               if (@$pager->inactive_ctrl) 
                                submit('Update', _('Update'), true, '', null); // inactive update
                echo navi_button_cell($but_pref.'first', _('First'), $pager->first_page, 'right');
                echo navi_button_cell($but_pref.'prev', _('Prev'), $pager->prev_page,'right');
@@ -203,4 +203,3 @@ function display_db_pager(&$pager) {
 }
 
 
-?>
\ No newline at end of file