# HG changeset patch # User Dan # Date 1196035430 18000 # Node ID 3f98d4ba1e33301e7a744249b1e6f3ef51e54823 # Parent b3cfaf0a505c4ac1ea7c1155daec386f6b7f8955 Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries diff -r b3cfaf0a505c -r 3f98d4ba1e33 includes/constants.php --- a/includes/constants.php Sun Nov 25 17:53:03 2007 -0500 +++ b/includes/constants.php Sun Nov 25 19:03:50 2007 -0500 @@ -293,6 +293,22 @@ 'xwd' => 'image/x-xwindowdump', 'xyz' => 'chemical/x-xyz', 'zip' => 'application/zip', + 'odt' => 'application/vnd.oasis.opendocument.text', + 'ott' => 'application/vnd.oasis.opendocument.text-template', + 'odg' => 'application/vnd.oasis.opendocument.graphics', + 'otg' => 'application/vnd.oasis.opendocument.graphics-template', + 'odp' => 'application/vnd.oasis.opendocument.presentation', + 'otp' => 'application/vnd.oasis.opendocument.presentation-template', + 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', + 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', + 'odc' => 'application/vnd.oasis.opendocument.chart', + 'otc' => 'application/vnd.oasis.opendocument.chart-template', + 'odi' => 'application/vnd.oasis.opendocument.image', + 'oti' => 'application/vnd.oasis.opendocument.image-template', + 'odf' => 'application/vnd.oasis.opendocument.formula', + 'otf' => 'application/vnd.oasis.opendocument.formula-template', + 'odm' => 'application/vnd.oasis.opendocument.text-master', + 'oth' => 'application/vnd.oasis.opendocument.text-web' ); $mimetype_extlist = Array( @@ -415,6 +431,22 @@ 'x-conference/x-cooltalk'=>'ice', // Added for Enano 'image/xcf' => 'xcf xcfbz2 xcf.bz2', + 'application/vnd.oasis.opendocument.text' => 'odt', + 'application/vnd.oasis.opendocument.text-template' => 'ott', + 'application/vnd.oasis.opendocument.graphics' => 'odg', + 'application/vnd.oasis.opendocument.graphics-template' => 'otg', + 'application/vnd.oasis.opendocument.presentation' => 'odp', + 'application/vnd.oasis.opendocument.presentation-template' => 'otp', + 'application/vnd.oasis.opendocument.spreadsheet' => 'ods', + 'application/vnd.oasis.opendocument.spreadsheet-template' => 'ots', + 'application/vnd.oasis.opendocument.chart' => 'odc', + 'application/vnd.oasis.opendocument.chart-template' => 'otc', + 'application/vnd.oasis.opendocument.image' => 'odi', + 'application/vnd.oasis.opendocument.image-template' => 'oti', + 'application/vnd.oasis.opendocument.formula' => 'odf', + 'application/vnd.oasis.opendocument.formula-template' => 'otf', + 'application/vnd.oasis.opendocument.text-master' => 'odm', + 'application/vnd.oasis.opendocument.text-web' => 'oth' ); $k = array_keys($mime_types); diff -r b3cfaf0a505c -r 3f98d4ba1e33 includes/dbal.php --- a/includes/dbal.php Sun Nov 25 17:53:03 2007 -0500 +++ b/includes/dbal.php Sun Nov 25 19:03:50 2007 -0500 @@ -773,6 +773,15 @@ '; } } + if ( function_exists('array_sum') ) + { + $query_time_total = array_sum($this->query_times); + echo ' + + Total time taken for SQL queries: ' . round( $query_time_total, 6 ) . ' seconds + + '; + } echo ' '; $template->footer();