Plugin Directory

Changeset 2671293


Ignore:
Timestamp:
02/02/2022 12:48:41 PM (4 years ago)
Author:
globalprogramming
Message:

6.7b trunk - see readme

Location:
whmcs-bridge/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • whmcs-bridge/trunk/bridge.init.php

    r2667222 r2671293  
    44if (!defined('WHMCS_BRIDGE_PAGE')) define('WHMCS_BRIDGE_PAGE','WHMCS');
    55
    6 define("CC_WHMCS_BRIDGE_VERSION","6.6b");
     6define("CC_WHMCS_BRIDGE_VERSION","6.7b");
    77
    88if (!defined('PHP_VERSION_ID')) {
     
    487487        $cc_whmcs_bridge_to_include = "index";
    488488    }
     489
     490    cc_whmcs_log(0, '[URL Init '.$ref.'] '.$cc_whmcs_bridge_to_include);
    489491
    490492    if ($cc_whmcs_bridge_to_include == "index" && !empty($_GET['gid']) && count($_GET) < 2) {
     
    920922    if (!empty($_GET)) {
    921923        foreach ($_GET as $k => $v) {
    922             if (!in_array($k, $ignoreGets))
    923                 $params[$k] = sanitize_text_field($v);
     924            if (!in_array($k, $ignoreGets)) {
     925                if (is_array($v)) {
     926                    foreach ($v as $kk => $vv) {
     927                        if (is_array($vv)) {
     928                            foreach ($vv as $kkk => $vvv) {
     929                                $params[$k][$kk][$kkk] = sanitize_text_field($vvv);
     930                            }
     931                        } else {
     932                            $params[$k][$kk] = sanitize_text_field($vv);
     933                        }
     934                    }
     935                } else {
     936                    $params[$k] = sanitize_text_field($v);
     937                }
     938            }
    924939        }
    925940    }
  • whmcs-bridge/trunk/bridge.php

    r2667222 r2671293  
    55 Description: WHMCS Bridge is a plugin that integrates the powerful WHMCS support and billing software with WordPress.
    66 Author: globalprogramming
    7  Version: 6.6b
     7 Version: 6.7b
    88 Author URI: http://i-plugins.com/
    99 */
  • whmcs-bridge/trunk/includes/parser.inc.php

    r2667222 r2671293  
    13311331            $redir = str_replace($whmcs, '', $redir);
    13321332
    1333         $redir = str_replace($folder, '', $redir);
     1333        if ($folder != '/')
     1334            $redir = str_replace($folder, '', $redir);
    13341335
    13351336        if (!get_option('cc_whmcs_bridge_permalinks'))
     
    13371338        else
    13381339            $return = $home.str_replace('.php', '', $redir);
     1340
     1341        $substr = stristr($return, '?', true);
     1342        if ($substr !== false && substr($substr, -1) != '/') {
     1343            $return = str_replace($substr, $substr.'/', $return);
     1344        }
    13391345
    13401346        cc_whmcs_log(0, "RETURN: ".$return);
  • whmcs-bridge/trunk/includes/request.class.php

    r2667071 r2671293  
    243243        }
    244244
     245        $substr = stristr($url, '?', true);
     246        if (stristr($url, '/store/') !== false && $substr !== false && substr($substr, -1) == "/")
     247            $url = str_replace($substr, substr($substr, 0, -1), $url);
     248
    245249        $this->debug(0, 'Not cached, processing file - '.$url);
    246250
     
    324328        $apost = $this->generatePostArray();
    325329
    326         $this->debug(0, "Post data: ".print_r($apost, true));
    327 
    328330        if (!empty($newfiles)) {
    329331            $http_args['method'] = 'POST';
     
    399401        }
    400402
    401         $this->debug(0, "Posting to {$url} with headers: ".json_encode($http_args['headers']));
     403        if (empty($http_args['method']))
     404            $http_args['method'] = 'GET';
     405
     406        $this->debug(0, $http_args['method']." to {$url} with headers: ".json_encode($http_args['headers']));
    402407
    403408        $http_args['redirection'] = 0;
     
    604609                    }
    605610
     611                    $substr = stristr($newRedir, '?', true);
     612                    if ($substr !== false && substr($substr, -1) != '/') {
     613                        $newRedir = str_replace($substr, $substr.'/', $newRedir);
     614                    }
     615
    606616                    $this->debug(0, '[XX - '.$opt.'] New Redirect: ' . $newRedir . ' (' . $redir . ')');
    607617                } else {
     
    611621
    612622                if ($redir != $newRedir || stristr($redir, '../viewinvoice')) {
     623                    $newRedir = urldecode($newRedir);
     624                    $this->debug(0, 'Header relocation '.$newRedir);
    613625                    header('Location:' . $newRedir);
    614626                    die();
  • whmcs-bridge/trunk/readme.txt

    r2667222 r2671293  
    55Requires at least: 5.0
    66Tested up to: 5.9
    7 Stable tag: 6.6b
     7Stable tag: 6.7b
    88License: GPLv3
    99
     
    7777
    7878== Changelog ==
     79
     80= 6.7b =
     81* Cart redirection issue fix
    7982
    8083= 6.6b =
Note: See TracChangeset for help on using the changeset viewer.