Changeset 1585
- Timestamp:
- 07/11/2008 02:00:08 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bb-admin/admin.php
r1187 r1585 3 3 4 4 require_once('../bb-load.php'); 5 6 bb_ssl_redirect(); 5 7 6 8 bb_auth(); -
trunk/bb-includes/functions.php
r1584 r1585 1957 1957 } 1958 1958 1959 /** 1960 * bb_ssl_redirect() - Forces redirection to an SSL page when required 1961 * 1962 * @since 1.0-beta 1963 * 1964 * @return void 1965 **/ 1966 function bb_ssl_redirect() 1967 { 1968 do_action('bb_ssl_redirect'); 1969 1970 $page = bb_get_location(); 1971 1972 if (BB_IS_ADMIN && !bb_force_ssl_admin()) { 1973 return; 1974 } 1975 1976 switch ($page) { 1977 case 'login-page': 1978 case 'register-page': 1979 if (!bb_force_ssl_user_forms()) { 1980 return; 1981 } 1982 break; 1983 1984 case 'profile-page': 1985 $tab = isset($_GET['tab']) ? $_GET['tab'] : get_path(2); 1986 if ($tab == 'edit' && !bb_force_ssl_user_forms()) { 1987 return; 1988 } 1989 break; 1990 1991 default: 1992 return; 1993 break; 1994 } 1995 1996 if (bb_is_ssl()) { 1997 return; 1998 } 1999 2000 if ( 0 === strpos($_SERVER['REQUEST_URI'], bb_get_option('uri')) ) { 2001 $uri = $_SERVER['REQUEST_URI']; 2002 } else { 2003 $uri = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; 2004 } 2005 2006 $uri = bb_get_option('uri_ssl') . substr($uri, strlen(bb_get_option('uri'))); 2007 2008 bb_safe_redirect($uri); 2009 2010 return; 2011 } 2012 2013 /** 2014 * bb_is_ssl() - Determine if SSL is used. 2015 * 2016 * @since 1.0-beta 2017 * 2018 * @return bool True if SSL, false if not used. 2019 */ 2020 function bb_is_ssl() { 2021 return ( 'on' == strtolower($_SERVER['HTTPS']) ) ? true : false; 2022 } 2023 1959 2024 // This is the only function that should add to user / topic 1960 2025 // NOT bbdb::prepared -
trunk/bb-login.php
r1575 r1585 1 1 <?php 2 2 require('./bb-load.php'); 3 4 bb_ssl_redirect(); 3 5 4 6 $ref = wp_get_referer(); -
trunk/profile-edit.php
r1575 r1585 1 1 <?php 2 2 require_once('./bb-load.php'); 3 4 bb_ssl_redirect(); 3 5 4 6 bb_auth(); -
trunk/register.php
r1220 r1585 1 1 <?php 2 2 require('./bb-load.php'); 3 4 bb_ssl_redirect(); 3 5 4 6 require_once( BB_PATH . BB_INC . 'registration-functions.php');
Note: See TracChangeset
for help on using the changeset viewer.