[drupal-devel] [feature] Centralize print theme page
Issue status update for http://drupal.org/node/20910 Project: Drupal Version: cvs Component: base system Category: feature requests Priority: normal Assigned to: chx Reported by: chx Updated by: chx Status: patch Attachment: http://drupal.org/files/issues/output.patch (1.27 KB) The patch is very simple but opens a lot of possibilites. Like you can put the output of any Drupal function into a block. Another step towards multi region pages. This patch does not even break backwards compatibility: if you do not want to print anything or want to handle your output, fine, return nothing from the callback as you do now. However, you do not need to write print theme('page', ...); anymore, just return it, Drupal will theme it for you. I'm posting two patches. The first is the very simple, functional one. The second, however is just the result of a preg change. chx
Issue status update for http://drupal.org/node/20910 Project: Drupal Version: cvs Component: base system Category: feature requests Priority: normal Assigned to: chx Reported by: chx Updated by: chx Status: patch Attachment: http://drupal.org/files/issues/output1.patch (36.85 KB) here comes the dull megapatch. Note: contact.module had a bug, it called theme_page with two parameters. chx Previous comments: ------------------------------------------------------------------------ April 20, 2005 - 13:58 : chx Attachment: http://drupal.org/files/issues/output.patch (1.27 KB) The patch is very simple but opens a lot of possibilites. Like you can put the output of any Drupal function into a block. Another step towards multi region pages. This patch does not even break backwards compatibility: if you do not want to print anything or want to handle your output, fine, return nothing from the callback as you do now. However, you do not need to write print theme('page', ...); anymore, just return it, Drupal will theme it for you. I'm posting two patches. The first is the very simple, functional one. The second, however is just the result of a preg change.
Issue status update for http://drupal.org/node/20910 Project: Drupal Version: cvs Component: base system Category: feature requests Priority: normal Assigned to: chx Reported by: chx Updated by: adrian Status: patch I'm gonna put a definate +1 for this. Even just for consistency sake, it's a wonderful patch. adrian Previous comments: ------------------------------------------------------------------------ April 20, 2005 - 14:58 : chx Attachment: http://drupal.org/files/issues/output.patch (1.27 KB) The patch is very simple but opens a lot of possibilites. Like you can put the output of any Drupal function into a block. Another step towards multi region pages. This patch does not even break backwards compatibility: if you do not want to print anything or want to handle your output, fine, return nothing from the callback as you do now. However, you do not need to write print theme('page', ...); anymore, just return it, Drupal will theme it for you. I'm posting two patches. The first is the very simple, functional one. The second, however is just the result of a preg change. ------------------------------------------------------------------------ April 20, 2005 - 15:46 : chx Attachment: http://drupal.org/files/issues/output1.patch (36.85 KB) here comes the dull megapatch. Note: contact.module had a bug, it called theme_page with two parameters.
Issue status update for http://drupal.org/node/20910 Project: Drupal Version: cvs Component: base system Category: feature requests Priority: normal Assigned to: chx Reported by: chx Updated by: chx Status: patch Attachment: http://drupal.org/files/issues/output1_0.patch (0 bytes) Removed four instances of return; preceded by a return $output. chx Previous comments: ------------------------------------------------------------------------ April 20, 2005 - 13:58 : chx Attachment: http://drupal.org/files/issues/output.patch (1.27 KB) The patch is very simple but opens a lot of possibilites. Like you can put the output of any Drupal function into a block. Another step towards multi region pages. This patch does not even break backwards compatibility: if you do not want to print anything or want to handle your output, fine, return nothing from the callback as you do now. However, you do not need to write print theme('page', ...); anymore, just return it, Drupal will theme it for you. I'm posting two patches. The first is the very simple, functional one. The second, however is just the result of a preg change. ------------------------------------------------------------------------ April 20, 2005 - 14:46 : chx Attachment: http://drupal.org/files/issues/output1.patch (36.85 KB) here comes the dull megapatch. Note: contact.module had a bug, it called theme_page with two parameters. ------------------------------------------------------------------------ April 20, 2005 - 14:59 : adrian I'm gonna put a definate +1 for this. Even just for consistency sake, it's a wonderful patch.
Issue status update for http://drupal.org/node/20910 Project: Drupal Version: cvs Component: base system Category: feature requests Priority: normal Assigned to: chx Reported by: chx Updated by: chx Status: patch Attachment: http://drupal.org/files/issues/output1_1.patch (36.97 KB) 0 bytes? reattach. chx Previous comments: ------------------------------------------------------------------------ April 20, 2005 - 13:58 : chx Attachment: http://drupal.org/files/issues/output.patch (1.27 KB) The patch is very simple but opens a lot of possibilites. Like you can put the output of any Drupal function into a block. Another step towards multi region pages. This patch does not even break backwards compatibility: if you do not want to print anything or want to handle your output, fine, return nothing from the callback as you do now. However, you do not need to write print theme('page', ...); anymore, just return it, Drupal will theme it for you. I'm posting two patches. The first is the very simple, functional one. The second, however is just the result of a preg change. ------------------------------------------------------------------------ April 20, 2005 - 14:46 : chx Attachment: http://drupal.org/files/issues/output1.patch (36.85 KB) here comes the dull megapatch. Note: contact.module had a bug, it called theme_page with two parameters. ------------------------------------------------------------------------ April 20, 2005 - 14:59 : adrian I'm gonna put a definate +1 for this. Even just for consistency sake, it's a wonderful patch. ------------------------------------------------------------------------ April 20, 2005 - 15:07 : chx Attachment: http://drupal.org/files/issues/output1_0.patch (0 bytes) Removed four instances of return; preceded by a return $output.
Issue status update for http://drupal.org/node/20910 Project: Drupal Version: cvs Component: base system Category: feature requests Priority: normal Assigned to: chx Reported by: chx Updated by: dikini Status: patch +1 makes it easier to understand what is going on dikini Previous comments: ------------------------------------------------------------------------ April 20, 2005 - 12:58 : chx Attachment: http://drupal.org/files/issues/output.patch (1.27 KB) The patch is very simple but opens a lot of possibilites. Like you can put the output of any Drupal function into a block. Another step towards multi region pages. This patch does not even break backwards compatibility: if you do not want to print anything or want to handle your output, fine, return nothing from the callback as you do now. However, you do not need to write print theme('page', ...); anymore, just return it, Drupal will theme it for you. I'm posting two patches. The first is the very simple, functional one. The second, however is just the result of a preg change. ------------------------------------------------------------------------ April 20, 2005 - 13:46 : chx Attachment: http://drupal.org/files/issues/output1.patch (36.85 KB) here comes the dull megapatch. Note: contact.module had a bug, it called theme_page with two parameters. ------------------------------------------------------------------------ April 20, 2005 - 13:59 : adrian I'm gonna put a definate +1 for this. Even just for consistency sake, it's a wonderful patch. ------------------------------------------------------------------------ April 20, 2005 - 14:07 : chx Attachment: http://drupal.org/files/issues/output1_0.patch (0 bytes) Removed four instances of return; preceded by a return $output. ------------------------------------------------------------------------ April 20, 2005 - 14:07 : chx Attachment: http://drupal.org/files/issues/output1_1.patch (36.97 KB) 0 bytes? reattach.
Issue status update for http://drupal.org/node/20910 Project: Drupal Version: cvs Component: base system Category: feature requests Priority: normal Assigned to: chx Reported by: chx Updated by: moshe weitzman Status: patch +1. makes it easier to reuse the output of functions. The print statement at the end of many callback functions hinders reuse. moshe weitzman Previous comments: ------------------------------------------------------------------------ April 20, 2005 - 07:58 : chx Attachment: http://drupal.org/files/issues/output.patch (1.27 KB) The patch is very simple but opens a lot of possibilites. Like you can put the output of any Drupal function into a block. Another step towards multi region pages. This patch does not even break backwards compatibility: if you do not want to print anything or want to handle your output, fine, return nothing from the callback as you do now. However, you do not need to write print theme('page', ...); anymore, just return it, Drupal will theme it for you. I'm posting two patches. The first is the very simple, functional one. The second, however is just the result of a preg change. ------------------------------------------------------------------------ April 20, 2005 - 08:46 : chx Attachment: http://drupal.org/files/issues/output1.patch (36.85 KB) here comes the dull megapatch. Note: contact.module had a bug, it called theme_page with two parameters. ------------------------------------------------------------------------ April 20, 2005 - 08:59 : adrian I'm gonna put a definate +1 for this. Even just for consistency sake, it's a wonderful patch. ------------------------------------------------------------------------ April 20, 2005 - 09:07 : chx Attachment: http://drupal.org/files/issues/output1_0.patch (0 bytes) Removed four instances of return; preceded by a return $output. ------------------------------------------------------------------------ April 20, 2005 - 09:07 : chx Attachment: http://drupal.org/files/issues/output1_1.patch (36.97 KB) 0 bytes? reattach. ------------------------------------------------------------------------ April 20, 2005 - 09:56 : dikini +1 makes it easier to understand what is going on
Issue status update for http://drupal.org/node/20910 Project: Drupal Version: cvs Component: base system Category: feature requests Priority: normal Assigned to: chx Reported by: chx Updated by: stefan nagtegaal Status: patch I like this! Very nice and very clean patch... +1 from me either... stefan nagtegaal Previous comments: ------------------------------------------------------------------------ April 20, 2005 - 14:58 : chx Attachment: http://drupal.org/files/issues/output.patch (1.27 KB) The patch is very simple but opens a lot of possibilites. Like you can put the output of any Drupal function into a block. Another step towards multi region pages. This patch does not even break backwards compatibility: if you do not want to print anything or want to handle your output, fine, return nothing from the callback as you do now. However, you do not need to write print theme('page', ...); anymore, just return it, Drupal will theme it for you. I'm posting two patches. The first is the very simple, functional one. The second, however is just the result of a preg change. ------------------------------------------------------------------------ April 20, 2005 - 15:46 : chx Attachment: http://drupal.org/files/issues/output1.patch (36.85 KB) here comes the dull megapatch. Note: contact.module had a bug, it called theme_page with two parameters. ------------------------------------------------------------------------ April 20, 2005 - 15:59 : adrian I'm gonna put a definate +1 for this. Even just for consistency sake, it's a wonderful patch. ------------------------------------------------------------------------ April 20, 2005 - 16:07 : chx Attachment: http://drupal.org/files/issues/output1_0.patch (0 bytes) Removed four instances of return; preceded by a return $output. ------------------------------------------------------------------------ April 20, 2005 - 16:07 : chx Attachment: http://drupal.org/files/issues/output1_1.patch (36.97 KB) 0 bytes? reattach. ------------------------------------------------------------------------ April 20, 2005 - 16:56 : dikini +1 makes it easier to understand what is going on ------------------------------------------------------------------------ April 20, 2005 - 17:56 : moshe weitzman +1. makes it easier to reuse the output of functions. The print statement at the end of many callback functions hinders reuse.
Issue status update for http://drupal.org/node/20910 Project: Drupal Version: cvs Component: base system Category: feature requests Priority: normal Assigned to: chx Reported by: chx Updated by: chx Status: patch Attachment: http://drupal.org/files/issues/output1_2.patch (37.61 KB) I deleted system_admin_page. There is no need for it, and it broke the return chain. chx Previous comments: ------------------------------------------------------------------------ April 20, 2005 - 13:58 : chx Attachment: http://drupal.org/files/issues/output.patch (1.27 KB) The patch is very simple but opens a lot of possibilites. Like you can put the output of any Drupal function into a block. Another step towards multi region pages. This patch does not even break backwards compatibility: if you do not want to print anything or want to handle your output, fine, return nothing from the callback as you do now. However, you do not need to write print theme('page', ...); anymore, just return it, Drupal will theme it for you. I'm posting two patches. The first is the very simple, functional one. The second, however is just the result of a preg change. ------------------------------------------------------------------------ April 20, 2005 - 14:46 : chx Attachment: http://drupal.org/files/issues/output1.patch (36.85 KB) here comes the dull megapatch. Note: contact.module had a bug, it called theme_page with two parameters. ------------------------------------------------------------------------ April 20, 2005 - 14:59 : adrian I'm gonna put a definate +1 for this. Even just for consistency sake, it's a wonderful patch. ------------------------------------------------------------------------ April 20, 2005 - 15:07 : chx Attachment: http://drupal.org/files/issues/output1_0.patch (0 bytes) Removed four instances of return; preceded by a return $output. ------------------------------------------------------------------------ April 20, 2005 - 15:07 : chx Attachment: http://drupal.org/files/issues/output1_1.patch (36.97 KB) 0 bytes? reattach. ------------------------------------------------------------------------ April 20, 2005 - 15:56 : dikini +1 makes it easier to understand what is going on ------------------------------------------------------------------------ April 20, 2005 - 16:56 : moshe weitzman +1. makes it easier to reuse the output of functions. The print statement at the end of many callback functions hinders reuse. ------------------------------------------------------------------------ April 20, 2005 - 17:40 : stefan nagtegaal I like this! Very nice and very clean patch... +1 from me either...
Issue status update for http://drupal.org/node/20910 Project: Drupal Version: cvs Component: base system Category: feature requests Priority: normal Assigned to: chx Reported by: chx Updated by: chx Status: patch Attachment: http://drupal.org/files/issues/output1_3.patch (37.58 KB) This gets better and better. Turns out (thanks Steven and Morbus) that watchdog_overview takes no parameter. So, a few bytes are shaved off. chx Previous comments: ------------------------------------------------------------------------ April 20, 2005 - 13:58 : chx Attachment: http://drupal.org/files/issues/output.patch (1.27 KB) The patch is very simple but opens a lot of possibilites. Like you can put the output of any Drupal function into a block. Another step towards multi region pages. This patch does not even break backwards compatibility: if you do not want to print anything or want to handle your output, fine, return nothing from the callback as you do now. However, you do not need to write print theme('page', ...); anymore, just return it, Drupal will theme it for you. I'm posting two patches. The first is the very simple, functional one. The second, however is just the result of a preg change. ------------------------------------------------------------------------ April 20, 2005 - 14:46 : chx Attachment: http://drupal.org/files/issues/output1.patch (36.85 KB) here comes the dull megapatch. Note: contact.module had a bug, it called theme_page with two parameters. ------------------------------------------------------------------------ April 20, 2005 - 14:59 : adrian I'm gonna put a definate +1 for this. Even just for consistency sake, it's a wonderful patch. ------------------------------------------------------------------------ April 20, 2005 - 15:07 : chx Attachment: http://drupal.org/files/issues/output1_0.patch (0 bytes) Removed four instances of return; preceded by a return $output. ------------------------------------------------------------------------ April 20, 2005 - 15:07 : chx Attachment: http://drupal.org/files/issues/output1_1.patch (36.97 KB) 0 bytes? reattach. ------------------------------------------------------------------------ April 20, 2005 - 15:56 : dikini +1 makes it easier to understand what is going on ------------------------------------------------------------------------ April 20, 2005 - 16:56 : moshe weitzman +1. makes it easier to reuse the output of functions. The print statement at the end of many callback functions hinders reuse. ------------------------------------------------------------------------ April 20, 2005 - 17:40 : stefan nagtegaal I like this! Very nice and very clean patch... +1 from me either... ------------------------------------------------------------------------ April 21, 2005 - 17:17 : chx Attachment: http://drupal.org/files/issues/output1_2.patch (37.61 KB) I deleted system_admin_page. There is no need for it, and it broke the return chain.
Issue status update for http://drupal.org/node/20910 Project: Drupal Version: cvs Component: base system Category: feature requests Priority: normal Assigned to: chx Reported by: chx Updated by: chx Status: patch Attachment: http://drupal.org/files/issues/output_0.patch (39.6 KB) Rerolled the two patches into one. chx Previous comments: ------------------------------------------------------------------------ April 20, 2005 - 13:58 : chx Attachment: http://drupal.org/files/issues/output.patch (1.27 KB) The patch is very simple but opens a lot of possibilites. Like you can put the output of any Drupal function into a block. Another step towards multi region pages. This patch does not even break backwards compatibility: if you do not want to print anything or want to handle your output, fine, return nothing from the callback as you do now. However, you do not need to write print theme('page', ...); anymore, just return it, Drupal will theme it for you. I'm posting two patches. The first is the very simple, functional one. The second, however is just the result of a preg change. ------------------------------------------------------------------------ April 20, 2005 - 14:46 : chx Attachment: http://drupal.org/files/issues/output1.patch (36.85 KB) here comes the dull megapatch. Note: contact.module had a bug, it called theme_page with two parameters. ------------------------------------------------------------------------ April 20, 2005 - 14:59 : adrian I'm gonna put a definate +1 for this. Even just for consistency sake, it's a wonderful patch. ------------------------------------------------------------------------ April 20, 2005 - 15:07 : chx Attachment: http://drupal.org/files/issues/output1_0.patch (0 bytes) Removed four instances of return; preceded by a return $output. ------------------------------------------------------------------------ April 20, 2005 - 15:07 : chx Attachment: http://drupal.org/files/issues/output1_1.patch (36.97 KB) 0 bytes? reattach. ------------------------------------------------------------------------ April 20, 2005 - 15:56 : dikini +1 makes it easier to understand what is going on ------------------------------------------------------------------------ April 20, 2005 - 16:56 : moshe weitzman +1. makes it easier to reuse the output of functions. The print statement at the end of many callback functions hinders reuse. ------------------------------------------------------------------------ April 20, 2005 - 17:40 : stefan nagtegaal I like this! Very nice and very clean patch... +1 from me either... ------------------------------------------------------------------------ April 21, 2005 - 17:17 : chx Attachment: http://drupal.org/files/issues/output1_2.patch (37.61 KB) I deleted system_admin_page. There is no need for it, and it broke the return chain. ------------------------------------------------------------------------ April 21, 2005 - 17:24 : chx Attachment: http://drupal.org/files/issues/output1_3.patch (37.58 KB) This gets better and better. Turns out (thanks Steven and Morbus) that watchdog_overview takes no parameter. So, a few bytes are shaved off.
Issue status update for http://drupal.org/node/20910 Project: Drupal Version: cvs Component: base system Category: feature requests Priority: normal Assigned to: chx Reported by: chx Updated by: asimmonds -Status: fixed +Status: patch Attachment: http://drupal.org/files/issues/user_1_0.patch (441 bytes) There's a print that has been missed in user_page() for user_view()'s output. asimmonds Previous comments: ------------------------------------------------------------------------ April 21, 2005 - 00:58 : chx Attachment: http://drupal.org/files/issues/output.patch (1.27 KB) The patch is very simple but opens a lot of possibilites. Like you can put the output of any Drupal function into a block. Another step towards multi region pages. This patch does not even break backwards compatibility: if you do not want to print anything or want to handle your output, fine, return nothing from the callback as you do now. However, you do not need to write print theme('page', ...); anymore, just return it, Drupal will theme it for you. I'm posting two patches. The first is the very simple, functional one. The second, however is just the result of a preg change. ------------------------------------------------------------------------ April 21, 2005 - 01:46 : chx Attachment: http://drupal.org/files/issues/output1.patch (36.85 KB) here comes the dull megapatch. Note: contact.module had a bug, it called theme_page with two parameters. ------------------------------------------------------------------------ April 21, 2005 - 01:59 : adrian I'm gonna put a definate +1 for this. Even just for consistency sake, it's a wonderful patch. ------------------------------------------------------------------------ April 21, 2005 - 02:07 : chx Attachment: http://drupal.org/files/issues/output1_0.patch (0 bytes) Removed four instances of return; preceded by a return $output. ------------------------------------------------------------------------ April 21, 2005 - 02:07 : chx Attachment: http://drupal.org/files/issues/output1_1.patch (36.97 KB) 0 bytes? reattach. ------------------------------------------------------------------------ April 21, 2005 - 02:56 : dikini +1 makes it easier to understand what is going on ------------------------------------------------------------------------ April 21, 2005 - 03:56 : moshe weitzman +1. makes it easier to reuse the output of functions. The print statement at the end of many callback functions hinders reuse. ------------------------------------------------------------------------ April 21, 2005 - 04:40 : stefan nagtegaal I like this! Very nice and very clean patch... +1 from me either... ------------------------------------------------------------------------ April 22, 2005 - 04:17 : chx Attachment: http://drupal.org/files/issues/output1_2.patch (37.61 KB) I deleted system_admin_page. There is no need for it, and it broke the return chain. ------------------------------------------------------------------------ April 22, 2005 - 04:24 : chx Attachment: http://drupal.org/files/issues/output1_3.patch (37.58 KB) This gets better and better. Turns out (thanks Steven and Morbus) that watchdog_overview takes no parameter. So, a few bytes are shaved off. ------------------------------------------------------------------------ April 25, 2005 - 03:55 : chx Attachment: http://drupal.org/files/issues/output_0.patch (39.6 KB) Rerolled the two patches into one. ------------------------------------------------------------------------ April 25, 2005 - 04:35 : Dries Committed to HEAD.
Issue status update for http://drupal.org/node/20910 Project: Drupal Version: cvs Component: base system Category: feature requests Priority: normal Assigned to: chx Reported by: chx Updated by: walkah -Status: fixed +Status: patch Attachment: http://drupal.org/files/issues/blog-print-theme.patch (690 bytes) um... looks like blog.module was broken too.... don't you people test these things? ;) patch attached. (restoring blog/3 , blog/walkah, etc urls). walkah Previous comments: ------------------------------------------------------------------------ April 20, 2005 - 07:58 : chx Attachment: http://drupal.org/files/issues/output.patch (1.27 KB) The patch is very simple but opens a lot of possibilites. Like you can put the output of any Drupal function into a block. Another step towards multi region pages. This patch does not even break backwards compatibility: if you do not want to print anything or want to handle your output, fine, return nothing from the callback as you do now. However, you do not need to write print theme('page', ...); anymore, just return it, Drupal will theme it for you. I'm posting two patches. The first is the very simple, functional one. The second, however is just the result of a preg change. ------------------------------------------------------------------------ April 20, 2005 - 08:46 : chx Attachment: http://drupal.org/files/issues/output1.patch (36.85 KB) here comes the dull megapatch. Note: contact.module had a bug, it called theme_page with two parameters. ------------------------------------------------------------------------ April 20, 2005 - 08:59 : adrian I'm gonna put a definate +1 for this. Even just for consistency sake, it's a wonderful patch. ------------------------------------------------------------------------ April 20, 2005 - 09:07 : chx Attachment: http://drupal.org/files/issues/output1_0.patch (0 bytes) Removed four instances of return; preceded by a return $output. ------------------------------------------------------------------------ April 20, 2005 - 09:07 : chx Attachment: http://drupal.org/files/issues/output1_1.patch (36.97 KB) 0 bytes? reattach. ------------------------------------------------------------------------ April 20, 2005 - 09:56 : dikini +1 makes it easier to understand what is going on ------------------------------------------------------------------------ April 20, 2005 - 10:56 : moshe weitzman +1. makes it easier to reuse the output of functions. The print statement at the end of many callback functions hinders reuse. ------------------------------------------------------------------------ April 20, 2005 - 11:40 : stefan nagtegaal I like this! Very nice and very clean patch... +1 from me either... ------------------------------------------------------------------------ April 21, 2005 - 11:17 : chx Attachment: http://drupal.org/files/issues/output1_2.patch (37.61 KB) I deleted system_admin_page. There is no need for it, and it broke the return chain. ------------------------------------------------------------------------ April 21, 2005 - 11:24 : chx Attachment: http://drupal.org/files/issues/output1_3.patch (37.58 KB) This gets better and better. Turns out (thanks Steven and Morbus) that watchdog_overview takes no parameter. So, a few bytes are shaved off. ------------------------------------------------------------------------ April 24, 2005 - 10:55 : chx Attachment: http://drupal.org/files/issues/output_0.patch (39.6 KB) Rerolled the two patches into one. ------------------------------------------------------------------------ April 24, 2005 - 11:35 : Dries Committed to HEAD. ------------------------------------------------------------------------ April 24, 2005 - 16:12 : asimmonds Attachment: http://drupal.org/files/issues/user_1_0.patch (441 bytes) There's a print that has been missed in user_page() for user_view()'s output. ------------------------------------------------------------------------ April 24, 2005 - 17:09 : Steven Fixed in HEAD. The 4.6 version of that line in fact contained that print statement too, but it was useless there because user_view() didn't return anything. I got rid of it in 4.6.
Issue status update for http://drupal.org/node/20910 Project: Drupal Version: cvs Component: base system Category: feature requests Priority: normal Assigned to: chx Reported by: chx Updated by: chx Status: patch Attachment: http://drupal.org/files/issues/print2.patch (1.15 KB) I test continously. chx Previous comments: ------------------------------------------------------------------------ April 20, 2005 - 13:58 : chx Attachment: http://drupal.org/files/issues/output.patch (1.27 KB) The patch is very simple but opens a lot of possibilites. Like you can put the output of any Drupal function into a block. Another step towards multi region pages. This patch does not even break backwards compatibility: if you do not want to print anything or want to handle your output, fine, return nothing from the callback as you do now. However, you do not need to write print theme('page', ...); anymore, just return it, Drupal will theme it for you. I'm posting two patches. The first is the very simple, functional one. The second, however is just the result of a preg change. ------------------------------------------------------------------------ April 20, 2005 - 14:46 : chx Attachment: http://drupal.org/files/issues/output1.patch (36.85 KB) here comes the dull megapatch. Note: contact.module had a bug, it called theme_page with two parameters. ------------------------------------------------------------------------ April 20, 2005 - 14:59 : adrian I'm gonna put a definate +1 for this. Even just for consistency sake, it's a wonderful patch. ------------------------------------------------------------------------ April 20, 2005 - 15:07 : chx Attachment: http://drupal.org/files/issues/output1_0.patch (0 bytes) Removed four instances of return; preceded by a return $output. ------------------------------------------------------------------------ April 20, 2005 - 15:07 : chx Attachment: http://drupal.org/files/issues/output1_1.patch (36.97 KB) 0 bytes? reattach. ------------------------------------------------------------------------ April 20, 2005 - 15:56 : dikini +1 makes it easier to understand what is going on ------------------------------------------------------------------------ April 20, 2005 - 16:56 : moshe weitzman +1. makes it easier to reuse the output of functions. The print statement at the end of many callback functions hinders reuse. ------------------------------------------------------------------------ April 20, 2005 - 17:40 : stefan nagtegaal I like this! Very nice and very clean patch... +1 from me either... ------------------------------------------------------------------------ April 21, 2005 - 17:17 : chx Attachment: http://drupal.org/files/issues/output1_2.patch (37.61 KB) I deleted system_admin_page. There is no need for it, and it broke the return chain. ------------------------------------------------------------------------ April 21, 2005 - 17:24 : chx Attachment: http://drupal.org/files/issues/output1_3.patch (37.58 KB) This gets better and better. Turns out (thanks Steven and Morbus) that watchdog_overview takes no parameter. So, a few bytes are shaved off. ------------------------------------------------------------------------ April 24, 2005 - 16:55 : chx Attachment: http://drupal.org/files/issues/output_0.patch (39.6 KB) Rerolled the two patches into one. ------------------------------------------------------------------------ April 24, 2005 - 17:35 : Dries Committed to HEAD. ------------------------------------------------------------------------ April 24, 2005 - 22:12 : asimmonds Attachment: http://drupal.org/files/issues/user_1_0.patch (441 bytes) There's a print that has been missed in user_page() for user_view()'s output. ------------------------------------------------------------------------ April 24, 2005 - 23:09 : Steven Fixed in HEAD. The 4.6 version of that line in fact contained that print statement too, but it was useless there because user_view() didn't return anything. I got rid of it in 4.6. ------------------------------------------------------------------------ April 27, 2005 - 06:01 : walkah Attachment: http://drupal.org/files/issues/blog-print-theme.patch (690 bytes) um... looks like blog.module was broken too.... don't you people test these things? ;) patch attached. (restoring blog/3 , blog/walkah, etc urls).
participants (7)
-
adrian -
asimmonds -
chx -
dikini -
moshe weitzman -
stefan nagtegaal -
walkah