Changeset 26562
- Timestamp:
- Jan 9, 2014, 9:04:26 PM (10 years ago)
- Location:
- extensions/community
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/community/add_photos.php
r23085 r26562 381 381 include_once(PHPWG_ROOT_PATH.'admin/include/photos_add_direct_prepare.inc.php'); 382 382 383 if (isset($conf['upload_form_all_types']) and $conf['upload_form_all_types']) 384 { 385 $upload_file_types = $conf['file_ext']; 386 } 387 else 388 { 389 $upload_file_types = $conf['picture_ext']; 390 } 391 392 $unique_exts = array_unique(array_map('strtolower', $upload_file_types)); 393 394 $is_windows = true; 395 if (stripos($_SERVER['HTTP_USER_AGENT'], 'Win') === false) 396 { 397 $is_windows = false; 398 } 399 400 $uploadify_exts = array(); 401 foreach ($unique_exts as $ext) 402 { 403 $uploadify_exts[] = $ext; 404 405 // Windows is not case sensitive and there is a bug with Firefox on 406 // Windows: the list of extensions is truncated and last extensions are 407 // not taken into account, so we have to make it as short as possible. 408 if (!$is_windows) 409 { 410 $uploadify_exts[] = strtoupper($ext); 411 } 412 } 413 414 $template->assign( 415 array( 416 'upload_file_types' => implode(', ', $unique_exts), 417 'uploadify_fileTypeExts' => implode(';', prepend_append_array_items($uploadify_exts, '*.', '')), 418 ) 419 ); 420 383 421 $quota_available = array( 384 422 'summary' => array(), -
extensions/community/add_photos.tpl
r23393 r26562 269 269 'multi' : true, 270 270 'fileTypeDesc' : 'Photo files', 271 'fileTypeExts' : ' *.jpg;*.JPG;*.jpeg;*.JPEG;*.png;*.PNG;*.gif;*.GIF',271 'fileTypeExts' : '{/literal}{$uploadify_fileTypeExts}{literal}', 272 272 'fileSizeLimit' : sizeLimit, 273 273 'progressData' : 'percentage',
Note: See TracChangeset
for help on using the changeset viewer.