Changeset 1494

Show
Ignore:
Timestamp:
02/18/08 13:39:49 (6 months ago)
Author:
Neal
Message:

Modified the redirect function so that it prefixes URLs with the base URL only when it is required.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/upload/include/functions.php

    r1356 r1494  
    850850        global $db, $pun_config, $lang_common, $pun_user; 
    851851 
    852         // Prefix with o_base_url (unless it's there already
    853         if (strpos($destination_url, $pun_config['o_base_url']) !== 0) 
     852        // Prefix with o_base_url (unless there's already a valid URI
     853        if (strpos($destination_url, 'http://') !== 0 && strpos($destination_url, 'https://') !== 0 && strpos($destination_url, '/') !== 0) 
    854854                $destination_url = $pun_config['o_base_url'].'/'.$destination_url; 
    855855