Changeset 1431486
- Timestamp:
- 06/06/2016 02:47:28 PM (10 years ago)
- Location:
- your-tables/trunk
- Files:
-
- 2 edited
-
admin/class-your-tables-menus.php (modified) (1 diff)
-
includes/class-your-tables-view.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
your-tables/trunk/admin/class-your-tables-menus.php
r1431155 r1431486 38 38 $capa = 'your_tables_cap_admin'; 39 39 } // another capability is needed for our own base tables 40 add_submenu_page( 'your-tables-menu', $row->label_multiple_items, $row->label_multiple_items, $capa, 'your-tables-table-' . $row->name, array(40 add_submenu_page( 'your-tables-menu', htmlspecialchars($row->label_multiple_items, ENT_QUOTES, 'UTF-8'), htmlspecialchars($row->label_multiple_items, ENT_QUOTES, 'UTF-8'), $capa, 'your-tables-table-' . $row->name, array( 41 41 $admin, 42 42 $row->name -
your-tables/trunk/includes/class-your-tables-view.php
r1431155 r1431486 73 73 $order_by = ' order by ' . sanitize_sql_orderby($tableRow->order_by) ; 74 74 } 75 $valuerows = $wpdb->get_results( 76 $wpdb->prepare( 'select ' . implode( ',', $fields ) . ' from ' . $table . $order_by, null ) 77 ); 75 $valuerows = $wpdb->get_results( 'select ' . implode( ',', $fields ) . ' from ' . $table . $order_by ); 78 76 echo '</thead><tbody id="the-list">'; 79 77 foreach ( $valuerows as $valuerow ) { … … 84 82 $display_value = $transToLabels[ $field ][ $valuerow->$field ]; 85 83 } 86 if ( $dateFormats[ $field ] && $valuerow->$field ) {84 if ( isset($dateFormats[ $field ]) && $dateFormats[ $field ] && $valuerow->$field ) { 87 85 $myDt = date_create_from_format( 'Y-m-d H:i:s', $valuerow->$field ); 88 86 $display_value = $myDt->format( $this->ConvertDateJavascriptToPhp( $dateFormats[ $field ] ) ); … … 91 89 } 92 90 } 93 if ( $dateFormats[ $field ] && ! $valuerow->$field ) {91 if ( isset($dateFormats[ $field ]) && $dateFormats[ $field ] && ! $valuerow->$field ) { 94 92 $display_value = ''; 95 93 }
Note: See TracChangeset
for help on using the changeset viewer.