# HG changeset patch # User Nathan Phillip Brink # Date 2011-02-09 23:59:21 # Node ID f2ad2e40082f5106798e83547a4c02a9cc9d802e # Parent 5dd763389a0aa80ef804e4033839f6c039122454 Fix require_once (include) calls which had broken paths depending on the CWD of the calling script. diff --git a/inc/class.schedule.php b/inc/class.schedule.php --- a/inc/class.schedule.php +++ b/inc/class.schedule.php @@ -26,15 +26,16 @@ // all the possible permutations. //************************************************** -include_once('inc/class.course.inc'); -include_once 'class.section.php'; -include_once 'inc/class.page.php'; +$incdir = dirname(__FILE__) . DIRECTORY_SEPARATOR; +include_once $incdir . 'class.course.inc'; +include_once $incdir . 'class.section.php'; +include_once $incdir . 'class.page.php'; /* * Load a Classes -> Course converter class for the sake of the * Schedule::__wakeup() magic function. */ -require_once('inc/class.classes_convert.inc'); +require_once $incdir . 'class.classes_convert.inc'; class Schedule { diff --git a/inc/class.section.php b/inc/class.section.php --- a/inc/class.section.php +++ b/inc/class.section.php @@ -24,7 +24,7 @@ // Represents a section of a class. //-------------------------------------------------- -require_once('inc/class.section_meeting.inc'); +require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'class.section_meeting.inc'; class Section {