Changeset 4265 for trunk/admin/include/functions.php
- Timestamp:
- Nov 15, 2009, 1:26:09 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/functions.php
r3657 r4265 37 37 $result = pwg_query($query); 38 38 $category_ids = array(); 39 while ($row = mysql_fetch_a rray($result))39 while ($row = mysql_fetch_assoc($result)) 40 40 { 41 41 array_push($category_ids, $row['id']); … … 78 78 $result = pwg_query($query); 79 79 $element_ids = array(); 80 while ($row = mysql_fetch_a rray($result))80 while ($row = mysql_fetch_assoc($result)) 81 81 { 82 82 array_push($element_ids, $row['id']); … … 545 545 $columns = array(); 546 546 $all_fields = array_merge($dbfields['primary'], $dbfields['update']); 547 while ($row = mysql_fetch_a rray($result))547 while ($row = mysql_fetch_assoc($result)) 548 548 { 549 549 if (in_array($row['Field'], $all_fields)) … … 631 631 632 632 $result = pwg_query($query); 633 while ($row = mysql_fetch_a rray($result))633 while ($row = mysql_fetch_assoc($result)) 634 634 { 635 635 if ($row['id_uppercat'] != $current_uppercat) … … 777 777 ;'; 778 778 $result = pwg_query($query); 779 while ($row = mysql_fetch_a rray($result))779 while ($row = mysql_fetch_assoc($result)) 780 780 { 781 781 $uppercats = array_merge($uppercats, … … 804 804 LIMIT 0,1 805 805 ;'; 806 list($representative) = mysql_fetch_ array(pwg_query($query));806 list($representative) = mysql_fetch_row(pwg_query($query)); 807 807 808 808 array_push( … … 864 864 ;'; 865 865 $result = pwg_query($query); 866 while ($row = mysql_fetch_a rray($result))866 while ($row = mysql_fetch_assoc($result)) 867 867 { 868 868 array_push($categories, $row); … … 1140 1140 $datas = array(); 1141 1141 1142 while ($row = mysql_fetch_a rray($result))1142 while ($row = mysql_fetch_assoc($result)) 1143 1143 { 1144 1144 array_push( … … 1207 1207 ;'; 1208 1208 $result = pwg_query($query); 1209 while ($row = mysql_fetch_a rray($result))1209 while ($row = mysql_fetch_assoc($result)) 1210 1210 { 1211 1211 $categories[$row['id']] = … … 1356 1356 WHERE id_uppercat '.(is_numeric($parent_id) ? '= '.$parent_id : 'IS NULL').' 1357 1357 ;'; 1358 list($current_rank) = mysql_fetch_ array(pwg_query($query));1358 list($current_rank) = mysql_fetch_row(pwg_query($query)); 1359 1359 1360 1360 $insert = array( … … 1372 1372 WHERE id = '.$parent_id.' 1373 1373 ;'; 1374 $parent = mysql_fetch_a rray(pwg_query($query));1375 1376 $insert {'id_uppercat'} = $parent{'id'};1377 $insert {'global_rank'} = $parent{'global_rank'}.'.'.$insert{'rank'};1374 $parent = mysql_fetch_assoc(pwg_query($query)); 1375 1376 $insert['id_uppercat'] = $parent['id']; 1377 $insert['global_rank'] = $parent['global_rank'].'.'.$insert['rank']; 1378 1378 1379 1379 // at creation, must a category be visible or not ? Warning : if the … … 1382 1382 if ('false' == $parent['visible']) 1383 1383 { 1384 $insert {'visible'}= 'false';1384 $insert['visible'] = 'false'; 1385 1385 } 1386 1386 else 1387 1387 { 1388 $insert {'visible'}= boolean_to_string($conf['newcat_default_visible']);1388 $insert['visible'] = boolean_to_string($conf['newcat_default_visible']); 1389 1389 } 1390 1390 … … 1394 1394 if ('private' == $parent['status']) 1395 1395 { 1396 $insert {'status'}= 'private';1396 $insert['status'] = 'private'; 1397 1397 } 1398 1398 else 1399 1399 { 1400 $insert {'status'}= $conf['newcat_default_status'];1400 $insert['status'] = $conf['newcat_default_status']; 1401 1401 } 1402 1402 } 1403 1403 else 1404 1404 { 1405 $insert {'visible'}= boolean_to_string($conf['newcat_default_visible']);1406 $insert {'status'}= $conf['newcat_default_status'];1407 $insert {'global_rank'} = $insert{'rank'};1405 $insert['visible'] = boolean_to_string($conf['newcat_default_visible']); 1406 $insert['status'] = $conf['newcat_default_status']; 1407 $insert['global_rank'] = $insert['rank']; 1408 1408 } 1409 1409 … … 1610 1610 $query = 'SHOW TABLES LIKE \''.$prefixeTable.'%\''; 1611 1611 $result = pwg_query($query); 1612 while ($row = mysql_fetch_a rray($result))1612 while ($row = mysql_fetch_assoc($result)) 1613 1613 { 1614 1614 array_push($all_tables, $row[0]); … … 1626 1626 $query = 'DESC '.$table_name.';'; 1627 1627 $result = pwg_query($query); 1628 while ($row = mysql_fetch_a rray($result))1628 while ($row = mysql_fetch_assoc($result)) 1629 1629 { 1630 1630 if ($row['Key'] == 'PRI')
Note: See TracChangeset
for help on using the changeset viewer.