Browse Source

Reverting previous commit. Apparently it isn't necessary, and additionally it generates a bug in triggering the player - refs#3593

ywarnier 13 years ago
parent
commit
2a814a55c6
2 changed files with 13 additions and 13 deletions
  1. 12 12
      main/document/document.inc.php
  2. 1 1
      main/document/document.php

+ 12 - 12
main/document/document.inc.php

@@ -237,15 +237,15 @@ function create_document_link($document_data, $show_as_icon = false, $counter =
         //target="'.$target.'"
         if ($filetype == 'file') {
             //Sound preview with jplayer
-			if ( preg_match('/mp3$/i',  urldecode($url))  ||
-			     preg_match('/wav$/i',  urldecode($url))  ||
-			     preg_match('/ogg$/i',  urldecode($url))) {			         
+			if ( preg_match('/mp3$/',  urldecode($url))  ||
+			     preg_match('/wav$/',  urldecode($url))  ||
+			     preg_match('/ogg$/',  urldecode($url))) {			         
 			     return '<span style="float:left" '.$visibility_class.' style="float:left">'.$title.'</span>'.$force_download_html.$copy_to_myfiles.$open_in_new_window_link.$pdf_icon;
             } elseif (
                 //Show preview sith yoxview
-                 preg_match('/swf$/i',  urldecode($url))  || 
-			     preg_match('/html$/i', urldecode($url))  || 
-			     preg_match('/htm$/i',  urldecode($url))  //|| (preg_match('/wav$/', urldecode($url)) && api_get_setting('enable_nanogong') == 'true')
+                 preg_match('/swf$/',  urldecode($url))  || 
+			     preg_match('/html$/', urldecode($url))  || 
+			     preg_match('/htm$/',  urldecode($url))  //|| (preg_match('/wav$/', urldecode($url)) && api_get_setting('enable_nanogong') == 'true')
             ) {
 				$url = 'showinframesmin.php?'.api_get_cidreq().'&id='.$document_data['id'].$req_gid;
 				return '<a href="'.$url.'" class="yoxview" title="'.$tooltip_title_alt.'" target="yoxview" style="float:left" '.$visibility_class.' style="float:left">'.$title.'</a>'.$force_download_html.$copy_to_myfiles.$open_in_new_window_link.$pdf_icon;
@@ -262,16 +262,16 @@ function create_document_link($document_data, $show_as_icon = false, $counter =
         if (preg_match('/shared_folder/', urldecode($url)) && preg_match('/shared_folder$/', urldecode($url))==false && preg_match('/shared_folder_session_'.$current_session_id.'$/', urldecode($url))==false){
 			if ($filetype == 'file') {
                 //Sound preview with jplayer
-                if ( preg_match('/mp3$/i',  urldecode($url))  ||
-                     preg_match('/wav$/i',  urldecode($url))  ||
-                     preg_match('/ogg$/i',  urldecode($url))) {                   
+                if ( preg_match('/mp3$/',  urldecode($url))  ||
+                     preg_match('/wav$/',  urldecode($url))  ||
+                     preg_match('/ogg$/',  urldecode($url))) {                   
                      $sound_preview = DocumentManager::generate_mp3_preview($counter);
                      return $sound_preview ;
                 } elseif (
                     //Show preview sith yoxview
-                     preg_match('/swf$/i',  urldecode($url))  || 
-                     preg_match('/html$/i', urldecode($url))  || 
-                     preg_match('/htm$/i',  urldecode($url))  //|| (preg_match('/wav$/', urldecode($url)) && api_get_setting('enable_nanogong') == 'true')
+                     preg_match('/swf$/',  urldecode($url))  || 
+                     preg_match('/html$/', urldecode($url))  || 
+                     preg_match('/htm$/',  urldecode($url))  //|| (preg_match('/wav$/', urldecode($url)) && api_get_setting('enable_nanogong') == 'true')
                 ) {
 					$url = 'showinframesmin.php?'.api_get_cidreq().'&id='.$document_data['id'].$req_gid;
 					return '<a href="'.$url.'" class="yoxview" title="'.$tooltip_title_alt.'" target="yoxview"'.$visibility_class.' style="float:left">'.build_document_icon_tag($filetype, $path).Display::return_icon('shared.png', get_lang('ResourceShared'), array('hspace' => '5', 'align' => 'middle', 'height' => 22, 'width' => 22)).'</a>';

+ 1 - 1
main/document/document.php

@@ -954,7 +954,7 @@ if (isset($docs_and_folders) && is_array($docs_and_folders)) {
         $row[] = create_document_link($document_data,  true, $count);
         $path_info = pathinfo($document_data['path']);
                 
-        if (isset($path_info['extension']) && in_array(strtolower($path_info['extension']), array('ogg', 'mp3','wav'))) {
+        if (isset($path_info['extension']) && in_array($path_info['extension'], array('ogg', 'mp3','wav'))) {
             $count ++;
         }