Changeset 6519
- Timestamp:
- Jun 10, 2010, 11:08:34 PM (14 years ago)
- Location:
- branches/2.1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.1/include/functions_search.inc.php
r6364 r6519 224 224 { 225 225 $query = ' 226 SELECT DISTINCT(id)226 SELECT id 227 227 FROM '.IMAGES_TABLE.' i 228 228 INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id -
branches/2.1/search.php
r6364 r6519 40 40 if (!is_array($post_value)) 41 41 { 42 $_POST[$post_key] = mysql_real_escape_string($post_value);42 $_POST[$post_key] = pwg_db_real_escape_string($post_value); 43 43 } 44 44 } … … 107 107 { 108 108 $search['fields'][$type_date.'-after'] = array( 109 'date' => join( 110 '-', 111 array( 112 $_POST['start_year'], 113 $_POST['start_month'] != 0 ? $_POST['start_month'] : '01', 114 $_POST['start_day'] != 0 ? $_POST['start_day'] : '01', 115 ) 109 'date' => sprintf( 110 '%d-%02d-%02d', 111 $_POST['start_year'], 112 $_POST['start_month'] != 0 ? $_POST['start_month'] : '01', 113 $_POST['start_day'] != 0 ? $_POST['start_day'] : '01' 116 114 ), 117 115 'inc' => true, … … 122 120 { 123 121 $search['fields'][$type_date.'-before'] = array( 124 'date' => join( 125 '-', 126 array( 127 $_POST['end_year'], 128 $_POST['end_month'] != 0 ? $_POST['end_month'] : '12', 129 $_POST['end_day'] != 0 ? $_POST['end_day'] : '31', 130 ) 131 ), 122 'date' => sprintf( 123 '%d-%02d-%02d', 124 $_POST['end_year'], 125 $_POST['end_month'] != 0 ? $_POST['end_month'] : '12', 126 $_POST['end_day'] != 0 ? $_POST['end_day'] : '31' 127 ), 132 128 'inc' => true, 133 129 );
Note: See TracChangeset
for help on using the changeset viewer.