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

git-svn-id: http://piwigo.org/svn/trunk@25018 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
mistic100
2013-10-19 17:43:04 +00:00
parent 35ff1b7c1f
commit ae707279a1
89 changed files with 700 additions and 1084 deletions
+4 -7
View File
@@ -219,23 +219,20 @@ SELECT id, path, representative_ext
foreach (explode(',', $data[$key]) as $tag_name)
{
array_push(
$tags_of[$id],
tag_id_from_tag_name($tag_name)
);
$tags_of[$id][] = tag_id_from_tag_name($tag_name);
}
}
}
$data['date_metadata_update'] = CURRENT_DATE;
array_push($datas, $data);
$datas[] = $data;
}
if (count($datas) > 0)
{
$update_fields = get_sync_metadata_attributes();
array_push($update_fields, 'date_metadata_update');
$update_fields[] = 'date_metadata_update';
$update_fields = array_diff(
$update_fields,
@@ -297,7 +294,7 @@ SELECT id
$result = pwg_query($query);
while ($row = pwg_db_fetch_assoc($result))
{
array_push($cat_ids, $row['id']);
$cat_ids[] = $row['id'];
}
if (count($cat_ids) == 0)