- Timestamp:
- Mar 17, 2013, 3:55:39 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/event_cats/include/evntcats_main_funcs.inc.php
r10052 r21652 77 77 */ 78 78 function ec_image_exists($cat, $img) { 79 return (mysql_fetch_row(pwg_query("79 $r = pwg_query(" 80 80 SELECT * 81 81 FROM `".IMAGE_CATEGORY_TABLE."` 82 82 WHERE `category_id` = ".$cat." 83 83 AND `image_id` = ".$img 84 )) !== false); 84 ); 85 return (bool)pwg_num_rows($r); 85 86 } 86 87 … … 207 208 if (defined('ADD_PAGES_TABLE')) { 208 209 $res = pwg_query("SELECT `id`, `title` FROM `".ADD_PAGES_TABLE."`;"); 209 while ($r = mysql_fetch_array($res)) {210 while ($r = pwg_db_fetch_assoc($res)) { 210 211 $a = (is_in($r['title'], '/user_id=')) ? 211 212 explode('/user_id=' , $r['title']) : array($r['title']); … … 281 282 ORDER BY `id` 282 283 "); 283 while ($r = mysql_fetch_assoc($q))284 while ($r = pwg_db_fetch_assoc($q)) 284 285 $ec_lists['ec_table'][intval($r['id'])] = $r; 285 286 … … 395 396 // certain group (in groups, level (friends, family, contacts), 396 397 // or user status (generic)) 397 $ types_entry_exists = (($t = mysql_fetch_row(pwg_query("398 $r = pwg_query(" 398 399 SELECT `arg2` 399 400 FROM `".EVNTCATS_TABLE."` … … 402 403 AND `arg2` IS NOT NULL 403 404 LIMIT 1; 404 "))) !== false); 405 $ec_lists['types_granted'] = ($types_entry_exists) ? $t[0] : 0; 405 "); 406 if (pwg_db_num_rows($r)) { 407 $types_entry_exists = true; 408 list($ec_lists['types_granted']) = pwg_db_fetch_row($r); 409 } 410 else { 411 $types_entry_exists = false; 412 $ec_lists['types_granted'] = 0; 413 } 406 414 407 415 return $types_entry_exists; … … 495 503 AND `user_id` > 2; 496 504 "); 497 while ($row = mysql_fetch_array($result)) {505 while ($row = pwg_db_fetch_assoc($result)) { 498 506 if (!isset($user_granted_from_type[$row['level']])) { 499 507 $user_granted_from_type[$row['level']] = array(); … … 534 542 AND `user_id` > 2; 535 543 "); 536 while ($row = mysql_fetch_array($result)) {544 while ($row = pwg_db_fetch_assoc($result)) { 537 545 if (!isset($granted_groups[$row['group_id']])) { 538 546 $granted_groups[$row['group_id']] = array();
Note: See TracChangeset
for help on using the changeset viewer.