From 98ea14ac3b30667f46f6141253f6b071f5e8a4ca Mon Sep 17 00:00:00 2001 From: slerena Date: Tue, 29 Dec 2009 17:39:35 +0000 Subject: [PATCH] 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. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2257 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++ pandora_console/extensions/hello.php | 41 ------------------ pandora_console/extensions/hello/icon.png | Bin 808 -> 0 bytes .../include/Image/image_functions.php | 19 +++++--- 4 files changed, 20 insertions(+), 47 deletions(-) delete mode 100644 pandora_console/extensions/hello.php delete mode 100755 pandora_console/extensions/hello/icon.png 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 a7b479f249303f246211f01cbb4627227de01e78..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 808 zcmV+@1K0eCP)Px#24YJ`L;wH)0002_L%V+f000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iXM< z4G$GFM|5)l001>~MObu0Z*6U5Zgc=BV<{jqFfcSAN?~htVjxp=Wod3@ataDVa%Ew3 zWn>_CX>@2HRA^-&M@dakklBlG0007KNklvl;qCjFCWN;${7G(rlsQ7Pak>(^q4l3i! z)A5`4?ro(RPKCeKy>QOqa=3&d#O?S)244qo8~`b(6$KURa5{SNFJgA=;As6-I$6e3WF zprD{%>kr;nZ=QmL4cYJ~%aSU*8D``6DT-uUAX!mhI8;sGWgeG|lt@}!Z_Jy*78LS( zl^p@#>;+U%#TKX7maLevCK*+y;Ej0`;)rmHb>UqhO~b5_)A6s0G{+cLv39xQcEcunrJj4KUUswc56&#<`R6^3jmgwu9LqplCVxnJSs4TEO_#h_$0000= 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); }