[Phplib-commit] CVS: php-lib/php/html table.inc,1.1,1.2
Brought to you by:
nhruby,
richardarcher
From: Richard A. <ric...@us...> - 2002-04-25 02:33:09
|
Update of /cvsroot/phplib/php-lib/php/html In directory usw-pr-cvs1:/tmp/cvs-serv3596 Modified Files: table.inc Log Message: synch with -stable Index: table.inc =================================================================== RCS file: /cvsroot/phplib/php-lib/php/html/table.inc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** table.inc 13 Apr 2000 13:28:49 -0000 1.1 --- table.inc 25 Apr 2002 02:33:06 -0000 1.2 *************** *** 3,7 **** * PHP Base Library * ! * Copyright (c) 1998,1999 NetUSE GmbH * Boris Erdmann, Kristian Koehntopp, * Jeffrey Galbraith --- 3,7 ---- * PHP Base Library * ! * Copyright (c) 1998-2000 NetUSE AG * Boris Erdmann, Kristian Koehntopp, * Jeffrey Galbraith *************** *** 289,295 **** --- 289,298 ---- # Comments : # History : 990618 - Fixed return on select_colnames (JSG). + # : 020424 - Assume $row = 0 for header. Avoid PHP uninitialized + # variable error (LEH). #========================================================================== function table_heading_row($data, $class="") { + $row = 0; if (!is_array($data)) return; *************** *** 302,306 **** # call virtual function ! if ($this->add_extra) $this->table_heading_row_add_extra($data, $class); --- 305,309 ---- # call virtual function ! if (isset($this->add_extra) && $this->add_extra) $this->table_heading_row_add_extra($data, $class); *************** *** 323,327 **** global $debug; ! if (@$debug) printf("<p>show_table_rows()<br>\n"); --- 326,330 ---- global $debug; ! if ($debug) printf("<p>show_table_rows()<br>\n"); *************** *** 356,360 **** global $debug; ! if (@$debug) printf("<p>show_table_rows_result()<br>\n"); --- 359,363 ---- global $debug; ! if ($debug) printf("<p>show_table_rows_result()<br>\n"); *************** *** 393,397 **** global $debug; ! if (@$debug) printf("<p>show_table_page_rows()<br>\n"); --- 396,400 ---- global $debug; ! if ($debug) printf("<p>show_table_page_rows()<br>\n"); *************** *** 433,437 **** global $debug; ! if (@$debug) printf("<p>show_table_page_rows_result()<br>\n"); --- 436,440 ---- global $debug; ! if ($debug) printf("<p>show_table_page_rows_result()<br>\n"); *************** *** 470,474 **** global $debug; ! if (@$debug) printf("<p>table_row()<br>\n"); --- 473,477 ---- global $debug; ! if ($debug) printf("<p>table_row()<br>\n"); *************** *** 479,483 **** # call virtual function ! if ($this->add_extra) $this->table_row_add_extra($row, $row_key, $data, $class); --- 482,486 ---- # call virtual function ! if (isset($this->add_extra) && $this->add_extra) $this->table_row_add_extra($row, $row_key, $data, $class); *************** *** 505,513 **** global $debug; ! if (@$debug) printf("<p>set_checkbox_heading()<br>\n"); ## Checkbox handling... ! if ($this->check) $this->table_heading_cell(0, " ", $class); } --- 508,516 ---- global $debug; ! if ($debug) printf("<p>set_checkbox_heading()<br>\n"); ## Checkbox handling... ! if (isset($this->check) && $this->check) $this->table_heading_cell(0, " ", $class); } *************** *** 530,538 **** global $debug; ! if (@$debug) printf("<p>set_checkbox()<br>\n"); ## Checkbox handling... ! if ($this->check) $this->table_checkbox_cell($row, $row_key, $data, $class); } --- 533,541 ---- global $debug; ! if ($debug) printf("<p>set_checkbox()<br>\n"); ## Checkbox handling... ! if (isset($this->check) && $this->check) $this->table_checkbox_cell($row, $row_key, $data, $class); } *************** *** 548,551 **** --- 551,555 ---- # Comments : # History : 990618 - Fixed problem with filtering headers (JSG). + # : 020424 - Fixed code typo - changed $cell=0 to $col=0 (LEH). #========================================================================== function show_table_heading_cells($data, $class="") *************** *** 553,557 **** global $debug; ! if (@$debug) printf("<p>show_table_heading_cells()<br>\n"); --- 557,561 ---- global $debug; ! if ($debug) printf("<p>show_table_heading_cells()<br>\n"); *************** *** 559,563 **** return 0; ! $cell = 0; $d = $this->select_colnames($data); --- 563,567 ---- return 0; ! $col = 0; $d = $this->select_colnames($data); *************** *** 589,593 **** global $debug; ! if (@$debug) printf("<p>show_table_cells()<br>\n"); --- 593,597 ---- global $debug; ! if ($debug) printf("<p>show_table_cells()<br>\n"); *************** *** 602,606 **** while(list($key, $val) = each($d)) { ! $this->table_cell($row, $cell++, $val, $data[$val], $class); } --- 606,611 ---- while(list($key, $val) = each($d)) { ! if (isset($data[$val])) ! $this->table_cell($row, $cell++, $val, $data[$val], $class); } *************** *** 655,659 **** ## Check for column name remapping ! if ($this->verify_array($this->map_cols)) { reset($this->map_cols); --- 660,664 ---- ## Check for column name remapping ! if (isset($this->map_cols) && $this->verify_array($this->map_cols)) { reset($this->map_cols); *************** *** 831,838 **** global $debug; ! if (@$debug) printf("<p>select_colnames()<br>\n"); ! if (!is_array($this->fields) && is_array($data)) { reset($data); --- 836,843 ---- global $debug; ! if ($debug) printf("<p>select_colnames()<br>\n"); ! if (!(isset($this->fields) && is_array($this->fields)) && is_array($data)) { reset($data); *************** *** 845,849 **** $d = $this->fields; ! if (@$debug) { print_array($d); --- 850,854 ---- $d = $this->fields; ! if ($debug) { print_array($d); *************** *** 882,886 **** global $debug; ! if (@$debug) printf("<p>table_open()<br>\n"); --- 887,891 ---- global $debug; ! if ($debug) printf("<p>table_open()<br>\n"); *************** *** 902,906 **** global $debug; ! if (@$debug) printf("<p>table_close()<br>\n"); --- 907,911 ---- global $debug; ! if ($debug) printf("<p>table_close()<br>\n"); |