summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorjim-p <jim@pingle.org>2009-10-06 18:01:39 -0400
committerjim-p <jim@pingle.org>2009-10-06 18:01:39 -0400
commitffba49766d29f3e7ed0c4ed2b745ca08d75eaf25 (patch)
treeffb3c3cc1f5604dc3409e1a025d77bd8505afcba /etc/inc
parenta3c770648fffc7d20fa7c5c56c4461666f048974 (diff)
downloadpfsense-ffba49766d29f3e7ed0c4ed2b745ca08d75eaf25.zip
pfsense-ffba49766d29f3e7ed0c4ed2b745ca08d75eaf25.tar.gz
Add a new (unlinked) page which allows entering a custom pkg repo URL
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/pfsense-utils.inc2
-rw-r--r--etc/inc/pkg-utils.inc3
2 files changed, 3 insertions, 2 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 0a0f941..be50197 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -792,7 +792,7 @@ function call_pfsense_method($method, $params, $timeout = 0) {
if($ip == $g['product_website'])
return false;
- $xmlrpc_base_url = $g['xmlrpcbaseurl'];
+ $xmlrpc_base_url = isset($config['system']['altpkgrepo']['enable']) ? $config['system']['altpkgrepo']['xmlrpcbaseurl'] : $g['xmlrpcbaseurl'];
$xmlrpc_path = $g['xmlrpcpath'];
$msg = new XML_RPC_Message($method, array(XML_RPC_Encode($params)));
$cli = new XML_RPC_Client($xmlrpc_path, $xmlrpc_base_url);
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index 6b5de9c..3f04edc 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -152,7 +152,8 @@ function get_pkg_sizes($pkgs = 'all') {
global $g;
$params = array("pkg" => $pkgs);
$msg = new XML_RPC_Message('pfsense.get_pkg_sizes', array(php_value_to_xmlrpc($params)));
- $cli = new XML_RPC_Client($g['xmlrpcpath'], $g['xmlrpcbaseurl']);
+ $xmlrpc_base_url = isset($config['system']['altpkgrepo']['enable']) ? $config['system']['altpkgrepo']['xmlrpcbaseurl'] : $g['xmlrpcbaseurl'];
+ $cli = new XML_RPC_Client($g['xmlrpcpath'], $xmlrpc_base_url);
$resp = $cli->send($msg, 10);
if($resp and !$resp->faultCode()) {
$raw_versions = $resp->value();
OpenPOWER on IntegriCloud