[drupal-devel] [feature] i18n - Move drupal_goto to bootstrap.inc and some related features
Project: Drupal Version: cvs Component: base system Category: feature requests Priority: normal Assigned to: Jose A Reyero Reported by: Jose A Reyero Updated by: Jose A Reyero Status: patch Attachment: http://drupal.org/files/issues/i18n_drupal_goto_01.patch (8.41 KB) This is firs of a serie of patches adding support for some i18n related features. This patch: - moves drupal_goto to bootstrap.inc, making it possible to use it from the module_init, even for cached pages - moves url() to bootstrap.inc, as it is needed by drupal_goto, and includes a check for not to resolve path aliases when called from bootstrap (it is not needed and would require including lot more stuff from common.inc) - adds a simple hook to call 'i18n_url_rewrite' from the function 'url()' , which allows outgoing urls to be rewrited, so some additional info can be placed in the path. Jose A Reyero -- View: http://drupal.org/node/16069 Edit: http://drupal.org/project/comments/add/16069
Project: Drupal Version: cvs Component: base system Category: feature requests Priority: normal Assigned to: Jose A Reyero Reported by: Jose A Reyero Updated by: chx Status: patch I like this approach. First of all, it moves only a very little code from common to bootstrap. Second, it does not introduce new init mechanisms like all previous i18n revisions did. Third, the penalty for the code in the case i18n is off, is incredibly small -- one if per url() call. chx Previous comments: ------------------------------------------------------------------------ January 24, 2005 - 01:42 : Jose A Reyero Attachment: http://drupal.org/files/issues/i18n_drupal_goto_01.patch (8.41 KB) This is firs of a serie of patches adding support for some i18n related features. This patch: - moves drupal_goto to bootstrap.inc, making it possible to use it from the module_init, even for cached pages - moves url() to bootstrap.inc, as it is needed by drupal_goto, and includes a check for not to resolve path aliases when called from bootstrap (it is not needed and would require including lot more stuff from common.inc) - adds a simple hook to call 'i18n_url_rewrite' from the function 'url()' , which allows outgoing urls to be rewrited, so some additional info can be placed in the path. -- View: http://drupal.org/node/16069 Edit: http://drupal.org/project/comments/add/16069
Project: Drupal Version: cvs Component: base system Category: feature requests Priority: normal Assigned to: Jose A Reyero Reported by: Jose A Reyero Updated by: moshe weitzman Status: patch Instead of writing a 3 line if() statement, you might use module_invoke('i18n_url_rewrite', $path). that goes for your other patches as well. improves readability slightly. moshe weitzman Previous comments: ------------------------------------------------------------------------ January 23, 2005 - 19:42 : Jose A Reyero Attachment: http://drupal.org/files/issues/i18n_drupal_goto_01.patch (8.41 KB) This is firs of a serie of patches adding support for some i18n related features. This patch: - moves drupal_goto to bootstrap.inc, making it possible to use it from the module_init, even for cached pages - moves url() to bootstrap.inc, as it is needed by drupal_goto, and includes a check for not to resolve path aliases when called from bootstrap (it is not needed and would require including lot more stuff from common.inc) - adds a simple hook to call 'i18n_url_rewrite' from the function 'url()' , which allows outgoing urls to be rewrited, so some additional info can be placed in the path. ------------------------------------------------------------------------ January 24, 2005 - 01:09 : chx I like this approach. First of all, it moves only a very little code from common to bootstrap. Second, it does not introduce new init mechanisms like all previous i18n revisions did. Third, the penalty for the code in the case i18n is off, is incredibly small -- one if per url() call. -- View: http://drupal.org/node/16069 Edit: http://drupal.org/project/comments/add/16069
Project: Drupal Version: cvs Component: base system Category: feature requests Priority: normal Assigned to: Jose A Reyero Reported by: Jose A Reyero Updated by: chx Status: patch moshe, I tried and failed. This early you can not call module_invoke. chx Previous comments: ------------------------------------------------------------------------ January 24, 2005 - 01:42 : Jose A Reyero Attachment: http://drupal.org/files/issues/i18n_drupal_goto_01.patch (8.41 KB) This is firs of a serie of patches adding support for some i18n related features. This patch: - moves drupal_goto to bootstrap.inc, making it possible to use it from the module_init, even for cached pages - moves url() to bootstrap.inc, as it is needed by drupal_goto, and includes a check for not to resolve path aliases when called from bootstrap (it is not needed and would require including lot more stuff from common.inc) - adds a simple hook to call 'i18n_url_rewrite' from the function 'url()' , which allows outgoing urls to be rewrited, so some additional info can be placed in the path. ------------------------------------------------------------------------ January 24, 2005 - 07:09 : chx I like this approach. First of all, it moves only a very little code from common to bootstrap. Second, it does not introduce new init mechanisms like all previous i18n revisions did. Third, the penalty for the code in the case i18n is off, is incredibly small -- one if per url() call. ------------------------------------------------------------------------ January 24, 2005 - 15:47 : moshe weitzman Instead of writing a 3 line if() statement, you might use module_invoke('i18n_url_rewrite', $path). that goes for your other patches as well. improves readability slightly. -- View: http://drupal.org/node/16069 Edit: http://drupal.org/project/comments/add/16069
Project: Drupal Version: cvs Component: base system Category: feature requests Priority: normal Assigned to: Jose A Reyero Reported by: Jose A Reyero Updated by: chx Status: patch Attachment: http://drupal.org/files/issues/i18n_drupal_goto.patch (8.68 KB) Upgrade to HEAD. chx Previous comments: ------------------------------------------------------------------------ January 24, 2005 - 01:42 : Jose A Reyero Attachment: http://drupal.org/files/issues/i18n_drupal_goto_01.patch (8.41 KB) This is firs of a serie of patches adding support for some i18n related features. This patch: - moves drupal_goto to bootstrap.inc, making it possible to use it from the module_init, even for cached pages - moves url() to bootstrap.inc, as it is needed by drupal_goto, and includes a check for not to resolve path aliases when called from bootstrap (it is not needed and would require including lot more stuff from common.inc) - adds a simple hook to call 'i18n_url_rewrite' from the function 'url()' , which allows outgoing urls to be rewrited, so some additional info can be placed in the path. ------------------------------------------------------------------------ January 24, 2005 - 07:09 : chx I like this approach. First of all, it moves only a very little code from common to bootstrap. Second, it does not introduce new init mechanisms like all previous i18n revisions did. Third, the penalty for the code in the case i18n is off, is incredibly small -- one if per url() call. ------------------------------------------------------------------------ January 24, 2005 - 15:47 : moshe weitzman Instead of writing a 3 line if() statement, you might use module_invoke('i18n_url_rewrite', $path). that goes for your other patches as well. improves readability slightly. ------------------------------------------------------------------------ January 29, 2005 - 18:53 : chx moshe, I tried and failed. This early you can not call module_invoke. -- View: http://drupal.org/node/16069 Edit: http://drupal.org/project/comments/add/16069
Issue status update for http://drupal.org/node/16069 Post a follow up: http://drupal.org/project/comments/add/16069 Project: Drupal Version: cvs Component: base system Category: feature requests Priority: normal Assigned to: Jose A Reyero Reported by: Jose A Reyero Updated by: chx Status: patch Let's move drupal_goto and url to bootstrap and also add a conditional call to i18n. Why i18n and not a full hook_url_rewrite? Things would get ugly here 'cos of the ordering. i18n uses this patch to redirect home page based on language. chx Previous comments: ------------------------------------------------------------------------ Mon, 24 Jan 2005 00:42:12 +0000 : Jose A Reyero Attachment: http://drupal.org/files/issues/i18n_drupal_goto_01.patch (8.41 KB) This is firs of a serie of patches adding support for some i18n related features. This patch: - moves drupal_goto to bootstrap.inc, making it possible to use it from the module_init, even for cached pages - moves url() to bootstrap.inc, as it is needed by drupal_goto, and includes a check for not to resolve path aliases when called from bootstrap (it is not needed and would require including lot more stuff from common.inc) - adds a simple hook to call 'i18n_url_rewrite' from the function 'url()' , which allows outgoing urls to be rewrited, so some additional info can be placed in the path. ------------------------------------------------------------------------ Mon, 24 Jan 2005 06:09:35 +0000 : chx I like this approach. First of all, it moves only a very little code from common to bootstrap. Second, it does not introduce new init mechanisms like all previous i18n revisions did. Third, the penalty for the code in the case i18n is off, is incredibly small -- one if per url() call. ------------------------------------------------------------------------ Mon, 24 Jan 2005 14:47:18 +0000 : moshe weitzman Instead of writing a 3 line if() statement, you might use module_invoke('i18n_url_rewrite', $path). that goes for your other patches as well. improves readability slightly. ------------------------------------------------------------------------ Sat, 29 Jan 2005 17:53:22 +0000 : chx moshe, I tried and failed. This early you can not call module_invoke. ------------------------------------------------------------------------ Thu, 03 Feb 2005 14:58:37 +0000 : chx Attachment: http://drupal.org/files/issues/i18n_drupal_goto.patch (8.68 KB) Upgrade to HEAD.
Issue status update for http://drupal.org/node/16069 Post a follow up: http://drupal.org/project/comments/add/16069 Project: Drupal Version: cvs Component: base system Category: feature requests Priority: normal Assigned to: Jose A Reyero Reported by: Jose A Reyero Updated by: chx Status: patch Attachment: http://drupal.org/files/issues/i18n_urls.patch (10.52 KB) oopsie, patch. chx Previous comments: ------------------------------------------------------------------------ Mon, 24 Jan 2005 00:42:12 +0000 : Jose A Reyero Attachment: http://drupal.org/files/issues/i18n_drupal_goto_01.patch (8.41 KB) This is firs of a serie of patches adding support for some i18n related features. This patch: - moves drupal_goto to bootstrap.inc, making it possible to use it from the module_init, even for cached pages - moves url() to bootstrap.inc, as it is needed by drupal_goto, and includes a check for not to resolve path aliases when called from bootstrap (it is not needed and would require including lot more stuff from common.inc) - adds a simple hook to call 'i18n_url_rewrite' from the function 'url()' , which allows outgoing urls to be rewrited, so some additional info can be placed in the path. ------------------------------------------------------------------------ Mon, 24 Jan 2005 06:09:35 +0000 : chx I like this approach. First of all, it moves only a very little code from common to bootstrap. Second, it does not introduce new init mechanisms like all previous i18n revisions did. Third, the penalty for the code in the case i18n is off, is incredibly small -- one if per url() call. ------------------------------------------------------------------------ Mon, 24 Jan 2005 14:47:18 +0000 : moshe weitzman Instead of writing a 3 line if() statement, you might use module_invoke('i18n_url_rewrite', $path). that goes for your other patches as well. improves readability slightly. ------------------------------------------------------------------------ Sat, 29 Jan 2005 17:53:22 +0000 : chx moshe, I tried and failed. This early you can not call module_invoke. ------------------------------------------------------------------------ Thu, 03 Feb 2005 14:58:37 +0000 : chx Attachment: http://drupal.org/files/issues/i18n_drupal_goto.patch (8.68 KB) Upgrade to HEAD. ------------------------------------------------------------------------ Fri, 22 Jul 2005 18:26:45 +0000 : chx Let's move drupal_goto and url to bootstrap and also add a conditional call to i18n. Why i18n and not a full hook_url_rewrite? Things would get ugly here 'cos of the ordering. i18n uses this patch to redirect home page based on language.
Issue status update for http://drupal.org/node/16069 Post a follow up: http://drupal.org/project/comments/add/16069 Project: Drupal Version: cvs Component: base system Category: feature requests Priority: normal Assigned to: Jose A Reyero Reported by: Jose A Reyero Updated by: moshe weitzman Status: patch ok with me. a few new functions in bootstrap doesn't materially increase php parse time. moshe weitzman Previous comments: ------------------------------------------------------------------------ Mon, 24 Jan 2005 00:42:12 +0000 : Jose A Reyero Attachment: http://drupal.org/files/issues/i18n_drupal_goto_01.patch (8.41 KB) This is firs of a serie of patches adding support for some i18n related features. This patch: - moves drupal_goto to bootstrap.inc, making it possible to use it from the module_init, even for cached pages - moves url() to bootstrap.inc, as it is needed by drupal_goto, and includes a check for not to resolve path aliases when called from bootstrap (it is not needed and would require including lot more stuff from common.inc) - adds a simple hook to call 'i18n_url_rewrite' from the function 'url()' , which allows outgoing urls to be rewrited, so some additional info can be placed in the path. ------------------------------------------------------------------------ Mon, 24 Jan 2005 06:09:35 +0000 : chx I like this approach. First of all, it moves only a very little code from common to bootstrap. Second, it does not introduce new init mechanisms like all previous i18n revisions did. Third, the penalty for the code in the case i18n is off, is incredibly small -- one if per url() call. ------------------------------------------------------------------------ Mon, 24 Jan 2005 14:47:18 +0000 : moshe weitzman Instead of writing a 3 line if() statement, you might use module_invoke('i18n_url_rewrite', $path). that goes for your other patches as well. improves readability slightly. ------------------------------------------------------------------------ Sat, 29 Jan 2005 17:53:22 +0000 : chx moshe, I tried and failed. This early you can not call module_invoke. ------------------------------------------------------------------------ Thu, 03 Feb 2005 14:58:37 +0000 : chx Attachment: http://drupal.org/files/issues/i18n_drupal_goto.patch (8.68 KB) Upgrade to HEAD. ------------------------------------------------------------------------ Fri, 22 Jul 2005 18:26:45 +0000 : chx Let's move drupal_goto and url to bootstrap and also add a conditional call to i18n. Why i18n and not a full hook_url_rewrite? Things would get ugly here 'cos of the ordering. i18n uses this patch to redirect home page based on language. ------------------------------------------------------------------------ Fri, 22 Jul 2005 18:29:58 +0000 : chx Attachment: http://drupal.org/files/issues/i18n_urls.patch (10.52 KB) oopsie, patch.
participants (3)
-
chx -
Jose A Reyero -
moshe weitzman