Changeset 987060
- Timestamp:
- 09/11/2014 07:49:12 AM (12 years ago)
- Location:
- secure-html5-video-player/trunk
- Files:
-
- 1 added
- 1 edited
-
prepvideo.php (added)
-
sh5vp-functions.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
secure-html5-video-player/trunk/sh5vp-functions.php
r985103 r987060 1988 1988 } 1989 1989 if ($secure_html5_video_player_serve_method == 'dynamic') { 1990 file_get_contents("{$plugin_dir}/prepvideo.php?k=" . urlencode($access_key) . "&onlyclean=1&file=" . urlencode($file . '.' . $ext)); 1990 1991 return $dynamic_url; 1991 1992 } … … 1999 2000 $sh5vp_cache_index = $sh5vp_cache . 'index.php'; 2000 2001 if (!file_exists($sh5vp_cache_index)) { 2001 $fp = fopen($sh5vp_cache_index, 'w'); 2002 fwrite($fp, "<?php \n// Silence is golden.\n?>"); 2003 fclose($fp); 2002 secure_html5_video_player_write_silence_file($sh5vp_cache_index); 2004 2003 } 2005 2004 … … 2027 2026 2028 2027 if (!file_exists($video_cache_dir_index)) { 2029 $fp = fopen($video_cache_dir_index, 'w'); 2030 fwrite($fp, "<?php \n// Silence is golden.\n?>"); 2031 fclose($fp); 2028 secure_html5_video_player_write_silence_file($video_cache_dir_index); 2032 2029 } 2033 2030 if (!file_exists($video_cache_dir_index2)) { 2034 $fp = fopen($video_cache_dir_index2, 'w'); 2035 fwrite($fp, "<?php \n// Silence is golden.\n?>"); 2036 fclose($fp); 2031 secure_html5_video_player_write_silence_file($video_cache_dir_index2); 2037 2032 } 2038 2033 2039 2034 if (!file_exists($video_cache) || abs(filesize($video_orig) - filesize($video_cache)) > 512) { 2040 copy($video_orig, $video_cache); 2041 } 2042 2043 secure_html5_video_player_footer_cleanup(); 2035 file_get_contents("{$plugin_dir}/prepvideo.php?k=" . urlencode($access_key) . "&file=" . urlencode($file . '.' . $ext)); 2036 } 2037 2044 2038 if (file_exists($video_cache)) { 2045 2039 return content_url() . '/sh5vp_cache/' . $date_str . '/' . $access_key . '/' . $filename_normalized_ext; … … 2047 2041 return $dynamic_url; 2048 2042 } 2043 endif; 2044 2045 2046 2047 if ( !function_exists('secure_html5_video_player_write_silence_file') ): 2048 function secure_html5_video_player_write_silence_file($filepath) { 2049 $fp = fopen($filepath, 'w'); 2050 fwrite($fp, "<?php \n// Silence is golden.\n?>"); 2051 fclose($fp); 2052 } 2049 2053 endif; 2050 2054 … … 2083 2087 date_default_timezone_set($script_tz); 2084 2088 2089 $secure_html5_video_player_serve_method = get_option('secure_html5_video_player_serve_method'); 2085 2090 $sh5vp_cache = secure_html5_video_player_parent_path_with_file(__FILE__, 'wp-config.php', 10) . '/wp-content/sh5vp_cache/'; 2086 2091 $sh5vp_cache_ls = scandir($sh5vp_cache); 2087 2092 foreach ($sh5vp_cache_ls as $currdir) { 2088 if ($currdir != $date_str 2089 && $currdir != $date_str_yesterday 2090 && $currdir != '.' 2093 if ($currdir != '.' 2091 2094 && $currdir != '..' 2092 2095 && $currdir != 'index.php' 2093 && is_numeric($currdir)) { 2094 secure_html5_video_player_rrmdir($sh5vp_cache . $currdir); 2096 && is_numeric($currdir) 2097 && ($secure_html5_video_player_serve_method == 'dynamic' 2098 || $currdir != $date_str && $currdir != $date_str_yesterday)) { 2099 secure_html5_video_player_rrmdir($sh5vp_cache . $currdir); 2095 2100 } 2096 2101 }
Note: See TracChangeset
for help on using the changeset viewer.