Changeset 749537
- Timestamp:
- 08/01/2013 10:47:19 PM (13 years ago)
- File:
-
- 1 edited
-
pilotpress/trunk/pilotpress.php (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pilotpress/trunk/pilotpress.php
r741832 r749537 4 4 Plugin URI: http://officeautopilot.com/ 5 5 Description: OfficeAutoPilot / Ontraport WordPress integration plugin. 6 Version: 1.6.0 e6 Version: 1.6.0f 7 7 Author: Ontraport Inc. 8 8 Author URI: http://officeautopilot.com/ … … 21 21 class PilotPress { 22 22 23 const VERSION = "1.6.0 e";23 const VERSION = "1.6.0f"; 24 24 const WP_MIN = "3.0.0"; 25 25 const NSPACE = "_pilotpress_"; … … 676 676 $customer = $this->get_setting("pilotpress_customer_plr"); 677 677 if(!empty($customer) && $customer != "-1") { 678 $this->redirect(get_permalink($customer));678 self::redirect(get_permalink($customer)); 679 679 } else { 680 $this->redirect($this->homepage_url);680 self::redirect($this->homepage_url); 681 681 } 682 682 die; … … 1381 1381 1382 1382 unset($_SESSION["redirect_to"]); 1383 $this->redirect($redirect_to);1383 self::redirect($redirect_to); 1384 1384 die; 1385 1385 } … … 1389 1389 $aff_plr = $this->get_setting("pilotpress_affiliate_plr"); 1390 1390 if($aff_plr && $aff_plr != "-1") { 1391 $this->redirect(get_permalink($aff_plr));1391 self::redirect(get_permalink($aff_plr)); 1392 1392 die; 1393 1393 exit; 1394 1394 } else { 1395 $this->redirect(site_url());1395 self::redirect(site_url()); 1396 1396 die; 1397 1397 } … … 1400 1400 $cust_plr = $this->get_setting("pilotpress_customer_plr"); 1401 1401 if($cust_plr && $cust_plr != "-1") { 1402 $this->redirect(get_permalink($cust_plr));1402 self::redirect(get_permalink($cust_plr)); 1403 1403 die; 1404 1404 } else { 1405 $this->redirect(site_url());1405 self::redirect(site_url()); 1406 1406 die; 1407 1407 } … … 1418 1418 if(!empty($referrer) && !strstr($referrer, "wp-login") && !strstr($referrer, "wp-admin") ) { 1419 1419 $_SESSION["loginFailed"] = true; 1420 $this->redirect($referrer);1420 self::redirect($referrer); 1421 1421 die; 1422 1422 } … … 1434 1434 { 1435 1435 /* notify user of e-mail, end the rest of WP's processing */ 1436 $this->redirect(site_url() . "/wp-login.php?checkemail=confirm");1436 self::redirect(site_url() . "/wp-login.php?checkemail=confirm"); 1437 1437 die; 1438 1438 } … … 1456 1456 /* redirect the user to where they logged in from */ 1457 1457 if(isset($_SESSION["loginURL"])) 1458 $this->redirect($_SESSION["loginURL"]);1458 self::redirect($_SESSION["loginURL"]); 1459 1459 else 1460 $this->redirect(site_url());1460 self::redirect(site_url()); 1461 1461 } 1462 1462 … … 1608 1608 if(!empty($redirect)) { 1609 1609 if($redirect == "-1") { 1610 $this->redirect(site_url());1610 self::redirect(site_url()); 1611 1611 } 1612 1612 else if($redirect == "-2") { … … 1614 1614 $_SESSION["redirect_to"] = $id; 1615 1615 } 1616 $this->redirect(wp_login_url());1616 self::redirect(wp_login_url()); 1617 1617 } 1618 1618 else { 1619 $this->redirect(get_permalink($redirect));1619 self::redirect(get_permalink($redirect)); 1620 1620 } 1621 1621 1622 1622 } else { 1623 $this->redirect($this->homepage_url);1623 self::redirect($this->homepage_url); 1624 1624 } 1625 1625 } … … 1834 1834 $page_id = $wpdb->get_var("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_pilotpress_system_page' AND meta_value = 'customer_center'", ARRAY_A); 1835 1835 if($page_id) { 1836 $this->redirect(get_permalink($page_id));1836 self::redirect(get_permalink($page_id)); 1837 1837 die; 1838 1838 } … … 1841 1841 $page_id = $wpdb->get_var("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_pilotpress_system_page' AND meta_value = 'affiliate_center'", ARRAY_A); 1842 1842 if($page_id) { 1843 $this->redirect(get_permalink($page_id));1843 self::redirect(get_permalink($page_id)); 1844 1844 die; 1845 1845 } … … 2097 2097 } 2098 2098 2099 public function redirect($url) {2099 public static function redirect($url) { 2100 2100 // Workaround for trac bug #21602 2101 2101 $current_url = $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
Note: See TracChangeset
for help on using the changeset viewer.