From f9e52b95376704a4bb350315428ce5b3b90e2ce9 Mon Sep 17 00:00:00 2001 From: Sveto Krchnavy Date: Mon, 1 May 2017 21:03:28 +0200 Subject: [PATCH 1/3] added legacy_root into includes, defined in config.php --- QueueCLI.php | 28 +++++------ ajax.php | 12 ++--- ajax/deleteActivity.php | 2 +- ajax/editActivity.php | 6 +-- ajax/getAttachmentLocal.php | 4 +- ajax/getCompanyContacts.php | 2 +- ajax/getCompanyLocation.php | 2 +- ajax/getCompanyLocationAndDepartments.php | 2 +- ajax/getCompanyNames.php | 4 +- ajax/getDataGridPager.php | 6 +-- ajax/getDataItemJobOrders.php | 6 +-- ajax/getParsedAddress.php | 6 +-- ajax/getPipelineDetails.php | 2 +- ajax/getPipelineJobOrder.php | 12 ++--- ajax/setCandidateJobOrderRating.php | 2 +- ajax/testEmailSettings.php | 2 +- ajax/zipLookup.php | 4 +- careers/index.php | 2 +- config.php | 8 ++- index.php | 26 +++++----- installtest.php | 4 +- lib/ActivityEntries.php | 6 +-- lib/AddressParser.php | 4 +- lib/Attachments.php | 8 +-- lib/CATSUtility.php | 2 +- lib/CBFUtility.php | 2 +- lib/Calendar.php | 14 +++--- lib/Candidates.php | 12 ++--- lib/CareerPortal.php | 2 +- lib/CommonErrors.php | 2 +- lib/Companies.php | 12 ++--- lib/Contacts.php | 8 +-- lib/ControlPanel.php | 2 +- lib/DataGrid.php | 4 +- lib/DefaultQuestionnaires.php | 2 +- lib/Display.php | 2 +- lib/DocumentToText.php | 4 +- lib/EmailTemplates.php | 4 +- lib/Export.php | 8 +-- lib/FileCompressor.php | 2 +- lib/GraphGenerator.php | 14 +++--- lib/Graphs.php | 2 +- lib/InstallationTests.php | 2 +- lib/JavaScriptCompressor.php | 2 +- lib/JobOrders.php | 12 ++--- lib/License.php | 4 +- lib/ListEditor.php | 2 +- lib/LoginActivity.php | 4 +- lib/Mailer.php | 2 +- lib/NewVersionCheck.php | 4 +- lib/Pipelines.php | 2 +- lib/Profile.php | 4 +- lib/Questionnaire.php | 4 +- lib/QueueProcessor.php | 4 +- lib/Search.php | 4 +- lib/Statistics.php | 2 +- lib/SystemUtility.php | 2 +- lib/Tags.php | 2 +- lib/TemplateUtility.php | 2 +- lib/Users.php | 4 +- lib/WebForm.php | 2 +- lib/Wizard.php | 2 +- modules/activity/ActivityUI.php | 12 ++--- modules/activity/dataGrids.php | 8 +-- modules/attachments/AttachmentsUI.php | 4 +- modules/calendar/CalendarUI.php | 6 +-- modules/calendar/tasks/Reminders.php | 8 +-- modules/candidates/CandidatesUI.php | 50 +++++++++---------- modules/candidates/dataGrids.php | 2 +- modules/careers/CareersUI.php | 34 ++++++------- modules/companies/CompaniesUI.php | 28 +++++------ modules/companies/dataGrids.php | 6 +-- modules/contacts/ContactsUI.php | 26 +++++----- modules/contacts/dataGrids.php | 6 +-- modules/export/ExportUI.php | 4 +- modules/graphs/GraphsUI.php | 12 ++--- modules/home/HomeUI.php | 16 +++--- modules/home/dataGrids.php | 14 +++--- modules/import/ImportUI.php | 24 ++++----- modules/install/CATSUI.php | 2 +- modules/install/ajax/attachmentsReindex.php | 4 +- .../ajax/attachmentsToThreeDirectory.php | 2 +- modules/install/ajax/ui.php | 4 +- modules/joborders/JobOrdersUI.php | 48 +++++++++--------- modules/joborders/dataGrids.php | 4 +- modules/lists/ListsUI.php | 24 ++++----- modules/lists/ajax/addToLists.php | 6 +-- modules/lists/ajax/deleteList.php | 6 +-- modules/lists/ajax/editListName.php | 6 +-- modules/lists/ajax/newList.php | 6 +-- modules/lists/dataGrids.php | 6 +-- modules/login/LoginUI.php | 12 ++--- modules/queue/tasks.php | 2 +- modules/queue/tasks/CleanExceptions.php | 2 +- modules/queue/tasks/SampleRecurring.php | 2 +- modules/queue/tasks/SampleTask.php | 2 +- modules/queue/tasks/Sphinx.php | 4 +- modules/reports/ReportsUI.php | 10 ++-- modules/rss/RssUI.php | 10 ++-- modules/settings/AspDownloads.tpl | 2 +- modules/settings/SettingsUI.php | 42 ++++++++-------- modules/settings/ajax/backup.php | 2 +- modules/tests/TestsUI.php | 8 +-- modules/tests/ajax/getCandidateJobOrderID.php | 2 +- modules/tests/testcases/AJAXTests.php | 2 +- modules/tests/waitForDb.php | 4 +- modules/toolbar/ToolbarUI.php | 12 ++--- modules/wizard/WizardUI.php | 12 ++--- modules/xml/XmlUI.php | 16 +++--- .../latest-sphinx-search/Search.php | 4 +- rebuild_old_docs.php | 2 +- rss/index.php | 2 +- scripts/makeBackup.php | 12 ++--- src/OpenCATS/Entity/CompanyRepository.php | 2 +- src/OpenCATS/Entity/JobOrderRepository.php | 2 +- .../IntegrationTests/DatabaseTestCase.php | 2 +- test/config.php | 7 +++ test/features/bootstrap/FeatureContext.php | 12 ++--- xml/index.php | 2 +- 119 files changed, 454 insertions(+), 441 deletions(-) diff --git a/QueueCLI.php b/QueueCLI.php index 549b98457..a9b30483d 100755 --- a/QueueCLI.php +++ b/QueueCLI.php @@ -36,20 +36,20 @@ chdir($CATSHome); include_once('./config.php'); -include_once('./constants.php'); -include_once('./lib/CATSUtility.php'); -include_once('./lib/DatabaseConnection.php'); -include_once('./lib/DateUtility.php'); -include_once('./lib/Template.php'); -include_once('./lib/Users.php'); -include_once('./lib/MRU.php'); -include_once('./lib/Hooks.php'); -include_once('./lib/Session.php'); /* Depends: MRU, Users, DatabaseConnection. */ -include_once('./lib/UserInterface.php'); /* Depends: Template, Session. */ -include_once('./lib/ModuleUtility.php'); /* Depends: UserInterface */ -include_once('./lib/TemplateUtility.php'); /* Depends: ModuleUtility, Hooks */ -include_once('./lib/QueueProcessor.php'); -include_once('./modules/queue/constants.php'); +include_once(LEGACY_ROOT . '/constants.php'); +include_once(LEGACY_ROOT . '/lib/CATSUtility.php'); +include_once(LEGACY_ROOT . '/lib/DatabaseConnection.php'); +include_once(LEGACY_ROOT . '/lib/DateUtility.php'); +include_once(LEGACY_ROOT . '/lib/Template.php'); +include_once(LEGACY_ROOT . '/lib/Users.php'); +include_once(LEGACY_ROOT . '/lib/MRU.php'); +include_once(LEGACY_ROOT . '/lib/Hooks.php'); +include_once(LEGACY_ROOT . '/lib/Session.php'); /* Depends: MRU, Users, DatabaseConnection. */ +include_once(LEGACY_ROOT . '/lib/UserInterface.php'); /* Depends: Template, Session. */ +include_once(LEGACY_ROOT . '/lib/ModuleUtility.php'); /* Depends: UserInterface */ +include_once(LEGACY_ROOT . '/lib/TemplateUtility.php'); /* Depends: ModuleUtility, Hooks */ +include_once(LEGACY_ROOT . '/lib/QueueProcessor.php'); +include_once(LEGACY_ROOT . '/modules/queue/constants.php'); /* Give the session a unique name to avoid conflicts and start the session. */ @session_name(CATS_SESSION_NAME); diff --git a/ajax.php b/ajax.php index fcf9ad9d4..b87059b4f 100644 --- a/ajax.php +++ b/ajax.php @@ -36,11 +36,11 @@ include_once('./config.php'); -include_once('./constants.php'); -include_once('./lib/DatabaseConnection.php'); -include_once('./lib/Session.php'); /* Depends: MRU, Users, DatabaseConnection. */ -include_once('./lib/AJAXInterface.php'); -include_once('./lib/CATSUtility.php'); +include_once(LEGACY_ROOT . '/constants.php'); +include_once(LEGACY_ROOT . '/lib/DatabaseConnection.php'); +include_once(LEGACY_ROOT . '/lib/Session.php'); /* Depends: MRU, Users, DatabaseConnection. */ +include_once(LEGACY_ROOT . '/lib/AJAXInterface.php'); +include_once(LEGACY_ROOT . '/lib/CATSUtility.php'); header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); @@ -107,7 +107,7 @@ if (!isset($_REQUEST['nobuffer'])) { - include_once('./lib/Hooks.php'); + include_once(LEGACY_ROOT . '/lib/Hooks.php'); ob_start(); include($filename); diff --git a/ajax/deleteActivity.php b/ajax/deleteActivity.php index 1983a573a..180fc6946 100755 --- a/ajax/deleteActivity.php +++ b/ajax/deleteActivity.php @@ -27,7 +27,7 @@ * $Id: deleteActivity.php 1479 2007-01-17 00:22:21Z will $ */ -include_once('./lib/ActivityEntries.php'); +include_once(LEGACY_ROOT . '/lib/ActivityEntries.php'); $interface = new SecureAJAXInterface(); diff --git a/ajax/editActivity.php b/ajax/editActivity.php index e8beb565a..5d1cbed44 100755 --- a/ajax/editActivity.php +++ b/ajax/editActivity.php @@ -28,9 +28,9 @@ */ -include_once('./lib/StringUtility.php'); -include_once('./lib/ActivityEntries.php'); -include_once('./lib/Pipelines.php'); +include_once(LEGACY_ROOT . '/lib/StringUtility.php'); +include_once(LEGACY_ROOT . '/lib/ActivityEntries.php'); +include_once(LEGACY_ROOT . '/lib/Pipelines.php'); $interface = new SecureAJAXInterface(); diff --git a/ajax/getAttachmentLocal.php b/ajax/getAttachmentLocal.php index 62cf87f9d..5710b9a15 100755 --- a/ajax/getAttachmentLocal.php +++ b/ajax/getAttachmentLocal.php @@ -30,8 +30,8 @@ $interface = new SecureAJAXInterface(); -include_once('./lib/CommonErrors.php'); -include_once('./lib/Attachments.php'); +include_once(LEGACY_ROOT . '/lib/CommonErrors.php'); +include_once(LEGACY_ROOT . '/lib/Attachments.php'); @ini_set('memory_limit', '256M'); diff --git a/ajax/getCompanyContacts.php b/ajax/getCompanyContacts.php index f94bbb9c0..01fa82df5 100755 --- a/ajax/getCompanyContacts.php +++ b/ajax/getCompanyContacts.php @@ -27,7 +27,7 @@ * $Id: getCompanyContacts.php 1892 2007-02-20 06:44:04Z will $ */ -include_once('./lib/Companies.php'); +include_once(LEGACY_ROOT . '/lib/Companies.php'); $interface = new SecureAJAXInterface(); diff --git a/ajax/getCompanyLocation.php b/ajax/getCompanyLocation.php index f308a765d..a0cce48f0 100755 --- a/ajax/getCompanyLocation.php +++ b/ajax/getCompanyLocation.php @@ -27,7 +27,7 @@ * $Id: getCompanyLocation.php 2359 2007-04-21 22:49:17Z will $ */ -include_once('./lib/Companies.php'); +include_once(LEGACY_ROOT . '/lib/Companies.php'); $interface = new SecureAJAXInterface(); diff --git a/ajax/getCompanyLocationAndDepartments.php b/ajax/getCompanyLocationAndDepartments.php index fa73cb57d..25abb2023 100755 --- a/ajax/getCompanyLocationAndDepartments.php +++ b/ajax/getCompanyLocationAndDepartments.php @@ -27,7 +27,7 @@ * $Id: getCompanyLocationAndDepartments.php 2359 2007-04-21 22:49:17Z will $ */ -include_once('./lib/Companies.php'); +include_once(LEGACY_ROOT . '/lib/Companies.php'); $interface = new SecureAJAXInterface(); diff --git a/ajax/getCompanyNames.php b/ajax/getCompanyNames.php index eccd8e743..83c3a1eeb 100755 --- a/ajax/getCompanyNames.php +++ b/ajax/getCompanyNames.php @@ -27,8 +27,8 @@ * $Id: getCompanyNames.php 2367 2007-04-23 23:24:05Z will $ */ -include_once('./lib/Companies.php'); -include_once('./lib/Search.php'); +include_once(LEGACY_ROOT . '/lib/Companies.php'); +include_once(LEGACY_ROOT . '/lib/Search.php'); $interface = new SecureAJAXInterface(); diff --git a/ajax/getDataGridPager.php b/ajax/getDataGridPager.php index b3a406a13..7e8d3c4bb 100755 --- a/ajax/getDataGridPager.php +++ b/ajax/getDataGridPager.php @@ -27,9 +27,9 @@ * $Id: getDataGridPager.php 3078 2007-09-21 20:25:28Z will $ */ -include_once('./lib/CATSUtility.php'); -include_once('./lib/TemplateUtility.php'); -include_once('./lib/DataGrid.php'); +include_once(LEGACY_ROOT . '/lib/CATSUtility.php'); +include_once(LEGACY_ROOT . '/lib/TemplateUtility.php'); +include_once(LEGACY_ROOT . '/lib/DataGrid.php'); $interface = new SecureAJAXInterface(); diff --git a/ajax/getDataItemJobOrders.php b/ajax/getDataItemJobOrders.php index 061d8cb9c..f39ce37ac 100755 --- a/ajax/getDataItemJobOrders.php +++ b/ajax/getDataItemJobOrders.php @@ -49,17 +49,17 @@ switch ($dataItemType) { case DATA_ITEM_CANDIDATE: - include_once('./lib/Candidates.php'); + include_once(LEGACY_ROOT . '/lib/Candidates.php'); $dataItem = new Candidates($siteID); break; case DATA_ITEM_COMPANY: - include_once('./lib/Companies.php'); + include_once(LEGACY_ROOT . '/lib/Companies.php'); $dataItem = new Companies($siteID); break; case DATA_ITEM_CONTACT: - include_once('./lib/Contacts.php'); + include_once(LEGACY_ROOT . '/lib/Contacts.php'); $dataItem = new Contacts($siteID); break; diff --git a/ajax/getParsedAddress.php b/ajax/getParsedAddress.php index 1ab9f112e..aea55ff64 100755 --- a/ajax/getParsedAddress.php +++ b/ajax/getParsedAddress.php @@ -27,9 +27,9 @@ * $Id: getParsedAddress.php 2492 2007-05-25 21:12:47Z will $ */ -include_once('./lib/StringUtility.php'); -include_once('./lib/AddressParser.php'); -include_once('./lib/ResultSetUtility.php'); +include_once(LEGACY_ROOT . '/lib/StringUtility.php'); +include_once(LEGACY_ROOT . '/lib/AddressParser.php'); +include_once(LEGACY_ROOT . '/lib/ResultSetUtility.php'); $interface = new AJAXInterface(); diff --git a/ajax/getPipelineDetails.php b/ajax/getPipelineDetails.php index 1636acf1f..2dcaf15d9 100755 --- a/ajax/getPipelineDetails.php +++ b/ajax/getPipelineDetails.php @@ -27,7 +27,7 @@ * $Id: getPipelineDetails.php 2976 2007-08-30 18:18:48Z andrew $ */ -include_once('./lib/Pipelines.php'); +include_once(LEGACY_ROOT . '/lib/Pipelines.php'); $interface = new SecureAJAXInterface(); diff --git a/ajax/getPipelineJobOrder.php b/ajax/getPipelineJobOrder.php index ed298f8cf..e0f1c6a43 100755 --- a/ajax/getPipelineJobOrder.php +++ b/ajax/getPipelineJobOrder.php @@ -27,12 +27,12 @@ * $Id: getPipelineJobOrder.php 3814 2007-12-06 17:54:28Z brian $ */ -include_once('./lib/Pipelines.php'); -include_once('./lib/TemplateUtility.php'); -include_once('./lib/StringUtility.php'); -include_once('./lib/CATSUtility.php'); -include_once('./lib/Hooks.php'); -include_once('./lib/JobOrders.php'); +include_once(LEGACY_ROOT . '/lib/Pipelines.php'); +include_once(LEGACY_ROOT . '/lib/TemplateUtility.php'); +include_once(LEGACY_ROOT . '/lib/StringUtility.php'); +include_once(LEGACY_ROOT . '/lib/CATSUtility.php'); +include_once(LEGACY_ROOT . '/lib/Hooks.php'); +include_once(LEGACY_ROOT . '/lib/JobOrders.php'); $interface = new SecureAJAXInterface(); diff --git a/ajax/setCandidateJobOrderRating.php b/ajax/setCandidateJobOrderRating.php index 6d15de240..19236e202 100755 --- a/ajax/setCandidateJobOrderRating.php +++ b/ajax/setCandidateJobOrderRating.php @@ -27,7 +27,7 @@ * $Id: setCandidateJobOrderRating.php 1479 2007-01-17 00:22:21Z will $ */ -include_once('./lib/Pipelines.php'); +include_once(LEGACY_ROOT . '/lib/Pipelines.php'); $interface = new SecureAJAXInterface(); diff --git a/ajax/testEmailSettings.php b/ajax/testEmailSettings.php index ef3ddb4f1..5845e4b53 100755 --- a/ajax/testEmailSettings.php +++ b/ajax/testEmailSettings.php @@ -27,7 +27,7 @@ * $Id: testEmailSettings.php 2101 2007-03-06 00:20:17Z brian $ */ -include_once('./lib/Mailer.php'); +include_once(LEGACY_ROOT . '/lib/Mailer.php'); $interface = new SecureAJAXInterface(); diff --git a/ajax/zipLookup.php b/ajax/zipLookup.php index a879991a1..b87e166e9 100755 --- a/ajax/zipLookup.php +++ b/ajax/zipLookup.php @@ -3,8 +3,8 @@ * OpenCATS * AJAX Street/City/State lookup via Zip Interface */ -include_once('./lib/ZipLookup.php'); -include_once('./lib/StringUtility.php'); +include_once(LEGACY_ROOT . '/lib/ZipLookup.php'); +include_once(LEGACY_ROOT . '/lib/StringUtility.php'); $interface = new AJAXInterface(); diff --git a/careers/index.php b/careers/index.php index 41ee15372..fd0a69ff6 100644 --- a/careers/index.php +++ b/careers/index.php @@ -34,7 +34,7 @@ $careerPage = true; chdir('..'); -include_once('./lib/CATSUtility.php'); +include_once(LEGACY_ROOT . '/lib/CATSUtility.php'); include_once(CATSUtility::getIndexName()); ?> diff --git a/config.php b/config.php index b83496470..9a6b07318 100755 --- a/config.php +++ b/config.php @@ -30,6 +30,12 @@ /* License key. */ define('LICENSE_KEY','3163GQ-54ISGW-14E4SHD-ES9ICL-X02DTG-GYRSQ6'); +/* legacy root. */ +if( !defined('LEGACY_ROOT') ) +{ + define('LEGACY_ROOT', '.'); +} + /* Database configuration. */ define('DATABASE_USER', 'cats'); define('DATABASE_PASS', 'password'); @@ -289,7 +295,7 @@ /* -require_once('.\constants.php'); +require_once(LEGACY_ROOT . '/constants.php'); // defining user roles const USER_ROLES = array( 'candidate' => array('Candidate', 'candidate', 'This is a candidate.', ACCESS_LEVEL_SA, ACCESS_LEVEL_READ), diff --git a/index.php b/index.php index 7b46f4e95..e51043b4e 100644 --- a/index.php +++ b/index.php @@ -66,18 +66,18 @@ } include_once('./config.php'); -include_once('./constants.php'); -include_once('./lib/CommonErrors.php'); -include_once('./lib/CATSUtility.php'); -include_once('./lib/DatabaseConnection.php'); -include_once('./lib/Template.php'); -include_once('./lib/Users.php'); -include_once('./lib/MRU.php'); -include_once('./lib/Hooks.php'); -include_once('./lib/Session.php'); /* Depends: MRU, Users, DatabaseConnection. */ -include_once('./lib/UserInterface.php'); /* Depends: Template, Session. */ -include_once('./lib/ModuleUtility.php'); /* Depends: UserInterface */ -include_once('./lib/TemplateUtility.php'); /* Depends: ModuleUtility, Hooks */ +include_once(LEGACY_ROOT . '/constants.php'); +include_once(LEGACY_ROOT . '/lib/CommonErrors.php'); +include_once(LEGACY_ROOT . '/lib/CATSUtility.php'); +include_once(LEGACY_ROOT . '/lib/DatabaseConnection.php'); +include_once(LEGACY_ROOT . '/lib/Template.php'); +include_once(LEGACY_ROOT . '/lib/Users.php'); +include_once(LEGACY_ROOT . '/lib/MRU.php'); +include_once(LEGACY_ROOT . '/lib/Hooks.php'); +include_once(LEGACY_ROOT . '/lib/Session.php'); /* Depends: MRU, Users, DatabaseConnection. */ +include_once(LEGACY_ROOT . '/lib/UserInterface.php'); /* Depends: Template, Session. */ +include_once(LEGACY_ROOT . '/lib/ModuleUtility.php'); /* Depends: UserInterface */ +include_once(LEGACY_ROOT . '/lib/TemplateUtility.php'); /* Depends: ModuleUtility, Hooks */ /* Give the session a unique name to avoid conflicts and start the session. */ @@ -106,7 +106,7 @@ function stripslashes_deep($value) } if (get_magic_quotes_gpc()) { - include_once('./lib/ArrayUtility.php'); + include_once(LEGACY_ROOT . '/lib/ArrayUtility.php'); $_GET = array_map('stripslashes_deep', $_GET); $_POST = array_map('stripslashes_deep', $_POST); diff --git a/installtest.php b/installtest.php index 6d94c7073..6e98dde1b 100755 --- a/installtest.php +++ b/installtest.php @@ -30,8 +30,8 @@ // FIXME: Test config readable. include_once('./config.php'); -include_once('./constants.php'); -include_once('./lib/InstallationTests.php'); +include_once(LEGACY_ROOT . '/constants.php'); +include_once(LEGACY_ROOT . '/lib/InstallationTests.php'); define('REQUIRED_SCHEMA_VERSION', '1200'); diff --git a/lib/ActivityEntries.php b/lib/ActivityEntries.php index 5c342d624..24c8c5db0 100755 --- a/lib/ActivityEntries.php +++ b/lib/ActivityEntries.php @@ -41,17 +41,17 @@ /** * Candidates library. */ -include_once('./lib/Candidates.php'); +include_once(LEGACY_ROOT . '/lib/Candidates.php'); /** * Contacts library. */ -include_once('./lib/Contacts.php'); +include_once(LEGACY_ROOT . '/lib/Contacts.php'); /** * Job Orders library. */ -include_once('./lib/JobOrders.php'); +include_once(LEGACY_ROOT . '/lib/JobOrders.php'); /** diff --git a/lib/AddressParser.php b/lib/AddressParser.php index 944ccb52c..dab606023 100755 --- a/lib/AddressParser.php +++ b/lib/AddressParser.php @@ -38,12 +38,12 @@ /** * Aray Utility library. */ -include_once('./lib/ArrayUtility.php'); +include_once(LEGACY_ROOT . '/lib/ArrayUtility.php'); /** * Result Set Utility library. */ -include_once('./lib/ResultSetUtility.php'); +include_once(LEGACY_ROOT . '/lib/ResultSetUtility.php'); /** diff --git a/lib/Attachments.php b/lib/Attachments.php index f05ef9f8a..f7a90614a 100755 --- a/lib/Attachments.php +++ b/lib/Attachments.php @@ -31,10 +31,10 @@ */ -include_once('./lib/FileUtility.php'); -include_once('./lib/DocumentToText.php'); -include_once('./lib/DatabaseSearch.php'); -include_once('./lib/Hooks.php'); +include_once(LEGACY_ROOT . '/lib/FileUtility.php'); +include_once(LEGACY_ROOT . '/lib/DocumentToText.php'); +include_once(LEGACY_ROOT . '/lib/DatabaseSearch.php'); +include_once(LEGACY_ROOT . '/lib/Hooks.php'); /** * Attachments Library diff --git a/lib/CATSUtility.php b/lib/CATSUtility.php index 2feb4ffe5..2a24809ca 100755 --- a/lib/CATSUtility.php +++ b/lib/CATSUtility.php @@ -32,7 +32,7 @@ // FIXME: Why is this being reincluded here? include_once('./config.php'); -include_once('./lib/FileUtility.php'); +include_once(LEGACY_ROOT . '/lib/FileUtility.php'); /** * General Utility Library diff --git a/lib/CBFUtility.php b/lib/CBFUtility.php index 63ce25aac..d69bf180a 100755 --- a/lib/CBFUtility.php +++ b/lib/CBFUtility.php @@ -1,5 +1,5 @@ getSiteID()); $defaultCompanyID = $companies->getDefaultCompany(); diff --git a/lib/Users.php b/lib/Users.php index bc9111142..1921cdf17 100755 --- a/lib/Users.php +++ b/lib/Users.php @@ -30,11 +30,11 @@ * @version $Id: Users.php 3593 2007-11-13 17:36:57Z andrew $ */ -include_once('./lib/License.php'); +include_once(LEGACY_ROOT . '/lib/License.php'); if (AUTH_MODE == "ldap" || AUTH_MODE == "sql+ldap") { - require_once('./lib/LDAP.php'); + require_once(LEGACY_ROOT . '/lib/LDAP.php'); } /* Login status flags. */ diff --git a/lib/WebForm.php b/lib/WebForm.php index 9b3259563..91dcdb129 100755 --- a/lib/WebForm.php +++ b/lib/WebForm.php @@ -30,7 +30,7 @@ * @version $Id: WebForm.php 3705 2007-11-26 23:34:51Z will $ */ -include_once('./lib/Graphs.php'); +include_once(LEGACY_ROOT . '/lib/Graphs.php'); define('WFT_TEXT', 1); define('WFT_PASSWORD', 2); diff --git a/lib/Wizard.php b/lib/Wizard.php index 64791a71e..ca4112563 100755 --- a/lib/Wizard.php +++ b/lib/Wizard.php @@ -31,7 +31,7 @@ */ // FIXME: This is globally included... -include_once('./lib/CATSUtility.php'); +include_once(LEGACY_ROOT . '/lib/CATSUtility.php'); /** * Form Wizard Library diff --git a/modules/activity/ActivityUI.php b/modules/activity/ActivityUI.php index 21b5d44da..e5c1bd06b 100755 --- a/modules/activity/ActivityUI.php +++ b/modules/activity/ActivityUI.php @@ -25,12 +25,12 @@ * */ -include_once('./lib/ActivityEntries.php'); -include_once('./lib/StringUtility.php'); -include_once('./lib/Contacts.php'); -include_once('./lib/Candidates.php'); -include_once('./lib/DateUtility.php'); -include_once('./lib/InfoString.php'); +include_once(LEGACY_ROOT . '/lib/ActivityEntries.php'); +include_once(LEGACY_ROOT . '/lib/StringUtility.php'); +include_once(LEGACY_ROOT . '/lib/Contacts.php'); +include_once(LEGACY_ROOT . '/lib/Candidates.php'); +include_once(LEGACY_ROOT . '/lib/DateUtility.php'); +include_once(LEGACY_ROOT . '/lib/InfoString.php'); class ActivityUI extends UserInterface diff --git a/modules/activity/dataGrids.php b/modules/activity/dataGrids.php index 539a8bc9b..5f9923659 100644 --- a/modules/activity/dataGrids.php +++ b/modules/activity/dataGrids.php @@ -31,10 +31,10 @@ * $Id: dataGrids.php 3566 2007-11-12 09:46:35Z will $ */ -include_once('./lib/ActivityEntries.php'); -include_once('./lib/Hooks.php'); -include_once('./lib/InfoString.php'); -include_once('./lib/Width.php'); +include_once(LEGACY_ROOT . '/lib/ActivityEntries.php'); +include_once(LEGACY_ROOT . '/lib/Hooks.php'); +include_once(LEGACY_ROOT . '/lib/InfoString.php'); +include_once(LEGACY_ROOT . '/lib/Width.php'); class ActivityDataGrid extends DataGrid { diff --git a/modules/attachments/AttachmentsUI.php b/modules/attachments/AttachmentsUI.php index 8f1829f29..7e3d1079b 100755 --- a/modules/attachments/AttachmentsUI.php +++ b/modules/attachments/AttachmentsUI.php @@ -27,8 +27,8 @@ * $Id: HomeUI.php 2969 2007-08-29 23:33:39Z brian $ */ -include_once('./lib/CommonErrors.php'); -include_once('./lib/Attachments.php'); +include_once(LEGACY_ROOT . '/lib/CommonErrors.php'); +include_once(LEGACY_ROOT . '/lib/Attachments.php'); class AttachmentsUI extends UserInterface { diff --git a/modules/calendar/CalendarUI.php b/modules/calendar/CalendarUI.php index e39bb1e8a..cebc6cceb 100755 --- a/modules/calendar/CalendarUI.php +++ b/modules/calendar/CalendarUI.php @@ -27,9 +27,9 @@ * $Id: CalendarUI.php 3807 2007-12-05 01:47:41Z will $ */ -include_once('./lib/Calendar.php'); -include_once('./lib/DateUtility.php'); -include_once('./lib/SystemUtility.php'); +include_once(LEGACY_ROOT . '/lib/Calendar.php'); +include_once(LEGACY_ROOT . '/lib/DateUtility.php'); +include_once(LEGACY_ROOT . '/lib/SystemUtility.php'); class CalendarUI extends UserInterface diff --git a/modules/calendar/tasks/Reminders.php b/modules/calendar/tasks/Reminders.php index 47e61fbd6..2f6ec429a 100755 --- a/modules/calendar/tasks/Reminders.php +++ b/modules/calendar/tasks/Reminders.php @@ -25,10 +25,10 @@ * $Id: Reminders.php 3558 2007-11-11 22:44:14Z will $ */ -include_once('./modules/queue/lib/Task.php'); -include_once('./lib/Calendar.php'); -include_once('./lib/DateUtility.php'); -include_once('./lib/SystemUtility.php'); +include_once(LEGACY_ROOT . '/modules/queue/lib/Task.php'); +include_once(LEGACY_ROOT . '/lib/Calendar.php'); +include_once(LEGACY_ROOT . '/lib/DateUtility.php'); +include_once(LEGACY_ROOT . '/lib/SystemUtility.php'); class Reminders extends Task { diff --git a/modules/candidates/CandidatesUI.php b/modules/candidates/CandidatesUI.php index 9bbbc11eb..381c71346 100755 --- a/modules/candidates/CandidatesUI.php +++ b/modules/candidates/CandidatesUI.php @@ -27,27 +27,27 @@ * $Id: CandidatesUI.php 3810 2007-12-05 19:13:25Z brian $ */ -include_once('./lib/FileUtility.php'); -include_once('./lib/StringUtility.php'); -include_once('./lib/ResultSetUtility.php'); -include_once('./lib/DateUtility.php'); /* Depends on StringUtility. */ -include_once('./lib/Candidates.php'); -include_once('./lib/Pipelines.php'); -include_once('./lib/Attachments.php'); -include_once('./lib/ActivityEntries.php'); -include_once('./lib/JobOrders.php'); -include_once('./lib/Export.php'); -include_once('./lib/ExtraFields.php'); -include_once('./lib/Calendar.php'); -include_once('./lib/SavedLists.php'); -include_once('./lib/EmailTemplates.php'); -include_once('./lib/DocumentToText.php'); -include_once('./lib/DatabaseSearch.php'); -include_once('./lib/CommonErrors.php'); -include_once('./lib/License.php'); -include_once('./lib/ParseUtility.php'); -include_once('./lib/Questionnaire.php'); -include_once('./lib/Tags.php'); +include_once(LEGACY_ROOT . '/lib/FileUtility.php'); +include_once(LEGACY_ROOT . '/lib/StringUtility.php'); +include_once(LEGACY_ROOT . '/lib/ResultSetUtility.php'); +include_once(LEGACY_ROOT . '/lib/DateUtility.php'); /* Depends on StringUtility. */ +include_once(LEGACY_ROOT . '/lib/Candidates.php'); +include_once(LEGACY_ROOT . '/lib/Pipelines.php'); +include_once(LEGACY_ROOT . '/lib/Attachments.php'); +include_once(LEGACY_ROOT . '/lib/ActivityEntries.php'); +include_once(LEGACY_ROOT . '/lib/JobOrders.php'); +include_once(LEGACY_ROOT . '/lib/Export.php'); +include_once(LEGACY_ROOT . '/lib/ExtraFields.php'); +include_once(LEGACY_ROOT . '/lib/Calendar.php'); +include_once(LEGACY_ROOT . '/lib/SavedLists.php'); +include_once(LEGACY_ROOT . '/lib/EmailTemplates.php'); +include_once(LEGACY_ROOT . '/lib/DocumentToText.php'); +include_once(LEGACY_ROOT . '/lib/DatabaseSearch.php'); +include_once(LEGACY_ROOT . '/lib/CommonErrors.php'); +include_once(LEGACY_ROOT . '/lib/License.php'); +include_once(LEGACY_ROOT . '/lib/ParseUtility.php'); +include_once(LEGACY_ROOT . '/lib/Questionnaire.php'); +include_once(LEGACY_ROOT . '/lib/Tags.php'); class CandidatesUI extends UserInterface { @@ -137,7 +137,7 @@ public function handleRequest() { CommonErrors::fatal(COMMONERROR_PERMISSION, $this, 'Invalid user level for action.'); } - include_once('./lib/Search.php'); + include_once(LEGACY_ROOT . '/lib/Search.php'); if ($this->isGetBack()) { @@ -155,7 +155,7 @@ public function handleRequest() { CommonErrors::fatal(COMMONERROR_PERMISSION, $this, 'Invalid user level for action.'); } - include_once('./lib/Search.php'); + include_once(LEGACY_ROOT . '/lib/Search.php'); $this->viewResume(); break; @@ -169,7 +169,7 @@ public function handleRequest() { CommonErrors::fatal(COMMONERROR_PERMISSION, $this, 'Invalid user level for action.'); } - include_once('./lib/Search.php'); + include_once(LEGACY_ROOT . '/lib/Search.php'); $this->considerForJobSearch(); @@ -251,7 +251,7 @@ public function handleRequest() CommonErrors::fatal(COMMONERROR_PERMISSION, $this, 'Invalid user level for action.'); } - include_once('./lib/DocumentToText.php'); + include_once(LEGACY_ROOT . '/lib/DocumentToText.php'); if ($this->isPostBack()) { diff --git a/modules/candidates/dataGrids.php b/modules/candidates/dataGrids.php index cb5e87a68..fc8b194c4 100755 --- a/modules/candidates/dataGrids.php +++ b/modules/candidates/dataGrids.php @@ -3,7 +3,7 @@ //TODO: License include_once('lib/Candidates.php'); -include_once('./lib/Width.php'); +include_once(LEGACY_ROOT . '/lib/Width.php'); class candidatesListByViewDataGrid extends CandidatesDataGrid { diff --git a/modules/careers/CareersUI.php b/modules/careers/CareersUI.php index 4c155a109..6faf45210 100755 --- a/modules/careers/CareersUI.php +++ b/modules/careers/CareersUI.php @@ -26,23 +26,23 @@ * $Id: CareersUI.php 3812 2007-12-05 21:33:28Z andrew $ */ -include_once('./lib/CareerPortal.php'); -include_once('./lib/JobOrders.php'); -include_once('./lib/Candidates.php'); -include_once('./lib/Site.php'); -include_once('./lib/Companies.php'); -include_once('./lib/Contacts.php'); -include_once('./lib/Users.php'); -include_once('./lib/FileUtility.php'); -include_once('./lib/ActivityEntries.php'); -include_once('./lib/DocumentToText.php'); -include_once('./lib/DatabaseConnection.php'); -include_once('./lib/DatabaseSearch.php'); -include_once('./lib/CommonErrors.php'); -include_once('./lib/Questionnaire.php'); -include_once('./lib/DocumentToText.php'); -include_once('./lib/FileUtility.php'); -include_once('./lib/ParseUtility.php'); +include_once(LEGACY_ROOT . '/lib/CareerPortal.php'); +include_once(LEGACY_ROOT . '/lib/JobOrders.php'); +include_once(LEGACY_ROOT . '/lib/Candidates.php'); +include_once(LEGACY_ROOT . '/lib/Site.php'); +include_once(LEGACY_ROOT . '/lib/Companies.php'); +include_once(LEGACY_ROOT . '/lib/Contacts.php'); +include_once(LEGACY_ROOT . '/lib/Users.php'); +include_once(LEGACY_ROOT . '/lib/FileUtility.php'); +include_once(LEGACY_ROOT . '/lib/ActivityEntries.php'); +include_once(LEGACY_ROOT . '/lib/DocumentToText.php'); +include_once(LEGACY_ROOT . '/lib/DatabaseConnection.php'); +include_once(LEGACY_ROOT . '/lib/DatabaseSearch.php'); +include_once(LEGACY_ROOT . '/lib/CommonErrors.php'); +include_once(LEGACY_ROOT . '/lib/Questionnaire.php'); +include_once(LEGACY_ROOT . '/lib/DocumentToText.php'); +include_once(LEGACY_ROOT . '/lib/FileUtility.php'); +include_once(LEGACY_ROOT . '/lib/ParseUtility.php'); class CareersUI extends UserInterface { diff --git a/modules/companies/CompaniesUI.php b/modules/companies/CompaniesUI.php index b64d291ef..ff77a97bb 100755 --- a/modules/companies/CompaniesUI.php +++ b/modules/companies/CompaniesUI.php @@ -27,18 +27,18 @@ * $Id: CompaniesUI.php 3460 2007-11-07 03:50:34Z brian $ */ -include_once('./lib/StringUtility.php'); -include_once('./lib/DateUtility.php'); /* Depends on StringUtility. */ -include_once('./lib/ResultSetUtility.php'); -include_once('./lib/Companies.php'); -include_once('./lib/Contacts.php'); -include_once('./lib/JobOrders.php'); -include_once('./lib/Attachments.php'); -include_once('./lib/Export.php'); -include_once('./lib/ListEditor.php'); -include_once('./lib/FileUtility.php'); -include_once('./lib/ExtraFields.php'); -include_once('./lib/CommonErrors.php'); +include_once(LEGACY_ROOT . '/lib/StringUtility.php'); +include_once(LEGACY_ROOT . '/lib/DateUtility.php'); /* Depends on StringUtility. */ +include_once(LEGACY_ROOT . '/lib/ResultSetUtility.php'); +include_once(LEGACY_ROOT . '/lib/Companies.php'); +include_once(LEGACY_ROOT . '/lib/Contacts.php'); +include_once(LEGACY_ROOT . '/lib/JobOrders.php'); +include_once(LEGACY_ROOT . '/lib/Attachments.php'); +include_once(LEGACY_ROOT . '/lib/Export.php'); +include_once(LEGACY_ROOT . '/lib/ListEditor.php'); +include_once(LEGACY_ROOT . '/lib/FileUtility.php'); +include_once(LEGACY_ROOT . '/lib/ExtraFields.php'); +include_once(LEGACY_ROOT . '/lib/CommonErrors.php'); class CompaniesUI extends UserInterface { @@ -133,7 +133,7 @@ public function handleRequest() { CommonErrors::fatal(COMMONERROR_PERMISSION, $this, 'Invalid user level for action.'); } - include_once('./lib/Search.php'); + include_once(LEGACY_ROOT . '/lib/Search.php'); if ($this->isGetBack()) { @@ -152,7 +152,7 @@ public function handleRequest() { CommonErrors::fatal(COMMONERROR_PERMISSION, $this, 'Invalid user level for action.'); } - include_once('./lib/DocumentToText.php'); + include_once(LEGACY_ROOT . '/lib/DocumentToText.php'); if ($this->isPostBack()) { diff --git a/modules/companies/dataGrids.php b/modules/companies/dataGrids.php index 811d030e7..7c47385c5 100644 --- a/modules/companies/dataGrids.php +++ b/modules/companies/dataGrids.php @@ -31,9 +31,9 @@ * $Id: dataGrids.php 3096 2007-09-25 19:27:04Z brian $ */ -include_once('./lib/Companies.php'); -include_once('./lib/Hooks.php'); -include_once('./lib/Width.php'); +include_once(LEGACY_ROOT . '/lib/Companies.php'); +include_once(LEGACY_ROOT . '/lib/Hooks.php'); +include_once(LEGACY_ROOT . '/lib/Width.php'); class CompaniesListByViewDataGrid extends CompaniesDataGrid { diff --git a/modules/contacts/ContactsUI.php b/modules/contacts/ContactsUI.php index be1cf0ec5..da0af7bff 100755 --- a/modules/contacts/ContactsUI.php +++ b/modules/contacts/ContactsUI.php @@ -27,17 +27,17 @@ * $Id: ContactsUI.php 3444 2007-11-06 23:16:27Z will $ */ -include_once('./lib/StringUtility.php'); -include_once('./lib/ResultSetUtility.php'); -include_once('./lib/DateUtility.php'); -include_once('./lib/Contacts.php'); -include_once('./lib/Companies.php'); -include_once('./lib/JobOrders.php'); -include_once('./lib/ActivityEntries.php'); -include_once('./lib/Export.php'); -include_once('./lib/ExtraFields.php'); -include_once('./lib/Calendar.php'); -include_once('./lib/CommonErrors.php'); +include_once(LEGACY_ROOT . '/lib/StringUtility.php'); +include_once(LEGACY_ROOT . '/lib/ResultSetUtility.php'); +include_once(LEGACY_ROOT . '/lib/DateUtility.php'); +include_once(LEGACY_ROOT . '/lib/Contacts.php'); +include_once(LEGACY_ROOT . '/lib/Companies.php'); +include_once(LEGACY_ROOT . '/lib/JobOrders.php'); +include_once(LEGACY_ROOT . '/lib/ActivityEntries.php'); +include_once(LEGACY_ROOT . '/lib/Export.php'); +include_once(LEGACY_ROOT . '/lib/ExtraFields.php'); +include_once(LEGACY_ROOT . '/lib/Calendar.php'); +include_once(LEGACY_ROOT . '/lib/CommonErrors.php'); class ContactsUI extends UserInterface @@ -135,7 +135,7 @@ public function handleRequest() { CommonErrors::fatal(COMMONERROR_PERMISSION, $this, 'Invalid user level for action.'); } - include_once('./lib/Search.php'); + include_once(LEGACY_ROOT . '/lib/Search.php'); if ($this->isGetBack()) { @@ -177,7 +177,7 @@ public function handleRequest() { CommonErrors::fatal(COMMONERROR_PERMISSION, $this, 'Invalid user level for action.'); } - include_once('./lib/VCard.php'); + include_once(LEGACY_ROOT . '/lib/VCard.php'); $this->downloadVCard(); break; diff --git a/modules/contacts/dataGrids.php b/modules/contacts/dataGrids.php index dbe8897b6..d423f4572 100644 --- a/modules/contacts/dataGrids.php +++ b/modules/contacts/dataGrids.php @@ -31,9 +31,9 @@ * $Id: dataGrids.php 3096 2007-09-25 19:27:04Z brian $ */ -include_once('./lib/Contacts.php'); -include_once('./lib/Hooks.php'); -include_once('./lib/Width.php'); +include_once(LEGACY_ROOT . '/lib/Contacts.php'); +include_once(LEGACY_ROOT . '/lib/Hooks.php'); +include_once(LEGACY_ROOT . '/lib/Width.php'); class ContactsListByViewDataGrid extends ContactsDataGrid { diff --git a/modules/export/ExportUI.php b/modules/export/ExportUI.php index 35b3d1db6..a6a6ad99d 100755 --- a/modules/export/ExportUI.php +++ b/modules/export/ExportUI.php @@ -34,8 +34,8 @@ * $Id: ExportUI.php 2996 2007-09-06 21:41:18Z brian $ */ -include_once('./lib/Export.php'); -include_once('./lib/CommonErrors.php'); +include_once(LEGACY_ROOT . '/lib/Export.php'); +include_once(LEGACY_ROOT . '/lib/CommonErrors.php'); class ExportUI extends UserInterface diff --git a/modules/graphs/GraphsUI.php b/modules/graphs/GraphsUI.php index efd77d37e..2b056c50a 100755 --- a/modules/graphs/GraphsUI.php +++ b/modules/graphs/GraphsUI.php @@ -27,12 +27,12 @@ * $Id: GraphsUI.php 3710 2007-11-27 16:41:19Z brian $ */ -include_once('./lib/Statistics.php'); -include_once('./lib/Graphs.php'); -include_once('./lib/GraphGenerator.php'); -include_once('./lib/DateUtility.php'); -include_once('./lib/CommonErrors.php'); -include_once('./lib/Dashboard.php'); +include_once(LEGACY_ROOT . '/lib/Statistics.php'); +include_once(LEGACY_ROOT . '/lib/Graphs.php'); +include_once(LEGACY_ROOT . '/lib/GraphGenerator.php'); +include_once(LEGACY_ROOT . '/lib/DateUtility.php'); +include_once(LEGACY_ROOT . '/lib/CommonErrors.php'); +include_once(LEGACY_ROOT . '/lib/Dashboard.php'); class GraphsUI extends UserInterface diff --git a/modules/home/HomeUI.php b/modules/home/HomeUI.php index a495bf4c9..d544fc66f 100755 --- a/modules/home/HomeUI.php +++ b/modules/home/HomeUI.php @@ -27,9 +27,9 @@ * $Id: HomeUI.php 3810 2007-12-05 19:13:25Z brian $ */ -include_once('./lib/NewVersionCheck.php'); -include_once('./lib/CommonErrors.php'); -include_once('./lib/Dashboard.php'); +include_once(LEGACY_ROOT . '/lib/NewVersionCheck.php'); +include_once(LEGACY_ROOT . '/lib/CommonErrors.php'); +include_once(LEGACY_ROOT . '/lib/Dashboard.php'); class HomeUI extends UserInterface { @@ -54,27 +54,27 @@ public function handleRequest() switch ($action) { case 'quickSearch': - include_once('./lib/Search.php'); - include_once('./lib/StringUtility.php'); + include_once(LEGACY_ROOT . '/lib/Search.php'); + include_once(LEGACY_ROOT . '/lib/StringUtility.php'); $this->quickSearch(); break; case 'deleteSavedSearch': - include_once('./lib/Search.php'); + include_once(LEGACY_ROOT . '/lib/Search.php'); $this->deleteSavedSearch(); break; case 'addSavedSearch': - include_once('./lib/Search.php'); + include_once(LEGACY_ROOT . '/lib/Search.php'); $this->addSavedSearch(); break; /* FIXME: undefined function getAttachment() case 'getAttachment': - include_once('./lib/Attachments.php'); + include_once(LEGACY_ROOT . '/lib/Attachments.php'); $this->getAttachment(); break; diff --git a/modules/home/dataGrids.php b/modules/home/dataGrids.php index a028005f7..8f9cd4095 100644 --- a/modules/home/dataGrids.php +++ b/modules/home/dataGrids.php @@ -31,10 +31,10 @@ * $Id: dataGrids.php 3583 2007-11-12 23:04:42Z brian $ */ -include_once('./lib/Hooks.php'); -include_once('./lib/InfoString.php'); -include_once('./lib/Pipelines.php'); -include_once('./lib/Width.php'); +include_once(LEGACY_ROOT . '/lib/Hooks.php'); +include_once(LEGACY_ROOT . '/lib/InfoString.php'); +include_once(LEGACY_ROOT . '/lib/Pipelines.php'); +include_once(LEGACY_ROOT . '/lib/Width.php'); class ImportantPipelineDashboard extends DataGrid @@ -199,9 +199,9 @@ public function getSQL($selectSQL, $joinSQL, $whereSQL, $havingSQL, $orderSQL, $ // FIXME: Includes in the middle of the file = bad. // FIXME: Multiple classes per file probably also bad. -include_once('./lib/ActivityEntries.php'); -include_once('./lib/Hooks.php'); -include_once('./lib/InfoString.php'); +include_once(LEGACY_ROOT . '/lib/ActivityEntries.php'); +include_once(LEGACY_ROOT . '/lib/Hooks.php'); +include_once(LEGACY_ROOT . '/lib/InfoString.php'); class CallsDataGrid extends DataGrid { diff --git a/modules/import/ImportUI.php b/modules/import/ImportUI.php index 5e6a7c320..46bba65a7 100755 --- a/modules/import/ImportUI.php +++ b/modules/import/ImportUI.php @@ -27,18 +27,18 @@ * $Id: ImportUI.php 3833 2007-12-12 18:18:09Z brian $ */ -include_once('./lib/Statistics.php'); -include_once('./lib/StringUtility.php'); -include_once('./modules/import/Import.php'); -include_once('./lib/Companies.php'); -include_once('./lib/Contacts.php'); -include_once('./lib/Candidates.php'); -include_once('./lib/DatabaseSearch.php'); -include_once('./lib/FileUtility.php'); -include_once('./lib/ExtraFields.php'); -include_once('./lib/Attachments.php'); -include_once('./lib/ParseUtility.php'); -include_once('./lib/Import.php'); +include_once(LEGACY_ROOT . '/lib/Statistics.php'); +include_once(LEGACY_ROOT . '/lib/StringUtility.php'); +include_once(LEGACY_ROOT . '/modules/import/Import.php'); +include_once(LEGACY_ROOT . '/lib/Companies.php'); +include_once(LEGACY_ROOT . '/lib/Contacts.php'); +include_once(LEGACY_ROOT . '/lib/Candidates.php'); +include_once(LEGACY_ROOT . '/lib/DatabaseSearch.php'); +include_once(LEGACY_ROOT . '/lib/FileUtility.php'); +include_once(LEGACY_ROOT . '/lib/ExtraFields.php'); +include_once(LEGACY_ROOT . '/lib/Attachments.php'); +include_once(LEGACY_ROOT . '/lib/ParseUtility.php'); +include_once(LEGACY_ROOT . '/lib/Import.php'); class ImportUI extends UserInterface diff --git a/modules/install/CATSUI.php b/modules/install/CATSUI.php index 2b4ed9abe..a1fdd2380 100755 --- a/modules/install/CATSUI.php +++ b/modules/install/CATSUI.php @@ -25,7 +25,7 @@ * $Id: CATSUI.php 1479 2007-01-17 00:22:21Z will $ */ -include_once('./modules/install/Schema.php'); +include_once(LEGACY_ROOT . '/modules/install/Schema.php'); class CATSUI extends UserInterface { diff --git a/modules/install/ajax/attachmentsReindex.php b/modules/install/ajax/attachmentsReindex.php index 44fdb9529..6ae481f5f 100755 --- a/modules/install/ajax/attachmentsReindex.php +++ b/modules/install/ajax/attachmentsReindex.php @@ -26,8 +26,8 @@ */ include_once('./config.php'); -include_once('./lib/DatabaseConnection.php'); -include_once('./lib/ModuleUtility.php'); +include_once(LEGACY_ROOT . '/lib/DatabaseConnection.php'); +include_once(LEGACY_ROOT . '/lib/ModuleUtility.php'); if (file_exists('INSTALL_BLOCK')) { diff --git a/modules/install/ajax/attachmentsToThreeDirectory.php b/modules/install/ajax/attachmentsToThreeDirectory.php index 9876e6764..b38d73b9e 100755 --- a/modules/install/ajax/attachmentsToThreeDirectory.php +++ b/modules/install/ajax/attachmentsToThreeDirectory.php @@ -28,7 +28,7 @@ */ include_once('./config.php'); -include_once('./lib/DatabaseConnection.php'); +include_once(LEGACY_ROOT . '/lib/DatabaseConnection.php'); $interface = new SecureAJAXInterface(); diff --git a/modules/install/ajax/ui.php b/modules/install/ajax/ui.php index 435bcd837..abec49232 100755 --- a/modules/install/ajax/ui.php +++ b/modules/install/ajax/ui.php @@ -28,8 +28,8 @@ */ include_once('./config.php'); -include_once('./lib/InstallationTests.php'); -include_once('./lib/CATSUtility.php'); +include_once(LEGACY_ROOT . '/lib/InstallationTests.php'); +include_once(LEGACY_ROOT . '/lib/CATSUtility.php'); set_time_limit(300); @ini_set('memory_limit', '192M'); diff --git a/modules/joborders/JobOrdersUI.php b/modules/joborders/JobOrdersUI.php index 5b1cc4aaa..23413da10 100755 --- a/modules/joborders/JobOrdersUI.php +++ b/modules/joborders/JobOrdersUI.php @@ -27,25 +27,25 @@ * $Id: JobOrdersUI.php 3810 2007-12-05 19:13:25Z brian $ */ -include_once('./lib/StringUtility.php'); -include_once('./lib/ResultSetUtility.php'); -include_once('./lib/DateUtility.php'); /* Depends on StringUtility. */ -include_once('./lib/JobOrders.php'); -include_once('./lib/Pipelines.php'); -include_once('./lib/Attachments.php'); -include_once('./lib/Companies.php'); -include_once('./lib/Candidates.php'); -include_once('./lib/ActivityEntries.php'); -include_once('./lib/Export.php'); -include_once('./lib/InfoString.php'); -include_once('./lib/EmailTemplates.php'); -include_once('./lib/FileUtility.php'); -include_once('./lib/CareerPortal.php'); -include_once('./lib/ExtraFields.php'); -include_once('./lib/Graphs.php'); -include_once('./lib/Questionnaire.php'); -include_once('./lib/CommonErrors.php'); -include_once('./lib/JobOrderTypes.php'); +include_once(LEGACY_ROOT . '/lib/StringUtility.php'); +include_once(LEGACY_ROOT . '/lib/ResultSetUtility.php'); +include_once(LEGACY_ROOT . '/lib/DateUtility.php'); /* Depends on StringUtility. */ +include_once(LEGACY_ROOT . '/lib/JobOrders.php'); +include_once(LEGACY_ROOT . '/lib/Pipelines.php'); +include_once(LEGACY_ROOT . '/lib/Attachments.php'); +include_once(LEGACY_ROOT . '/lib/Companies.php'); +include_once(LEGACY_ROOT . '/lib/Candidates.php'); +include_once(LEGACY_ROOT . '/lib/ActivityEntries.php'); +include_once(LEGACY_ROOT . '/lib/Export.php'); +include_once(LEGACY_ROOT . '/lib/InfoString.php'); +include_once(LEGACY_ROOT . '/lib/EmailTemplates.php'); +include_once(LEGACY_ROOT . '/lib/FileUtility.php'); +include_once(LEGACY_ROOT . '/lib/CareerPortal.php'); +include_once(LEGACY_ROOT . '/lib/ExtraFields.php'); +include_once(LEGACY_ROOT . '/lib/Graphs.php'); +include_once(LEGACY_ROOT . '/lib/Questionnaire.php'); +include_once(LEGACY_ROOT . '/lib/CommonErrors.php'); +include_once(LEGACY_ROOT . '/lib/JobOrderTypes.php'); class JobOrdersUI extends UserInterface @@ -157,7 +157,7 @@ public function handleRequest() { CommonErrors::fatal(COMMONERROR_PERMISSION, $this, 'Invalid user level for action.'); } - include_once('./lib/Search.php'); + include_once(LEGACY_ROOT . '/lib/Search.php'); if ($this->isGetBack()) { @@ -196,7 +196,7 @@ public function handleRequest() { CommonErrors::fatal(COMMONERROR_PERMISSION, $this, 'Invalid user level for action.'); } - include_once('./lib/Search.php'); + include_once(LEGACY_ROOT . '/lib/Search.php'); if ($this->isPostBack()) { @@ -256,7 +256,7 @@ public function handleRequest() CommonErrors::fatal(COMMONERROR_PERMISSION, $this, 'Invalid user level for action.'); } - include_once('./lib/DocumentToText.php'); + include_once(LEGACY_ROOT . '/lib/DocumentToText.php'); if ($this->isPostBack()) { @@ -1398,7 +1398,7 @@ private function onAddCandidateModal() if (!eval(Hooks::get('JO_ON_ADD_CANDIDATE_MODAL'))) return; - include_once('./modules/candidates/CandidatesUI.php'); + include_once(LEGACY_ROOT . '/modules/candidates/CandidatesUI.php'); $candidatesUI = new CandidatesUI(); if (is_array($mp = $candidatesUI->checkParsingFunctions())) @@ -1542,7 +1542,7 @@ private function onAddActivityChangeStatus() if (!eval(Hooks::get('JO_ON_ADD_ACTIVITY_CHANGE_STATUS'))) return; - include_once('./modules/candidates/CandidatesUI.php'); + include_once(LEGACY_ROOT . '/modules/candidates/CandidatesUI.php'); $candidatesUI = new CandidatesUI(); $candidatesUI->publicAddActivityChangeStatus( true, $regardingID, $this->_moduleDirectory diff --git a/modules/joborders/dataGrids.php b/modules/joborders/dataGrids.php index 6dc16dfe5..6bab24f97 100644 --- a/modules/joborders/dataGrids.php +++ b/modules/joborders/dataGrids.php @@ -32,8 +32,8 @@ */ include_once('lib/JobOrders.php'); -include_once('./lib/Hooks.php'); -include_once('./lib/Width.php'); +include_once(LEGACY_ROOT . '/lib/Hooks.php'); +include_once(LEGACY_ROOT . '/lib/Width.php'); class JobOrdersListByViewDataGrid extends JobOrdersDataGrid { diff --git a/modules/lists/ListsUI.php b/modules/lists/ListsUI.php index 2877459e9..b5f132c8a 100755 --- a/modules/lists/ListsUI.php +++ b/modules/lists/ListsUI.php @@ -27,18 +27,18 @@ * $Id: ListsUI.php 3807 2007-12-05 01:47:41Z will $ */ -include_once('./lib/StringUtility.php'); -include_once('./lib/DateUtility.php'); /* Depends on StringUtility. */ -include_once('./lib/ResultSetUtility.php'); -include_once('./lib/Companies.php'); -include_once('./lib/Contacts.php'); -include_once('./lib/JobOrders.php'); -include_once('./lib/Attachments.php'); -include_once('./lib/Export.php'); -include_once('./lib/ListEditor.php'); -include_once('./lib/FileUtility.php'); -include_once('./lib/SavedLists.php'); -include_once('./lib/ExtraFields.php'); +include_once(LEGACY_ROOT . '/lib/StringUtility.php'); +include_once(LEGACY_ROOT . '/lib/DateUtility.php'); /* Depends on StringUtility. */ +include_once(LEGACY_ROOT . '/lib/ResultSetUtility.php'); +include_once(LEGACY_ROOT . '/lib/Companies.php'); +include_once(LEGACY_ROOT . '/lib/Contacts.php'); +include_once(LEGACY_ROOT . '/lib/JobOrders.php'); +include_once(LEGACY_ROOT . '/lib/Attachments.php'); +include_once(LEGACY_ROOT . '/lib/Export.php'); +include_once(LEGACY_ROOT . '/lib/ListEditor.php'); +include_once(LEGACY_ROOT . '/lib/FileUtility.php'); +include_once(LEGACY_ROOT . '/lib/SavedLists.php'); +include_once(LEGACY_ROOT . '/lib/ExtraFields.php'); class ListsUI extends UserInterface diff --git a/modules/lists/ajax/addToLists.php b/modules/lists/ajax/addToLists.php index 1ece12b6c..0e4396c0c 100755 --- a/modules/lists/ajax/addToLists.php +++ b/modules/lists/ajax/addToLists.php @@ -27,9 +27,9 @@ * $Id: addToLists.php 3198 2007-10-14 23:36:43Z will $ */ -include_once('./lib/StringUtility.php'); -include_once('./lib/ActivityEntries.php'); -include_once('./lib/SavedLists.php'); +include_once(LEGACY_ROOT . '/lib/StringUtility.php'); +include_once(LEGACY_ROOT . '/lib/ActivityEntries.php'); +include_once(LEGACY_ROOT . '/lib/SavedLists.php'); function isRequiredValueValid($value) { diff --git a/modules/lists/ajax/deleteList.php b/modules/lists/ajax/deleteList.php index affb95528..e3a55757b 100755 --- a/modules/lists/ajax/deleteList.php +++ b/modules/lists/ajax/deleteList.php @@ -28,9 +28,9 @@ */ -include_once('./lib/StringUtility.php'); -include_once('./lib/ActivityEntries.php'); -include_once('./lib/SavedLists.php'); +include_once(LEGACY_ROOT . '/lib/StringUtility.php'); +include_once(LEGACY_ROOT . '/lib/ActivityEntries.php'); +include_once(LEGACY_ROOT . '/lib/SavedLists.php'); $interface = new SecureAJAXInterface(); diff --git a/modules/lists/ajax/editListName.php b/modules/lists/ajax/editListName.php index 13809b6f6..36014659f 100755 --- a/modules/lists/ajax/editListName.php +++ b/modules/lists/ajax/editListName.php @@ -28,9 +28,9 @@ */ -include_once('./lib/StringUtility.php'); -include_once('./lib/ActivityEntries.php'); -include_once('./lib/SavedLists.php'); +include_once(LEGACY_ROOT . '/lib/StringUtility.php'); +include_once(LEGACY_ROOT . '/lib/ActivityEntries.php'); +include_once(LEGACY_ROOT . '/lib/SavedLists.php'); $interface = new SecureAJAXInterface(); diff --git a/modules/lists/ajax/newList.php b/modules/lists/ajax/newList.php index 9e6892ae2..006b07ea0 100755 --- a/modules/lists/ajax/newList.php +++ b/modules/lists/ajax/newList.php @@ -28,9 +28,9 @@ */ -include_once('./lib/StringUtility.php'); -include_once('./lib/ActivityEntries.php'); -include_once('./lib/SavedLists.php'); +include_once(LEGACY_ROOT . '/lib/StringUtility.php'); +include_once(LEGACY_ROOT . '/lib/ActivityEntries.php'); +include_once(LEGACY_ROOT . '/lib/SavedLists.php'); $interface = new SecureAJAXInterface(); diff --git a/modules/lists/dataGrids.php b/modules/lists/dataGrids.php index 325771c4d..ebcf485d8 100644 --- a/modules/lists/dataGrids.php +++ b/modules/lists/dataGrids.php @@ -31,9 +31,9 @@ * $Id: dataGrids.php 3566 2007-11-12 09:46:35Z will $ */ -include_once('./lib/Companies.php'); -include_once('./lib/Hooks.php'); -include_once('./lib/Width.php'); +include_once(LEGACY_ROOT . '/lib/Companies.php'); +include_once(LEGACY_ROOT . '/lib/Hooks.php'); +include_once(LEGACY_ROOT . '/lib/Width.php'); class ListsDataGrid extends DataGrid { diff --git a/modules/login/LoginUI.php b/modules/login/LoginUI.php index e2ba959f9..498dc9bfc 100755 --- a/modules/login/LoginUI.php +++ b/modules/login/LoginUI.php @@ -27,12 +27,12 @@ * $Id: LoginUI.php 3720 2007-11-27 21:06:13Z andrew $ */ -include_once('./lib/SystemInfo.php'); -include_once('./lib/Mailer.php'); -include_once('./lib/Site.php'); -include_once('./lib/NewVersionCheck.php'); -include_once('./lib/Wizard.php'); -include_once('./lib/License.php'); +include_once(LEGACY_ROOT . '/lib/SystemInfo.php'); +include_once(LEGACY_ROOT . '/lib/Mailer.php'); +include_once(LEGACY_ROOT . '/lib/Site.php'); +include_once(LEGACY_ROOT . '/lib/NewVersionCheck.php'); +include_once(LEGACY_ROOT . '/lib/Wizard.php'); +include_once(LEGACY_ROOT . '/lib/License.php'); class LoginUI extends UserInterface { diff --git a/modules/queue/tasks.php b/modules/queue/tasks.php index 2e6d80359..98bf04382 100755 --- a/modules/queue/tasks.php +++ b/modules/queue/tasks.php @@ -37,7 +37,7 @@ /*************** ADD NEW TASKS HERE (scheduling is set inside the task) ****************/ include_once('config.php'); -include_once('./modules/asp/lib/ASPUtility.php'); +include_once(LEGACY_ROOT . '/modules/asp/lib/ASPUtility.php'); QueueProcessor::registerRecurringTask('CleanExceptions'); diff --git a/modules/queue/tasks/CleanExceptions.php b/modules/queue/tasks/CleanExceptions.php index dcfda08cc..b1b1835a1 100755 --- a/modules/queue/tasks/CleanExceptions.php +++ b/modules/queue/tasks/CleanExceptions.php @@ -31,7 +31,7 @@ * $Id: CleanExceptions.php 3539 2007-11-09 23:03:11Z andrew $ */ -include_once('./modules/queue/lib/Task.php'); +include_once(LEGACY_ROOT . '/modules/queue/lib/Task.php'); // The number of days a logged exception should be saved before it is deleted. define('EXCEPTIONS_TTL_DAYS', 7); diff --git a/modules/queue/tasks/SampleRecurring.php b/modules/queue/tasks/SampleRecurring.php index 46b422d1b..750302c72 100755 --- a/modules/queue/tasks/SampleRecurring.php +++ b/modules/queue/tasks/SampleRecurring.php @@ -26,7 +26,7 @@ * $Id: SampleRecurring.php 3539 2007-11-09 23:03:11Z andrew $ */ -include_once('./modules/queue/lib/Task.php'); +include_once(LEGACY_ROOT . '/modules/queue/lib/Task.php'); /** * This is a SAMPLE file for setting up a recurring task with the CATS diff --git a/modules/queue/tasks/SampleTask.php b/modules/queue/tasks/SampleTask.php index 8e6e3478b..1add830c6 100755 --- a/modules/queue/tasks/SampleTask.php +++ b/modules/queue/tasks/SampleTask.php @@ -31,7 +31,7 @@ * $Id: SampleTask.php 3539 2007-11-09 23:03:11Z andrew $ */ -include_once('./modules/queue/lib/Task.php'); +include_once(LEGACY_ROOT . '/modules/queue/lib/Task.php'); /** * This is a SAMPLE file for setting up a NON-recurring task with the CATS diff --git a/modules/queue/tasks/Sphinx.php b/modules/queue/tasks/Sphinx.php index f939addde..86dcad099 100755 --- a/modules/queue/tasks/Sphinx.php +++ b/modules/queue/tasks/Sphinx.php @@ -31,8 +31,8 @@ * $Id: Sphinx.php 3539 2007-11-09 23:03:11Z andrew $ */ -include_once('./modules/queue/lib/Task.php'); -include_once('./modules/asp/lib/ASPUtility.php'); +include_once(LEGACY_ROOT . '/modules/queue/lib/Task.php'); +include_once(LEGACY_ROOT . '/modules/asp/lib/ASPUtility.php'); class Sphinx extends Task { diff --git a/modules/reports/ReportsUI.php b/modules/reports/ReportsUI.php index 2a29a4a5e..1f4826a97 100755 --- a/modules/reports/ReportsUI.php +++ b/modules/reports/ReportsUI.php @@ -27,10 +27,10 @@ * $Id: ReportsUI.php 3810 2007-12-05 19:13:25Z brian $ */ -include_once('./lib/Statistics.php'); -include_once('./lib/DateUtility.php'); -include_once('./lib/Candidates.php'); -include_once('./lib/CommonErrors.php'); +include_once(LEGACY_ROOT . '/lib/Statistics.php'); +include_once(LEGACY_ROOT . '/lib/DateUtility.php'); +include_once(LEGACY_ROOT . '/lib/Candidates.php'); +include_once(LEGACY_ROOT . '/lib/CommonErrors.php'); class ReportsUI extends UserInterface { @@ -411,7 +411,7 @@ private function generateJobOrderReportPDF() /* E_STRICT doesn't like FPDF. */ $errorReporting = error_reporting(); error_reporting($errorReporting & ~ E_STRICT); - include_once('./lib/fpdf/fpdf.php'); + include_once(LEGACY_ROOT . '/lib/fpdf/fpdf.php'); error_reporting($errorReporting); // FIXME: Hook? diff --git a/modules/rss/RssUI.php b/modules/rss/RssUI.php index 90acd5285..2b9b67f89 100755 --- a/modules/rss/RssUI.php +++ b/modules/rss/RssUI.php @@ -34,11 +34,11 @@ * $Id: RssUI.php 3687 2007-11-26 16:36:01Z andrew $ */ -include_once('./lib/ActivityEntries.php'); -include_once('./lib/StringUtility.php'); -include_once('./lib/DateUtility.php'); -include_once('./lib/JobOrders.php'); -include_once('./lib/Site.php'); +include_once(LEGACY_ROOT . '/lib/ActivityEntries.php'); +include_once(LEGACY_ROOT . '/lib/StringUtility.php'); +include_once(LEGACY_ROOT . '/lib/DateUtility.php'); +include_once(LEGACY_ROOT . '/lib/JobOrders.php'); +include_once(LEGACY_ROOT . '/lib/Site.php'); class RssUI extends UserInterface { diff --git a/modules/settings/AspDownloads.tpl b/modules/settings/AspDownloads.tpl index 4160e749f..7f7f650d6 100755 --- a/modules/settings/AspDownloads.tpl +++ b/modules/settings/AspDownloads.tpl @@ -47,7 +47,7 @@ if (isset($_GET['sendDevEmail']) && !strcmp($_GET['sendDevEmail'], 'true') && fi { if (isset($_COOKIE['CATS_firefoxToolbar']) && !strcmp($_COOKIE['CATS_firefoxToolbar'], 'true')) exit(0); - include_once('./modules/asp/lib/ASPUtility.php'); + include_once(LEGACY_ROOT . '/modules/asp/lib/ASPUtility.php'); ASPUtility::sendDevEmail( 'Firefox Download', sprintf( diff --git a/modules/settings/SettingsUI.php b/modules/settings/SettingsUI.php index 684d0586b..0f58e4e71 100755 --- a/modules/settings/SettingsUI.php +++ b/modules/settings/SettingsUI.php @@ -27,26 +27,26 @@ * $Id: SettingsUI.php 3810 2007-12-05 19:13:25Z brian $ */ -include_once('./lib/LoginActivity.php'); -include_once('./lib/NewVersionCheck.php'); -include_once('./lib/Candidates.php'); -include_once('./lib/Companies.php'); -include_once('./lib/Contacts.php'); -include_once('./lib/Graphs.php'); -include_once('./lib/Site.php'); -include_once('./lib/ListEditor.php'); -include_once('./lib/SystemUtility.php'); -include_once('./lib/Mailer.php'); -include_once('./lib/EmailTemplates.php'); -include_once('./lib/License.php'); -include_once('./lib/History.php'); -include_once('./lib/Pipelines.php'); -include_once('./lib/CareerPortal.php'); -include_once('./lib/WebForm.php'); -include_once('./lib/CommonErrors.php'); -include_once('./lib/Import.php'); -include_once('./lib/Questionnaire.php'); -include_once('./lib/Tags.php'); +include_once(LEGACY_ROOT . '/lib/LoginActivity.php'); +include_once(LEGACY_ROOT . '/lib/NewVersionCheck.php'); +include_once(LEGACY_ROOT . '/lib/Candidates.php'); +include_once(LEGACY_ROOT . '/lib/Companies.php'); +include_once(LEGACY_ROOT . '/lib/Contacts.php'); +include_once(LEGACY_ROOT . '/lib/Graphs.php'); +include_once(LEGACY_ROOT . '/lib/Site.php'); +include_once(LEGACY_ROOT . '/lib/ListEditor.php'); +include_once(LEGACY_ROOT . '/lib/SystemUtility.php'); +include_once(LEGACY_ROOT . '/lib/Mailer.php'); +include_once(LEGACY_ROOT . '/lib/EmailTemplates.php'); +include_once(LEGACY_ROOT . '/lib/License.php'); +include_once(LEGACY_ROOT . '/lib/History.php'); +include_once(LEGACY_ROOT . '/lib/Pipelines.php'); +include_once(LEGACY_ROOT . '/lib/CareerPortal.php'); +include_once(LEGACY_ROOT . '/lib/WebForm.php'); +include_once(LEGACY_ROOT . '/lib/CommonErrors.php'); +include_once(LEGACY_ROOT . '/lib/Import.php'); +include_once(LEGACY_ROOT . '/lib/Questionnaire.php'); +include_once(LEGACY_ROOT . '/lib/Tags.php'); eval(Hooks::get('XML_FEED_SUBMISSION_SETTINGS_HEADERS')); /* Users.php is included by index.php already. */ @@ -664,7 +664,7 @@ public function handleRequest() CommonErrors::fatal(COMMONERROR_PERMISSION, $this, 'Invalid user level for action.'); } - include_once('./lib/BrowserDetection.php'); + include_once(LEGACY_ROOT . '/lib/BrowserDetection.php'); $this->loginActivity(); break; diff --git a/modules/settings/ajax/backup.php b/modules/settings/ajax/backup.php index ad178d6e3..68046e5a2 100755 --- a/modules/settings/ajax/backup.php +++ b/modules/settings/ajax/backup.php @@ -119,7 +119,7 @@ function setStatusBackup($status, $progress) if ($action == 'backup') { - include_once('./lib/FileCompressor.php'); + include_once(LEGACY_ROOT . '/lib/FileCompressor.php'); /* Backups shouldn't time out. */ set_time_limit(0); diff --git a/modules/tests/TestsUI.php b/modules/tests/TestsUI.php index ba34aebd8..737da9c8a 100755 --- a/modules/tests/TestsUI.php +++ b/modules/tests/TestsUI.php @@ -38,10 +38,10 @@ require_once('lib/simpletest/form.php'); /* CATS Test Framework. */ -include_once('./modules/tests/CATSTestReporter.php'); -include_once('./modules/tests/CATSWebTestCase.php'); -include_once('./modules/tests/CATSAJAXTestCase.php'); -include_once('./modules/tests/TestCaseList.php'); +include_once(LEGACY_ROOT . '/modules/tests/CATSTestReporter.php'); +include_once(LEGACY_ROOT . '/modules/tests/CATSWebTestCase.php'); +include_once(LEGACY_ROOT . '/modules/tests/CATSAJAXTestCase.php'); +include_once(LEGACY_ROOT . '/modules/tests/TestCaseList.php'); class TestsUI extends UserInterface diff --git a/modules/tests/ajax/getCandidateJobOrderID.php b/modules/tests/ajax/getCandidateJobOrderID.php index 7b068383c..6785dbfda 100755 --- a/modules/tests/ajax/getCandidateJobOrderID.php +++ b/modules/tests/ajax/getCandidateJobOrderID.php @@ -27,7 +27,7 @@ * $Id: getCandidateJobOrderID.php 1479 2007-01-17 00:22:21Z will $ */ -include_once('./lib/Pipelines.php'); +include_once(LEGACY_ROOT . '/lib/Pipelines.php'); $interface = new SecureAJAXInterface(); diff --git a/modules/tests/testcases/AJAXTests.php b/modules/tests/testcases/AJAXTests.php index f70b1641e..777260bf6 100755 --- a/modules/tests/testcases/AJAXTests.php +++ b/modules/tests/testcases/AJAXTests.php @@ -9,7 +9,7 @@ * $Id: AJAXTests.php 2380 2007-04-25 21:01:23Z will $ */ -include_once('./lib/ActivityEntries.php'); +include_once(LEGACY_ROOT . '/lib/ActivityEntries.php'); class ActivityTest extends CATSAJAXTestCase diff --git a/modules/tests/waitForDb.php b/modules/tests/waitForDb.php index 4e4bcc5e0..fb7327bc8 100644 --- a/modules/tests/waitForDb.php +++ b/modules/tests/waitForDb.php @@ -1,7 +1,7 @@ 0) diff --git a/modules/toolbar/ToolbarUI.php b/modules/toolbar/ToolbarUI.php index a0e1e4fe9..0408f3cc4 100755 --- a/modules/toolbar/ToolbarUI.php +++ b/modules/toolbar/ToolbarUI.php @@ -27,12 +27,12 @@ * $Id: ToolbarUI.php 3691 2007-11-26 18:12:48Z brian $ */ -include_once('./lib/SystemInfo.php'); -include_once('./lib/Mailer.php'); -include_once('./lib/Site.php'); -include_once('./lib/Candidates.php'); -include_once('./lib/DocumentToText.php'); -include_once('./lib/License.php'); +include_once(LEGACY_ROOT . '/lib/SystemInfo.php'); +include_once(LEGACY_ROOT . '/lib/Mailer.php'); +include_once(LEGACY_ROOT . '/lib/Site.php'); +include_once(LEGACY_ROOT . '/lib/Candidates.php'); +include_once(LEGACY_ROOT . '/lib/DocumentToText.php'); +include_once(LEGACY_ROOT . '/lib/License.php'); /* Toolbar library version. Increment to notify toolbars of an update. */ define('TOOLBAR_LIB_VERSION', 32); diff --git a/modules/wizard/WizardUI.php b/modules/wizard/WizardUI.php index 9734e9798..babf65a92 100755 --- a/modules/wizard/WizardUI.php +++ b/modules/wizard/WizardUI.php @@ -30,12 +30,12 @@ * $Id: WizardUI.php 3569 2007-11-12 15:54:44Z andrew $ */ -include_once('./lib/ActivityEntries.php'); -include_once('./lib/StringUtility.php'); -include_once('./lib/DateUtility.php'); -include_once('./lib/JobOrders.php'); -include_once('./lib/Site.php'); -include_once('./lib/CareerPortal.php'); +include_once(LEGACY_ROOT . '/lib/ActivityEntries.php'); +include_once(LEGACY_ROOT . '/lib/StringUtility.php'); +include_once(LEGACY_ROOT . '/lib/DateUtility.php'); +include_once(LEGACY_ROOT . '/lib/JobOrders.php'); +include_once(LEGACY_ROOT . '/lib/Site.php'); +include_once(LEGACY_ROOT . '/lib/CareerPortal.php'); class WizardUI extends UserInterface { diff --git a/modules/xml/XmlUI.php b/modules/xml/XmlUI.php index f50ca3499..490536a94 100755 --- a/modules/xml/XmlUI.php +++ b/modules/xml/XmlUI.php @@ -32,14 +32,14 @@ * $Id: XmlUI.php 3565 2007-11-12 09:09:22Z will $ */ -include_once('./lib/ActivityEntries.php'); -include_once('./lib/StringUtility.php'); -include_once('./lib/DateUtility.php'); -include_once('./lib/JobOrders.php'); -include_once('./lib/Site.php'); -include_once('./lib/XmlJobExport.php'); -include_once('./lib/HttpLogger.php'); -include_once('./lib/CareerPortal.php'); +include_once(LEGACY_ROOT . '/lib/ActivityEntries.php'); +include_once(LEGACY_ROOT . '/lib/StringUtility.php'); +include_once(LEGACY_ROOT . '/lib/DateUtility.php'); +include_once(LEGACY_ROOT . '/lib/JobOrders.php'); +include_once(LEGACY_ROOT . '/lib/Site.php'); +include_once(LEGACY_ROOT . '/lib/XmlJobExport.php'); +include_once(LEGACY_ROOT . '/lib/HttpLogger.php'); +include_once(LEGACY_ROOT . '/lib/CareerPortal.php'); define('XTPL_HEADER_STRING', 'header'); define('XTPL_FOOTER_STRING', 'footer'); diff --git a/optional-updates/latest-sphinx-search/Search.php b/optional-updates/latest-sphinx-search/Search.php index 2a1e794d8..ab6f94540 100644 --- a/optional-updates/latest-sphinx-search/Search.php +++ b/optional-updates/latest-sphinx-search/Search.php @@ -30,8 +30,8 @@ * @version $Id: Search.php 3587 2007-11-13 03:55:57Z will $ */ -include_once('./lib/Pager.php'); -include_once('./lib/DatabaseSearch.php'); +include_once(LEGACY_ROOT . '/lib/Pager.php'); +include_once(LEGACY_ROOT . '/lib/DatabaseSearch.php'); if (ENABLE_SPHINX) { diff --git a/rebuild_old_docs.php b/rebuild_old_docs.php index bb6973ce1..2cba2ec3e 100644 --- a/rebuild_old_docs.php +++ b/rebuild_old_docs.php @@ -17,7 +17,7 @@ function rebuild_old_docs() { $result = mysql_query('SELECT * FROM `attachment` WHERE `text` IS NULL'); - include_once('./lib/DocumentToText.php'); + include_once(LEGACY_ROOT . '/lib/DocumentToText.php'); $countOK = 0; $countError = 0; diff --git a/rss/index.php b/rss/index.php index 393394a76..8812b20e7 100644 --- a/rss/index.php +++ b/rss/index.php @@ -34,7 +34,7 @@ $rssPage = true; chdir('..'); -include_once('./lib/CATSUtility.php'); +include_once(LEGACY_ROOT . '/lib/CATSUtility.php'); include_once(CATSUtility::getIndexName()); ?> diff --git a/scripts/makeBackup.php b/scripts/makeBackup.php index d10089b38..3c6d938ef 100755 --- a/scripts/makeBackup.php +++ b/scripts/makeBackup.php @@ -55,9 +55,9 @@ chdir($CATSHome); include_once('./config.php'); - include_once('./constants.php'); - include_once('./lib/DatabaseConnection.php'); - include_once('modules/install/backupDB.php'); + include_once(LEGACY_ROOT . '/constants.php'); + include_once(LEGACY_ROOT . '/lib/DatabaseConnection.php'); + include_once(LEGACY_ROOT . '/modules/install/backupDB.php'); makeBackup((int) $_SERVER['argv'][1], BACKUP_CATS); } @@ -68,9 +68,9 @@ } include_once('./config.php'); -include_once('./constants.php'); -include_once('./lib/DatabaseConnection.php'); -include_once('modules/install/backupDB.php'); +include_once(LEGACY_ROOT . '/constants.php'); +include_once(LEGACY_ROOT . '/lib/DatabaseConnection.php'); +include_once(LEGACY_ROOT . '/modules/install/backupDB.php'); function makeBackup($siteID, $backupType = BACKUP_TAR, $logFile = null) { diff --git a/src/OpenCATS/Entity/CompanyRepository.php b/src/OpenCATS/Entity/CompanyRepository.php index 1642dd571..cc87a0ded 100644 --- a/src/OpenCATS/Entity/CompanyRepository.php +++ b/src/OpenCATS/Entity/CompanyRepository.php @@ -2,7 +2,7 @@ namespace OpenCATS\Entity; use OpenCATS\Entity\Company; -include_once('./lib/History.php'); +include_once(LEGACY_ROOT . '/lib/History.php'); class CompanyRepository { diff --git a/src/OpenCATS/Entity/JobOrderRepository.php b/src/OpenCATS/Entity/JobOrderRepository.php index 5ab98878e..d26611794 100644 --- a/src/OpenCATS/Entity/JobOrderRepository.php +++ b/src/OpenCATS/Entity/JobOrderRepository.php @@ -3,7 +3,7 @@ use OpenCATS\Entity\JobOrder; use OpenCATS\Entity\JobOrderRepositoryException; -include_once('./lib/History.php'); +include_once(LEGACY_ROOT . '/lib/History.php'); // FIXME: It's way too similar to CompanyRepository // Remove duplicated code diff --git a/src/OpenCATS/Tests/IntegrationTests/DatabaseTestCase.php b/src/OpenCATS/Tests/IntegrationTests/DatabaseTestCase.php index 2f71d5295..5d48fc41d 100644 --- a/src/OpenCATS/Tests/IntegrationTests/DatabaseTestCase.php +++ b/src/OpenCATS/Tests/IntegrationTests/DatabaseTestCase.php @@ -16,7 +16,7 @@ function setUp() define('DATABASE_HOST', 'integrationtestdb'); include_once('./config.php'); - include_once('./lib/DatabaseConnection.php'); + include_once(LEGACY_ROOT . '/lib/DatabaseConnection.php'); $mySQLConnection = @mysql_connect( DATABASE_HOST, DATABASE_USER, DATABASE_PASS ); diff --git a/test/config.php b/test/config.php index e2e2da7f6..1052283ed 100644 --- a/test/config.php +++ b/test/config.php @@ -30,6 +30,13 @@ /* License key. */ define('LICENSE_KEY','3163GQ-54ISGW-14E4SHD-ES9ICL-X02DTG-GYRSQ6'); + +/* legacy root. */ +if( !defined('LEGACY_ROOT') ) +{ + define('LEGACY_ROOT', '.'); +} + /* Database configuration. */ define('DATABASE_USER', 'dev'); define('DATABASE_PASS', 'dev'); diff --git a/test/features/bootstrap/FeatureContext.php b/test/features/bootstrap/FeatureContext.php index b1b772abe..d3eb75e7b 100644 --- a/test/features/bootstrap/FeatureContext.php +++ b/test/features/bootstrap/FeatureContext.php @@ -13,12 +13,12 @@ use Behat\Mink\Exception\ElementHtmlException; include_once('./config.php'); -include_once('./constants.php'); -include_once('./lib/DatabaseConnection.php'); -include_once('./lib/Site.php'); -include_once('./lib/History.php'); -include_once('./lib/Search.php'); -include_once('./lib/Users.php'); +include_once(LEGACY_ROOT . '/constants.php'); +include_once(LEGACY_ROOT . '/lib/DatabaseConnection.php'); +include_once(LEGACY_ROOT . '/lib/Site.php'); +include_once(LEGACY_ROOT . '/lib/History.php'); +include_once(LEGACY_ROOT . '/lib/Search.php'); +include_once(LEGACY_ROOT . '/lib/Users.php'); /** * Defines application features from the specific context. */ diff --git a/xml/index.php b/xml/index.php index 797bfb6e2..82ef28faf 100644 --- a/xml/index.php +++ b/xml/index.php @@ -34,7 +34,7 @@ $xmlPage = true; chdir('..'); -include_once('./lib/CATSUtility.php'); +include_once(LEGACY_ROOT . '/lib/CATSUtility.php'); include_once(CATSUtility::getIndexName()); ?> From 5fc6803b05b218b35a82504cb1c594d584e4fb68 Mon Sep 17 00:00:00 2001 From: Sveto Krchnavy Date: Mon, 1 May 2017 21:14:51 +0200 Subject: [PATCH 2/3] added legacy root into tests --- .../Tests/IntegrationTests/DatabaseSearchTest.php | 7 ++++++- src/OpenCATS/Tests/UnitTests/AJAXInterfaceTest.php | 7 ++++++- src/OpenCATS/Tests/UnitTests/AddressParserTest.php | 9 +++++++-- src/OpenCATS/Tests/UnitTests/ArrayUtilityTest.php | 7 ++++++- src/OpenCATS/Tests/UnitTests/BrowserDetectionTest.php | 7 ++++++- .../Tests/UnitTests/CompanyRepositoryTest.php | 8 +++++++- src/OpenCATS/Tests/UnitTests/DateUtilityTest.php | 11 ++++++++--- src/OpenCATS/Tests/UnitTests/FileUtilityTest.php | 7 ++++++- src/OpenCATS/Tests/UnitTests/ResultSetUtilityTest.php | 7 ++++++- src/OpenCATS/Tests/UnitTests/StringUtilityTest.php | 7 ++++++- src/OpenCATS/Tests/UnitTests/VCardTest.php | 7 ++++++- 11 files changed, 70 insertions(+), 14 deletions(-) diff --git a/src/OpenCATS/Tests/IntegrationTests/DatabaseSearchTest.php b/src/OpenCATS/Tests/IntegrationTests/DatabaseSearchTest.php index 288977df1..ade9a389e 100644 --- a/src/OpenCATS/Tests/IntegrationTests/DatabaseSearchTest.php +++ b/src/OpenCATS/Tests/IntegrationTests/DatabaseSearchTest.php @@ -5,7 +5,12 @@ use DatabaseConnection; use DatabaseSearch; -include_once('./lib/DatabaseSearch.php'); +if( !defined('LEGACY_ROOT') ) +{ + define('LEGACY_ROOT', '.'); +} + +include_once(LEGACY_ROOT . '/lib/DatabaseSearch.php'); class DatabaseSearchTest extends DatabaseTestCase { diff --git a/src/OpenCATS/Tests/UnitTests/AJAXInterfaceTest.php b/src/OpenCATS/Tests/UnitTests/AJAXInterfaceTest.php index 56dab4958..2aec763ad 100644 --- a/src/OpenCATS/Tests/UnitTests/AJAXInterfaceTest.php +++ b/src/OpenCATS/Tests/UnitTests/AJAXInterfaceTest.php @@ -1,7 +1,12 @@ Date: Tue, 2 May 2017 05:26:26 +0200 Subject: [PATCH 3/3] missing legacy_root added --- ajax/getCandidateIdByEmail.php | 2 +- ajax/getCandidateIdByPhone.php | 2 +- index.php | 4 ++-- installwizard.php | 2 +- lib/Dashboard.php | 2 +- lib/ExtraFields.php | 2 +- lib/InstallationTests.php | 8 ++++---- lib/ModuleUtility.php | 10 +++++----- lib/Session.php | 2 +- lib/TemplateUtility.php | 6 +++--- modules/candidates/dataGrids.php | 2 +- modules/import/ajax/processMassImportItem.php | 2 +- modules/install/ajax/attachmentsReindex.php | 2 +- modules/install/ajax/attachmentsToThreeDirectory.php | 4 ++-- modules/install/ajax/ui.php | 8 ++++---- modules/joborders/dataGrids.php | 2 +- modules/settings/ajax/backup.php | 4 ++-- modules/tests/TestsUI.php | 4 ++-- scripts/makeBackup.php | 2 +- 19 files changed, 35 insertions(+), 35 deletions(-) diff --git a/ajax/getCandidateIdByEmail.php b/ajax/getCandidateIdByEmail.php index a10f24496..9528ea3ed 100755 --- a/ajax/getCandidateIdByEmail.php +++ b/ajax/getCandidateIdByEmail.php @@ -29,7 +29,7 @@ $interface = new SecureAJAXInterface(); -include ('lib/Candidates.php'); +include (LEGACY_ROOT .'/lib/Candidates.php'); if (!isset($_REQUEST['email'])) { diff --git a/ajax/getCandidateIdByPhone.php b/ajax/getCandidateIdByPhone.php index 04418b20b..43c69d0ba 100644 --- a/ajax/getCandidateIdByPhone.php +++ b/ajax/getCandidateIdByPhone.php @@ -29,7 +29,7 @@ $interface = new SecureAJAXInterface(); -include ('lib/Candidates.php'); +include (LEGACY_ROOT . '/lib/Candidates.php'); if (!isset($_REQUEST['phone'])) { diff --git a/index.php b/index.php index e51043b4e..e898f8595 100644 --- a/index.php +++ b/index.php @@ -40,7 +40,7 @@ /* Do we need to run the installer? */ if (!file_exists('INSTALL_BLOCK') && !isset($_POST['performMaintenence'])) { - include('modules/install/notinstalled.php'); + include(LEGACY_ROOT .'/modules/install/notinstalled.php'); die(); } @@ -151,7 +151,7 @@ function stripslashes_deep($value) if (ModuleUtility::moduleExists("asp") && ModuleUtility::moduleExists("website")) { // FIXME: Can we optimize this a bit...? - include_once('modules/asp/lib/General.php'); + include_once(LEGACY_ROOT .'/modules/asp/lib/General.php'); if (!(isset($careerPage) && $careerPage) && !(isset($rssPage) && $rssPage) && diff --git a/installwizard.php b/installwizard.php index f8531b282..662f3430e 100755 --- a/installwizard.php +++ b/installwizard.php @@ -13,7 +13,7 @@ $phpVersionParts = explode('.', $phpVersion); if ($phpVersionParts[0] >= 5) { - include_once('lib/TemplateUtility.php'); + include_once(LEGACY_ROOT . '/lib/TemplateUtility.php'); } else { diff --git a/lib/Dashboard.php b/lib/Dashboard.php index c23e9c3ac..c1c42f83b 100755 --- a/lib/Dashboard.php +++ b/lib/Dashboard.php @@ -30,7 +30,7 @@ * @version $Id: Dashboard.php 3784 2007-12-03 21:57:10Z brian $ */ -include_once('lib/Calendar.php'); +include_once(LEGACY_ROOT .'/lib/Calendar.php'); /** * Dashboard Library diff --git a/lib/ExtraFields.php b/lib/ExtraFields.php index 0ed550084..33900a2c6 100755 --- a/lib/ExtraFields.php +++ b/lib/ExtraFields.php @@ -27,7 +27,7 @@ * $Id: ExtraFields.php 3767 2007-11-29 16:49:10Z brian $ */ -include_once('lib/Site.php'); +include_once(LEGACY_ROOT . '/lib/Site.php'); /** * Extra Fields Library diff --git a/lib/InstallationTests.php b/lib/InstallationTests.php index ab1dbc90e..5b86bd2f0 100755 --- a/lib/InstallationTests.php +++ b/lib/InstallationTests.php @@ -540,7 +540,7 @@ public static function checkAntiword() return false; } - include_once('lib/DocumentToText.php'); + include_once(LEGACY_ROOT . '/lib/DocumentToText.php'); $documentToText = new DocumentToText(); if ($documentToText->convert('modules/install/testdocs/test.doc', DOCUMENT_TYPE_DOC)) { @@ -590,7 +590,7 @@ public static function checkPdftotext() return false; } - include_once('lib/DocumentToText.php'); + include_once(LEGACY_ROOT . '/lib/DocumentToText.php'); $documentToText = new DocumentToText(); if ($documentToText->convert('modules/install/testdocs/test.pdf', DOCUMENT_TYPE_PDF)) { @@ -640,7 +640,7 @@ public static function checkHtml2text() return false; } - include_once('lib/DocumentToText.php'); + include_once(LEGACY_ROOT . '/lib/DocumentToText.php'); $documentToText = new DocumentToText(); if ($documentToText->convert('modules/install/testdocs/test.html', DOCUMENT_TYPE_HTML)) { @@ -690,7 +690,7 @@ public static function checkUnrtf() return false; } - include_once('lib/DocumentToText.php'); + include_once(LEGACY_ROOT . '/lib/DocumentToText.php'); $documentToText = new DocumentToText(); if ($documentToText->convert('modules/install/testdocs/test.rtf', DOCUMENT_TYPE_RTF)) { diff --git a/lib/ModuleUtility.php b/lib/ModuleUtility.php index f9eb4b167..6ec912ee7 100755 --- a/lib/ModuleUtility.php +++ b/lib/ModuleUtility.php @@ -68,8 +68,8 @@ public static function loadModule($moduleName) $moduleClass = $modules[$moduleName][0]; - include_once( - 'modules/' . $moduleName . '/' + include_once(LEGACY_ROOT . + '/modules/' . $moduleName . '/' . $moduleClass . '.php' ); @@ -92,7 +92,7 @@ public static function registerModuleTasks() $moduleClass = $moduleData[0]; if (file_exists($taskFile = - sprintf('./modules/%s/tasks/tasks.php', + sprintf(LEGACY_ROOT . '/modules/%s/tasks/tasks.php', $moduleName))) { include_once($taskFile); @@ -121,8 +121,8 @@ public static function moduleRequiresAuthentication($moduleName) $moduleClass = $modules[$moduleName][0]; - include_once( - 'modules/' . $moduleName . '/' + include_once(LEGACY_ROOT . + '/modules/' . $moduleName . '/' . $moduleClass . '.php' ); diff --git a/lib/Session.php b/lib/Session.php index e01aa6275..c31d6be57 100755 --- a/lib/Session.php +++ b/lib/Session.php @@ -30,7 +30,7 @@ * @version $Id: Session.php 3676 2007-11-21 21:02:15Z brian $ */ -include('./lib/ACL.php'); +include(LEGACY_ROOT . '/lib/ACL.php'); /** * CATS Session Object diff --git a/lib/TemplateUtility.php b/lib/TemplateUtility.php index eecbc2ce3..9a2d98c18 100755 --- a/lib/TemplateUtility.php +++ b/lib/TemplateUtility.php @@ -36,9 +36,9 @@ */ include_once('./vendor/autoload.php'); -include_once('Candidates.php'); -include_once('DateUtility.php'); -include_once('SystemInfo.php'); +include_once(LEGACY_ROOT . '/lib/Candidates.php'); +include_once(LEGACY_ROOT . '/lib/DateUtility.php'); +include_once(LEGACY_ROOT . '/lib/SystemInfo.php'); use OpenCATS\UI\QuickActionMenu; diff --git a/modules/candidates/dataGrids.php b/modules/candidates/dataGrids.php index fc8b194c4..bf62ec205 100755 --- a/modules/candidates/dataGrids.php +++ b/modules/candidates/dataGrids.php @@ -2,7 +2,7 @@ //TODO: License -include_once('lib/Candidates.php'); +include_once(LEGACY_ROOT . '/lib/Candidates.php'); include_once(LEGACY_ROOT . '/lib/Width.php'); class candidatesListByViewDataGrid extends CandidatesDataGrid diff --git a/modules/import/ajax/processMassImportItem.php b/modules/import/ajax/processMassImportItem.php index df8f7adcc..7d2fb6f79 100755 --- a/modules/import/ajax/processMassImportItem.php +++ b/modules/import/ajax/processMassImportItem.php @@ -28,7 +28,7 @@ */ -include_once('lib/Attachments.php'); +include_once(LEGACY_ROOT . '/lib/Attachments.php'); $interface = new SecureAJAXInterface(); diff --git a/modules/install/ajax/attachmentsReindex.php b/modules/install/ajax/attachmentsReindex.php index 6ae481f5f..5bfe76c45 100755 --- a/modules/install/ajax/attachmentsReindex.php +++ b/modules/install/ajax/attachmentsReindex.php @@ -39,7 +39,7 @@ $reindexed = 0; -include_once('lib/Attachments.php'); +include_once(LEGACY_ROOT . '/lib/Attachments.php'); if (file_exists('INSTALL_BLOCK') && ($_SESSION['CATS']->getAccessLevel(ACL::SECOBJ_ROOT) < ACCESS_LEVEL_SA || ModuleUtility::moduleExists('asp'))) { diff --git a/modules/install/ajax/attachmentsToThreeDirectory.php b/modules/install/ajax/attachmentsToThreeDirectory.php index b38d73b9e..8514328b1 100755 --- a/modules/install/ajax/attachmentsToThreeDirectory.php +++ b/modules/install/ajax/attachmentsToThreeDirectory.php @@ -40,11 +40,11 @@ set_time_limit(0); @ini_set('memory_limit', '256M'); -include_once('lib/Attachments.php'); +include_once(LEGACY_ROOT . '/lib/Attachments.php'); $db = DatabaseConnection::getInstance(); -include_once('lib/Attachments.php'); +include_once(LEGACY_ROOT . '/lib/Attachments.php'); $db->query('ALTER IGNORE TABLE `attachment` CHANGE `directory_name` `directory_name` VARCHAR(64);'); diff --git a/modules/install/ajax/ui.php b/modules/install/ajax/ui.php index abec49232..ced883cd6 100755 --- a/modules/install/ajax/ui.php +++ b/modules/install/ajax/ui.php @@ -681,7 +681,7 @@ break; case 'restoreFromBackup': - include_once('lib/FileCompressor.php'); + include_once(LEGACY_ROOT . '/lib/FileCompressor.php'); MySQLConnect(); $extractor = new ZipFileExtractor('./restore/catsbackup.bak'); @@ -773,7 +773,7 @@ case 'onLoadDemoData': CATSUtility::changeConfigSetting('ENABLE_DEMO_MODE', 'true'); - include_once('lib/FileCompressor.php'); + include_once(LEGACY_ROOT . '/lib/FileCompressor.php'); MySQLConnect(); $extractor = new ZipFileExtractor('./db/cats_testdata.bak'); @@ -940,7 +940,7 @@ break; case 'onReindexResumes': - include_once('modules/install/ajax/attachmentsReindex.php'); + include_once(LEGACY_ROOT . '/modules/install/ajax/attachmentsReindex.php'); echo '