diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 9673ffe436..792ec7c63c 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,5 +1,12 @@ 2009-12-29 Sancho Lerena + * include/Image/image_functions.php: PHP 5.2 and higher does + not support (deprecated) get_mimetype. Avoiding headers lets + the browser to decide contents of stream and now this works + on modern PHP, before not :( + + * extensions/hello: Removed sample. + * include/functions_servers.php: Fixed notice (division by 0). * include/functions_visual_map.php: Fixed problem in graphs diff --git a/pandora_console/extensions/hello.php b/pandora_console/extensions/hello.php deleted file mode 100644 index a76859fce0..0000000000 --- a/pandora_console/extensions/hello.php +++ /dev/null @@ -1,41 +0,0 @@ -".__('Extensions'). " » Hello world!"; - echo "This is a sample of minimal extension in the operation view"; -} - -function test() { - echo "

".__('Extensions'). " » Hello administration world

"; - echo "This is a sample of minimal extension in the godmode view"; -} - -/* This adds a option in the operation menu */ -//add_operation_menu_option ('Hello plugin!'); -add_godmode_menu_option (__('Hello plugin'), 'PM','gagente',"hello/icon.png"); -/** - * 'estado' is a option of menu you can see in 'operation/menu.php' - */ -add_operation_menu_option(__('Hello plugin'), 'estado',"hello/icon.png"); - - -/* This sets the function to be called when the extension is selected in the operation menu */ -add_extension_main_function ('hello_extension_main'); - -add_extension_godmode_function('test'); -?> diff --git a/pandora_console/extensions/hello/icon.png b/pandora_console/extensions/hello/icon.png deleted file mode 100755 index a7b479f249..0000000000 Binary files a/pandora_console/extensions/hello/icon.png and /dev/null differ diff --git a/pandora_console/include/Image/image_functions.php b/pandora_console/include/Image/image_functions.php index db23acd6b0..e1056cedec 100644 --- a/pandora_console/include/Image/image_functions.php +++ b/pandora_console/include/Image/image_functions.php @@ -58,12 +58,19 @@ if (isset($_GET['getFile'])) { * @param string fileLocation The real location the file in server. */ function getFile ($destFileName,$fileLocation) { - error_reporting(E_ALL); - - //header('Content-type: aplication/octet-stream;'); - header('Content-type: ' . mime_content_type($fileLocation) . ';'); - header( "Content-Length: " . filesize($fileLocation)); - header('Content-Disposition: attachment; filename="' . $destFileName . '"'); + error_reporting(0); + + + // NOTICE: mime_conent_type() IS NOT SUPPORTED IN PHP >= 5.2.11 anymore + // THIS DOESNT WORK ON SUSE 11.x ! + + +// header('Content-type: aplication/octet-stream;'); +// header('Content-type: ' . mime_content_type($fileLocation) . ';'); +// header( "Content-Length: " . filesize($fileLocation)); +// header('Content-Disposition: attachment; filename="' . $destFileName . '"'); + + // Do not send any header, rely on browser readfile($fileLocation); }