Changeset 20461 for extensions
- Timestamp:
- Jan 29, 2013, 10:21:43 PM (11 years ago)
- Location:
- extensions
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/rv_db_integrity/check_db.php
r8897 r20461 8 8 $query = ' 9 9 DESCRIBE '.$reft.' '.$reff; 10 $row = mysql_fetch_assoc( pwg_query($query) );10 $row = pwg_db_fetch_assoc( pwg_query($query) ); 11 11 $ref_nullable = ( $row['Null'] != ''); 12 12 … … 21 21 22 22 $result = pwg_query($query); 23 return mysql_num_rows($result);23 return pwg_db_num_rows($result); 24 24 } 25 25 … … 99 99 FROM '.CATEGORIES_TABLE.' c INNER JOIN '.OLD_PERMALINKS_TABLE.' op ON c.permalink=op.permalink'; 100 100 $result = pwg_query($query); 101 $tpl_var['result'] = mysql_num_rows($result);102 while ($row= mysql_fetch_assoc($result))101 $tpl_var['result'] = pwg_db_num_rows($result); 102 while ($row=pwg_db_fetch_assoc($result)) 103 103 { 104 104 $tpl_var['errors'][] = $row['permalink'].' matches categories '.$row['id'].' and '.$row['cat_id']; … … 122 122 WHERE (ic.category_id IS NULL OR ic.image_id IS NULL) AND i.storage_category_id IS NOT NULL'; 123 123 $result = pwg_query($query); 124 $tpl_var['result'] = mysql_num_rows($result);124 $tpl_var['result'] = pwg_db_num_rows($result); 125 125 $i=0; 126 while ($row= mysql_fetch_assoc($result) and $i<=50 )126 while ($row=pwg_db_fetch_assoc($result) and $i<=50 ) 127 127 { 128 128 $tpl_var['errors'][] = $row['path'].' missing entry ('.$row['id'].','.$row['storage_category_id']. ') in #'.IMAGE_CATEGORY_TABLE; -
extensions/rv_gmaps/trunk/include/functions.php
r13092 r20461 28 28 ORDER BY NULL 29 29 LIMIT 0,1'; 30 if ( mysql_num_rows(pwg_query($query))> 0)30 if ( pwg_db_num_rows(pwg_query($query))> 0) 31 31 return true; 32 32 return false; -
extensions/rv_gmaps/trunk/include/functions_map.php
r18928 r20461 319 319 $uppercats_list = array(); 320 320 $cat_bounds = array(); 321 while ($row = mysql_fetch_assoc($result))322 { 323 array_push($uppercats_list, $row['uppercats']);321 while ($row = pwg_db_fetch_assoc($result)) 322 { 323 $uppercats_list[] = $row['uppercats']; 324 324 $cat_id = $row['cat_id']; 325 325 unset( $row['cat_id'], $row['uppercats'] ); … … 363 363 364 364 365 function marray_from_query($query)366 {367 $ret = array();368 $result = pwg_query($query);369 while ($row = mysql_fetch_assoc($result))370 $ret[] = $row;371 return $ret;372 }373 374 365 define('RVM_BUILD_ARRAY', 0); 375 366 define('RVM_BUILD_HASH', 1); … … 398 389 { 399 390 case RVM_BUILD_ARRAY: 400 $func = ' marray_from_query';391 $func = 'array_from_query'; 401 392 $group_by = ' 402 393 GROUP BY i.id'; … … 408 399 break; 409 400 case RVM_BUILD_AGGREGATE: 410 $func = ' marray_from_query';401 $func = 'array_from_query'; 411 402 $group_by = ''; 412 403 break; -
extensions/rv_gmaps/trunk/kml.php
r17513 r20461 82 82 $categories = array(); 83 83 $thumbnail_ids=array(); 84 while ($row = mysql_fetch_assoc($result))84 while ($row = pwg_db_fetch_assoc($result)) 85 85 { 86 array_push($categories, $row);86 $categories[] = $row; 87 87 if (isset($row['representative_picture_id']) and is_numeric($row['representative_picture_id'])) 88 array_push($thumbnail_ids, $row['representative_picture_id'] );88 $thumbnail_ids[] = $row['representative_picture_id']; 89 89 } 90 90 $thumbnail_src_of = array(); … … 96 96 WHERE id IN ('.implode(',', $thumbnail_ids).')'; 97 97 $result = pwg_query($query); 98 while ($row = mysql_fetch_assoc($result))98 while ($row = pwg_db_fetch_assoc($result)) 99 99 $thumbnail_src_of[$row['id']] = DerivativeImage::thumb_url($row); 100 100 unset($thumbnail_ids); -
extensions/rv_gmaps/trunk/mapl.php
r18669 r20461 77 77 LIMIT 0,5 78 78 ;'; 79 $result = pwg_query($query); 80 $categories=array(); 81 while ($row=mysql_fetch_assoc($result)) 82 array_push($categories, $row); 79 $categories = array_from_query($query); 83 80 $categories = add_level_to_tags($categories); 84 81 -
extensions/rv_sitemap/sitemap.php
r17516 r20461 122 122 WHERE max_date_last IS NOT NULL 123 123 ORDER BY global_rank'; 124 $result = pwg_query($query); 125 $categories = array(); 126 while ($row = mysql_fetch_assoc($result)) 127 { 128 $categories[] = $row; 129 } 124 $categories = array_from_query($query); 130 125 usort($categories, 'global_rank_compare'); 131 126 … … 205 200 $result = pwg_query($query); 206 201 $tag_infos = array(); 207 while ($row = mysql_fetch_assoc($result))202 while ($row = pwg_db_fetch_assoc($result)) 208 203 { 209 204 $tag_infos[$row['tag_id']]= max( $row['da'],$row['dc'],$row['dm']); … … 241 236 LIMIT '.$photo_count; 242 237 $result = pwg_query($query); 243 while ($row = mysql_fetch_assoc($result))238 while ($row = pwg_db_fetch_assoc($result)) 244 239 { 245 240 $url = make_picture_url( array(
Note: See TracChangeset
for help on using the changeset viewer.