Ignore:
Timestamp:
Oct 19, 2013, 7:43:04 PM (11 years ago)
Author:
mistic100
Message:

remove all array_push (50% slower than []) + some changes missing for feature:2978

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions_metadata.php

    r19703 r25018  
    220220        foreach (explode(',', $data[$key]) as $tag_name)
    221221        {
    222           array_push(
    223             $tags_of[$id],
    224             tag_id_from_tag_name($tag_name)
    225             );
     222          $tags_of[$id][] = tag_id_from_tag_name($tag_name);
    226223        }
    227224      }
     
    230227    $data['date_metadata_update'] = CURRENT_DATE;
    231228
    232     array_push($datas, $data);
     229    $datas[] = $data;
    233230  }
    234231
     
    236233  {
    237234    $update_fields = get_sync_metadata_attributes();
    238     array_push($update_fields, 'date_metadata_update');
     235    $update_fields[] = 'date_metadata_update';
    239236
    240237    $update_fields = array_diff(
     
    298295  while ($row = pwg_db_fetch_assoc($result))
    299296  {
    300     array_push($cat_ids, $row['id']);
     297    $cat_ids[] = $row['id'];
    301298  }
    302299
Note: See TracChangeset for help on using the changeset viewer.