From 720e85406643de2c8e041b8c5def0a3a930cdce0 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Tue, 19 Jul 2005 10:26:56 +0000 Subject: [PATCH] Add BUNDLE_NOTICE files on where to replace inclusion files. We need to ensure that always our bundled files get included and we don't rely on PEAR installations on the user's server. --- bundled-libs/Cache/BUNDLE_NOTICE | 8 ++++++++ bundled-libs/Cache/Lite.php | 2 +- bundled-libs/Cache/Lite/Function.php | 2 +- bundled-libs/HTTP/BUNDLE_NOTICE | 10 ++++++++++ bundled-libs/HTTP/Request.php | 6 +++--- bundled-libs/Net/BUNDLE_NOTICE | 9 +++++++++ bundled-libs/Net/DNSBL.php | 2 +- bundled-libs/Net/DNSBL/BUNDLE_NOTICE | 13 +++++++++++++ bundled-libs/Net/DNSBL/SURBL.php | 8 ++++---- bundled-libs/Net/Socket.php | 2 +- bundled-libs/XML/BUNDLE_NOTICE | 8 ++++++++ bundled-libs/XML/RPC.php | 2 +- bundled-libs/XML/RPC/BUNDLE_NOTICE | 4 ---- 13 files changed, 60 insertions(+), 16 deletions(-) create mode 100644 bundled-libs/Cache/BUNDLE_NOTICE create mode 100644 bundled-libs/HTTP/BUNDLE_NOTICE create mode 100644 bundled-libs/Net/BUNDLE_NOTICE create mode 100644 bundled-libs/Net/DNSBL/BUNDLE_NOTICE create mode 100644 bundled-libs/XML/BUNDLE_NOTICE delete mode 100644 bundled-libs/XML/RPC/BUNDLE_NOTICE diff --git a/bundled-libs/Cache/BUNDLE_NOTICE b/bundled-libs/Cache/BUNDLE_NOTICE new file mode 100644 index 0000000..2fab53a --- /dev/null +++ b/bundled-libs/Cache/BUNDLE_NOTICE @@ -0,0 +1,8 @@ +- Replace: +Lite.php: +include_once('PEAR.php'); +include_once dirname(__FILE__) . '/../../PEAR.php'; + +Output.php, Function.php: +require_once('Cache/Lite.php'); +require_once(dirname(__FILE__) . '/../Lite.php'; \ No newline at end of file diff --git a/bundled-libs/Cache/Lite.php b/bundled-libs/Cache/Lite.php index 34e5bcd..b8d47f4 100644 --- a/bundled-libs/Cache/Lite.php +++ b/bundled-libs/Cache/Lite.php @@ -494,7 +494,7 @@ class Cache_Lite */ function raiseError($msg, $code) { - include_once('PEAR.php'); + include_once(dirname(__FILE__) . '/../../PEAR.php'); PEAR::raiseError($msg, $code, $this->_pearErrorMode); } diff --git a/bundled-libs/Cache/Lite/Function.php b/bundled-libs/Cache/Lite/Function.php index 0d69e22..0ed15fb 100644 --- a/bundled-libs/Cache/Lite/Function.php +++ b/bundled-libs/Cache/Lite/Function.php @@ -16,7 +16,7 @@ * @author Fabien MARTY */ -require_once('Cache/Lite.php'); +require_once(dirname(__FILE__) . '/../Lite.php'); class Cache_Lite_Function extends Cache_Lite { diff --git a/bundled-libs/HTTP/BUNDLE_NOTICE b/bundled-libs/HTTP/BUNDLE_NOTICE new file mode 100644 index 0000000..b8129a7 --- /dev/null +++ b/bundled-libs/HTTP/BUNDLE_NOTICE @@ -0,0 +1,10 @@ +- Replace: +Request.php: +require_once('PEAR.php'); +require_once(dirname(__FILE__) . '/../PEAR.php'; + +require_once('Net/Socket.php'); +require_once(dirname(__FILE__) . '/../Net/Socket.php'; + +require_once('Net/URL.php'); +require_once(dirname(__FILE__) . '/../Net/URL.php'; \ No newline at end of file diff --git a/bundled-libs/HTTP/Request.php b/bundled-libs/HTTP/Request.php index 581dbc6..bad6d99 100644 --- a/bundled-libs/HTTP/Request.php +++ b/bundled-libs/HTTP/Request.php @@ -43,9 +43,9 @@ // echo $a->getResponseBody(); // -require_once 'PEAR.php'; -require_once 'Net/Socket.php'; -require_once 'Net/URL.php'; +require_once(dirname(__FILE__) . '/../PEAR.php'; +require_once(dirname(__FILE__) . '/../Net/Socket.php'; +require_once(dirname(__FILE__) . '/../Net/URL.php'; define('HTTP_REQUEST_METHOD_GET', 'GET', true); define('HTTP_REQUEST_METHOD_HEAD', 'HEAD', true); diff --git a/bundled-libs/Net/BUNDLE_NOTICE b/bundled-libs/Net/BUNDLE_NOTICE new file mode 100644 index 0000000..7ab1c97 --- /dev/null +++ b/bundled-libs/Net/BUNDLE_NOTICE @@ -0,0 +1,9 @@ +- Replace: +DNSBL.php +require_once 'Net/CheckIP.php'; +require_once dirname(__FILE__) . '/CheckIP.php'; + +Socket.php +require_once('PEAR.php'); +require_once(dirname(__FILE__) . '/../PEAR.php'; + diff --git a/bundled-libs/Net/DNSBL.php b/bundled-libs/Net/DNSBL.php index ce6837b..3091dab 100644 --- a/bundled-libs/Net/DNSBL.php +++ b/bundled-libs/Net/DNSBL.php @@ -32,7 +32,7 @@ * @license http://www.php.net/license/3_0.txt * @version 0.5.3 */ -require_once 'Net/CheckIP.php'; +require_once dirname(__FILE__) . '/CheckIP.php'; class Net_DNSBL { diff --git a/bundled-libs/Net/DNSBL/BUNDLE_NOTICE b/bundled-libs/Net/DNSBL/BUNDLE_NOTICE new file mode 100644 index 0000000..b175048 --- /dev/null +++ b/bundled-libs/Net/DNSBL/BUNDLE_NOTICE @@ -0,0 +1,13 @@ +- Replace: +SURBL.php +require_once 'Cache/Lite.php'; +require_once dirname(__FILE__) . '/../../Cache/Lite.php'; + +require_once 'HTTP/Request.php'; +require_once dirname(__FILE__) . '/../../HTTP/Request.php'; + +require_once 'Net/CheckIP.php'; +require_once dirname(__FILE__) . '/../CheckIP.php'; + +require_once 'Net/DNSBL.php'; +require_once dirname(__FILE__) . '/../DNSBL.php'; \ No newline at end of file diff --git a/bundled-libs/Net/DNSBL/SURBL.php b/bundled-libs/Net/DNSBL/SURBL.php index d239fd5..9ffd786 100644 --- a/bundled-libs/Net/DNSBL/SURBL.php +++ b/bundled-libs/Net/DNSBL/SURBL.php @@ -31,10 +31,10 @@ * @license http://www.php.net/license/3_0.txt * @version 0.5.4 */ -require_once 'Cache/Lite.php'; -require_once 'HTTP/Request.php'; -require_once 'Net/CheckIP.php'; -require_once 'Net/DNSBL.php'; +require_once dirname(__FILE__) . '/../../Cache/Lite.php'; +require_once dirname(__FILE__) . '/../../HTTP/Request.php'; +require_once dirname(__FILE__) . '/../CheckIP.php'; +require_once dirname(__FILE__) . '/../DNSBL.php'; class Net_DNSBL_SURBL extends Net_DNSBL { diff --git a/bundled-libs/Net/Socket.php b/bundled-libs/Net/Socket.php index 7c4ff1d..8e39fea 100644 --- a/bundled-libs/Net/Socket.php +++ b/bundled-libs/Net/Socket.php @@ -19,7 +19,7 @@ // // $Id: Socket.php,v 1.24 2005/02/03 20:40:16 chagenbu Exp $ -require_once 'PEAR.php'; +require_once(dirname(__FILE__) . '/../PEAR.php'; define('NET_SOCKET_READ', 1); define('NET_SOCKET_WRITE', 2); diff --git a/bundled-libs/XML/BUNDLE_NOTICE b/bundled-libs/XML/BUNDLE_NOTICE new file mode 100644 index 0000000..ebdcc64 --- /dev/null +++ b/bundled-libs/XML/BUNDLE_NOTICE @@ -0,0 +1,8 @@ +- Replace: +RPC.php: +include_once 'PEAR.php' +include_once dirname(__FILE__) . '/../../PEAR.php'; + +RPC/Server.php: +require_once 'RPC/RPC.php'; +require_once dirname(__FILE__) . '/../RPC.php'; \ No newline at end of file diff --git a/bundled-libs/XML/RPC.php b/bundled-libs/XML/RPC.php index 2a0b652..7f4f022 100644 --- a/bundled-libs/XML/RPC.php +++ b/bundled-libs/XML/RPC.php @@ -468,7 +468,7 @@ class XML_RPC_Base { */ function raiseError($msg, $code) { - include_once 'PEAR.php'; + include_once dirname(__FILE__) . '/../PEAR.php'; if (is_object(@$this)) { return PEAR::raiseError(get_class($this) . ': ' . $msg, $code); } else { diff --git a/bundled-libs/XML/RPC/BUNDLE_NOTICE b/bundled-libs/XML/RPC/BUNDLE_NOTICE deleted file mode 100644 index eddabc1..0000000 --- a/bundled-libs/XML/RPC/BUNDLE_NOTICE +++ /dev/null @@ -1,4 +0,0 @@ -- Replace in XML/RPC/Server.php: - require_once 'RPC/RPC.php'; - with - require_once dirname(__FILE__) . '/../RPC.php'; -- 2.39.5