From 0d063b82a850b983fb30fdbe34f94ca29f356faf Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 31 May 2014 18:34:38 -0700 Subject: [PATCH] Issue #591 - Optimize downloads import --- e107_admin/update_routines.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/e107_admin/update_routines.php b/e107_admin/update_routines.php index 83c9e7385..8a164b59d 100644 --- a/e107_admin/update_routines.php +++ b/e107_admin/update_routines.php @@ -1526,8 +1526,14 @@ function update_706_to_800($type='') while($row = $sql->fetch()) { - $suffix = strrchr($row['download_url'], "."); - $allowed_types[] = ltrim($suffix,"."); + $ext = strrchr($row['download_url'], "."); + $suffix = ltrim($ext,"."); + + if(!isset($allowed_types[$suffix])) + { + $allowed_types[$suffix] = $suffix; + } + } $allowed_types = array_unique($allowed_types);