# HG changeset patch # User Nathan Phillip Brink # Date 2010-12-08 20:53:02 # Node ID f847b2da1a6adb1375ef979a866b221e9f39333e # Parent 2092dc6f277458f1cff92086dbdb7b247260ed0a Add a libs/ directory which people may put 3rd party libs in if they so choose. diff --git a/inc/class.page.php b/inc/class.page.php --- a/inc/class.page.php +++ b/inc/class.page.php @@ -25,6 +25,16 @@ define('SP_PACKAGE_NAME', 'slate_permuta define('SP_PACKAGE_VERSION', '0.1_pre'); define('SP_PACKAGE_STRING', SP_PACKAGE_NAME . '-' . SP_PACKAGE_VERSION); +/* + * Set up include() path for user-supplied libs (in case if his system + * doesn't have libs, such as recaptchalib.php). Users would store + * such libs in /libs. + * + * Coding note: dirname(dirname('a/b/c')) returns 'a'. This is a + * similar effect to dirname('a/b/c') . DIRECTORY_SEPARATOR . '..'. + */ +set_include_path(get_include_path() . PATH_SEPARATOR . dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'libs'); + /** * Not sure if there's a better place for this... it'd be a pita to * make a new include file like doconfig.inc but maybe that'll make diff --git a/libs/.keep b/libs/.keep new file mode 100644