I noticed that the following code is used to get the uri_brief parameter that can be used in the node and comment notification messages:

'!uri_brief' => drupal_substr($base_url, drupal_strlen('http://')),

However, that won't work if $base_url is something like https://www.example.com

The attached (and untested) patch should allow sites using both http and https to have proper uri_brief replacements.

Comments

greggles’s picture

StatusFileSize
new1.37 KB

The way that core does this is

preg_replace('!^https?://!', '', $base_url)

http://cvs.drupal.org/viewvc.py/drupal/drupal/modules/user/user.module?r...

What do you think? Do you have a site where you can test this?

greggles’s picture

Patch is for 5.x but seems to work for 6.x as well.

aclight’s picture

I guess core's way of doing this is less code, but functionally the same thing, so maybe it's best to do it that way. I don't actually have comment_notify running on a site yet, so don't have a simple way to test. I just happened to notice this while looking through the code.

greggles’s picture

Status: Needs review » Fixed

Cool - thanks for the review.

I accidentally committed this with another issue so I guess it's fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.