Plugin Directory

Changeset 533673


Ignore:
Timestamp:
04/19/2012 06:45:36 PM (14 years ago)
Author:
VanillaForums
Message:

Added fix so that the forum's domain is on the trusted domain whitelist in wordpress and redirects will function properly between wordpress and vanilla.

Location:
vanilla-forums/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • vanilla-forums/trunk/functions.php

    r507867 r533673  
    334334    return $string;
    335335}
     336
     337/**
     338 * Place the Vanilla Forum on the external domain redirect whitelist.
     339 */
     340function vf_allowed_redirect_hosts($allowed_hosts, $lp) {
     341   $path = str_replace(array('http://', 'https://'), array('', ''), vf_get_option('url'));
     342   $ix = strpos($path, '/');
     343   if ($ix !== FALSE)
     344      $path = substr($path, 0, $ix);
     345
     346   
     347   if (!in_array($path, $allowed_hosts))
     348        $allowed_hosts[] = $path;
     349
     350    return $allowed_hosts;
     351}
  • vanilla-forums/trunk/hooks.php

    r504486 r533673  
    2525    // Override wordpress' core functions for rendering comments and comment counts.
    2626    add_filter('comments_template', 'vf_comments_template', 1, 2);
    27     // add_filter('comments_number', 'vf_comments_number');
    28     // add_filter('get_comments_number', 'vf_get_comments_number');
     27   
     28   // Place the Vanilla Forum on the external domain redirect whitelist.
     29   add_filter('allowed_redirect_hosts', 'vf_allowed_redirect_hosts', 10, 2 );   
    2930}
    3031
  • vanilla-forums/trunk/plugin.php

    r529910 r533673  
    3838- Fixed bad reference to transparent.png that caused a broken image in the dashboard menu.
    3939- Fixed a bug that caused the forum url input to fill with garbage when the input is blank or an incorrect url is used.
     401.1.5
     41- Added fix so that the forum's domain is on the trusted domain whitelist in wordpress and redirects will function properly between wordpress and vanilla.
    4042
    4143Copyright 2010 Vanilla Forums Inc
Note: See TracChangeset for help on using the changeset viewer.